15 #include <argos3/core/simulator/entity/positional_entity.h>
16 #include <argos3/core/utility/datatypes/set.h>
17 #include <argos3/core/utility/math/vector3.h>
18 #include <argos3/core/utility/datatypes/byte_array.h>
19 #include <argos3/core/simulator/space/positional_indices/space_hash.h>
20 #include <argos3/core/simulator/space/positional_indices/grid.h>
32 typedef std::vector<CRadioEntity*>
TList;
39 const std::string& str_id,
40 Real f_transmit_range);
57 inline const std::vector<std::pair<CVector3, CByteArray> >&
GetData()
const {
66 inline std::vector<std::pair<CVector3, CByteArray> >&
GetData() {
76 m_vecData.emplace_back(c_tx_location, c_tx_data);
137 std::vector<std::pair<CVector3, CByteArray> >
m_vecData;
CRadioMedium * m_pcMedium
std::vector< std::pair< CVector3, CByteArray > > m_vecData
signed int SInt32
32-bit signed integer.
std::vector< CRadioEntity * > TList
void ReceiveData(const CVector3 &c_tx_location, const CByteArray &c_tx_data)
Adds data received by the radio.
float Real
Collects all ARGoS code.
The abstract definition of a space hash.
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
Real GetRange() const
Returns the transmission range of the radio.
void SetMedium(CRadioMedium &c_medium)
Sets the medium associated to this entity.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
CRadioMedium & GetMedium() const
Returns the medium associated to this radio.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
virtual void SetEnabled(bool b_enabled)
Enables or disables an entity.
Basic class for an entity that contains other entities.
bool HasMedium() const
Returns true if this radio is associated to a medium.
void SetRange(Real f_range)
Sets the tranmission range of the radio.
CRadioEntity(CComposableEntity *pc_parent)
virtual std::string GetTypeDescription() const
Returns a string label for this class.
Defines the basic cell updater of the space hash.
Byte array utility class.
virtual void Destroy()
Destroys the entity, undoing whatever was done by Init() or by the standalone constructor.
virtual void operator()(CAbstractSpaceHash< CRadioEntity > &c_space_hash, CRadioEntity &c_element)
Updates the necessary cells of a space hash.
The namespace containing all the ARGoS related code.
CRadioEntityGridUpdater(CGrid< CRadioEntity > &c_grid)
bool HasData() const
Checks if there has been data received by the radio.
std::vector< std::pair< CVector3, CByteArray > > & GetData()
Returns a reference to the received data.
virtual bool operator()(CRadioEntity &c_entity)
const std::vector< std::pair< CVector3, CByteArray > > & GetData() const
Returns a constant reference to the received data.