DUNE: Uniform Navigational Environment
2016.05.0
|
Time division multiple access (TDMA) is a channel access method for shared medium networks.
This class allows to setup a TDMA scheme and to signal when to establish communication.
Public Member Functions | |
TDMA (void) | |
TDMA (unsigned slot_count, std::vector< unsigned > &slot_number, unsigned duration) | |
bool | check (const IMC::GpsFix *msg) |
bool | check (float utc_time) |
void | setTotalSlots (unsigned number) |
void | setSlotNumber (std::vector< unsigned > &number) |
void | setDuration (unsigned number) |
void | reset (void) |
void | reset (unsigned slot_count, std::vector< unsigned > &slot_number, unsigned duration) |
|
inline |
Empty Constructor.
|
inline |
Constructor.
[in] | slot_count | total number of slots. |
[in] | slot_number | slots. |
[in] | duration | slots duration in seconds. |
References reset().
|
inline |
Check if we reached TDMA slot.
[in] | msg | GPS fix. |
References DUNE::IMC::GpsFix::utc_time.
|
inline |
Check if we reached TDMA slot.
[in] | utc_time | UTC Time. |
References DUNE::Math::round().
|
inline |
Reset TDMA slots with given parameters.
[in] | slot_count | total number of slots. |
[in] | slot_number | slots. |
[in] | duration | slots duration in seconds. |
References setDuration(), setSlotNumber(), and setTotalSlots().
|
inline |
|
inline |
|
inline |