Data Structures | Typedefs | Functions
sopc_numeric_range.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "sopc_enums.h"

Go to the source code of this file.

Data Structures

struct  _SOPC_Dimension
struct  _SOPC_NumericRange


typedef struct _SOPC_Dimension SOPC_Dimension
typedef struct _SOPC_NumericRange SOPC_NumericRange


SOPC_ReturnStatus SOPC_NumericRange_Parse (const char *range, SOPC_NumericRange **result)
 Parses a numeric range as described in Part 4 § 7.22. More...
void SOPC_NumericRange_Delete (SOPC_NumericRange *range)

Typedef Documentation

◆ SOPC_Dimension

◆ SOPC_NumericRange

Function Documentation

◆ SOPC_NumericRange_Parse()

SOPC_ReturnStatus SOPC_NumericRange_Parse ( const char *  range,
SOPC_NumericRange **  result 

Parses a numeric range as described in Part 4 § 7.22.

rangethe string describing the range, range validity is checked (the first integer shall have a lower value than the second)
resultthe allocated parsed range in case of success, or NULL in case of failure
SOPC_STATUS_OK in case of success, or an error code in case of failure.

The specification does not explicitly tell on how many bits range bounds are to be encoded. Array/string/bytestring sizes in OPC-UA are 32 bit signed integers. In order to reflect the positive nature of range bounds while covering the range of valid value sizes and minimizing memory usage, we use unsigned 32 bit integers for range bounds. Passing range bounds that don't fit in an unsigned 32 bit integer will make this function return SOPC_STATUS_NOK .

◆ SOPC_NumericRange_Delete()

void SOPC_NumericRange_Delete ( SOPC_NumericRange range)