SMACC2
|
#include <eg_conditional_generator.hpp>
Public Member Functions | |
EgConditionalGenerator (ConditionalGeneratorMode mode, std::function< bool()> updatePredicate=nullptr) | |
virtual | ~EgConditionalGenerator () |
void | onEntry () override |
template<typename TState , typename TSource > | |
void | onStateAllocation () |
virtual void | update () override |
void | setPredicateFunction (std::function< bool()> updatePredicate) |
Public Member Functions inherited from smacc2::SmaccEventGenerator | |
SmaccEventGenerator () | |
virtual | ~SmaccEventGenerator () |
template<typename TState , typename TSource > | |
void | onStateAllocation () |
virtual void | onEntry () |
virtual void | onExit () |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
void | initialize (ISmaccState *ownerState) |
virtual void | onInitialized () |
Public Member Functions inherited from smacc2::ISmaccUpdatable | |
ISmaccUpdatable () | |
ISmaccUpdatable (rclcpp::Duration duration) | |
void | executeUpdate (rclcpp::Node::SharedPtr node) |
void | setUpdatePeriod (rclcpp::Duration duration) |
Public Attributes | |
ConditionalGeneratorMode | mode_ |
Private Member Functions | |
void | checkPredicateAndPost () |
Private Attributes | |
std::function< void()> | postEventTrue |
std::function< void()> | postEventFalse |
std::function< bool()> | updatePredicate_ |
Additional Inherited Members | |
virtual void | update ()=0 |
Definition at line 44 of file eg_conditional_generator.hpp.
smacc2::event_generators::EgConditionalGenerator::EgConditionalGenerator | ( | ConditionalGeneratorMode | mode, |
std::function< bool()> | updatePredicate = nullptr |
||
) |
Definition at line 21 of file eg_conditional_generator.cpp.
|
virtual |
Definition at line 27 of file eg_conditional_generator.cpp.
|
private |
Definition at line 29 of file eg_conditional_generator.cpp.
References postEventFalse, postEventTrue, and updatePredicate_.
Referenced by onEntry(), and update().
|
overridevirtual |
Reimplemented from smacc2::SmaccEventGenerator.
Definition at line 41 of file eg_conditional_generator.cpp.
References checkPredicateAndPost(), mode_, and smacc2::event_generators::ONE_SHOT.
|
inline |
Definition at line 54 of file eg_conditional_generator.hpp.
References postEventFalse, and postEventTrue.
void smacc2::event_generators::EgConditionalGenerator::setPredicateFunction | ( | std::function< bool()> | updatePredicate | ) |
Definition at line 57 of file eg_conditional_generator.cpp.
References updatePredicate_.
|
overridevirtual |
Implements smacc2::ISmaccUpdatable.
Definition at line 49 of file eg_conditional_generator.cpp.
References checkPredicateAndPost(), mode_, and smacc2::event_generators::ON_UPDATE.
ConditionalGeneratorMode smacc2::event_generators::EgConditionalGenerator::mode_ |
Definition at line 61 of file eg_conditional_generator.hpp.
|
private |
Definition at line 68 of file eg_conditional_generator.hpp.
Referenced by checkPredicateAndPost(), and onStateAllocation().
|
private |
Definition at line 67 of file eg_conditional_generator.hpp.
Referenced by checkPredicateAndPost(), and onStateAllocation().
|
private |
Definition at line 69 of file eg_conditional_generator.hpp.
Referenced by checkPredicateAndPost(), and setPredicateFunction().