Update SerializeAdapter #122
No reviewers
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#122
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "mohr_serialize"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fixes #38
SerializeIF
The
bool bigEndian
parameter was changed toenum Endianness streamEndianness
to be more clear about the intentian of the parameter. It is now also possible to write to or read from a little endian or machine endian stream. Machine endian means no endian conversion is performed (which is only useful if the serialized data is to be interpreted on the same machine).Lengths are now expressed as
size_t
, advancing #12.EndianSwapper
/EndianConverter
EndianSwapper
was renamed toEndianConverter
. It supports big and little endian now, following the change inSerializeIF
. Names and documentation was updated to make its use more clear.SerializeAdapter
The class is no longer a template, the individual functions are. This allows automatic deduction of template arguments,
uint32_t var; SerializeAdapter<uint32_t>::deSerialize(var, ...)
can now be written asuint32_t var; ::deSerialize(var, ...)
.The Endianness parameter was changed following the update of
SerializeIF
.SerializeAdapter_
This class is where the magic of compile time specialization of the serialization happens. It was moved into a private child class of
SerializeAdapter
to make more clear that it is not to be used on its own.PoolRawAccess
PoolRawAccess
was updated to use theEndianConverter
.Other
During the implementation of the above changes in the framework, a lot of variables were changed to
size_t
, your friendly compiler will probably remind you of most of them.Tried using
override
keyword where applicable.Helping hands
API Changes can mostly be applied via the following sed rules:
and a script to adapt more changes, to be run via find as well:
Probably the above sed rules can be included in the script, I did not test this however.
I integrated the changes into our branch and fork and it appears to work without issues.
It propably would be a good idea to merge the master branch again.
storagemanager components use size_t now so there was a little merge conflict.
Good to know that it works in your fork.
Will merge master and extend documentation as soon as I get to it.
Okay, I also think there is still a compiler warning in PoolRawAccess (#warning use serialize...). Is this intended? (its still WIP after all).
And another small thing: Maybe the file for EndianConverter should be renamed to EndianConverter as well.
WIP: Update SerializeAdapterto Update SerializeAdapterAlso fixes #21