28 #include <gz/msgs/double.pb.h>
30 #include <gz/common/Console.hh>
32 #include "../ElevatorStateMachine.hh"
34 #include "../ElevatorCommonPrivate.hh"
41 inline namespace GZ_SIM_VERSION_NAMESPACE {
55 public:
void EnqueueNewTarget(
double _target);
70 ElevatorStateMachinePrivate::ElevatorStateMachinePrivate(
85 bool enqueued =
false;
86 int32_t prevTarget = this->
system->state;
87 for (it = this->
targets.
cbegin(); it != this->targets.cend(); ++it)
89 int32_t lower = prevTarget;
91 if (upper < lower)
std::swap(lower, upper);
92 if (_target >= lower && _target < upper)
104 ss <<
"The elevator enqueued target " << _target <<
" [ ";
105 for (
const auto &target : this->
targets) ss << target <<
" ";