directional_led_medium.h
Go to the documentation of this file.
1 
7 #ifndef DIRECTIONAL_LED_MEDIUM_H
8 #define DIRECTIONAL_LED_MEDIUM_H
9 
10 namespace argos {
11  class CDirectionalLEDMedium;
12  class CDirectionalLEDEntity;
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/directional_led_entity.h>
18 
19 namespace argos {
20 
21  class CDirectionalLEDMedium : public CMedium {
22 
23  public:
24 
29  m_pcDirectionalLEDEntityIndex(nullptr),
30  m_pcDirectionalLEDEntityGridUpdateOperation(nullptr) {}
31 
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(CDirectionalLEDEntity& c_entity);
48 
53  void RemoveEntity(CDirectionalLEDEntity& c_entity);
54 
60  return *m_pcDirectionalLEDEntityIndex;
61  }
62 
63  private:
64 
66  CPositionalIndex<CDirectionalLEDEntity>* m_pcDirectionalLEDEntityIndex;
67 
69  CDirectionalLEDEntityGridUpdater* m_pcDirectionalLEDEntityGridUpdateOperation;
70 
71  };
72 
73 }
74 
75 #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.
virtual void PostSpaceInit()
Executes extra initialization activities after the space has been initialized.
CPositionalIndex< CDirectionalLEDEntity > & GetIndex()
Returns the directional LED positional index.
virtual void Reset()
Resets the resource.
void RemoveEntity(CDirectionalLEDEntity &c_entity)
Removes the specified entity from the list of managed entities.
virtual void Init(TConfigurationNode &t_tree)
Initialized the medium.
virtual void Destroy()
Undoes whatever was done by Init().
CDirectionalLEDMedium()
Class constructor.
virtual ~CDirectionalLEDMedium()
Class destructor.
virtual void Update()
Updates the state of this medium.
void AddEntity(CDirectionalLEDEntity &c_entity)
Adds the specified entity to the list of managed entities.