class Shine(h.Struct): arr = h.Array(field_type=h.UInt8(3), length=3, value=(1, 2), fill=True) vec_len = h.UInt8() vec = h.Vector(field_type=h.UInt8(), length=vec_len) y = h.UInt64(9) z_len = h.UInt8() z = h.Vector(field_type=Garzon(), length=z_len, value=[ Garzon(nested_vla=(11, 12, 13, 14, 15)), Garzon(arr=(9,)), Garzon()]) vec2_len = h.UInt8() vec2 = h.Vector(field_type=h.UInt32(), length=vec2_len, value=(53, 99, 123)) x = h.UInt16(104)
class Gilad(h.Struct): i8 = h.Int8(0) i16 = h.Int16(0) i32 = h.Int32(0) i64 = h.Int64(0) u8 = h.UInt8(0) u16 = h.UInt16(0) u32 = h.UInt32(0) u64 = h.UInt64(0) flt = h.Float(0) dub = h.Double(0)
class FooterThatIsAlsoHeader(h.Struct): magic = h.UInt32(0x09012001) my_opcode = h.OpcodeField(h.UInt16, {FooterBody1: 0x02, FooterBody2: 0x00})
class AnotherFooter(h.Struct): another_magic = h.UInt32(0x01052000)
class MessageFooter(h.Struct): magic = h.UInt32(0x000C0FEE)
class MessageHeader(h.Struct): magic = h.UInt32(0xDEADBEEF) opcode = h.OpcodeField(h.UInt16, {MessageBody1: 0x00, MessageBody2: 0x01})
class MessageBody2(h.Struct): y = h.UInt32(0x06072001)
class Header(h.Struct, endianness=h.BigEndian): magic = h.UInt32(0x01052000) body_length = h.ExclusiveLengthField(h.UInt16)
class NadavLoYazam(h.Struct): nadav = h.UInt8() lo = h.UInt16() yazam = h.UInt32() bihlal = h.UInt64()
class Hod(Tal, endianness=h.LittleEndian): y = h.UInt32()