DBBC3 Module

module for monitoring and control of the DBBC3 VLBI backend

class DBBC3(host, port=4000, mode=None, majorVersion=None, timeout=None)

Main class of the DBBC3 module.

Upon instantiation a connection is made to the DBBC3 control software server. If a connection was successfully established the mode and version of the loaded control software is being queried and the appropriate command set is being attached to the class instance.

Note

in case the optional arguments mode and/or majorVersion are given these values are comapred against the actual currently loaded mode and software version. An Exception is being raised if the values do not match.

Parameters
  • host (str) – the host name or IP address of the DBBC3

  • port (int, optional) – the port of the socket provided by the DBBC3 control software server (default: 4000)

  • mode (str, optional) – the expected mode of the DBBC3 (see note above)

  • majorVersion (int, optional) – the expected major version of the DBBC3 control software (see note above)

  • timeout (int, optional) – the timeout in seconds to set for the socket communication to the DBBC3 (default: None)

boardToChar(board)

Converts the core board number (starting at 0) into a board ID (e.g. A,B,C….)

Parameters

board (str or int) – board identifier; can be numeric e.g. 0, or char e.g. ‘A’

Returns

the core board identifier as uppercase char e.g. A

Return type

char

boardToDigit(board)

Converts the core board ID (e.g. A) into the board number (starting at 0)

Parameters

board (str or int) – board identifier; can be numeric e.g. 0, or char e.g. ‘A’

Returns

the core board identifier as integer (starting at 0 for board A)

Return type

int

disconnect()

Close the socket connection to the DBBC3

Returns

None

sendCommand(command)

Method for sending generic commands to the DBBC3

Note

the response of the last sendCommand is always available through the lastResponse class property

Parameters

command (str) – the command to the DBBC3 control software server

Returns

the response received from the DBBC3 control software

Return type

str

Raises

DBBC3Exception – in case an error occured in the communication with the DBBC3 server

property config

DBBC3Config: the dbbc3 configuration

property lastCommand

str: the last command that was sent to the DBBC3

property lastResponse

str: the last response received from the DBBC3

property timeout

int: the socket timeout in seconds