This class represents a single input or output of a module and allows the byte or bitwise access to its value.
Classes that inherit from RevPiIOBase:
- RevPiIO extends access to values to get or set them as int ().
- RevPiStructIO self-defined IOs for RevPiGateway objects.
class RevPiIOBase(offset, valuelist, readonly, byteproc, byteorder)
offsetdevice offset in Process image
valuelistDatalist for object creation
readonlyTrue for Inputs and Mems, False for outputs
byteproclocal buffer of Process image
byteorder“little” or “big” for int() calculation in RevPiIO class, if there are more more than one byte
All values are passed by the RevPiDevice class.
The following attributes are provided:
Description of the IO is taken from piCtory.
Default value of the IO that is set when RevPiDevicelist.setdefaultvalues().
Length of process Image in Bytes.
For bit-oriented IOs, only the zeroth bit has the length 1!
Returns the name of the IO.
Returns or sets the value as byte () / bool (), depending on instantiation.
This is dependent on how the IOs in piCtory are configured byte () or bool ().
The following functions are provided:
Returns the byte address of the IO in the process Image
Returns byte address of the IO on the device
IO value as bytes () or bool (), which contains this IO
IO value as bytes () or bool () to which this IO is to be set