Homepage Demos Overview Downloads Tutorials Reference
Credits

Config Class Reference

#include <Config.h>

List of all members.


Detailed Description

provides global access to system configuration information

Definition at line 11 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 (const char *filename)
 constructor
 ~Config ()
 destructor
void readConfig (const char *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

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


Member Enumeration Documentation

enum Config::section_t
 

section IDs

Enumeration values:
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 22 of file Config.h.

Referenced by parseSection(), and readConfig().


Constructor & Destructor Documentation

Config::Config const char *  filename  )  [inline]
 

constructor

Definition at line 14 of file Config.h.

Config::~Config  )  [inline]
 

destructor

Definition at line 19 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 474 of file Config.cc.

Referenced by setValue().

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 449 of file Config.cc.

Referenced by readConfig().

Config::section_t Config::parseSection const char *  key  ) 
 

returns the section structure corresponding to the section name given

Definition at line 346 of file Config.cc.

Referenced by readConfig(), and Controller::setConfig().

void Config::readConfig const char *  filename  ) 
 

call this function when it's time to read the configuration file

Definition at line 366 of file Config.cc.

void * Config::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

Definition at line 20 of file Config.cc.

Referenced by readConfig(), and Controller::setConfig().


Member Data Documentation

struct Config::behaviors_config Config::behaviors
 

placeholder

struct Config::controller_config Config::controller
 

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().

struct Config::main_config Config::main
 

core functionality information

Referenced by HelpControl::activate(), ControlBase::clearMenu(), ControlBase::deactivate(), ControlBase::doSelect(), WMMonitorBehavior::DoStart(), WalkControllerBehavior::DoStart(), ViewWMVarsBehavior::DoStart(), MMCombo::DoStart(), HeadPointControllerBehavior::DoStart(), EStopControllerBehavior::DoStart(), Aibo3DControllerBehavior::DoStart(), WorldStateSerializerBehavior::getClassDescription(), WMMonitorBehavior::getClassDescription(), WalkControllerBehavior::getClassDescription(), ViewWMVarsBehavior::getClassDescription(), HeadPointControllerBehavior::getClassDescription(), EStopControllerBehavior::getClassDescription(), Aibo3DControllerBehavior::getClassDescription(), WMMonitorBehavior::getPort(), Aibo3DControllerBehavior::getPort(), ControlBase::refresh(), HelpControl::report(), setValue(), ControlBase::takeInput(), and WorldStateSerializerBehavior::WorldStateSerializerBehavior().

struct Config::motion_config Config::motion
 

motion information

Referenced by OldHeadPointerMC::defaultMaxSpeed(), HeadPointerMC::defaultMaxSpeed(), MMCombo::DoStart(), WalkMC::init(), Kinematics::init(), WalkMC::LoadFile(), PostureEngine::LoadFile(), MotionSequence::LoadFile(), PostureEditor::PostureEditor(), AutoGetupBehavior::processEvent(), WaypointWalkControl::refresh(), PostureEditor::refresh(), WalkMC::SaveFile(), PostureEngine::SaveFile(), MotionSequence::SaveFile(), EmergencyStopMC::setStopped(), setValue(), SaveWalkControl::takeInput(), SavePostureControl::takeInput(), and WaypointWalkControl::WaypointWalkControl().

struct Config::sound_config Config::sound
 

sound information

Referenced by SoundManager::CopyTo(), SoundPlay::DoDestroy(), SoundPlay::DoInit(), SoundManager::endPlay(), SoundManager::GetRemainTime(), SoundManager::LoadBuffer(), SoundManager::LoadFile(), SoundManager::lookupPath(), SoundPlay::NewSoundVectorData(), SoundPlay::SetPowerAndVolume(), setValue(), and SoundManager::StopPlay().

struct Config::vision_config Config::vision
 

vision information

Referenced by RawCameraGenerator::calcImage(), JPEGGenerator::calcImage(), SegCamBehavior::DoStart(), RawCamBehavior::DoStart(), SegCamBehavior::getClassDescription(), RawCamBehavior::getClassDescription(), RawCamBehavior::openPacket(), SegCamBehavior::processEvent(), RawCamBehavior::processEvent(), CameraBehavior::processEvent(), BallDetectionGenerator::processEvent(), setValue(), BallDetectionGenerator::testSendEvent(), RawCamBehavior::writeColor(), SegCamBehavior::writeRLE(), SegCamBehavior::writeSeg(), and RawCamBehavior::writeSingleChannel().

struct Config::wireless_config Config::wireless
 

wirless information

Referenced by setValue().


The documentation for this class was generated from the following files:

Tekkotsu v2.2
Generated Tue Oct 19 14:20:15 2004 by Doxygen 1.3.9.1