8 #include <argos3/core/simulator/simulator.h> 
    9 #include <argos3/core/simulator/space/space.h> 
   10 #include <argos3/plugins/simulator/media/radio_medium.h> 
   36                                               const std::string& str_id) :
 
   50          for(itRadio = itRadio.begin(&t_tree);
 
   51              itRadio != itRadio.end();
 
   55             pcRadio->
Init(*itRadio);
 
   59             std::string strAnchorId;
 
   90          s_instance.Anchor.Enable();
 
  102          s_instance.Anchor.Disable();
 
  111                    "CRadioEquippedEntity::GetRadio(), id=\"" <<
 
  113                    "\": index out of bounds: un_index = " <<
 
  115                    ", m_vecInstances.size() = " <<
 
  126          if(s_instance.Radio.IsEnabled()) {
 
  127             cPosition = s_instance.Offset;
 
  128             cPosition.
Rotate(s_instance.Anchor.Orientation);
 
  129             cPosition += s_instance.Anchor.Position;
 
  130             s_instance.Radio.SetPosition(cPosition);
 
  140          s_instance.Radio.SetMedium(c_medium);
 
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree. 
SInstance::TVector m_vecInstances
List of the radios managed by this entity. 
void Enable()
Enables the entity. 
CVector3 & Rotate(const CQuaternion &c_quaternion)
Rotates this vector by the given quaternion. 
ticpp::Element TConfigurationNode
The ARGoS configuration XML node. 
This entity is a link to a body in the physics engine. 
#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)
Initializes the state of the entity from the XML configuration tree. 
#define ARGOS_ASSERT(condition, message)
When code is compiled in debug, this macro throws an ARGoS exception with the passed message if the s...
unsigned int UInt32
32-bit unsigned integer. 
Basic class for an entity that contains other entities. 
CRadioEntity & GetRadio(UInt32 un_index)
Returns a radio by numeric index. 
An anchor related to the body of an entity. 
void AddComponent(CEntity &c_component)
Adds a component to this composable entity. 
void SetMedium(CRadioMedium &c_medium)
Sets the medium associated to this entity. 
ticpp::Iterator< ticpp::Element > TConfigurationNodeIterator
The iterator for the ARGoS configuration XML node. 
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute. 
A container of CRadioEntity. 
The exception that wraps all errors in ARGoS. 
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree. 
virtual void UpdateComponents()
Calls the Update() method on all the components. 
void Disable()
Disables the entity. 
CRadioEquippedEntity(CComposableEntity *pc_parent)
Class constructor. 
const SAnchor & GetAnchor(const std::string &str_id) const 
Returns the wanted anchor as a const reference. 
const std::string & GetId() const 
Returns the id of this entity. 
CComposableEntity & GetParent()
Returns this entity's parent. 
REGISTER_STANDARD_SPACE_OPERATIONS_ON_COMPOSABLE(CComposableEntity)
The namespace containing all the ARGoS related code. 
std::string GetContext() const 
Returns the context of this entity. 
SInstance(CRadioEntity &c_radio, SAnchor &s_anchor, const CVector3 &c_offset)
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.