Initial development for alternate LED names suppport in RGBController API

Alternate LED names allow an LED to have a secondary "alternate" name.  The led_alt_names vector should either be empty if alternate names are not used or be equal in size to the leds vector.  Empty strings in the led_alt_names vector indicate that a particular LED does not have an alternate name.
This commit is contained in:
Adam Honse 2023-05-02 00:08:33 -05:00
parent f627dfc2cd
commit 27cac898b0
2 changed files with 75 additions and 0 deletions

View file

@ -74,6 +74,59 @@ RGBController::~RGBController()
modes.clear();
}
std::string RGBController::GetName()
{
return(name);
}
std::string RGBController::GetVendor()
{
return(vendor);
}
std::string RGBController::GetDescription()
{
return(description);
}
std::string RGBController::GetVersion()
{
return(version);
}
std::string RGBController::GetSerial()
{
return(serial);
}
std::string RGBController::GetLocation()
{
return(location);
}
std::string RGBController::GetModeName(unsigned int mode)
{
return(modes[mode].name);
}
std::string RGBController::GetZoneName(unsigned int zone)
{
return(zones[zone].name);
}
std::string RGBController::GetLEDName(unsigned int led)
{
if(led < led_alt_names.size())
{
if(led_alt_names[led] != "")
{
return(led_alt_names[led]);
}
}
return(leds[led].name);
}
unsigned char * RGBController::GetDeviceDescription(unsigned int protocol_version)
{
unsigned int data_ptr = 0;