-
Notifications
You must be signed in to change notification settings - Fork 4
Messaging
Hans Kirchner edited this page Jul 14, 2015
·
3 revisions
Messaging is a framework feature that allows modules to communicate with each other by messages. Messages are not transferred immediately but instead are collected during one cycle and are then transmitted in the next cycle.
Messaging can be accessed with messaging() inside modules.
messaging()->send("rc_mode", "true");for(const std::string &msg : messaging()->receive("rc_mode")) {
if(msg == "true") {
logger.debug() << "RC mode on";
} else if(msg == "false") {
logger.debug() << "RC mode off";
}
}