Digital I/O operations on a Device. More...
Inherits DeviceInterfaceBase, and IDigitalIO.
Public Member Functions | |
bool | ReadInputBit (int port) |
Reads a single input port from the device. More... | |
BitVector32 | ReadInputGroup (int group) |
Reads a single output group from the device. More... | |
bool | ReadOutputBit (int port) |
Reads a single output port from the device. More... | |
BitVector32 | ReadOutputGroup (int group) |
Reads the output group from the device. More... | |
void | WriteOutputBit (int port, bool value) |
Write a single output port to the device. More... | |
void | WriteOutputGroup (int group, BitVector32 value) |
Writes the output group to the device. More... | |
void | WriteOutputGroup (int group, BitVector32 value, BitVector32 mask) |
Writes the mask ed output group to the device. More... | |
Public Member Functions inherited from DeviceInterfaceBase | |
DeviceInterfaceBase (Device device) | |
Ctor. More... | |
bool | ReadInputBit (int port) |
Reads a single input port from the device. More... | |
BitVector32 | ReadInputGroup (int group) |
Reads the input group from the device. More... | |
bool | ReadOutputBit (int port) |
Reads a single output port from the device. More... | |
BitVector32 | ReadOutputGroup (int group) |
Reads the output group from the device. More... | |
void | WriteOutputBit (int port, bool value) |
Write a single output port to the device. More... | |
void | WriteOutputGroup (int group, BitVector32 value) |
Writes the output group to the device. More... | |
void | WriteOutputGroup (int group, BitVector32 value, BitVector32 mask) |
Writes the mask ed output group to the device. More... | |
Package Functions | |
DigitalIO (Device device) | |
Creates a DigitalIO object from the given device . More... | |
Properties | |
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. | |
Properties inherited from DeviceInterfaceBase | |
Device | Parent [get] |
The Device this interface works on. | |
Properties inherited from IDeviceInterface | |
Device | Parent [get] |
The Device this interface works on. | |
Properties inherited from IDigitalIO | |
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. | |
Digital I/O operations on a Device.
Creates a DigitalIO
object from the given device .
device | Parent device. |
bool ReadInputBit | ( | int | port | ) |
Reads a single input port from the device.
port | Port index to read. |
true
for input high state; false
for low. Implements IDigitalIO.
BitVector32 ReadInputGroup | ( | int | group | ) |
Reads a single output group from the device.
group | Port index to read. |
true
for output high state; false
for low. Implements IDigitalIO.
bool ReadOutputBit | ( | int | port | ) |
Reads a single output port from the device.
port | Port index to read. |
true
for output high state; false
for low. Implements IDigitalIO.
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.
group | Group index to read. |
Implements IDigitalIO.
void WriteOutputBit | ( | int | port, |
bool | value | ||
) |
Write a single output port to the device.
port | Port index to write. |
value | true for hight state; false for low. |
Implements IDigitalIO.
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.
group | Group index to write. |
value | Vector of port states. |
Implements IDigitalIO.
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.
group | Group index to write. |
value | Vector of port states. |
mask | Bit mask for the bits being actually set to the ports. |
Implements IDigitalIO.