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;
signed int SInt32
32-bit signed integer.
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
Basic class for an entity that contains other entities.
The abstract definition of a space hash.
Defines the basic cell updater of the space hash.
Byte array utility class.
void SetRange(Real f_range)
Sets the tranmission range of the radio.
void SetMedium(CRadioMedium &c_medium)
Sets the medium associated to this entity.
CRadioMedium & GetMedium() const
Returns the medium associated to this radio.
virtual void SetEnabled(bool b_enabled)
Enables or disables an entity.
CRadioMedium * m_pcMedium
std::vector< std::pair< CVector3, CByteArray > > & GetData()
Returns a reference to the received data.
std::vector< std::pair< CVector3, CByteArray > > m_vecData
virtual std::string GetTypeDescription() const
Returns a string label for this class.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
virtual void Destroy()
Destroys the entity, undoing whatever was done by Init() or by the standalone constructor.
bool HasMedium() const
Returns true if this radio is associated to a medium.
void ReceiveData(const CVector3 &c_tx_location, const CByteArray &c_tx_data)
Adds data received by the radio.
std::vector< CRadioEntity * > TList
CRadioEntity(CComposableEntity *pc_parent)
bool HasData() const
Checks if there has been data received by the radio.
const std::vector< std::pair< CVector3, CByteArray > > & GetData() const
Returns a constant reference to the received data.
Real GetRange() const
Returns the transmission range of the radio.
virtual void operator()(CAbstractSpaceHash< CRadioEntity > &c_space_hash, CRadioEntity &c_element)
Updates the necessary cells of a space hash.
CRadioEntityGridUpdater(CGrid< CRadioEntity > &c_grid)
virtual bool operator()(CRadioEntity &c_entity)