Pictures a gateway device. This class inherits from RevPiDevice and provides all the attributes and functions of this class.
This class accommodates all Inputs, Outputs and mems as RevPiIO objects derived from the RevPiIOBase class.
In addition, you can create your own inputs / outputs, which get a specific data format via struct (). These IOs are RevPiIOStruct object, which are also derived from RevPiIOBase.
class RevPiGateway(RevPiDevice)
NOTE: The same functions are also applicable to the RevPiVirtual:
class RevPiVirtual(RevPiGateway)
The following additional functions are provided:
get_rawbytes()
Specifies the bytes that this device uses.
reg_inp(name, startinp, frm, **kwargs)
Registers a new input with specified formatting.
nameName of the new InputstartinpInput name from which to insertfrmstruct() formatting (1 Sign)kwargsThe following optional keyword parameters can be passed:bmkDescription for InputbitRegisters input as bool () at the specified bit in the BytebyteorderSet byteorder “little” (Default) “big”defaultvalueStandardvalue for Input, standard is 0eventRegister function for Event Handlingas_threadExecutes the event function as a RevPiCallback threadedgeEvent execution at RISING, FALLING or BOTH value Change
reg_out(name, startinp, frm, **kwargs)
Registers a new output with specified formatting.
nameName of the new outputstartoutOutput name from which to insertfrmstruct() formatting (1 Sign)kwargsThe following optional keyword parameters can be passed:bmkDescription for OutputbitRegisters outputs as bool () at the specified bit in the BytedefaultvalueDefault for output, default is 0eventRegister function for Event Handlingas_threadExecutes the event function as a RevPiCallback threadedgeEvent execution at RISING, FALLING or BOTH value Change
