radio_medium.h
Go to the documentation of this file.
1 
7 #ifndef RADIO_MEDIUM_H
8 #define RADIO_MEDIUM_H
9 
10 namespace argos {
11  class CRadioMedium;
12  class CRadioEntity;
13 }
14 
15 #include <argos3/core/simulator/medium/medium.h>
16 #include <argos3/core/simulator/space/positional_indices/positional_index.h>
17 #include <argos3/plugins/simulator/entities/radio_entity.h>
18 
19 namespace argos {
20 
21  class CRadioMedium : public CMedium {
22 
23  public:
24 
29  m_pcRadioEntityIndex(nullptr),
30  m_pcRadioEntityGridUpdateOperation(nullptr) {}
31 
35  virtual ~CRadioMedium() {}
36 
37  virtual void Init(TConfigurationNode& t_tree);
38  virtual void PostSpaceInit();
39  virtual void Reset();
40  virtual void Destroy();
41  virtual void Update();
42 
47  void AddEntity(CRadioEntity& c_entity);
48 
53  void RemoveEntity(CRadioEntity& c_entity);
54 
60  return *m_pcRadioEntityIndex;
61  }
62 
63 
64  private:
65 
67  CPositionalIndex<CRadioEntity>* m_pcRadioEntityIndex;
68 
70  CRadioEntityGridUpdater* m_pcRadioEntityGridUpdateOperation;
71 
72  };
73 
74 }
75 
76 #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.
CPositionalIndex< CRadioEntity > & GetIndex()
Returns the radio positional index.
Definition: radio_medium.h:59
virtual void Init(TConfigurationNode &t_tree)
Initialized the medium.
virtual void Destroy()
Undoes whatever was done by Init().
virtual void Update()
Updates the state of this medium.
virtual void Reset()
Resets the resource.
virtual void PostSpaceInit()
Executes extra initialization activities after the space has been initialized.
CRadioMedium()
Class constructor.
Definition: radio_medium.h:28
void AddEntity(CRadioEntity &c_entity)
Adds the specified entity to the list of managed entities.
void RemoveEntity(CRadioEntity &c_entity)
Removes the specified entity from the list of managed entities.
virtual ~CRadioMedium()
Class destructor.
Definition: radio_medium.h:35