DUNE: Uniform Navigational Environment  2019.02.0
Supervisors::Reporter::Ticket Class Reference

Detailed Description

Ticket class.

This class holds active report request details.

Author
José Braga

Public Member Functions

 Ticket (Tasks::Task *task, unsigned id, const IMC::ReportControl *msg)
 
bool trigger (void)
 
bool compare (const Ticket ticket)
 
void reset (uint16_t period)
 
uint8_t getInterface (void) const
 
std::string getDestination (void) const
 
bool isOperationStart (void) const
 
uint16_t getPeriod (void) const
 

Constructor & Destructor Documentation

Member Function Documentation

bool Supervisors::Reporter::Ticket::compare ( const Ticket  ticket)
inline

Compare another ticket with this object.

Only interface and destination are compared.

Returns
true if tickets hold same basic information, false otherwise.

References getDestination(), and getInterface().

std::string Supervisors::Reporter::Ticket::getDestination ( void  ) const
inline

Get current ticket destination.

Returns
ticket destination.

Referenced by compare().

uint8_t Supervisors::Reporter::Ticket::getInterface ( void  ) const
inline

Get current communication interface.

Returns
communication interface index.

Referenced by compare().

uint16_t Supervisors::Reporter::Ticket::getPeriod ( void  ) const
inline

Get current peridicity.

Returns
periodicity value.

Referenced by Supervisors::Reporter::Dispatcher::add().

bool Supervisors::Reporter::Ticket::isOperationStart ( void  ) const
inline

Check if this ticket is a start report request.

Returns
true if it's a start request, false otherwise.

Referenced by Supervisors::Reporter::Dispatcher::add().

void Supervisors::Reporter::Ticket::reset ( uint16_t  period)
inline

Reset periodicity of current ticket.

Parameters
[in]periodperiodicity value.
bool Supervisors::Reporter::Ticket::trigger ( void  )
inline

Trigger a report.

Returns
true if report was requested, false otherwise.
Collaboration diagram for Supervisors::Reporter::Ticket:
Collaboration graph