VSM C++ SDK
Vehicle Specific Modules SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
repeat_servo_action.h
1 // Copyright (c) 2018, Smart Projects Holdings Ltd
2 // All rights reserved.
3 // See LICENSE file for license details.
4 
8 #ifndef _UGCS_VSM_REPEAT_SERVO_ACTION_H_
9 #define _UGCS_VSM_REPEAT_SERVO_ACTION_H_
10 
11 #include <ugcs/vsm/action.h>
12 #include <ugcs/vsm/mavlink.h>
13 
14 namespace ugcs {
15 namespace vsm {
16 
19 class Repeat_servo_action: public Action {
21 
22 public:
27  Action(Type::REPEAT_SERVO)
28  {
29  p.at("pwm")->Get_value(pwm);
30  p.at("servo_id")->Get_value(servo_id);
31  p.at("count")->Get_value(count);
32  p.at("delay")->Get_value(period);
33  }
34 
35  int servo_id;
36  int pwm;
37  int count;
38  float period;
39 };
40 
42 template<>
43 struct Action::Mapper<Action::Type::REPEAT_SERVO> {
46 };
47 
48 } /* namespace vsm */
49 } /* namespace ugcs */
50 
51 #endif /* _UGCS_VSM_REPEAT_SERVO_ACTION_H_*/
Definition: property.h:249
Type
Types of vehicle actions as part of task (mission).
Definition: action.h:30
Generic action.
Definition: action.h:22
Generic action.
Map Action type enum value to specific Action type class.
Definition: action.h:120
Repeat_servo_action type
Real type.
Definition: repeat_servo_action.h:45
#define DEFINE_COMMON_CLASS(__class_name,...)
Use this macro to define some common attributes for a class.
Definition: utils.h:25
Set_servo action.
Definition: repeat_servo_action.h:19