#if !defined(__SEMID_H__)
#define __SEMID_H__


// Semantics ID 
// from Tareget Recognizer (SC)
#define     SEMID_BALL                  ( 0x0101 ) // Ball
            // SubInfo[0] = horizontal position (degrees; left is positive)
            // SubInfo[1] = vertical position  (degrees; up is positive)
            // SubInfo[2] = estimated distance(cm) to the pink ball
            //              (calculated by size of ball)
#define     SEMID_FAV                   ( 0x0102 ) // Unused
#define     SEMID_UNFAV                 ( 0x0103 ) // Unused
#define     SEMID_FLESH                 ( 0x0104 ) // Unused
#define     SEMID_NEWCOL                ( 0x0105 ) // Unused
#define     SEMID_DANGER                ( 0x0106 ) // Unused
#define     SEMID_BRIGHT                ( 0x0107 ) // Unused
#define     SEMID_STAF                  ( 0x0107 ) // Unused
#define     SEMID_STAR                  ( 0x0107 ) // Internal use
#define     SEMID_BONE                  ( 0x010a ) // AIBONE
            // SubInfo[0] = horizontal position (degrees; left is positive)
            // SubInfo[1] = vertical position  (degrees; up is positive)
            // SubInfo[2] = estimated distance(cm) to the AIBONE
            //              (calculated by size and shape)
            // SubInfo[3] = angle/state of AIBONE
            //    = (int) (((int)state)&0xffff)) + (((int)angle)&0xffff);
            //    angle : AIBONE angle, relative to AIBO's view.
            //    A horizontal angle (perpendicular to AIBO's field of view) is 0;
            //           other values range between -90 and 90, where positive
            //           values are clockwise.            
            //    state : Mask 0x00010000   1 : AIBONE is standing up  0 : AIBONE is on its side
            //            Mask 0x00020000   1 : AIBO is looking at AIBONE's shaft  0 : side
#define     SEMID_PINK                  ( 0x010b ) // Pink

// from Object Recognizer
#define     SEMID_OBJECT                ( 0x0201 ) // Object detected by head PSD
            // SubInfo[1] = Distance from camera
            // SubInfo[2] = Distance (PSD raw data)
#define     SEMID_OBSTACLE              ( 0x0202 ) // Obstacle detected by head PSD
            // SubInfo[1] = Distance from camera
            // SubInfo[2] = Distance (PSD raw data)
#define     SEMID_HAND                  ( 0x0203 ) // Hand detect by head PSD and skin color
#define     SEMID_WALL                  ( 0x0204 ) // Unused
#define     SEMID_CLIFF                 ( 0x0205 ) // Cliff detected by head PSD
#define     SEMID_BORDER                ( 0x0206 ) // Unused
#define     SEMID_MOVE_OBJ              ( 0x0207 ) // Moving object
            // SubInfo[1] indicate the moving object position
            // SubInfo[1] = (int) (((int)h)&0xffff)<<16) + (((int)v)&0xffff);
            // h = horizontal position (degrees; left is positive)
            // v = vertical position (degrees; up is positive)
#define     SEMID_MOVEOBJ_ON            ( 0x020a )
            // 800msec after finding moving object
            // Subinfo[1] indicates the moving object's position difference between the current time 
            // and the previous time (800msec)
            // SubInfo[1] = (int) (((int)h)&0xffff)<<16) + (((int)v)&0xffff);
            // h = horizontal deviation (degrees; left is positive)
            // v = vertical deviation (degrees; up is positive)
#define     SEMID_PSDSPOT               ( 0x020b) // Head (nose) PSD sensor data
            // Subinfo[0] = Distance (in micrometers)
            // Subinfo[1] = X Coordinate (0 is center of body) of PSD Focus point
            // Subinfo[2] = Y Coordinate (0 is center of body) of PSD Focus point
            // Subinfo[3] = Z Coordinate (0 is center of body) of PSD Focus point
            // SubInfo[1,2,3] are calculated using the head angle.

// from hFaceDetector
#define     SEMID_FACE                  ( 0x2001 ) // Detect face
            // Subinfo[0] = Number of faces in the camera data ( 0 = skin only; may be hand)
            // Subinfo[1] = Distance
            
#define     SEMID_FACE_ID               ( 0x2101 )
            // SubInfo[0] = Indicate recognized face --> See Semantics.txt to get the list
            // SubInfo[1] = Indicates how many pictures have been used to indicate a face (max 10).  Values below or equal to 5 are not trustworthy
            
// from Audio Recoginizer
#define     SEMID_VOICE                 ( 0x0301 ) // Voice Recoginition
            // SubInfo[0] Indicate recognized voice --> See Semantics.txt to get the list
            // SubInfo[1] The angle where the voice came from (degrees; left is positive)
            // SubInfo[2] Speaker recognition --> See Semantics.txt to get the list
#define     SEMID_TONE                  ( 0x0401 ) // AIBO Tone Recoginition
#define     SEMID_VOICE_BEGIN           ( 0x0501 ) // Detect that a voice has begun
#define     SEMID_AIBO_SOUND            ( 0x0601 ) // AIBO Sound Recoginition
#define     SEMID_LOUD                  ( 0x0701 ) // Detect a loud noise
            // SubInfo[0] indicate sound type --> See Semantics.txt to get the list
#define     SEMID_NOISY                 ( 0x0702 ) // Internal use
#define     SEMID_SPPLAY                ( 0x0703 ) // Internal use
#define     SEMID_E_RHYTHM              ( 0x0704 ) // Detect beat with hands (Clap, Clap, Clap ...)

// from Audio Recoginizer
#define     SEMID_EXPANSION             ( 0x0801 ) // Internal use

// from Information Converter (by way of ISM)
// from Information Converter (by way of ISM)
#define     SEMID_EXTEMP                ( 0x0802 ) // Unused (ERS-7) The outside temperature
#define     SEMID_INTEMP                ( 0x0803 ) // Battery temperature
#define     SEMID_BATTERY               ( 0x0804 ) // Remaining battery level
#define     SEMID_FATIGUE               ( 0x0805 ) // Fatigue (autonomy parameter)
#define     SEMID_HIT                   ( 0x0806 ) // back sensor hit
#define     SEMID_PAT                   ( 0x0807 ) // back sensor pat
#define     SEMID_CLICK                 ( 0x0808 ) // Unused
#define     SEMID_LONGPAT               ( 0x0809 ) // Unused
#define     SEMID_TOUCH_ON              ( 0x080a ) // Touch sensor (high sensitivity)
#define     SEMID_TOUCH_OFF             ( 0x080b ) // Unused
#define     SEMID_MASTER_TOUCH          ( 0x080c ) // Unused
#define     SEMID_GO_AUTO               ( 0x080d ) // Release from remote control
#define     SEMID_GO_VG                 ( 0x080e ) // Go to voice guide mode (internal only)
#define     SEMID_GO_RESET              ( 0x080f ) // Go to rest mode (internal only)
#define     SEMID_MODE4                 ( 0x0810 ) // Unused
#define     SEMID_RESTRAINT             ( 0x0811 ) // Excessive temperature; go to restraint state
#define     SEMID_REG_START             ( 0x0812 ) // Unused

// from Information Converter (by way of ISM)
#define     SEMID_SW_TAIL_R             ( 0x0816 ) // Unused
#define     SEMID_SW_TAIL_C             ( 0x0817 ) // Unused
#define     SEMID_SW_TAIL_L             ( 0x0818 ) // Unused
#define     SEMID_COLLISION             ( 0x0819 ) // Detect collision
#define     SEMID_HOLD_IN_MOUTH         ( 0x081f ) // Detect something in mouth
#define     SEMID_BACK_F                ( 0x0820 ) // Back sensor front
#define     SEMID_BACK_M                ( 0x0821 ) // Back sensor middle
#define     SEMID_BACK_R                ( 0x0822 ) // Back sensor rear
#define     SEMID_BACK_FM               ( 0x0823 ) // Unused
#define     SEMID_BACK_MR               ( 0x0824 ) // Unused
#define     SEMID_BACK_FR               ( 0x0825 ) // Unused
#define     SEMID_BACK_FMR              ( 0x0826 ) // Unused
#define     SEMID_SLIDE_FMR             ( 0x0827 ) // Back sensors are stroked to the rear from the front
#define     SEMID_SLIDE_RMF             ( 0x0828 ) // Back sensors are stroked from the rear to the front
#define     SEMID_FCLIFF                ( 0x0829 ) // Find a cliff using chest PSD
#define     SEMID_SMARKER               ( 0x082a ) // Find station marker
#define     SEMID_TOUCH_BEGIN           ( 0x082b ) // Touch sensor (low sensitivity)
#define     SEMID_FOBSTACLE             ( 0x082c ) // Detect obstacle using chest PSD

// from Information Converter (by way of PPM)
#define     SEMID_BOOT                  ( 0x0901 ) // Boot condition
#define     SEMID_SYS_POSTURE           ( 0x0902 ) // Turnover/Jam/Mecha load high/lift/station condition
            // see semantics.txt to get type of posture
#define     SEMID_TZ_CHANGE             ( 0x0903 ) // Time/timezone are changed
#define     SEMID_EMERGENCY             ( 0x0904 ) // Emergency condition
#define     SEMID_PRE_MECH_LOAD_H       ( 0x0905 ) // Prior notification for Mecha load high
#define     SEMID_FCLIFF_STOP           ( 0x0906 ) // Stop walking because a cliff is detected via the chest PSD

// from Information Converter (by way of LG) 
#define     SEMID_UNSTABLE              ( 0x081a ) // Detect unstable walking

// from Instinct and Emotion Generator
#define     SEMID_JOY                   ( 0x0a01 ) // Unused
#define     SEMID_ANGRY                 ( 0x0a02 ) // Unused
#define     SEMID_SAD                   ( 0x0a03 ) // Unused
#define     SEMID_FEAR                  ( 0x0a04 ) // Unused
#define     SEMID_DISGUST               ( 0x0a05 ) // Unused
#define     SEMID_SURPRISE              ( 0x0a06 ) // Unused
#define     SEMID_APPETITE              ( 0x0a07 ) // Charging desire (Instinct level for autonomy)  Value = SubInfo[1] 0-100
#define     SEMID_EXERCISE              ( 0x0a08 ) // Movement desire (Instinct level for autonomy) Value = SubInfo[1] 0-100
#define     SEMID_AFFECTION             ( 0x0a09 ) // Affection desire (Instinct level for autonomy) Value = SubInfo[1] 0-100
#define     SEMID_CURIOSITY             ( 0x0a0a ) // Curiosity (Instinct level for autonomy) Value = SubInfo[1] 0-100
#define     SEMID_PLEASANT              ( 0x0a0b ) // Pleasant (Mentality level for autonomy) Value = SubInfo[1] 0-100
#define     SEMID_SELFISH               ( 0x0a0c ) // Selfish (Mentality level for autonomy) Value = SubInfo[1] 0-100
#define     SEMID_REFLECTIVE            ( 0x0a0d ) // Reflective (Mentality level for autonomy) Value = SubInfo[1] 0-100
#define     SEMID_AWAKENING             ( 0x0b01 ) // Inverse sleep desire (Instinct level for autonomy) Value = SubInfo[1] 0-100

// from Event Manager
#define     SEMID_TIME_EVENT            ( 0x0c01 ) // Unused
#define     SEMID_RISE_POSE             ( 0x0c02 ) // Unused

// from BM
#define     SEMID_VOLUME                ( 0x0e15 ) // Volume SubInfo[0] 0(mute) - 3(max)
#define     SEMID_MONITOR_PARMIT        ( 0x0e18 ) // Remote Framework can monitor AIBO or not
#define     SEMID_STT_SEM               ( 0x0e1c ) // General notify

// from SR
#define     SEMID_SRODAPlay             ( 0x1301 ) // Internal use
#define     SEMID_SRONEPlay             ( 0x1302 ) // Internal use

// from AIBOMAIL
#define     SEMID_AM_S_MAIL             ( 0x1401 ) // Unused
#define     SEMID_AM_S_MESSAGE          ( 0x1402 ) // Unused
#define     SEMID_AM_S_WLAN             ( 0x1403 ) // Unused
#define     SEMID_AM_S_PHOTO            ( 0x1404 ) // Unused
#define     SEMID_AM_S_TALK             ( 0x1405 ) // Unused
#define     SEMID_AM_S_CONFIG_NOTIFY    ( 0x1406 ) // Unused
#define     SEMID_AM_S_MAILINFO         ( 0x1407 ) // Unused

// from AudioTP
#define     SEMID_ATPSPPLAY             ( 0x1501 ) // Internal use

// from VisurlPatternRecognizer
#define     SEMID_EPOLE                 ( 0x1601 ) // Station pole
            // SubInfo[0] = pole design
            // SubInfo[1] = posture 3D angle (degrees)
            // SubInfo[2] = Raw data angle (degrees)
            // SubInfo[3] = Quantity of matched characteristic points
#define     SEMID_ECARD1                ( 0x1611 ) // AIBO Card
            // SubInfo[0] = AIBO card type  --> See semantics.txt
            // SubInfo[1] = Angle of AIBO card (up/right/down/left)--> See semantics.txt
            // SubInfo[3] = Quantity of matched characteristic points
#define     SEMID_ECARD2                ( 0x1612 ) // Unused
#define     SEMID_ESCENE1               ( 0x1621 ) // Favorite place1
            // SubInfo[1] = Distance (100 when it registers)
            // SubInfo[2] = Raw data angle (degrees)
            // SubInfo[3] = Quantity of matched characteristic points
#define     SEMID_ESCENE2               ( 0x1622 ) // Favorite place2 SubInfo[] is same as SEMID_ESCENE1
#define     SEMID_ESCENE3               ( 0x1623 ) // Favorite place3 SubInfo[] is same as SEMID_ESCENE1
#define     SEMID_EOBJ                  ( 0x1631 ) // Unused
#define     SEMID_EPTN                  ( 0x1641 ) // General purpose visual pattern
            // SubInfo[0] = visual pattern
            // SubInfo[1] = Angle (up/right/down/left)
            // SubInfo[3] = Quantity of matched characteristic points
#define     SEMID_VPR_RESULT            ( 0x1651 ) // Query visual pattern ID
            // SubInfo[0] = Semantics type (only EPTN=5)
            // SubInfo[1] = Model ID
            // SubInfo[2] = Model sub ID
            // SubInfo[3] = APPCMD ID (only VPR_QUERY_MODEL=11)
#endif // __SEMID_H__
