Add fixed-length number byte order override
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 11 Oct 2023 18:23:52 +0000 (14:23 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 11 Oct 2023 18:30:48 +0000 (14:30 -0400)
commit56996d34182f43472cf5c33ec7907960b5c77f39
tree7d0ba1433150f6d470a4fc900d91c382f0917fc6
parent6740649d51bd00889e11a65c839bd48750de79d4
Add fixed-length number byte order override

This patch makes it possible to specify an immediate byte order (suffix
of encoding length) to encode a fixed-length number, overriding the
current byte order without changing it:

    !be
    11 22 33 44
    [0xaabbccdd : 32]
    [0xaabbccdd : 32le]
    [0xaabbccdd : 32]
    ff ff ff ff

Result:

    11 22 33 44
    aa bb cc dd
    dd cc bb aa
    aa bb cc dd
    ff ff ff ff

Change-Id: I3d0c9cb3f0f30ef2f74980bf9c63a93be3bdca64
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/normand/+/11040
Tested-by: jenkins <jenkins@lttng.org>
15 files changed:
README.adoc
normand/normand.py
tests/fail-fl-num-inval-len.nt
tests/fail-fl-num-missing-len.nt
tests/fail-str-post-missing-enc.nt
tests/fail-str-post-missing-gen-prefix.nt
tests/pass-fl-float-bo-oride-be.nt [new file with mode: 0644]
tests/pass-fl-float-bo-oride-le.nt [new file with mode: 0644]
tests/pass-fl-float-bo-oride-no-cur-bo.nt [new file with mode: 0644]
tests/pass-fl-int-bo-oride-be.nt [new file with mode: 0644]
tests/pass-fl-int-bo-oride-le.nt [new file with mode: 0644]
tests/pass-fl-int-bo-oride-no-cur-bo.nt [new file with mode: 0644]
tests/pass-readme-intro-fl-num.nt
tests/pass-readme-learn-fl-num-1.nt
tests/pass-readme-learn-fl-num-4.nt
This page took 0.023953 seconds and 4 git commands to generate.