luckydonald/JavaPipBoyServer/PROTOCOL.md Now summarizes this and other findings, and is generally more maintainend.
struct Entry {
uint8_t type;
uint32_t id;
switch (type) {
case 0:
uint8_t boolean;
break;
case 1:
sint8_t integer;
break;
case 2:
uint8_t integer;
break;
case 3:
sint32_t integer;
break;
case 4:
uint32_t integer;
break;
case 5:
float32_t floating_point;
break;
case 6:
char_t *string; // zero-terminated
break;
case 7: // list
uint16_t count;
uint32_t references[count];
break;
case 8:
uint16_t insert_count;
DictEntry[insert_count];
uint16_t remove_count;
uint32_t references[remove_count];
break;
}
};
struct DictEntry {
uint32_t reference;
char_t *name; // zero-terminated
};
//size 1 is a byte (00 - FF)
var DATA_UPDATE_TYPES = { // length : details
0: 'BOOL', // 1: true if non zero
1: 'INT_8', // 1: signed
2: 'UINT_8', // 1: unsigned
3: 'INT_32', // 4: signed
4: 'UINT_32', // 4: unsigned
5: 'FLOAT', // 4: float
6: 'STRING', // n: null terminated, dynamic length
7: 'ARRAY', // 2: element count; then $n 4 byte nodeId
8: 'OBJECT', // 2: element count; then $n 4 byte nodeId with null terminated string following; then 2: removed element count; then $n 4 byte removed nodeId with null terminated string following
};
T | C-Type | Bytes | Java | Values |
---|---|---|---|---|
0 | BOOL | 1 | bool | 0: false 1: true |
1 | INT_8 | 1 | byte | [0x00-0xFF] |
2 | UINT_8 | 1 | ? | [0-255] |
3 | INT_32 | 4 | int | [0x00000000-0xFFFFFFFF] |
4 | UINT_32 | 4 | ? | [0-4294967295] |
5 | FLOAT | 4 | float | |
6 | STRING | n | String | Null-Terminated. Encoding? |
uint_16 | 2 | short | [0-65535] or [0x0000-0xFFFF] |
- 0:
BOOL
1
: true if non zero - 1:
INT_8
1
: signed - 2:
UINT_8
1
: unsigned - 3:
INT_32
4
: signed - 4:
UINT_32
4
: unsigned - 5:
FLOAT
4
: float - 6:
STRING
n
: Null terminated (\0
). What encoding is used? ASCII? - 7:
LIST
2+(n*4)
: element count; then $n 4 byte nodeId - 8:
DICT
2+(a*4)+2+(b*4)
: 2 element count; then $n 4 byte nodeId with null terminated string following; then 2: removed element count; then $n 4 byte removed nodeId with null terminated string following - The checkboxes marks if it is already implemented in my Java Server
socketReceiveTimeoutMs = 10000;
socketSendTimeoutMs = 3000;
- All Strings are UTF-8.
- NimVek/pipboy/PROTOCOL.md Most complete one yet.
- RobCoIndustries/pipboylib/doc Not that complete, separated between Game->App and App->Game. But has send examples.
- Gavitron/pipulator/captures/notes.txt
- mattbaker/pipboyspec PR#1 Good DataUpdate Section.
- luckydonald/JavaPipBoyServer/PROTOCOL.md Summary of all the above.