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_worldmodel2, 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::worldmodel2_config worldmodel2
 world model 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_worldmodel2  denotes worldmodel 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(), readConfig(), and Controller::setConfig().


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 424 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 399 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 311 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 333 of file Config.cc.

Referenced by Config().

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

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


Member Data Documentation

struct Config::behaviors_config Config::behaviors
 

placeholder

Referenced by Config().

struct Config::controller_config Config::controller
 

controller information

Referenced by Config(), ControlBase::doCancel(), ControlBase::doNextItem(), ControlBase::doPrevItem(), ControlBase::doReadStdIn(), 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(), Config(), 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 Config(), HeadPointerMC::defaultMaxSpeed(), PostureEditor::PostureEditor(), AutoGetupBehavior::processEvent(), PostureEditor::refresh(), EmergencyStopMC::setStopped(), setValue(), SaveWalkControl::takeInput(), and SavePostureControl::takeInput().

struct Config::sound_config Config::sound
 

sound information

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

struct Config::vision_config Config::vision
 

vision information

Referenced by RawCameraGenerator::calcImage(), JPEGGenerator::calcImage(), Config(), SegCamBehavior::DoStart(), RawCamBehavior::DoStart(), StartupBehavior::initVision(), 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 Config(), and setValue().

struct Config::worldmodel2_config Config::worldmodel2
 

world model information

Referenced by Config(), and setValue().


The documentation for this class was generated from the following files:
Tekkotsu v2.0
Generated Wed Jan 21 03:23:05 2004 by Doxygen 1.3.4