Stratify Object Notation

Detailed Description

Data Structures

struct  son_stack_t
 
struct  son_t
 

Modules

 Editing Values
 
 File Handling (Create/Append/Open/Close)
 
 Messaging
 
 Reading Values
 
 Writing/Appending Values to Files
 

Macros

#define SON_KEY_NAME_SIZE   (15)
 Defines the maximum length of any given key value. Values that exceed this length will be truncated.
 

Typedefs

typedef u32 son_size_t
 SON Size Type.
 

Enumerations

Enumeration Type Documentation

enum son_err_t

These are the values returned by son_get_error(). The value is set when a son_* function does not complete successfully.

Enumerator
SON_ERR_NONE 

0: This value indicates no error has occurred.

SON_ERR_NO_ROOT 

1: This error happens when a top level object or array is not created.

SON_ERR_OPEN_IO 

2: This error happens if there is an IO failure to create or open a file (run perror() for more info).

SON_ERR_READ_IO 

3: This error happens when an IO read operation fails (run perror() for more info).

SON_ERR_WRITE_IO 

4: This error happens when an IO write operation fails (run perror() for more info).

SON_ERR_CLOSE_IO 

5: This error happens when an IO close operation fails (run perror() for more info).

SON_ERR_SEEK_IO 

6: This error happens when an IO seek operation fails (run perror() for more info).

SON_ERR_READ_CHECKSUM 

7: This error happens when the data in the file has a invalid checksum which indicates a corrupted file or bad file format.

SON_ERR_CANNOT_APPEND 

8: This error happens when an append is attempted on a file that has not been opened for appending

SON_ERR_CANNOT_WRITE 

9: This error happens if a write is attempted on a file that has been opened for reading

SON_ERR_CANNOT_READ 

10: This error happens if a read is attempted on a file that has been opened for writing or appending

SON_ERR_INVALID_ROOT 

11: This error happens when the root object is not valid (usually a bad file format or corrupted file).

SON_ERR_ARRAY_INDEX_NOT_FOUND 

12: This error happens when an array index could not be found

SON_ERR_ACCESS_TOO_LONG 

13: This error happens if the access parameter len exceeds SON_ACCESS_MAX_USER_SIZE.

SON_ERR_KEY_NOT_FOUND 

14: This error happens when the key specified by the access parameter could not be found.

SON_ERR_STACK_OVERFLOW 

15: This error happens if the depth (son_open_array() or son_open_obj()) exceeds, the handle's stack size.

SON_ERR_INVALID_KEY 

16: This happens if an empty key is passed to anything but the root object.

SON_ERR_CANNOT_CONVERT 

17: This happens if a read is tried by the base data can't be converted.

SON_ERR_EDIT_TYPE_MISMATCH 

18: This happens if a value is edited with a function that doesn't match the base type.

SON_ERR_HANDLE_CHECKSUM 

19: This happens if the handle is modified outside of a call to the SON library.

SON_ERR_MESSAGE_TIMEOUT 

20: This happens when there is a timeout when sending or receiving a message.

SON_ERR_MESSAGE_IO 

21: This happens when there is an error trying to read or write the message to a device or file.

SON_ERR_NO_MESSAGE 

22: This happens when trying to send/receive a message using a handle that is not associated with a message.

SON_ERR_INCOMPLETE_MESSAGE 

23: This happens when trying to send a message or get the size of the message when it is will open for editing/writing.

Lists the values for valid data types.

These values are provided for reference. They are used internally and not required in the API.

Enumerator
SON_STRING 

String (Internal use only)

SON_FLOAT 

Float (Internal use only)

SON_NUMBER_U32 

Unsigned 32-bit value (Internal use only)

SON_NUMBER_S32 

Signed 32-bit value (Internal use only)

SON_DATA 

Data (user-defined size) (Internal use only)

SON_OBJ 

Object (Internal use only)

SON_ARRAY 

Array (Internal use only)

SON_TRUE 

True value (Internal use only)

SON_FALSE 

False value (Internal use only)

SON_NULL 

Null value (Internal use only)