FunctionBase

Base class for for SECS stream and functions

class secsgem.secs.functionbase.StructureDisplayingMeta[source]

Bases: type

Meta class overriding the default __repr__ of a class

mro() → list

return a type’s method resolution order

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 _dataFormat must be overridden.

Example:

class SecsS02F30(SecsStreamFunction):
    _stream = 2
    _function = 30

    _toHost = True
    _toEquipment = False

    _hasReply = False
    _isReplyRequired = False

    _isMultiBlock = True

    _dataFormat = [
        [
            ECID,
            ECNAME,
            ECMIN,
            ECMAX,
            ECDEF,
            UNITS
        ]
    ]
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
set(value)[source]

Updates the value of the stream/function parameter

Parameters:value (various) – new value for the parameter
get()[source]

Gets the current value of the stream/function parameter

Returns:current parameter value
Return type:various
classmethod get_format()[source]

Gets the format of the function

Returns:returns the string representation of the function
Return type:string