Signals accepted by input ports can be connected, forming a connection between the input port and signal, through which Packets can be sent. More...
Signals accepted by input ports can be connected, forming a connection between the input port and signal, through which Packets can be sent.
Any openDAQ object which wishes to receive signal data must create an input port and connect it to said signals. Such objects are for example function blocks, and readers.
An input port can filter out incompatible signals by returning false when such a signal is passed as argument to acceptsSignal
, and also rejects the signals when they are passed as argument to connect
.
Depending on the configuration, an input port might not require a signal to be connected, returning false when requiresSignal
is called. Such input ports are usually a part of function blocks that do not require a given signal to perform calculations.
Public Member Functions | |
daq::Bool | acceptsSignal (const daq::SignalPtr &signal) const |
Returns true if the signal can be connected to the input port; false otherwise. More... | |
void | connect (const daq::SignalPtr &signal) const |
Connects the signal to the input port, forming a Connection. More... | |
void | disconnect () const |
Disconnects the signal from the input port. | |
daq::SignalPtr | getSignal () const |
Gets the signal connected to the input port. More... | |
daq::Bool | getRequiresSignal () const |
Returns true if the input port requires a signal to be connected; false otherwise. More... | |
daq::ConnectionPtr | getConnection () const |
Gets the Connection object formed between the Signal and Input port. More... | |
|
inline |
Returns true if the signal can be connected to the input port; false otherwise.
signal | The signal being evaluated for compatibility. |
NotAssignedException | if the accepted signal criteria is not defined by the input port. |
|
inline |
Connects the signal to the input port, forming a Connection.
signal | The signal to be connected to the input port. |
OpendaqErrException | if the signal is not accepted. |
NotAssignedException | if the accepted signal criteria is not defined by the input port. |
The signal is notified of the connection formed between it and the input port.
|
inline |
Gets the Connection object formed between the Signal and Input port.
|
inline |
Returns true if the input port requires a signal to be connected; false otherwise.
|
inline |
Gets the signal connected to the input port.