Harald Welte | 615bd54 | 2017-07-14 18:28:55 +0200 | [diff] [blame] | 1 | module Osmocom_Types { |
Harald Welte | ddeaa57 | 2017-07-14 18:58:07 +0200 | [diff] [blame] | 2 | type integer uint8_t (0..255) with { variant "unsigned 8 bit" }; |
Harald Welte | 615bd54 | 2017-07-14 18:28:55 +0200 | [diff] [blame] | 3 | type integer uint16_t (0..65535) with { variant "unsigned 16 bit" }; |
Harald Welte | ddeaa57 | 2017-07-14 18:58:07 +0200 | [diff] [blame] | 4 | type integer uint32_t (0..4294967295) with { variant "unsigned 32 bit" }; |
| 5 | |
| 6 | type integer int8_t (-128..127) with { variant "8 bit" }; |
| 7 | type integer int16_t (-32768..32767) with { variant "16 bit" }; |
| 8 | |
Harald Welte | 615bd54 | 2017-07-14 18:28:55 +0200 | [diff] [blame] | 9 | type integer uint2_t (0..3) with { variant "unsigned 2 bit" }; |
| 10 | type integer uint3_t (0..7) with { variant "unsigned 3 bit" }; |
| 11 | type integer uint4_t (0..15) with { variant "unsigned 4 bit" }; |
| 12 | type integer uint5_t (0..31) with { variant "unsigned 5 bit" }; |
| 13 | type integer uint6_t (0..63) with { variant "unsigned 6 bit" }; |
| 14 | type integer uint7_t (0..127) with { variant "unsigned 7 bit" }; |
Harald Welte | 615bd54 | 2017-07-14 18:28:55 +0200 | [diff] [blame] | 15 | type integer uint9_t (0..511) with { variant "unsigned 9 bit" }; |
| 16 | type integer uint10_t (0..1023) with { variant "unsigned 10 bit" }; |
| 17 | type integer uint11_t (0..2047) with { variant "unsigned 11 bit" }; |
| 18 | type integer uint12_t (0..4095) with { variant "unsigned 12 bit" }; |
Harald Welte | ddeaa57 | 2017-07-14 18:58:07 +0200 | [diff] [blame] | 19 | type integer uint13_t (0..8191) with { variant "unsigned 13 bit" }; |
| 20 | type integer uint14_t (0..16383) with { variant "unsigned 14 bit" }; |
| 21 | type integer uint15_t (0..32767) with { variant "unsigned 15 bit" }; |
| 22 | |
| 23 | type record Arfcn { |
| 24 | boolean pcs, |
| 25 | uint15_t arfcn |
| 26 | } with { variant "" }; |
| 27 | |
Harald Welte | 615bd54 | 2017-07-14 18:28:55 +0200 | [diff] [blame] | 28 | } with { encode "RAW"; variant "FIELDORDER(msb)" } |