8 #include <argos3/plugins/simulator/entities/radio_equipped_entity.h>
16 m_pcRadioEquippedEntity(nullptr),
17 m_pcControllableEntity(nullptr),
74 for(
const std::pair<CVector3, CByteArray>& c_data : cRadio.
GetData()) {
92 s_interface.Data.clear();
101 "Michael Allwright [allsey87@gmail.com]",
104 "A generic radio sensor to receive messages from nearby radios.",
105 "This radio sensor implementation allows an arbitary number of messages\n"
106 "containing an arbitary number of bytes to be received from nearby robots. The\n"
107 "implementation is very basic and any concepts such as throughput, addressing,\n"
108 "or formatting of a message's contents is beyond the scope of this sensor's\n"
111 "This sensor is enabled by default.\n\n"
113 "REQUIRED XML CONFIGURATION\n\n"
117 " <my_controller ...>\n"
121 " <radios implementation=\"default\" medium=\"radios\" />\n"
125 " </my_controller>\n"
127 " </controllers>\n\n"
129 "The 'medium' attribute sets the id of the radio medium declared in the <media>\n"
132 "OPTIONAL XML CONFIGURATION\n\n"
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception.
The namespace containing all the ARGoS related code.
void GetNodeAttributeOrDefault(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer, const T &t_default)
Returns the value of a node's attribute, or the passed default value.
REGISTER_SENSOR(CEPuckProximityDefaultSensor, "epuck_proximity", "default", "Danesh Tarapore [daneshtarapore@gmail.com]", "1.0", "The E-Puck proximity sensor.", "This sensor accesses the epuck proximity sensor. For a complete description\n" "of its usage, refer to the ci_epuck_proximity_sensor.h interface. For the XML\n" "configuration, refer to the default proximity sensor.\n", "Usable")
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
virtual void Enable()
Enables updating of sensor information in the event loop.
virtual void Init(TConfigurationNode &t_node)
Initializes the sensor from the XML configuration tree.
Basic class for an entity that contains other entities.
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.
An entity that contains a pointer to the user-defined controller.
std::vector< std::pair< bool, CRay3 > > & GetCheckedRays()
Returns the list of checked rays.
const CVector3 & GetPosition() const
The exception that wraps all errors in ARGoS.
SInterface::TVector m_vecInterfaces
virtual void Update()
Updates the state of the entity associated to this sensor, if the sensor is currently enabled.
CControllableEntity * m_pcControllableEntity
CRadioEquippedEntity * m_pcRadioEquippedEntity
virtual void Init(TConfigurationNode &t_tree)
Initializes the sensor from the XML configuration tree.
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this sensor.
virtual void Reset()
Resets the sensor to the state it had just after Init().
const std::vector< std::pair< CVector3, CByteArray > > & GetData() const
Returns a constant reference to the received data.
A container of CRadioEntity.
SInstance::TVector & GetInstances()
Returns the radios.
CRadioEntity & GetRadio(UInt32 un_index)
Returns a radio by numeric index.