Allow passing a MqArgs struct to the MQ creation #583
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#583
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "eive/fsfw:mueller/ipc-pass-arbitrary-args-to-mq"
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?
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
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;
This should be NO_OBJECT instead of 0
@ -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) {
Not part of your Code but we should use NO_QUEUE for id und lastPartner
I support the idea, two remarks:
PLease implement it for all available OSALs, right now only the linux MQ has a member storing the data.
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.
Allow passing a MqArgs struct to the MQ creationto WIP: Allow passing a MqArgs struct to the MQ creationgetMqArgs
function to interfaceMessageQueueBase
classWIP: Allow passing a MqArgs struct to the MQ creationto Allow passing a MqArgs struct to the MQ creation