Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SlaveActivity without master ExecutionEngine #59

Closed
meyerj opened this issue Sep 1, 2014 · 1 comment
Closed

SlaveActivity without master ExecutionEngine #59

meyerj opened this issue Sep 1, 2014 · 1 comment

Comments

@meyerj
Copy link
Member

meyerj commented Sep 1, 2014

The patch from PR #35 effectively broke the use of a SlaveActivity without a master running an ExecutionEngine. The console and log file is filled with

44.685 [ FATAL  ][uxvcos]  SlaveActivity: cannot push messages to another engine, current engine is unsupported.

messages. The source is in SlaveActivity.cpp:187.

In my use case I have a custom main activity that controls the execution of all slave components, each of them running in a SlaveActivitiy. This main activity is the master of all slaves, but has no ExecutionEngine. Some slaves have event ports because I also use them in other deployments running in a non-periodic activity which requires triggering. Every write into such an event port prints the above log message.

Possible solutions:

  1. Remove the log message and let SlaveActivity ignore triggers silently if no master activity is set as it was before.

    I am aware of the problems this might cause for the original issue with blocking operation calls without a warning message. Perhaps as an alternative we could add a special handling in bool ExecutionEngine::process(DisposableInterface* c ) that directly queues the messages in the master's ExecutionEngine if available instead of taking them over later from the trigger() call? I will setup a pull request for this if it sounds reasonable to you.

  2. Only allow an ExecutionEngine as master of SlaveActivities and clearly state that this is the only supported use case. This basically comes down to change the type of the mmaster member from base::RunnableInterface * to ExecutionEngine * and drop the dynamic_cast in trigger().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant