Warning: include(php/utility.php): Failed to open stream: No such file or directory in /home/argos/argos3/doc/api/embedded/a00435_source.php on line 2

Warning: include(): Failed opening 'php/utility.php' for inclusion (include_path='.:/usr/lib64/php') in /home/argos/argos3/doc/api/embedded/a00435_source.php on line 2
The ARGoS Website

medium.cpp
Go to the documentation of this file.
1 
7 #include "medium.h"
8 #include <argos3/core/simulator/simulator.h>
9 #include <argos3/core/simulator/space/space.h>
10 
11 namespace argos {
12 
13  /****************************************/
14  /****************************************/
15 
17  try {
18  /* Initialize space */
19  m_pcSpace = &CSimulator::GetInstance().GetSpace();
20  /* Get id from the XML */
21  GetNodeAttribute(t_tree, "id", m_strId);
22  }
23  catch(CARGoSException& ex) {
24  THROW_ARGOSEXCEPTION_NESTED("Error initializing a medium entity", ex);
25  }
26  }
27 
28  /****************************************/
29  /****************************************/
30 
31 }
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception...
virtual void Init(TConfigurationNode &t_tree)
Initialized the medium.
Definition: medium.cpp:16
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
The exception that wraps all errors in ARGoS.
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
static CSimulator & GetInstance()
Returns the instance to the CSimulator class.
Definition: simulator.cpp:78
CSpace & GetSpace() const
Returns a reference to the simulated space.
Definition: simulator.h:104