Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
Data Structures | |
struct | syncdbClientHandle_t |
syncdb Client Handle. More... | |
struct | syncdbClientStatus_t |
Client Table Status. More... | |
struct | syncdbDataTableStatus_t |
Data Table Status. More... | |
struct | syncdbJsonNode_s |
The JSON node definition. More... | |
Macros | |
#define | SYNCDB_AGENT_MAX_MSG_SIZE 8000 |
Maximum size of the message buffer between the SyncDB process and the SyncDB Agent. More... | |
#define | SYNCDB_DUPNAME (-3) |
Table exists with duplicate name. | |
#define | SYNCDB_ENTRY_EXISTS (-9) |
AVL entry with the specified key already exists. | |
#define | SYNCDB_ERROR (-1) |
General Error. | |
#define | SYNCDB_FULL (-5) |
Specified table is full. | |
#define | SYNCDB_JSON_MAX_SCHEMA_SIZE (SYNCDB_RECORD_MAX_SIZE) |
The schema for storable records is also defined using JSON format. More... | |
#define | SYNCDB_MAX_CLIENTS (-2) |
Reached maximum number of clients. | |
#define | SYNCDB_MAX_STR_LEN 256 |
Maximum length for string fields used by syncdb. More... | |
#define | SYNCDB_NO_TABLE (-4) |
Specified table does not exist. | |
#define | SYNCDB_NOT_FOUND (-7) |
Specified record is not in the table. More... | |
#define | SYNCDB_OK (0) |
Operation is Successful. | |
#define | SYNCDB_RECORD_MAX_SIZE (1024*64) |
Maximum size of a single data record. More... | |
#define | SYNCDB_SCHEMA_ERROR (-8) |
Schema validation error. | |
#define | SYNCDB_SIZE (-6) |
Specified record size is invalid for this table. More... | |
#define | SYNCDB_TABLE_FLAG_EXISTS (1 << 3) |
When this flag is set, the syncdbInsert() function returns an error if an entry with the specified key already exists. More... | |
#define | SYNCDB_TABLE_FLAG_FILE_LOAD (1 << 2) |
If this flag is enabled then the syncdb tries to populate the table from a file when creating the table. More... | |
#define | SYNCDB_TABLE_FLAG_NSF (1 << 4) |
When this flag is set, the content of the table is synchronized with the backup manager. More... | |
#define | SYNCDB_TABLE_FLAG_NVRAM (1 << 1) |
This table is copied to NVRAM when the table-store command is received. More... | |
#define | SYNCDB_TABLE_FLAG_STORABLE (1 << 0) |
This table can be stored in a file. More... | |
#define | SYNCDB_TABLE_NAME_SIZE 32 |
Maximum size of the text string that uniquely identifies a database table. More... | |
#define | SYNCDB_TABLE_STAT_AVL_TREE_PURGED (1 << 2) |
AVL Tree Purged (Cleared on Read) This bit indicates that all delete-pending entries have been removed from the AVL tree since the last call to the syncdbTableStatusGet() function. More... | |
#define | SYNCDB_TABLE_STAT_CHANGED (1 << 1) |
Changes pending for this client. More... | |
#define | SYNCDB_TABLE_STAT_EXISTS (1 << 0) |
Specified Table Exist If this bit is not set to 1 then all other bits are meaningless. | |
#define | SYNCDB_TABLE_STAT_NEW_TABLE (1 << 3) |
New Table (Cleared on Read) This bit indicates that the syncdbTableStatusGet() function is called for the first time since the table has been created. More... | |
#define | SYNCDB_TABLE_TYPE_AVL_TREE 2 |
#define | SYNCDB_TABLE_TYPE_QUEUE 3 |
#define | SYNCDB_TABLE_TYPE_RECORD 0 |
#define | SYNCDB_TABLE_TYPE_STORABLE_RECORD 1 |
Typedefs | |
typedef struct syncdbJsonNode_s | syncdbJsonNode_t |
The JSON node definition. | |
Enumerations | |
enum | syncdbJsonDataType_e { SYNCDB_JSON_NUMBER = 1, SYNCDB_JSON_STRING = 2, SYNCDB_JSON_ARRAY = 3 } |
The syncdb supports the following JSON data types: SYNCDB_JSON_NUMBER - A numeric value. More... | |
enum | syncdbSchemaError_e { SYNCDB_SCHEMA_OK = 0, SYNCDB_SCHEMA_TOO_BIG = 1, SYNCDB_SCHEMA_OVERLAP = 2, SYNCDB_SCHEMA_TOO_SHORT = 3, SYNCDB_SCHEMA_GAP = 4, SYNCDB_SCHEMA_INT_OVERFLOW = 5, SYNCDB_SCHEMA_STRING_OVERFLOW = 6, SYNCDB_SCHEMA_INT_SIZE = 7, SYNCDB_SCHEMA_TYPE = 8, SYNCDB_SCHEMA_NO_ZERO_OFFSET = 9, SYNCDB_SCHEMA_ZERO_SIZE = 10, SYNCDB_SCHEMA_DUP_NAME = 11 } |
The following errors may be reported during schema validation. More... | |
Functions | |
int | syncdbAvlTableCreate (syncdbClientHandle_t *client_id, char *table_name, unsigned int table_version, unsigned int max_elements, unsigned int max_live_elements, unsigned int node_size, unsigned int key_size, unsigned int flags, char *schema, unsigned int schema_size) |
Create AVL Table. More... | |
int | syncdbClientDeregister (syncdbClientHandle_t *client_id) |
Deregister a client from the syncdb. More... | |
int | syncdbClientRegister (char *client_name, syncdbClientHandle_t *client_id) |
Register a new client with the syncdb. More... | |
int | syncdbClientStatusGet (syncdbClientHandle_t *client_id, syncdbClientStatus_t *client_status) |
Get client information for the specified client ID. More... | |
int | syncdbDelete (syncdbClientHandle_t *client_id, char *table_name, void *element, unsigned int size) |
Delete an entry from the AVL table. More... | |
int | syncdbFieldGet (syncdbClientHandle_t *client_id, char *table_name, void *element, unsigned int size, unsigned int field_offset, unsigned int field_size, int flags_unchanged, int *delete_pending) |
Get the specified field in an entry from the table. More... | |
int | syncdbFieldSet (syncdbClientHandle_t *client_id, char *table_name, void *element, unsigned int size, unsigned int field_offset, unsigned int field_size) |
Set the specified field in an entry in the table. More... | |
int | syncdbGet (syncdbClientHandle_t *client_id, char *table_name, void *element, unsigned int size, int *delete_pending) |
Get an entry from the table. More... | |
int | syncdbGetNext (syncdbClientHandle_t *client_id, char *table_name, void *element, unsigned int size, int *delete_pending) |
Get the Next entry from the table. More... | |
int | syncdbGetNextChanged (syncdbClientHandle_t *client_id, char *table_name, void *element, unsigned int size, int *delete_pending) |
Get the Next Changed entry from the table. More... | |
int | syncdbInsert (syncdbClientHandle_t *client_id, char *table_name, void *element, unsigned int size) |
Insert a new entry into the AVL table. More... | |
int | syncdbNsfModeSet (syncdbClientHandle_t *client_id, unsigned int sync_mode, unsigned int max_msg_size) |
Tell SyncDB that it should start or stop data sync with the backup manager. More... | |
int | syncdbRecordTableCreate (syncdbClientHandle_t *client_id, char *table_name, unsigned int table_version, unsigned int node_size, unsigned int flags, char *schema, unsigned int schema_size) |
Create a Record Table. More... | |
int | syncdbSet (syncdbClientHandle_t *client_id, char *table_name, void *element, unsigned int size) |
Set an entry in the table. More... | |
int | syncdbTableChangeCheck (syncdbClientHandle_t *client_id, int timeout_secs) |
Check whether any change notifications are pending for this client. More... | |
int | syncdbTableChangeNotify (syncdbClientHandle_t *client_id, char *table_name) |
Notify this client about changes to the specified table. More... | |
int | syncdbTableDelete (syncdbClientHandle_t *client_id, char *table_name) |
Delete specified table or all tables. More... | |
int | syncdbTableStatusGet (syncdbClientHandle_t *client_id, int num_tables, syncdbDataTableStatus_t *table_list) |
Get Table Status as it pertains to the specified client. More... | |
int | syncdbTableStore (syncdbClientHandle_t *client_id, char *table_name, unsigned int nvram) |
Store specified table or all tables into the file system. More... | |
int | syncdbUtilSchemaCreate (syncdbJsonNode_t *element_node, unsigned int node_schema_size, char *schema_buf, unsigned int buf_size, unsigned int *schema_size, unsigned int data_element_size, syncdbSchemaError_e *schema_error) |
Generate a storable record schema. More... | |
#define SYNCDB_AGENT_MAX_MSG_SIZE 8000 |
Maximum size of the message buffer between the SyncDB process and the SyncDB Agent.
The actual message size may be smaller, and is limited by the transport message size.
Definition at line 49 of file openapi_syncdb.h.
#define SYNCDB_JSON_MAX_SCHEMA_SIZE (SYNCDB_RECORD_MAX_SIZE) |
The schema for storable records is also defined using JSON format.
This compiler constant defines the maximum length of the schema. The constant may be changed to be smaller than the maximum record size, but never bigger.
Definition at line 235 of file openapi_syncdb.h.
#define SYNCDB_MAX_STR_LEN 256 |
Maximum length for string fields used by syncdb.
This includes client names, file names and various descriptions.
Definition at line 60 of file openapi_syncdb.h.
#define SYNCDB_NOT_FOUND (-7) |
Specified record is not in the table.
Definition at line 83 of file openapi_syncdb.h.
#define SYNCDB_RECORD_MAX_SIZE (1024*64) |
Maximum size of a single data record.
In case of AVL trees and Queues this is the maximum size of each AVL or Queue node.
Definition at line 65 of file openapi_syncdb.h.
#define SYNCDB_SIZE (-6) |
Specified record size is invalid for this table.
Definition at line 82 of file openapi_syncdb.h.
#define SYNCDB_TABLE_FLAG_EXISTS (1 << 3) |
When this flag is set, the syncdbInsert() function returns an error if an entry with the specified key already exists.
When this flag is not set the old entry is overwriten with the new content.
Definition at line 155 of file openapi_syncdb.h.
#define SYNCDB_TABLE_FLAG_FILE_LOAD (1 << 2) |
If this flag is enabled then the syncdb tries to populate the table from a file when creating the table.
The flag is allowed only if the SYNCDB_TABLE_FLAG_STORABLE is also set.
Definition at line 148 of file openapi_syncdb.h.
#define SYNCDB_TABLE_FLAG_NSF (1 << 4) |
When this flag is set, the content of the table is synchronized with the backup manager.
On non-stacking platform the flag has no effect. Applications that use SyncDB for the Non Stop Forwarding feature should store the data in the table using the big-endian format.
Definition at line 162 of file openapi_syncdb.h.
#define SYNCDB_TABLE_FLAG_NVRAM (1 << 1) |
This table is copied to NVRAM when the table-store command is received.
The flag is allowed only if the SYNCDB_TABLE_FLAGS_STORABLE is also set.
Definition at line 142 of file openapi_syncdb.h.
#define SYNCDB_TABLE_FLAG_STORABLE (1 << 0) |
This table can be stored in a file.
When this flag is set the table creation function must be given the schema and the schema size.
Definition at line 136 of file openapi_syncdb.h.
#define SYNCDB_TABLE_NAME_SIZE 32 |
Maximum size of the text string that uniquely identifies a database table.
The size includes the 0 terminator. This value must be divisible by 2.
Definition at line 55 of file openapi_syncdb.h.
#define SYNCDB_TABLE_STAT_AVL_TREE_PURGED (1 << 2) |
AVL Tree Purged (Cleared on Read) This bit indicates that all delete-pending entries have been removed from the AVL tree since the last call to the syncdbTableStatusGet() function.
This means that some record delete notifications may have been missed by this client. The client needs to completely resynchronize with the AVL tree if it needs to know the exact content. If the table is not an AVL tree then this bit is always set to 0.
Definition at line 115 of file openapi_syncdb.h.
#define SYNCDB_TABLE_STAT_CHANGED (1 << 1) |
Changes pending for this client.
(Cleared on Read) This bit is set whenever something changes in the table. The bit is cleared when the syncdbTableStatusGet() function is invoked by the client for the table. When a client gets a table change notification, this bit can be used to determine which table has changed. However the client does not need to be registered for change notifications. The bit is set for all clients when the table changes.
Definition at line 104 of file openapi_syncdb.h.
#define SYNCDB_TABLE_STAT_NEW_TABLE (1 << 3) |
New Table (Cleared on Read) This bit indicates that the syncdbTableStatusGet() function is called for the first time since the table has been created.
This flag can be used to detect that a table has been deleted and recreated. Normally applications do not delete tables, even when they are restarted. If a table needs to be deleted then all applications using this table should be restarted.
Definition at line 125 of file openapi_syncdb.h.
enum syncdbJsonDataType_e |
The syncdb supports the following JSON data types: SYNCDB_JSON_NUMBER - A numeric value.
Syncdb supports only unsigned integers. SYNCDB_JSON_STRING - Zero-terminated array of characters. SYNCDB_JSON_ARRAY - Syncdb supports only arrays of bytes. The default value is 0.
SYNCDB Data Type Limitations: The syncdb supports only a subset of JSON data types. The most important limitation is the limited support for arrays. Arrays are difficult to handle during data format migration, so should be avoided when defining storable records. Syncdb does support arrays of bytes. The table creator cannot provide default values for the byte arrays. The default for array content is always zero.
The syncdb supports only unsigned integer values for SYNCDB_JSON_NUMBER type. The supported integer sizes are 1, 2, 4, and 8 bytes. Floating point numbers and exponential notation is not supported. Signed integers are also not supported. If a signed integer is used in the node definition then the data migration may not work properly.
The syncdb also does not support "true", "false", and "null" values. These can be represented with an integer.
Definition at line 260 of file openapi_syncdb.h.
enum syncdbSchemaError_e |
The following errors may be reported during schema validation.
Definition at line 302 of file openapi_syncdb.h.
int syncdbAvlTableCreate | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
unsigned int | table_version, | ||
unsigned int | max_elements, | ||
unsigned int | max_live_elements, | ||
unsigned int | node_size, | ||
unsigned int | key_size, | ||
unsigned int | flags, | ||
char * | schema, | ||
unsigned int | schema_size | ||
) |
Create AVL Table.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for this table. |
[in] | table_version | Version of this table. |
[in] | max_elements | Maximum number of nodes in the AVL tree. |
[in] | max_live_elements | Maximum number of nodes in the AVL tree that are not pending for removal. This value must be greater than 0 and less or equal to max_elements. |
[in] | node_size | User data number of bytes in each table element. The size includes the key field. The maximum node size is: SYNCDB_RECORD_MAX_SIZE |
[in] | key_size | Number of bytes in the key element. The first 'key_size' bytes are treated as the key. The maximum key size is: SYNCDB_RECORD_MAX_SIZE |
[in] | flags | Table Creation Flags SYNCDB_TABLE_FLAG_STORABLE - Schema is present. SYNCDB_TABLE_FLAG_FILE_LOAD - Load the table from file if file exists. SYNCDB_TABLE_FLAG_NVRAM - Copy to NVRAM when storing the table. |
[in] | schema | JSON schema create using the syncdbUtilSchemaCreate(). Must be set to 0 for non-storable tables. Must be non-zero for storable tables. |
[in] | schema_size | JSON schema size returned by the syncdbUtilSchemaCreate(). Must be 0 for non-storable tables. The maximum schema size is: SYNCDB_JSON_MAX_SCHEMA_SIZE |
OpEN API Version: 1.10
int syncdbClientDeregister | ( | syncdbClientHandle_t * | client_id | ) |
Deregister a client from the syncdb.
[in] | client_id | Client ID to deregister. |
OpEN API Version: 1.10
int syncdbClientRegister | ( | char * | client_name, |
syncdbClientHandle_t * | client_id | ||
) |
Register a new client with the syncdb.
[in] | client_name | Descriptive name for this client. |
[out] | client_id | ID used on subsequent transactions. The client_id contains the command socket, the notification socket and unique syncdb client ID. |
OpEN API Version: 1.10
int syncdbClientStatusGet | ( | syncdbClientHandle_t * | client_id, |
syncdbClientStatus_t * | client_status | ||
) |
Get client information for the specified client ID.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in,out] | client_status | Information about this client. |
OpEN API Version: 1.10
int syncdbDelete | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
void * | element, | ||
unsigned int | size | ||
) |
Delete an entry from the AVL table.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for this table. |
[in] | element | Pointer to the data element to be deleted. |
[in] | size | Number of bytes in the element. |
OpEN API Version: 1.10
int syncdbFieldGet | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
void * | element, | ||
unsigned int | size, | ||
unsigned int | field_offset, | ||
unsigned int | field_size, | ||
int | flags_unchanged, | ||
int * | delete_pending | ||
) |
Get the specified field in an entry from the table.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for this table. |
[in,out] | element | Caller must pass a buffer where the data is written. The buffer must be big enough to contain 'size' bytes. |
[in] | size | Number of bytes in the element. |
[in] | field_offset | Start of the field to retrieve from the table. The value represents the number of bytes from the start of the table. |
[in] | field_size | Size of the field to get. |
[in] | flags_unchanged | Do not clear the notification-pending and the delete-pending flags. |
[out] | delete_pending | For AVL Trees this indicates whether the record is pending for deletion. The field is unused for records and queues. |
OpEN API Version: 1.10
int syncdbFieldSet | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
void * | element, | ||
unsigned int | size, | ||
unsigned int | field_offset, | ||
unsigned int | field_size | ||
) |
Set the specified field in an entry in the table.
The remaining fields in the entry are unchanged.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for this table. |
[in] | element | Caller must pass a buffer where the data is located. |
[in] | size | Number of bytes in the element. |
[in] | field_offset | Start of the field to set in the table. The value represents the number of bytes from the start of the element. |
[in] | field_size | Size of the field to set. |
OpEN API Version: 1.10
int syncdbGet | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
void * | element, | ||
unsigned int | size, | ||
int * | delete_pending | ||
) |
Get an entry from the table.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for this table. |
[in,out] | element | Caller must pass a buffer where the data is written. The buffer must be big enough to contain 'size' bytes. |
[in] | size | Number of bytes in the element. |
[out] | delete_pending | For AVL Trees this indicates whether the record is pending for deletion. The field is unused for records and queues. |
OpEN API Version: 1.10
int syncdbGetNext | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
void * | element, | ||
unsigned int | size, | ||
int * | delete_pending | ||
) |
Get the Next entry from the table.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for this table. |
[in,out] | element | Caller must pass a buffer where the data is written. The buffer must be big enough to contain 'size' bytes. |
[in] | size | Number of bytes in the element. |
[out] | delete_pending | For AVL Trees this indicates whether the record is pending for deletion. The field is unused for records and queues. |
OpEN API Version: 1.10
int syncdbGetNextChanged | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
void * | element, | ||
unsigned int | size, | ||
int * | delete_pending | ||
) |
Get the Next Changed entry from the table.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for this table. |
[in,out] | element | Caller must pass a buffer where the data is written. The buffer must be big enough to contain 'size' bytes. |
[in] | size | Number of bytes in the element. |
[out] | delete_pending | For AVL Trees this indicates whether the record is pending for deletion. The field is unused for records and queues. |
OpEN API Version: 1.10
int syncdbInsert | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
void * | element, | ||
unsigned int | size | ||
) |
Insert a new entry into the AVL table.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for this table. |
[in] | element | Pointer to the data element to be inserted. |
[in] | size | Number of bytes in the element. |
OpEN API Version: 1.10
int syncdbNsfModeSet | ( | syncdbClientHandle_t * | client_id, |
unsigned int | sync_mode, | ||
unsigned int | max_msg_size | ||
) |
Tell SyncDB that it should start or stop data sync with the backup manager.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | sync_mode | 1 - Enable Sync. 0 - Disable Sync. |
[in] | max_msg_size | Maximum number of bytes in the sync message. |
OpEN API Version: 1.10
int syncdbRecordTableCreate | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
unsigned int | table_version, | ||
unsigned int | node_size, | ||
unsigned int | flags, | ||
char * | schema, | ||
unsigned int | schema_size | ||
) |
Create a Record Table.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for this table. |
[in] | table_version | Version of this table. |
[in] | node_size | User data number of bytes in the table element. The maximum node size is: SYNCDB_RECORD_MAX_SIZE |
[in] | flags | Table Creation Flags SYNCDB_TABLE_FLAG_STORABLE - Schema is present. SYNCDB_TABLE_FLAG_FILE_LOAD - Load the table from file if file exists. SYNCDB_TABLE_FLAG_NVRAM - Copy to NVRAM when storing the table. |
[in] | schema | JSON schema create using the syncdbUtilSchemaCreate(). Must be set to 0 for non-storable tables. Must be non-zero for storable tables. |
[in] | schema_size | JSON schema size returned by the syncdbUtilSchemaCreate(). Must be 0 for non-storable tables. The maximum schema size is: SYNCDB_JSON_MAX_SCHEMA_SIZE |
OpEN API Version: 1.10
int syncdbSet | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
void * | element, | ||
unsigned int | size | ||
) |
Set an entry in the table.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for this table. |
[in] | element | Pointer to the data buffer to be set in the table. |
[in] | size | Number of bytes in the element. |
OpEN API Version: 1.10
int syncdbTableChangeCheck | ( | syncdbClientHandle_t * | client_id, |
int | timeout_secs | ||
) |
Check whether any change notifications are pending for this client.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | timeout_secs | How many seconds to wait. 0 - Do not wait. Return immediately. < 0 - Wait forever. > 0 - Wait specified number of seconds. |
OpEN API Version: 1.10
int syncdbTableChangeNotify | ( | syncdbClientHandle_t * | client_id, |
char * | table_name | ||
) |
Notify this client about changes to the specified table.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Unique name for the table. |
OpEN API Version: 1.10
int syncdbTableDelete | ( | syncdbClientHandle_t * | client_id, |
char * | table_name | ||
) |
Delete specified table or all tables.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Name of the table to be deleted. |
OpEN API Version: 1.10
int syncdbTableStatusGet | ( | syncdbClientHandle_t * | client_id, |
int | num_tables, | ||
syncdbDataTableStatus_t * | table_list | ||
) |
Get Table Status as it pertains to the specified client.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | num_tables | Number of tables in the list. |
[in,out] | table_list | List of tables. |
OpEN API Version: 1.10
int syncdbTableStore | ( | syncdbClientHandle_t * | client_id, |
char * | table_name, | ||
unsigned int | nvram | ||
) |
Store specified table or all tables into the file system.
[in] | client_id | Handle returned by syncdbClientRegister() |
[in] | table_name | Name of the table to be written to the file. NULL - Store all tables to the file system. |
[in] | nvram | Non-Zero - Save tables in NVRAM. 0 - Save tables only in the RAM disk. |
OpEN API Version: 1.10
int syncdbUtilSchemaCreate | ( | syncdbJsonNode_t * | element_node, |
unsigned int | node_schema_size, | ||
char * | schema_buf, | ||
unsigned int | buf_size, | ||
unsigned int * | schema_size, | ||
unsigned int | data_element_size, | ||
syncdbSchemaError_e * | schema_error | ||
) |
Generate a storable record schema.
[in] | element_node | Element descriptor nodes. |
[in] | node_schema_size | Size of the element node array. |
[in] | schema_buf | Buffer in which the JSON schema is returned. The caller must allocate space for this buffer. |
[in] | buf_size | Number of bytes in the schema_buf. The maximum buffer size is: SYNCDB_JSON_MAX_SCHEMA_SIZE |
[out] | schema_size | Actual schema length. |
[in] | data_element_size | Data record size. Used for error checking. |
[out] | schema_error | Detailed schema error code. |
OpEN API Version: 1.10