This class controls the Multiplexer unit which connects signal sources and sinks with each other.
See class VIB::Multiplexer in the VisionBox Interface Library for a detailed description.
Public Types | |
enum | eMUX_SOURCE |
Source signal definitions for the Multiplexer More... | |
Public Member Functions | |
void | AbortWaitingForEvent () |
Aborts all threads waiting for an event and disables all events. More... | |
void | ConfigureEvent (UInt32 SensitivityMaskRising, UInt32 SensitivityMaskFalling) |
Configures the sensitivity for Multiplexer events More... | |
void | ConnectOutput (UInt32 OutputIndex, VIB_NET::Multiplexer::eMUX_SOURCE Source) |
Selects the source signal for the specified output line. More... | |
void | GetEventTime (UInt32 % time_us, Boolean % eventsDropped) |
Reads the event time for the last event. More... | |
Multiplexer () | |
Default constructor for the device object More... | |
void | Reset () |
Resets the device to default settings. More... | |
void | WaitForEvent (UInt32 msTimeout, UInt32 % SignalState, UInt32 % SignalChanged) |
Waits for a Multiplexer event. More... | |
Public Member Functions inherited from VIB_NET::iDevice | |
void | Close () |
Closes a device More... | |
bool | isOpen () |
Returns the open state of a device object More... | |
void | Open () |
Opens a device More... | |
void | Open (unsigned int Index) |
Opens a device More... | |
Properties | |
UInt32 | NumberOfOutputs [get] |
Returns number of internal trigger lines. More... | |
virtual VIB_NET::eDEVICE_TYPE | Type [get] |
Returns the device type for the current instance, see eDEVICE_TYPE More... | |
Properties inherited from VIB_NET::iDevice | |
virtual VIB_NET::eDEVICE_TYPE | Type [get] |
Returns the device type for the current instance, see eDEVICE_TYPE More... | |
|
strong |
Source signal definitions for the Multiplexer
VIB_NET::Multiplexer::Multiplexer | ( | ) |
Default constructor for the device object
The device must be opened with Open() before it can be used.
void VIB_NET::Multiplexer::AbortWaitingForEvent | ( | ) |
Aborts all threads waiting for an event and disables all events.
The function removes any threads from the wait queue. Furthermore the event configuration is reset to all off.
It will not return before any thread leaves the internal critical area. By using this function you can release/close the device safely after the call. The aborted threads are not allowed to call WaitForEvent() again, until events are configured by calling ConfigureEvent().
void VIB_NET::Multiplexer::ConfigureEvent | ( | UInt32 | SensitivityMaskRising, |
UInt32 | SensitivityMaskFalling | ||
) |
Configures the sensitivity for Multiplexer events
The parameters SensitivityMaskRising and SensitivityMaskFalling specify which of the first 16 Multiplexer output lines will be used to generate events. The signal edge can be specified for each line individually.
SensitivityMaskRising | Binary representation of Multiplexer signals that triggers an event on the rising edge |
SensitivityMaskFalling | Binary representation of Multiplexer signals that triggers an event on the falling edge |
void VIB_NET::Multiplexer::ConnectOutput | ( | UInt32 | OutputIndex, |
VIB_NET::Multiplexer::eMUX_SOURCE | Source | ||
) |
Selects the source signal for the specified output line.
OutputIndex | Output number, 0 ... (NumberOfOutputs - 1) |
Source | Source for the output |
void VIB_NET::Multiplexer::GetEventTime | ( | UInt32 % | time_us, |
Boolean % | eventsDropped | ||
) |
Reads the event time for the last event.
This function can be called after a event is returned by WaitForEvent(). It returns the number of microseconds between occurance of the previous and the current event. It also returns a flag indicating an overflow of the event FIFO.
Restrictions
time_us | Event time in microseconds, 0...0xffffff |
eventsDropped | Indicates that events were dropped before this event |
void VIB_NET::Multiplexer::Reset | ( | ) |
Resets the device to default settings.
See also VIB::Multiplexer::Reset().
void VIB_NET::Multiplexer::WaitForEvent | ( | UInt32 | msTimeout, |
UInt32 % | SignalState, | ||
UInt32 % | SignalChanged | ||
) |
Waits for a Multiplexer event.
The function waits for multiplexer line events selected with ConfigureEvent().
After a timeout or a call of AbortWaitingForEvent(), the user must configure the events again.
Multiple threads can call this function simultaneously. The first caller returns first with the next event.
msTimeout | Timeout in milliseconds, 0xffffffff for infinite timeout The actual timeout may be twice as high if there are already other threads waiting for an event. |
SignalState | After sccess, the function returns the current state of the first 16 Multiplexer lines (binary representation). |
SignalChanged | After sccess, the function returns the Multiplexer lines which triggered the event (binary representation). |
|
get |
Returns number of internal trigger lines.
The count of outputs, depends in combination of hardware type, software library and FPGA version.
|
get |
Returns the device type for the current instance, see eDEVICE_TYPE