Event-Log¶
Conventions¶
Little-endian
Header¶
Located from offset 0, i.e. start of file.
Pos |
Len |
Type |
Name |
---|---|---|---|
0 |
4 |
uint32 |
magic number ( |
4 |
1 |
uint8 |
ROQ version - major |
5 |
1 |
uint8 |
ROQ version - minor |
6 |
2 |
uint16 |
ROQ version - revision |
8 |
8 |
uint64 |
pid |
16 |
64 |
string |
hostname |
80 |
32 |
string |
gateway name |
112 |
32 |
string |
gateway session id |
144 |
1 |
enum |
compression method (1 = brotli) |
145 |
1 |
uint8 |
compression level |
146 |
1 |
enum |
encoding method (1 = flatbuffers) |
147 |
1 |
char |
unused |
148 |
4 |
uint32 |
offset users |
152 |
4 |
uint32 |
offset data |
156 |
100 |
char |
unused |
Users¶
The start offset is specified in the header. This section typically follows the header, i.e. at offset 256.
The section contains 256 repeating fixed-length strings of length 16.
The strings are zero-padded for length < 15. Please note the length can be 16 in which case the string is not null terminated!
The first string (index = 0) is the name of the gateway and will never be used as a user id.
The last string (index = 255) is restricted and will also never be used as a user id.
Data¶
The start offset is specified in the header. This section typically follows the user section, i.e. at offset 4352 (= 256 + 4096).
This section extends to the end of file and contains all messages compressed as per header.
Messages¶
Each message wraps the encoded format
Pos |
Len |
Type |
Name |
---|---|---|---|
0 |
2 |
uint16 |
marker ( |
2 |
2 |
uint16 |
check-sum |
4 |
1 |
uint8 |
flags |
5 |
1 |
uint8 |
user id |
6 |
1 |
uint8 |
account id |
7 |
1 |
uint8 |
message category |
8 |
4 |
uint32 |
object id |
12 |
4 |
uint32 |
message length |
16 |
N |
char |
encoded message |
16 + N |
0-3 |
char |
padding to align on 4 byte boundary |
All messages are aligned on a 4 byte boundary.
Check-sum is computed by summing all bytes from postion 4 to end of message, modulus 256.
The contained message must be decoded using the method indicated by the header.