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