FunctionBase¶
Base class for for SECS stream and functions
-
class
secsgem.secs.functionbase.
SecsStreamFunction
(value=None)[source]¶ Bases:
object
Secs stream and function base class
This class is inherited to create a stream/function class. To create a function specific content the class variables
_stream
,_function
and_formatDescriptor
must be overridden.Example:
class SecsS02F30(SecsStreamFunction): _stream = 2 _function = 30 _formatDescriptor = SecsVarArray(SecsVarList(OrderedDict(( ("ECID", SecsVarU4(1)), ("ECNAME", SecsVarString()), ("ECMIN", SecsVarDynamic([SecsVarString])), ("ECMAX", SecsVarDynamic([SecsVarString])), ("ECDEF", SecsVarDynamic([SecsVarString])), ("UNITS", SecsVarString()), )), 6))
Parameters: value (various) – set the value of stream/function parameters -
append
(data)[source]¶ Append data to list, if stream/function parameter is a list
Parameters: data (various) – list item to add
-
encode
()[source]¶ Generates the encoded hsms data of the stream/function parameter
Returns: encoded data Return type: string
-
decode
(data)[source]¶ Updates stream/function parameter data from the passed data
Parameters: data (string) – encoded data
-