A base class to handle the digital inputs and outputs for devices (Device specific interface layout only).
This class provides a convenient basic access to the digital inputs and outputs of almost every device supported by this interface.
- Note
- This class may NOT be used for mvBlueFOX devices.
-
The number of digital inputs and outputs available will vary significantly from device to device. Some devices might not even have digital inputs and/or digital outputs. Therefore it's crucial to check for available pins before using them. The corresponding functions to do that can be found in the base class mv.impact.acquire.IOSubSystem.
ExampleS(lists all available digital inputs and outputs and their description):
{
Console.WriteLine( "Available digital inputs: {0}", iCnt);
for( int d=0; d<iCnt; d++ )
{
}
Console.WriteLine( "Available digital outputs: {0}", oCnt);
for( int e=0; e<oCnt; e++ )
{
Console.WriteLine(
"Setting {0} to high", pOutput.
description);
}
}
String description
Returns a description for this digital output.
Definition DigitalIO.cs:74
A class to represent a digital output pin(Device specific interface layout only).
Definition DigitalIO.cs:91
void set()
Sets the output pin to 'logic 1'.
Definition DigitalIO.cs:122
IOSubSystemCommon(Device device)
Definition IOSubSystemCommon.cs:58
DigitalInput input(int nr)
Returns a const pointer to a mv.impact.acquire.DigitalInput object.
Definition IOSubSystem.cs:131
DigitalOutput output(int nr)
Returns a pointer to a mv.impact.acquire.DigitalOutput object.
Definition IOSubSystem.cs:144
int inputCount
Returns the number of mv.impact.acquire.DigitalInput s available for the mv.impact....
Definition IOSubSystem.cs:233
int outputCount
Returns the number of digital outputs available for the mv.impact.acquire.Device associated with this...
Definition IOSubSystem.cs:235
This namespace contains classes and functions belonging to the image acquisition module of this SDK.
Definition Enumerations.cs:2
- 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.
| override void writeOutputRegister |
( |
uint | value | ) |
|
|
inlinesealedvirtual |
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 ).
- Parameters
-
| [in] | value | The value to be applied to the output register |
Reimplemented from IOSubSystem.
| override void writeOutputRegister |
( |
uint | value, |
|
|
uint | mask ) |
|
inlinesealed |
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 ).
- Parameters
-
| [in] | value | The value to be applied to the output register |
| [in] | mask | The 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. |