#include <hddefs.h>
Public Member Functions | |
HDVals () | |
string | getcode (string) |
string | getcommand (string) |
string | getop (string) |
string | getband (string) |
string | getconstant (string) |
string | getformat (string) |
bool | getscaled (string) |
Private Attributes | |
volatile bool | keepreading |
map< string, string > | hd_cmds |
map< string, string > | hd_codes |
map< string, string > | hd_format |
map< string, string > | hd_ops |
map< string, string > | hd_band |
map< string, string > | hd_constants |
map< string, string > | hd_scale |
HDVals::HDVals | ( | ) |
Constructor for HDVals. Set all the variables. All the data used by the various classes HDControl needs is stored here, such as command names and codes, as well as replies and any constants used in reading from or writing to the radio. We keep the values and provide the different pieces of data through a get() interface.
string HDVals::getcode | ( | string | command | ) |
Get the hex codes for a command to send to the radio. Call with the command, get a string of hex codes to send out.
command | command to get hex codes for |
string HDVals::getcommand | ( | string | code | ) |
Get the command or the name for a reply to match a hex sequence the radio sent as a response.
code | string form of hex codes in a format like "0xA4 0x1B" |
string HDVals::getop | ( | string | name | ) |
Get the hext code for any type of operation the radio takes.
name | the name of the type of operation (like set, get or reply) |
string HDVals::getband | ( | string | name | ) |
Get the hex bytes form that the radio uses to represent a band, like am or fm.
name | the name (am or fm) of the band |
string HDVals::getconstant | ( | string | name | ) |
Get a constant value, such as up, down, zero, and so on. Give the name and get the hex bytes that correspond.
name | name of the constant needed |
string HDVals::getformat | ( | string | command | ) |
Get the format for a string of data. When data comes in as a response from the radio, some is just boolean, some will be int, some int and string. This tells what type of data a specific command/reply is.
command | the command or response name to check |
bool HDVals::getscaled | ( | string | name | ) |
Get whether or not a value is scaled. Some values, such as the volume level, are based on a scale of 0-90 instead of a more human scale of 0-100. Call here with the name of the variable the radio recognizes to find out if it works on a scaled down range.
name | the name of the value, such as volume, treble, bass |
volatile bool HDVals::keepreading [private] |
map<string,string> HDVals::hd_cmds [private] |
map<string,string> HDVals::hd_codes [private] |
map<string,string> HDVals::hd_format [private] |
map<string,string> HDVals::hd_ops [private] |
map<string,string> HDVals::hd_band [private] |
map<string,string> HDVals::hd_constants [private] |
map<string,string> HDVals::hd_scale [private] |