HDVals Class Reference

#include <hddefs.h>

List of all members.

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


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
command command to get hex codes for
Returns:
the hex codes to send to the radio

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.

Parameters:
code string form of hex codes in a format like "0xA4 0x1B"
Returns:
the reply name or command (they're the same) that matches the code

string HDVals::getop ( string  name  ) 

Get the hext code for any type of operation the radio takes.

Parameters:
name the name of the type of operation (like set, get or reply)
Returns:
the hex codes, in string form, of the corresponding bytes.

string HDVals::getband ( string  name  ) 

Get the hex bytes form that the radio uses to represent a band, like am or fm.

Parameters:
name the name (am or fm) of the band
Returns:
the value, in hex string bytes, that the radio uses for that 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.

Parameters:
name name of the constant needed
Returns:
the hex bytes in string form that the radio uses for this constant

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.

Parameters:
command the command or response name to check
Returns:
the type of data format

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.

Parameters:
name the name of the value, such as volume, treble, bass
Returns:
true if it's on a scale other than 0-100


Member Data Documentation

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]


The documentation for this class was generated from the following files:
Generated on Sun Apr 6 01:13:23 2008 for HDRadioController by  doxygen 1.5.3