Skip to content

Class walle::Alerter

ClassList > walle > Alerter

More...

  • #include <TrackingAgent.hpp>

Public Functions

Type Name
void AddAgent (size_t id)
void AlertAllTrackingAgents (size_t caller_id)
Alerter () = delete
Alerter (cse491::WorldBase * world_ptr)
Alerter (cse491::WorldBase * world_ptr, size_t id)
std::unordered_set< size_t > const & GetNetworkSet () const
Returns an immutable reference to the Alerter 's set of agents it knows about.
void RemoveAgent (size_t id)

Detailed Description

A single Alerter is responsible for forcefully changing the state of all trackers in its network to TrackingState::TRACKING when a single TrackingAgent in the set of trackers comes into range of its goal_pos

Public Functions Documentation

function AddAgent

void walle::Alerter::AddAgent (
    size_t id
) 

Adds a TrackingAgent to the network

Parameters:

  • id id of agent to be added

function AlertAllTrackingAgents

void walle::Alerter::AlertAllTrackingAgents (
    size_t caller_id
) 

Uses UpdateState to focus all trackers onto their goal_pos regardless of the distance away

Parameters:

  • caller_id the original id of the agent that came into range of its goal_pos; does not need to be updated

function Alerter [1/3]

walle::Alerter::Alerter () = delete

function Alerter [2/3]

explicit walle::Alerter::Alerter (
    cse491::WorldBase * world_ptr
) 

Alerter constructor (only knows its world and has no agents in its network)

Parameters:

  • world_ptr the world this alerter is associated with

function Alerter [3/3]

walle::Alerter::Alerter (
    cse491::WorldBase * world_ptr,
    size_t id
) 

Alerter constructor (adds the TrackingAgent with that id to the alerter network)

Parameters:

  • id id of agent to be added
  • world_ptr the world this alerter is associated with

function GetNetworkSet

inline std::unordered_set< size_t > const & walle::Alerter::GetNetworkSet () const

function RemoveAgent

void walle::Alerter::RemoveAgent (
    size_t id
) 

Removes a TrackingAgent to the network

Parameters:

  • id id of agent to be removed

Note:

no assertions here since we may want to allow the TrackingAgent to join another network later if it's not being destructed


The documentation for this class was generated from the following file source/Agents/TrackingAgent.hpp