AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
isobus::VTColourTable Class Reference

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_SIZEcolourTable
 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.
 

Detailed Description

An object that represents the VT's active colour table.

Definition at line 157 of file isobus_virtual_terminal_objects.hpp.

Constructor & Destructor Documentation

◆ VTColourTable()

isobus::VTColourTable::VTColourTable ( )

Constructor for a VT colour table.

Definition at line 13 of file isobus_virtual_terminal_objects.cpp.

Member Function Documentation

◆ get_colour()

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.

Parameters
[in]colourIndexThe VT colour index to retrieve
Returns
An RGB colour vector associated to the specified VT colour index

Definition at line 52 of file isobus_virtual_terminal_objects.cpp.

◆ set_colour()

void isobus::VTColourTable::set_colour ( std::uint8_t colourIndex,
VTColourVector newColour )

Sets the specified VT colour index to a new RGB colour value.

Parameters
[in]colourIndexThe VT colour index to modify
[in]newColourThe RGB colour to set the specified index to

Definition at line 57 of file isobus_virtual_terminal_objects.cpp.

Member Data Documentation

◆ colourTable

std::array<VTColourVector, VT_COLOUR_TABLE_SIZE> isobus::VTColourTable::colourTable
private

Colour table data. Associates VT colour index with RGB value.

Definition at line 178 of file isobus_virtual_terminal_objects.hpp.

◆ VT_COLOUR_TABLE_SIZE

constexpr std::size_t isobus::VTColourTable::VT_COLOUR_TABLE_SIZE = 256
staticconstexprprivate

The size of the VT colour table as specified in ISO11783-6.

Definition at line 176 of file isobus_virtual_terminal_objects.hpp.


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