android13/packages/modules/Bluetooth/tools/pdl/test/example.pdl

79 lines
1.0 KiB
Plaintext

// line comment
/* block comment */
little_endian_packets
/* stuff */
enum FourBits : 4 {
ONE = 1,
TWO = 2,
THREE = 3,
FIVE = 5,
TEN = 10,
LAZY_ME = 15,
}
/* other stuff */
enum FourBits : 4 {
ONE = 1,
TWO = 2,
THREE = 3,
FIVE = 5,
TEN = 10,
LAZY_ME = 15
}
packet Test {
/* Checksum */
_checksum_start_ (crc16),
/* Padding */
_padding_ [1],
/* Size */
_size_ (_payload_) : 1,
_size_ (_body_) : 1,
_size_ (id) : 1,
/* Body */
_body_,
/* Payload */
_payload_,
_payload_ : [+1],
/* Fixed */
_fixed_ = 1:1,
_fixed_ = id:id,
/* Reserved */
_reserved_ : 1,
/* Array */
id: 1[+1],
id: id[+1],
id: 1[1],
id: id[1],
id: 1[],
id: id[],
/* Scalar */
id: 1,
/* Typedef */
id : id,
/* Group */
id { a=1, b=2 },
id,
}
packet TestChild : Test {
}
packet TestChild (a=1, b=2) {
}
packet TestChild : Test (a=1, b=2) {
}
checksum id: 1 "id"
custom_field id : 1 "id"
custom_field id "id"
test Test {
"1111",
"2222",
}