|
ARGoS 3
A parallel, multi-engine simulator for swarm robotics
|
#include <radio_entity.h>
Inheritance diagram for argos::CRadioEntity:Public Types | |
| typedef std::vector< CRadioEntity * > | TList |
Public Types inherited from argos::CEntity | |
| typedef std::vector< CEntity * > | TVector |
| A vector of entities. | |
| typedef unordered_map< std::string, CEntity * > | TMap |
| A map of entities. | |
| typedef std::multimap< std::string, CEntity * > | TMultiMap |
| A multi-map of entities. | |
Public Member Functions | |
| ENABLE_VTABLE () | |
| CRadioEntity (CComposableEntity *pc_parent) | |
| CRadioEntity (CComposableEntity *pc_parent, const std::string &str_id, Real f_transmit_range) | |
| virtual | ~CRadioEntity () |
| 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 called. | |
| virtual void | Destroy () |
| Destroys the entity, undoing whatever was done by Init() or by the standalone constructor. | |
| virtual void | SetEnabled (bool b_enabled) |
| Enables or disables an entity. | |
| const std::vector< std::pair< CVector3, CByteArray > > & | GetData () const |
| Returns a constant reference to the received data. | |
| std::vector< std::pair< CVector3, CByteArray > > & | GetData () |
| Returns a reference to the received data. | |
| void | ReceiveData (const CVector3 &c_tx_location, const CByteArray &c_tx_data) |
| Adds data received by the radio. | |
| bool | HasData () const |
| Checks if there has been data received by the radio. | |
| Real | GetRange () const |
| Returns the transmission range of the radio. | |
| void | SetRange (Real f_range) |
| Sets the tranmission range of the radio. | |
| virtual std::string | GetTypeDescription () const |
| Returns a string label for this class. | |
| bool | HasMedium () const |
Returns true if this radio is associated to a medium. | |
| CRadioMedium & | GetMedium () const |
| Returns the medium associated to this radio. | |
| void | SetMedium (CRadioMedium &c_medium) |
| Sets the medium associated to this entity. | |
Public Member Functions inherited from argos::CPositionalEntity | |
| ENABLE_VTABLE () | |
| CPositionalEntity (CComposableEntity *pc_parent) | |
| CPositionalEntity (CComposableEntity *pc_parent, const std::string &str_id, const CVector3 &c_position=CVector3(), const CQuaternion &c_orientation=CQuaternion()) | |
| const CVector3 & | GetPosition () const |
| const CVector3 & | GetInitPosition () const |
| void | SetPosition (const CVector3 &c_position) |
| void | SetInitPosition (const CVector3 &c_position) |
| const CQuaternion & | GetOrientation () const |
| const CQuaternion & | GetInitOrientation () const |
| void | SetOrientation (const CQuaternion c_orientation) |
| void | SetInitOrientation (const CQuaternion c_orientation) |
| virtual void | MoveTo (const CVector3 &c_position, const CQuaternion &c_orientation) |
Public Member Functions inherited from argos::CEntity | |
| ENABLE_VTABLE () | |
| CEntity (CComposableEntity *pc_parent) | |
| Class constructor. | |
| CEntity (CComposableEntity *pc_parent, const std::string &str_id) | |
| Class constructor. | |
| virtual | ~CEntity () |
| Class destructor. | |
| const std::string & | GetId () const |
| Returns the id of this entity. | |
| std::string | GetContext () const |
| Returns the context of this entity. | |
| bool | HasParent () const |
Returns true if this entity has a parent. | |
| CEntity & | GetRootEntity () |
| Returns the root entity containing this entity. | |
| const CEntity & | GetRootEntity () const |
| Returns the root entity containing this entity. | |
| CComposableEntity & | GetParent () |
| Returns this entity's parent. | |
| const CComposableEntity & | GetParent () const |
| Returns this entity's parent. | |
| void | SetParent (CComposableEntity &c_parent) |
| Sets this entity's parent. | |
| virtual void | Update () |
| Updates the state of this entity. | |
| ssize_t | GetIndex () const |
| Returns the entity index. | |
| void | SetIndex (ssize_t n_idx) |
| Sets the entity index. | |
| bool | IsEnabled () const |
Returns true if the entity is enabled. | |
| void | Enable () |
| Enables the entity. | |
| void | Disable () |
| Disables the entity. | |
| TConfigurationNode * | GetConfigurationNode () |
| Returns a pointer to the configuration node that was used to create this entity. | |
Public Member Functions inherited from argos::CBaseConfigurableResource | |
| virtual | ~CBaseConfigurableResource () |
| Class destructor. | |
Public Member Functions inherited from argos::EnableVTableFor< CEntity > | |
| size_t | GetTagHelper (const DERIVED *) const |
Protected Attributes | |
| Real | m_fRange |
| std::vector< std::pair< CVector3, CByteArray > > | m_vecData |
| CRadioMedium * | m_pcMedium |
Definition at line 24 of file radio_entity.h.
| std::vector<CRadioEntity*> argos::CRadioEntity::TList |
Definition at line 32 of file radio_entity.h.
| argos::CRadioEntity::CRadioEntity | ( | CComposableEntity * | pc_parent | ) |
Definition at line 17 of file radio_entity.cpp.
| argos::CRadioEntity::CRadioEntity | ( | CComposableEntity * | pc_parent, |
| const std::string & | str_id, | ||
| Real | f_transmit_range ) |
Definition at line 25 of file radio_entity.cpp.
|
inlinevirtual |
Definition at line 42 of file radio_entity.h.
|
virtual |
Destroys the entity, undoing whatever was done by Init() or by the standalone constructor.
The default implementation of this method does nothing.
Reimplemented from argos::CEntity.
Definition at line 57 of file radio_entity.cpp.
| argos::CRadioEntity::ENABLE_VTABLE | ( | ) |
|
inline |
Returns a reference to the received data.
Definition at line 66 of file radio_entity.h.
|
inline |
Returns a constant reference to the received data.
Definition at line 57 of file radio_entity.h.
| CRadioMedium & argos::CRadioEntity::GetMedium | ( | ) | const |
Returns the medium associated to this radio.
Definition at line 82 of file radio_entity.cpp.
|
inline |
Returns the transmission range of the radio.
Definition at line 94 of file radio_entity.h.
|
inlinevirtual |
Returns a string label for this class.
Reimplemented from argos::CPositionalEntity.
Definition at line 107 of file radio_entity.h.
|
inline |
Checks if there has been data received by the radio.
Definition at line 85 of file radio_entity.h.
|
inline |
Returns true if this radio is associated to a medium.
true if this radio is associated to a medium. Definition at line 116 of file radio_entity.h.
|
virtual |
Initializes the state of the entity from the XML configuration tree.
If the id of the entity has not been set yet, this method sets an id for the entity. If the entity has no parent, this method parses the passed XML tree and looks for the id attribute, setting its value as id. If, instead, this entity has a parent, the id is set as GetParent().GetId() + "." + GetTypeDescription().
| CARGoSException | if a parse error occurred |
Reimplemented from argos::CPositionalEntity.
Definition at line 35 of file radio_entity.cpp.
|
inline |
Adds data received by the radio.
| c_data | a pair containing the data to be received and its origin. |
Definition at line 75 of file radio_entity.h.
|
virtual |
Resets the state of the entity to whatever it was after Init() or the standalone constructor was called.
The default implementation of this method does nothing.
Reimplemented from argos::CPositionalEntity.
Definition at line 49 of file radio_entity.cpp.
|
virtual |
Enables or disables an entity.
| b_enabled | true if the entity is enabled, false otherwise |
Reimplemented from argos::CEntity.
Definition at line 64 of file radio_entity.cpp.
| void argos::CRadioEntity::SetMedium | ( | CRadioMedium & | c_medium | ) |
Sets the medium associated to this entity.
| c_medium | The medium to associate to this entity. |
Definition at line 93 of file radio_entity.cpp.
|
inline |
Sets the tranmission range of the radio.
| f_range | the new transmission range of the radio in metres. |
Definition at line 103 of file radio_entity.h.
|
protected |
Definition at line 136 of file radio_entity.h.
|
protected |
Definition at line 138 of file radio_entity.h.
|
protected |
Definition at line 137 of file radio_entity.h.