Repository navigation
API
Istvan Madari edited this page Oct 8, 2018
·
21 revisions
Message handlers play central role in RIAPS applications. Message handlers are C++ functions and they called when a given type of message arrived to the ComponentBase. The name of the message handler is derived from the name of the port (defined in the RIAPS model file ❗ LINK ❗) where the message arrived. The naming convention for the message handler is: On{port_name}(...).
For example, if a component defines a subscriber port with tha name value and type ValueMsgType:
component C {
sub value : ValueMsgType;
}The C++ message handler will be:
virtual void OnValue(messages::ValueMsgType::Reader& msg, riaps::ports::PortBase* port) override;RIAPS uses Cap'n Proto for serializing/deserializing messages. The ValueMsgType::Reader in the handler is a Cap'n Proto object. The PortBase pointer encapsulates the RIAPS port, where the message arrived.
-
Welcome
- Install dependencies
- Install riaps-core
- Setting up your IDE
- Create message types
- API Overview
- Examples
- Build RIAPS applications
- Advanced Topics
- Distributed Coordination
- Group API
- Leader Election
- Consensus
- Time-Synchronized Coordinated Action
- Fault Management
- Resource Management
- Distributed Coordination