GAMS  1.4.0
gams::variables::Agent Class Reference

A container for agent information. More...

#include <Agent.h>

Public Member Functions

 Agent ()
 Constructor. More...
 
 ~Agent ()
 Destructor. More...
 
void init_vars (madara::knowledge::KnowledgeBase &knowledge, const madara::knowledge::KnowledgeRecord::Integer &id)
 Initializes variable containers. More...
 
void init_vars (madara::knowledge::KnowledgeBase &knowledge, const std::string &prefix)
 Initializes variable containers. More...
 
void init_vars (madara::knowledge::Variables &knowledge, const madara::knowledge::KnowledgeRecord::Integer &id)
 Initializes variable containers. More...
 
void operator= (const Agent &agent)
 Assignment operator. More...
 

Static Public Member Functions

static bool is_agent (madara::knowledge::KnowledgeBase &knowledge, const std::string prefix)
 Checks if the prefix points to an agent in the knowledge base. More...
 

Public Attributes

madara::knowledge::containers::NativeDoubleArray acceleration
 the acceleration vector of the platform More...
 
AccentStatuses accents
 container for accents More...
 
madara::knowledge::containers::String algorithm
 agent specific command More...
 
madara::knowledge::containers::Integer algorithm_accepts
 number of algorithm accepts / changes More...
 
madara::knowledge::containers::Map algorithm_args
 arguments for algorithm More...
 
madara::knowledge::containers::Integer algorithm_changed
 agent specific command has changed More...
 
madara::knowledge::containers::Integer algorithm_id
 the algorithm id(useful if algorithm requests may need to be resent) More...
 
madara::knowledge::containers::Integer algorithm_rejects
 number of algorithm rejections(bad name or id) More...
 
madara::knowledge::containers::Integer battery_remaining
 the battery indicator for this agent More...
 
madara::knowledge::containers::Integer bridge_id
 indicator for whether or not the agent is busy with a mission More...
 
madara::knowledge::containers::String coverage_type
 agent specific command More...
 
madara::knowledge::containers::Double desired_altitude
 desired altitude in meters More...
 
madara::knowledge::containers::NativeDoubleArray dest
 the destination location More...
 
madara::knowledge::containers::NativeDoubleArray dest_orientation
 the destination orientation More...
 
madara::knowledge::containers::Integer gams_debug_level
 the GAMS debug level More...
 
madara::knowledge::containers::NativeDoubleArray home
 the home location More...
 
madara::knowledge::containers::Integer is_mobile
 the mobility indicator for this agent(true if mobile) More...
 
madara::knowledge::containers::String last_algorithm
 Last command. More...
 
madara::knowledge::containers::Map last_algorithm_args
 Last command args. More...
 
madara::knowledge::containers::Integer last_algorithm_id
 Last command. More...
 
madara::knowledge::containers::NativeDoubleArray location
 the location, usually encoded in GPS, for this agent More...
 
madara::knowledge::containers::Double loop_hz
 the rate to process the algorithm and platform MAPE loop More...
 
madara::knowledge::containers::Integer madara_debug_level
 the MADARA debug level More...
 
madara::knowledge::containers::Double min_alt
 the minimum altitude for this agent More...
 
madara::knowledge::containers::String next_coverage_type
 indicator for next type of area coverage requested(queue like) More...
 
madara::knowledge::containers::NativeDoubleArray orientation
 the angle for this device(roll, pitch, yaw) More...
 
std::string prefix
 the prefix for this agent More...
 
madara::knowledge::containers::Integer search_area_id
 indicator for next assigned search area id More...
 
madara::knowledge::containers::Double send_hz
 the rate to send messages More...
 
madara::knowledge::containers::NativeDoubleArray source
 the source location More...
 
madara::knowledge::containers::NativeDoubleArray source_orientation
 the source angle More...
 
madara::knowledge::containers::Double temperature
 indicator for temperature More...
 
madara::knowledge::containers::NativeDoubleArray velocity
 the velocity vector of the platform More...
 

Protected Member Functions

void init_variable_settings ()
 Set variable settings. More...
 

Static Protected Member Functions

static std::string make_variable_name (const madara::knowledge::KnowledgeRecord::Integer &id)
 Create agent/local agent name. More...
 

Detailed Description

A container for agent information.

Definition at line 79 of file Agent.h.

Constructor & Destructor Documentation

◆ Agent()

gams::variables::Agent::Agent ( )

Constructor.

◆ ~Agent()

gams::variables::Agent::~Agent ( )

Destructor.

Member Function Documentation

◆ init_variable_settings()

void gams::variables::Agent::init_variable_settings ( )
protected

Set variable settings.

◆ init_vars() [1/3]

void gams::variables::Agent::init_vars ( madara::knowledge::KnowledgeBase &  knowledge,
const madara::knowledge::KnowledgeRecord::Integer &  id 
)

Initializes variable containers.

Parameters
knowledgethe variable context
idnode identifier

◆ init_vars() [2/3]

void gams::variables::Agent::init_vars ( madara::knowledge::KnowledgeBase &  knowledge,
const std::string &  prefix 
)

Initializes variable containers.

Parameters
knowledgethe variable context
prefixthe prefix of the agent in the knowledge base

◆ init_vars() [3/3]

void gams::variables::Agent::init_vars ( madara::knowledge::Variables &  knowledge,
const madara::knowledge::KnowledgeRecord::Integer &  id 
)

Initializes variable containers.

Parameters
knowledgethe variable context
idnode identifier

◆ is_agent()

static bool gams::variables::Agent::is_agent ( madara::knowledge::KnowledgeBase &  knowledge,
const std::string  prefix 
)
static

Checks if the prefix points to an agent in the knowledge base.

This is a simple check that looks for prefix.location being set.

◆ make_variable_name()

static std::string gams::variables::Agent::make_variable_name ( const madara::knowledge::KnowledgeRecord::Integer &  id)
staticprotected

Create agent/local agent name.

Parameters
idid of agent as string
Returns
agent variable name

◆ operator=()

void gams::variables::Agent::operator= ( const Agent agent)

Assignment operator.

Parameters
agentagent to copy

Member Data Documentation

◆ acceleration

madara::knowledge::containers::NativeDoubleArray gams::variables::Agent::acceleration

the acceleration vector of the platform

Definition at line 130 of file Agent.h.

◆ accents

AccentStatuses gams::variables::Agent::accents

container for accents

Definition at line 211 of file Agent.h.

◆ algorithm

madara::knowledge::containers::String gams::variables::Agent::algorithm

agent specific command

Definition at line 139 of file Agent.h.

◆ algorithm_accepts

madara::knowledge::containers::Integer gams::variables::Agent::algorithm_accepts

number of algorithm accepts / changes

Definition at line 148 of file Agent.h.

◆ algorithm_args

madara::knowledge::containers::Map gams::variables::Agent::algorithm_args

arguments for algorithm

Definition at line 154 of file Agent.h.

◆ algorithm_changed

madara::knowledge::containers::Integer gams::variables::Agent::algorithm_changed

agent specific command has changed

Definition at line 151 of file Agent.h.

◆ algorithm_id

madara::knowledge::containers::Integer gams::variables::Agent::algorithm_id

the algorithm id(useful if algorithm requests may need to be resent)

Definition at line 142 of file Agent.h.

◆ algorithm_rejects

madara::knowledge::containers::Integer gams::variables::Agent::algorithm_rejects

number of algorithm rejections(bad name or id)

Definition at line 145 of file Agent.h.

◆ battery_remaining

madara::knowledge::containers::Integer gams::variables::Agent::battery_remaining

the battery indicator for this agent

Definition at line 133 of file Agent.h.

◆ bridge_id

madara::knowledge::containers::Integer gams::variables::Agent::bridge_id

indicator for whether or not the agent is busy with a mission

Definition at line 136 of file Agent.h.

◆ coverage_type

madara::knowledge::containers::String gams::variables::Agent::coverage_type

agent specific command

Definition at line 166 of file Agent.h.

◆ desired_altitude

madara::knowledge::containers::Double gams::variables::Agent::desired_altitude

desired altitude in meters

Definition at line 169 of file Agent.h.

◆ dest

madara::knowledge::containers::NativeDoubleArray gams::variables::Agent::dest

the destination location

Definition at line 172 of file Agent.h.

◆ dest_orientation

madara::knowledge::containers::NativeDoubleArray gams::variables::Agent::dest_orientation

the destination orientation

Definition at line 175 of file Agent.h.

◆ gams_debug_level

madara::knowledge::containers::Integer gams::variables::Agent::gams_debug_level

the GAMS debug level

Definition at line 217 of file Agent.h.

◆ home

madara::knowledge::containers::NativeDoubleArray gams::variables::Agent::home

the home location

Definition at line 178 of file Agent.h.

◆ is_mobile

madara::knowledge::containers::Integer gams::variables::Agent::is_mobile

the mobility indicator for this agent(true if mobile)

Definition at line 181 of file Agent.h.

◆ last_algorithm

madara::knowledge::containers::String gams::variables::Agent::last_algorithm

Last command.

Definition at line 157 of file Agent.h.

◆ last_algorithm_args

madara::knowledge::containers::Map gams::variables::Agent::last_algorithm_args

Last command args.

Definition at line 163 of file Agent.h.

◆ last_algorithm_id

madara::knowledge::containers::Integer gams::variables::Agent::last_algorithm_id

Last command.

Definition at line 160 of file Agent.h.

◆ location

madara::knowledge::containers::NativeDoubleArray gams::variables::Agent::location

the location, usually encoded in GPS, for this agent

Definition at line 184 of file Agent.h.

◆ loop_hz

madara::knowledge::containers::Double gams::variables::Agent::loop_hz

the rate to process the algorithm and platform MAPE loop

Definition at line 223 of file Agent.h.

◆ madara_debug_level

madara::knowledge::containers::Integer gams::variables::Agent::madara_debug_level

the MADARA debug level

Definition at line 214 of file Agent.h.

◆ min_alt

madara::knowledge::containers::Double gams::variables::Agent::min_alt

the minimum altitude for this agent

Definition at line 190 of file Agent.h.

◆ next_coverage_type

madara::knowledge::containers::String gams::variables::Agent::next_coverage_type

indicator for next type of area coverage requested(queue like)

Definition at line 193 of file Agent.h.

◆ orientation

madara::knowledge::containers::NativeDoubleArray gams::variables::Agent::orientation

the angle for this device(roll, pitch, yaw)

Definition at line 187 of file Agent.h.

◆ prefix

std::string gams::variables::Agent::prefix

the prefix for this agent

Definition at line 226 of file Agent.h.

◆ search_area_id

madara::knowledge::containers::Integer gams::variables::Agent::search_area_id

indicator for next assigned search area id

Definition at line 196 of file Agent.h.

◆ send_hz

madara::knowledge::containers::Double gams::variables::Agent::send_hz

the rate to send messages

Definition at line 220 of file Agent.h.

◆ source

madara::knowledge::containers::NativeDoubleArray gams::variables::Agent::source

the source location

Definition at line 199 of file Agent.h.

◆ source_orientation

madara::knowledge::containers::NativeDoubleArray gams::variables::Agent::source_orientation

the source angle

Definition at line 202 of file Agent.h.

◆ temperature

madara::knowledge::containers::Double gams::variables::Agent::temperature

indicator for temperature

Definition at line 205 of file Agent.h.

◆ velocity

madara::knowledge::containers::NativeDoubleArray gams::variables::Agent::velocity

the velocity vector of the platform

Definition at line 208 of file Agent.h.


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