MeshNet  1.0.0
Public Member Functions | Static Public Member Functions | Data Fields
MeshRouteTableRow Struct Reference

Structure, that contains one row with data from route table. More...

#include <meshTables.h>

Public Member Functions

 MeshRouteTableRow ()=default
 
 MeshRouteTableRow (uint8_t source, uint8_t neighbor, uint8_t hop)
 
bool isDirectNeighbor () const
 Checks if row is route to direct neighbor or not. More...
 
bool isGateway () const
 Checks if row is route to gateway node. More...
 
void clear ()
 Removes all data from current row. More...
 
size_t printRow (OSTREAM &stream) const
 
bool operator== (const MeshRouteTableRow &another) const
 

Static Public Member Functions

static size_t printHeader (OSTREAM &stream)
 Print header for table of rows. More...
 

Data Fields

uint8_t Source = 0
 Source address. More...
 
uint8_t Neighbor = 0
 Neighbor node address, that is connected (directly/indirectly) to source node. More...
 
uint8_t Hop = 0
 Number of hops from current node to Source. More...
 

Detailed Description

Structure, that contains one row with data from route table.

Constructor & Destructor Documentation

◆ MeshRouteTableRow() [1/2]

MeshRouteTableRow::MeshRouteTableRow ( )
default

◆ MeshRouteTableRow() [2/2]

MeshRouteTableRow::MeshRouteTableRow ( uint8_t  source,
uint8_t  neighbor,
uint8_t  hop 
)

Member Function Documentation

◆ clear()

void MeshRouteTableRow::clear ( )
inline

Removes all data from current row.

◆ isDirectNeighbor()

bool MeshRouteTableRow::isDirectNeighbor ( ) const
inline

Checks if row is route to direct neighbor or not.

Returns
Returns true when row is route to direct neighbor.

◆ isGateway()

bool MeshRouteTableRow::isGateway ( ) const
inline

Checks if row is route to gateway node.

Returns
Returns true when row is route to gateway node.

◆ operator==()

bool MeshRouteTableRow::operator== ( const MeshRouteTableRow another) const
inline

◆ printHeader()

size_t MeshRouteTableRow::printHeader ( OSTREAM stream)
static

Print header for table of rows.

Parameters
streamStream, where header will be printed.
Returns
Returns number of printed characters.

◆ printRow()

size_t MeshRouteTableRow::printRow ( OSTREAM stream) const

@breif Prints row to stream.

Parameters
streamStream, where row will be printed.
Returns
Returns number of printed characters.

Field Documentation

◆ Hop

uint8_t MeshRouteTableRow::Hop = 0

Number of hops from current node to Source.

◆ Neighbor

uint8_t MeshRouteTableRow::Neighbor = 0

Neighbor node address, that is connected (directly/indirectly) to source node.

◆ Source

uint8_t MeshRouteTableRow::Source = 0

Source address.


The documentation for this struct was generated from the following files: