C++ Based OPC UA Client/Server SDK  1.5.5.355

Wrapper class for the UA stack structure OpcUa_EUInformation. More...

#include <uaeuinformation.h>

Public Member Functions

 UaEUInformation ()
 Constructs an instance of the class UaEUInformation with empty default values.
 
 UaEUInformation (const UaEUInformation &other)
 Constructs an instance of the class UaEUInformation with values from another UaEUInformation object. More...
 
 UaEUInformation (const OpcUa_EUInformation &other)
 Constructs an instance of the class UaEUInformation with values from another OpcUa_EUInformation structure. More...
 
 UaEUInformation (const UaString &namespaceUri, OpcUa_Int32 unitId, const UaLocalizedText &displayName, const UaLocalizedText &description)
 Constructs an instance of the class UaEUInformation with values provided in the constructor.
 
 UaEUInformation (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaEUInformation initialized with value from a UaExtensionObject. More...
 
 UaEUInformation (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaEUInformation initialized with value from an OpcUa_ExtensionObject structure. More...
 
 UaEUInformation (EngineeringUnit unitId)
 Constructs an instance of the class UaEUInformation initialized with a unitId. More...
 
 ~UaEUInformation ()
 Destroys the UaEUInformation object.
 
void clear ()
 Clear the data of the UaEUInformation. More...
 
bool operator== (const UaEUInformation &other) const
 Compare two UaEUInformation for equality. More...
 
bool operator!= (const UaEUInformation &other) const
 Compare two UaEUInformation for inequality. More...
 
UaEUInformationoperator= (const UaEUInformation &other)
 Assignment operator. More...
 
OpcUa_EUInformationcopy () const
 Copy UaEUInformation data to a newly allocated OpcUa_EUInformation. More...
 
void copyTo (OpcUa_EUInformation *pDst) const
 Copy UaEUInformation data to an existing OpcUa_EUInformation structure. More...
 
void attach (OpcUa_EUInformation *pValue)
 Attaches to an existing OpcUa_EUInformation structure. More...
 
OpcUa_EUInformationdetach (OpcUa_EUInformation *pDst)
 Detaches the internal EUInformation structure from this class. More...
 
void setEUInformation (EngineeringUnit unitId)
 Sets all information related to the unitId. More...
 
UaString getNamespaceUri () const
 Identifies the organization (company, standards organization) that defines the EUInformation.
 
OpcUa_Int32 getUnitId () const
 Identifier for programmatic evaluation. More...
 
UaLocalizedText getDisplayName () const
 The displayName of the engineering unit. More...
 
UaLocalizedText getDescription () const
 Contains the full name of the engineering unit such as ”hour” or ”meter per second”.
 
void setNamespaceUri (const UaString &namespaceUri)
 Identifies the organization (company, standards organization) that defines the EUInformation.
 
void setUnitId (OpcUa_Int32 unitId)
 Identifier for programmatic evaluation. More...
 
void setDisplayName (const UaLocalizedText &displayName)
 The displayName of the engineering unit. More...
 
void setDescription (const UaLocalizedText &description)
 Contains the full name of the engineering unit such as ”hour” or ”meter per second”.
 

Static Public Member Functions

static OpcUa_EUInformationclone (const OpcUa_EUInformation &source)
 Copy OpcUa_EUInformation data to a newly allocated OpcUa_EUInformation. More...
 
static void cloneTo (const OpcUa_EUInformation &source, OpcUa_EUInformation &copy)
 Copy OpcUa_EUInformation data to an existing OpcUa_EUInformation structure. More...
 
static UaEUInformation fromUnitId (EngineeringUnit unitId)
 Returns the EngineeringUnit with the UnitId unitId. More...
 

Detailed Description

Wrapper class for the UA stack structure OpcUa_EUInformation.

This class encapsulates the native OpcUa_EUInformation structure and handles memory allocation and cleanup for you. UaEUInformation uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared EUInformation it creates a copy for that (copy-on-write). So assigning another UaEUInformation or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.

Contains information about the EngineeringUnits.

Understanding the units of a measurement value is essential for a uniform system. In an open system in particular where servers from different cultures might be used, it is essential to know what the units of measurement are. Based on such knowledge, values can be converted if necessary before being used. Therefore, although defined as optional, support of the EngineeringUnits Property is strongly advised.

To facilitate interoperability, OPC UA specifies how to apply the widely accepted “Codes for Units of Measurement (Recommendation No. 20)” published by the “United Nations Centre for Trade Facilitation and Electronic Business” (see UN/CEFACT). It uses and is based on the International System of Units (SI Units) but in addition provides a fixed code that can be used for automated evaluation. This recommendation has been accepted by many industries on a global basis.

Constructor & Destructor Documentation

UaEUInformation::UaEUInformation ( const UaEUInformation other)

Constructs an instance of the class UaEUInformation with values from another UaEUInformation object.

Parameters
otherthe other UaEUInformation used to initialize the object
UaEUInformation::UaEUInformation ( const OpcUa_EUInformation other)

Constructs an instance of the class UaEUInformation with values from another OpcUa_EUInformation structure.

Parameters
otherthe other OpcUa_EUInformation used to initialize the object
UaEUInformation::UaEUInformation ( const UaExtensionObject extensionObject)

Constructs an instance of the class UaEUInformation initialized with value from a UaExtensionObject.

Parameters
extensionObjectthe extension object containing the EUInformation
UaEUInformation::UaEUInformation ( const OpcUa_ExtensionObject extensionObject)

Constructs an instance of the class UaEUInformation initialized with value from an OpcUa_ExtensionObject structure.

Parameters
extensionObjectthe extension object containing the EUInformation
UaEUInformation::UaEUInformation ( UaEUInformation::EngineeringUnit  unitId)

Constructs an instance of the class UaEUInformation initialized with a unitId.

Parameters
unitIdThe unitId which defines the settings to initialize the UaEUInformation with values from the namespace http://www.opcfoundation.org/UA/units/un/cefact

Member Function Documentation

void UaEUInformation::attach ( OpcUa_EUInformation pValue)

Attaches to an existing OpcUa_EUInformation structure.

Don't manually free the attached structure afterwards, because UaEUInformation is responsible for it now.

Parameters
pValue[in] Parameter to attach to.
void UaEUInformation::clear ( )

Clear the data of the UaEUInformation.

OpcUa_EUInformation * UaEUInformation::clone ( const OpcUa_EUInformation source)
static

Copy OpcUa_EUInformation data to a newly allocated OpcUa_EUInformation.

Parameters
sourceSource to clone.
Returns
pointer to a newly allocated OpcUa_EUInformation.
void UaEUInformation::cloneTo ( const OpcUa_EUInformation source,
OpcUa_EUInformation copy 
)
static

Copy OpcUa_EUInformation data to an existing OpcUa_EUInformation structure.

Parameters
sourcethe source of the clone operation.
copythe destination of the clone operation.
OpcUa_EUInformation * UaEUInformation::copy ( ) const

Copy UaEUInformation data to a newly allocated OpcUa_EUInformation.

Returns
pointer to a newly allocated OpcUa_EUInformation.
void UaEUInformation::copyTo ( OpcUa_EUInformation pDst) const

Copy UaEUInformation data to an existing OpcUa_EUInformation structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_EUInformation * UaEUInformation::detach ( OpcUa_EUInformation pDst)

Detaches the internal EUInformation structure from this class.

This way you take over the control of freeing the EUInformation data. If more than one reference exists, the data is copied to pDst instead of being detached.

Parameters
pDst[out] Pointer to an OpcUa_EUInformation structure that receives the EUInformation data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
UaEUInformation UaEUInformation::fromUnitId ( UaEUInformation::EngineeringUnit  unitId)
static

Returns the EngineeringUnit with the UnitId unitId.

The EngineeringUnits are based on the widely accepted "Codes for Units of Measurement (Recommendation No. 20)" published by the "United Nations Centre for Trade Facilitation and Electronic Business" (see UN/CEFACT). It uses and is based on the International System of Units (SI Units) but in addition provides a fixed code that can be used for automated evaluation. This recommendation has been accepted by many industries on a global basis.

UaLocalizedText UaEUInformation::getDisplayName ( ) const

The displayName of the engineering unit.

This is typically the abbreviation of the engineering unit, for example ”h” for hour or ”m/s” for meter per second.

OpcUa_Int32 UaEUInformation::getUnitId ( ) const

Identifier for programmatic evaluation.

−1 is used if a unitId is not available.

bool UaEUInformation::operator!= ( const UaEUInformation other) const

Compare two UaEUInformation for inequality.

See also
operator==
Parameters
otherthe UaEUInformation to compare with.
Returns
true if not equal, false otherwise.
UaEUInformation & UaEUInformation::operator= ( const UaEUInformation other)

Assignment operator.

Parameters
otherthe UaEUInformation to assign.
Returns
reference to itself.
bool UaEUInformation::operator== ( const UaEUInformation other) const

Compare two UaEUInformation for equality.

Parameters
otherthe UaEUInformation to compare with.
Returns
true if equal, false if not.
void UaEUInformation::setDisplayName ( const UaLocalizedText displayName)

The displayName of the engineering unit.

This is typically the abbreviation of the engineering unit, for example ”h” for hour or ”m/s” for meter per second.

void UaEUInformation::setEUInformation ( UaEUInformation::EngineeringUnit  unitId)

Sets all information related to the unitId.

The EngineeringUnits are based on the widely accepted "Codes for Units of Measurement (Recommendation No. 20)" published by the "United Nations Centre for Trade Facilitation and Electronic Business" (see UN/CEFACT). It uses and is based on the International System of Units (SI Units) but in addition provides a fixed code that can be used for automated evaluation. This recommendation has been accepted by many industries on a global basis.

void UaEUInformation::setUnitId ( OpcUa_Int32  unitId)

Identifier for programmatic evaluation.

−1 is used if a unitId is not available.


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