00001 // 00002 // Copyright 2002,2004 Sony Corporation 00003 // 00004 // Permission to use, copy, modify, and redistribute this software for 00005 // non-commercial use is hereby granted. 00006 // 00007 // This software is provided "as is" without warranty of any kind, 00008 // either expressed or implied, including but not limited to the 00009 // implied warranties of fitness for a particular purpose. 00010 // 00011 00012 #ifndef MoNetData_h 00013 #define MoNetData_h 00014 00015 #include <OPENR/OPENR.h> 00016 00017 static const char* const MONET_MOTION_KEYWORD = "MONET_MOTION"; 00018 static const char* const MONET_SOUND_KEYWORD = "MONET_SOUND"; 00019 static const char* const MONET_CONFIG = "/MS/OPEN-R/MW/CONF/ERS-200/MONET.CFG"; 00020 static const char* const MONETCMD_CONFIG = "/MS/OPEN-R/MW/CONF/ERS-200/MONETCMD.CFG"; 00021 static const char* const MONET7_CONFIG = "/MS/OPEN-R/MW/CONF/ERS-7/MONET.CFG"; 00022 static const char* const MONETCMD7_CONFIG = "/MS/OPEN-R/MW/CONF/ERS-7/MONETCMD.CFG"; 00023 const size_t MONET_AGENT_COMMAND_NAME_MAX = 31; 00024 const size_t MONET_AGENT_NAME_MAX = 31; 00025 00026 typedef int MoNetCommandID; 00027 const MoNetCommandID monetcommandID_UNDEF = -1; 00028 00029 typedef int MoNetPosture; 00030 const MoNetPosture monetpostureUNDEF = -1; 00031 const MoNetPosture monetpostureANY = 0; // "any" 00032 const MoNetPosture monetpostureNT = 1; // "nt" 00033 const MoNetPosture monetpostureSTAND = 2; // "stand" 00034 const MoNetPosture monetpostureSIT = 3; // "sit" 00035 const MoNetPosture monetpostureSLEEP = 4; // "sleep" 00036 const MoNetPosture monetpostureWALK = 5; // "walk" 00037 00038 typedef int MoNetAgentID; 00039 const MoNetAgentID monetagentUNDEF = -1; 00040 const MoNetAgentID monetagentNEUTRAL = 0; 00041 const MoNetAgentID monetagentMTN = 1; 00042 const MoNetAgentID monetagentSOUND = 2; 00043 const MoNetAgentID monetagentMTNWALK = 3; 00044 00045 static const char* const monetagentNEUTRAL_STRNAME = "monetagentNEUTRAL"; 00046 static const char* const monetagentMTN_STRNAME = "monetagentMTN"; 00047 static const char* const monetagentSOUND_STRNAME = "monetagentSOUND"; 00048 static const char* const monetagentMTNWALK_STRNAME = "monetagentMTNWALK"; 00049 00050 // 00051 // monetagentNEUTRAL command index 00052 // 00053 const int monetagentNEUTRAL_NT2SLEEP = 0; 00054 00055 // 00056 // monetagentMTN command index 00057 // 00058 const int monetagentMTN_NULL_MOTION = -1; 00059 00060 typedef int MoNetStatus; 00061 const MoNetStatus monetUNDEF = -1; 00062 const MoNetStatus monetSUCCESS = 0; // also means CONTINUATION 00063 const MoNetStatus monetCOMPLETION = 1; 00064 const MoNetStatus monetINCOMPLETION = 2; 00065 const MoNetStatus monetBUSY = 3; 00066 const MoNetStatus monetINVALID_ARG = 4; 00067 const MoNetStatus monetINVALID_WAV = 5; 00068 00069 struct MoNetCommand { 00070 MoNetCommandID commandID; 00071 00072 MoNetCommand(MoNetCommandID id) { commandID = id; } 00073 }; 00074 00075 struct MoNetResult { 00076 MoNetCommandID commandID; 00077 MoNetStatus status; 00078 MoNetPosture posture; 00079 00080 MoNetResult(MoNetCommandID id, MoNetStatus st, MoNetPosture pos) { 00081 commandID = id; 00082 status = st; 00083 posture = pos; 00084 } 00085 }; 00086 00087 struct MoNetAgentCommand { 00088 MoNetAgentID agent; 00089 int index; 00090 OVRSyncKey syncKey; 00091 MoNetPosture startPosture; 00092 MoNetPosture endPosture; 00093 00094 MoNetAgentCommand() { Clear(); } 00095 void Clear() { 00096 agent = monetagentUNDEF; 00097 index = -1; 00098 syncKey = ovrsynckeyUNDEF; 00099 startPosture = monetpostureUNDEF; 00100 endPosture = monetpostureUNDEF; 00101 } 00102 }; 00103 00104 struct MoNetAgentResult { 00105 MoNetAgentID agent; 00106 int index; 00107 MoNetStatus status; 00108 MoNetPosture endPosture; 00109 00110 MoNetAgentResult() { 00111 agent = monetagentUNDEF; 00112 index = -1; 00113 status = monetUNDEF; 00114 endPosture = monetpostureUNDEF; 00115 } 00116 MoNetAgentResult(MoNetAgentID a, int idx, MoNetStatus s, MoNetPosture p) { 00117 agent = a; 00118 index = idx; 00119 status = s; 00120 endPosture = p; 00121 } 00122 }; 00123 00124 #endif // MoNetData_h