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

#include <TimeSeriesData.h>

Inheritance diagram for prodml2_1::TimeSeriesData:
common::AbstractObject

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. More...
 
 TimeSeriesData (gsoap_eml2_2::prodml21__TimeSeriesData *fromGsoap)
 
 ~TimeSeriesData ()=default
 
void pushBackKeywordValue (gsoap_eml2_2::prodml21__TimeSeriesKeyword keyword, const std::string &value)
 
void setUom (gsoap_resqml2_0_1::resqml20__ResqmlUom uom)
 
void setMeasureClass (gsoap_eml2_2::eml22__MeasureClass measureClass)
 
void pushBackDoubleValue (double value, time_t timestamp=-1)
 
void pushBackDoubleValue (double value, time_t timestamp, gsoap_eml2_2::prodml21__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_2::prodml21__ValueStatus getValueStatus (unsigned int index) const
 
unsigned int getKeywordCount () const
 
gsoap_eml2_2::prodml21__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 ()
 
- Public Member Functions inherited from common::AbstractObject
bool isPartial () const
 
virtual bool isTopLevelElement () const
 
std::string getUuid () const
 
std::string getTitle () const
 
std::string getEditor () const
 
time_t getCreation () const
 
tm getCreationAsTimeStructure () const
 
std::string getOriginator () const
 
std::string getDescription () const
 
time_t getLastUpdate () const
 
tm getLastUpdateAsTimeStructure () const
 
std::string getFormat () const
 
std::string getDescriptiveKeywords () const
 
std::string getVersion () const
 
void setTitle (const std::string &title)
 
void setEditor (const std::string &editor)
 
void setCreation (time_t creation)
 
void setCreation (const tm &creation)
 
void setOriginator (const std::string &originator)
 
void setDescription (const std::string &description)
 
void setLastUpdate (time_t lastUpdate)
 
void setLastUpdate (const tm &lastUpdate)
 
void setDescriptiveKeywords (const std::string &descriptiveKeywords)
 
void setVersion (const std::string &version)
 
void setMetadata (const std::string &title, const std::string &editor, time_t creation, const std::string &originator, const std::string &description, time_t lastUpdate, const std::string &descriptiveKeywords)
 
void serializeIntoStream (std::ostream *stream)
 
void setGsoapProxy (gsoap_resqml2_0_1::eml20__AbstractCitedDataObject *gsoapProxy)
 
void setGsoapProxy (gsoap_eml2_1::eml21__AbstractObject *gsoapProxy)
 
gsoap_resqml2_0_1::eml20__AbstractCitedDataObject * getEml20GsoapProxy () const
 
gsoap_eml2_1::eml21__AbstractObject * getEml21GsoapProxy () const
 
gsoap_eml2_2::eml22__AbstractObject * getEml22GsoapProxy () const
 
void setGsoapProxy (gsoap_eml2_2::eml22__AbstractObject *gsoapProxy)
 
gsoap_eml2_3::eml23__AbstractObject * getEml23GsoapProxy () const
 
void setGsoapProxy (gsoap_eml2_3::eml23__AbstractObject *gsoapProxy)
 
soap * getGsoapContext () const
 
int getGsoapType () const
 
gsoap_resqml2_0_1::eml20__DataObjectReference * newResqmlReference () const
 
gsoap_eml2_1::eml21__DataObjectReference * newEmlReference () const
 
gsoap_eml2_2::eml22__DataObjectReference * newEml22Reference () const
 
gsoap_eml2_3::eml23__DataObjectReference * newEml23Reference () const
 
gsoap_resqml2_0_1::resqml20__ContactElementReference * newContactElementReference2_0_1 () const
 
gsoap_eml2_3::resqml22__ContactElement * newContactElementReference2_2 () const
 
common::DataObjectRepositorygetRepository () const
 
virtual std::string getXmlNamespaceVersion () const
 
virtual std::string getContentType () const
 
virtual std::string getQualifiedType () const
 
virtual std::string getPartNameInEpcDocument () const
 
std::string serializeIntoString ()
 
void addAlias (const std::string &authority, const std::string &title)
 
unsigned int getAliasCount () const
 
std::string getAliasAuthorityAtIndex (unsigned int index) const
 
std::string getAliasTitleAtIndex (unsigned int index) const
 
std::vector< eml2::Activity * > getActivitySet () const
 
unsigned int getActivityCount () const
 
eml2::ActivitygetActivity (unsigned int index) const
 
void pushBackExtraMetadata (const std::string &key, const std::string &value)
 
std::unordered_map< std::string, std::string > getExtraMetadataSet () const
 
std::vector< std::string > getExtraMetadata (const std::string &key) const
 
unsigned int getExtraMetadataCount () const
 
std::string getExtraMetadataKeyAtIndex (unsigned int index) const
 
std::string getExtraMetadataStringValueAtIndex (unsigned int index) const
 

Static Public Attributes

static const char * XML_TAG
 
static const char * XML_NS
 

Additional Inherited Members

- Public Types inherited from common::AbstractObject
enum  hdfDatatypeEnum {
  UNKNOWN = 0 , DOUBLE = 1 , FLOAT = 2 , LONG_64 = 3 ,
  ULONG_64 = 4 , INT = 5 , UINT = 6 , SHORT = 7 ,
  USHORT = 8 , CHAR = 9 , UCHAR = 10
}
 
- Static Public Member Functions inherited from common::AbstractObject
static void setFormat (const std::string &vendor, const std::string &applicationName, const std::string &applicationVersionNumber)
 

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_1::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_1::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_1::TimeSeriesData::TimeSeriesData ( gsoap_eml2_2::prodml21__TimeSeriesData *  fromGsoap)
inline

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

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

◆ ~TimeSeriesData()

prodml2_1::TimeSeriesData::~TimeSeriesData ( )
default

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

Member Function Documentation

◆ getDoubleValue()

double prodml2_1::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_2::prodml21__TimeSeriesKeyword prodml2_1::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_1::TimeSeriesData::getKeywordCount ( ) const

Get the count of keywords in this time series

◆ getKeywordValue()

std::string prodml2_1::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_1::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_1::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_1::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_1::TimeSeriesData::getValueCount ( ) const

Get the count of value in this time series

◆ getValueStatus()

gsoap_eml2_2::prodml21__ValueStatus prodml2_1::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_1::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_1::TimeSeriesData::getXmlNamespace ( ) const
inlinefinalvirtual

Get the standard XML namespace for serializing this data object.

Implements common::AbstractObject.

◆ getXmlTag()

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

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

Returns
The XML tag.

Implements common::AbstractObject.

◆ hasValueStatus()

bool prodml2_1::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_1::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_1::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_1::TimeSeriesData::loadTargetRelationships ( )
inlinevirtual

Loads target relationships

Implements common::AbstractObject.

◆ pushBackDoubleValue() [1/2]

void prodml2_1::TimeSeriesData::pushBackDoubleValue ( double  value,
time_t  timestamp,
gsoap_eml2_2::prodml21__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_1::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_1::TimeSeriesData::pushBackKeywordValue ( gsoap_eml2_2::prodml21__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_1::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_1::TimeSeriesData::setMeasureClass ( gsoap_eml2_2::eml22__MeasureClass  measureClass)

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

Parameters
measureClassThe measure class to set.

◆ setUom()

void prodml2_1::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

const char* prodml2_1::TimeSeriesData::XML_NS
static

The standard XML namespace for serializing this data object.

◆ XML_TAG

const char* prodml2_1::TimeSeriesData::XML_TAG
static

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: