Code generator for C++ from YAML to generate network protocol parsers
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

79 řádky
1.6 KiB

includes:
- <array>
namespace: db
classes:
-
name: record_identifier
size: 24
attributes:
-
name: uuid
out_type: std::array<unsigned char, 16>
start: 0
-
name: x
out_type: uint32_t
start: 16
-
name: y
out_type: uint32_t
start: 20
-
name: record
size: 64
attributes:
-
name: record_id
out_type: std::array<unsigned char, 24>
start: 0
-
name: timestamp
out_type: uint64_t
start: 24
attributeafters:
-
name: offset
out_type: uint64_t
after_name: timestamp
bitfields:
-
name: flags
out_type: uint16_t
start: 40
mask: 0b1110000000000000
-
name: v_flag
out_type: uint16_t
after_name: offset
start: 40
mask: 0b1000000000000000
-
name: r_flags
out_type: uint16_t
start: 40
mask: 0b0100000000000000
-
name: c_flags
out_type: uint16_t
start: 40
mask: 0b0010000000000000
-
name: confirmed
out_type: uint16_t
start: 40
mask: 0b0010000000000000
-
name: validated
out_type: uint16_t
start: 40
mask: 0b1010000000000000
-
name: removed
out_type: uint16_t
start: 40
mask: 0b0100000000000000
-
name: next_jump
out_type: uint16_t
start: 40
mask: 0b0000111111111111