|
|
@ -132,7 +132,7 @@ MmsValue_setElement(MmsValue* complexValue, int index, MmsValue* elementValue);
|
|
|
|
*************************************************************************************/
|
|
|
|
*************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
MmsDataAccessError
|
|
|
|
MmsDataAccessError
|
|
|
|
MmsValue_getDataAccessError(MmsValue* self);
|
|
|
|
MmsValue_getDataAccessError(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Get the int64_t value of a MmsValue object.
|
|
|
|
* \brief Get the int64_t value of a MmsValue object.
|
|
|
@ -142,7 +142,7 @@ MmsValue_getDataAccessError(MmsValue* self);
|
|
|
|
* \return signed 64 bit integer
|
|
|
|
* \return signed 64 bit integer
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
int64_t
|
|
|
|
int64_t
|
|
|
|
MmsValue_toInt64(MmsValue* self);
|
|
|
|
MmsValue_toInt64(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Get the int32_t value of a MmsValue object.
|
|
|
|
* \brief Get the int32_t value of a MmsValue object.
|
|
|
@ -152,7 +152,7 @@ MmsValue_toInt64(MmsValue* self);
|
|
|
|
* \return signed 32 bit integer
|
|
|
|
* \return signed 32 bit integer
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
int32_t
|
|
|
|
int32_t
|
|
|
|
MmsValue_toInt32(MmsValue* value);
|
|
|
|
MmsValue_toInt32(const MmsValue* value);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Get the uint32_t value of a MmsValue object.
|
|
|
|
* \brief Get the uint32_t value of a MmsValue object.
|
|
|
@ -162,7 +162,7 @@ MmsValue_toInt32(MmsValue* value);
|
|
|
|
* \return unsigned 32 bit integer
|
|
|
|
* \return unsigned 32 bit integer
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
uint32_t
|
|
|
|
uint32_t
|
|
|
|
MmsValue_toUint32(MmsValue* value);
|
|
|
|
MmsValue_toUint32(const MmsValue* value);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Get the double value of a MmsValue object.
|
|
|
|
* \brief Get the double value of a MmsValue object.
|
|
|
@ -172,7 +172,7 @@ MmsValue_toUint32(MmsValue* value);
|
|
|
|
* \return 64 bit floating point value
|
|
|
|
* \return 64 bit floating point value
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
double
|
|
|
|
double
|
|
|
|
MmsValue_toDouble(MmsValue* self);
|
|
|
|
MmsValue_toDouble(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Get the float value of a MmsValue object.
|
|
|
|
* \brief Get the float value of a MmsValue object.
|
|
|
@ -182,7 +182,7 @@ MmsValue_toDouble(MmsValue* self);
|
|
|
|
* \return 32 bit floating point value
|
|
|
|
* \return 32 bit floating point value
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
float
|
|
|
|
float
|
|
|
|
MmsValue_toFloat(MmsValue* self);
|
|
|
|
MmsValue_toFloat(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Get the unix timestamp of a MmsValue object of type MMS_UTCTIME.
|
|
|
|
* \brief Get the unix timestamp of a MmsValue object of type MMS_UTCTIME.
|
|
|
@ -192,7 +192,7 @@ MmsValue_toFloat(MmsValue* self);
|
|
|
|
* \return unix timestamp of the MMS_UTCTIME variable.
|
|
|
|
* \return unix timestamp of the MMS_UTCTIME variable.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
uint32_t
|
|
|
|
uint32_t
|
|
|
|
MmsValue_toUnixTimestamp(MmsValue* self);
|
|
|
|
MmsValue_toUnixTimestamp(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Set the float value of a MmsValue object.
|
|
|
|
* \brief Set the float value of a MmsValue object.
|
|
|
@ -290,13 +290,13 @@ MmsValue_setBoolean(MmsValue* value, bool boolValue);
|
|
|
|
* \return the MmsValue value as bool value
|
|
|
|
* \return the MmsValue value as bool value
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
bool
|
|
|
|
bool
|
|
|
|
MmsValue_getBoolean(MmsValue* value);
|
|
|
|
MmsValue_getBoolean(const MmsValue* value);
|
|
|
|
|
|
|
|
|
|
|
|
char*
|
|
|
|
char*
|
|
|
|
MmsValue_toString(MmsValue* self);
|
|
|
|
MmsValue_toString(MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
MmsValue_setVisibleString(MmsValue* self, char* string);
|
|
|
|
MmsValue_setVisibleString(MmsValue* self, const char* string);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -319,7 +319,7 @@ MmsValue_setBitStringBit(MmsValue* self, int bitPos, bool value);
|
|
|
|
* \return the value of the bit (true = 1 / false = 0)
|
|
|
|
* \return the value of the bit (true = 1 / false = 0)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
bool
|
|
|
|
bool
|
|
|
|
MmsValue_getBitStringBit(MmsValue* self, int bitPos);
|
|
|
|
MmsValue_getBitStringBit(const MmsValue* self, int bitPos);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Delete all bits (set to zero) of an MmsType object of type MMS_BITSTRING
|
|
|
|
* \brief Delete all bits (set to zero) of an MmsType object of type MMS_BITSTRING
|
|
|
@ -336,7 +336,7 @@ MmsValue_deleteAllBitStringBits(MmsValue* self);
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
int
|
|
|
|
MmsValue_getBitStringSize(MmsValue* self);
|
|
|
|
MmsValue_getBitStringSize(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Get the number of bytes required by this bitString
|
|
|
|
* \brief Get the number of bytes required by this bitString
|
|
|
@ -344,7 +344,7 @@ MmsValue_getBitStringSize(MmsValue* self);
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
int
|
|
|
|
MmsValue_getBitStringByteSize(MmsValue* self);
|
|
|
|
MmsValue_getBitStringByteSize(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Count the number of set bits in a bit string.
|
|
|
|
* \brief Count the number of set bits in a bit string.
|
|
|
@ -352,7 +352,7 @@ MmsValue_getBitStringByteSize(MmsValue* self);
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
int
|
|
|
|
MmsValue_getNumberOfSetBits(MmsValue* self);
|
|
|
|
MmsValue_getNumberOfSetBits(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Set all bits (set to one) of an MmsType object of type MMS_BITSTRING
|
|
|
|
* Set all bits (set to one) of an MmsType object of type MMS_BITSTRING
|
|
|
@ -371,7 +371,7 @@ MmsValue_setAllBitStringBits(MmsValue* self);
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
uint32_t
|
|
|
|
uint32_t
|
|
|
|
MmsValue_getBitStringAsInteger(MmsValue* self);
|
|
|
|
MmsValue_getBitStringAsInteger(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Convert an unsigned integer to a bit string
|
|
|
|
* \brief Convert an unsigned integer to a bit string
|
|
|
@ -394,7 +394,7 @@ MmsValue_setBitStringFromInteger(MmsValue* self, uint32_t intValue);
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
uint32_t
|
|
|
|
uint32_t
|
|
|
|
MmsValue_getBitStringAsIntegerBigEndian(MmsValue* self);
|
|
|
|
MmsValue_getBitStringAsIntegerBigEndian(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Convert an unsigned integer to a bit string (big endian bit order)
|
|
|
|
* \brief Convert an unsigned integer to a bit string (big endian bit order)
|
|
|
@ -435,7 +435,19 @@ MmsValue_setUtcTimeMs(MmsValue* self, uint64_t timeval);
|
|
|
|
* \param buffer buffer containing the encoded UTCTime.
|
|
|
|
* \param buffer buffer containing the encoded UTCTime.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
void
|
|
|
|
MmsValue_setUtcTimeByBuffer(MmsValue* self, uint8_t* buffer);
|
|
|
|
MmsValue_setUtcTimeByBuffer(MmsValue* self, const uint8_t* buffer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* \brief return the raw buffer containing the UTC time data
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* Note: This will return the address of the raw byte buffer. The array length is 8 byte.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param self MmsValue instance to operate on. Has to be of a type MMS_UTCTIME.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* \return the buffer containing the raw data
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
uint8_t*
|
|
|
|
|
|
|
|
MmsValue_getUtcTimeBuffer(MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Get a millisecond time value from an MmsValue object of MMS_UTCTIME type.
|
|
|
|
* \brief Get a millisecond time value from an MmsValue object of MMS_UTCTIME type.
|
|
|
@ -445,7 +457,7 @@ MmsValue_setUtcTimeByBuffer(MmsValue* self, uint8_t* buffer);
|
|
|
|
* \return the value in milliseconds since epoch (1970/01/01 00:00 UTC)
|
|
|
|
* \return the value in milliseconds since epoch (1970/01/01 00:00 UTC)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
uint64_t
|
|
|
|
uint64_t
|
|
|
|
MmsValue_getUtcTimeInMs(MmsValue* value);
|
|
|
|
MmsValue_getUtcTimeInMs(const MmsValue* value);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief set the TimeQuality byte of the UtcTime
|
|
|
|
* \brief set the TimeQuality byte of the UtcTime
|
|
|
@ -479,7 +491,7 @@ MmsValue_setUtcTimeQuality(MmsValue* self, uint8_t timeQuality);
|
|
|
|
* \return the byte representing the time quality
|
|
|
|
* \return the byte representing the time quality
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
uint8_t
|
|
|
|
uint8_t
|
|
|
|
MmsValue_getUtcTimeQuality(MmsValue* self);
|
|
|
|
MmsValue_getUtcTimeQuality(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Update an MmsValue object of type MMS_BINARYTIME with a millisecond time.
|
|
|
|
* \brief Update an MmsValue object of type MMS_BINARYTIME with a millisecond time.
|
|
|
@ -498,7 +510,7 @@ MmsValue_setBinaryTime(MmsValue* self, uint64_t timestamp);
|
|
|
|
* \return the value in milliseconds since epoch (1970/01/01 00:00 UTC)
|
|
|
|
* \return the value in milliseconds since epoch (1970/01/01 00:00 UTC)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
uint64_t
|
|
|
|
uint64_t
|
|
|
|
MmsValue_getBinaryTimeAsUtcMs(MmsValue* self);
|
|
|
|
MmsValue_getBinaryTimeAsUtcMs(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Set the value of an MmsValue object of type MMS_OCTET_STRING.
|
|
|
|
* \brief Set the value of an MmsValue object of type MMS_OCTET_STRING.
|
|
|
@ -522,7 +534,7 @@ MmsValue_setOctetString(MmsValue* self, uint8_t* buf, int size);
|
|
|
|
* \return size in bytes
|
|
|
|
* \return size in bytes
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
uint16_t
|
|
|
|
uint16_t
|
|
|
|
MmsValue_getOctetStringSize(MmsValue* self);
|
|
|
|
MmsValue_getOctetStringSize(const MmsValue* self);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Returns the maximum size in bytes of an MmsValue object of type MMS_OCTET_STRING.
|
|
|
|
* \brief Returns the maximum size in bytes of an MmsValue object of type MMS_OCTET_STRING.
|
|
|
@ -559,7 +571,7 @@ MmsValue_getOctetStringBuffer(MmsValue* self);
|
|
|
|
* \return indicates if the update has been successful (false if not)
|
|
|
|
* \return indicates if the update has been successful (false if not)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
bool
|
|
|
|
bool
|
|
|
|
MmsValue_update(MmsValue* self, MmsValue* source);
|
|
|
|
MmsValue_update(MmsValue* self, const MmsValue* source);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Check if two instances of MmsValue have the same value.
|
|
|
|
* \brief Check if two instances of MmsValue have the same value.
|
|
|
@ -573,7 +585,7 @@ MmsValue_update(MmsValue* self, MmsValue* source);
|
|
|
|
* \return true if both instances are of the same type and have the same value
|
|
|
|
* \return true if both instances are of the same type and have the same value
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
bool
|
|
|
|
bool
|
|
|
|
MmsValue_equals(MmsValue* self, MmsValue* otherValue);
|
|
|
|
MmsValue_equals(const MmsValue* self, const MmsValue* otherValue);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Check if two (complex) instances of MmsValue have the same type.
|
|
|
|
* \brief Check if two (complex) instances of MmsValue have the same type.
|
|
|
@ -588,7 +600,7 @@ MmsValue_equals(MmsValue* self, MmsValue* otherValue);
|
|
|
|
* \return true if both instances and all their children are of the same type.
|
|
|
|
* \return true if both instances and all their children are of the same type.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
bool
|
|
|
|
bool
|
|
|
|
MmsValue_equalTypes(MmsValue* self, MmsValue* otherValue);
|
|
|
|
MmsValue_equalTypes(const MmsValue* self, const MmsValue* otherValue);
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************************
|
|
|
|
/*************************************************************************************
|
|
|
|
* Constructors and destructors
|
|
|
|
* Constructors and destructors
|
|
|
@ -745,7 +757,7 @@ MmsValue_deleteIfNotNull(MmsValue* value);
|
|
|
|
* \return new MmsValue instance of type MMS_VISIBLE_STRING
|
|
|
|
* \return new MmsValue instance of type MMS_VISIBLE_STRING
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
MmsValue*
|
|
|
|
MmsValue*
|
|
|
|
MmsValue_newVisibleString(char* string);
|
|
|
|
MmsValue_newVisibleString(const char* string);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Create a new MmsValue instance of type MMS_VISIBLE_STRING.
|
|
|
|
* \brief Create a new MmsValue instance of type MMS_VISIBLE_STRING.
|
|
|
@ -822,7 +834,7 @@ MmsValue*
|
|
|
|
MmsValue_newMmsString(char* string);
|
|
|
|
MmsValue_newMmsString(char* string);
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
MmsValue_setMmsString(MmsValue* value, char* string);
|
|
|
|
MmsValue_setMmsString(MmsValue* value, const char* string);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Create a new MmsValue instance of type MMS_UTCTIME.
|
|
|
|
* \brief Create a new MmsValue instance of type MMS_UTCTIME.
|
|
|
|