openDAQ
Open data acquisition platform
GenericSignalPtr< InterfaceType > Class Template Reference

A signal with an unique ID that sends event/data packets through connections to input ports the signal is connected to. More...

+ Inheritance diagram for GenericSignalPtr< InterfaceType >:
+ Collaboration diagram for GenericSignalPtr< InterfaceType >:

Detailed Description

template<typename InterfaceType>
class GenericSignalPtr< InterfaceType >

A signal with an unique ID that sends event/data packets through connections to input ports the signal is connected to.

A signal features an unique ID within a given device. It sends data along its signal path to all connected input ports, if its set to be active via its active property.

A signal is visible, and its data is streamed to all clients connected to a device only if its public property is set to True.

Each signal has a domain descriptor, which is set by the owner of the signal - most often a function block or device. The descriptor defines all properties of the signal, such as its name, description and data structure.

Signals can have a reference to another signal, which is used for determining the domain data. The domain signal outputs data at the same rate as the signal itself, providing domain (most often time - timestamps) information for each sample sent along the signal path. Each value packet sent by a signal thus contains a reference to another data packet containing domain data (if the signal is associated with another domain signal).

Additionally, a list of related signals can be defined, containing any signals relevant to interpreting the signal data.

To get the list of connections to input ports of the signal, getConnections can be used.

Public Member Functions

daq::Bool getPublic () const
 Returns true if the signal is public; false otherwise. More...
 
void setPublic (daq::Bool isPublic) const
 Sets the signal to be either public or private. More...
 
daq::DataDescriptorPtr getDescriptor () const
 Gets the signal's data descriptor. More...
 
daq::SignalPtr getDomainSignal () const
 Gets the signal that carries its domain data. More...
 
daq::ListPtr< daq::ISignal > getRelatedSignals () const
 Gets a list of related signals. More...
 
daq::ListPtr< daq::IConnection > getConnections () const
 Gets the list of connections to input ports formed by the signal. More...
 
daq::Bool getStreamed () const
 Returns true if the signal is streamed; false otherwise. More...
 
void setStreamed (daq::Bool streamed) const
 Sets the signal to be either streamed or not. More...
 
daq::BaseObjectPtr getLastValue () const
 Gets the signal last value. More...
 
- Public Member Functions inherited from GenericComponentPtr< InterfaceType >
daq::StringPtr getLocalId () const
 Gets the local ID of the component. More...
 
daq::StringPtr getGlobalId () const
 Gets the global ID of the component. More...
 
daq::Bool getActive () const
 Returns true if the component is active; false otherwise. More...
 
void setActive (daq::Bool active) const
 Sets the component to be either active or inactive. Also recursively sets the active field of all child components if component is a folder. More...
 
daq::ContextPtr getContext () const
 Gets the context object. More...
 
daq::ComponentPtr getParent () const
 Gets the parent of the component. More...
 
daq::StringPtr getName () const
 Gets the name of the component. More...
 
void setName (const daq::StringPtr &name) const
 Sets the name of the component. More...
 
daq::StringPtr getDescription () const
 Gets the description of the component. More...
 
void setDescription (const daq::StringPtr &description) const
 Sets the description of the component. More...
 
daq::TagsPtr getTags () const
 Gets the tags of the component. More...
 
daq::Bool getVisible () const
 Gets visible metadata state of the component. More...
 
void setVisible (daq::Bool visible) const
 Sets visible attribute state of the component. More...
 
daq::ListPtr< daq::IString > getLockedAttributes () const
 Gets a list of the component's locked attributes. The locked attributes cannot be modified via their respective setters. More...
 
daq::Event< daq::ComponentPtr, daq::CoreEventArgsPtr > getOnComponentCoreEvent () const
 Gets the Core Event object that triggers whenever a change to this component happens within the openDAQ core structure. More...
 
daq::ComponentStatusContainerPtr getStatusContainer () const
 Gets the container of Component statuses. More...
 
daq::ComponentPtr findComponent (const daq::StringPtr &id) const
 Finds the component (signal/device/function block) with the specified (global) id. More...
 
daq::OperationModeType getOperationMode () const
 Gets the operation mode of the device. More...
 
- Public Member Functions inherited from GenericPropertyObjectPtr< InterfaceType >
daq::StringPtr getClassName () const
 Gets the name of the class the Property object was constructed with. More...
 
void setPropertyValue (const daq::StringPtr &propertyName, const daq::BaseObjectPtr &value) const
 Sets the value of the Property with the given name. More...
 
daq::BaseObjectPtr getPropertyValue (const daq::StringPtr &propertyName) const
 Gets the value of the Property with the given name. More...
 
daq::BaseObjectPtr getPropertySelectionValue (const daq::StringPtr &propertyName) const
 Gets the selected value of the Property, if the Property is a Selection property. More...
 
void clearPropertyValue (const daq::StringPtr &propertyName) const
 Clears the Property value from the Property object. More...
 
daq::Bool hasProperty (const daq::StringPtr &propertyName) const
 Checks if the Property object contains a property named propertyName. More...
 
daq::PropertyPtr getProperty (const daq::StringPtr &propertyName) const
 Gets the Property with the given propertyName. More...
 
void addProperty (const daq::PropertyPtr &property) const
 Adds the property to the Property object. More...
 
void removeProperty (const daq::StringPtr &propertyName) const
 Removes the Property named propertyName from the Property object. More...
 
daq::Event< daq::PropertyObjectPtr, daq::PropertyValueEventArgsPtr > getOnPropertyValueWrite (const daq::StringPtr &propertyName) const
 Gets the Event that is triggered whenever a Property value is written to the Property named propertyName. More...
 
daq::Event< daq::PropertyObjectPtr, daq::PropertyValueEventArgsPtr > getOnPropertyValueRead (const daq::StringPtr &propertyName) const
 Gets the Event that is triggered whenever a Property value of a Property named propertyName is read. More...
 
daq::Event< daq::PropertyObjectPtr, daq::PropertyValueEventArgsPtr > getOnAnyPropertyValueWrite () const
 Gets the Event that is triggered whenever any Property value is written. The event is triggered after the specific Property event. More...
 
daq::Event< daq::PropertyObjectPtr, daq::PropertyValueEventArgsPtr > getOnAnyPropertyValueRead () const
 Gets the Event that is triggered whenever any Property value is read.The event is triggered after the specific Property event. More...
 
daq::ListPtr< daq::IProperty > getVisibleProperties () const
 Returns a list of visible properties contained in the Property object. More...
 
daq::ListPtr< daq::IProperty > getAllProperties () const
 Returns a list of all properties contained in the Property object. More...
 
void setPropertyOrder (const daq::ListPtr< daq::IString > &orderedPropertyNames) const
 Sets a custom order of properties as defined in the list of property names. More...
 
void beginUpdate () const
 Begins batch configuration of the object. More...
 
void endUpdate () const
 Ends batch configuration of the object. More...
 
daq::Bool getUpdating () const
 Returns the state of batch configuration. More...
 
daq::Event< daq::PropertyObjectPtr, daq::EndUpdateEventArgsPtr > getOnEndUpdate () const
 Gets the Event that is triggered whenever the batch configuration is applied. More...
 
daq::PermissionManagerPtr getPermissionManager () const
 Gets the permission manager of property object. More...
 

Member Function Documentation

◆ getConnections()

daq::ListPtr<daq::IConnection> getConnections ( ) const
inline

Gets the list of connections to input ports formed by the signal.

Returns
The list of connections.

◆ getDescriptor()

daq::DataDescriptorPtr getDescriptor ( ) const
inline

Gets the signal's data descriptor.

Returns
The signal's data descriptor.

The descriptor contains metadata about the signal, providing information about its name, description,... and defines how the data in it's packet's buffers should be interpreted.

◆ getDomainSignal()

daq::SignalPtr getDomainSignal ( ) const
inline

Gets the signal that carries its domain data.

Returns
The domain signal.

The domain signal contains domain (most often time) data that is used to interpret a signal's data in a given domain. It has the same sampling rate as the signal.

◆ getLastValue()

daq::BaseObjectPtr getLastValue ( ) const
inline

Gets the signal last value.

Returns
The IBaseObject value can be a nullptr if there is no value, or if the data type is not supported by the function.

If a value is assigned, it can be cast based on the signal description to IFloat if the type is Float32 or Float64, to IInteger if the type is Int8 through Int64 or UInt8 through UInt64, to IComplexNumber if the type is ComplexFloat32 or ComplexFloat64, to IRange if the type is RangeInt64, to IStruct if the type is Struct, and to IList of the forementioned types if there is exactly one dimension.

◆ getPublic()

daq::Bool getPublic ( ) const
inline

Returns true if the signal is public; false otherwise.

Returns
True if the signal is public; false otherwise.

Public signals are visible to clients connected to the device, and are streamed.

◆ getRelatedSignals()

daq::ListPtr<daq::ISignal> getRelatedSignals ( ) const
inline

Gets a list of related signals.

Returns
The list of related signals.

Signals within the related signals list are facilitate the interpretation of a given signal's data, or are otherwise relevant when working with the signal.

◆ getStreamed()

daq::Bool getStreamed ( ) const
inline

Returns true if the signal is streamed; false otherwise.

Returns
True if the signal is streamed; false otherwise.

A streamed signal receives packets from a streaming server and forwards packets on the signal path. Method always sets streamed parameter to False if the signal is local to the current Instance.

◆ setPublic()

void setPublic ( daq::Bool  isPublic) const
inline

Sets the signal to be either public or private.

Parameters
isPublicIf false, the signal is set to private; if true, the signal is set to be public.

Public signals are visible to clients connected to the device, and are streamed.

◆ setStreamed()

void setStreamed ( daq::Bool  streamed) const
inline

Sets the signal to be either streamed or not.

Parameters
streamedThe new streamed state of the signal.

A streamed signal receives packets from a streaming server and forwards packets on the signal path. Setting the "Streamed" flag has no effect if the signal is local to the current Instance. Method returns OPENDAQ_IGNORED if that is the case.