libsxbp  v0.27
Experimental generation of 2D spiralling lines based on input binary data.
serialise.h
Go to the documentation of this file.
1 /*
2  * This source file forms part of libsxbp, a library which generates
3  * experimental 2D spiral-like shapes based on input binary data.
4  */
5 
22 #ifndef SAXBOPHONE_SAXBOSPIRAL_SERIALISE_H
23 #define SAXBOPHONE_SAXBOSPIRAL_SERIALISE_H
24 
25 #include <stddef.h>
26 
27 #include "saxbospiral.h"
28 
29 
30 #ifdef __cplusplus
31 extern "C"{
32 #endif
33 
49 
53 typedef struct sxbp_serialise_result_t {
57  sxbp_deserialise_diagnostic_t diagnostic;
59 
61 extern const size_t SXBP_FILE_HEADER_SIZE;
63 extern const size_t SXBP_LINE_T_PACK_SIZE;
64 
83  sxbp_buffer_t buffer, sxbp_spiral_t* spiral
84 );
85 
107  sxbp_spiral_t spiral, sxbp_buffer_t* buffer
108 );
109 
110 #ifdef __cplusplus
111 } // extern "C"
112 #endif
113 
114 // end of header file
115 #endif
sxbp_deserialise_diagnostic_t
Provides further error information specific to spiral de-serialisation.
Definition: serialise.h:37
This compilation unit provides most of the data types used by the library, as well as defining some l...
const size_t SXBP_LINE_T_PACK_SIZE
The size in bytes of one line when stored in the file.
Definition: serialise.c:34
sxbp_serialise_result_t sxbp_load_spiral(sxbp_buffer_t buffer, sxbp_spiral_t *spiral)
De-serialises a spiral from a buffer.
Definition: serialise.c:106
data section too small to be valid
Definition: serialise.h:47
sxbp_deserialise_diagnostic_t diagnostic
additional specific error information
Definition: serialise.h:57
Stores both generic and serialisation-specific error information.
Definition: serialise.h:53
unsupported data version (according to header)
Definition: serialise.h:45
A simple buffer type for storing arrays of bytes.
Definition: saxbospiral.h:236
struct sxbp_serialise_result_t sxbp_serialise_result_t
Stores both generic and serialisation-specific error information.
wrong magic number in header section
Definition: serialise.h:43
sxbp_serialise_result_t sxbp_dump_spiral(sxbp_spiral_t spiral, sxbp_buffer_t *buffer)
Serialises a spiral to a buffer.
Definition: serialise.c:190
Struct type representing a Spiral figure, in any state of completion.
Definition: saxbospiral.h:189
no problem
Definition: serialise.h:39
sxbp_status_t status
generic error information applicable to all functions
Definition: serialise.h:55
header section too small to be valid
Definition: serialise.h:41
const size_t SXBP_FILE_HEADER_SIZE
The size of the file header in bytes.
Definition: serialise.c:26
sxbp_status_t
Represents the success or failure status of an executed function.
Definition: saxbospiral.h:87