Skip to content

Data types

Michał Kapała edited this page Aug 13, 2024 · 2 revisions

There are several data types and a text-based serialization format for them used and carried by clSimpleMessage.

clData

A base class for data entities, introduces a data type identifier.

ID Type class Delimiter(s)
1 clDataStr s
2 clDataBin b
3 clDataList [, ]
4 clDataLong L
5 clDataStrRef unknown
6 clDataRef unknown

clDataStr

Format

All strings have the null termination byte at the end.

s<text>\0

clDataBin

The bytes are serialized in little-endian.

b<4 bytes of size><data>

clDataList

Format

A data list can include data of any types. The outer list does not have its delimiters.

[<any data>]

Example

Serialized buffer

73 32 00 73 31 00 73 31 00 5B 5D

Text representation

s2.s1.s1.[]

Deserialized equivalent

["2", "1", "1", []]

clDataLong

Format

Longs are represented as 4 bytes in little-endian order.

L<4 bytes>
Clone this wiki locally