|
| | Configurable (const std::string &name="<unknown>", bool debug=false) |
| | Constructs a Configurable object.
|
|
virtual | ~Configurable () |
| | Destroys a Configurable object.
|
| | Configurable (const Configurable &other) |
| | Copies a Configurable object.
|
| virtual Configurable & | operator= (const Configurable &other) |
| | Assignment operator for Configurable objects.
|
| virtual std::string | getName () const |
| | Gets the name of the configurable object.
|
| virtual void | setName (const std::string &name) |
| | Sets the name of the configurable object.
|
| virtual ConfigurationDict | getConfiguration () const |
| | Gets the configuration dictionary for this object.
|
| virtual ConfigString | getConfigurationValue (const std::string &key) const |
| | Gets a named configuration value as a string.
|
| virtual bool | getConfigurationValueAsBool (const std::string &key) const |
| | Gets a named configuration value as a Boolean.
|
| virtual int | getConfigurationValueAsInt (const std::string &key) const |
| | Gets a named configuration value as an integer value.
|
| virtual unsigned int | getConfigurationValueAsUInt (const std::string &key) const |
| | Gets a named configuration value as an unsigned integer value.
|
| virtual double | getConfigurationValueAsDbl (const std::string &key) const |
| | Gets a named configuration value as a double value.
|
| virtual bool | setConfiguration (ConfigurationDict &cfg) |
| | Sets the configuration dictionary for this object.
|
| virtual bool | setConfigurationValue (const std::string &key, const std::string &value) |
| | Sets a named configuration value to a string.
|
| virtual bool | setConfigurationValueToBool (const std::string &key, const bool value) |
| | Sets a named configuration value to a Boolean.
|
| virtual bool | setConfigurationValueToInt (const std::string &key, const int value) |
| | Sets a named configuration value to an integer value.
|
| virtual bool | setConfigurationValueToUInt (const std::string &key, const unsigned int value) |
| | Sets a named configuration value to an unsigned integer value.
|
| virtual bool | setConfigurationValueToDbl (const std::string &key, const double value) |
| | Sets a named configuration value to a double value.
|
| virtual void | queryConfiguration () |
| | Tells the object to create its configuration dictionary.
|
| virtual void | setDebugName (const std::string &debug_name) |
| | Sets the debug name for this object.
|
| virtual void | setDebugFile (FILE *debug_fp) |
| | Sets the debug file pointer for this object.
|
| virtual void | setDebugTimeFormat (const std::string &debug_timefmt) |
| | Sets the debug time format for this object.
|
| virtual int | debug (const char *format,...) |
| | Outputs debug information.
|
| virtual const char * | debugBool (bool x) |
| | Gets a debug output string for a Boolean value.
|
| virtual bool | isDebug () const |
| | Gets whether this object produces debug output.
|
| virtual std::string | getDebugName () const |
| | Gets the debug name for this object.
|
| virtual std::string | rawString (const std::string &data) |
| | Gets a "raw" string representation of a given data string.
|
Base configurable object class.
Definition at line 79 of file Configurable.h.
| void initConfigurationDict |
( |
| ) |
|
|
protectedvirtual |
Initializes the configuration dictionary, defining the allowed keys.
Derived classes should use this method to define which settings are configurable through a configuration dictionary.
- Note
- Derived classes must also call this method explicitly in order to initialize their configuration dictionary.
Reimplemented in CWToneGenComponent, DataPort, DucComponent, NbddcComponent, NbddcGroupComponent, RadioHandler, TunerComponent, WbddcComponent, RadioHandler, RadioHandler, TunerComponent, DataPort, NbddcComponent, RadioHandler, TunerComponent, WbddcComponent, RadioComponent, RadioHandler, SimpleIpSetup, TransmitterComponent, TunerComponent, WbddcComponent, and WbddcGroupComponent.
Definition at line 221 of file Configurable.cpp.
Normalizes an incoming configuration dictionary.
"Normalizing" a configuration dictionary replaces certain strings representing Boolean values ("yes", "on", "true", "no", "off", and "false", case is irrelevant) with standard values ("0" and "1").
- Note
- The default behavior of this method normalizes every string in the configuration dictionary. Override this method if certain configuration items need to be protected from normalization.
- Returns
- The new configuration dictionary.
Definition at line 232 of file Configurable.cpp.
| void queryConfiguration |
( |
| ) |
|
|
virtual |
Tells the object to create its configuration dictionary.
Derived classes should override this so that they issue hardware commands to determine initial configuration.
Reimplemented in CWToneGenComponent, DataPort, DucComponent, NbddcComponent, NbddcGroupComponent, RadioHandler, RadioHandler, RadioHandler, TunerComponent, WbddcComponent, RadioHandler, RadioHandler, TunerComponent, DataPort, NbddcComponent, RadioHandler, TunerComponent, WbddcComponent, RadioHandler, RadioHandler, RadioComponent, RadioHandler, SimpleIpSetup, TransmitterComponent, TunerComponent, WbddcComponent, and WbddcGroupComponent.
Definition at line 217 of file Configurable.cpp.
| std::string rawString |
( |
const std::string & | data | ) |
|
|
virtualinherited |
Gets a "raw" string representation of a given data string.
"Raw" string representations mimic Python string representations. Whitespace characters are denoted by backslash representations ("\\r", "\\n", "\\t", "\\v", "\\f"), while other non-printable characters are represented with hex representation ("\\x00", etc.)
- Parameters
-
- Returns
- The data's "raw" representation.
Definition at line 143 of file Debuggable.cpp.
Sets the configuration dictionary for this object.
This method is intended to allow users to change the object's settings based on the configuration dictionary. It should not be used to set configuration dictionary elements that the object does not use.
- Parameters
-
| cfg | The configuration dictionary. |
- Returns
- True if successful, false otherwise.
Reimplemented in CWToneGenComponent, DataPort, DucComponent, NbddcComponent, NbddcGroupComponent, TunerComponent, WbddcComponent, TunerComponent, WbddcComponent, RadioComponent, RadioHandler, SimpleIpSetup, TransmitterComponent, TunerComponent, WbddcComponent, and WbddcGroupComponent.
Definition at line 161 of file Configurable.cpp.
| void updateConfigurationDict |
( |
| ) |
|
|
protectedvirtual |
Updates the configuration dictionary from object settings.
Derived classes should use this method to convert the object's configurable settings into a configuration dictionary.
Reimplemented in CWToneGenComponent, DataPort, DucComponent, NbddcComponent, NbddcGroupComponent, TunerComponent, WbddcComponent, TunerComponent, NbddcComponent, TunerComponent, WbddcComponent, RadioComponent, RadioHandler, SimpleIpSetup, TransmitterComponent, TunerComponent, WbddcComponent, and WbddcGroupComponent.
Definition at line 225 of file Configurable.cpp.