VSM C++ SDK
Vehicle Specific Modules SDK
wait_action.h
Go to the documentation of this file.
1 // Copyright (c) 2014, Smart Projects Holdings Ltd
2 // All rights reserved.
3 // See LICENSE file for license details.
4 
8 #ifndef _WAIT_ACTION_H_
9 #define _WAIT_ACTION_H_
10 
11 #include <ugcs/vsm/action.h>
12 #include <ugcs/vsm/mavlink.h>
13 #include <chrono>
14 
15 namespace ugcs {
16 namespace vsm {
17 
20 class Wait_action: public Action {
22 
23 public:
26  Action(Type::WAIT),
28 
34  Wait_action(const mavlink::ugcs::Pld_mission_item_ex& item) :
35  Action(Type::WAIT),
36  wait_time(0.1 * item->param1)
37  {
38  ASSERT(item->command == mavlink::MAV_CMD::MAV_CMD_CONDITION_DELAY);
39  }
40 
42  double wait_time;
43 };
44 
46 template<>
49  typedef Wait_action type;
50 };
51 
52 } /* namespace vsm */
53 } /* namespace ugcs */
54 
55 #endif /* _WAIT_ACTION_H_*/
UGCS root namespace.
Definition: android-linux/ugcs/vsm/platform_sockets.h:27
Wait_action(const mavlink::ugcs::Pld_mission_item_ex &item)
Construct wait action from Mavlink extended mission item.
Definition: wait_action.h:34
Type
Types of vehicle actions as part of task (mission).
Definition: action.h:30
double wait_time
Time to wait in seconds.
Definition: wait_action.h:42
Generic action.
Definition: action.h:22
#define ASSERT(x)
No action in release.
Definition: debug.h:68
Generic action.
Map Action type enum value to specific Action type class.
Definition: action.h:117
Wait action ugcs::vsm::Wait_action.
Wait action.
Definition: wait_action.h:20
Wait_action type
Real type.
Definition: wait_action.h:49
#define DEFINE_COMMON_CLASS(__class_name,...)
Use this macro to define some common attributes for a class.
Definition: utils.h:25