SMACC2
|
#include <eg_random_generator.hpp>
Public Member Functions | |
EgRandomGenerator (RandomGenerateReactorMode mode, double evAMin=1, double evAMax=4, double evBMin=5, double evBMax=8, double evCMin=9, double evCMax=12) | |
void | onEntry () override |
template<typename TState , typename TSource > | |
void | onStateAllocation () |
void | postRandomEvents () |
void | update () override |
Public Member Functions inherited from smacc2::SmaccEventGenerator | |
SmaccEventGenerator () | |
virtual | ~SmaccEventGenerator () |
template<typename TState , typename TSource > | |
void | onStateAllocation () |
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 | |
RandomGenerateReactorMode | mode_ |
Private Attributes | |
std::function< void()> | postEventA |
std::function< void()> | postEventB |
std::function< void()> | postEventC |
double | evAMin_ |
double | evAMax_ |
double | evBMin_ |
double | evBMax_ |
double | evCMin_ |
double | evCMax_ |
double | minValue |
double | maxValue |
Additional Inherited Members |
Definition at line 50 of file eg_random_generator.hpp.
smacc2::state_reactors::EgRandomGenerator::EgRandomGenerator | ( | RandomGenerateReactorMode | mode, |
double | evAMin = 1 , |
||
double | evAMax = 4 , |
||
double | evBMin = 5 , |
||
double | evBMax = 8 , |
||
double | evCMin = 9 , |
||
double | evCMax = 12 |
||
) |
Definition at line 21 of file eg_random_generator.cpp.
|
overridevirtual |
Reimplemented from smacc2::SmaccEventGenerator.
Definition at line 71 of file eg_random_generator.cpp.
References mode_, smacc2::state_reactors::ONE_SHOT, and postRandomEvents().
|
inline |
Definition at line 60 of file eg_random_generator.hpp.
References postEventA, postEventB, and postEventC.
void smacc2::state_reactors::EgRandomGenerator::postRandomEvents | ( | ) |
Definition at line 50 of file eg_random_generator.cpp.
References evAMax_, evAMin_, evBMax_, evBMin_, evCMax_, evCMin_, maxValue, minValue, postEventA, postEventB, and postEventC.
Referenced by onEntry(), and update().
|
overridevirtual |
Implements smacc2::ISmaccUpdatable.
Definition at line 79 of file eg_random_generator.cpp.
References mode_, smacc2::state_reactors::ON_UPDATE, and postRandomEvents().
|
private |
Definition at line 79 of file eg_random_generator.hpp.
Referenced by postRandomEvents().
|
private |
Definition at line 78 of file eg_random_generator.hpp.
Referenced by postRandomEvents().
|
private |
Definition at line 81 of file eg_random_generator.hpp.
Referenced by postRandomEvents().
|
private |
Definition at line 80 of file eg_random_generator.hpp.
Referenced by postRandomEvents().
|
private |
Definition at line 83 of file eg_random_generator.hpp.
Referenced by postRandomEvents().
|
private |
Definition at line 82 of file eg_random_generator.hpp.
Referenced by postRandomEvents().
|
private |
Definition at line 86 of file eg_random_generator.hpp.
Referenced by EgRandomGenerator(), and postRandomEvents().
|
private |
Definition at line 85 of file eg_random_generator.hpp.
Referenced by EgRandomGenerator(), and postRandomEvents().
RandomGenerateReactorMode smacc2::state_reactors::EgRandomGenerator::mode_ |
Definition at line 71 of file eg_random_generator.hpp.
|
private |
Definition at line 74 of file eg_random_generator.hpp.
Referenced by onStateAllocation(), and postRandomEvents().
|
private |
Definition at line 75 of file eg_random_generator.hpp.
Referenced by onStateAllocation(), and postRandomEvents().
|
private |
Definition at line 76 of file eg_random_generator.hpp.
Referenced by onStateAllocation(), and postRandomEvents().