Digital I/O operations on a device. More...
Public Member Functions | |
bool | read_input_bit (self, int port) |
Reads a single input port from the device. | |
int | read_input_group (self, int group) |
Reads a group of input ports from the device. | |
bool | read_output_bit (self, int port) |
Reads a single output port from the device. | |
int | read_output_group (self, int group) |
Reads a group of output ports from the device. | |
None | write_output_bit (self, int port, bool value) |
Writes a single output port to the device. | |
None | write_output_group (self, int port, int value, int mask=0xFFFFFFFF) |
Writes the output group to the device. | |
Properties | |
input_count = property | |
int: Gets the number of digital input ports of the device. | |
output_count = property | |
int: Gets the number of digital output ports of the device. | |
Digital I/O operations on a device.
bool read_input_bit | ( | self, | |
int | port ) |
Reads a single input port from the device.
port : int Port index to read.
bool True for input high state, false for low.
int read_input_group | ( | self, | |
int | group ) |
Reads a group of input ports from the device.
group : int Group index to read.
int State of the requested ports mapped to a 32 bit integer.
bool read_output_bit | ( | self, | |
int | port ) |
Reads a single output port from the device.
port : int Port index to read.
bool True for output high state, false for low.
int read_output_group | ( | self, | |
int | group ) |
Reads a group of output ports from the device.
group : int Group index to read.
int State of the requested ports mapped to a 32 bit integer.
None write_output_bit | ( | self, | |
int | port, | ||
bool | value ) |
Writes a single output port to the device.
An output group consists of 32 single ports. Non existent ports are ignored. Therefore there is more than one output group, if the output_count is larger than 32.
port : int Port index to write.
value : bool Value of port state.
None write_output_group | ( | self, | |
int | port, | ||
int | value, | ||
int | mask = 0xFFFFFFFF ) |
Writes the output group to the device.
An output group consists of 32 single ports. Non existent ports are ignored. Therefore there is more than one output group, if output_count is larger than 32.
port : int Port index to write.
value : int Bits of port states.
mask : int Bit mask for the bits being actually set to the ports (by default all bits are set).
We use cookies to improve your experience. By using this documentation, you agree to our use of cookies.