High Performance OPC UA Server SDK
1.2.0.193
|
Contains information about the EngineeringUnits. More...
#include <euinformation.h>
Data Fields | |
struct ua_string | namespace_uri |
Identifies the organization (company, standards organization) that defines the EUInformation. | |
int32_t | unit_id |
Identifier for programmatic evaluation. More... | |
struct ua_localizedtext | display_name |
The displayName of the engineering unit. More... | |
struct ua_localizedtext | description |
Contains the full name of the engineering unit such as ”hour” or ”meter per second”. | |
Related Functions | |
void | ua_euinformation_init (struct ua_euinformation *t) |
Initialize an ua_euinformation struct with a valid value. More... | |
void | ua_euinformation_clear (struct ua_euinformation *t) |
Clear all resources alloctated in an ua_euinformation struct. More... | |
int | ua_euinformation_compare (const struct ua_euinformation *a, const struct ua_euinformation *b) |
Compare two ua_euinformation structs. More... | |
int | ua_euinformation_copy (struct ua_euinformation *dst, const struct ua_euinformation *src) |
Create a copy of a ua_euinformation struct. More... | |
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.
|
related |
Clear all resources alloctated in an ua_euinformation struct.
Frees allocated memory like arrays and resets numeric values. The ua_euinformation struct itself is not freed and must be freed by the caller if required. This function always succeeds for a valid ua_euinformation struct, that was validly decoded, initilized by ua_euinformation_init or created with ua_euinformation_copy.
|
related |
Compare two ua_euinformation structs.
Compares the content of the ua_euinformation struct a
to the content of the ua_euinformation struct b
. If a
is smaller than b
, an integer less than zero is returned, if a
is bigger than b
, an integer greater than zero is returned. If both structs are equal zero is returned.
This function creates a total order on ua_euinformation structs, so it is well suited to not only determine equality, but also sort multiple instances of this struct.
|
related |
Create a copy of a ua_euinformation struct.
Copy all fields from struct ua_euinformation src
to dst
. Creates a deep copy so all content is recusively copied and both src
and dst
can be used and must be freed separately.
dst
is not cleared before the copy operation, so it must not have any allocated data. It may or may not be initilized by the caller before copy.
|
related |
Initialize an ua_euinformation struct with a valid value.
After initialization the fields of the struct are set to valid and consistent values and can safley be accessed. An initialized ua_euinformation struct can also be passed to ua_euinformation_compare, ua_euinformation_copy and ua_euinformation_clear. This function will always succeed as long as an ua_euinformation struct is passed to it.
display_name |
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.
unit_id |
Identifier for programmatic evaluation.
−1 is used if a unitId is not available.