DUNE: Uniform Navigational Environment  2022.04.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

◆ Ticket()

Member Function Documentation

◆ compare()

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().

◆ getDestination()

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

Get current ticket destination.

Returns
ticket destination.

Referenced by compare().

◆ getInterface()

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

Get current communication interface.

Returns
communication interface index.

Referenced by compare().

◆ getPeriod()

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

Get current peridicity.

Returns
periodicity value.

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

◆ isOperationStart()

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().

◆ reset()

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

Reset periodicity of current ticket.

Parameters
[in]periodperiodicity value.

◆ trigger()

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