Data packing

Functions used to pack data in to a stram. If TESTIFY_DEBUG is not defined, the param "name" will be removed with a macro. In debug mode (where both TESTIFY_DEBUG is defined AND the bug mode of the stream has been set to TRUE testify_debug_mode_set) the name, and data type will be checked to make sure they match the name and type that was packed. If this test fails the application will terminate on unpack and write out a Error raport to standard out.

testify_pack_uint8

void testify_pack_uint8(THandle *handle, uint8 value, char *name);

Description: Packs one uint8 "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_int8

void testify_pack_int8(THandle *handle, int8 value, char *name);

Description: Packs one int8 "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_uint16

void testify_pack_uint16(THandle *handle, uint16 value, char *name);

Description: Packs one uint16 "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_int16

void testify_pack_int16(THandle *handle, int16 value, char *name);

Description: Packs one int16 "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_uint32

void testify_pack_uint32(THandle *handle, uint32 value, char *name);

Description: Packs one uint32 "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_int32

void testify_pack_int32(THandle *handle, int32 value, char *name);

Description: Packs one int32 "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_uint64

void testify_pack_uint64(THandle *handle, uint64 value, char *name);

Description: Packs one uint64 "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_int64

void testify_pack_int64(THandle *handle, int64 value, char *name);

Description: Packs one int64 "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_real32

void testify_pack_real32(THandle *handle, float value, char *name);

Description: Packs one float "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_real64

void testify_pack_real64(THandle *handle, double value, char *name);

Description: Packs one double "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_string

boolean testify_pack_string(THandle *handle, char *value, char *name);

Description: Packs one uint8 "value" in to the stream. "name" is a string that needs to be matched when unpacking if the handle is running in debug mode.

testify_pack_raw

uint64 testify_pack_raw(THandle *handle, uint8 *data, uint64 lengt);

Description: Packs a raw array of bytes in to a handle. Returns the number of bytes that got packed as this may be less then size