blink1-lib  1.0.0
blink1_lib::RGBN Struct Reference

#include <RGBN.hpp>

Public Member Functions

 RGBN (const std::uint8_t r, const std::uint8_t g, const std::uint8_t b, const std::uint8_t n) noexcept
 
 RGBN () noexcept=default
 
bool operator== (const RGBN &other) const noexcept
 
bool operator!= (const RGBN &other) const noexcept
 

Public Attributes

std::uint8_t r {0}
 
std::uint8_t g {0}
 
std::uint8_t b {0}
 
std::uint8_t n {0}
 

Friends

std::ostream & operator<< (std::ostream &os, const RGBN &rgb)
 

Detailed Description

A datatype that combines an RGB value with an LED index

Constructor & Destructor Documentation

◆ RGBN() [1/2]

blink1_lib::RGBN::RGBN ( const std::uint8_t  r,
const std::uint8_t  g,
const std::uint8_t  b,
const std::uint8_t  n 
)
noexcept
Parameters
rRed value
gGreen value
bBlue value
nLED index

◆ RGBN() [2/2]

blink1_lib::RGBN::RGBN ( )
defaultnoexcept

Default constructor

Initializes all values to 0

Member Function Documentation

◆ operator!=()

bool blink1_lib::RGBN::operator!= ( const RGBN other) const
noexcept

Inequality operator

Parameters
otherObject to compare to
Returns
true if the objects are not equal, false otherwise

◆ operator==()

bool blink1_lib::RGBN::operator== ( const RGBN other) const
noexcept

Equality operator

Parameters
otherObject to compare to
Returns
true if the objects are equal, false otherwise

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RGBN rgb 
)
friend

Output operator

Parameters
osOutput stream
rgbRGBN object to output

Member Data Documentation

◆ b

std::uint8_t blink1_lib::RGBN::b {0}

Blue value

◆ g

std::uint8_t blink1_lib::RGBN::g {0}

Green value

◆ n

std::uint8_t blink1_lib::RGBN::n {0}

LED index

◆ r

std::uint8_t blink1_lib::RGBN::r {0}

Red value


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