Expand SerializeIF #656

Merged
mohr merged 17 commits from mueller/expand-serialize-if into development 2022-08-15 15:13:52 +02:00
Owner
  1. Fix serialize.h composite include
  2. Add various helper methods for deserializing/deserializing to big(network) endianness or native endianness. This avoids boilerplate code or re-implementing simple helpers over and over again
    • serializeBe: Calls serialize with big (network) endianness
  3. Add default implementations for serialize and deSerialize which do not perform pointer arithmetic. There is usually no need to re-implement those on demand, their default implementation can be derived from the one performing pointer arithmetic

Also adds unit test module for the new API

1. Fix `serialize.h` composite include 2. Add various helper methods for deserializing/deserializing to big(network) endianness or native endianness. This avoids boilerplate code or re-implementing simple helpers over and over again - `serializeBe`: Calls serialize with big (network) endianness 3. Add default implementations for serialize and deSerialize which do not perform pointer arithmetic. There is usually no need to re-implement those on demand, their default implementation can be derived from the one performing pointer arithmetic Also adds unit test module for the new API
muellerr added 7 commits 2022-07-25 11:37:15 +02:00
muellerr added 1 commit 2022-07-25 11:39:24 +02:00
Merge branch 'development' into mueller/expand-serialize-if
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
180210dc38
muellerr requested review from gaisser 2022-07-25 11:39:37 +02:00
muellerr requested review from mohr 2022-07-25 11:39:42 +02:00
muellerr added 1 commit 2022-07-25 14:40:01 +02:00
remove obsolete returns
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
380f1d0206
muellerr added 1 commit 2022-07-25 14:44:14 +02:00
add [[nodiscard]] and const specifiers
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
f3af88ae40
muellerr added 1 commit 2022-07-25 14:44:45 +02:00
run afmt
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
f80be9e9fa
muellerr added 1 commit 2022-07-25 15:08:07 +02:00
Merge branch 'development' into mueller/expand-serialize-if
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
8f07133e2c
gaisser added this to the v6.0.0 milestone 2022-07-25 15:23:59 +02:00
muellerr added 1 commit 2022-07-26 19:09:10 +02:00
Merge branch 'development' into mueller/expand-serialize-if
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
e7d9979078
muellerr added 2 commits 2022-07-27 21:35:36 +02:00
- Returns serialized and deserialized size now
update unittests
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
b11cdf6184
Author
Owner

I updated the methods to be able to return the serialized and deserialized size. I think this is still a very useful value to know.

On a sidenote:

If someone wants to use the new API, they have to prepend the regular method call with SerializeIF::. Example

auto foo FooWhichImplementsSerializeIF(...);
foo.SerializeIF::serialize(data, size);

This is relatively new for me. To make the regular foo.serialize(...) work, something like a base class is probably necessary, but I am not fully sure about that. From an API standpoint, I'd prefer it if one could just all .serialize. But this is probably a topic for another issue/PR

I updated the methods to be able to return the serialized and deserialized size. I think this is still a very useful value to know. On a sidenote: If someone wants to use the new API, they have to prepend the regular method call with `SerializeIF::`. Example ```cpp auto foo FooWhichImplementsSerializeIF(...); foo.SerializeIF::serialize(data, size); ``` This is relatively new for me. To make the regular `foo.serialize(...)` work, something like a base class is probably necessary, but I am not fully sure about that. From an API standpoint, I'd prefer it if one could just all `.serialize`. But this is probably a topic for another issue/PR
muellerr added a new dependency 2022-07-29 09:51:56 +02:00
muellerr added a new dependency 2022-07-29 14:20:33 +02:00
muellerr added 1 commit 2022-08-05 14:02:34 +02:00
Merge branch 'development' into mueller/expand-serialize-if
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
cc56b00df3
muellerr added 1 commit 2022-08-15 14:34:09 +02:00
remove implicit machine endianness variants
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
deeeef553b
gaisser approved these changes 2022-08-15 14:46:32 +02:00
gaisser left a comment
Owner

LGTM

LGTM
mohr added the
feature
label 2022-08-15 15:11:26 +02:00
mohr merged commit 57ce5d1f34 into development 2022-08-15 15:13:52 +02:00
mohr deleted branch mueller/expand-serialize-if 2022-08-15 15:13:52 +02:00
mohr refused to review 2022-08-15 15:14:02 +02:00
Sign in to join this conversation.
No description provided.