DUNE: Uniform Navigational Environment  2016.05.0
Transports::IridiumSBD::TxRequest Class Reference

Detailed Description

This class represents an SBD transmission request.

Public Member Functions

 TxRequest (uint16_t src_adr, uint8_t src_eid, uint16_t req_id, unsigned ttl, const std::vector< char > &data)
 
uint16_t getSource (void) const
 
uint8_t getSourceEntity (void) const
 
uint16_t getId (void) const
 
bool hasValidMSN (void) const
 
uint16_t getMSN (void) const
 
void setMSN (uint16_t msn)
 
void invalidateMSN (void)
 
const std::vector< uint8_t > & getData (void) const
 
double getExpiration (void) const
 
bool hasExpired (void) const
 

Constructor & Destructor Documentation

Transports::IridiumSBD::TxRequest::TxRequest ( uint16_t  src_adr,
uint8_t  src_eid,
uint16_t  req_id,
unsigned  ttl,
const std::vector< char > &  data 
)
inline

Create a transmission request object.

Parameters
[in]src_adrIMC address of the requester.
[in]src_eidentity identifier of the requester.
[in]req_idrequest identifier.
[in]ttltime-to-live (s).
[in]datato transmit.

References DUNE::Time::Clock::get().

Member Function Documentation

const std::vector<uint8_t>& Transports::IridiumSBD::TxRequest::getData ( void  ) const
inline

Retrieve data.

Returns
data.

Referenced by Transports::IridiumSBD::Task::processQueue().

double Transports::IridiumSBD::TxRequest::getExpiration ( void  ) const
inline

Retrieve expiration time.

Returns
expiration time (s).

Referenced by Transports::IridiumSBD::Task::enqueueTxRequest(), and hasExpired().

uint16_t Transports::IridiumSBD::TxRequest::getId ( void  ) const
inline

Retrieve request identifier.

Returns
request identifier.

Referenced by Transports::IridiumSBD::Task::sendTxRequestStatus().

uint16_t Transports::IridiumSBD::TxRequest::getMSN ( void  ) const
inline

Retrieve MO message sequence number.

Returns
message sequence number.

Referenced by Transports::IridiumSBD::Task::dequeueTxRequest(), and Transports::IridiumSBD::Task::invalidateTxRequest().

uint16_t Transports::IridiumSBD::TxRequest::getSource ( void  ) const
inline

Retrieve the IMC address of the requester.

Returns
IMC address.

Referenced by Transports::IridiumSBD::Task::sendTxRequestStatus().

uint8_t Transports::IridiumSBD::TxRequest::getSourceEntity ( void  ) const
inline

Retrieve the entity identifier of the requester.

Returns
entity identifier.

Referenced by Transports::IridiumSBD::Task::sendTxRequestStatus().

bool Transports::IridiumSBD::TxRequest::hasExpired ( void  ) const
inline

Test if request expired.

Returns
true if request expired, false otherwise.

References DUNE::Time::Clock::get(), and getExpiration().

bool Transports::IridiumSBD::TxRequest::hasValidMSN ( void  ) const
inline
void Transports::IridiumSBD::TxRequest::invalidateMSN ( void  )
inline
void Transports::IridiumSBD::TxRequest::setMSN ( uint16_t  msn)
inline

Retrieve MO message sequence number.

Returns
message sequence number.

Referenced by Transports::IridiumSBD::Task::processQueue().

Collaboration diagram for Transports::IridiumSBD::TxRequest:
Collaboration graph