rab_medium.h
Go to the documentation of this file.
1 #ifndef RAB_MEDIUM_H
2 #define RAB_MEDIUM_H
3 
4 namespace argos {
5  class CRABMedium;
6  class CRABEquippedEntity;
7 }
8 
9 #include <argos3/core/simulator/medium/medium.h>
10 #include <argos3/core/simulator/space/positional_indices/positional_index.h>
11 #include <argos3/plugins/robots/generic/control_interface/ci_range_and_bearing_sensor.h>
12 #include <argos3/plugins/simulator/entities/rab_equipped_entity.h>
13 
14 namespace argos {
15 
16  class CRABMedium : public CMedium {
17 
18  public:
19 
23  CRABMedium();
24 
28  virtual ~CRABMedium();
29 
30  virtual void Init(TConfigurationNode& t_tree);
31  virtual void PostSpaceInit();
32  virtual void Reset();
33  virtual void Destroy();
34  virtual void Update();
35 
40  void AddEntity(CRABEquippedEntity& c_entity);
41 
46  void RemoveEntity(CRABEquippedEntity& c_entity);
47 
55 
56  private:
57 
59  typedef unordered_map<ssize_t, CSet<CRABEquippedEntity*,SEntityComparator> > TRoutingTable;
60 
62  TRoutingTable m_tRoutingTable;
63 
65  CPositionalIndex<CRABEquippedEntity>* m_pcRABEquippedEntityIndex;
66 
68  CRABEquippedEntityGridEntityUpdater* m_pcRABEquippedEntityGridUpdateOperation;
69 
70  /* Whether occlusions should be considered or not */
71  bool m_bCheckOcclusions;
72 
73  };
74 
75 }
76 
77 #endif
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
A data structure that contains positional entities.
Defines a very simple double-linked list that stores unique elements.
Definition: set.h:101
virtual void Update()
Updates the state of this medium.
Definition: rab_medium.cpp:110
void AddEntity(CRABEquippedEntity &c_entity)
Adds the specified entity to the list of managed entities.
Definition: rab_medium.cpp:202
virtual void Destroy()
Undoes whatever was done by Init().
Definition: rab_medium.cpp:94
const CSet< CRABEquippedEntity *, SEntityComparator > & GetRABsCommunicatingWith(CRABEquippedEntity &c_entity) const
Returns an immutable vector of RAB entities that can communicated with the given entity.
Definition: rab_medium.cpp:224
CRABMedium()
Class constructor.
Definition: rab_medium.cpp:14
virtual void PostSpaceInit()
Executes extra initialization activities after the space has been initialized.
Definition: rab_medium.cpp:73
void RemoveEntity(CRABEquippedEntity &c_entity)
Removes the specified entity from the list of managed entities.
Definition: rab_medium.cpp:213
virtual ~CRABMedium()
Class destructor.
Definition: rab_medium.cpp:21
virtual void Reset()
Resets the resource.
Definition: rab_medium.cpp:80
virtual void Init(TConfigurationNode &t_tree)
Initialized the medium.
Definition: rab_medium.cpp:27