VSM C++ SDK
Vehicle Specific Modules SDK
ugcs::vsm::Action Class Reference

Generic action. More...

#include <action.h>

Inheritance diagram for ugcs::vsm::Action:
ugcs::vsm::Camera_control_action ugcs::vsm::Camera_series_by_distance_action ugcs::vsm::Camera_series_by_time_action ugcs::vsm::Camera_trigger_action ugcs::vsm::Change_speed_action ugcs::vsm::Heading_action ugcs::vsm::Landing_action ugcs::vsm::Move_action ugcs::vsm::Panorama_action ugcs::vsm::Payload_steering_action ugcs::vsm::Poi_action ugcs::vsm::Repeat_servo_action ugcs::vsm::Set_home_action ugcs::vsm::Set_servo_action ugcs::vsm::Takeoff_action ugcs::vsm::Task_attributes_action ugcs::vsm::Wait_action

Classes

struct  Format_exception_dummy_struct
 Thrown when internal action representation is in a wrong format. More...
 
struct  Mapper
 Map Action type enum value to specific Action type class. More...
 
struct  Mapper< Action::Type::CAMERA_CONTROL >
 Type mapper for camera control action. More...
 
struct  Mapper< Action::Type::CAMERA_SERIES_BY_DISTANCE >
 Type mapper for camera control action. More...
 
struct  Mapper< Action::Type::CAMERA_SERIES_BY_TIME >
 Type mapper for camera control action. More...
 
struct  Mapper< Action::Type::CAMERA_TRIGGER >
 Type mapper for camera trigger action. More...
 
struct  Mapper< Action::Type::CHANGE_SPEED >
 Type mapper for change speed action. More...
 
struct  Mapper< Action::Type::HEADING >
 Type mapper for Heading action. More...
 
struct  Mapper< Action::Type::LANDING >
 Type mapper for landing action. More...
 
struct  Mapper< Action::Type::MOVE >
 Type mapper from move action. More...
 
struct  Mapper< Action::Type::PANORAMA >
 Type mapper for panorama action. More...
 
struct  Mapper< Action::Type::PAYLOAD_STEERING >
 Type mapper for payload steering action. More...
 
struct  Mapper< Action::Type::POI >
 Type mapper for POI action. More...
 
struct  Mapper< Action::Type::REPEAT_SERVO >
 Type mapper for wait action. More...
 
struct  Mapper< Action::Type::SET_HOME >
 Mapped for set home action. More...
 
struct  Mapper< Action::Type::SET_SERVO >
 Type mapper for wait action. More...
 
struct  Mapper< Action::Type::TAKEOFF >
 Mapping for take-off action. More...
 
struct  Mapper< Action::Type::TASK_ATTRIBUTES >
 Type mapper for task attributes action. More...
 
struct  Mapper< Action::Type::WAIT >
 Type mapper for wait action. More...
 

Public Types

enum  Type {
  Type::MOVE, Type::WAIT, Type::PAYLOAD_STEERING, Type::TAKEOFF,
  Type::LANDING, Type::CHANGE_SPEED, Type::SET_HOME, Type::POI,
  Type::HEADING, Type::CAMERA_CONTROL, Type::CAMERA_TRIGGER, Type::PANORAMA,
  Type::TASK_ATTRIBUTES, Type::CAMERA_SERIES_BY_TIME, Type::CAMERA_SERIES_BY_DISTANCE, Type::SET_PARAMETER,
  Type::SET_SERVO, Type::REPEAT_SERVO
}
 Types of vehicle actions as part of task (mission). More...
 
typedef std::shared_ptr< ActionPtr
 Pointer type.
 
typedef std::weak_ptr< ActionWeak_ptr
 Pointer type.
 
typedef ugcs::vsm::Param_exception< Format_exception_dummy_struct,> Format_exception
 

Public Member Functions

 Action (Type type)
 Construct action of specific type. More...
 
virtual ~Action ()
 Make sure Action is polymorphic. More...
 
Type Get_type () const
 Get action type. More...
 
void Set_id (int id)
 
std::string Get_name ()
 Get human readable name of the action. More...
 
template<Type type_val>
Mapper< type_val >::type::Ptr Get_action ()
 Get pointer to specific action as determined by Get_type. More...
 

Static Public Member Functions

template<typename... Args>
static Ptr Create (Args &&...args)
 Create an instance. More...
 

Public Attributes

int command_id = -1
 

Detailed Description

Generic action.

Specific actions are determined by Get_type method.

Member Enumeration Documentation

Types of vehicle actions as part of task (mission).

Enumerator
MOVE 

Move action ugcs::vsm::Move_action.

WAIT 

Wait action ugcs::vsm::Wait_action.

PAYLOAD_STEERING 

Payload steering action ugcs::vsm::Payload_steering_action.

TAKEOFF 

Takeoff action ugcs::vsm::Takeoff_action.

LANDING 

Landing action ugcs::vsm::Landing_action.

CHANGE_SPEED 

Change speed action ugcs::vsm::Change_speed_action.

SET_HOME 

Set home action ugcs::vsm::Set_home_action.

POI 

Point of interest ugcs::vsm::Poi_action.

HEADING 

Heading ugcs::vsm::Heading_action.

CAMERA_CONTROL 

Camera control action ugcs::vsm::Camera_control_action.

CAMERA_TRIGGER 

Camera trigger action ugcs::vsm::Camera_trigger_action.

PANORAMA 

Panorama action ugcs::vsm::Panorama_action.

TASK_ATTRIBUTES 

Task attributes action ugcs::vsm::Task_attributes_action.

CAMERA_SERIES_BY_TIME 

Continuously shot camera in regular time intervals.

CAMERA_SERIES_BY_DISTANCE 

Continuously shot camera in regular distance intervals.

SET_PARAMETER 

Set mission parameter.

see enum MAV_MISSION_PARAMETER_TYPE

SET_SERVO 

Set servo PWM.

REPEAT_SERVO 

Repeat servo movement between given PWM and 1500.

Constructor & Destructor Documentation

ugcs::vsm::Action::Action ( Type  type)
inline

Construct action of specific type.

virtual ugcs::vsm::Action::~Action ( )
inlinevirtual

Make sure Action is polymorphic.

Member Function Documentation

template<typename... Args>
static Ptr ugcs::vsm::Action::Create ( Args &&...  args)
inlinestatic

Create an instance.

template<Type type_val>
Mapper<type_val>::type::Ptr ugcs::vsm::Action::Get_action ( )
inline

Get pointer to specific action as determined by Get_type.

Returns
Non-null shared pointer to specific action if type value given in template parameter is equal with the type returned by Get_type, otherwise empty shared pointer is returned.
std::string ugcs::vsm::Action::Get_name ( )
inline

Get human readable name of the action.

Type ugcs::vsm::Action::Get_type ( ) const
inline

Get action type.


The documentation for this class was generated from the following file: