home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2003 March / VPR0303A.ISO / AIBO / MoNet / common / include / MoNetData.h next >
C/C++ Source or Header  |  2002-12-19  |  3KB  |  117 lines

  1. //
  2. // Copyright 2002 Sony Corporation 
  3. //
  4. // Permission to use, copy, modify, and redistribute this software for
  5. // non-commercial use is hereby granted.
  6. //
  7. // This software is provided "as is" without warranty of any kind,
  8. // either expressed or implied, including but not limited to the
  9. // implied warranties of fitness for a particular purpose.
  10. //
  11.  
  12. #ifndef MoNetData_h
  13. #define MoNetData_h
  14.  
  15. #include <OPENR/OPENR.h>
  16.  
  17. static const char* const MONET_MOTION_KEYWORD = "MONET_MOTION";
  18. static const char* const MONET_SOUND_KEYWORD  = "MONET_SOUND";
  19. static const char* const MONET_CONFIG    = "/MS/OPEN-R/MW/CONF/MONET.CFG";
  20. static const char* const MONETCMD_CONFIG = "/MS/OPEN-R/MW/CONF/MONETCMD.CFG";
  21. const size_t MONET_AGENT_COMMAND_NAME_MAX = 31;
  22. const size_t MONET_AGENT_NAME_MAX         = 31;
  23.  
  24. typedef int MoNetCommandID;
  25. const MoNetCommandID monetcommandID_UNDEF = -1;
  26.  
  27. typedef int MoNetPosture;
  28. const MoNetPosture monetpostureUNDEF    = -1;
  29. const MoNetPosture monetpostureANY      =  0; // "any"
  30. const MoNetPosture monetpostureNT       =  1; // "nt"
  31. const MoNetPosture monetpostureSTAND    =  2; // "stand"
  32. const MoNetPosture monetpostureSIT      =  3; // "sit"
  33. const MoNetPosture monetpostureSLEEP    =  4; // "sleep"
  34. const MoNetPosture monetpostureWALK     =  5; // "walk"
  35.  
  36. typedef int MoNetAgentID;
  37. const MoNetAgentID monetagentUNDEF   = -1;
  38. const MoNetAgentID monetagentNEUTRAL =  0;
  39. const MoNetAgentID monetagentMTN     =  1;
  40. const MoNetAgentID monetagentSOUND   =  2;
  41.  
  42. //
  43. // monetagentNEUTRAL command index
  44. //
  45. const int monetagentNEUTRAL_NT2SLEEP = 0;
  46.  
  47. //
  48. // monetagentMTN command index
  49. //
  50. const int monetagentMTN_NULL_MOTION = -1;
  51.  
  52. typedef int MoNetStatus;
  53. const MoNetStatus monetUNDEF        = -1;
  54. const MoNetStatus monetSUCCESS      =  0; // also means CONTINUATION
  55. const MoNetStatus monetCOMPLETION   =  1;
  56. const MoNetStatus monetINCOMPLETION =  2;
  57. const MoNetStatus monetBUSY         =  3;
  58. const MoNetStatus monetINVALID_ARG  =  4;
  59. const MoNetStatus monetINVALID_WAV  =  5;
  60.  
  61. struct MoNetCommand {
  62.     MoNetCommandID  commandID;
  63.  
  64.     MoNetCommand(MoNetCommandID id) { commandID = id; }
  65. };
  66.  
  67. struct MoNetResult {
  68.     MoNetCommandID  commandID;
  69.     MoNetStatus     status;
  70.     MoNetPosture    posture;
  71.  
  72.     MoNetResult(MoNetCommandID id, MoNetStatus st, MoNetPosture pos) {
  73.         commandID = id;
  74.         status    = st;
  75.         posture   = pos;
  76.     }
  77. };
  78.  
  79. struct MoNetAgentCommand {
  80.     MoNetAgentID  agent;
  81.     int           index;
  82.     OVRSyncKey    syncKey;
  83.     MoNetPosture  startPosture;
  84.     MoNetPosture  endPosture;
  85.  
  86.     MoNetAgentCommand() { Clear(); }
  87.     void Clear() {
  88.         agent        = monetagentUNDEF;
  89.         index        = -1;
  90.         syncKey      = ovrsynckeyUNDEF;
  91.         startPosture = monetpostureUNDEF;
  92.         endPosture   = monetpostureUNDEF;
  93.     }
  94. };
  95.  
  96. struct MoNetAgentResult {
  97.     MoNetAgentID  agent;
  98.     int           index;
  99.     MoNetStatus   status;
  100.     MoNetPosture  endPosture;
  101.  
  102.     MoNetAgentResult() {
  103.         agent      = monetagentUNDEF;
  104.         index      = -1;
  105.         status     = monetUNDEF;
  106.         endPosture = monetpostureUNDEF;
  107.     }
  108.     MoNetAgentResult(MoNetAgentID a, int idx, MoNetStatus s, MoNetPosture p) {
  109.         agent   = a;
  110.         index   = idx;
  111.         status  = s;
  112.         endPosture = p;
  113.     }
  114. };
  115.  
  116. #endif // MoNetData_h
  117.