MeshNet  1.0.0
Public Member Functions | Data Fields
MeshVersion Struct Reference

Structure that represents MeshNet version. Real size of this class is always 2 bytes. More...

#include <meshHelper.h>

Public Member Functions

 MeshVersion ()
 Constructor. More...
 
 MeshVersion (uint8_t major, uint8_t minor, uint8_t patch)
 Constructor with numbers. More...
 
 MeshVersion (uint16_t raw)
 Constructor with raw value. More...
 
 MeshVersion (const MeshVersion &mac)=default
 Default copy constructor. More...
 
uint16_t getRaw () const
 Gets raw form of MeshVersion. More...
 
void setRaw (const uint16_t version)
 Sets MeshVersion from raw form. More...
 
size_t printTo (Print &p) const
 Pretty prints MeshVersion. More...
 
void operator= (const uint16_t &val)
 
 operator uint16_t () const
 
 operator uint16_t ()
 
bool operator== (const uint16_t &val)
 
bool operator== (const MeshVersion &val)
 
bool operator!= (const uint16_t &val)
 
bool operator!= (const MeshVersion &val)
 
bool operator>= (const uint16_t &val)
 
bool operator>= (const MeshVersion &val)
 
bool operator<= (const uint16_t &val)
 
bool operator<= (const MeshVersion &val)
 
bool operator> (const uint16_t &val)
 
bool operator> (const MeshVersion &val)
 
bool operator< (const uint16_t &val)
 
bool operator< (const MeshVersion &val)
 

Data Fields

uint16_t Patch: 5
 Patch part of version. It's value can be between 0-31. More...
 
uint16_t Minor: 5
 Minor part of version. It's value can be between 0-31. More...
 
uint16_t Major: 6
 Major part of version. It's value can be between 0-63. More...
 

Detailed Description

Structure that represents MeshNet version. Real size of this class is always 2 bytes.

Constructor & Destructor Documentation

◆ MeshVersion() [1/4]

MeshVersion::MeshVersion ( )
inline

Constructor.

◆ MeshVersion() [2/4]

MeshVersion::MeshVersion ( uint8_t  major,
uint8_t  minor,
uint8_t  patch 
)

Constructor with numbers.

Parameters
majorMajor part of version. It's value can be between 0-63.
minorMinor part of version. It's value can be between 0-31.
patchPatch part of version. It's value can be between 0-31.

◆ MeshVersion() [3/4]

MeshVersion::MeshVersion ( uint16_t  raw)

Constructor with raw value.

Parameters
rawRepresentation of MeshVersion as 16-bit number.

◆ MeshVersion() [4/4]

MeshVersion::MeshVersion ( const MeshVersion mac)
default

Default copy constructor.

Member Function Documentation

◆ getRaw()

uint16_t MeshVersion::getRaw ( ) const
inline

Gets raw form of MeshVersion.

Returns
Returns raw form of MeshVersion.

◆ operator uint16_t() [1/2]

MeshVersion::operator uint16_t ( )
inline

◆ operator uint16_t() [2/2]

MeshVersion::operator uint16_t ( ) const
inline

◆ operator!=() [1/2]

bool MeshVersion::operator!= ( const MeshVersion val)
inline

◆ operator!=() [2/2]

bool MeshVersion::operator!= ( const uint16_t &  val)
inline

◆ operator<() [1/2]

bool MeshVersion::operator< ( const MeshVersion val)
inline

◆ operator<() [2/2]

bool MeshVersion::operator< ( const uint16_t &  val)
inline

◆ operator<=() [1/2]

bool MeshVersion::operator<= ( const MeshVersion val)
inline

◆ operator<=() [2/2]

bool MeshVersion::operator<= ( const uint16_t &  val)
inline

◆ operator=()

void MeshVersion::operator= ( const uint16_t &  val)
inline

◆ operator==() [1/2]

bool MeshVersion::operator== ( const MeshVersion val)
inline

◆ operator==() [2/2]

bool MeshVersion::operator== ( const uint16_t &  val)
inline

◆ operator>() [1/2]

bool MeshVersion::operator> ( const MeshVersion val)
inline

◆ operator>() [2/2]

bool MeshVersion::operator> ( const uint16_t &  val)
inline

◆ operator>=() [1/2]

bool MeshVersion::operator>= ( const MeshVersion val)
inline

◆ operator>=() [2/2]

bool MeshVersion::operator>= ( const uint16_t &  val)
inline

◆ printTo()

size_t MeshVersion::printTo ( Print &  p) const

Pretty prints MeshVersion.

Parameters
pStream, where to print data.
Returns
Returns number of printed characters.

◆ setRaw()

void MeshVersion::setRaw ( const uint16_t  version)
inline

Sets MeshVersion from raw form.

Parameters
versionMeshVersion address to set.

Field Documentation

◆ Major

uint16_t MeshVersion::Major

Major part of version. It's value can be between 0-63.

◆ Minor

uint16_t MeshVersion::Minor

Minor part of version. It's value can be between 0-31.

◆ Patch

uint16_t MeshVersion::Patch

Patch part of version. It's value can be between 0-31.


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