Digital I/O operations on a Device.
More...
Inherits IDeviceInterface.
Inherited by DigitalIO.
|
int | InputCount [get] |
| Gets the number of digital input ports of the Device.
|
|
int | OutputCount [get] |
| Gets the number of digital output ports of the Device.
|
|
Device | Parent [get] |
| The Device this interface works on.
|
|
Digital I/O operations on a Device.
◆ ReadInputBit()
bool ReadInputBit |
( |
int |
port | ) |
|
Reads a single input port from the device.
- Parameters
-
- Returns
true
for input high state; false
for low.
◆ ReadInputGroup()
BitVector32 ReadInputGroup |
( |
int |
group | ) |
|
Reads the input group from the device.
An input group consists of 32 single ports. Non existent ports are always 0. Thus there are only more than one input group if InputCount is larger than 32.
- Parameters
-
group | Group index to read. |
- Returns
- A BitVector32 representing the 32 bits of the input group selected by group .
◆ ReadOutputBit()
bool ReadOutputBit |
( |
int |
port | ) |
|
Reads a single output port from the device.
- Parameters
-
- Returns
true
for output high state; false
for low.
◆ ReadOutputGroup()
BitVector32 ReadOutputGroup |
( |
int |
group | ) |
|
Reads the output group from the device.
An output group consists of 32 single ports. Non existent ports are always 0. Thus there are only more than one output group if OutputCount is larger than 32.
- Parameters
-
group | Group index to read. |
- Returns
- A BitVector32 representing the 32 bits of the output group selected by group .
◆ WriteOutputBit()
void WriteOutputBit |
( |
int |
port, |
|
|
bool |
value |
|
) |
| |
Write a single output port to the device.
- Parameters
-
port | Port index to write. |
value | true for hight state; false for low. |
◆ WriteOutputGroup() [1/2]
void WriteOutputGroup |
( |
int |
group, |
|
|
BitVector32 |
value |
|
) |
| |
Writes the output group to the device.
An output group consists of 32 single ports. Non existent ports are ignored. Thus there are only more than one output group if OutputCount is larger than 32.
- Parameters
-
group | Group index to write. |
value | Vector of port states. |
◆ WriteOutputGroup() [2/2]
void WriteOutputGroup |
( |
int |
group, |
|
|
BitVector32 |
value, |
|
|
BitVector32 |
mask |
|
) |
| |
Writes the mask ed output group to the device.
An output group consists of 32 single ports. Non existent ports are ignored. Thus there are only more than one output group if OutputCount is larger than 32.
- Parameters
-
group | Group index to write. |
value | Vector of port states. |
mask | Bit mask for the bits being actually set to the ports. |