Fesapi 2.9.0.1
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
prodml2_2::TimeSeriesData Class Reference

#include <TimeSeriesData.h>

Inheritance diagram for prodml2_2::TimeSeriesData:

Public Member Functions

 TimeSeriesData (gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
 
 TimeSeriesData (common ::DataObjectRepository *repo, const std::string &guid, const std::string &title)
 Creates an instance of this class in a gsoap context.
 
 TimeSeriesData (gsoap_eml2_3::prodml22__TimeSeriesData *fromGsoap)
 
 ~TimeSeriesData ()=default
 
void pushBackKeywordValue (gsoap_eml2_3::prodml22__TimeSeriesKeyword keyword, const std::string &value)
 
void setUom (gsoap_resqml2_0_1::resqml20__ResqmlUom uom)
 
void setMeasureClass (gsoap_eml2_3::eml23__MeasureClass measureClass)
 
void pushBackDoubleValue (double value, time_t timestamp=-1)
 
void pushBackDoubleValue (double value, time_t timestamp, gsoap_eml2_3::prodml22__ValueStatus status)
 
void pushBackStringValue (const std::string &value, time_t timestamp=-1)
 
std::string getUomAsString () const
 
std::string getMeasureClassAsString () const
 
unsigned int getValueCount () const
 
bool isDoubleValue (unsigned int index) const
 
bool isStringValue (unsigned int index) const
 
double getDoubleValue (unsigned int index) const
 
std::string getStringValue (unsigned int index) const
 
time_t getValueTimestamp (unsigned int index) const
 
bool hasValueStatus (unsigned int index) const
 
gsoap_eml2_3::prodml22__ValueStatus getValueStatus (unsigned int index) const
 
unsigned int getKeywordCount () const
 
gsoap_eml2_3::prodml22__TimeSeriesKeyword getKeyword (unsigned int index) const
 
std::string getKeywordValue (unsigned int index) const
 
virtual std::string getXmlTag () const
 
std::string getXmlNamespace () const final
 
void loadTargetRelationships ()
 

Static Public Attributes

static constexpr char const * XML_TAG = "TimeSeriesData"
 
static constexpr char const * XML_NS = "prodml22"
 

Detailed Description

The time series data object is intended for use in transferring time series of data, e.g. from a historian. The Time Series data object describes a context free, time based series of measurement data for the purpose of targeted exchanges between consumers and providers of data services. This is intended for use in support of smart fields or high-frequency historian type interactions, not reporting. It provides a “flat” view of the data and uses a set of keyword-value pairs to define the business identity of the series, as described in the following generalized hierarchy.

Constructor & Destructor Documentation

◆ TimeSeriesData() [1/3]

prodml2_2::TimeSeriesData::TimeSeriesData ( gsoap_resqml2_0_1::eml20__DataObjectReference * partialObject)
inline

Only to be used in partial transfer context

Parameters
[in,out]partialObjectIf non-null, the partial object.

◆ TimeSeriesData() [2/3]

prodml2_2::TimeSeriesData::TimeSeriesData ( common ::DataObjectRepository * repo,
const std::string & guid,
const std::string & title )

Creates an instance of this class in a gsoap context.

Exceptions
std::invalid_argumentIf repo == nullptr.
Parameters
[in,out]repoThe dataobject repo where the underlying gsoap proxy is going to be created.
guidThe guid to set to this instance. If empty then a new guid will be generated.
titleThe title.

◆ TimeSeriesData() [3/3]

prodml2_2::TimeSeriesData::TimeSeriesData ( gsoap_eml2_3::prodml22__TimeSeriesData * fromGsoap)
inline

Creates an instance of this class by wrapping a gsoap instance.

Parameters
[in,out]fromGsoapIf non-null, from gsoap.

◆ ~TimeSeriesData()

prodml2_2::TimeSeriesData::~TimeSeriesData ( )
default

Destructor does nothing since the memory is managed by the gsoap context.

Member Function Documentation

◆ getDoubleValue()

double prodml2_2::TimeSeriesData::getDoubleValue ( unsigned int index) const

Get a double value at a particular index.

Parameters
indexThe index of the value in this timeseries
Returns
the double value at a particular index

◆ getKeyword()

gsoap_eml2_3::prodml22__TimeSeriesKeyword prodml2_2::TimeSeriesData::getKeyword ( unsigned int index) const

Get a keyword at a particular index.

Parameters
indexThe index of the keyword in this timeseries
Returns
the keyword at a particular index

◆ getKeywordCount()

unsigned int prodml2_2::TimeSeriesData::getKeywordCount ( ) const

Get the count of keywords in this time series

◆ getKeywordValue()

std::string prodml2_2::TimeSeriesData::getKeywordValue ( unsigned int index) const

Get the value of a keyword at a particular index.

Parameters
indexThe index of the value in this timeseries
Returns
the value of a keyword at a particular index.

◆ getMeasureClassAsString()

std::string prodml2_2::TimeSeriesData::getMeasureClassAsString ( ) const

Gets the measure class of the values of this time series as a string.

Returns
The measure class of the values of this time series as a string. Returns empty string if no measure class is stored.

◆ getStringValue()

std::string prodml2_2::TimeSeriesData::getStringValue ( unsigned int index) const

Get a string value at a particular index.

Parameters
indexThe index of the value in this timeseries
Returns
the string value at a particular index

◆ getUomAsString()

std::string prodml2_2::TimeSeriesData::getUomAsString ( ) const

Gets the unit of measure of the values of this time series as a string.

Returns
The unit of measure of the values of this time series as a string. Returns empty string if no uom is stored.

◆ getValueCount()

unsigned int prodml2_2::TimeSeriesData::getValueCount ( ) const

Get the count of value in this time series

◆ getValueStatus()

gsoap_eml2_3::prodml22__ValueStatus prodml2_2::TimeSeriesData::getValueStatus ( unsigned int index) const

Get the status associated to a value at a particular index.

Parameters
indexThe index of the value in this timeseries
Returns
the status associated to a value at a particular index.

◆ getValueTimestamp()

time_t prodml2_2::TimeSeriesData::getValueTimestamp ( unsigned int index) const

Get the timestamp associated to a value at a particular index.

Parameters
indexThe index of the value in this timeseries
Returns
the timestamp associated to a value at a particular index. -1 if no timesteamp is provided for this value.

◆ getXmlNamespace()

std::string prodml2_2::TimeSeriesData::getXmlNamespace ( ) const
inlinefinal

Get the standard XML namespace for serializing this data object.

◆ getXmlTag()

virtual std::string prodml2_2::TimeSeriesData::getXmlTag ( ) const
inlinevirtual

Get the standard XML tag without XML namespace for serializing this data object.

Returns
The XML tag.

◆ hasValueStatus()

bool prodml2_2::TimeSeriesData::hasValueStatus ( unsigned int index) const

Check if a value at a particular index has a status.

Parameters
indexThe index of the value in this timeseries
Returns
true if the value at this index has a status

◆ isDoubleValue()

bool prodml2_2::TimeSeriesData::isDoubleValue ( unsigned int index) const

Check if a value at a particular index is a double one.

Parameters
indexThe index of the value in this timeseries
Returns
true if the value at this index is a double one

◆ isStringValue()

bool prodml2_2::TimeSeriesData::isStringValue ( unsigned int index) const

Check if a value at a particular index is a string one.

Parameters
indexThe index of the value in this timeseries
Returns
true if the value at this index is a string one

◆ loadTargetRelationships()

void prodml2_2::TimeSeriesData::loadTargetRelationships ( )
inline

Loads target relationships

◆ pushBackDoubleValue() [1/2]

void prodml2_2::TimeSeriesData::pushBackDoubleValue ( double value,
time_t timestamp,
gsoap_eml2_3::prodml22__ValueStatus status )

Push back a new value (i.e data) in the time series

Parameters
valueThe value to push back.
valueThe time of the value to push back.
valueThe status of the value to push back.

◆ pushBackDoubleValue() [2/2]

void prodml2_2::TimeSeriesData::pushBackDoubleValue ( double value,
time_t timestamp = -1 )

Push back a new value (i.e data) in the time series

Parameters
valueThe value to push back.
value(Optional) The time of the value to push back.

◆ pushBackKeywordValue()

void prodml2_2::TimeSeriesData::pushBackKeywordValue ( gsoap_eml2_3::prodml22__TimeSeriesKeyword keyword,
const std::string & value )

The keyword value pairs are used to characterize the underlying nature of the values. The key value may provide part of the unique identity of an instance of a concept or it may characterize the underlying concept.

Parameters
keywordOne of this enumerated value
  • asset identifier : A formatted URI identifier of the asset (facility) related to the value. This captures the kind of asset as well as the unique identifier of the asset within a specified context (the authority). The identifier may define a hierarchy of assets.
  • qualifier : A qualifier of the meaning of the value. This is used to distinguish between variations of an underlying meaning based on the method of creating the value (e.g., measured versus simulated). The values associated with this keyword must be from the list defined by type FlowQualifier.
  • subqualifier : A specialization of a qualifier. The values associated with this keyword must be from the list defined by type FlowSubQualifier.
  • product : The type of product that is represented by the value. This is generally used with things like volume or flow rate. It is generally meaningless for things like temperature or pressure. The values associated with this keyword must be from the list defined by type ReportingProduct.
  • flow : Defines the part of the flow network where the asset is located. This is most useful in situations (e.g., reporting) where detailed knowledge of the network configuration is not needed. Basically, this classifies different segments of the flow network based on its purpose within the context of the whole network. The values associated with this keyword must be from the list defined by type ReportingFlow.
valueThe string value associated to the keyword

◆ pushBackStringValue()

void prodml2_2::TimeSeriesData::pushBackStringValue ( const std::string & value,
time_t timestamp = -1 )

Push back a new value (i.e data) in the time series

Parameters
valueThe value to push back.
value(Optional) The time of the value to push back.

◆ setMeasureClass()

void prodml2_2::TimeSeriesData::setMeasureClass ( gsoap_eml2_3::eml23__MeasureClass measureClass)

Set the measure class of the data of the time series.

Parameters
measureClassThe measure class to set.

◆ setUom()

void prodml2_2::TimeSeriesData::setUom ( gsoap_resqml2_0_1::resqml20__ResqmlUom uom)

Set the uom of the data of the time series.

Parameters
uomThe unit of measure taken from the standard Energistics units of measure catalog. Please check COMMON_NS::EnumStringMapper::getEnergisticsUnitOfMeasure in order to minimize the use of non standard unit of measure.

Member Data Documentation

◆ XML_NS

constexpr char const* prodml2_2::TimeSeriesData::XML_NS = "prodml22"
staticconstexpr

The standard XML namespace for serializing this data object.

◆ XML_TAG

constexpr char const* prodml2_2::TimeSeriesData::XML_TAG = "TimeSeriesData"
staticconstexpr

The standard XML tag without XML namespace for serializing this data object.

Returns
The XML tag.

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