Base class for all communication blocks.
More...
|
def | __init__ (self, connection, verbose) |
| Basic constructor for a communication block. More...
|
|
def | HandleBlockEnd (self, blockName, msg) |
| Check if a block has ended properly, otherwise display error and exit. More...
|
|
def | HandleEndBlockError (self, blockName) |
| Routine to handle errors which may be returned by the server at the end of a block. More...
|
|
def | ReadAndCheck (self, expectedMessage) |
| Read a messsage from the server and check whether it conforms with the expected message. More...
|
|
Base class for all communication blocks.
Usually does not need to be modified
◆ __init__()
def CommBlock.CommBlock.__init__ |
( |
|
self, |
|
|
|
connection, |
|
|
|
verbose |
|
) |
| |
Basic constructor for a communication block.
- Parameters
-
connection | Connection object |
verbose | Whether to use verbose protocol version |
◆ HandleBlockEnd()
def CommBlock.CommBlock.HandleBlockEnd |
( |
|
self, |
|
|
|
blockName, |
|
|
|
msg |
|
) |
| |
Check if a block has ended properly, otherwise display error and exit.
- Parameters
-
blockName | The name of the block, needed in case of error |
msg | The message received from the server, determines whether the end was ok or not |
◆ HandleEndBlockError()
def CommBlock.CommBlock.HandleEndBlockError |
( |
|
self, |
|
|
|
blockName |
|
) |
| |
Routine to handle errors which may be returned by the server at the end of a block.
- Parameters
-
blockName | Name of the communication block where the error occured. |
For details related to the communication blocks and the meaning of the errors, see the web documentation of the communication protocol.
Reads error message from server and terminates the connection as well as the client program.
◆ ReadAndCheck()
def CommBlock.CommBlock.ReadAndCheck |
( |
|
self, |
|
|
|
expectedMessage |
|
) |
| |
Read a messsage from the server and check whether it conforms with the expected message.
- Parameters
-
expectedMessage | If the received message does not equal expectedMessage, an error occured |
The documentation for this class was generated from the following file:
- /home/btpj/bt434229/progs/BKICK/teamsPy/BKICKshared/CommBlock.py