Impact Acquire SDK .NET
IOSubSystem Class Referenceabstract

A base class to handle digital inputs and outputs (Device specific interface layout only). More...

Inheritance diagram for IOSubSystem:
[legend]

Public Member Functions

PulseStartConfiguration getPulseStartConfiguration (int nr)
 Returns a pointer to a mv.impact.acquire.PulseStartConfiguration associated with this device.
 
RTCtrProgram getRTCtrProgram (int nr)
 Returns a pointer to a mv.impact.acquire.RTCtrProgram associated with this device.
 
DigitalInput input (int nr)
 Returns a const pointer to a mv.impact.acquire.DigitalInput object.
 
DigitalOutput output (int nr)
 Returns a pointer to a mv.impact.acquire.DigitalOutput object.
 
uint readInputRegister ()
 Returns the current state of the digital input register.
 
uint readOutputRegister ()
 Returns the current state of the digital output register.
 
virtual void writeOutputRegister (uint value)
 Alters the state of the digital output register.
 
void writeOutputRegister (uint value, uint mask)
 Alters the state of the digital output register.
 

Properties

int inputCount [get]
 Returns the number of mv.impact.acquire.DigitalInput s available for the mv.impact.acquire.Device associated with this object.
 
int outputCount [get]
 Returns the number of digital outputs available for the mv.impact.acquire.Device associated with this object.
 
int pulseStartConfigurationCount [get]
 Returns the number of mv.impact.acquire.PulseStartConfiguration objects available for the mv.impact.acquire.Device associated with this object.
 
int RTCtrProgramCount [get]
 Returns the number of mv.impact.acquire.RTCtrProgram s available for the mv.impact.acquire.Device associated with this object.
 

Detailed Description

A base class to handle digital inputs and outputs (Device specific interface layout only).

This class can't be instantiated by the user, but acts as a base class for hardware specific classes. Please use a device specific class suitable for the device you are working with instead. The documentation of the device specific class will also contain some example code.

Note
This class will only be available if mv.impact.acquire.Device.interfaceLayout is set to mv.impact.acquire.TDeviceInterfaceLayout.dilDeviceSpecific before the device is opened.
Examples
DigitalIOs.cs.

Member Function Documentation

◆ getPulseStartConfiguration()

PulseStartConfiguration getPulseStartConfiguration ( int nr)
inline

Returns a pointer to a mv.impact.acquire.PulseStartConfiguration associated with this device.

Parameters
[in]nrThe number of the pulse start configuration to return

◆ getRTCtrProgram()

RTCtrProgram getRTCtrProgram ( int nr)
inline

Returns a pointer to a mv.impact.acquire.RTCtrProgram associated with this device.

Parameters
[in]nrThe number of the real time controller program to return

◆ input()

DigitalInput input ( int nr)
inline

Returns a const pointer to a mv.impact.acquire.DigitalInput object.

Note
The possibility to access the digital inputs of a device as single objects is just provided for convenience. The same thing can be achieved by calling the function mv.impact.acquire.IOSubSystem.readInputRegister.
Parameters
[in]nrThe number of the digital input.
Examples
DigitalIOs.cs.

◆ output()

DigitalOutput output ( int nr)
inline

Returns a pointer to a mv.impact.acquire.DigitalOutput object.

Note
The possibility to access the digital outputs of a device as single objects is just provided for convenience. The same thing can be achieved by calling the function mv.impact.acquire.IOSubSystem.writeOutputRegister with the corresponding bit mask.
Parameters
[in]nrThe number of the digital output.
Examples
DigitalIOs.cs.

◆ readInputRegister()

uint readInputRegister ( )
abstract

Returns the current state of the digital input register.

This function can be used to read all digital inputs as a single value. Each bit represents the status of one digital output pin.

Example

A value of '3' returned by this function means that digital inputs 0 and 1 are currently have a voltage considered as logical '1' applied to them.

Examples
DigitalIOs.cs.

◆ readOutputRegister()

uint readOutputRegister ( )
abstract

Returns the current state of the digital output register.

This function can be used to read all digital outputs as a single value. Each bit represents the status of one digital output pin.

Example

A value of '3' returned by this function means that digital output 0 and 1 are currently set to high.

Examples
DigitalIOs.cs.

◆ writeOutputRegister() [1/2]

virtual void writeOutputRegister ( uint value)
inlinevirtual

Alters the state of the digital output register.

This function can be used to alter the state of certain (or all) digital outputs with a single function call. By working with the parameter mask certain bits can remain unaffected.

Example

If the previous state of a digital output register was '5', which means that outputs 0 and 2 are set to high a call to mv.impact.acquire.IOSubSystem.writeOutputRegister with value set to 2 and mask set to 3 would result in '6' as the new value for the output register. Pin 2 will remain unaffected, as mask states just to modify pin 0 and 1 ( 3 = 00000011 binary ).

currentValue = 5, mask = 3, value = 2
( currentValue & ~mask ) | value -> new Value
( 00000101b(current value) & 11111100(~mask) ) | 00000010(value) -> 0000110(new value of the register)
A template class to represent 32 bit integer properties and 32 bit enumerated integer properties.
Definition EnumPropertyI.cs:61
Parameters
[in]valueThe value to be applied to the output register

Reimplemented in IOSubSystemBlueFOX, and IOSubSystemCommon.

◆ writeOutputRegister() [2/2]

void writeOutputRegister ( uint value,
uint mask )
abstract

Alters the state of the digital output register.

This function can be used to alter the state of certain (or all) digital outputs with a single function call. By working with the parameter mask certain bits can remain unaffected.

Example

If the previous state of a digital output register was '5', which means that outputs 0 and 2 are set to high a call to mv.impact.acquire.IOSubSystem.writeOutputRegister with value set to 2 and mask set to 3 would result in '6' as the new value for the output register. Pin 2 will remain unaffected, as mask states just to modify pin 0 and 1 ( 3 = 00000011 binary ).

currentValue = 5, mask = 3, value = 2
( currentValue & ~mask ) | value -> new Value
( 00000101b(current value) & 11111100(~mask) ) | 00000010(value) -> 0000110(new value of the register)
Parameters
[in]valueThe value to be applied to the output register
[in]maskThe mask to specify which pins to modify. A bit set to '1' in this parameter means that the state of this output has to adopt its style according to the value in value.
Examples
DigitalIOs.cs.

Property Documentation

◆ inputCount

int inputCount
get

Returns the number of mv.impact.acquire.DigitalInput s available for the mv.impact.acquire.Device associated with this object.

Examples
DigitalIOs.cs.

◆ outputCount

int outputCount
get

Returns the number of digital outputs available for the mv.impact.acquire.Device associated with this object.

Examples
DigitalIOs.cs.

◆ pulseStartConfigurationCount

int pulseStartConfigurationCount
get

Returns the number of mv.impact.acquire.PulseStartConfiguration objects available for the mv.impact.acquire.Device associated with this object.

Examples
DigitalIOs.cs.

◆ RTCtrProgramCount

int RTCtrProgramCount
get

Returns the number of mv.impact.acquire.RTCtrProgram s available for the mv.impact.acquire.Device associated with this object.

Examples
DigitalIOs.cs.