AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
An object that represents the VT's active colour table. More...
#include <isobus_virtual_terminal_objects.hpp>
Public Member Functions | |
VTColourTable () | |
Constructor for a VT colour table. | |
VTColourVector | get_colour (std::uint8_t colourIndex) const |
Returns the colour vector associated to the specified VT colour index, which is what gets provided normally in most VT CAN messages, so this essentially maps the index to an actually usable colour definition. | |
void | set_colour (std::uint8_t colourIndex, VTColourVector newColour) |
Sets the specified VT colour index to a new RGB colour value. | |
Private Attributes | |
std::array< VTColourVector, VT_COLOUR_TABLE_SIZE > | colourTable |
Colour table data. Associates VT colour index with RGB value. | |
Static Private Attributes | |
static constexpr std::size_t | VT_COLOUR_TABLE_SIZE = 256 |
The size of the VT colour table as specified in ISO11783-6. | |
An object that represents the VT's active colour table.
Definition at line 157 of file isobus_virtual_terminal_objects.hpp.
isobus::VTColourTable::VTColourTable | ( | ) |
Constructor for a VT colour table.
Definition at line 13 of file isobus_virtual_terminal_objects.cpp.
VTColourVector isobus::VTColourTable::get_colour | ( | std::uint8_t | colourIndex | ) | const |
Returns the colour vector associated to the specified VT colour index, which is what gets provided normally in most VT CAN messages, so this essentially maps the index to an actually usable colour definition.
[in] | colourIndex | The VT colour index to retrieve |
Definition at line 52 of file isobus_virtual_terminal_objects.cpp.
void isobus::VTColourTable::set_colour | ( | std::uint8_t | colourIndex, |
VTColourVector | newColour ) |
Sets the specified VT colour index to a new RGB colour value.
[in] | colourIndex | The VT colour index to modify |
[in] | newColour | The RGB colour to set the specified index to |
Definition at line 57 of file isobus_virtual_terminal_objects.cpp.
|
private |
Colour table data. Associates VT colour index with RGB value.
Definition at line 178 of file isobus_virtual_terminal_objects.hpp.
|
staticconstexprprivate |
The size of the VT colour table as specified in ISO11783-6.
Definition at line 176 of file isobus_virtual_terminal_objects.hpp.