Config Class Reference#include <Config.h>
List of all members.
Detailed Description
provides global access to system configuration information
Definition at line 13 of file Config.h.
|
Public Types |
enum | section_t {
sec_wireless = 0,
sec_vision,
sec_main,
sec_behaviors,
sec_controller,
sec_motion,
sec_sound,
sec_invalid
} |
| section IDs More...
|
Public Member Functions |
| Config () |
| constructor
|
| Config (const std::string &filename) |
| constructor
|
| ~Config () |
| destructor
|
void | setFileSystemRoot (const std::string &fsr) |
| sets fsRoot
|
const std::string & | getFileSystemRoot () const |
| returns fsRoot
|
std::string | portPath (const std::string &path) const |
| returns a portable version of path which should be usable on either the simulator or the robot
|
void | readConfig (const std::string &filename) |
| call this function when it's time to read the configuration file
|
section_t | parseSection (const char *key) |
| returns the section structure corresponding to the section name given
|
void * | setValue (section_t section, const char *key, const char *value, bool updated=false) |
| pass the section, item name string, item value string - sets the value and returns pointer to the item changed
|
Public Attributes |
Config::wireless_config | wireless |
| wirless information
|
Config::vision_config | vision |
| vision information
|
Config::main_config | main |
| core functionality information
|
Config::behaviors_config | behaviors |
| placeholder
|
Config::controller_config | controller |
| controller information
|
Config::motion_config | motion |
| motion information
|
Config::sound_config | sound |
| sound information
|
Protected Member Functions |
bool | matchNoCase (const std::string &model, const std::string &pattern) |
| returns true if pattern matches model - pattern may have up to 1 '*', case insensitive
|
Static Protected Member Functions |
static bool | extractBool (const char *value) |
| returns bool value corresponding to a value of "t", "f", "true", "false", "y", "n", "yes", "no", or zero/nonzero number
|
Protected Attributes |
std::string | fsRoot |
| a prefix representing the file system root, usually indicating the robot's storage root.
|
Classes |
struct | behaviors_config |
| placeholder More...
|
struct | controller_config |
| controller information More...
|
struct | main_config |
| core functionality information More...
|
struct | motion_config |
| motion information More...
|
struct | sound_config |
| sound information More...
|
struct | vision_config |
| vision information More...
|
struct | wireless_config |
| wirless information More...
|
Member Enumeration Documentation
|
section IDs
- Enumerator:
-
sec_wireless |
denotes wireless section of config file |
sec_vision |
denotes vision section of config file |
sec_main |
denotes main section of config file, for misc. settings |
sec_behaviors |
denotes behaviors section of config file |
sec_controller |
denotes controller section of config file |
sec_motion |
denotes motion section of config file |
sec_sound |
denotes sound section of config file |
sec_invalid |
denotes an invalid section of config file |
Definition at line 33 of file Config.h. |
Constructor & Destructor Documentation
Config::Config |
( |
|
) |
[inline] |
|
|
constructor
Definition at line 16 of file Config.h. |
Config::Config |
( |
const std::string & |
filename |
) |
[inline] |
|
|
constructor
Definition at line 21 of file Config.h. |
Config::~Config |
( |
|
) |
[inline] |
|
|
destructor
Definition at line 26 of file Config.h. |
Member Function Documentation
bool Config::extractBool |
( |
const char * |
value |
) |
[static, protected] |
|
|
returns bool value corresponding to a value of "t", "f", "true", "false", "y", "n", "yes", "no", or zero/nonzero number
Definition at line 610 of file Config.cc.
Referenced by setValue(). |
const std::string& Config::getFileSystemRoot |
( |
|
) |
const [inline] |
|
bool Config::matchNoCase |
( |
const std::string & |
model, |
|
|
const std::string & |
pattern |
|
) |
[protected] |
|
|
returns true if pattern matches model - pattern may have up to 1 '*', case insensitive
Definition at line 585 of file Config.cc.
Referenced by readConfig(). |
std::string Config::portPath |
( |
const std::string & |
path |
) |
const |
|
|
returns a portable version of path which should be usable on either the simulator or the robot
Definition at line 46 of file Config.cc.
Referenced by SensorObserverControl::checkLogFile(), EventLogger::checkLogFile(), CameraBehavior::getNextName(), CameraBehavior::initIndex(), SegmentedColorGenerator::loadColorInfo(), SegmentedColorGenerator::loadThresholdMap(), Config::sound_config::makePath(), Config::motion_config::makePath(), WallTestBehavior::processEvent(), WalkCalibration::saveData(), LoadCalibration::selectedFile(), and WaypointWalkControl::WaypointWalkControl(). |
void Config::readConfig |
( |
const std::string & |
filename |
) |
|
|
|
call this function when it's time to read the configuration file
Definition at line 502 of file Config.cc.
Referenced by Config(). |
void Config::setFileSystemRoot |
( |
const std::string & |
fsr |
) |
|
|
void * Config::setValue |
( |
section_t |
section, |
|
|
const char * |
key, |
|
|
const char * |
value, |
|
|
bool |
updated = false |
|
) |
|
|
Member Data Documentation
|
controller information
Referenced by ControlBase::doCancel(), ControlBase::doNextItem(), ControlBase::doPrevItem(), ControlBase::doReadStdIn(), WaypointWalkControl::WaypointEditControl::doSelect(), WaypointWalkControl::doSelect(), WalkCalibration::doSelect(), SensorObserverControl::doSelect(), EventLogger::doSelect(), ControlBase::doSelect(), Controller::DoStart(), Controller::DoStop(), WalkCalibration::err(), CameraBehavior::openNextFile(), WalkCalibration::processEvent(), CameraBehavior::processEvent(), ControlBase::setHilights(), setValue(), and WalkCalibration::takeInput(). |
|
a prefix representing the file system root, usually indicating the robot's storage root.
When running in the simulator, this is used to pretend that a subdirectory in the project folder (e.g. 'ms') is the root file system
Definition at line 329 of file Config.h.
Referenced by getFileSystemRoot(), portPath(), and setFileSystemRoot(). |
|
core functionality information
Referenced by HelpControl::activate(), ControlBase::clearMenu(), ControlBase::deactivate(), ControlBase::doSelect(), WMMonitorBehavior::DoStart(), WalkControllerBehavior::DoStart(), ViewWMVarsBehavior::DoStart(), UPennWalkControllerBehavior::DoStart(), StewartPlatformBehavior::DoStart(), HeadPointControllerBehavior::DoStart(), EStopControllerBehavior::DoStart(), Aibo3DControllerBehavior::DoStart(), WorldStateSerializerBehavior::getClassDescription(), WMMonitorBehavior::getClassDescription(), WalkControllerBehavior::getClassDescription(), ViewWMVarsBehavior::getClassDescription(), UPennWalkControllerBehavior::getClassDescription(), StewartPlatformBehavior::getClassDescription(), HeadPointControllerBehavior::getClassDescription(), EStopControllerBehavior::getClassDescription(), Aibo3DControllerBehavior::getClassDescription(), WMMonitorBehavior::getPort(), Aibo3DControllerBehavior::getPort(), WorldStateSerializerBehavior::processEvent(), ControlBase::refresh(), HelpControl::report(), setValue(), ControlBase::takeInput(), and WorldStateSerializerBehavior::WorldStateSerializerBehavior(). |
|
motion information
Referenced by PostureMC::defaultMaxSpeed(), OldHeadPointerMC::defaultMaxSpeed(), HeadPointerMC::defaultMaxSpeed(), WallTestBehavior::DoStart(), WalkMC::init(), Kinematics::init(), WaypointEngine< MAX_WAY >::LoadFile(), WalkMC::LoadFile(), PostureEngine::LoadFile(), MotionSequenceEngine::LoadFile(), AutoGetupBehavior::processEvent(), WorldState::read(), WaypointWalkControl::refresh(), PostureEditor::refresh(), WaypointEngine< MAX_WAY >::SaveFile(), WalkMC::SaveFile(), PostureEngine::SaveFile(), MotionSequenceEngine::SaveFile(), EmergencyStopMC::setStopped(), setValue(), SaveWalkControl::takeInput(), SavePostureControl::takeInput(), WalkMC::updateOutputs(), and WaypointWalkControl::WaypointWalkControl(). |
|
sound information
Referenced by SpeakerServer::AddPacket(), SoundManager::CopyTo(), SpeakerServer::DoStart(), MicrophoneServer::DoStart(), SoundManager::endPlay(), SoundManager::GetRemainTime(), SpeakerServer::GotSocketData(), SoundManager::LoadBuffer(), SoundManager::LoadFile(), MicrophoneServer::processEvent(), SpeakerServer::QueueFrame(), SoundManager::ReleaseFile(), SpeakerServer::ResampleForSpeaker(), setValue(), and SoundManager::StopPlay(). |
|
vision information
Referenced by RawCameraGenerator::calcImage(), JPEGGenerator::calcImage(), SegCamBehavior::DoStart(), RegionCamBehavior::DoStart(), RawCamBehavior::DoStart(), DrawSkeletonBehavior::getCameraPoint(), SegCamBehavior::getClassDescription(), RegionCamBehavior::getClassDescription(), RawCamBehavior::getClassDescription(), RawCamBehavior::getSourceLayer(), RawCamBehavior::openPacket(), StareAtPawBehavior2::processEvent(), SegCamBehavior::processEvent(), RawCameraGenerator::processEvent(), RawCamBehavior::processEvent(), DrawVisObjBoundBehavior::processEvent(), CameraBehavior::processEvent(), BallDetectionGenerator::processEvent(), setValue(), BallDetectionGenerator::testSendEvent(), RawCamBehavior::writeColor(), RegionCamBehavior::writeRegions(), SegCamBehavior::writeRLE(), SegCamBehavior::writeSeg(), and RawCamBehavior::writeSingleChannel(). |
The documentation for this class was generated from the following files:
|