mvIMPACT Acquire SDK C++
IOSubSystem Class Referenceabstract

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

Inheritance diagram for IOSubSystem:
IOSubSystemBlueFOX IOSubSystemCommon IOSubSystemFrameGrabber

Public Member Functions

unsigned int getInputCount (void) const
 Returns the number of mvIMPACT::acquire::DigitalInput s available for the mvIMPACT::acquire::Device associated with this object. More...
 
unsigned int getOutputCount (void) const
 Returns the number of digital outputs available for the mvIMPACT::acquire::Device associated with this object. More...
 
PulseStartConfigurationgetPulseStartConfiguration (unsigned int nr) const
 Returns a pointer to a mvIMPACT::acquire::PulseStartConfiguration associated with this device. More...
 
unsigned int getPulseStartConfigurationCount (void) const
 Returns the number of mvIMPACT::acquire::PulseStartConfiguration objects available for the mvIMPACT::acquire::Device associated with this object. More...
 
RTCtrProgramgetRTCtrProgram (unsigned int nr) const
 Returns a pointer to a mvIMPACT::acquire::RTCtrProgram associated with this device. More...
 
const DigitalInputinput (unsigned int nr) const
 Returns a const pointer to a mvIMPACT::acquire::DigitalInput object. More...
 
 IOSubSystem (const IOSubSystem &src)
 Constructs a new mvIMPACT::acquire::IOSubSystem from an existing one. More...
 
IOSubSystemoperator= (const IOSubSystem &rhs)
 Allows assignments of mvIMPACT::acquire::IOSubSystem objects. More...
 
DigitalOutputoutput (unsigned int nr) const
 Returns a pointer to a mvIMPACT::acquire::DigitalOutput object. More...
 
virtual unsigned int readInputRegister (void) const =0
 Returns the current state of the digital input register. More...
 
virtual unsigned int readOutputRegister (void) const =0
 Returns the current state of the digital output register. More...
 
unsigned int RTCtrProgramCount (void) const
 Returns the number of mvIMPACT::acquire::RTCtrProgram s available for the mvIMPACT::acquire::Device associated with this object. More...
 
virtual void writeOutputRegister (unsigned int value, unsigned int mask=UINT_MAX)=0
 Alters the state of the digital output register. More...
 
virtual ~IOSubSystem ()
 

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 mvIMPACT::acquire::Device::interfaceLayout is set to mvIMPACT::acquire::dilDeviceSpecific before the device is opened.

Constructor & Destructor Documentation

◆ IOSubSystem()

IOSubSystem ( const IOSubSystem src)
inline

Constructs a new mvIMPACT::acquire::IOSubSystem from an existing one.

Parameters
[in]srcA constant reference to the mvIMPACT::acquire::IOSubSystem object, this object shall be created from

◆ ~IOSubSystem()

virtual ~IOSubSystem ( )
inlinevirtual

Member Function Documentation

◆ getInputCount()

unsigned int getInputCount ( void  ) const
inline

Returns the number of mvIMPACT::acquire::DigitalInput s available for the mvIMPACT::acquire::Device associated with this object.

◆ getOutputCount()

unsigned int getOutputCount ( void  ) const
inline

Returns the number of digital outputs available for the mvIMPACT::acquire::Device associated with this object.

◆ getPulseStartConfiguration()

PulseStartConfiguration* getPulseStartConfiguration ( unsigned int  nr) const
inline

Returns a pointer to a mvIMPACT::acquire::PulseStartConfiguration associated with this device.

If nr is invalid(too large) a STL out_of_range exception will be thrown.

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

◆ getPulseStartConfigurationCount()

unsigned int getPulseStartConfigurationCount ( void  ) const
inline

Returns the number of mvIMPACT::acquire::PulseStartConfiguration objects available for the mvIMPACT::acquire::Device associated with this object.

◆ getRTCtrProgram()

RTCtrProgram* getRTCtrProgram ( unsigned int  nr) const
inline

Returns a pointer to a mvIMPACT::acquire::RTCtrProgram associated with this device.

If nr is invalid(too large) a STL out_of_range exception will be thrown.

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

◆ input()

const DigitalInput* input ( unsigned int  nr) const
inline

Returns a const pointer to a mvIMPACT::acquire::DigitalInput object.

If nr references an invalid pin a STL out_of_range exception will be thrown.

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 mvIMPACT::acquire::IOSubSystem::readInputRegister.
Parameters
[in]nrThe number of the digital input.

◆ operator=()

IOSubSystem& operator= ( const IOSubSystem rhs)
inline

Allows assignments of mvIMPACT::acquire::IOSubSystem objects.

◆ output()

DigitalOutput* output ( unsigned int  nr) const
inline

Returns a pointer to a mvIMPACT::acquire::DigitalOutput object.

If nr references an invalid pin a STL out_of_range exception will be thrown.

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 mvIMPACT::acquire::IOSubSystem::writeOutputRegister with the corresponding bit mask.
Parameters
[in]nrThe number of the digital output.

◆ readInputRegister()

virtual unsigned int readInputRegister ( void  ) const
pure virtual

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.

Implemented in IOSubSystemCommon, and IOSubSystemBlueFOX.

◆ readOutputRegister()

virtual unsigned int readOutputRegister ( void  ) const
pure virtual

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.

Implemented in IOSubSystemCommon, and IOSubSystemBlueFOX.

◆ RTCtrProgramCount()

unsigned int RTCtrProgramCount ( void  ) const
inline

Returns the number of mvIMPACT::acquire::RTCtrProgram s available for the mvIMPACT::acquire::Device associated with this object.

◆ writeOutputRegister()

virtual void writeOutputRegister ( unsigned int  value,
unsigned int  mask = UINT_MAX 
)
pure virtual

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

Implemented in IOSubSystemCommon, and IOSubSystemBlueFOX.


The documentation for this class was generated from the following file: