Skip to content

Commit

Permalink
kaitai: add le vs be distinctions which were missing plus added the f…
Browse files Browse the repository at this point in the history
…ractions which are a more recent addition
  • Loading branch information
LiberatorUSA committed Oct 19, 2024
1 parent 4f3e08e commit c4be251
Show file tree
Hide file tree
Showing 2 changed files with 185 additions and 36 deletions.
14 changes: 7 additions & 7 deletions common/include/gucef_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
#include "gucef_platform.h" /* GUCEF platform compilation targets */
#define GUCEF_PLATFORM_H
#endif /* GUCEF_PLATFORM_H ? */

#ifdef __cplusplus
#include <limits>
#if __cplusplus >= 201103L
#include <cstdint>
#endif
#endif /* __cplusplus ? */

#ifdef __cplusplus
#include <limits>
#if __cplusplus >= 201103L
#include <cstdint>
#endif
#endif /* __cplusplus ? */

/*-------------------------------------------------------------------------//
// //
Expand Down
207 changes: 178 additions & 29 deletions tools/Kaitai/gucef_core_variant.ksy
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,42 @@ seq:
cases:
'gucef_datatypes::uint8': gucef_uint8
'gucef_datatypes::int8': gucef_int8
'gucef_datatypes::uint16': gucef_uint16
'gucef_datatypes::int16': gucef_int16
'gucef_datatypes::uint32': gucef_uint32
'gucef_datatypes::int32': gucef_int32
'gucef_datatypes::uint64': gucef_uint64
'gucef_datatypes::int64': gucef_int64
'gucef_datatypes::float32': gucef_float32
'gucef_datatypes::float64': gucef_float64
'gucef_datatypes::boolean_int32': gucef_boolean_int32
'gucef_datatypes::le_uint16': gucef_le_uint16
'gucef_datatypes::be_uint16': gucef_be_uint16
'gucef_datatypes::le_int16': gucef_le_int16
'gucef_datatypes::be_int16': gucef_be_int16
'gucef_datatypes::le_uint32': gucef_le_uint32
'gucef_datatypes::be_uint32': gucef_be_uint32
'gucef_datatypes::le_int32': gucef_le_int32
'gucef_datatypes::be_int32': gucef_be_int32
'gucef_datatypes::le_uint64': gucef_le_uint64
'gucef_datatypes::be_uint64': gucef_be_uint64
'gucef_datatypes::le_int64': gucef_le_int64
'gucef_datatypes::be_int64': gucef_be_int64
'gucef_datatypes::le_float32': gucef_le_float32
'gucef_datatypes::be_float32': gucef_be_float32
'gucef_datatypes::le_float64': gucef_le_float64
'gucef_datatypes::be_float64': gucef_be_float64
'gucef_datatypes::le_boolean_int32': gucef_le_boolean_int32
'gucef_datatypes::be_boolean_int32': gucef_be_boolean_int32
'gucef_datatypes::binary_bsob': gucef_bsob
'gucef_datatypes::binary_blob': gucef_core_dynamic
'gucef_datatypes::le_timestamp_in_secs_since_unix_epoch': gucef_le_timestamp_in_secs_since_unix_epoch
'gucef_datatypes::be_timestamp_in_secs_since_unix_epoch': gucef_be_timestamp_in_secs_since_unix_epoch
'gucef_datatypes::le_timestamp_in_ms_since_unix_epoch': gucef_le_timestamp_in_ms_since_unix_epoch
'gucef_datatypes::be_timestamp_in_ms_since_unix_epoch': gucef_be_timestamp_in_ms_since_unix_epoch
'gucef_datatypes::le_fraction_int32t2': gucef_le_fraction_int32t2
'gucef_datatypes::be_fraction_int32t2': gucef_be_fraction_int32t2
'gucef_datatypes::le_fraction_uint32t2': gucef_le_fraction_uint32t2
'gucef_datatypes::be_fraction_uint32t2': gucef_be_fraction_uint32t2
'gucef_datatypes::le_fraction_int64_int32': gucef_le_fraction_int64_int32
'gucef_datatypes::be_fraction_int64_int32': gucef_be_fraction_int64_int32
'gucef_datatypes::le_fraction_uint64_uint32': gucef_le_fraction_uint64_uint32
'gucef_datatypes::be_fraction_uint64_uint32': gucef_be_fraction_uint64_uint32
'gucef_datatypes::le_fraction_int64t2': gucef_core_dynamic
'gucef_datatypes::be_fraction_int64t2': gucef_core_dynamic
'gucef_datatypes::le_fraction_uint64t2': gucef_core_dynamic
'gucef_datatypes::be_fraction_uint64t2': gucef_core_dynamic
'gucef_datatypes::boolean_ascii_string' : gucef_core_dynamic
'gucef_datatypes::boolean_utf8_string' : gucef_core_dynamic
'gucef_datatypes::ascii_string' : gucef_core_dynamic
Expand All @@ -58,30 +79,55 @@ enums:
gucef_datatypes:
1: uint8
2: int8
3: uint16
5: int16
7: uint32
9: int32
11: uint64
13: int64
15: float32
17: float64
3: le_uint16
4: be_uint16
5: le_int16
6: be_int16
7: le_uint32
8: be_uint32
9: le_int32
10: be_int32
11: le_uint64
12: be_uint64
13: le_int64
14: be_int64
15: le_float32
16: be_float32
17: le_float64
18: be_float64
21: ascii_string
22: utf8_string
23: utf16_le_string
24: utf16_be_string
25: utf32_string
25: utf32_le_string
26: utf32_be_string
30: boolean_int32
31: boolean_ascii_string
32: boolean_utf8_string
32: boolean_utf8_string
33: boolean_utf16_le_string
34: boolean_utf16_be_string
35: boolean_utf32_le_string
36: boolean_utf32_be_string
40: binary_blob
41: binary_bsob
50: datetime_iso8601_ascii_string
51: datetime_iso8601_utf8_string
55: le_timestamp_in_secs_since_unix_epoch
56: be_timestamp_in_secs_since_unix_epoch
57: le_timestamp_in_ms_since_unix_epoch
57: le_timestamp_in_ms_since_unix_epoch
58: be_timestamp_in_ms_since_unix_epoch
60: le_fraction_int32t2
61: be_fraction_int32t2
62: le_fraction_uint32t2
63: be_fraction_uint32t2
64: le_fraction_int64t2
65: be_fraction_int64t2
66: le_fraction_uint64t2
67: be_fraction_uint64t2
68: le_fraction_int64_int32
69: be_fraction_int64_int32
70: le_fraction_uint64_uint32
71: be_fraction_uint64_uint32
types:
gucef_uint8:
seq:
Expand All @@ -91,42 +137,87 @@ types:
seq:
- id: data
type: s1
gucef_uint16:
gucef_le_uint16:
seq:
- id: data
type: u2
gucef_int16:
gucef_be_uint16:
seq:
- id: data
type: u2
endian: be
gucef_le_int16:
seq:
- id: data
type: s2
gucef_be_int16:
seq:
- id: data
type: s2
gucef_uint32:
endian: be
gucef_le_uint32:
seq:
- id: data
type: u4
gucef_int32:
gucef_be_uint32:
seq:
- id: data
type: u4
endian: be
gucef_le_int32:
seq:
- id: data
type: s4
gucef_be_int32:
seq:
- id: data
type: s4
gucef_uint64:
endian: be
gucef_le_uint64:
seq:
- id: data
type: u8
gucef_int64:
gucef_be_uint64:
seq:
- id: data
type: u8
endian: be
gucef_le_int64:
seq:
- id: data
type: s8
gucef_be_int64:
seq:
- id: data
type: s8
gucef_float32:
endian: be
gucef_le_float32:
seq:
- id: data
type: f4
gucef_float64:
gucef_be_float32:
seq:
- id: data
type: f4
endian: be
gucef_le_float64:
seq:
- id: data
type: f8
gucef_be_float64:
seq:
- id: data
type: f8
gucef_boolean_int32:
endian: be
gucef_le_boolean_int32:
seq:
- id: data
type: s4
gucef_be_boolean_int32:
seq:
- id: data
type: s4
endian: be
gucef_bsob:
seq:
- id: data
Expand All @@ -139,6 +230,7 @@ types:
seq:
- id: data
type: u8
endian: be
gucef_le_timestamp_in_ms_since_unix_epoch:
seq:
- id: data
Expand All @@ -147,3 +239,60 @@ types:
seq:
- id: data
type: u8
endian: be
gucef_le_fraction_int32t2:
seq:
- id: numerator
type: s4
- id: denominator
type: s4
gucef_be_fraction_int32t2:
seq:
- id: numerator
type: s4
endian: be
- id: denominator
type: s4
endian: be
gucef_le_fraction_uint32t2:
seq:
- id: numerator
type: u4
- id: denominator
type: u4
gucef_be_fraction_uint32t2:
seq:
- id: numerator
type: u4
endian: be
- id: denominator
type: u4
endian: be
gucef_le_fraction_int64_int32:
seq:
- id: numerator
type: s8
- id: denominator
type: s4
gucef_be_fraction_int64_int32:
seq:
- id: numerator
type: s8
endian: be
- id: denominator
type: s4
endian: be
gucef_le_fraction_uint64_uint32:
seq:
- id: numerator
type: u8
- id: denominator
type: u4
gucef_be_fraction_uint64_uint32:
seq:
- id: numerator
type: u8
endian: be
- id: denominator
type: u4
endian: be

0 comments on commit c4be251

Please sign in to comment.