Allow passing a MqArgs struct to the MQ creation #583

Merged
mohr merged 12 commits from eive/fsfw:mueller/ipc-pass-arbitrary-args-to-mq into development 2022-04-25 14:43:53 +02:00
Owner
  • The struct contains context information (which can be extended)
    and an arbitrary user argument in form of a void pointer.
    This makes the API a lot more flexible. Even if a MQ is not tied to a particular
    object, in most use-cases it is. The object information can make debugging easier
  • Simplified and streamlined MessageQueue code. There is a lot of generic code where the actual interface implementation is the same across multiple OSALs. I moved this implementation to a base class where this was the case
- The struct contains context information (which can be extended) and an arbitrary user argument in form of a void pointer. This makes the API a lot more flexible. Even if a MQ is not tied to a particular object, in most use-cases it is. The object information can make debugging easier - Simplified and streamlined MessageQueue code. There is a lot of generic code where the actual interface implementation is the same across multiple OSALs. I moved this implementation to a base class where this was the case
muellerr added 1 commit 2022-03-22 17:51:16 +01:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
a0dfdfab2c
Allow passing a MqArgs struct to the MQ creation
The struct contains context information (which can be extended)
and an arbitrary user argument in form of a void pointer.
This makes the API a lot more flexible
muellerr added the
API Change
label 2022-03-22 17:56:12 +01:00
muellerr added this to the v5.0.0 milestone 2022-03-22 17:56:15 +01:00
gaisser requested changes 2022-03-28 17:00:14 +02:00
gaisser left a comment
Owner

I'm not a big fan of void* args stuff but I can see that this might be useful in some cases.

I'm not a big fan of void* args stuff but I can see that this might be useful in some cases.
@ -0,0 +5,4 @@
struct MqArgs {
MqArgs(){};
MqArgs(object_id_t objectId, void* args = nullptr) : objectId(objectId), args(args) {}
object_id_t objectId = 0;
Owner

This should be NO_OBJECT instead of 0

This should be NO_OBJECT instead of 0
gaisser marked this conversation as resolved
@ -8,3 +8,3 @@
MessageQueue::MessageQueue(size_t message_depth, size_t max_message_size)
MessageQueue::MessageQueue(size_t message_depth, size_t max_message_size, MqArgs* args)
: id(0), lastPartner(0), defaultDestination(NO_QUEUE), internalErrorReporter(nullptr) {
Owner

Not part of your Code but we should use NO_QUEUE for id und lastPartner

Not part of your Code but we should use NO_QUEUE for id und lastPartner
gaisser marked this conversation as resolved
Owner

I support the idea, two remarks:

  1. PLease implement it for all available OSALs, right now only the linux MQ has a member storing the data.

  2. Would it make sense to add a getter in the MQIF? This way, one could generically use the metadata, as otherwise the object needs to be casted to the correct implementation, which is cumbersome during debugging and borderline forbidden in running code.

I support the idea, two remarks: 1. PLease implement it for all available OSALs, right now only the linux MQ has a member storing the data. 2. Would it make sense to add a getter in the MQIF? This way, one could generically use the metadata, as otherwise the object needs to be casted to the correct implementation, which is cumbersome during debugging and borderline forbidden in running code.
muellerr added 1 commit 2022-03-31 14:42:23 +02:00
gaisser changed title from Allow passing a MqArgs struct to the MQ creation to WIP: Allow passing a MqArgs struct to the MQ creation 2022-04-04 14:06:36 +02:00
muellerr added 1 commit 2022-04-04 17:21:15 +02:00
muellerr added 2 commits 2022-04-11 13:55:10 +02:00
a02619e5a2
strongly simplified and streamlined IPC MQ Impl
- Generic code was duplicated across all OSALs.
  Is contained in generic base class now
- Remove duplicate documentation
fsfw/fsfw/pipeline/pr-development This commit looks good Details
82df132e7d
tests running again
muellerr added 1 commit 2022-04-11 13:59:50 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
ed2c2af4a0
take upstream impl of local data pool manager
muellerr added 1 commit 2022-04-11 14:00:52 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
8c2105ae0a
correct init value for object ID
Author
Owner
  • Added getMqArgs function to interface
  • Added MQ Args Storing to all OSALs by integrating it in new MessageQueueBase class
- Added `getMqArgs` function to interface - Added MQ Args Storing to all OSALs by integrating it in new `MessageQueueBase` class
muellerr added 1 commit 2022-04-11 14:07:11 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
95f018a0b0
update IF method
muellerr requested review from mohr 2022-04-11 14:30:38 +02:00
muellerr changed title from WIP: Allow passing a MqArgs struct to the MQ creation to Allow passing a MqArgs struct to the MQ creation 2022-04-11 14:38:18 +02:00
muellerr added 1 commit 2022-04-11 16:12:00 +02:00
muellerr added 2 commits 2022-04-11 16:13:59 +02:00
muellerr added 1 commit 2022-04-12 17:06:34 +02:00
gaisser approved these changes 2022-04-25 14:41:56 +02:00
mohr approved these changes 2022-04-25 14:42:02 +02:00
mohr self-assigned this 2022-04-25 14:43:21 +02:00
mohr merged commit 126ac52975 into development 2022-04-25 14:43:53 +02:00
mohr deleted branch mueller/ipc-pass-arbitrary-args-to-mq 2022-04-25 14:43:53 +02:00
Sign in to join this conversation.
No description provided.