Tidy up and comment protocol.hjson
This commit is contained in:
parent
e09c70a51a
commit
c26fc81a2b
|
@ -2,9 +2,16 @@
|
|||
types:
|
||||
{
|
||||
varint: {
|
||||
// native type
|
||||
type: int32_t
|
||||
|
||||
// this is the max size. varint is 3 to 5
|
||||
size: 5
|
||||
|
||||
// R/W: ReadVarInt, WriteVarInt
|
||||
method: VarInt
|
||||
|
||||
// Alias types use ReadVarInt<T>
|
||||
generic: true
|
||||
}
|
||||
|
||||
|
@ -15,6 +22,7 @@
|
|||
string: {
|
||||
type: std::string
|
||||
method: String
|
||||
// requires count: e.g. string[256]
|
||||
size: count
|
||||
}
|
||||
|
||||
|
@ -43,11 +51,12 @@
|
|||
|
||||
byte: {type: 'uint8_t', size: 1}
|
||||
|
||||
bool: {type: 'bool', size: 1}
|
||||
// if no native type is specified,
|
||||
// it's assumed to be the type's name
|
||||
bool: {size: 1}
|
||||
|
||||
float: {size: 4}
|
||||
double: {size: 8}
|
||||
|
||||
}
|
||||
|
||||
states :
|
||||
|
|
Loading…
Reference in New Issue