UM C API  6.12.1
lbmsdm.h File Reference

Ultra Messaging (UM) Self-Describing Message (SDM) API. More...

#include <stdlib.h>
#include <inttypes.h>
#include <sys/time.h>

Go to the source code of this file.

Data Structures

struct  lbmsdm_decimal_t_stct
 Structure to hold a scaled decimal number. A scaled decimal number consists of a mantissa $m$ and an exponent $exp$. It represents the value $m\cdot 10^{exp}$. More...
 

Macros

#define LBMSDMExpDLL
 
#define LBMSDM_MAX_FIELD_NAME_LENGTH   255
 Maximum length of a field name.
 
#define LBMSDM_TYPE_MODIFIER_ARRAY   0x0100
 

Typedefs

typedef struct lbmsdm_msg_attr_t_stct lbmsdm_msg_attr_t
 Message attributes object for SDM (opaque).
 
typedef struct lbmsdm_msg_t_stct lbmsdm_msg_t
 Message object for SDM (opaque).
 
typedef uint16_t lbmsdm_field_type_t
 Type definition for an SDM field type.
 
typedef struct lbmsdm_iter_t_stct lbmsdm_iter_t
 Message iterator object for SDM (opaque).
 
typedef struct lbmsdm_decimal_t_stct lbmsdm_decimal_t
 Structure to hold a scaled decimal number. A scaled decimal number consists of a mantissa $m$ and an exponent $exp$. It represents the value $m\cdot 10^{exp}$. More...
 

Enumerations

enum  {
  LBMSDM_TYPE_INVALID = 0, LBMSDM_TYPE_BOOLEAN = 1, LBMSDM_TYPE_INT8 = 2, LBMSDM_TYPE_UINT8 = 3,
  LBMSDM_TYPE_INT16 = 4, LBMSDM_TYPE_UINT16 = 5, LBMSDM_TYPE_INT32 = 6, LBMSDM_TYPE_UINT32 = 7,
  LBMSDM_TYPE_INT64 = 8, LBMSDM_TYPE_UINT64 = 9, LBMSDM_TYPE_FLOAT = 10, LBMSDM_TYPE_DOUBLE = 11,
  LBMSDM_TYPE_DECIMAL = 12, LBMSDM_TYPE_TIMESTAMP = 13, LBMSDM_TYPE_MESSAGE = 14, LBMSDM_TYPE_STRING = 15,
  LBMSDM_TYPE_UNICODE = 16, LBMSDM_TYPE_BLOB = 17, LBMSDM_TYPE_ARRAY_BOOLEAN = LBMSDM_TYPE_BOOLEAN | LBMSDM_TYPE_MODIFIER_ARRAY, LBMSDM_TYPE_ARRAY_INT8 = LBMSDM_TYPE_INT8 | LBMSDM_TYPE_MODIFIER_ARRAY,
  LBMSDM_TYPE_ARRAY_UINT8 = (LBMSDM_TYPE_UINT8 | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_INT16 = (LBMSDM_TYPE_INT16 | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_UINT16 = (LBMSDM_TYPE_UINT16 | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_INT32 = (LBMSDM_TYPE_INT32 | LBMSDM_TYPE_MODIFIER_ARRAY),
  LBMSDM_TYPE_ARRAY_UINT32 = (LBMSDM_TYPE_UINT32 | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_INT64 = (LBMSDM_TYPE_INT64 | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_UINT64 = (LBMSDM_TYPE_UINT64 | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_FLOAT = (LBMSDM_TYPE_FLOAT | LBMSDM_TYPE_MODIFIER_ARRAY),
  LBMSDM_TYPE_ARRAY_DOUBLE = (LBMSDM_TYPE_DOUBLE | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_DECIMAL = (LBMSDM_TYPE_DECIMAL | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_TIMESTAMP = (LBMSDM_TYPE_TIMESTAMP | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_MESSAGE = (LBMSDM_TYPE_MESSAGE | LBMSDM_TYPE_MODIFIER_ARRAY),
  LBMSDM_TYPE_ARRAY_STRING = (LBMSDM_TYPE_STRING | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_UNICODE = (LBMSDM_TYPE_UNICODE | LBMSDM_TYPE_MODIFIER_ARRAY), LBMSDM_TYPE_ARRAY_BLOB = (LBMSDM_TYPE_BLOB | LBMSDM_TYPE_MODIFIER_ARRAY)
}
 SDM field type definitions. More...
 
enum  {
  LBMSDM_SUCCESS = 0, LBMSDM_FAILURE = -1, LBMSDM_FIELD_IS_NULL = 1, LBMSDM_NO_MORE_FIELDS = 2,
  LBMSDM_INSUFFICIENT_BUFFER_LENGTH = 3
}
 SDM API function return codes. More...
 
enum  {
  LBMSDM_ERR_EINVAL = 1, LBMSDM_ERR_ENOMEM, LBMSDM_ERR_NAMETOOLONG, LBMSDM_ERR_DUPLICATE_FIELD,
  LBMSDM_ERR_BAD_TYPE, LBMSDM_ERR_FIELD_NOT_FOUND, LBMSDM_ERR_MSG_INVALID, LBMSDM_ERR_CANNOT_CONVERT,
  LBMSDM_ERR_NOT_ARRAY, LBMSDM_ERR_NOT_SCALAR, LBMSDM_ERR_ELEMENT_NOT_FOUND, LBMSDM_ERR_TYPE_NOT_SUPPORTED,
  LBMSDM_ERR_TYPE_MISMATCH, LBMSDM_ERR_UNICODE_CONVERSION, LBMSDM_ERR_FIELD_IS_NULL, LBMSDM_ERR_ADDING_FIELD,
  LBMSDM_ERR_ITERATOR_INVALID, LBMSDM_ERR_DELETING_FIELD, LBMSDM_ERR_INVALID_FIELD_NAME
}
 SDM error codes. More...
 

Functions

LBMSDMExpDLL int lbmsdm_errnum (void)
 Return the error number last encountered by this thread. More...
 
LBMSDMExpDLL const char * lbmsdm_errmsg (void)
 Return an ASCII string containing the error message last encountered by this thread. More...
 
LBMSDMExpDLL int lbmsdm_win32_static_init (void)
 Perform required initialization under Windows. This function needs to be called before any other LBM SDM API function, but only when using the static version of the LBM SDM library on Windows. More...
 
LBMSDMExpDLL int lbmsdm_msg_create (lbmsdm_msg_t **Message)
 Create an SDM message to be filled in and sent. More...
 
LBMSDMExpDLL int lbmsdm_msg_create_ex (lbmsdm_msg_t **Message, const lbmsdm_msg_attr_t *Attributes)
 Create an SDM message to be filled in and sent, with options. More...
 
LBMSDMExpDLL int lbmsdm_msg_parse (lbmsdm_msg_t **Message, const char *Data, size_t Length)
 Create an SDM message to be parsed and processed from an existing buffer. More...
 
LBMSDMExpDLL int lbmsdm_msg_parse_ex (lbmsdm_msg_t **Message, const char *Data, size_t Length, const lbmsdm_msg_attr_t *Attributes)
 Create an SDM message to be parsed and processed from an existing buffer, with options. More...
 
LBMSDMExpDLL int lbmsdm_msg_parse_reuse (lbmsdm_msg_t *Message, const char *Data, size_t Length)
 Create an SDM message to be parsed and processed from an existing buffer, using an already-existing lbmsdm_msg_t structure. More...
 
LBMSDMExpDLL int lbmsdm_msg_clone (lbmsdm_msg_t **Message, const lbmsdm_msg_t *Original)
 Clone an existing SDM message. This function is not thread safe. More...
 
LBMSDMExpDLL int lbmsdm_msg_clear (lbmsdm_msg_t *Message)
 Clear an SDM message, deleting all fields in the message. More...
 
LBMSDMExpDLL int lbmsdm_msg_destroy (lbmsdm_msg_t *Message)
 Destroy an SDM message object. More...
 
LBMSDMExpDLL int lbmsdm_msg_dump (lbmsdm_msg_t *Message, char *Buffer, size_t Size)
 Dump a message into a printable string. More...
 
LBMSDMExpDLL int lbmsdm_msg_add_boolean (lbmsdm_msg_t *Message, const char *Name, uint8_t Value)
 Add a field to a message. More...
 
LBMSDMExpDLL int lbmsdm_msg_add_int8 (lbmsdm_msg_t *Message, const char *Name, int8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint8 (lbmsdm_msg_t *Message, const char *Name, uint8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_int16 (lbmsdm_msg_t *Message, const char *Name, int16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint16 (lbmsdm_msg_t *Message, const char *Name, uint16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_int32 (lbmsdm_msg_t *Message, const char *Name, int32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint32 (lbmsdm_msg_t *Message, const char *Name, uint32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_int64 (lbmsdm_msg_t *Message, const char *Name, int64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint64 (lbmsdm_msg_t *Message, const char *Name, uint64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_float (lbmsdm_msg_t *Message, const char *Name, float Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_double (lbmsdm_msg_t *Message, const char *Name, double Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_decimal (lbmsdm_msg_t *Message, const char *Name, const lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_timestamp (lbmsdm_msg_t *Message, const char *Name, const struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_message (lbmsdm_msg_t *Message, const char *Name, const lbmsdm_msg_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_string (lbmsdm_msg_t *Message, const char *Name, const char *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_unicode (lbmsdm_msg_t *Message, const char *Name, const wchar_t *Value, size_t Length)
 Add a unicode field to a message. More...
 
LBMSDMExpDLL int lbmsdm_msg_add_blob (lbmsdm_msg_t *Message, const char *Name, const void *Value, size_t Length)
 Add a BLOB field to a message. More...
 
LBMSDMExpDLL int lbmsdm_msg_add_boolean_array (lbmsdm_msg_t *Message, const char *Name)
 Add an array field to a message. More...
 
LBMSDMExpDLL int lbmsdm_msg_add_int8_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint8_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_int16_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint16_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_int32_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint32_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_int64_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint64_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_float_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_double_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_decimal_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_timestamp_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_message_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_string_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_unicode_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_blob_array (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_add_boolean_elem_idx (lbmsdm_msg_t *Message, size_t Index, uint8_t Value)
 Set the value of an array field element in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_add_int8_elem_idx (lbmsdm_msg_t *Message, size_t Index, int8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint8_elem_idx (lbmsdm_msg_t *Message, size_t Index, uint8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_int16_elem_idx (lbmsdm_msg_t *Message, size_t Index, int16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint16_elem_idx (lbmsdm_msg_t *Message, size_t Index, uint16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_int32_elem_idx (lbmsdm_msg_t *Message, size_t Index, int32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint32_elem_idx (lbmsdm_msg_t *Message, size_t Index, uint32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_int64_elem_idx (lbmsdm_msg_t *Message, size_t Index, int64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint64_elem_idx (lbmsdm_msg_t *Message, size_t Index, uint64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_float_elem_idx (lbmsdm_msg_t *Message, size_t Index, float Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_double_elem_idx (lbmsdm_msg_t *Message, size_t Index, double Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_decimal_elem_idx (lbmsdm_msg_t *Message, size_t Index, const lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_timestamp_elem_idx (lbmsdm_msg_t *Message, size_t Index, const struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_message_elem_idx (lbmsdm_msg_t *Message, size_t Index, const lbmsdm_msg_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_string_elem_idx (lbmsdm_msg_t *Message, size_t Index, const char *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_unicode_elem_idx (lbmsdm_msg_t *Message, size_t Index, const wchar_t *Value, size_t Length)
 Set the value of a unicode array field element in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_add_blob_elem_idx (lbmsdm_msg_t *Message, size_t Index, const void *Value, size_t Length)
 Set the value of a blob array field element in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_add_boolean_elem_name (lbmsdm_msg_t *Message, const char *Name, uint8_t Value)
 Add an array field element in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_add_int8_elem_name (lbmsdm_msg_t *Message, const char *Name, int8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint8_elem_name (lbmsdm_msg_t *Message, const char *Name, uint8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_int16_elem_name (lbmsdm_msg_t *Message, const char *Name, int16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint16_elem_name (lbmsdm_msg_t *Message, const char *Name, uint16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_int32_elem_name (lbmsdm_msg_t *Message, const char *Name, int32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint32_elem_name (lbmsdm_msg_t *Message, const char *Name, uint32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_int64_elem_name (lbmsdm_msg_t *Message, const char *Name, int64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_uint64_elem_name (lbmsdm_msg_t *Message, const char *Name, uint64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_float_elem_name (lbmsdm_msg_t *Message, const char *Name, float Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_double_elem_name (lbmsdm_msg_t *Message, const char *Name, double Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_decimal_elem_name (lbmsdm_msg_t *Message, const char *Name, const lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_timestamp_elem_name (lbmsdm_msg_t *Message, const char *Name, const struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_message_elem_name (lbmsdm_msg_t *Message, const char *Name, const lbmsdm_msg_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_string_elem_name (lbmsdm_msg_t *Message, const char *Name, const char *Value)
 
LBMSDMExpDLL int lbmsdm_msg_add_unicode_elem_name (lbmsdm_msg_t *Message, const char *Name, const wchar_t *Value, size_t Length)
 Add a unicode array field element in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_add_blob_elem_name (lbmsdm_msg_t *Message, const char *Name, const void *Value, size_t Length)
 Add a BLOB array field element in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_iter_add_boolean_elem (lbmsdm_iter_t *Iterator, uint8_t Value)
 Add an array field element in a message referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_add_int8_elem (lbmsdm_iter_t *Iterator, int8_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_uint8_elem (lbmsdm_iter_t *Iterator, uint8_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_int16_elem (lbmsdm_iter_t *Iterator, int16_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_uint16_elem (lbmsdm_iter_t *Iterator, uint16_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_int32_elem (lbmsdm_iter_t *Iterator, int32_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_uint32_elem (lbmsdm_iter_t *Iterator, uint32_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_int64_elem (lbmsdm_iter_t *Iterator, int64_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_uint64_elem (lbmsdm_iter_t *Iterator, uint64_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_float_elem (lbmsdm_iter_t *Iterator, float Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_double_elem (lbmsdm_iter_t *Iterator, double Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_decimal_elem (lbmsdm_iter_t *Iterator, const lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_timestamp_elem (lbmsdm_iter_t *Iterator, const struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_message_elem (lbmsdm_iter_t *Iterator, const lbmsdm_msg_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_string_elem (lbmsdm_iter_t *Iterator, const char *Value)
 
LBMSDMExpDLL int lbmsdm_iter_add_unicode_elem (lbmsdm_iter_t *Iterator, const wchar_t *Value, size_t Length)
 Add a unicode array field element in a message referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_add_blob_elem (lbmsdm_iter_t *Iterator, const void *Value, size_t Length)
 Add a BLOB array field element in a message referenced by an iterator. More...
 
LBMSDMExpDLL const char * lbmsdm_msg_get_data (lbmsdm_msg_t *Message)
 Get the data buffer for a constructed message, after all fields have been added to the message. More...
 
LBMSDMExpDLL size_t lbmsdm_msg_get_datalen (lbmsdm_msg_t *Message)
 Get the length of the data buffer for a constructed message, after all fields have been added to the message. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_fldcnt (lbmsdm_msg_t *Message)
 Get the number of fields in a message. More...
 
LBMSDMExpDLL int lbmsdm_iter_create (lbmsdm_iter_t **Iterator, lbmsdm_msg_t *Message)
 Create an SDM message iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_destroy (lbmsdm_iter_t *Iterator)
 Destroy an SDM message iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_first (lbmsdm_iter_t *Iterator)
 Position an iterator to the first field in the message. More...
 
LBMSDMExpDLL int lbmsdm_iter_next (lbmsdm_iter_t *Iterator)
 Position an iterator to the next field in the message. More...
 
LBMSDMExpDLL const char * lbmsdm_msg_get_name_idx (lbmsdm_msg_t *Message, size_t Index)
 Get the name of a field in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_idx_name (lbmsdm_msg_t *Message, const char *Name)
 Get the index of a field in a message by field name. More...
 
LBMSDMExpDLL const char * lbmsdm_iter_get_name (lbmsdm_iter_t *Iterator)
 Get the name of the current field for an iterator. More...
 
LBMSDMExpDLL lbmsdm_field_type_t lbmsdm_msg_get_type_name (lbmsdm_msg_t *Message, const char *Name)
 Get the type of a field in a message by field name. More...
 
LBMSDMExpDLL lbmsdm_field_type_t lbmsdm_msg_get_type_idx (lbmsdm_msg_t *Message, size_t Index)
 Get the type of a field in a message by field index. More...
 
LBMSDMExpDLL lbmsdm_field_type_t lbmsdm_iter_get_type (lbmsdm_iter_t *Iterator)
 Get the type of the current field for an iterator. More...
 
LBMSDMExpDLL int lbmsdm_msg_is_null_name (lbmsdm_msg_t *Message, const char *Name)
 Determine if a field in a message is null, by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_is_null_idx (lbmsdm_msg_t *Message, size_t Index)
 Determine if a field in a message is null, by field index. More...
 
LBMSDMExpDLL int lbmsdm_iter_is_null (lbmsdm_iter_t *Iterator)
 Determine if the field referenced by an iterator is null. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_elemcnt_name (lbmsdm_msg_t *Message, const char *Name)
 Get the number of elements in an array field in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_elemcnt_idx (lbmsdm_msg_t *Message, size_t Index)
 Get the number of elements in an array field by field index. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_elemcnt (lbmsdm_iter_t *Iterator)
 Get the number of elements in the current array field for an iterator. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_len_name (lbmsdm_msg_t *Message, const char *Name)
 Get the length (in bytes) required for a field in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_len_idx (lbmsdm_msg_t *Message, size_t Index)
 Get the length (in bytes) required for a field in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_len (lbmsdm_iter_t *Iterator)
 Get the length (in bytes) required for the current field for an iterator. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_elemlen_name (lbmsdm_msg_t *Message, const char *Name, size_t Element)
 Get the length (in bytes) required for an array field element in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_elemlen_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element)
 Get the length (in bytes) required for an array field element in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_elemlen (lbmsdm_iter_t *Iterator, size_t Element)
 Get the length (in bytes) required for an element of the current array field for an iterator. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_boolean_idx (lbmsdm_msg_t *Message, size_t Index, uint8_t *Value)
 Fetch a field value from a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_int8_idx (lbmsdm_msg_t *Message, size_t Index, int8_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint8_idx (lbmsdm_msg_t *Message, size_t Index, uint8_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int16_idx (lbmsdm_msg_t *Message, size_t Index, int16_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint16_idx (lbmsdm_msg_t *Message, size_t Index, uint16_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int32_idx (lbmsdm_msg_t *Message, size_t Index, int32_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint32_idx (lbmsdm_msg_t *Message, size_t Index, uint32_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int64_idx (lbmsdm_msg_t *Message, size_t Index, int64_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint64_idx (lbmsdm_msg_t *Message, size_t Index, uint64_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_float_idx (lbmsdm_msg_t *Message, size_t Index, float *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_double_idx (lbmsdm_msg_t *Message, size_t Index, double *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_decimal_idx (lbmsdm_msg_t *Message, size_t Index, lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_timestamp_idx (lbmsdm_msg_t *Message, size_t Index, struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_message_idx (lbmsdm_msg_t *Message, size_t Index, lbmsdm_msg_t **Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_string_idx (lbmsdm_msg_t *Message, size_t Index, char *Value, size_t *Size)
 Fetch a string field value from a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_unicode_idx (lbmsdm_msg_t *Message, size_t Index, wchar_t *Value, size_t *Size)
 Fetch a unicode field value from a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_blob_idx (lbmsdm_msg_t *Message, size_t Index, void *Value, size_t *Size)
 Fetch a BLOB field value from a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_boolean_name (lbmsdm_msg_t *Message, const char *Name, uint8_t *Value)
 Fetch a field value from a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_int8_name (lbmsdm_msg_t *Message, const char *Name, int8_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint8_name (lbmsdm_msg_t *Message, const char *Name, uint8_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int16_name (lbmsdm_msg_t *Message, const char *Name, int16_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint16_name (lbmsdm_msg_t *Message, const char *Name, uint16_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int32_name (lbmsdm_msg_t *Message, const char *Name, int32_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint32_name (lbmsdm_msg_t *Message, const char *Name, uint32_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int64_name (lbmsdm_msg_t *Message, const char *Name, int64_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint64_name (lbmsdm_msg_t *Message, const char *Name, uint64_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_float_name (lbmsdm_msg_t *Message, const char *Name, float *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_double_name (lbmsdm_msg_t *Message, const char *Name, double *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_decimal_name (lbmsdm_msg_t *Message, const char *Name, lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_timestamp_name (lbmsdm_msg_t *Message, const char *Name, struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_message_name (lbmsdm_msg_t *Message, const char *Name, lbmsdm_msg_t **Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_string_name (lbmsdm_msg_t *Message, const char *Name, char *Value, size_t *Size)
 Fetch a string field value from a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_unicode_name (lbmsdm_msg_t *Message, const char *Name, wchar_t *Value, size_t *Size)
 Fetch a unicode field value from a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_blob_name (lbmsdm_msg_t *Message, const char *Name, void *Value, size_t *Size)
 Fetch a BLOB field value from a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_boolean (lbmsdm_iter_t *Iterator, uint8_t *Value)
 Fetch a field value from the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_int8 (lbmsdm_iter_t *Iterator, int8_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_uint8 (lbmsdm_iter_t *Iterator, uint8_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_int16 (lbmsdm_iter_t *Iterator, int16_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_uint16 (lbmsdm_iter_t *Iterator, uint16_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_int32 (lbmsdm_iter_t *Iterator, int32_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_uint32 (lbmsdm_iter_t *Iterator, uint32_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_int64 (lbmsdm_iter_t *Iterator, int64_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_uint64 (lbmsdm_iter_t *Iterator, uint64_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_float (lbmsdm_iter_t *Iterator, float *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_double (lbmsdm_iter_t *Iterator, double *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_decimal (lbmsdm_iter_t *Iterator, lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_timestamp (lbmsdm_iter_t *Iterator, struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_message (lbmsdm_iter_t *Iterator, lbmsdm_msg_t **Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_string (lbmsdm_iter_t *Iterator, char *Value, size_t *Size)
 Fetch a string field value from the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_unicode (lbmsdm_iter_t *Iterator, wchar_t *Value, size_t *Size)
 Fetch a unicode field value from the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_blob (lbmsdm_iter_t *Iterator, void *Value, size_t *Size)
 Fetch a BLOB field value from the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_boolean_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, uint8_t *Value)
 Fetch an array field element value from a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_int8_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, int8_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint8_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, uint8_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int16_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, int16_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint16_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, uint16_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int32_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, int32_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint32_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, uint32_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int64_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, int64_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint64_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, uint64_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_float_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, float *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_double_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, double *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_decimal_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_timestamp_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_message_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, lbmsdm_msg_t **Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_string_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, char *Value, size_t *Size)
 Fetch a string array field element value from a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_unicode_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, wchar_t *Value, size_t *Size)
 Fetch a unicode array field element value from a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_blob_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, void *Value, size_t *Size)
 Fetch a BLOB array field element value from a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_boolean_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, uint8_t *Value)
 Fetch an array field element value from a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_int8_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, int8_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint8_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, uint8_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int16_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, int16_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint16_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, uint16_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int32_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, int32_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint32_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, uint32_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_int64_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, int64_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_uint64_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, uint64_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_float_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, float *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_double_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, double *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_decimal_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_timestamp_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_message_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, lbmsdm_msg_t **Value)
 
LBMSDMExpDLL int lbmsdm_msg_get_string_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, char *Value, size_t *Size)
 Fetch a string array field element value from a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_unicode_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, wchar_t *Value, size_t *Size)
 Fetch a unicode array field element value from a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_get_blob_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, void *Value, size_t *Size)
 Fetch a BLOB array field element value from a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_boolean_elem (lbmsdm_iter_t *Iterator, size_t Element, uint8_t *Value)
 Fetch an array field element value from the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_int8_elem (lbmsdm_iter_t *Iterator, size_t Element, int8_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_uint8_elem (lbmsdm_iter_t *Iterator, size_t Element, uint8_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_int16_elem (lbmsdm_iter_t *Iterator, size_t Element, int16_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_uint16_elem (lbmsdm_iter_t *Iterator, size_t Element, uint16_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_int32_elem (lbmsdm_iter_t *Iterator, size_t Element, int32_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_uint32_elem (lbmsdm_iter_t *Iterator, size_t Element, uint32_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_int64_elem (lbmsdm_iter_t *Iterator, size_t Element, int64_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_uint64_elem (lbmsdm_iter_t *Iterator, size_t Element, uint64_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_float_elem (lbmsdm_iter_t *Iterator, size_t Element, float *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_double_elem (lbmsdm_iter_t *Iterator, size_t Element, double *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_decimal_elem (lbmsdm_iter_t *Iterator, size_t Element, lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_timestamp_elem (lbmsdm_iter_t *Iterator, size_t Element, struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_message_elem (lbmsdm_iter_t *Iterator, size_t Element, lbmsdm_msg_t **Value)
 
LBMSDMExpDLL int lbmsdm_iter_get_string_elem (lbmsdm_iter_t *Iterator, size_t Element, char *Value, size_t *Size)
 Fetch a string array field element value from the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_unicode_elem (lbmsdm_iter_t *Iterator, size_t Element, wchar_t *Value, size_t *Size)
 Fetch a unicode array field element value from the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_get_blob_elem (lbmsdm_iter_t *Iterator, size_t Element, void *Value, size_t *Size)
 Fetch a blob array field element value from the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_null_name (lbmsdm_msg_t *Message, const char *Name)
 Set a field in a message to null, by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_null_idx (lbmsdm_msg_t *Message, size_t Index)
 Set a field in a message to null, by field index. More...
 
LBMSDMExpDLL int lbmsdm_iter_set_null (lbmsdm_iter_t *Iterator)
 Set the field referenced by an iterator to null. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_boolean_idx (lbmsdm_msg_t *Message, size_t Index, uint8_t Value)
 Set a field value in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_int8_idx (lbmsdm_msg_t *Message, size_t Index, int8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint8_idx (lbmsdm_msg_t *Message, size_t Index, uint8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int16_idx (lbmsdm_msg_t *Message, size_t Index, int16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint16_idx (lbmsdm_msg_t *Message, size_t Index, uint16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int32_idx (lbmsdm_msg_t *Message, size_t Index, int32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint32_idx (lbmsdm_msg_t *Message, size_t Index, uint32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int64_idx (lbmsdm_msg_t *Message, size_t Index, int64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint64_idx (lbmsdm_msg_t *Message, size_t Index, uint64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_float_idx (lbmsdm_msg_t *Message, size_t Index, float Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_double_idx (lbmsdm_msg_t *Message, size_t Index, double Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_decimal_idx (lbmsdm_msg_t *Message, size_t Index, const lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_timestamp_idx (lbmsdm_msg_t *Message, size_t Index, const struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_message_idx (lbmsdm_msg_t *Message, size_t Index, const lbmsdm_msg_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_string_idx (lbmsdm_msg_t *Message, size_t Index, const char *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_unicode_idx (lbmsdm_msg_t *Message, size_t Index, const wchar_t *Value, size_t Length)
 Set a unicode field value in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_blob_idx (lbmsdm_msg_t *Message, size_t Index, const void *Value, size_t Length)
 Set a BLOB field value in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_boolean_name (lbmsdm_msg_t *Message, const char *Name, uint8_t Value)
 Set a field value in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_int8_name (lbmsdm_msg_t *Message, const char *Name, int8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint8_name (lbmsdm_msg_t *Message, const char *Name, uint8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int16_name (lbmsdm_msg_t *Message, const char *Name, int16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint16_name (lbmsdm_msg_t *Message, const char *Name, uint16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int32_name (lbmsdm_msg_t *Message, const char *Name, int32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint32_name (lbmsdm_msg_t *Message, const char *Name, uint32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int64_name (lbmsdm_msg_t *Message, const char *Name, int64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint64_name (lbmsdm_msg_t *Message, const char *Name, uint64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_float_name (lbmsdm_msg_t *Message, const char *Name, float Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_double_name (lbmsdm_msg_t *Message, const char *Name, double Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_decimal_name (lbmsdm_msg_t *Message, const char *Name, const lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_timestamp_name (lbmsdm_msg_t *Message, const char *Name, const struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_message_name (lbmsdm_msg_t *Message, const char *Name, const lbmsdm_msg_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_string_name (lbmsdm_msg_t *Message, const char *Name, const char *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_unicode_name (lbmsdm_msg_t *Message, const char *Name, const wchar_t *Value, size_t Length)
 Set a unicode field value in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_blob_name (lbmsdm_msg_t *Message, const char *Name, const void *Value, size_t Length)
 Set a BLOB field value in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_iter_set_boolean (lbmsdm_iter_t *Iterator, uint8_t Value)
 Set a field value in the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_set_int8 (lbmsdm_iter_t *Iterator, int8_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint8 (lbmsdm_iter_t *Iterator, uint8_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_int16 (lbmsdm_iter_t *Iterator, int16_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint16 (lbmsdm_iter_t *Iterator, uint16_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_int32 (lbmsdm_iter_t *Iterator, int32_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint32 (lbmsdm_iter_t *Iterator, uint32_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_int64 (lbmsdm_iter_t *Iterator, int64_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint64 (lbmsdm_iter_t *Iterator, uint64_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_float (lbmsdm_iter_t *Iterator, float Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_double (lbmsdm_iter_t *Iterator, double Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_decimal (lbmsdm_iter_t *Iterator, const lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_timestamp (lbmsdm_iter_t *Iterator, const struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_message (lbmsdm_iter_t *Iterator, const lbmsdm_msg_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_string (lbmsdm_iter_t *Iterator, const char *Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_unicode (lbmsdm_iter_t *Iterator, const wchar_t *Value, size_t Length)
 Set a unicode field value in the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_set_blob (lbmsdm_iter_t *Iterator, const void *Value, size_t Length)
 Set a BLOB field value in the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_boolean_array_idx (lbmsdm_msg_t *Message, size_t Index)
 Set a field in a message by field index to an array field. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_int8_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint8_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_int16_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint16_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_int32_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint32_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_int64_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint64_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_float_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_double_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_decimal_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_timestamp_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_message_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_string_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_unicode_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_blob_array_idx (lbmsdm_msg_t *Message, size_t Index)
 
LBMSDMExpDLL int lbmsdm_msg_set_boolean_array_name (lbmsdm_msg_t *Message, const char *Name)
 Set a field in a message by field name to an array field. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_int8_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint8_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_int16_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint16_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_int32_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint32_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_int64_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint64_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_float_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_double_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_decimal_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_timestamp_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_message_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_string_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_unicode_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_msg_set_blob_array_name (lbmsdm_msg_t *Message, const char *Name)
 
LBMSDMExpDLL int lbmsdm_iter_set_boolean_array (lbmsdm_iter_t *Iterator)
 Set a field in a message by field name to an array field. More...
 
LBMSDMExpDLL int lbmsdm_iter_set_int8_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint8_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_int16_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint16_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_int32_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint32_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_int64_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint64_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_float_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_double_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_decimal_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_timestamp_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_message_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_string_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_unicode_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_iter_set_blob_array (lbmsdm_iter_t *Iterator)
 
LBMSDMExpDLL int lbmsdm_msg_set_boolean_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, uint8_t Value)
 Set the value of an array field element in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_int8_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, int8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint8_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, uint8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int16_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, int16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint16_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, uint16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int32_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, int32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint32_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, uint32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int64_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, int64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint64_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, uint64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_float_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, float Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_double_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, double Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_decimal_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, const lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_timestamp_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, const struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_message_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, const lbmsdm_msg_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_string_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, const char *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_unicode_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, const wchar_t *Value, size_t Length)
 Set the value of a unicode array field element in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_blob_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element, const void *Value, size_t Length)
 Set the value of a BLOB array field element in a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_boolean_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, uint8_t Value)
 Set the value of an array field element in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_int8_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, int8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint8_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, uint8_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int16_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, int16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint16_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, uint16_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int32_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, int32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint32_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, uint32_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_int64_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, int64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_uint64_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, uint64_t Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_float_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, float Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_double_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, double Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_decimal_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, const lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_timestamp_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, const struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_message_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, const lbmsdm_msg_t *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_string_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, const char *Value)
 
LBMSDMExpDLL int lbmsdm_msg_set_unicode_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, const wchar_t *Value, size_t Length)
 Set the value of a unicode array field element in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_msg_set_blob_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element, const void *Value, size_t Length)
 Set the value of a BLOB array field element in a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_iter_set_boolean_elem (lbmsdm_iter_t *Iterator, size_t Element, uint8_t Value)
 Set the value of an array field element in the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_set_int8_elem (lbmsdm_iter_t *Iterator, size_t Element, int8_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint8_elem (lbmsdm_iter_t *Iterator, size_t Element, uint8_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_int16_elem (lbmsdm_iter_t *Iterator, size_t Element, int16_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint16_elem (lbmsdm_iter_t *Iterator, size_t Element, uint16_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_int32_elem (lbmsdm_iter_t *Iterator, size_t Element, int32_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint32_elem (lbmsdm_iter_t *Iterator, size_t Element, uint32_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_int64_elem (lbmsdm_iter_t *Iterator, size_t Element, int64_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_uint64_elem (lbmsdm_iter_t *Iterator, size_t Element, uint64_t Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_float_elem (lbmsdm_iter_t *Iterator, size_t Element, float Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_double_elem (lbmsdm_iter_t *Iterator, size_t Element, double Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_decimal_elem (lbmsdm_iter_t *Iterator, size_t Element, const lbmsdm_decimal_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_timestamp_elem (lbmsdm_iter_t *Iterator, size_t Element, const struct timeval *Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_message_elem (lbmsdm_iter_t *Iterator, size_t Element, const lbmsdm_msg_t *Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_string_elem (lbmsdm_iter_t *Iterator, size_t Element, const char *Value)
 
LBMSDMExpDLL int lbmsdm_iter_set_unicode_elem (lbmsdm_iter_t *Iterator, size_t Element, const wchar_t *Value, size_t Length)
 Set the value of a unicode array field element in the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_iter_set_blob_elem (lbmsdm_iter_t *Iterator, size_t Element, const void *Value, size_t Length)
 Set the value of a BLOB array field element in the field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_msg_del_idx (lbmsdm_msg_t *Message, size_t Index)
 Delete a field from a message by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_del_name (lbmsdm_msg_t *Message, const char *Name)
 Delete a field from a message by field name. More...
 
LBMSDMExpDLL int lbmsdm_iter_del (lbmsdm_iter_t *Iterator)
 Delete a field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_msg_del_elem_idx (lbmsdm_msg_t *Message, size_t Index, size_t Element)
 Delete an element from an array field by field index. More...
 
LBMSDMExpDLL int lbmsdm_msg_del_elem_name (lbmsdm_msg_t *Message, const char *Name, size_t Element)
 Delete an element from an array field by field name. More...
 
LBMSDMExpDLL int lbmsdm_iter_del_elem (lbmsdm_iter_t *Iterator, size_t Element)
 Delete an element from an array field referenced by an iterator. More...
 
LBMSDMExpDLL int lbmsdm_msg_attr_create (lbmsdm_msg_attr_t **Attributes)
 Create and fill an SDM message attribute object with the default values. More...
 
LBMSDMExpDLL int lbmsdm_msg_attr_delete (lbmsdm_msg_attr_t *Attributes)
 Delete an SDM message attribute object. More...
 
LBMSDMExpDLL int lbmsdm_msg_attr_dup (lbmsdm_msg_attr_t **Attributes, lbmsdm_msg_attr_t *Original)
 Duplicate an SDM message attribute object. More...
 
LBMSDMExpDLL int lbmsdm_msg_attr_setopt (lbmsdm_msg_attr_t *Attributes, const char *Option, void *Value, size_t Length)
 Set an option for the given SDM message attribute object. More...
 
LBMSDMExpDLL int lbmsdm_msg_attr_str_setopt (lbmsdm_msg_attr_t *Attributes, const char *Option, const char *Value)
 Set an option for the given SDM message attribute object using a string. More...
 
LBMSDMExpDLL int lbmsdm_msg_attr_getopt (lbmsdm_msg_attr_t *Attributes, const char *Option, void *Value, size_t *Length)
 Retrieve the value of an option for the given SDM message attribute. More...
 
LBMSDMExpDLL int lbmsdm_msg_attr_str_getopt (lbmsdm_msg_attr_t *Attributes, const char *Option, char *Value, size_t *Length)
 Retrieve the value of an option for the given SDM message attribute as a string. More...
 

Detailed Description

Ultra Messaging (UM) Self-Describing Message (SDM) API.

Author
David K. Ameiss - Informatica Corporation
Version
Id
//UMprod/REL_6_12_1/29West/lbm/src/sdm/lbm/lbmsdm.h#1

The Ultra Messaging (UM) Self-Describing Message (SDM) API Description. Included are types, constants, and functions related to the API. Contents are subject to change.

All of the documentation and software included in this and any other Informatica Corporation Ultra Messaging Releases Copyright (C) Informatica Corporation. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted only as covered by the terms of a valid software license agreement with Informatica Corporation.

Copyright (C) 2007-2019, Informatica Corporation. All Rights Reserved.

THE SOFTWARE IS PROVIDED "AS IS" AND INFORMATICA DISCLAIMS ALL WARRANTIES EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. INFORMATICA DOES NOT WARRANT THAT USE OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE. INFORMATICA SHALL NOT, UNDER ANY CIRCUMSTANCES, BE LIABLE TO LICENSEE FOR LOST PROFITS, CONSEQUENTIAL, INCIDENTAL, SPECIAL OR INDIRECT DAMAGES ARISING OUT OF OR RELATED TO THIS AGREEMENT OR THE TRANSACTIONS CONTEMPLATED HEREUNDER, EVEN IF INFORMATICA HAS BEEN APPRISED OF THE LIKELIHOOD OF SUCH DAMAGES.

The LBM Self-Describing Message (SDM) API provides a framework for applications to create and use messages containing self-describing data (name and type). An SDM message contains one or more fields. Each field consists of:

  • A name, limited to 255 characters in length. Field names are not case-sensitive. So, "price" is the same as "Price" is the same as "PRICE".
  • A type (discussed below).
  • A value (particular to the field type). Each named field may only appear once in a message. If multiple fields of the same name and type are needed, create an array field. A field in a nested message may have the same name as a field in the outer message, though.
Field types
The following field types (and arrays thereof) are supported by SDM:
Description SDM Type C Type
Boolean LBMSDM_TYPE_BOOLEAN uint8_t
8-bit signed integer LBMSDM_TYPE_INT8 int8_t
8-bit unsigned integer LBMSDM_TYPE_UINT8 uint8_t
16-bit signed integer LBMSDM_TYPE_INT16 int16_t
16-bit unsigned integer LBMSDM_TYPE_UINT16 uint16_t
32-bit signed integer LBMSDM_TYPE_INT32 int32_t
32-bit unsigned integer LBMSDM_TYPE_UINT32 uint32_t
64-bit signed integer LBMSDM_TYPE_INT64 int64_t
64-bit unsigned integer LBMSDM_TYPE_UINT64 uint64_t
Single-precision floating point LBMSDM_TYPE_FLOAT float
Double-precision floating point LBMSDM_TYPE_DOUBLE double
String LBMSDM_TYPE_STRING char *
Scaled decimal LBMSDM_TYPE_DECIMAL lbmsdm_decimal_t
Timestamp LBMSDM_TYPE_TIMESTAMP struct timeval
Nested message LBMSDM_TYPE_MESSAGE lbmsdm_msg_t *
Binary large object (BLOB) LBMSDM_TYPE_BLOB void *
Unicode string LBMSDM_TYPE_UNICODE wchar_t *
Note that arrays are homogeneous. All elements of an array must be of the same type. An error is reported if an attempt is made to add an element of one type to an array containing elements of a different type.
Building a message
A message must be created (via lbmsdm_msg_create() or lbmsdm_msg_parse()) before fields can be added.
Once a field exists within a message, it can be referenced in one of three ways:
  • By the name associated with the field.
  • By index. This refers to the sequential position of the field within a message. The first field has index 0, the second has index 1, and so forth.
  • By iterator. See below for more information on iterators.
Adding fields to a message
Scalar (non-array) fields are added to a message via the lbmsdm_msg_add_xxx() API functions, where xxx is the type of the field being added. See the module Add a field to a message for information on these functions.
When adding a field, data of the appropriate type must be supplied. As an example, to add a 32-bit signed integer field named "quantity" to a message:
int32_t quant = 50;
int rc;
rc = lbmsdm_msg_add_int32(msg, "quantity", quant);
Alternatively, literals may be used to specify the value. The above example could also be coded as:
rc = lbmsdm_msg_add_int32(msg, "quantity", 50);
Adding array fields to a message
Array fields are added to a message in two steps. First, the field itself is added via the lbmsdm_msg_add_xxx_array() API functions, where xxx is the type of the field being added. This does not provide a value for the field. See the module Add an array field to a message for information on these functions.
Second, individual elements are added to the array field. This is done via the lbmsdm_msg_add_xxx_elem_idx(), lbmsdm_msg_add_xxx_elem_name(), and lbmsdm_iter_add_xxx_elem() API functions. See the modules Add an element to an array field by field index, Add an element to an array field by field name, and Add an element to an array field referenced by an iterator for detailed information on these functions.
As an example, the following code illustrates how to create a string array field, and add 3 elements to it.
rc = lbmsdm_msg_add_string_array(msg, "string_array");
rc = lbmsdm_msg_add_string_elem_name(msg, "string_array", "String1");
rc = lbmsdm_msg_add_string_elem_name(msg, "string_array", "String2");
rc = lbmsdm_msg_add_string_elem_name(msg, "string_array", "String3");
Serializing the message
Once the SDM message is constructed, it must be serialized for transmission. The API function lbmsdm_msg_get_data() returns a static pointer to a buffer containing the serialized form of the message, suitable for transmission. The length of the serialized data may be obtained via the API function lbmsdm_msg_get_datalen(). For example, a constructed message may be sent by:
rc = lbm_src_send(src, lbmsdm_msg_get_data(msg), lbmsdm_msg_get_length(msg), 0);
The pointer returned by lbmsdm_msg_get_data() is owned by the SDM API, and will automatically be freed when the message is destroyed.
Deserializing a message
When a message is received, it must be deserialized so that individual fields can be accessed. This is done via the lbmsdm_msg_parse() API function:
lbmsdm_msg_t * sdmmsg;
rc = lbmsdm_msg_parse(&sdmmsg, lbmmsg->data, lbmmsg->len);
Disposing of a message
Once an SDM message (created by either the lbmsdm_msg_create() or lbmsdm_msg_parse() API calls) is no longer needed, it must be disposed of to avoid a resource leak. This is done via the lbmsdm_msg_destroy() API call.
Retrieving field information
A number of API functions are available to retrieve information about individual fields.
Fetching fields from a message
When fetching a field from a message, the field may be referenced by name, by index, or via an iterator.
Scalar (non-array) fields may be retrieved via the lbmsdm_msg_get_xxx_name(), lbmsdm_msg_get_xxx_idx(), or lbmsdm_iter_get_xxx() functions, where xxx is the type the field value should be retrieved as. The sections Get scalar field values by field name, Get scalar field values by field index, and Get a scalar field via an iterator contain detailed information on these functions.
Array field elements may be retrieved via the lbmsdm_msg_get_xxx_elem_name(), lbmsdm_msg_get_xxx_elem_idx(), or lbmsdm_iter_get_xxx_elem() functions, where xxx is the type the field element value should be retrieved as. The sections Get an element from an array field by field name, Get an element from an array field by field index, and Get an element from an array field referenced by an iterator contain detailed information on these functions.
Type conversion
A limited form of automatic type conversion is provided. Numeric-based fields are convertable to other numeric-based fields. For example, a field defined as LBMSDM_TYPE_BOOLEAN may be retrieved as an LBMSDM_TYPE_FLOAT. The numeric types are:
  • boolean
  • int8
  • uint8
  • int16
  • uint16
  • int32
  • uint32
  • int64
  • uint64
  • float
  • double
  • decimal
Note that if the value being retrieved cannot be represented in the type it is retrieved as, the result is not defined, but no error is indicated. For example if a uint32 field with the value 300 is retrieved as an int8, the result is not defined.
Non-numeric types may not be converted to other types. The non-numeric types are:
  • string
  • unicode
  • timestamp
  • BLOB
  • message
The above conversion rules apply also when retrieving array elements.
Fetching string, unicode, and BLOB values
When fetching a field or array element value as a string, unicode, or BLOB, the data is copied into a buffer provided by the application. In addition to the buffer, the size of the buffer must be given. The size is specified in bytes for string and BLOB fields, and in wchar_ts for unicode fields. If the size specified is too small for the data, the error code LBMSDM_INSUFFICIENT_BUFFER_LENGTH is returned.
Fetching message fields
When fetching the value of a message field, a copy of the message is created (via lbmsdm_msg_clone()) and returned. It is the application's responsibility to destroy the message (via lbmsdm_msg_destroy()) when it is no longer needed.
Modifying fields in a message
Existing fields in a message may be modified, both in terms of the field type and field value. For scalar (non-array) fields, the lbmsdm_msg_set_xxx_idx(), lbmsdm_msg_set_xxx_name(), and lbmsdm_iter_set_xxx() API functions may be used, where xxx is the type to be assigned to the field. See the sections Set a field value in a message by field index, Set a field value in a message by field name, and Set a field value in a message referenced by an iterator for information on these functions.
For array fields, the lbmsdm_msg_set_xxx_array_idx(), lbmsdm_msg_set_xxx_array_name(), and lbmsdm_iter_set_xxx_array() API functions may be used, where xxx is the type to be assigned to the field. See the sections Set a field value in a message by field index to an array field, Set a field value in a message by field name to an array field, and Set a field value in a message, referenced by an iterator, to an array field. for information on these functions. As when adding an array field to a message, once the field type has been set to an array type, individual elements must be added to the array field.
Individual elements of an array field may be modified via the lbmsdm_msg_set_xxx_elem_idx(), lbmsdm_msg_set_xxx_elem_name(), and lbmsdm_iter_set_xxx_elem() API functions. See the sections Set an array field element value by field index, Set an array field element value by field name, and Set an array field element value for a field referenced by an iterator for information on these functions. Note that arrays must contain homogeneous elements, so the type of an array element may not be changed, and is considered an error.
Deleting fields from a message
A field may be deleted from a message via the lbmsdm_msg_del_idx(), lbmsdm_msg_del_name(), and lbmsdm_iter_del() API calls. Deleting a field will cause any fields following it to be moved down one position, changing the index of those fields and potentially invalidating any iterators for that message.
Deleting elements from an array field
Individual elements may be deleted from an array field via the lbmsdm_msg_del_elem_idx(), lbmsdm_msg_del_elem_name(), and lbmsdm_iter_del_elem() API functions.
Null fields
SDM supports the concept of a null field. A null field is present in the message, but has no value associated with it. Once added to a message, a field may be set to null via the lbmsdm_msg_set_null_idx(), lbmsdm_msg_set_null_name(), or lbmsdm_iter_set_null() API functions. Setting the field (which may be either a scalar or array field) to null removes any values currently associated with the field.
The lbmsdm_msg_is_null_idx(), lbmsdm_msg_is_null_name(), and lbmsdm_iter_is_null() API functions allow an application to determine if a given field is null.
Attempting to retrieve a value or element value from a null field is not allowed, and will return an error.
Iterators
A field iterator allows sequential operation on the fields of a message without requiring the field name or index. An iterator is created via lbmsdm_iter_create(), the first field in a message is located via lbmsdm_iter_first(), and the next field is located via lbmsdm_iter_next(). An iterator should be destroyed when no longer needed, using the lbmsdm_iter_destroy() API call.
Message fields may be queried, fetched, modified, and deleted via an iterator. In each case, the operation applies to the field currently referenced by the iterator.
Error information
All functions return a value to indicate the success of failure of the operation. Most return LBMSDM_SUCCESS to indicate success, or LBMSDM_FAILURE otherwise. Consult the individual function documentation for exceptions.
The function lbmsdm_errnum() can be used to retrieve a detailed error code for the last error encountered, while lbmsdm_errmsg() will return a descriptive error message.
Message Options
The performance of SDM can be tuned through the use of message options. Options are contained within an attributes object (lbmsdm_msg_attr_t), which is created via lbmsdm_msg_attr_create(). When no longer needed, an attributes object can be discarded by calling lbmsdm_msg_attr_delete(). Individual options within an attributes object can be set via lbmsdm_msg_attr_setopt() and lbmsdm_msg_attr_str_setopt(), and can be queried via lbmsdm_msg_attr_getopt() and lbmsdm_msg_attr_str_getopt(). A set of options can be specified at message creation time using lbmsdm_msg_create_ex() and lbmsdm_msg_parse_ex().
The following table lists the supported message options.
Option Data type Allowed values Default Description
field_array_allocation int Any integer >= 0 32

Internally, SDM maintains an array of field entries within a message. This option controls both the number of field entries initially allocated when the message is created, and the increment used when the array must be expanded when a field is added but the array is full.

If it is known that a large number of fields will be added to a message, setting this option to a larger value will result in a slight performance boost, since reallocation of the field array will occur less frequently.

Similarly, if the number of fields to be added is small, setting this option to a smaller value will effect a small savings in memory usage (as well as reducing memory fragmentation).

name_tree int 1 (enable) or 0 (disable) 1

In order to speed up access to fields by name, a tree of field names is maintained for each message. Maintenance of this tree (such as when fields are added or deleted) does incur some overhead.

In situations where fields are only added to a message (and not retrieved), this overhead can be eliminated by setting this option to 0. Be aware, however, that retrieving a field by name from a message for which the name tree is disabled, will degenerate to using a linear search of the field array to locate the named field. This can incur much more overhead than was saved by not using the name tree.

In addition, the use of the name tree allows SDM to detect (and prevent) the attempt to add two fields with the same name. Disabling the name tree also disables this safeguard. Further, any attempts to parse a message with duplicate field names using lbmsdm_msg_parse() or lbmsdm_msg_parse_ex() will fail and return an error.

integer_index int 1 (enable) or 0 (disable) 0

Some optimizations can be done within SDM if it is known that each field name will be the string representation of a non-negative integer. Rather than looking up by name, each field name is used as the index of the field, and name lookups can be faster.

This option requires each field name to be a string representation of a non-negative integer. Any attempts to add a field or parse a message containing a field name which is not the string representation of a non-negative integer, when this option is set, will fail and return an error.

As an example, the following code fragment creates an attributes object, sets options, get the options, creates a message using the attributes object, then destroys the attributes object. For the sake of brevity, error checking has been omitted, as has the code to add fields to the message.
int name_tree;
int alloc_size;
char val_buf[256];
size_t val_len;
name_tree = 0;
lbmsdm_msg_attr_setopt(attr, "name_tree", (void *)&name_tree, sizeof(name_tree));
lbmsdm_msg_attr_str_setopt(attr, "field_array_allocation", "128");
val_len = sizeof(val_buf);
lbmsdm_msg_attr_str_getopt(attr, "name_tree", val_buf, &val_len);
printf("name_tree=%s\n", val_buf);
val_len = sizeof(alloc_size);
lbmsdm_msg_attr_getopt(attr, "field_array_allocation", (void *)&alloc_size, &val_len);
printf("field_array_allocation=%d\n", alloc_size);

Typedef Documentation

Structure to hold a scaled decimal number. A scaled decimal number consists of a mantissa $m$ and an exponent $exp$. It represents the value $m\cdot 10^{exp}$.

The mantissa is represented as a 64-bit signed integer. The exponent is represented as an 8-bit signed integer, and can range from -128 to 127.

Enumeration Type Documentation

anonymous enum

SDM field type definitions.

Enumerator
LBMSDM_TYPE_INVALID 

SDM field type: Type is invalid.

LBMSDM_TYPE_BOOLEAN 

SDM field type: Boolean (non-zero is true, zero is false).

LBMSDM_TYPE_INT8 

SDM field type: 8-bit signed integer.

LBMSDM_TYPE_UINT8 

SDM field type: 8-bit unsigned integer.

LBMSDM_TYPE_INT16 

SDM field type: 16-bit signed integer.

LBMSDM_TYPE_UINT16 

SDM field type: 16-bit unsigned integer.

LBMSDM_TYPE_INT32 

SDM field type: 32-bit signed integer.

LBMSDM_TYPE_UINT32 

SDM field type: 32-bit unsigned integer.

LBMSDM_TYPE_INT64 

SDM field type: 64-bit signed integer.

LBMSDM_TYPE_UINT64 

SDM field type: 64-bit unsigned integer.

LBMSDM_TYPE_FLOAT 

SDM field type: Single-precision floating point.

LBMSDM_TYPE_DOUBLE 

SDM field type: Double-precision floating point.

LBMSDM_TYPE_DECIMAL 

SDM field type: Decimal number.

LBMSDM_TYPE_TIMESTAMP 

SDM field type: Seconds and microseconds since the epoch (UTC).

LBMSDM_TYPE_MESSAGE 

SDM field type: Nested SDM message.

LBMSDM_TYPE_STRING 

SDM field type: Character string (ASCIZ).

LBMSDM_TYPE_UNICODE 

SDM field type: Unicode string.

LBMSDM_TYPE_BLOB 

SDM field type: Binary Large Object (BLOB).

LBMSDM_TYPE_ARRAY_BOOLEAN 

SDM field type: Array of Booleans (non-zero is true, zero is false).

LBMSDM_TYPE_ARRAY_INT8 

SDM field type: Array of 8-bit signed integers.

LBMSDM_TYPE_ARRAY_UINT8 

SDM field type: Array of 8-bit unsigned integers.

LBMSDM_TYPE_ARRAY_INT16 

SDM field type: Array of 16-bit signed integers.

LBMSDM_TYPE_ARRAY_UINT16 

SDM field type: Array of 16-bit unsigned integers.

LBMSDM_TYPE_ARRAY_INT32 

SDM field type: Array of 32-bit signed integers.

LBMSDM_TYPE_ARRAY_UINT32 

SDM field type: Array of 32-bit unsigned integers.

LBMSDM_TYPE_ARRAY_INT64 

SDM field type: Array of 64-bit signed integers.

LBMSDM_TYPE_ARRAY_UINT64 

SDM field type: Array of 64-bit unsigned integers.

LBMSDM_TYPE_ARRAY_FLOAT 

SDM field type: Array of single-precision floating points.

LBMSDM_TYPE_ARRAY_DOUBLE 

SDM field type: Array of double-precision floating points.

LBMSDM_TYPE_ARRAY_DECIMAL 

SDM field type: Array of decimal numbers.

LBMSDM_TYPE_ARRAY_TIMESTAMP 

SDM field type: Array of timestamps (seconds and microseconds since the epoch (UTC)).

LBMSDM_TYPE_ARRAY_MESSAGE 

SDM field type: Array of nested SDM messages.

LBMSDM_TYPE_ARRAY_STRING 

SDM field type: Array of character strings (ASCIZ).

LBMSDM_TYPE_ARRAY_UNICODE 

SDM field type: Array of unicode strings.

LBMSDM_TYPE_ARRAY_BLOB 

SDM field type: Array of Binary Large Objects (BLOB).

anonymous enum

SDM API function return codes.

Enumerator
LBMSDM_SUCCESS 

SDM return code: Operation was successful.

LBMSDM_FAILURE 

SDM return code: Operation failed. See lbmsdm_errnum() or lbmsdm_errmsg() for the reason.

LBMSDM_FIELD_IS_NULL 

SDM return code: Field is null.

LBMSDM_NO_MORE_FIELDS 

SDM return code: No more fields to iterate over.

LBMSDM_INSUFFICIENT_BUFFER_LENGTH 

SDM return code: Insufficient buffer length given.

anonymous enum

SDM error codes.

Enumerator
LBMSDM_ERR_EINVAL 

SDM error code: An invalid argument was passed.

LBMSDM_ERR_ENOMEM 

SDM error code: Operation could not be completed due to memory allocation error.

LBMSDM_ERR_NAMETOOLONG 

SDM error code: Field name is too long.

LBMSDM_ERR_DUPLICATE_FIELD 

SDM error code: The field being added to the message already exists.

LBMSDM_ERR_BAD_TYPE 

SDM error code: Invalid type.

LBMSDM_ERR_FIELD_NOT_FOUND 

SDM error code: The field does not exist in the message.

LBMSDM_ERR_MSG_INVALID 

SDM error code: The message is in an invalid form.

LBMSDM_ERR_CANNOT_CONVERT 

SDM error code: The field can not be converted as requested.

LBMSDM_ERR_NOT_ARRAY 

SDM error code: The field is not an array field.

LBMSDM_ERR_NOT_SCALAR 

SDM error code: The field is not a scalar field.

LBMSDM_ERR_ELEMENT_NOT_FOUND 

SDM error code: The specified array element does not exist.

LBMSDM_ERR_TYPE_NOT_SUPPORTED 

SDM error code: The specified type is not supported.

LBMSDM_ERR_TYPE_MISMATCH 

SDM error code: Type mismatch.

LBMSDM_ERR_UNICODE_CONVERSION 

SDM error code: Unicode conversion error.

LBMSDM_ERR_FIELD_IS_NULL 

SDM error code: Field is null.

LBMSDM_ERR_ADDING_FIELD 

SDM error code: Unable to add field.

LBMSDM_ERR_ITERATOR_INVALID 

SDM error code: Iterator doesn't reference a valid field.

LBMSDM_ERR_DELETING_FIELD 

SDM error code: Error deleting a field.

LBMSDM_ERR_INVALID_FIELD_NAME 

SDM error code: Invalid field name.

Function Documentation

LBMSDMExpDLL const char* lbmsdm_errmsg ( void  )

Return an ASCII string containing the error message last encountered by this thread.

Returns
Pointer to a static char array containing the error message.
LBMSDMExpDLL int lbmsdm_errnum ( void  )

Return the error number last encountered by this thread.

Returns
Integer error number (see LBMSDM_ERROR_*).
LBMSDMExpDLL int lbmsdm_iter_create ( lbmsdm_iter_t **  Iterator,
lbmsdm_msg_t Message 
)

Create an SDM message iterator.

Parameters
IteratorA pointer to a pointer to an SDM iterator object. Will be filled in by this function to point to the newly created lbmsdm_iter_t object.
MessageSDM message on which the iterator is to operate.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_iter_del ( lbmsdm_iter_t Iterator)

Delete a field referenced by an iterator.

Parameters
IteratorThe SDM iterator to use.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_iter_del_elem ( lbmsdm_iter_t Iterator,
size_t  Element 
)

Delete an element from an array field referenced by an iterator.

Parameters
IteratorThe SDM iterator to use.
ElementElement to be deleted.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_iter_destroy ( lbmsdm_iter_t Iterator)

Destroy an SDM message iterator.

Parameters
IteratorThe lbmsdm_iter_t object to destroy.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_iter_first ( lbmsdm_iter_t Iterator)

Position an iterator to the first field in the message.

Parameters
IteratorThe iterator to position.
Return values
LBMSDM_SUCCESSif successful
LBMSDM_NO_MORE_FIELDSif no fields exist in the message
LBMSDM_FAILUREif the operation failed
LBMSDMExpDLL int lbmsdm_iter_get_elemcnt ( lbmsdm_iter_t Iterator)

Get the number of elements in the current array field for an iterator.

Parameters
IteratorThe SDM iterator.
Returns
The number of elements in the array, or -1 if an error occurred.
Note
Calling this function for a non-array field will return 1 for the number of elements.
LBMSDMExpDLL int lbmsdm_iter_get_elemlen ( lbmsdm_iter_t Iterator,
size_t  Element 
)

Get the length (in bytes) required for an element of the current array field for an iterator.

Parameters
IteratorThe SDM iterator.
ElementElement index (zero-based).
Returns
The number of bytes required to store the field, or -1 if an error occurred.
LBMSDMExpDLL int lbmsdm_iter_get_len ( lbmsdm_iter_t Iterator)

Get the length (in bytes) required for the current field for an iterator.

Parameters
IteratorThe SDM iterator.
Returns
The number of bytes required to store the field, or -1 if an error occurred.
Note
Calling this function for an array field will return -1.
See also
lbmsdm_iter_get_field_array_size_index_elem()
LBMSDMExpDLL const char* lbmsdm_iter_get_name ( lbmsdm_iter_t Iterator)

Get the name of the current field for an iterator.

Parameters
IteratorThe SDM iterator.
Returns
The field name, or NULL if an error occurred.
LBMSDMExpDLL lbmsdm_field_type_t lbmsdm_iter_get_type ( lbmsdm_iter_t Iterator)

Get the type of the current field for an iterator.

Parameters
IteratorThe SDM iterator.
Returns
The field type, or LBMSDM_TYPE_INVALID if an error occurred.
LBMSDMExpDLL int lbmsdm_iter_is_null ( lbmsdm_iter_t Iterator)

Determine if the field referenced by an iterator is null.

Parameters
IteratorThe SDM iterator.
Return values
1if the field is null.
0if the field is present and not null.
LBMSDM_FAILUREif an error occurred.
LBMSDMExpDLL int lbmsdm_iter_next ( lbmsdm_iter_t Iterator)

Position an iterator to the next field in the message.

Parameters
IteratorThe iterator to position.
Return values
LBMSDM_SUCCESSif successful
LBMSDM_NO_MORE_FIELDSif no fields exist in the message
LBMSDM_FAILUREif the operation failed
LBMSDMExpDLL int lbmsdm_iter_set_null ( lbmsdm_iter_t Iterator)

Set the field referenced by an iterator to null.

Parameters
IteratorThe SDM iterator.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_attr_create ( lbmsdm_msg_attr_t **  Attributes)

Create and fill an SDM message attribute object with the default values.

The attribute object is allocated and filled in with the default values that are used by lbmsdm_msg_t objects.

Parameters
AttributesPointer to a pointer to an SDM message attribute structure. Will be filled in by this function to point to the newly created lbmsdm_msg_attr_t object.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_attr_delete ( lbmsdm_msg_attr_t Attributes)

Delete an SDM message attribute object.

The attribute object is cleaned up and deleted.

Parameters
AttributesPointer to an SDM message attribute structure as returned by lbmsdm_msg_attr_create or lbmsdm_msg_attr_dup.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_attr_dup ( lbmsdm_msg_attr_t **  Attributes,
lbmsdm_msg_attr_t Original 
)

Duplicate an SDM message attribute object.

A new attribute object is created as a copy of an existing object.

Parameters
AttributesPointer to a pointer to an SDM message attribute structure. Will be filled in by this function to point to the newly created lbmsdm_msg_attr_t object.
OriginalPointer to an SDM message attribute structure as returned by lbmsdm_msg_attr_create or lbmsdm_msg_attr_dup, from which Attributes is initialized.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_attr_getopt ( lbmsdm_msg_attr_t Attributes,
const char *  Option,
void *  Value,
size_t *  Length 
)

Retrieve the value of an option for the given SDM message attribute.

Parameters
AttributesPointer to an SDM message attribute structure.
OptionString containing the option name.
ValuePointer to the option value structure to be filled. The structure of the option value is specific to the option itself.
LengthLength (in bytes) of the Value structure when passed in. Upon return, this is set to the actual size of the filled-in structure.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_attr_setopt ( lbmsdm_msg_attr_t Attributes,
const char *  Option,
void *  Value,
size_t  Length 
)

Set an option for the given SDM message attribute object.

Used before the message is created. NOTE: the attribute object must first be created with lbmsdm_msg_attr_create or lbmsdm_msg_attr_dup.

Parameters
AttributesPointer to an SDM message attribute structure.
OptionString containing the option name.
ValuePointer to the option value structure. The structure of the option value is specific to the option itself.
LengthLength (in bytes) of the Value structure.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_attr_str_getopt ( lbmsdm_msg_attr_t Attributes,
const char *  Option,
char *  Value,
size_t *  Length 
)

Retrieve the value of an option for the given SDM message attribute as a string.

Parameters
AttributesPointer to an SDM message attribute structure.
OptionString containing the option name.
ValuePointer to the string to be filled in.
LengthMaximum length (in bytes) of the Value string when passed in. Upon return, this is set to the size of the formatted string.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_attr_str_setopt ( lbmsdm_msg_attr_t Attributes,
const char *  Option,
const char *  Value 
)

Set an option for the given SDM message attribute object using a string.

Used before the message is created. NOTE: the attribute object must first be created with lbmsdm_msg_attr_create or lbmsdm_msg_attr_dup.

Parameters
AttributesPointer to an SDM message attribute structure.
OptionString containing the option name.
ValueString containing the option value. The format of the string is specific to the option itself.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_clear ( lbmsdm_msg_t Message)

Clear an SDM message, deleting all fields in the message.

Parameters
MessageThe SDM message to clear.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_clone ( lbmsdm_msg_t **  Message,
const lbmsdm_msg_t Original 
)

Clone an existing SDM message. This function is not thread safe.

Parameters
MessageA pointer to a pointer to an SDM message object. Will be filled in by this function to point to the newly created lbmsdm_msg_t object.
OriginalThe SDM message to be cloned.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_create ( lbmsdm_msg_t **  Message)

Create an SDM message to be filled in and sent.

Parameters
MessageA pointer to a pointer to an SDM message object. Will be filled in by this function to point to the newly created lbmsdm_msg_t object.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_create_ex ( lbmsdm_msg_t **  Message,
const lbmsdm_msg_attr_t Attributes 
)

Create an SDM message to be filled in and sent, with options.

Parameters
MessageA pointer to a pointer to an SDM message object. Will be filled in by this function to point to the newly created lbmsdm_msg_t object.
AttributesA pointer to an lbmsdm_msg_attr_t structure used to initialize the message options.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_del_elem_idx ( lbmsdm_msg_t Message,
size_t  Index,
size_t  Element 
)

Delete an element from an array field by field index.

Parameters
MessageThe SDM message containing the field.
IndexField index.
ElementElement to be deleted.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_del_elem_name ( lbmsdm_msg_t Message,
const char *  Name,
size_t  Element 
)

Delete an element from an array field by field name.

Parameters
MessageThe SDM message containing the field.
NameField name.
ElementElement to be deleted.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_del_idx ( lbmsdm_msg_t Message,
size_t  Index 
)

Delete a field from a message by field index.

Parameters
MessageThe SDM message containing the field.
IndexField index.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_del_name ( lbmsdm_msg_t Message,
const char *  Name 
)

Delete a field from a message by field name.

Parameters
MessageThe SDM message containing the field.
NameField name.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_destroy ( lbmsdm_msg_t Message)

Destroy an SDM message object.

Parameters
MessageThe SDM message to destroy.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_dump ( lbmsdm_msg_t Message,
char *  Buffer,
size_t  Size 
)

Dump a message into a printable string.

Parameters
MessageThe SDM message to dump.
BufferBuffer into which to dump the message.
SizeMaximum size of Buffer.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
Note
Buffer will be null-terminated. If Buffer isn't large enough to contain the entire message, it will be truncated to fit the available space. The values for unicode and BLOB fields will not formatted.
LBMSDMExpDLL const char* lbmsdm_msg_get_data ( lbmsdm_msg_t Message)

Get the data buffer for a constructed message, after all fields have been added to the message.

Parameters
MessageThe SDM message.
Returns
A pointer to the data buffer, or NULL if any error occurs.
Note
The pointer returned by lbmsdm_msg_get_data is invalidated when the message is deleted (via lbmsdm_msg_destroy), any field is added to the message, any field is deleted from the message, or any field in the message is changed (either the field value or type). In other words, any time the message is changed, the pointer returned is no longer valid.
LBMSDMExpDLL size_t lbmsdm_msg_get_datalen ( lbmsdm_msg_t Message)

Get the length of the data buffer for a constructed message, after all fields have been added to the message.

Parameters
MessageThe SDM message.
Returns
The length of the data buffer, or 0 if any error occurs.
LBMSDMExpDLL int lbmsdm_msg_get_elemcnt_idx ( lbmsdm_msg_t Message,
size_t  Index 
)

Get the number of elements in an array field by field index.

Parameters
MessageThe SDM message from which the array size is to be fetched.
IndexField index.
Returns
The number of elements in the array, or -1 if an error occurred.
Note
Calling this function for a non-array field will return 1 for the number of elements.
LBMSDMExpDLL int lbmsdm_msg_get_elemcnt_name ( lbmsdm_msg_t Message,
const char *  Name 
)

Get the number of elements in an array field in a message by field name.

Parameters
MessageThe SDM message from which the array size is to be fetched.
NameField name.
Returns
The number of elements in the array, or -1 if an error occurred.
Note
Calling this function for a non-array field will return 1 for the number of elements.
LBMSDMExpDLL int lbmsdm_msg_get_elemlen_idx ( lbmsdm_msg_t Message,
size_t  Index,
size_t  Element 
)

Get the length (in bytes) required for an array field element in a message by field index.

Parameters
MessageThe SDM message containing the field.
IndexField index.
ElementElement index (zero-based).
Returns
The number of bytes required to store the field, or -1 if an error occurred.
LBMSDMExpDLL int lbmsdm_msg_get_elemlen_name ( lbmsdm_msg_t Message,
const char *  Name,
size_t  Element 
)

Get the length (in bytes) required for an array field element in a message by field name.

Parameters
MessageThe SDM message containing the field.
NameField name.
ElementElement index (zero-based).
Returns
The number of bytes required to store the field, or -1 if an error occurred.
LBMSDMExpDLL int lbmsdm_msg_get_fldcnt ( lbmsdm_msg_t Message)

Get the number of fields in a message.

Parameters
MessageThe SDM message.
Returns
The number of fields in the message, or -1 if an error occurs.
Note
Only top-level fields are counted. If a message field exists within the message, the number of fields in the contained message are not counted. Instead, the message field counts as one field. Likewise, array fields contribute only 1 to the field count, not the number of elements in the field.
LBMSDMExpDLL int lbmsdm_msg_get_idx_name ( lbmsdm_msg_t Message,
const char *  Name 
)

Get the index of a field in a message by field name.

Parameters
MessageThe SDM message from which the field name is to be fetched.
NameField name.
Returns
The field index, or -1 if an error occurred.
LBMSDMExpDLL int lbmsdm_msg_get_len_idx ( lbmsdm_msg_t Message,
size_t  Index 
)

Get the length (in bytes) required for a field in a message by field index.

Parameters
MessageThe SDM message containing the field.
IndexField index.
Returns
The number of bytes required to store the field, or -1 if an error occurred.
Note
Calling this function for an array field will return -1.
See also
lbmsdm_msg_get_field_array_size_index_elem()
LBMSDMExpDLL int lbmsdm_msg_get_len_name ( lbmsdm_msg_t Message,
const char *  Name 
)

Get the length (in bytes) required for a field in a message by field name.

Parameters
MessageThe SDM message containing the field.
NameField name.
Returns
The number of bytes required to store the field, or -1 if an error occurred.
Note
Calling this function for an array field will return -1.
See also
lbmsdm_msg_get_field_array_size_name_elem()
LBMSDMExpDLL const char* lbmsdm_msg_get_name_idx ( lbmsdm_msg_t Message,
size_t  Index 
)

Get the name of a field in a message by field index.

Parameters
MessageThe SDM message from which the field name is to be fetched.
IndexField index.
Returns
The field name, or NULL if an error occurred.
LBMSDMExpDLL lbmsdm_field_type_t lbmsdm_msg_get_type_idx ( lbmsdm_msg_t Message,
size_t  Index 
)

Get the type of a field in a message by field index.

Parameters
MessageThe SDM message from which the field type is to be fetched.
IndexField index.
Returns
The field type, or LBMSDM_TYPE_INVALID if an error occurred.
LBMSDMExpDLL lbmsdm_field_type_t lbmsdm_msg_get_type_name ( lbmsdm_msg_t Message,
const char *  Name 
)

Get the type of a field in a message by field name.

Parameters
MessageThe SDM message from which the field type is to be fetched.
NameField name.
Returns
The field type, or LBMSDM_TYPE_INVALID if an error occurred.
LBMSDMExpDLL int lbmsdm_msg_is_null_idx ( lbmsdm_msg_t Message,
size_t  Index 
)

Determine if a field in a message is null, by field index.

Parameters
MessageThe SDM message containing the field.
IndexField index.
Return values
1if the field is null.
0if the field is present and not null.
LBMSDM_FAILUREif an error occurred.
LBMSDMExpDLL int lbmsdm_msg_is_null_name ( lbmsdm_msg_t Message,
const char *  Name 
)

Determine if a field in a message is null, by field name.

Parameters
MessageThe SDM message containing the field.
NameField name.
Return values
1if the field is null.
0if the field is present and not null.
LBMSDM_FAILUREif an error occurred.
LBMSDMExpDLL int lbmsdm_msg_parse ( lbmsdm_msg_t **  Message,
const char *  Data,
size_t  Length 
)

Create an SDM message to be parsed and processed from an existing buffer.

Parameters
MessageA pointer to a pointer to an SDM message object. Will be filled in by this function to point to the newly created lbmsdm_msg_t object.
DataA pointer to the buffer from which the message should be constructed.
LengthLength of Data.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_parse_ex ( lbmsdm_msg_t **  Message,
const char *  Data,
size_t  Length,
const lbmsdm_msg_attr_t Attributes 
)

Create an SDM message to be parsed and processed from an existing buffer, with options.

Parameters
MessageA pointer to a pointer to an SDM message object. Will be filled in by this function to point to the newly created lbmsdm_msg_t object.
DataA pointer to the buffer from which the message should be constructed.
LengthLength of Data.
AttributesA pointer to an lbmsdm_msg_attr_t structure used to initialize the message options.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_parse_reuse ( lbmsdm_msg_t Message,
const char *  Data,
size_t  Length 
)

Create an SDM message to be parsed and processed from an existing buffer, using an already-existing lbmsdm_msg_t structure.

Parameters
MessageA pointer to an existing SDM message object, into which the message buffer is parsed. The message will be cleared before parsing.
DataA pointer to the buffer from which the message should be constructed.
LengthLength of Data.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_set_null_idx ( lbmsdm_msg_t Message,
size_t  Index 
)

Set a field in a message to null, by field index.

Parameters
MessageThe SDM message containing the field.
IndexField index.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_msg_set_null_name ( lbmsdm_msg_t Message,
const char *  Name 
)

Set a field in a message to null, by field name.

Parameters
MessageThe SDM message containing the field.
NameField name.
Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.
LBMSDMExpDLL int lbmsdm_win32_static_init ( void  )

Perform required initialization under Windows. This function needs to be called before any other LBM SDM API function, but only when using the static version of the LBM SDM library on Windows.

Returns
LBMSDM_SUCCESS if successful, LBMSDM_FAILURE otherwise.