communication
This is the communication macro module
- class get(*args, **kwargs)[source]
Reads and outputs the data from the communication channel
- param_def = [['communication channel', 'ComChannel', None, 'the communication channel'], ['maximum length', 'String', -1, 'maximum number of bytes to read']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:
min - integer representing minimum number of repetitions or None for no minimum.
max - integer representing maximum number of repetitions or None for no maximum.
Default parameter repetition semantics is
{ 'min': 1, 'max' : None }
(in other words, “at least one repetition” semantics)
Example:
param_def = ( ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors') )
- class put(*args, **kwargs)[source]
Sends a string to the communication channel
- param_def = [['communication channel', 'ComChannel', None, 'the communication channel'], ['data', 'String', None, 'data to be sent']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:
min - integer representing minimum number of repetitions or None for no minimum.
max - integer representing maximum number of repetitions or None for no maximum.
Default parameter repetition semantics is
{ 'min': 1, 'max' : None }
(in other words, “at least one repetition” semantics)
Example:
param_def = ( ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors') )