led_medium.h
Go to the documentation of this file.
1 #ifndef LED_MEDIUM_H
2 #define LED_MEDIUM_H
3 
4 namespace argos {
5  class CLEDMedium;
6  class CLEDEntity;
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/simulator/entities/led_entity.h>
12 
13 namespace argos {
14 
15  class CLEDMedium : public CMedium {
16 
17  public:
18 
22  CLEDMedium();
23 
27  virtual ~CLEDMedium();
28 
29  virtual void Init(TConfigurationNode& t_tree);
30  virtual void PostSpaceInit();
31  virtual void Reset();
32  virtual void Destroy();
33  virtual void Update();
34 
39  void AddEntity(CLEDEntity& c_entity);
40 
45  void RemoveEntity(CLEDEntity& c_entity);
46 
52  return *m_pcLEDEntityIndex;
53  }
54 
55  private:
56 
58  CPositionalIndex<CLEDEntity>* m_pcLEDEntityIndex;
59 
61  CLEDEntityGridUpdater* m_pcLEDEntityGridUpdateOperation;
62 
63  };
64 
65 }
66 
67 #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 Reset()
Resets the resource.
Definition: led_medium.cpp:76
CPositionalIndex< CLEDEntity > & GetIndex()
Returns the LED positional index.
Definition: led_medium.h:51
virtual ~CLEDMedium()
Class destructor.
Definition: led_medium.cpp:19
virtual void Init(TConfigurationNode &t_tree)
Initialized the medium.
Definition: led_medium.cpp:25
virtual void Update()
Updates the state of this medium.
Definition: led_medium.cpp:93
virtual void PostSpaceInit()
Executes extra initialization activities after the space has been initialized.
Definition: led_medium.cpp:69
void RemoveEntity(CLEDEntity &c_entity)
Removes the specified entity from the list of managed entities.
Definition: led_medium.cpp:108
CLEDMedium()
Class constructor.
Definition: led_medium.cpp:13
void AddEntity(CLEDEntity &c_entity)
Adds the specified entity to the list of managed entities.
Definition: led_medium.cpp:100
virtual void Destroy()
Undoes whatever was done by Init().
Definition: led_medium.cpp:83