MoNet Class Reference

#include <MoNet.h>

List of all members.

Public Member Functions

 MoNet ()
virtual ~MoNet ()
virtual OStatus DoInit (const OSystemEvent &event)
virtual OStatus DoStart (const OSystemEvent &event)
virtual OStatus DoStop (const OSystemEvent &event)
virtual OStatus DoDestroy (const OSystemEvent &event)
void NotifyClientCommand (const ONotifyEvent &event)
void NotifyAgentResult (const ONotifyEvent &event)

Public Attributes

OSubject * subject [numOfSubject]
OObserver * observer [numOfObserver]

Private Member Functions

void LoadMotionODA ()
void LoadSoundODA ()
void ReadMoNetConfig (const char *path)
void ReadMoNetCommandConfig (const char *path)
MoNetAgentID ToMoNetAgentID (char *agt)
int ToCommandIndex (const ODA &oda, char *cmd, char *idx)
MoNetPosture ToStartPosture (char *cmd)
MoNetPosture ToEndPosture (char *cmd)
MoNetPosture ToPosture (char *pos)
MoNetCommandID Execute (MoNetCommandID id)
void ExecuteCommandInfo (MoNetCommandInfo *cinfo)
int NewAndDivideSyncKey (int ndivkey, OVRSyncKey *divkey)
void ReplyClientResult (MoNetCommandID id, MoNetStatus st, MoNetPosture pos)

Private Attributes

MoNetState moNetState
MoNetCommandInfoManager moNetCommandInfoManager
DirectedGraph< CommandNode,
CommandArc
moNet
list< CommandArccommandArcPath
MoNetCommandID currentCommandID
MoNetPosture currentPosture
ODesignDataID motionDataID
ODesignDataID soundDataID
ODA motionODA
ODA soundODA

Static Private Attributes

const size_t LINEBUFSIZE = 256
const size_t NUMBUFSIZE = 8


Constructor & Destructor Documentation

MoNet::MoNet  ) 
 

Definition at line 19 of file MoNet.cc.

References MNS_IDLE, and monetpostureNT.

virtual MoNet::~MoNet  )  [inline, virtual]
 

Definition at line 36 of file MoNet.h.


Member Function Documentation

OStatus MoNet::DoDestroy const OSystemEvent &  event  )  [virtual]
 

Definition at line 82 of file MoNet.cc.

OStatus MoNet::DoInit const OSystemEvent &  event  )  [virtual]
 

Definition at line 28 of file MoNet.cc.

References LoadMotionODA(), LoadSoundODA(), ReadMoNetCommandConfig(), and ReadMoNetConfig().

OStatus MoNet::DoStart const OSystemEvent &  event  )  [virtual]
 

Definition at line 60 of file MoNet.cc.

References moNetState.

OStatus MoNet::DoStop const OSystemEvent &  event  )  [virtual]
 

Definition at line 71 of file MoNet.cc.

References moNetState.

MoNetCommandID MoNet::Execute MoNetCommandID  id  )  [private]
 

Definition at line 429 of file MoNet.cc.

References commandArcPath, currentPosture, MoNetCommandInfo::EndPosture(), ExecuteCommandInfo(), MoNetCommandInfoManager::Find(), moNet, monetagentUNDEF, moNetCommandInfoManager, monetINVALID_ARG, DirectedGraph< Node, Arc >::Search(), MoNetCommandInfo::StartPosture(), and subject.

Referenced by NotifyClientCommand().

void MoNet::ExecuteCommandInfo MoNetCommandInfo cinfo  )  [private]
 

Definition at line 463 of file MoNet.cc.

References MoNetAgentCommand::agent, MoNetCommandInfo::AgentCommand(), MoNetAgentCommand::index, NewAndDivideSyncKey(), MoNetCommandInfo::NumAgentCommands(), subject, MoNetAgentCommand::syncKey, and MoNetCommandInfo::UseSyncKey().

Referenced by Execute(), and NotifyAgentResult().

void MoNet::LoadMotionODA  )  [private]
 

Definition at line 168 of file MoNet.cc.

References byte, motionDataID, motionODA, and ODA::Set().

Referenced by DoInit().

void MoNet::LoadSoundODA  )  [private]
 

Definition at line 189 of file MoNet.cc.

References byte, ODA::Set(), soundDataID, and soundODA.

Referenced by DoInit().

int MoNet::NewAndDivideSyncKey int  ndivkey,
OVRSyncKey *  divkey
[private]
 

Definition at line 496 of file MoNet.cc.

Referenced by ExecuteCommandInfo().

void MoNet::NotifyAgentResult const ONotifyEvent &  event  ) 
 

Definition at line 119 of file MoNet.cc.

References MoNetAgentResult::agent, MoNetCommandInfo::ClearAgentResult(), commandArcPath, currentCommandID, currentPosture, MoNetCommandInfo::EndPosture(), MoNetAgentResult::endPosture, ExecuteCommandInfo(), MoNetAgentResult::index, MoNetCommandInfo::IsDone(), MoNetPosture, moNetState, observer, ReplyClientResult(), MoNetCommandInfo::SetAgentResult(), and MoNetAgentResult::status.

void MoNet::NotifyClientCommand const ONotifyEvent &  event  ) 
 

Definition at line 89 of file MoNet.cc.

References MoNetCommand::commandID, currentCommandID, currentPosture, Execute(), monetBUSY, monetINVALID_ARG, monetpostureUNDEF, moNetState, observer, and ReplyClientResult().

void MoNet::ReadMoNetCommandConfig const char *  path  )  [private]
 

Definition at line 262 of file MoNet.cc.

References DirectedGraph< Node, Arc >::Add(), MoNetCommandInfo::EndPosture(), LINEBUFSIZE, moNet, MONET_AGENT_COMMAND_NAME_MAX, MONET_AGENT_NAME_MAX, MoNetAgentID, MoNetCommandID, moNetCommandInfoManager, monetpostureANY, motionODA, MoNetCommandInfoManager::New(), DirectedGraph< Node, Arc >::Print(), MoNetCommandInfo::SetAgentCommand(), soundODA, MoNetCommandInfo::StartPosture(), ToCommandIndex(), ToEndPosture(), ToMoNetAgentID(), and ToStartPosture().

Referenced by DoInit().

void MoNet::ReadMoNetConfig const char *  path  )  [private]
 

Definition at line 210 of file MoNet.cc.

References DirectedGraph< Node, Arc >::Add(), MoNetCommandInfo::EndPosture(), LINEBUFSIZE, moNet, MONET_AGENT_COMMAND_NAME_MAX, MONET_AGENT_NAME_MAX, MoNetAgentID, moNetCommandInfoManager, monetpostureANY, motionODA, MoNetCommandInfoManager::New(), DirectedGraph< Node, Arc >::Print(), MoNetCommandInfo::SetAgentCommand(), soundODA, MoNetCommandInfo::StartPosture(), ToCommandIndex(), ToEndPosture(), ToMoNetAgentID(), and ToStartPosture().

Referenced by DoInit().

void MoNet::ReplyClientResult MoNetCommandID  id,
MoNetStatus  st,
MoNetPosture  pos
[private]
 

Definition at line 553 of file MoNet.cc.

References subject.

Referenced by NotifyAgentResult(), and NotifyClientCommand().

int MoNet::ToCommandIndex const ODA oda,
char *  cmd,
char *  idx
[private]
 

Definition at line 353 of file MoNet.cc.

References ODA::GetData(), ODA::GetMagic(), ODA::GetName(), MTNFile::GetName(), and ODA::GetNumFiles().

Referenced by ReadMoNetCommandConfig(), and ReadMoNetConfig().

MoNetPosture MoNet::ToEndPosture char *  cmd  )  [private]
 

Definition at line 396 of file MoNet.cc.

References MONET_AGENT_COMMAND_NAME_MAX, and ToPosture().

Referenced by ReadMoNetCommandConfig(), and ReadMoNetConfig().

MoNetAgentID MoNet::ToMoNetAgentID char *  agt  )  [private]
 

Definition at line 337 of file MoNet.cc.

Referenced by ReadMoNetCommandConfig(), and ReadMoNetConfig().

MoNetPosture MoNet::ToPosture char *  pos  )  [private]
 

Definition at line 409 of file MoNet.cc.

Referenced by ToEndPosture(), and ToStartPosture().

MoNetPosture MoNet::ToStartPosture char *  cmd  )  [private]
 

Definition at line 384 of file MoNet.cc.

References MONET_AGENT_COMMAND_NAME_MAX, and ToPosture().

Referenced by ReadMoNetCommandConfig(), and ReadMoNetConfig().


Member Data Documentation

list<CommandArc> MoNet::commandArcPath [private]
 

Definition at line 75 of file MoNet.h.

Referenced by Execute(), and NotifyAgentResult().

MoNetCommandID MoNet::currentCommandID [private]
 

Definition at line 76 of file MoNet.h.

Referenced by NotifyAgentResult(), and NotifyClientCommand().

MoNetPosture MoNet::currentPosture [private]
 

Definition at line 77 of file MoNet.h.

Referenced by Execute(), NotifyAgentResult(), and NotifyClientCommand().

const size_t MoNet::LINEBUFSIZE = 256 [static, private]
 

Definition at line 69 of file MoNet.h.

Referenced by ReadMoNetCommandConfig(), and ReadMoNetConfig().

DirectedGraph<CommandNode, CommandArc> MoNet::moNet [private]
 

Definition at line 74 of file MoNet.h.

Referenced by Execute(), ReadMoNetCommandConfig(), and ReadMoNetConfig().

MoNetCommandInfoManager MoNet::moNetCommandInfoManager [private]
 

Definition at line 73 of file MoNet.h.

Referenced by Execute(), ReadMoNetCommandConfig(), and ReadMoNetConfig().

MoNetState MoNet::moNetState [private]
 

Definition at line 72 of file MoNet.h.

Referenced by DoStart(), DoStop(), NotifyAgentResult(), and NotifyClientCommand().

ODesignDataID MoNet::motionDataID [private]
 

Definition at line 78 of file MoNet.h.

Referenced by LoadMotionODA().

ODA MoNet::motionODA [private]
 

Definition at line 80 of file MoNet.h.

Referenced by LoadMotionODA(), ReadMoNetCommandConfig(), and ReadMoNetConfig().

const size_t MoNet::NUMBUFSIZE = 8 [static, private]
 

Definition at line 70 of file MoNet.h.

OObserver* MoNet::observer[numOfObserver]
 

Definition at line 39 of file MoNet.h.

Referenced by NotifyAgentResult(), and NotifyClientCommand().

ODesignDataID MoNet::soundDataID [private]
 

Definition at line 79 of file MoNet.h.

Referenced by LoadSoundODA().

ODA MoNet::soundODA [private]
 

Definition at line 81 of file MoNet.h.

Referenced by LoadSoundODA(), ReadMoNetCommandConfig(), and ReadMoNetConfig().

OSubject* MoNet::subject[numOfSubject]
 

Definition at line 38 of file MoNet.h.

Referenced by Execute(), ExecuteCommandInfo(), and ReplyClientResult().


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 23:04:33 2007 for openSDK by  doxygen 1.3.9.1