blink1-lib  1.0.0
blink1_lib::PatternLine Struct Reference

#include <PatternLine.hpp>

Collaboration diagram for blink1_lib::PatternLine:

Public Member Functions

 PatternLine () noexcept=default
 
 PatternLine (const RGB &_rgb, const std::uint16_t _fadeMillis) noexcept
 
 PatternLine (const std::uint8_t _r, const std::uint8_t _g, const std::uint8_t _b, const std::uint16_t _fadeMillis) noexcept
 
bool operator== (const PatternLine &other) const noexcept
 
bool operator!= (const PatternLine &other) const noexcept
 

Public Attributes

std::uint16_t fadeMillis {0}
 
RGB rgb
 

Friends

std::ostream & operator<< (std::ostream &os, const PatternLine &patternLine)
 

Detailed Description

Originally a line in a blink1 pattern, but mostly just a way to keep an RGB value and a fade time together in one object

Constructor & Destructor Documentation

◆ PatternLine() [1/3]

blink1_lib::PatternLine::PatternLine ( )
defaultnoexcept

Default constructor

Initializes all values to 0

◆ PatternLine() [2/3]

blink1_lib::PatternLine::PatternLine ( const RGB _rgb,
const std::uint16_t  _fadeMillis 
)
noexcept
Parameters
_rgbRGB value for this PatternLine
_fadeMillisFade time in milliseconds

◆ PatternLine() [3/3]

blink1_lib::PatternLine::PatternLine ( const std::uint8_t  _r,
const std::uint8_t  _g,
const std::uint8_t  _b,
const std::uint16_t  _fadeMillis 
)
noexcept
Parameters
_rRed value for RGB
_gGreen value for RGB
_bBlue value for RGB
_fadeMillisFade time in milliseconds

Member Function Documentation

◆ operator!=()

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

Inequality operator

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

◆ operator==()

bool blink1_lib::PatternLine::operator== ( const PatternLine 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 PatternLine patternLine 
)
friend

Output operator

Parameters
osOutput stream
patternLinePatternLine to output

Member Data Documentation

◆ fadeMillis

std::uint16_t blink1_lib::PatternLine::fadeMillis {0}

Fade time in milliseconds

◆ rgb

RGB blink1_lib::PatternLine::rgb

RGB value


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