RevPiIOBase

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:

class RevPiIOBase(offset, valuelist, readonly, byteproc, byteorder)
  • offset device offset in Process image
  • valuelist Datalist for object creation
  • readonly True for Inputs and Mems, False for outputs
  • byteproc local 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:

bmk

Description of the IO is taken from piCtory.

defaultvalue

Default value of the IO that is set when RevPiDevicelist.setdefaultvalues().

length

Length of process Image in Bytes.

For bit-oriented IOs, only the zeroth bit has the length 1!

name

Returns the name of the IO.

value

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:

get_absaddress()

Returns the byte address of the IO in the process Image


get_address()

Returns byte address of the IO on the device


get_value()

IO value as bytes () or bool (), which contains this IO


set_value(value

IO value as bytes () or bool () to which this IO is to be set