RevPiGateway / RevPiVirtual

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.

  • name
    name
    Name of the new Input
  • startinp
    startinp
    Input name from which to insert
  • frm
    frm
    struct() formatting (1 Sign)
  • kwargs
    kwargs
    The following optional keyword parameters can be passed:
    • bmk
      bmk
      Description for Input
    • bit
      bit
      Registers input as bool () at the specified bit in the Byte
    • byteorder
      byteorder Set byteorder “little” (Default) “big”
    • defaultvalue
      defaultvalue
      Standardvalue for Input, standard is 0
    • event
      event
      Register function for Event Handling
    • as_thread
      as_thread
      Executes the event function as a RevPiCallback thread
    • edge
      edge
      Event execution at RISING, FALLING or BOTH value Change

reg_out(name, startinp, frm, **kwargs)

Registers a new output with specified formatting.

  • name
    name
    Name of the new output
  • startout
    startout
    Output name from which to insert
  • frm
    frm
    struct() formatting (1 Sign)
  • kwargs
    kwargs
    The following optional keyword parameters can be passed:
    • bmk
      bmk
      Description for Output
    • bit
      bit
      Registers outputs as bool () at the specified bit in the Byte
    • defaultvalue
      defaultvalue
      Default for output, default is 0
    • event
      event
      Register function for Event Handling
    • as_thread
      as_thread
      Executes the event function as a RevPiCallback thread
    • edge
      edge
      Event execution at RISING, FALLING or BOTH value Change