CVB.Net 14.0
IDigitalIO Interface Reference

Digital I/O operations on a Device. More...

Inherits IDeviceInterface.

Inherited by DigitalIO.

Public Member Functions

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...
 

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 IDeviceInterface
Device Parent [get]
 The Device this interface works on.
 

Detailed Description

Digital I/O operations on a Device.

Member Function Documentation

◆ ReadInputBit()

bool ReadInputBit ( int  port)

Reads a single input port from the device.

Parameters
portPort index to read.
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
groupGroup 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
portPort index to read.
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
groupGroup 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
portPort index to write.
valuetrue 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
groupGroup index to write.
valueVector 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
groupGroup index to write.
valueVector of port states.
maskBit mask for the bits being actually set to the ports.