mbeckerle commented on a change in pull request #263: Add more obscure charsets
needed for some mil formats.
URL: https://github.com/apache/incubator-daffodil/pull/263#discussion_r306049729
##########
File path:
daffodil-io/src/main/scala/org/apache/daffodil/processors/charset/X_DFDL_MIL_STD.scala
##########
@@ -48,6 +48,46 @@ object BitsCharset6BitDFI311DUI002 extends {
override val requiredBitOrder = BitOrder.LeastSignificantBitFirst
} with BitsCharsetNonByteSize
+object BitsCharset3BitDFI336DUI001 extends {
+ override val name = "X-DFDL-3-BIT-DFI-336-DUI-001"
+ override val bitWidthOfACodeUnit = 3
+ override val decodeString = """12345678"""
+ override val replacementCharCode = 0x0
+ override val requiredBitOrder = BitOrder.LeastSignificantBitFirst
+} with BitsCharsetNonByteSize
+
+object BitsCharset4BitDFI746DUI002 extends {
+ override val name = "X-DFDL-4-BIT-DFI-746-DUI-002"
+ override val bitWidthOfACodeUnit = 4
+ override val decodeString = """ABCDEFGHIJKLMNPQ"""
+ override val replacementCharCode = 0x0
+ override val requiredBitOrder = BitOrder.LeastSignificantBitFirst
+} with BitsCharsetNonByteSize
+
+object BitsCharset3BitDFI746DUI002 extends {
+ override val name = "X-DFDL-3-BIT-DFI-746-DUI-002"
+ override val bitWidthOfACodeUnit = 3
+ override val decodeString = """ABCDEFGH"""
+ override val replacementCharCode = 0x0
+ override val requiredBitOrder = BitOrder.LeastSignificantBitFirst
+} with BitsCharsetNonByteSize
+
+object BitsCharset3BitDFI747DUI001 extends {
+ override val name = "X-DFDL-3-BIT-DFI-747-DUI-001"
+ override val bitWidthOfACodeUnit = 3
+ override val decodeString = """AEGHJKLM"""
+ override val replacementCharCode = 0x0
+ override val requiredBitOrder = BitOrder.LeastSignificantBitFirst
+} with BitsCharsetNonByteSize
+
+object BitsCharset5BitDFI769DUI002 extends {
Review comment:
Add TDML tests that exercise these charset encodings in ways that prove they
will work properly for the real use cases.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services