RmpUserDefinedFeedbackType.h
Go to the documentation of this file.
00001 /*
00002   COPYRIGHT (c) 2014 SEGWAY Inc.
00003 
00004   Software License Agreement:
00005 
00006   The software supplied herewith by Segway Inc. (the "Company") for its 
00007   RMP Robotic Platforms is intended and supplied to you, the Company's 
00008   customer, for use solely and exclusively with Segway products. The 
00009   software is owned by the Company and/or its supplier, and is protected 
00010   under applicable copyright laws.  All rights are reserved. Any use in 
00011   violation of the foregoing restrictions may subject the user to criminal
00012   sanctions under applicable laws, as well as to civil liability for the 
00013   breach of the terms and conditions of this license. The Company may 
00014   immediately terminate this Agreement upon your use of the software with 
00015   any products that are not Segway products.
00016 
00017   You shall indemnify, defend and hold the Company harmless from any claims, 
00018   demands, liabilities or expenses, including reasonable attorneys fees, incurred 
00019   by the Company as a result of any claim or proceeding against the Company 
00020   arising out of or based upon: 
00021 
00022   (i) The combination, operation or use of the software by you with any hardware, 
00023       products, programs or data not supplied or approved in writing by the Company, 
00024       if such claim or proceeding would have been avoided but for such combination, 
00025       operation or use.
00026 
00027   (ii) The modification of the software by or on behalf of you.
00028 
00029   (iii) Your use of the software.
00030 
00031   THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES,
00032   WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED
00033   TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00034   PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
00035   IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
00036   CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
00037 */
00038 
00039 #ifndef RMP_USER_DEFINED_FEEDBACK_TYPE_H
00040 #define RMP_USER_DEFINED_FEEDBACK_TYPE_H
00041 
00042 #include <cstring>
00043 #include <cstdint>
00044 
00045 namespace segway 
00046 {
00047   static const size_t FEEDBACK_TYPE_NBR = 4;
00048   static const size_t MAX_ENTRIES_PER_FEEDBACK = 32;
00049   static const size_t MAX_FEEDBACK_ENTRIES = FEEDBACK_TYPE_NBR * MAX_ENTRIES_PER_FEEDBACK;
00050 
00051   static const size_t NVM_CONFIG_PARAM_NBR = 20;
00052   static const size_t NVM_CONFIG_PARAM_SIZE = NVM_CONFIG_PARAM_NBR * sizeof(uint32_t);
00053 
00054   static const size_t FORCE_CONFIG_FEEDBACK_1_IDX = 16;
00055   static const size_t FORCE_CONFIG_FEEDBACK_2_IDX = 17;
00056   static const size_t FORCE_CONFIG_FEEDBACK_3_IDX = 18;
00057   static const size_t FORCE_CONFIG_FEEDBACK_4_IDX = 19;
00058 
00059   static const uint32_t PSE1_VALID = 0x00000001;
00060   static const uint32_t PSE2_VALID = 0x00000002;
00061   static const uint32_t PSE_VALID = PSE1_VALID | PSE2_VALID;
00062 
00067   enum UserDefinedFeedbackBitmapType
00068   {
00069     USER_DEFINED_FEEDBACK_BITMAP_1 = 0,
00070     USER_DEFINED_FEEDBACK_BITMAP_2,
00071     USER_DEFINED_FEEDBACK_BITMAP_3,
00072     USER_DEFINED_FEEDBACK_BITMAP_4
00073   };
00074 
00079   enum OperationalState
00080   {
00081     CCU_INIT = 0,
00082     INIT_PROPULSION,
00083     CHECK_STARTUP_ISSUES,
00084     STANDBY_MODE,
00085     TRACTOR_MODE,
00086     DISABLE_POWER
00087   };
00088 
00093   enum UserDefinedFeedbackType
00094   {
00095     NO_FEEDBACK = 0xFFFFFFFF,
00096     INVALID_FEEDBACK = 0xFFFFFFFE,
00097     // Bitmap 1
00098     FAULT_STATUS_WORD_1 = 0,
00099     FAULT_STATUS_WORD_2,
00100     FAULT_STATUS_WORD_3,
00101     FAULT_STATUS_WORD_4,
00102     MCU_0_FAULT_STATUS,
00103     MCU_1_FAULT_STATUS,
00104     MCU_2_FAULT_STATUS,
00105     MCU_3_FAULT_STATUS,
00106     FRAME_COUNT,
00107     OPERATIONAL_STATE,
00108     DYNAMIC_RESPONSE,
00109     MIN_PROPULSION_BATT_SOC,
00110     AUX_BATT_SOC,
00111     INERTIAL_X_ACC_G,
00112     INERTIAL_Y_ACC_G,
00113     INERTIAL_X_RATE_RPS,
00114     INERTIAL_Y_RATE_RPS,
00115     INERTIAL_Z_RATE_RPS,
00116     PSE_PITCH_DEG,
00117     PSE_PITCH_RATE_DPS,
00118     PSE_ROLL_DEG,
00119     PSE_ROLL_RATE_DPS,
00120     PSE_YAW_RATE_DPS,
00121     PSE_DATA_IS_VALID,
00122     YAW_RATE_LIMIT_RPS,
00123     VEL_LIMIT_MPS,
00124     LINEAR_ACCEL_MSP2,
00125     LINEAR_VEL_MPS,
00126     DIFFERENTIAL_WHEEL_VEL_RPS,
00127     RIGHT_FRONT_VEL_MPS,
00128     LEFT_FRONT_VEL_MPS,
00129     RIGHT_REAR_VEL_MPS,
00130     // Bitmap 2
00131     LEFT_REAR_VEL_MPS, // = 32
00132     RIGHT_FRONT_POS_M,
00133     LEFT_FRONT_POS_M,
00134     RIGHT_REAR_POS_M,
00135     LEFT_REAR_POS_M,
00136     LINEAR_POS_M,
00137     RIGHT_FRONT_CURRENT_A0PK,
00138     LEFT_FRONT_CURRENT_A0PK,
00139     RIGHT_REAR_CURRENT_A0PK,
00140     LEFT_REAR_CURRENT_A0PK,
00141     MAX_MOTOR_CURRENT_A0PK,
00142     RIGHT_FRONT_CURRENT_LIMIT_A0PK,
00143     LEFT_FRONT_CURRENT_LIMIT_A0PK,
00144     RIGHT_REAR_CURRENT_LIMIT_A0PK,
00145     LEFT_REAR_CURRENT_LIMIT_A0PK,
00146     MIN_MOTOR_CURRENT_LIMIT_A0PK,
00147     FRONT_BASE_BATT_1_SOC,
00148     FRONT_BASE_BATT_2_SOC,
00149     REAR_BASE_BATT_1_SOC,
00150     REAR_BASE_BATT_2_SOC,
00151     FRONT_BASE_BATT_1_TEMP_DEGC,
00152     FRONT_BASE_BATT_2_TEMP_DEGC,
00153     REAR_BASE_BATT_1_TEMP_DEGC,
00154     REAR_BASE_BATT_2_TEMP_DEGC,
00155     VEL_TARGET_MPS,
00156     YAW_RATE_TARGET_RPS,
00157     ANGLE_TARGET_DEG,
00158     AUX_BATT_VOLTAGE_V,
00159     AUX_BATT_CURRENT_A,
00160     AUX_BATT_TEMP_DEGC,
00161     ABB_SYSTEM_STATUS,
00162     AUX_BATT_STATUS,
00163     // Bitmap 3
00164     AUX_BATT_FAULTS, // = 64
00165     P72V_BATTERY_VOLTAGE,
00166     SP_SW_BUILD_ID,
00167     UIP_SW_BUILD_ID,
00168     MCU_0_INST_POWER_W,
00169     MCU_1_INST_POWER_W,
00170     MCU_2_INST_POWER_W,
00171     MCU_3_INST_POWER_W,
00172     MCU_0_TOTAL_ENERGY_WH,
00173     MCU_1_TOTAL_ENERGY_WH,
00174     MCU_2_TOTAL_ENERGY_WH,
00175     MCU_3_TOTAL_ENERGY_WH,
00176     FRAM_VEL_LIMIT_MPS,
00177     FRAM_ACCEL_LIMIT_MPS2,
00178     FRAM_DECEL_LIMIT_MPS2,
00179     FRAM_DTZ_DECEL_LIMIT_MPS2,
00180     FRAM_COASTDOWN_DECEL_MPS2,
00181     FRAM_YAW_RATE_LIMIT_RPS,
00182     FRAM_YAW_ACCEL_LIMIT_RPS2,
00183     FRAM_TIRE_DIAMETER_M,
00184     FRAM_WHEEL_BASE_LENGTH_M,
00185     FRAM_WHEEL_TRACK_WIDTH_M,
00186     FRAM_TRANSMISSION_RATIO,
00187     FRAM_CONFIG_BITMAP,
00188     FRAM_ETH_IP_ADDRESS,
00189     FRAM_ETH_PORT_NUMBER,
00190     FRAM_ETH_SUBNET_MASK,
00191     FRAM_ETH_GATEWAY,
00192     USER_FEEDBACK_BITMAP_1,
00193     USER_FEEDBACK_BITMAP_2,
00194     USER_FEEDBACK_BITMAP_3,
00195     USER_FEEDBACK_BITMAP_4
00196     // Bitmap 4
00197   };
00198 } // namespace segway
00199 
00200 #endif // RMP_USER_DEFINED_FEEDBACK_TYPE_H


rmp_base
Author(s):
autogenerated on Wed Aug 26 2015 16:24:39