scanner_state_machine.h
Go to the documentation of this file.
1 // Copyright (c) 2020-2021 Pilz GmbH & Co. KG
2 //
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU Lesser General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public License
14 // along with this program. If not, see <https://www.gnu.org/licenses/>.
15 #ifndef PSEN_SCAN_V2_STANDALONE_SCANNER_PROTOCOL_DEF_H
16 #define PSEN_SCAN_V2_STANDALONE_SCANNER_PROTOCOL_DEF_H
17 
18 #include <functional>
19 #include <string>
20 #include <memory>
21 #include <mutex>
22 #include <chrono>
23 #include <stdexcept>
24 #include <unordered_map>
25 #include <vector>
26 #include <boost/optional.hpp>
27 
28 #define BOOST_MSM_CONSTRUCTOR_ARG_SIZE 12 // see https://www.boost.org/doc/libs/1_66_0/libs/msm/doc/HTML/ch03s05.html
29 
30 // back-end
31 #include <boost/msm/back/state_machine.hpp>
32 // front-end
33 #include <boost/msm/front/state_machine_def.hpp>
34 
35 #include <boost/msm/back/tools.hpp>
36 #include <boost/msm/back/metafunctions.hpp>
37 
39 
44 
47 
50 
58 
60 {
64 namespace protocol_layer
65 {
66 namespace msm = boost::msm;
67 namespace mpl = boost::mpl;
68 
70 
71 // clang-format off
72 #define STATE(state_name)\
73  class state_name : public msm::front::state<>\
74 {\
75  public:\
76  template <class Event, class FSM>\
77  void on_entry(Event const&, FSM& fsm);\
78  \
79  template <class Event, class FSM>\
80  void on_exit(Event const&, FSM& fsm);\
81 }
82 // clang-format on
83 
84 static constexpr std::chrono::milliseconds WATCHDOG_TIMEOUT{ 1000 };
85 static constexpr uint32_t DEFAULT_NUM_MSG_PER_ROUND{ 6 };
86 
87 using ScannerStartedCallback = std::function<void()>;
88 using ScannerStoppedCallback = std::function<void()>;
89 using StartErrorCallback = std::function<void(const std::string&)>;
90 using StopErrorCallback = std::function<void(const std::string&)>;
91 using TimeoutCallback = std::function<void()>;
92 using InformUserAboutLaserScanCallback = std::function<void(const LaserScan&)>;
93 
103 {
104 public:
105  virtual ~IWatchdogFactory() = default;
106 
107 public:
108  virtual std::unique_ptr<util::Watchdog> create(const util::Watchdog::Timeout& timeout,
109  const TimeoutCallback& timeout_callback) = 0;
110 };
111 
122 {
123 public:
124  WatchdogFactory() = default;
125  std::unique_ptr<util::Watchdog> create(const util::Watchdog::Timeout& timeout,
126  const TimeoutCallback& timeout_callback) override;
127 };
128 
129 // front-end: define the FSM structure
147 class ScannerProtocolDef : public msm::front::state_machine_def<ScannerProtocolDef>
148 {
149 public:
151  const communication_layer::NewMessageCallback& control_msg_callback,
152  const communication_layer::ErrorCallback& control_error_callback,
153  const communication_layer::ErrorCallback& start_error_callback,
154  const communication_layer::ErrorCallback& stop_error_callback,
155  const communication_layer::NewMessageCallback& data_msg_callback,
156  const communication_layer::ErrorCallback& data_error_callback,
157  const ScannerStartedCallback& scanner_started_callback,
158  const ScannerStoppedCallback& scanner_stopped_callback,
159  const InformUserAboutLaserScanCallback& laser_scan_callback,
160  const TimeoutCallback& start_timeout_callback,
161  const TimeoutCallback& monitoring_frame_timeout_callback);
162 
163 public: // States
164  STATE(Idle);
165  STATE(WaitForStartReply);
166  STATE(WaitForMonitoringFrame);
167  STATE(WaitForStopReply);
168  STATE(Stopped);
169  STATE(Error);
170 
171 public: // Action methods
172  template <class T>
173  void sendStartRequest(const T& event);
175  template <class T>
176  void sendStopRequest(const T& event);
182  void notifyUserAboutStop(scanner_events::RawReplyReceived const& reply_event);
185 
186 public: // Guards
187  bool isAcceptedStopReply(scanner_events::RawReplyReceived const& reply_event);
188  bool isUnknownStopReply(scanner_events::RawReplyReceived const& reply_event);
189  bool isRefusedStopReply(scanner_events::RawReplyReceived const& reply_event);
191  bool isUnknownStartReply(scanner_events::RawReplyReceived const& reply_event);
192  bool isRefusedStartReply(scanner_events::RawReplyReceived const& reply_event);
193 
194 public: // Replaces the default exception/no-transition responses
195  template <class FSM, class Event>
196  void exception_caught(Event const& event, FSM& fsm, std::exception& exception); // NOLINT
197 
198  template <class FSM, class Event>
199  void no_transition(Event const& event, FSM& /*unused*/, int state); // NOLINT
200 
201  template <class FSM>
202  void
203  no_transition(const scanner_events::RawMonitoringFrameReceived& /*unused*/, FSM& /*unused*/, int state); // NOLINT
204 
205 public: // Definition of state machine via table
206  typedef Idle initial_state;
208 
209  // clang-format off
213  struct transition_table : mpl::vector< // NOLINT
214  // Start Event Next Action Guard
215  // +------------------------------+----------------------------+---------------------------+--------------------------------------+-------------------------+
216  a_row < Idle, e::StartRequest, WaitForStartReply, &m::sendStartRequest >,
217  a_row < Idle, e::StopRequest, WaitForStopReply, &m::sendStopRequest >,
218  row < WaitForStartReply, e::RawReplyReceived, WaitForMonitoringFrame, &m::notifyUserAboutStart, &m::isAcceptedStartReply >,
219  row < WaitForStartReply, e::RawReplyReceived, Error, &m::notifyUserAboutRefusedStartReply, &m::isRefusedStartReply >,
220  row < WaitForStartReply, e::RawReplyReceived, Error, &m::notifyUserAboutUnknownStartReply, &m::isUnknownStartReply >,
221  a_irow < WaitForStartReply, e::StartTimeout, &m::handleStartRequestTimeout >,
222  a_irow < WaitForMonitoringFrame, e::RawMonitoringFrameReceived, &m::handleMonitoringFrame >,
223  a_irow < WaitForMonitoringFrame, e::MonitoringFrameTimeout, &m::handleMonitoringFrameTimeout >,
224  a_row < WaitForStartReply, e::StopRequest, WaitForStopReply, &m::sendStopRequest >,
225  a_row < WaitForMonitoringFrame, e::StopRequest, WaitForStopReply, &m::sendStopRequest >,
226  _irow < WaitForStopReply, e::RawMonitoringFrameReceived >,
227  row < WaitForStopReply, e::RawReplyReceived, Stopped, &m::notifyUserAboutStop, &m::isAcceptedStopReply >,
228  row < WaitForStopReply, e::RawReplyReceived, Error, &m::notifyUserAboutRefusedStopReply, &m::isRefusedStopReply >,
229  row < WaitForStopReply, e::RawReplyReceived, Error, &m::notifyUserAboutUnknownStopReply, &m::isUnknownStopReply >,
230  _irow < Stopped, e::RawMonitoringFrameReceived >
231  // +------------------------------+----------------------------+--------------------------+---------------------------------------+-------------------------+
232  > {};
233  // clang-format on
234 
235 private:
236  // LCOV_EXCL_START
242  class InternalScannerReplyError : public std::runtime_error
243  {
244  public:
245  InternalScannerReplyError(const std::string& error_msg);
246  };
247  // LCOV_EXCL_STOP
253 
261 
271  void
272  sendMessageWithMeasurements(const std::vector<data_conversion_layer::monitoring_frame::MessageStamped>& stamped_msg);
277  bool
278  framesContainMeasurements(const std::vector<data_conversion_layer::monitoring_frame::MessageStamped>& stamped_msg);
279 
280 private:
282 
283  std::unique_ptr<util::Watchdog> start_reply_watchdog_{};
284 
285  std::unique_ptr<util::Watchdog> monitoring_frame_watchdog_{};
286 
288  std::unordered_map<ScannerId, ScanBuffer> scan_buffers_{};
289 
290  boost::optional<data_conversion_layer::monitoring_frame::Message> zoneset_reference_msg_;
291 
292  // Udp Clients
295 
296  // Callbacks
302 
303  // Timeout Handler
304  const std::function<void()> start_timeout_callback_;
305  const std::function<void()> monitoring_frame_timeout_callback_;
306 
307  // Factories
309 };
310 
311 // Pick a back-end
317 using ScannerStateMachine = msm::back::state_machine<ScannerProtocolDef>;
318 
319 } // namespace protocol_layer
320 } // namespace psen_scan_v2_standalone
321 
323 
324 #endif // PSEN_SCAN_V2_STANDALONE_SCANNER_PROTOCOL_DEF_H
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isAcceptedStopReply
bool isAcceptedStopReply(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:368
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::config_
ScannerConfiguration config_
Definition: scanner_state_machine.h:281
psen_scan_v2_standalone::protocol_layer::IWatchdogFactory
Interface to create event timeout callbacks.
Definition: scanner_state_machine.h:102
psen_scan_v2_standalone::configuration::ScannerId
ScannerId
Definition: scanner_ids.h:27
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::notifyUserAboutRefusedStartReply
void notifyUserAboutRefusedStartReply(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:219
psen_scan_v2_standalone::communication_layer::UdpClientImpl
Helper for asynchronously sending and receiving data via UDP.
Definition: udp_client.h:74
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::checkForInternalErrors
void checkForInternalErrors(const data_conversion_layer::scanner_reply::Message &msg)
Definition: scanner_state_machine_def.h:326
monitoring_frame_msg.h
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::InternalScannerReplyError
Exception thrown when something goes wrong with the scanner reply.
Definition: scanner_state_machine.h:242
Error
Error
ip_conversion.h
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::STATE
STATE(Idle)
psen_scan_v2_standalone::util::Watchdog::Timeout
const std::chrono::high_resolution_clock::duration Timeout
Definition: watchdog.h:42
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isUnknownStartReply
bool isUnknownStartReply(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:354
watchdog.h
start_request.h
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::scanner_started_callback_
const ScannerStartedCallback scanner_started_callback_
Definition: scanner_state_machine.h:297
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::notifyUserAboutUnknownStopReply
void notifyUserAboutUnknownStopReply(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:224
format_range.h
psen_scan_v2_standalone::protocol_layer::IWatchdogFactory::~IWatchdogFactory
virtual ~IWatchdogFactory()=default
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isStartReply
bool isStartReply(data_conversion_layer::scanner_reply::Message const &msg)
Definition: scanner_state_machine_def.h:404
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::exception_caught
void exception_caught(Event const &event, FSM &fsm, std::exception &exception)
Definition: scanner_state_machine_def.h:438
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::framesContainMeasurements
bool framesContainMeasurements(const std::vector< data_conversion_layer::monitoring_frame::MessageStamped > &stamped_msg)
Definition: scanner_state_machine_def.h:295
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::data_client_
communication_layer::UdpClientImpl data_client_
Definition: scanner_state_machine.h:294
scanner_events.h
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::handleMonitoringFrame
void handleMonitoringFrame(const scanner_events::RawMonitoringFrameReceived &event)
Definition: scanner_state_machine_def.h:179
psen_scan_v2_standalone::protocol_layer::ScannerStoppedCallback
std::function< void()> ScannerStoppedCallback
Definition: scanner_state_machine.h:88
psen_scan_v2_standalone::protocol_layer::WatchdogFactory
Watchdog factory implementation for scanner interaction timeouts.
Definition: scanner_state_machine.h:121
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::InternalScannerReplyError::InternalScannerReplyError
InternalScannerReplyError(const std::string &error_msg)
Definition: scanner_state_machine_def.h:320
scanner_reply_msg.h
psen_scan_v2_standalone::protocol_layer::ScannerStateMachine
msm::back::state_machine< ScannerProtocolDef > ScannerStateMachine
State machine handling all events according to the scanner protocol and error handling specification.
Definition: scanner_state_machine.h:317
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::informUserAboutTheScanData
void informUserAboutTheScanData(const data_conversion_layer::monitoring_frame::MessageStamped &stamped_msg)
Definition: scanner_state_machine_def.h:256
psen_scan_v2_standalone::protocol_layer::scanner_events::RawReplyReceived
Received Start- or Stop-Reply message from scanner device.
Definition: scanner_events.h:48
psen_scan_v2_standalone::protocol_layer::InformUserAboutLaserScanCallback
std::function< void(const LaserScan &)> InformUserAboutLaserScanCallback
Definition: scanner_state_machine.h:92
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isRefusedReply
bool isRefusedReply(data_conversion_layer::scanner_reply::Message const &msg)
Definition: scanner_state_machine_def.h:399
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::initial_state
Idle initial_state
Definition: scanner_state_machine.h:206
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::sendMessageWithMeasurements
void sendMessageWithMeasurements(const std::vector< data_conversion_layer::monitoring_frame::MessageStamped > &stamped_msg)
Definition: scanner_state_machine_def.h:277
psen_scan_v2_standalone::protocol_layer::DEFAULT_NUM_MSG_PER_ROUND
static constexpr uint32_t DEFAULT_NUM_MSG_PER_ROUND
Definition: scanner_state_machine.h:85
psen_scan_v2_standalone::protocol_layer::scanner_events::StartTimeout
Timeout while waiting for scanner device to start.
Definition: scanner_events.h:43
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isRefusedStopReply
bool isRefusedStopReply(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:382
scanner_reply_serialization_deserialization.h
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isUnknownStopReply
bool isUnknownStopReply(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:375
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::notifyUserAboutRefusedStopReply
void notifyUserAboutRefusedStopReply(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:231
psen_scan_v2_standalone::protocol_layer::WatchdogFactory::create
std::unique_ptr< util::Watchdog > create(const util::Watchdog::Timeout &timeout, const TimeoutCallback &timeout_callback) override
Definition: scanner_v2.cpp:35
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::watchdog_factory_
WatchdogFactory watchdog_factory_
Definition: scanner_state_machine.h:308
psen_scan_v2_standalone::protocol_layer::ScannerStartedCallback
std::function< void()> ScannerStartedCallback
Definition: scanner_state_machine.h:87
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::handleMonitoringFrameTimeout
void handleMonitoringFrameTimeout(const scanner_events::MonitoringFrameTimeout &event)
Definition: scanner_state_machine_def.h:308
psen_scan_v2_standalone::protocol_layer::IWatchdogFactory::create
virtual std::unique_ptr< util::Watchdog > create(const util::Watchdog::Timeout &timeout, const TimeoutCallback &timeout_callback)=0
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::monitoring_frame_watchdog_
std::unique_ptr< util::Watchdog > monitoring_frame_watchdog_
Definition: scanner_state_machine.h:285
psen_scan_v2_standalone::data_conversion_layer::scanner_reply::Message
Higher level data type representing a reply message from the scanner.
Definition: scanner_reply_msg.h:33
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::checkForChangedActiveZoneset
void checkForChangedActiveZoneset(const data_conversion_layer::monitoring_frame::Message &msg)
Definition: scanner_state_machine_def.h:246
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::no_transition
void no_transition(Event const &event, FSM &, int state)
Definition: scanner_state_machine_def.h:447
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::notifyUserAboutStart
void notifyUserAboutStart(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:201
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isUnknownReply
bool isUnknownReply(data_conversion_layer::scanner_reply::Message const &msg)
Definition: scanner_state_machine_def.h:394
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::transition_table
Table describing the state machine which is specified in the scanner protocol.
Definition: scanner_state_machine.h:213
psen_scan_v2_standalone::data_conversion_layer::monitoring_frame::MessageStamped
Wrapping class for a Message and its corresponding timestamp.
Definition: monitoring_frame_msg.h:109
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isRefusedStartReply
bool isRefusedStartReply(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:361
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::start_timeout_callback_
const std::function< void()> start_timeout_callback_
Definition: scanner_state_machine.h:304
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::inform_user_about_laser_scan_callback_
const InformUserAboutLaserScanCallback inform_user_about_laser_scan_callback_
Definition: scanner_state_machine.h:301
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::ScannerProtocolDef
ScannerProtocolDef(const ScannerConfiguration &config, const communication_layer::NewMessageCallback &control_msg_callback, const communication_layer::ErrorCallback &control_error_callback, const communication_layer::ErrorCallback &start_error_callback, const communication_layer::ErrorCallback &stop_error_callback, const communication_layer::NewMessageCallback &data_msg_callback, const communication_layer::ErrorCallback &data_error_callback, const ScannerStartedCallback &scanner_started_callback, const ScannerStoppedCallback &scanner_stopped_callback, const InformUserAboutLaserScanCallback &laser_scan_callback, const TimeoutCallback &start_timeout_callback, const TimeoutCallback &monitoring_frame_timeout_callback)
Definition: scanner_state_machine_def.h:23
scan_buffer.h
scanner_state_machine_def.h
psen_scan_v2_standalone::protocol_layer::StopErrorCallback
std::function< void(const std::string &)> StopErrorCallback
Definition: scanner_state_machine.h:90
psen_scan_v2_standalone::protocol_layer::scanner_events::MonitoringFrameTimeout
Timeout while waiting for MonitoringFrame.
Definition: scanner_events.h:87
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::m
ScannerProtocolDef m
Definition: scanner_state_machine.h:207
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::scanner_stopped_callback_
const ScannerStoppedCallback scanner_stopped_callback_
Definition: scanner_state_machine.h:298
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::start_error_callback_
const StartErrorCallback start_error_callback_
Definition: scanner_state_machine.h:299
scanner_ids.h
stop_request_serialization.h
psen_scan_v2_standalone::protocol_layer::scanner_events::RawMonitoringFrameReceived
Received monitoring frame from scanner device.
Definition: scanner_events.h:70
laserscan_conversions.h
psen_scan_v2_standalone::protocol_layer::WATCHDOG_TIMEOUT
static constexpr std::chrono::milliseconds WATCHDOG_TIMEOUT
Definition: scanner_state_machine.h:84
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::handleStartRequestTimeout
void handleStartRequestTimeout(const scanner_events::StartTimeout &event)
Definition: scanner_state_machine_def.h:162
psen_scan_v2_standalone::LaserScan
This class represents a single laser scan in the <tf_prefix> target frame.
Definition: laserscan.h:47
logging.h
psen_scan_v2_standalone
Root namespace in which the software components to communicate with the scanner (firmware-version: 2)...
Definition: udp_client.h:41
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::notifyUserAboutUnknownStartReply
void notifyUserAboutUnknownStartReply(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:211
psen_scan_v2_standalone::protocol_layer::WatchdogFactory::WatchdogFactory
WatchdogFactory()=default
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::scan_buffers_
std::unordered_map< ScannerId, ScanBuffer > scan_buffers_
Definition: scanner_state_machine.h:288
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isStopReply
bool isStopReply(data_conversion_layer::scanner_reply::Message const &msg)
Definition: scanner_state_machine_def.h:409
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::start_reply_watchdog_
std::unique_ptr< util::Watchdog > start_reply_watchdog_
Definition: scanner_state_machine.h:283
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::stop_error_callback_
const StopErrorCallback stop_error_callback_
Definition: scanner_state_machine.h:300
psen_scan_v2_standalone::data_conversion_layer::monitoring_frame::Message
Higher level data type representing a single monitoring frame.
Definition: monitoring_frame_msg.h:62
monitoring_frame_deserialization.h
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::zoneset_reference_msg_
boost::optional< data_conversion_layer::monitoring_frame::Message > zoneset_reference_msg_
Definition: scanner_state_machine.h:290
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef
Definition of the scanner protocol. It is initialized using the StateMachineArgs class.
Definition: scanner_state_machine.h:147
psen_scan_v2_standalone::communication_layer::ErrorCallback
std::function< void(const std::string &)> ErrorCallback
Definition: udp_client.h:50
psen_scan_v2_standalone::communication_layer::NewMessageCallback
std::function< void(const data_conversion_layer::RawDataConstPtr &, const std::size_t &, const int64_t &timestamp)> NewMessageCallback
Definition: udp_client.h:49
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::checkForDiagnosticErrors
void checkForDiagnosticErrors(const data_conversion_layer::monitoring_frame::Message &msg)
Definition: scanner_state_machine_def.h:236
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::sendStopRequest
void sendStopRequest(const T &event)
Definition: scanner_state_machine_def.h:172
laserscan.h
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isAcceptedReply
bool isAcceptedReply(data_conversion_layer::scanner_reply::Message const &msg)
Definition: scanner_state_machine_def.h:389
psen_scan_v2_standalone::protocol_layer::TimeoutCallback
std::function< void()> TimeoutCallback
Definition: scanner_state_machine.h:91
psen_scan_v2_standalone::protocol_layer::StartErrorCallback
std::function< void(const std::string &)> StartErrorCallback
Definition: scanner_state_machine.h:89
udp_client.h
config
config
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::sendStartRequest
void sendStartRequest(const T &event)
Definition: scanner_state_machine_def.h:148
psen_scan_v2_standalone::protocol_layer::scanner_events
Contains the events needed to define and implement the scanner protocol.
Definition: scanner_events.h:30
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::monitoring_frame_timeout_callback_
const std::function< void()> monitoring_frame_timeout_callback_
Definition: scanner_state_machine.h:305
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::control_client_
communication_layer::UdpClientImpl control_client_
Definition: scanner_state_machine.h:293
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::notifyUserAboutStop
void notifyUserAboutStop(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:206
psen_scan_v2_standalone::protocol_layer::ScannerProtocolDef::isAcceptedStartReply
bool isAcceptedStartReply(scanner_events::RawReplyReceived const &reply_event)
Definition: scanner_state_machine_def.h:347
psen_scan_v2_standalone::ScannerConfiguration
Higher level data type storing the configuration details of the scanner like scanner IP,...
Definition: scanner_configuration.h:34


psen_scan_v2
Author(s): Pilz GmbH + Co. KG
autogenerated on Sat Jun 22 2024 02:46:12