openDAQ
Open data acquisition platform
DataDescriptorBuilderPtr Class Reference

Builder component of Data descriptor objects. Contains setter methods that allow for Data descriptor parameter configuration, and a build method that builds the Data descriptor. More...

Inherits ObjectPtr< IDataDescriptorBuilder >.

Detailed Description

Builder component of Data descriptor objects. Contains setter methods that allow for Data descriptor parameter configuration, and a build method that builds the Data descriptor.

Public Member Functions

daq::DataDescriptorPtr build () const
 Builds and returns a Data descriptor object using the currently set values of the Builder. More...
 
DataDescriptorBuilderPtr setName (const daq::StringPtr &name) const
 Sets a descriptive name for the signal's value. More...
 
daq::StringPtr getName () const
 Gets a descriptive name for the signal's value. More...
 
DataDescriptorBuilderPtr setDimensions (const daq::ListPtr< daq::IDimension > &dimensions) const
 Sets the list of the descriptor's dimension's. More...
 
daq::ListPtr< daq::IDimension > getDimensions () const
 Gets the list of the descriptor's dimension's. More...
 
DataDescriptorBuilderPtr setSampleType (daq::SampleType sampleType) const
 Sets the descriptor's sample type. More...
 
daq::SampleType getSampleType () const
 Gets the descriptor's sample type. More...
 
DataDescriptorBuilderPtr setUnit (const daq::UnitPtr &unit) const
 Sets the unit of the data in a signal's packets. More...
 
daq::UnitPtr getUnit () const
 Gets the unit of the data in a signal's packets. More...
 
DataDescriptorBuilderPtr setValueRange (const daq::RangePtr &range) const
 Sets the value range of the data in a signal's packets defining the lowest and highest expected values. More...
 
daq::RangePtr getValueRange () const
 Gets the value range of the data in a signal's packets defining the lowest and highest expected values. More...
 
DataDescriptorBuilderPtr setRule (const daq::DataRulePtr &rule) const
 Sets the value Data rule. More...
 
daq::DataRulePtr getRule () const
 Gets the value Data rule. More...
 
DataDescriptorBuilderPtr setOrigin (const daq::StringPtr &origin) const
 Sets the absolute origin of a signal value component. More...
 
daq::StringPtr getOrigin () const
 Gets the absolute origin of a signal value component. More...
 
DataDescriptorBuilderPtr setTickResolution (const daq::RatioPtr &tickResolution) const
 Sets the Resolution which scales the an explicit or implicit value to the physical unit defined in unit. More...
 
daq::RatioPtr getTickResolution () const
 Gets the Resolution which scales the an explicit or implicit value to the physical unit defined in unit. More...
 
DataDescriptorBuilderPtr setPostScaling (const daq::ScalingPtr &scaling) const
 Sets the scaling rule that needs to be applied to explicit/implicit data by readers. More...
 
daq::ScalingPtr getPostScaling () const
 Gets the scaling rule that needs to be applied to explicit/implicit data by readers. More...
 
DataDescriptorBuilderPtr setStructFields (const daq::ListPtr< daq::IDataDescriptor > &structFields) const
 Sets the fields of the struct, forming a recursive value descriptor definition. More...
 
daq::ListPtr< daq::IDataDescriptor > getStructFields () const
 Gets the fields of the struct, forming a recursive value descriptor definition. More...
 
DataDescriptorBuilderPtr setMetadata (const daq::DictPtr< daq::IString, daq::IString > &metadata) const
 Sets any extra metadata defined by the data descriptor. More...
 
daq::DictPtr< daq::IString, daq::IString > getMetadata () const
 Gets any extra metadata defined by the data descriptor. More...
 
DataDescriptorBuilderPtr setReferenceDomainInfo (const daq::ReferenceDomainInfoPtr &referenceDomainInfo) const
 Sets the Reference Domain Info. More...
 
daq::ReferenceDomainInfoPtr getReferenceDomainInfo () const
 Gets the Reference Domain Info. More...
 

Member Function Documentation

◆ build()

daq::DataDescriptorPtr build ( ) const
inline

Builds and returns a Data descriptor object using the currently set values of the Builder.

Returns
The built Data descriptor.

◆ getDimensions()

daq::ListPtr<daq::IDimension> getDimensions ( ) const
inline

Gets the list of the descriptor's dimension's.

Returns
The list of dimensions.

◆ getMetadata()

daq::DictPtr<daq::IString, daq::IString> getMetadata ( ) const
inline

Gets any extra metadata defined by the data descriptor.

Returns
Additional metadata of the descriptor as a dictionary.

◆ getName()

daq::StringPtr getName ( ) const
inline

Gets a descriptive name for the signal's value.

Returns
The name of the signal value.

◆ getOrigin()

daq::StringPtr getOrigin ( ) const
inline

Gets the absolute origin of a signal value component.

Returns
The absolute origin.

◆ getPostScaling()

daq::ScalingPtr getPostScaling ( ) const
inline

Gets the scaling rule that needs to be applied to explicit/implicit data by readers.

Returns
The scaling rule.

◆ getReferenceDomainInfo()

daq::ReferenceDomainInfoPtr getReferenceDomainInfo ( ) const
inline

Gets the Reference Domain Info.

Returns
The Reference Domain Info.

If set, gives additional information about the reference domain.

◆ getRule()

daq::DataRulePtr getRule ( ) const
inline

Gets the value Data rule.

Returns
The value Data rule.

◆ getSampleType()

daq::SampleType getSampleType ( ) const
inline

Gets the descriptor's sample type.

Returns
The descriptor's sample type.

◆ getStructFields()

daq::ListPtr<daq::IDataDescriptor> getStructFields ( ) const
inline

Gets the fields of the struct, forming a recursive value descriptor definition.

Returns
The list of data descriptors forming the struct fields.

◆ getTickResolution()

daq::RatioPtr getTickResolution ( ) const
inline

Gets the Resolution which scales the an explicit or implicit value to the physical unit defined in unit.

Returns
The Resolution.

◆ getUnit()

daq::UnitPtr getUnit ( ) const
inline

Gets the unit of the data in a signal's packets.

Returns
The unit specified by the descriptor.

◆ getValueRange()

daq::RangePtr getValueRange ( ) const
inline

Gets the value range of the data in a signal's packets defining the lowest and highest expected values.

Returns
The value range the signal's data.

◆ setDimensions()

DataDescriptorBuilderPtr setDimensions ( const daq::ListPtr< daq::IDimension > &  dimensions) const
inline

Sets the list of the descriptor's dimension's.

Parameters
dimensionsThe list of dimensions.

The number of dimensions defines the rank of the signal's data (eg. Vector, Matrix).

◆ setMetadata()

DataDescriptorBuilderPtr setMetadata ( const daq::DictPtr< daq::IString, daq::IString > &  metadata) const
inline

Sets any extra metadata defined by the data descriptor.

Parameters
metadataAdditional metadata of the descriptor as a dictionary.

All objects in the metadata dictionary must be serializable.

◆ setName()

DataDescriptorBuilderPtr setName ( const daq::StringPtr &  name) const
inline

Sets a descriptive name for the signal's value.

Parameters
nameThe name of the signal value.

When, for example, describing the amplitude values of spectrum data, the name would be Amplitude.

◆ setOrigin()

DataDescriptorBuilderPtr setOrigin ( const daq::StringPtr &  origin) const
inline

Sets the absolute origin of a signal value component.

Parameters
originThe absolute origin.

An origin can be an arbitrary string that determines the starting point of the signal data. All explicit or implicit values are multiplied by the resolution and added to the origin to obtain absolute data instead of relative.

Most commonly a time epoch is used, in which case it should be formatted according to the ISO 8601 standard.

◆ setPostScaling()

DataDescriptorBuilderPtr setPostScaling ( const daq::ScalingPtr &  scaling) const
inline

Sets the scaling rule that needs to be applied to explicit/implicit data by readers.

Parameters
scalingThe scaling rule.

The OutputDataType of the rule matches the value descriptor's sample type. The InputDataType defines the sample type of either the explicit data in packet buffers, or the packet's implicit value's sample type.

◆ setReferenceDomainInfo()

DataDescriptorBuilderPtr setReferenceDomainInfo ( const daq::ReferenceDomainInfoPtr &  referenceDomainInfo) const
inline

Sets the Reference Domain Info.

Parameters
referenceDomainInfoThe Reference Domain Info.

If set, gives additional information about the reference domain.

◆ setRule()

DataDescriptorBuilderPtr setRule ( const daq::DataRulePtr &  rule) const
inline

Sets the value Data rule.

Parameters
ruleThe value Data rule.

If explicit, the values will be contained in the packet buffer. Otherwise they are calculated using the packet parameter as the input into the rule.

◆ setSampleType()

DataDescriptorBuilderPtr setSampleType ( daq::SampleType  sampleType) const
inline

Sets the descriptor's sample type.

Parameters
sampleTypeThe descriptor's sample type.

◆ setStructFields()

DataDescriptorBuilderPtr setStructFields ( const daq::ListPtr< daq::IDataDescriptor > &  structFields) const
inline

Sets the fields of the struct, forming a recursive value descriptor definition.

Parameters
structFieldsThe list of data descriptors forming the struct fields.

Contains a list of value descriptors, defining the data layout: the data described by the first DataDescriptor of the list is at the start, followed by the data described by the second and so on.

◆ setTickResolution()

DataDescriptorBuilderPtr setTickResolution ( const daq::RatioPtr &  tickResolution) const
inline

Sets the Resolution which scales the an explicit or implicit value to the physical unit defined in unit.

Parameters
tickResolutionThe Resolution.

◆ setUnit()

DataDescriptorBuilderPtr setUnit ( const daq::UnitPtr &  unit) const
inline

Sets the unit of the data in a signal's packets.

Parameters
unitThe unit specified by the descriptor.

◆ setValueRange()

DataDescriptorBuilderPtr setValueRange ( const daq::RangePtr &  range) const
inline

Sets the value range of the data in a signal's packets defining the lowest and highest expected values.

Parameters
rangeThe value range the signal's data.

The range is not enforced by openDAQ.