You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Sequence: Similar to arrays, but the information about the size is serialized along with the data.
157
+
158
+
### Endianness
159
+
*MicroCDR* supports little and big endianness.
160
+
The configuration can be done by cmake with the cmake `__BIG_ENDIAN__` variable.
161
+
A `0` value implies that the serialization will performed into a little endian machine, and `1` into a big endian machine.
162
+
163
+
The default endianness serialization can be choosen by setting the `endianness` parameter of a `ucdrBuffer` to `UCDR_BIG_ENDIANNESS` or `UCDR_LITTLE_ENDIANNESS`.
164
+
Also, there are a functions that allow to force an endianness in their serialization/deserialization.
165
+
These functions contains the name `endiannness` in their signature.
166
+
167
+
### Error
168
+
All serialization/deserialization functions return a boolean indicating the result of their operations.
169
+
When a serialization/deserialization could not be possible (the type can not be serialized, or the capacity of the destination buffer is not enough),
170
+
an status error is setted into the `ucdrBuffer`.
171
+
If a `ucdrBuffer` has an error state, the next serialization/deserialization operations will not works and will return `false` in their execution.
172
+
A buffer marked with an error can be used, but any serialization/deserialization operation over it will not produce any effect.
173
+
174
+
If is kwown that an operation can fails over a `ucdrBuffer`, and its necessary to continue with the serialization/deserialization if it happens,
175
+
the `ucdrBuffer` state can be saved using the `ucdr_copy_buffer` function.
176
+
After the application of the wrong serialization/deserialization, only the `ucdrBuffer` that performed the operation will have a dirty state.
177
+
178
+
## Serialization/deserialization list
179
+
The available modes of serialization/deserializations in *MicroCDR* are shown in the following table.
54
180
55
181
56
182
| Type | Endianness |
@@ -75,6 +201,8 @@ The types supported in *microCDR* are presented in the following table. For each
75
201
| float | endianness |
76
202
| double ||
77
203
| double | endianness |
204
+
| string ||
205
+
| string | endianness |
78
206
| bool array ||
79
207
| char array ||
80
208
| int8 array ||
@@ -96,9 +224,13 @@ The types supported in *microCDR* are presented in the following table. For each
96
224
| double array ||
97
225
| double array | endianness |
98
226
| bool sequence ||
227
+
| bool sequence | endianness |
99
228
| char sequence ||
229
+
| char sequence | endianness |
100
230
| int8 sequence ||
231
+
| int8 sequence | endianness |
101
232
| uint8 sequence ||
233
+
| uint8 sequence | endianness |
102
234
| int16 sequence ||
103
235
| int16 sequence | endianness |
104
236
| uint16 sequence ||
@@ -115,3 +247,4 @@ The types supported in *microCDR* are presented in the following table. For each
0 commit comments