diff --git a/doc/source/protocol/datatypes.rst b/doc/source/protocol/datatypes.rst new file mode 100644 index 0000000..e851352 --- /dev/null +++ b/doc/source/protocol/datatypes.rst @@ -0,0 +1,77 @@ +Datatypes +========= + +.. list-table:: + :header-rows: 1 + + * - Data type + - Specification (simple) + - Specification (with limits) + - Transport example + - Datatype used in C/C++ API + - Remarks + + * - double + - ["double"] + - ["double", , ] + - 3.14159265 + - double + - + + * - int + - ["int"] + - ["int", , ] + - -55 + - int64_t + - + + * - bool + - ["bool"] + - + - true + - int64_t + - + + * - enum + - ["enum", { : , ....}] + - + - 1 + - int64_t + - + + * - string + - ["string"] + - ["string", , ] + - "hello!" + - char * + - + + * - blob + - ["blob"] + - ["blob", , ] + - "AA==" + - struct {int64_t len, char \*data} + - transport is base64 encoded + + * - array + - ["array", ] + - ["array", , , ] + - [3,4,7,2,1] + - [] + - + + * - tuple + - ["tuple", [, , ...]] + - + - [0,"idle"] + - struct ?? + - + + * - struct + - ["struct", { : , : , ....}] + - + - {"x": 0, "y": 1} + - struct ?? + - + + diff --git a/doc/source/protocol/index.rst b/doc/source/protocol/index.rst index 75e45f0..00b79e2 100644 --- a/doc/source/protocol/index.rst +++ b/doc/source/protocol/index.rst @@ -12,6 +12,7 @@ Protocol documentation modsubset heartbeat jsonstruct + datatypes todo notes history