|
| Application (const std::string &name, rad::DataContext &data) |
|
| ~Application () override |
|
virtual bool | Config (int argc, char *argv[]) |
|
virtual void | Init (rad::ConfigurableActionMgr &action_mgr) |
|
virtual bool | Init (int argc, char *argv[], rad::ConfigurableActionMgr &action_mgr) |
|
void | RegisterMalDds (const elt::mal::Mal::Properties &mal_properties) |
|
virtual void | RegisterMalDds () |
|
virtual void | Run () |
|
void | StopEventLoop () |
|
const std::string & | GetName () const |
|
rad::DataContext & | GetDataContext () |
|
boost::asio::io_context & | GetEventLoop () |
|
std::shared_ptr< elt::mal::Mal > | GetMalInstance () |
|
std::shared_ptr< elt::mal::Mal > | GetMalDdsInstance () |
|
void | CreateReplier (const std::string &uri) |
|
template<typename IF , typename IF_IMPL > |
void | RegisterService (const std::string &name, std::shared_ptr< IF_IMPL > if_impl) |
|
| Application (const Application &)=delete |
|
Application & | operator= (const Application &)=delete |
| Disable copy constructor.
|
|
| SMAdapter (boost::asio::io_context &ios, scxml4cpp::Context *context, scxml4cpp::EventQueue &external_events) |
|
virtual | ~SMAdapter () |
|
void | Load (const std::string &filename, std::list< scxml4cpp::Action * > *action_list, std::list< scxml4cpp::Activity * > *activity_list, const scxml4cpp::ReplaceRules &replace_rules=scxml4cpp::ReplaceRules()) |
|
void | LoadFromString (const std::string &name, const std::string &model, std::list< scxml4cpp::Action * > *action_list, std::list< scxml4cpp::Activity * > *activity_list, const scxml4cpp::ReplaceRules &replace_rules=scxml4cpp::ReplaceRules()) |
|
void | Append (const std::string &filename, std::list< scxml4cpp::Action * > *action_list, std::list< scxml4cpp::Activity * > *activity_list, const scxml4cpp::ReplaceRules &replace_rules=scxml4cpp::ReplaceRules()) |
|
void | AppendFromString (const std::string &name, const std::string &model, std::list< scxml4cpp::Action * > *action_list, std::list< scxml4cpp::Activity * > *activity_list, const scxml4cpp::ReplaceRules &replace_rules=scxml4cpp::ReplaceRules()) |
|
void | Save (const std::string &filename) |
|
std::string | GetStateMachineAsString () |
|
void | Start () |
|
void | Stop () |
|
void | PostEvent (SharedEvent e) |
|
void | ProcessEvent () |
|
void | ProcessEvent (scxml4cpp::Event *e) |
|
void | ProcessEvent (const AnyEvent &e) |
|
void | SetStatusRepresentation (const bool use_fully_qualified_state) |
|
std::string | GetStatus () const |
|
std::list< scxml4cpp::State * > | GetActiveStates () |
|
void | AddStatusListener (scxml4cpp::StatusListener *listener) |
|
void | RemoveStatusListener (scxml4cpp::StatusListener *listener) |
|
void | AddEventListener (scxml4cpp::EventListener *listener) |
|
void | RemoveEventListener (scxml4cpp::EventListener *listener) |
|
void | SetStatusPublisher (std::function< void(const std::string &)> publisher) |
|
void | PublishStatus () |
|
void | RegisterRejectHandler (const std::string &id, std::function< void(const rad::AnyEvent &, const std::string &state)> handler) |
|
template<typename T > |
void | RegisterDefaultRequestRejectHandler () |
|
void | SetLogLevel (const std::string &level) |
|
| SMAdapter (const SMAdapter &e)=delete |
|
SMAdapter & | operator= (SMAdapter &e)=delete |
|
This class can be used as skeleton application that integrates the Boost ASIO event loop and the scxml4cpp State Machine interpreter.
It allows to reuse the application start-up/initialization code.
The Application object should be created:
- after the DataContext since it needs configuration information.
- before the ActionMgr since the actions and activities gets a reference to the Application object (e.g. to be able to inject events) and therefore they should be deleted (by the ActionMgr) before the Application object.
void rad::Application::CreateReplier |
( |
const std::string & | uri | ) |
|
Creates the rad::cii::Replier object used to process the requests/commands sent to the application.
Ideally this method can be reused also to re-configured the application with a different URI. TODO unfortunately URI reconfiguration doesn't seem to work check CII/MAL.
- Parameters
-
uri | CII/MAL endpoint to be used when sending commands to the application. |
Switch the replier to a different URI.
TODO works only at the very beginning, changing to a different URI seems not to work, investigate MAL?