Skip to content

Commit

Permalink
Add support for int8/uint8 type kind
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Potman <[email protected]>
  • Loading branch information
dpotman authored and eboasson committed Mar 16, 2023
1 parent e6f59ca commit 11c9f50
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 90 deletions.
1 change: 1 addition & 0 deletions cyclonedds/idl/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ def _union_default_finder(_type, cases):
types.int32: (-1, -1, -2147483648),
types.int64: (-1, -1, -9223372036854775808),
int: (-1, -1, -9223372036854775808),
types.byte: (0, 1, 255),
types.uint8: (0, 1, 255),
types.uint16: (0, 1, 65535),
types.uint32: (0, 1, 4294967295),
Expand Down
4 changes: 2 additions & 2 deletions cyclonedds/idl/_typesupport/DDS/XTypes/__init__.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
TK_FLOAT32 = 9
TK_FLOAT64 = 10
TK_FLOAT128 = 11
TK_INT8 = 12
TK_UINT8 = 13
TK_CHAR8 = 16
TK_CHAR16 = 17
TK_STRING8 = 32
Expand Down Expand Up @@ -283,6 +285,8 @@ class ExtendedAnnotationParameterValue(idl.IdlStruct, typename="DDS.XTypes.Exten
class AnnotationParameterValue(idl.IdlUnion, discriminator=types.uint8, discriminator_is_key=False, typename="DDS.XTypes.AnnotationParameterValue"):
boolean_value: types.case[[1], bool]
byte_value: types.case[[2], types.uint8]
int8_value: types.case[[12], types.int8]
uint_8_value: types.case[[13], types.uint8]
int16_value: types.case[[3], types.int16]
uint_16_value: types.case[[6], types.uint16]
int32_value: types.case[[4], types.int32]
Expand Down
Loading

0 comments on commit 11c9f50

Please sign in to comment.