C++ Based OPC UA Client/Server SDK
1.6.1.391
|
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... | |
UaEUInformation & | operator= (const UaEUInformation &other) |
Assignment operator. More... | |
OpcUa_EUInformation * | copy () 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_EUInformation * | detach (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_EUInformation * | clone (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 OpcUa_EUInformation data to an existing OpcUa_EUInformation structure. More... | |
static UaEUInformation | fromUnitId (EngineeringUnit unitId) |
Returns the EngineeringUnit with the UnitId unitId. More... | |
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.
UaEUInformation::UaEUInformation | ( | const UaEUInformation & | other | ) |
Constructs an instance of the class UaEUInformation with values from another UaEUInformation object.
other | the 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.
other | the 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.
extensionObject | the 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.
extensionObject | the extension object containing the EUInformation |
UaEUInformation::UaEUInformation | ( | UaEUInformation::EngineeringUnit | unitId | ) |
Constructs an instance of the class UaEUInformation initialized with a unitId.
unitId | The unitId which defines the settings to initialize the UaEUInformation with values from the namespace http://www.opcfoundation.org/UA/units/un/cefact |
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.
pValue | [in] Parameter to attach to. |
void UaEUInformation::clear | ( | ) |
Clear the data of the UaEUInformation.
|
static |
Copy OpcUa_EUInformation data to a newly allocated OpcUa_EUInformation.
source | Source to clone. |
|
static |
Copy OpcUa_EUInformation data to an existing OpcUa_EUInformation structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_EUInformation * UaEUInformation::copy | ( | ) | const |
Copy UaEUInformation data to a newly allocated OpcUa_EUInformation.
void UaEUInformation::copyTo | ( | OpcUa_EUInformation * | pDst | ) | const |
Copy UaEUInformation data to an existing OpcUa_EUInformation structure.
pDst | the 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.
pDst | [out] Pointer to an OpcUa_EUInformation structure that receives the EUInformation data. |
|
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.
other | the UaEUInformation to compare with. |
UaEUInformation & UaEUInformation::operator= | ( | const UaEUInformation & | other | ) |
bool UaEUInformation::operator== | ( | const UaEUInformation & | other | ) | const |
Compare two UaEUInformation for equality.
other | the UaEUInformation to compare with. |
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.