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

Public Member Functions

 Driver (Tasks::Task *task, SerialPort *uart)
 
 ~Driver (void)
 
void sendReset (void)
 
unsigned getMOMSN (void)
 
unsigned readBufferMT (uint8_t *data, unsigned data_size)
 
void checkMailBoxAlert (void)
 
void checkMailBox (void)
 
void sendSBD (const std::vector< uint8_t > &data, bool alert_reply=false)
 
const SessionResultgetSessionResult (void)
 
bool hasSessionResult (void)
 
void clearBufferMO (void)
 
void clearBufferMT (void)
 
bool hasRingAlert (void)
 
void clearRingAlert (void)
 
unsigned getQueuedMT (void)
 

Constructor & Destructor Documentation

Transports::IridiumSBD::Driver::Driver ( Tasks::Task *  task,
SerialPort *  uart 
)
inline

Constructor.

Parameters
[in]taskparent task.
[in]uartserial port connected to the ISU.
Transports::IridiumSBD::Driver::~Driver ( void  )
inline

Destructor.

Member Function Documentation

void Transports::IridiumSBD::Driver::checkMailBox ( void  )
inline

Start an SBD session to query the number of messages waiting at the GSS.

References sendSBD().

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

void Transports::IridiumSBD::Driver::checkMailBoxAlert ( void  )
inline

Start an SBD session to query the number of messages waiting at the GSS.

This function should be used when hasRingAlert returns true.

References sendSBD().

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

void Transports::IridiumSBD::Driver::clearBufferMO ( void  )
inline

Clear MO SBD message buffer.

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

void Transports::IridiumSBD::Driver::clearBufferMT ( void  )
inline

Clear MT SBD message buffer.

void Transports::IridiumSBD::Driver::clearRingAlert ( void  )
inline

Clear ring alert notification.

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

unsigned Transports::IridiumSBD::Driver::getMOMSN ( void  )
inline

Retrieve MOMSN that will be used during the next mobile originated SBD session.

Returns
MOMSN.

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

unsigned Transports::IridiumSBD::Driver::getQueuedMT ( void  )
inline

Retrieve the count of MT SBD messages waiting at the GSS.

Returns
count of MT SBD messages queued at the GSS.

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

const SessionResult& Transports::IridiumSBD::Driver::getSessionResult ( void  )
inline

Retrieve the result of the last SBD session.

The function should be called if hasSessionResult returns true.

Returns
session result.

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

bool Transports::IridiumSBD::Driver::hasRingAlert ( void  )
inline

Check if a ring alert was received.

Returns
true if ring alert was received, false otherwise.

Referenced by Transports::IridiumSBD::Task::handleSessionResult(), and Transports::IridiumSBD::Task::processQueue().

bool Transports::IridiumSBD::Driver::hasSessionResult ( void  )
inline

Check if the result of an SBD session was received.

Returns
true if SBD session result is available, false otherwise.

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

unsigned Transports::IridiumSBD::Driver::readBufferMT ( uint8_t *  data,
unsigned  data_size 
)
inline

Read the contents of the MT SBD message buffer.

Parameters
[in]databuffer to hold binary data.
[in]data_sizesize of binary data buffer.
Returns
number of bytes read.

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

void Transports::IridiumSBD::Driver::sendReset ( void  )
inline
void Transports::IridiumSBD::Driver::sendSBD ( const std::vector< uint8_t > &  data,
bool  alert_reply = false 
)
inline

Send MO SBD message.

Parameters
[in]datadata to send.
[in]alert_replytrue if a ring alert was received, false otherwise.

Referenced by checkMailBox(), checkMailBoxAlert(), and Transports::IridiumSBD::Task::processQueue().

Collaboration diagram for Transports::IridiumSBD::Driver:
Collaboration graph