config.py: remove bit array field type's byte order property
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 8 Sep 2020 16:16:05 +0000 (12:16 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 8 Sep 2020 16:16:05 +0000 (12:16 -0400)
commit4c91e7696d1be2fb46cd83ed36433cc3f6fd0ece
tree5e2e923d4c81413a2fe242756028e02c8e4aec1e
parent1cf325c4756535184216ccd0584124bd412baa9c
config.py: remove bit array field type's byte order property

This patch removes the byte order property from the `_BitArrayFieldType`
class.

Instead, barectf always uses the configuration's target byte order.

As of this version of barectf, where all integral tracing function
parameters are copies, it makes no sense, for example, for a
little-endian CPU to write big-endian data.

The `byte-order` property is also removed in barectf 3 YAML field types.
I'm keeping it in barectf 2 YAML field types for backward compatibility,
but it's ignored now.

From a CTF consumer's perspective, this patch doesn't cause a noticeable
change: the decoded integral value is the same whatever the byte order.

From the barectf API's perspective, it makes the configuration objects
simpler. This patch effectively reverts 7fffc7d ("config: replace trace
type's default BO with configuration's target BO").

It is possible that barectf needs specific bit array field type byte
orders in the future, for example to copy some user payload as is
instead of copying each field; when this time comes, we can reintroduce
the property, adding a way to mark a bit array field type's byte order
as "target" (which would be the default), for example:

    my_ft = barectf.RealFieldType(32,
                                  byte_order=barectf.TARGET_BYTE_ORDER)

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/config.py
barectf/config_parse_v2.py
barectf/config_parse_v3.py
barectf/schemas/config/3/field-type.yaml
barectf/templates/c/serialize-write-bit-array-statements.j2
barectf/templates/metadata/int-ft.j2
barectf/templates/metadata/metadata.j2
barectf/templates/metadata/real-ft.j2
barectf/tsdl182gen.py
This page took 0.023747 seconds and 4 git commands to generate.