libIEC61850
0.8.3
Open-source IEC 61850 MMS/GOOSE server and client library
|
Typedefs | |
typedef struct sMmsValue | MmsValue |
Functions | |
MmsValue * | MmsValue_createArray (MmsVariableSpecification *elementType, int size) |
Create an Array and initialize elements with default values. More... | |
uint32_t | MmsValue_getArraySize (MmsValue *self) |
Get the size of an array. More... | |
MmsValue * | MmsValue_getElement (MmsValue *array, int index) |
Get an element of an array or structure. More... | |
MmsValue * | MmsValue_createEmtpyArray (int size) |
Create an emtpy array. More... | |
void | MmsValue_setElement (MmsValue *complexValue, int index, MmsValue *elementValue) |
MmsDataAccessError | MmsValue_getDataAccessError (MmsValue *self) |
int64_t | MmsValue_toInt64 (MmsValue *self) |
Get the int64_t value of a MmsValue object. More... | |
int32_t | MmsValue_toInt32 (MmsValue *value) |
Get the int32_t value of a MmsValue object. More... | |
uint32_t | MmsValue_toUint32 (MmsValue *value) |
Get the uint32_t value of a MmsValue object. More... | |
double | MmsValue_toDouble (MmsValue *self) |
Get the double value of a MmsValue object. More... | |
float | MmsValue_toFloat (MmsValue *self) |
Get the float value of a MmsValue object. More... | |
uint32_t | MmsValue_toUnixTimestamp (MmsValue *self) |
Get the unix timestamp of a MmsValue object of type MMS_UTCTIME. More... | |
void | MmsValue_setFloat (MmsValue *self, float newFloatValue) |
Set the float value of a MmsValue object. More... | |
void | MmsValue_setDouble (MmsValue *self, double newFloatValue) |
Set the double value of a MmsValue object. More... | |
void | MmsValue_setInt8 (MmsValue *value, int8_t integer) |
Set the Int8 value of a MmsValue object. More... | |
void | MmsValue_setInt16 (MmsValue *value, int16_t integer) |
Set the Int16 value of a MmsValue object. More... | |
void | MmsValue_setInt32 (MmsValue *self, int32_t integer) |
Set the Int32 value of a MmsValue object. More... | |
void | MmsValue_setInt64 (MmsValue *value, int64_t integer) |
Set the Int64 value of a MmsValue object. More... | |
void | MmsValue_setUint8 (MmsValue *value, uint8_t integer) |
Set the UInt8 value of a MmsValue object. More... | |
void | MmsValue_setUint16 (MmsValue *value, uint16_t integer) |
Set the UInt16 value of a MmsValue object. More... | |
void | MmsValue_setUint32 (MmsValue *value, uint32_t integer) |
Set the UInt32 value of a MmsValue object. More... | |
void | MmsValue_setBoolean (MmsValue *value, bool boolValue) |
Set the bool value of a MmsValue object. More... | |
bool | MmsValue_getBoolean (MmsValue *value) |
Get the bool value of a MmsValue object. More... | |
char * | MmsValue_toString (MmsValue *self) |
void | MmsValue_setVisibleString (MmsValue *self, char *string) |
void | MmsValue_setBitStringBit (MmsValue *self, int bitPos, bool value) |
Set a single bit (set to one) of an MmsType object of type MMS_BITSTRING. More... | |
bool | MmsValue_getBitStringBit (MmsValue *self, int bitPos) |
Get the value of a single bit (set to one) of an MmsType object of type MMS_BITSTRING. More... | |
void | MmsValue_deleteAllBitStringBits (MmsValue *self) |
Delete all bits (set to zero) of an MmsType object of type MMS_BITSTRING. More... | |
int | MmsValue_getBitStringSize (MmsValue *self) |
Get the size of a bit string in bits. More... | |
int | MmsValue_getBitStringByteSize (MmsValue *self) |
Get the number of bytes required by this bitString. More... | |
int | MmsValue_getNumberOfSetBits (MmsValue *self) |
Count the number of set bits in a bit string. More... | |
void | MmsValue_setAllBitStringBits (MmsValue *self) |
uint32_t | MmsValue_getBitStringAsInteger (MmsValue *self) |
Convert a bit string to an unsigned integer. More... | |
void | MmsValue_setBitStringFromInteger (MmsValue *self, uint32_t intValue) |
Convert an unsigned integer to a bit string. More... | |
uint32_t | MmsValue_getBitStringAsIntegerBigEndian (MmsValue *self) |
Convert a bit string to an unsigned integer (big endian bit order) More... | |
void | MmsValue_setBitStringFromIntegerBigEndian (MmsValue *self, uint32_t intValue) |
Convert an unsigned integer to a bit string (big endian bit order) More... | |
MmsValue * | MmsValue_setUtcTime (MmsValue *self, uint32_t timeval) |
Update an MmsValue object of UtcTime type with a timestamp in s. More... | |
MmsValue * | MmsValue_setUtcTimeMs (MmsValue *self, uint64_t timeval) |
Update an MmsValue object of type MMS_UTCTIME with a millisecond time. More... | |
void | MmsValue_setUtcTimeByBuffer (MmsValue *self, uint8_t *buffer) |
Update an MmsValue object of type MMS_UTCTIME with a buffer containing a BER encoded UTCTime. More... | |
uint64_t | MmsValue_getUtcTimeInMs (MmsValue *value) |
Get a millisecond time value from an MmsValue object of MMS_UTCTIME type. More... | |
void | MmsValue_setUtcTimeQuality (MmsValue *self, uint8_t timeQuality) |
set the TimeQuality byte of the UtcTime More... | |
uint8_t | MmsValue_getUtcTimeQuality (MmsValue *self) |
get the TimeQuality byte of the UtcTime More... | |
void | MmsValue_setBinaryTime (MmsValue *self, uint64_t timestamp) |
Update an MmsValue object of type MMS_BINARYTIME with a millisecond time. More... | |
uint64_t | MmsValue_getBinaryTimeAsUtcMs (MmsValue *self) |
Get a millisecond time value from an MmsValue object of type MMS_BINARYTIME. More... | |
void | MmsValue_setOctetString (MmsValue *self, uint8_t *buf, int size) |
Set the value of an MmsValue object of type MMS_OCTET_STRING. More... | |
uint16_t | MmsValue_getOctetStringSize (MmsValue *self) |
Returns the size in bytes of an MmsValue object of type MMS_OCTET_STRING. More... | |
uint16_t | MmsValue_getOctetStringMaxSize (MmsValue *self) |
Returns the maximum size in bytes of an MmsValue object of type MMS_OCTET_STRING. More... | |
uint8_t * | MmsValue_getOctetStringBuffer (MmsValue *self) |
Returns the reference to the internally hold buffer of an MmsValue object of type MMS_OCTET_STRING. More... | |
bool | MmsValue_update (MmsValue *self, MmsValue *source) |
Update the value of an MmsValue instance by the value of another MmsValue instance. More... | |
bool | MmsValue_equals (MmsValue *self, MmsValue *otherValue) |
Check if two instances of MmsValue have the same value. More... | |
bool | MmsValue_equalTypes (MmsValue *self, MmsValue *otherValue) |
Check if two (complex) instances of MmsValue have the same type. More... | |
MmsValue * | MmsValue_newDataAccessError (MmsDataAccessError accessError) |
MmsValue * | MmsValue_newIntegerFromBerInteger (Asn1PrimitiveValue *berInteger) |
MmsValue * | MmsValue_newUnsignedFromBerInteger (Asn1PrimitiveValue *berInteger) |
MmsValue * | MmsValue_newInteger (int size) |
MmsValue * | MmsValue_newUnsigned (int size) |
MmsValue * | MmsValue_newBoolean (bool boolean) |
MmsValue * | MmsValue_newBitString (int bitSize) |
Create a new MmsValue instance of type MMS_BITSTRING. More... | |
MmsValue * | MmsValue_newOctetString (int size, int maxSize) |
MmsValue * | MmsValue_newStructure (MmsVariableSpecification *typeSpec) |
MmsValue * | MmsValue_createEmptyStructure (int size) |
MmsValue * | MmsValue_newDefaultValue (MmsVariableSpecification *typeSpec) |
MmsValue * | MmsValue_newIntegerFromInt8 (int8_t integer) |
MmsValue * | MmsValue_newIntegerFromInt16 (int16_t integer) |
MmsValue * | MmsValue_newIntegerFromInt32 (int32_t integer) |
MmsValue * | MmsValue_newIntegerFromInt64 (int64_t integer) |
MmsValue * | MmsValue_newUnsignedFromUint32 (uint32_t integer) |
MmsValue * | MmsValue_newFloat (float variable) |
MmsValue * | MmsValue_newDouble (double variable) |
MmsValue * | MmsValue_clone (MmsValue *self) |
Create a (deep) copy of an MmsValue instance. More... | |
uint8_t * | MmsValue_cloneToBuffer (MmsValue *self, uint8_t *destinationAddress) |
Create a (deep) copy of an MmsValue instance in a user provided buffer. More... | |
int | MmsValue_getSizeInMemory (MmsValue *self) |
Determine the required amount of bytes by a clone. More... | |
void | MmsValue_delete (MmsValue *self) |
Delete an MmsValue instance. More... | |
void | MmsValue_deleteConditional (MmsValue *value) |
Delete an MmsValue instance. More... | |
void | MmsValue_deleteIfNotNull (MmsValue *value) |
Delete an MmsValue instance if the provided pointer is not NULL. More... | |
MmsValue * | MmsValue_newVisibleString (char *string) |
Create a new MmsValue instance of type MMS_VISIBLE_STRING. More... | |
MmsValue * | MmsValue_newVisibleStringWithSize (int size) |
Create a new MmsValue instance of type MMS_VISIBLE_STRING. More... | |
MmsValue * | MmsValue_newMmsStringWithSize (int size) |
Create a new MmsValue instance of type MMS_STRING. More... | |
MmsValue * | MmsValue_newBinaryTime (bool timeOfDay) |
Create a new MmsValue instance of type MMS_BINARYTIME. More... | |
MmsValue * | MmsValue_newVisibleStringFromByteArray (uint8_t *byteArray, int size) |
Create a new MmsValue instance of type MMS_VISIBLE_STRING from the specified byte array. More... | |
MmsValue * | MmsValue_newMmsStringFromByteArray (uint8_t *byteArray, int size) |
Create a new MmsValue instance of type MMS_STRING from the specified byte array. More... | |
MmsValue * | MmsValue_newMmsString (char *string) |
Create a new MmsValue instance of type MMS_STRING. More... | |
void | MmsValue_setMmsString (MmsValue *value, char *string) |
MmsValue * | MmsValue_newUtcTime (uint32_t timeval) |
Create a new MmsValue instance of type MMS_UTCTIME. More... | |
MmsValue * | MmsValue_newUtcTimeByMsTime (uint64_t timeval) |
Create a new MmsValue instance of type MMS_UTCTIME. More... | |
void | MmsValue_setDeletable (MmsValue *self) |
void | MmsValue_setDeletableRecursive (MmsValue *value) |
int | MmsValue_isDeletable (MmsValue *self) |
Check if the MmsValue instance has the deletable flag set. More... | |
MmsType | MmsValue_getType (MmsValue *self) |
Get the MmsType of an MmsValue instance. More... | |
MmsValue * | MmsValue_getSubElement (MmsValue *self, MmsVariableSpecification *varSpec, char *mmsPath) |
Get a sub-element of a MMS_STRUCTURE value specified by a path name. More... | |
char * | MmsValue_getTypeString (MmsValue *self) |
return the value type as a human readable string More... | |
char * | MmsValue_printToBuffer (MmsValue *self, char *buffer, int bufferSize) |
typedef struct sMmsValue MmsValue |
MmsValue - complex value type for MMS Client API
enum MmsDataAccessError |
Create a (deep) copy of an MmsValue instance.
This operation will allocate dynamic memory. It is up to the caller to free this memory by calling MmsValue_delete() later.
self | the MmsValue instance that will be cloned |
uint8_t* MmsValue_cloneToBuffer | ( | MmsValue * | self, |
uint8_t * | destinationAddress | ||
) |
Create a (deep) copy of an MmsValue instance in a user provided buffer.
This operation copies the give MmsValue instance to a user provided buffer.
self | the MmsValue instance that will be cloned |
destinationAddress | the start address of the user provided buffer |
MmsValue* MmsValue_createArray | ( | MmsVariableSpecification * | elementType, |
int | size | ||
) |
Create an Array and initialize elements with default values.
elementType | type description for the elements the new array |
size | the size of the new array |
MmsValue* MmsValue_createEmptyStructure | ( | int | size) |
MmsValue* MmsValue_createEmtpyArray | ( | int | size) |
Create an emtpy array.
size | the size of the new array |
void MmsValue_delete | ( | MmsValue * | self) |
Delete an MmsValue instance.
This operation frees all dynamically allocated memory of the MmsValue instance. If the instance is of type MMS_STRUCTURE or MMS_ARRAY all child elements will be deleted too.
self | the MmsValue instance to be deleted. |
void MmsValue_deleteAllBitStringBits | ( | MmsValue * | self) |
Delete all bits (set to zero) of an MmsType object of type MMS_BITSTRING.
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
void MmsValue_deleteConditional | ( | MmsValue * | value) |
Delete an MmsValue instance.
This operation frees all dynamically allocated memory of the MmsValue instance. If the instance is of type MMS_STRUCTURE or MMS_ARRAY all child elements will be deleted too.
NOTE: this functions only frees the instance if deleteValue field = 0!
self | the MmsValue instance to be deleted. |
void MmsValue_deleteIfNotNull | ( | MmsValue * | value) |
Delete an MmsValue instance if the provided pointer is not NULL.
This operation frees all dynamically allocated memory of the MmsValue instance. If the instance is of type MMS_STRUCTURE or MMS_ARRAY all child elements will be deleted too.
self | the MmsValue instance to be deleted. |
Check if two instances of MmsValue have the same value.
Both instances should be of same type. E.g. is self is of type MMS_INTEGER then source has also to be of type MMS_INTEGER. Otherwise the call will return false.
self | MmsValue instance to operate on. |
otherValue | MmsValue that is used to test |
Check if two (complex) instances of MmsValue have the same type.
This function will test if the two values are of the same type. The function will return true only if all child instances in the MmsValue instance tree are also of equal type.
self | MmsValue instance to operate on. |
otherValue | MmsValue that is used to test |
uint32_t MmsValue_getArraySize | ( | MmsValue * | self) |
Get the size of an array.
self | MmsValue instance to operate on. Has to be of type MMS_ARRAY. |
uint64_t MmsValue_getBinaryTimeAsUtcMs | ( | MmsValue * | self) |
Get a millisecond time value from an MmsValue object of type MMS_BINARYTIME.
self | MmsValue instance to operate on. Has to be of a type MMS_BINARYTIME. |
uint32_t MmsValue_getBitStringAsInteger | ( | MmsValue * | self) |
Convert a bit string to an unsigned integer.
This function assumes that the first bit in the bit string is the least significant bit (little endian bit order).
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
uint32_t MmsValue_getBitStringAsIntegerBigEndian | ( | MmsValue * | self) |
Convert a bit string to an unsigned integer (big endian bit order)
This function assumes that the first bit in the bit string is the most significant bit (big endian bit order).
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
bool MmsValue_getBitStringBit | ( | MmsValue * | self, |
int | bitPos | ||
) |
Get the value of a single bit (set to one) of an MmsType object of type MMS_BITSTRING.
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
bitPos | the position of the bit in the bit string. Starting with 0. The bit with position 0 is the first bit if the MmsValue instance is serialized. |
int MmsValue_getBitStringByteSize | ( | MmsValue * | self) |
Get the number of bytes required by this bitString.
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
int MmsValue_getBitStringSize | ( | MmsValue * | self) |
Get the size of a bit string in bits.
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
bool MmsValue_getBoolean | ( | MmsValue * | value) |
Get the bool value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN. |
MmsDataAccessError MmsValue_getDataAccessError | ( | MmsValue * | self) |
Get an element of an array or structure.
self | MmsValue instance to operate on. Has to be of type MMS_ARRAY or MMS_STRUCTURE. |
index | ndex of the requested array or structure element |
int MmsValue_getNumberOfSetBits | ( | MmsValue * | self) |
Count the number of set bits in a bit string.
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
uint8_t* MmsValue_getOctetStringBuffer | ( | MmsValue * | self) |
Returns the reference to the internally hold buffer of an MmsValue object of type MMS_OCTET_STRING.
self | MmsValue instance to operate on. Has to be of a type MMS_OCTET_STRING. |
uint16_t MmsValue_getOctetStringMaxSize | ( | MmsValue * | self) |
Returns the maximum size in bytes of an MmsValue object of type MMS_OCTET_STRING.
Returns the maximum size if bytes of the MmsValue object of type MMS_OCTET_STRING. This is the size of the internally allocated buffer to hold the octet string data.
self | MmsValue instance to operate on. Has to be of a type MMS_OCTET_STRING. |
uint16_t MmsValue_getOctetStringSize | ( | MmsValue * | self) |
Returns the size in bytes of an MmsValue object of type MMS_OCTET_STRING.
self | MmsValue instance to operate on. Has to be of a type MMS_OCTET_STRING. |
int MmsValue_getSizeInMemory | ( | MmsValue * | self) |
Determine the required amount of bytes by a clone.
This function is intended to be used to determine the buffer size of a clone operation (MmsValue_cloneToBuffer) in advance.
self | the MmsValue instance |
MmsValue* MmsValue_getSubElement | ( | MmsValue * | self, |
MmsVariableSpecification * | varSpec, | ||
char * | mmsPath | ||
) |
Get a sub-element of a MMS_STRUCTURE value specified by a path name.
self | the MmsValue instance |
varSpec | - type specification if the MMS_STRUCTURE value |
mmsPath | - path (in MMS variable name syntax) to specify the sub element. |
MmsType MmsValue_getType | ( | MmsValue * | self) |
Get the MmsType of an MmsValue instance.
self | the MmsValue instance |
char* MmsValue_getTypeString | ( | MmsValue * | self) |
return the value type as a human readable string
self | the MmsValue instance |
uint64_t MmsValue_getUtcTimeInMs | ( | MmsValue * | value) |
Get a millisecond time value from an MmsValue object of MMS_UTCTIME type.
self | MmsValue instance to operate on. Has to be of a type MMS_UTCTIME. |
uint8_t MmsValue_getUtcTimeQuality | ( | MmsValue * | self) |
get the TimeQuality byte of the UtcTime
Meaning of the bits in the timeQuality byte:
bit 7 = leapSecondsKnown bit 6 = clockFailure bit 5 = clockNotSynchronized bit 0-4 = subsecond time accuracy (number of significant bits of subsecond time)
self | MmsValue instance to operate on. Has to be of a type MMS_UTCTIME. |
int MmsValue_isDeletable | ( | MmsValue * | self) |
Check if the MmsValue instance has the deletable flag set.
The deletable flag indicates if an libiec61850 API client should call the MmsValue_delete() method or not if the MmsValue instance was passed to the client by an API call or callback method.
self | the MmsValue instance |
MmsValue* MmsValue_newBinaryTime | ( | bool | timeOfDay) |
Create a new MmsValue instance of type MMS_BINARYTIME.
If the timeOfDay parameter is set to true then the resulting MMS_BINARYTIME object is only 4 octets long and includes only the seconds since midnight. Otherwise the MMS_BINARYTIME
timeOfDay | if true only the TimeOfDay value is included. |
MmsValue* MmsValue_newBitString | ( | int | bitSize) |
Create a new MmsValue instance of type MMS_BITSTRING.
bitSize | the size of the bit string in bit |
MmsValue* MmsValue_newBoolean | ( | bool | boolean) |
MmsValue* MmsValue_newDataAccessError | ( | MmsDataAccessError | accessError) |
MmsValue* MmsValue_newDefaultValue | ( | MmsVariableSpecification * | typeSpec) |
MmsValue* MmsValue_newDouble | ( | double | variable) |
MmsValue* MmsValue_newFloat | ( | float | variable) |
MmsValue* MmsValue_newInteger | ( | int | size) |
MmsValue* MmsValue_newIntegerFromBerInteger | ( | Asn1PrimitiveValue * | berInteger) |
MmsValue* MmsValue_newIntegerFromInt16 | ( | int16_t | integer) |
MmsValue* MmsValue_newIntegerFromInt32 | ( | int32_t | integer) |
MmsValue* MmsValue_newIntegerFromInt64 | ( | int64_t | integer) |
MmsValue* MmsValue_newIntegerFromInt8 | ( | int8_t | integer) |
MmsValue* MmsValue_newMmsString | ( | char * | string) |
Create a new MmsValue instance of type MMS_STRING.
string | a text string that should be the value of the new instance of NULL for an empty string. |
MmsValue* MmsValue_newMmsStringFromByteArray | ( | uint8_t * | byteArray, |
int | size | ||
) |
Create a new MmsValue instance of type MMS_STRING from the specified byte array.
byteArray | the byte array containing the string data |
size | the size of the byte array |
MmsValue* MmsValue_newMmsStringWithSize | ( | int | size) |
Create a new MmsValue instance of type MMS_STRING.
This function will create a new empty MmsValue string object. The maximum size of the string is set according to the size parameter. The function allocates as much memory as is required to hold a string of the maximum size.
size | the new maximum size of the string. |
MmsValue* MmsValue_newOctetString | ( | int | size, |
int | maxSize | ||
) |
MmsValue* MmsValue_newStructure | ( | MmsVariableSpecification * | typeSpec) |
MmsValue* MmsValue_newUnsigned | ( | int | size) |
MmsValue* MmsValue_newUnsignedFromBerInteger | ( | Asn1PrimitiveValue * | berInteger) |
MmsValue* MmsValue_newUnsignedFromUint32 | ( | uint32_t | integer) |
MmsValue* MmsValue_newUtcTime | ( | uint32_t | timeval) |
Create a new MmsValue instance of type MMS_UTCTIME.
timeval | time value as UNIX timestamp (seconds since epoch) |
MmsValue* MmsValue_newUtcTimeByMsTime | ( | uint64_t | timeval) |
Create a new MmsValue instance of type MMS_UTCTIME.
timeval | time value as millisecond timestamp (milliseconds since epoch) |
MmsValue* MmsValue_newVisibleString | ( | char * | string) |
Create a new MmsValue instance of type MMS_VISIBLE_STRING.
This function will allocate as much memory as required to hold the string and sets the maximum size of the string to this size.
string | a text string that should be the value of the new instance of NULL for an empty string. |
MmsValue* MmsValue_newVisibleStringFromByteArray | ( | uint8_t * | byteArray, |
int | size | ||
) |
Create a new MmsValue instance of type MMS_VISIBLE_STRING from the specified byte array.
byteArray | the byte array containing the string data |
size | the size of the byte array |
MmsValue* MmsValue_newVisibleStringWithSize | ( | int | size) |
Create a new MmsValue instance of type MMS_VISIBLE_STRING.
This function will create a new empty MmsValue string object. The maximum size of the string is set according to the size parameter. The function allocates as much memory as is required to hold a string of the maximum size.
size | the new maximum size of the string. |
char* MmsValue_printToBuffer | ( | MmsValue * | self, |
char * | buffer, | ||
int | bufferSize | ||
) |
void MmsValue_setAllBitStringBits | ( | MmsValue * | self) |
Set all bits (set to one) of an MmsType object of type MMS_BITSTRING
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
void MmsValue_setBinaryTime | ( | MmsValue * | self, |
uint64_t | timestamp | ||
) |
Update an MmsValue object of type MMS_BINARYTIME with a millisecond time.
self | MmsValue instance to operate on. Has to be of a type MMS_UTCTIME. |
timeval | the new value in milliseconds since epoch (1970/01/01 00:00 UTC) |
void MmsValue_setBitStringBit | ( | MmsValue * | self, |
int | bitPos, | ||
bool | value | ||
) |
Set a single bit (set to one) of an MmsType object of type MMS_BITSTRING.
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
bitPos | the position of the bit in the bit string. Starting with 0. The bit with position 0 is the first bit if the MmsValue instance is serialized. |
value | the new value of the bit (true = 1 / false = 0) |
void MmsValue_setBitStringFromInteger | ( | MmsValue * | self, |
uint32_t | intValue | ||
) |
Convert an unsigned integer to a bit string.
The integer representation in the bit string assumes the first bit is the least significant bit (little endian bit order).
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
intValue | the integer value that is used to set the bit string |
void MmsValue_setBitStringFromIntegerBigEndian | ( | MmsValue * | self, |
uint32_t | intValue | ||
) |
Convert an unsigned integer to a bit string (big endian bit order)
The integer representation in the bit string assumes the first bit is the most significant bit (big endian bit order).
self | MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. |
intValue | the integer value that is used to set the bit string |
void MmsValue_setBoolean | ( | MmsValue * | value, |
bool | boolValue | ||
) |
Set the bool value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN. |
boolValue | a bool value |
void MmsValue_setDeletable | ( | MmsValue * | self) |
void MmsValue_setDeletableRecursive | ( | MmsValue * | value) |
void MmsValue_setDouble | ( | MmsValue * | self, |
double | newFloatValue | ||
) |
Set the double value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_FLOAT. |
void MmsValue_setFloat | ( | MmsValue * | self, |
float | newFloatValue | ||
) |
Set the float value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_FLOAT. |
void MmsValue_setInt16 | ( | MmsValue * | value, |
int16_t | integer | ||
) |
Set the Int16 value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_INTEGER. |
integer | the new value to set |
void MmsValue_setInt32 | ( | MmsValue * | self, |
int32_t | integer | ||
) |
Set the Int32 value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_INTEGER. |
integer | the new value to set |
void MmsValue_setInt64 | ( | MmsValue * | value, |
int64_t | integer | ||
) |
Set the Int64 value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_INTEGER. |
integer | the new value to set |
void MmsValue_setInt8 | ( | MmsValue * | value, |
int8_t | integer | ||
) |
Set the Int8 value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_INTEGER. |
integer | the new value to set |
void MmsValue_setMmsString | ( | MmsValue * | value, |
char * | string | ||
) |
void MmsValue_setOctetString | ( | MmsValue * | self, |
uint8_t * | buf, | ||
int | size | ||
) |
Set the value of an MmsValue object of type MMS_OCTET_STRING.
This method will copy the provided buffer to the internal buffer of the MmsValue instance. This will only happen if the internal buffer size is large enough for the new value.
self | MmsValue instance to operate on. Has to be of a type MMS_OCTET_STRING. |
buf | the buffer that contains the new value |
size | the size of the buffer that contains the new value |
void MmsValue_setUint16 | ( | MmsValue * | value, |
uint16_t | integer | ||
) |
Set the UInt16 value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED. |
integer | the new value to set |
void MmsValue_setUint32 | ( | MmsValue * | value, |
uint32_t | integer | ||
) |
Set the UInt32 value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED. |
integer | the new value to set |
void MmsValue_setUint8 | ( | MmsValue * | value, |
uint8_t | integer | ||
) |
Set the UInt8 value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED. |
integer | the new value to set |
Update an MmsValue object of UtcTime type with a timestamp in s.
self | MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN. |
timeval | the new value in seconds since epoch (1970/01/01 00:00 UTC) |
void MmsValue_setUtcTimeByBuffer | ( | MmsValue * | self, |
uint8_t * | buffer | ||
) |
Update an MmsValue object of type MMS_UTCTIME with a buffer containing a BER encoded UTCTime.
The buffer must have a size of 8 bytes!
self | MmsValue instance to operate on. Has to be of a type MMS_UTCTIME. |
buffer | buffer containing the encoded UTCTime. |
Update an MmsValue object of type MMS_UTCTIME with a millisecond time.
self | MmsValue instance to operate on. Has to be of a type MMS_UTCTIME. |
timeval | the new value in milliseconds since epoch (1970/01/01 00:00 UTC) |
void MmsValue_setUtcTimeQuality | ( | MmsValue * | self, |
uint8_t | timeQuality | ||
) |
set the TimeQuality byte of the UtcTime
Meaning of the bits in the timeQuality byte:
bit 7 = leapSecondsKnown bit 6 = clockFailure bit 5 = clockNotSynchronized bit 0-4 = subsecond time accuracy (number of significant bits of subsecond time)
self | MmsValue instance to operate on. Has to be of a type MMS_UTCTIME. |
timeQuality | the byte representing the time quality |
void MmsValue_setVisibleString | ( | MmsValue * | self, |
char * | string | ||
) |
double MmsValue_toDouble | ( | MmsValue * | self) |
Get the double value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of type MMS_FLOAT. |
float MmsValue_toFloat | ( | MmsValue * | self) |
Get the float value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of type MMS_FLOAT. |
int32_t MmsValue_toInt32 | ( | MmsValue * | value) |
Get the int32_t value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_INTEGER or MMS_UNSIGNED |
int64_t MmsValue_toInt64 | ( | MmsValue * | self) |
Get the int64_t value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_INTEGER or MMS_UNSIGNED |
char* MmsValue_toString | ( | MmsValue * | self) |
uint32_t MmsValue_toUint32 | ( | MmsValue * | value) |
Get the uint32_t value of a MmsValue object.
self | MmsValue instance to operate on. Has to be of a type MMS_INTEGER or MMS_UNSIGNED |
uint32_t MmsValue_toUnixTimestamp | ( | MmsValue * | self) |
Get the unix timestamp of a MmsValue object of type MMS_UTCTIME.
self | MmsValue instance to operate on. Has to be of a type MMS_UTC_TIME. |
Update the value of an MmsValue instance by the value of another MmsValue instance.
Both instances should be of same time. E.g. is self is of type MMS_INTEGER then source has also to be of type MMS_INTEGER. Otherwise the call will have no effect.
self | MmsValue instance to operate on. |
source | MmsValue used as source for the update. Has to be of same type as self |