RmpConfigurationCommand.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_CONFIGURATION_COMMAND_H
00040 #define RMP_CONFIGURATION_COMMAND_H
00041 
00042 #include <RmpUserDefinedFeedbackType.h>
00043 
00044 namespace segway
00045 {
00050   enum RmpConfigurationCommandId
00051   {
00052     CONFIG_CMD_ID_NONE = 0,
00053     CONFIG_CMD_ID_SET_MAXIMUM_VELOCITY,
00054     CONFIG_CMD_ID_SET_MAXIMUM_ACCELERATION,
00055     CONFIG_CMD_ID_SET_MAXIMUM_DECELERATION,
00056     CONFIG_CMD_ID_SET_DTZ_DECEL_RATE,
00057     CONFIG_CMD_ID_SET_COASTDOAN_ACCEL,
00058     CONFIG_CMD_ID_SET_MAXIMUM_TURN_RATE,
00059     CONFIG_CMD_ID_SET_MAXIMUM_TURN_ACCEL,
00060     CONFIG_CMD_ID_SET_TIRE_DIAMETER,
00061     CONFIG_CMD_ID_SET_WHEEL_BASE_LENGTH,
00062     CONFIG_CMD_ID_SET_WHEEL_TRACK_WIDTH,
00063     CONFIG_CMD_ID_SET_TRANSMISSION_RATIO,
00064     CONFIG_CMD_ID_SET_INPUT_CONFIG_BITMAP,
00065     CONFIG_CMD_ID_SET_ETH_IP_ADDRESS,
00066     CONFIG_CMD_ID_SET_ETH_PORT_NUMBER,
00067     CONFIG_CMD_ID_SET_ETH_SUBNET_MASK,
00068     CONFIG_CMD_ID_SET_GATEWAY,
00069     CONFIG_CMD_ID_SET_USER_FB_1_BITMAP,
00070     CONFIG_CMD_ID_SET_USER_FB_2_BITMAP,
00071     CONFIG_CMD_ID_SET_USER_FB_3_BITMAP,
00072     CONFIG_CMD_ID_SET_USER_FB_4_BITMAP,
00073     CONFIG_CMD_ID_FORCE_CONFIG_FEEDBACK_BITMAPS = 30,
00074     CONFIG_CMD_ID_SET_AUDIO_COMMAND,
00075     CONFIG_CMD_ID_SET_OPERATIONAL_MODE,
00076     CONFIG_CMD_ID_SEND_SP_FAULT_LOG,
00077     CONFIG_CMD_ID_RESET_INTEGRATORS,
00078     CONFIG_CMD_ID_RESET_PARAMS_TO_DEFAULT
00079   };
00080 
00085   enum RmpOperationalModeRequest
00086   {
00087     DISABLE_REQUEST = 1,
00088     POWERDOWN_REQUEST,
00089     DTZ_REQUEST,
00090     STANDBY_REQUEST,
00091     TRACTOR_REQUEST
00092   };
00093 
00098   enum RmpAudioSong
00099   {
00100     MOTOR_AUDIO_PLAY_NO_SONG = 0,
00101     MOTOR_AUDIO_PLAY_POWER_ON_SONG,
00102     MOTOR_AUDIO_PLAY_POWER_OFF_SONG,
00103     MOTOR_AUDIO_PLAY_ALARM_SONG,
00104     MOTOR_AUDIO_PLAY_MODE_UP_SONG,
00105     MOTOR_AUDIO_PLAY_MODE_DOWN_SONG,
00106     MOTOR_AUDIO_PLAY_ENTER_ALARM_SONG,
00107     MOTOR_AUDIO_PLAY_EXIT_ALARM_SONG,
00108     MOTOR_AUDIO_PLAY_FINAL_SHUTDOWN_SONG,
00109     MOTOR_AUDIO_PLAY_CORRECT_ISSUE,
00110     MOTOR_AUDIO_PLAY_ISSUE_CORRECTED,
00111     MOTOR_AUDIO_PLAY_CORRECT_ISSUE_REPEATING,
00112     MOTOR_AUDIO_PLAY_BEGINNER_ACK,
00113     MOTOR_AUDIO_PLAY_EXPERT_ACK,
00114     MOTOR_AUDIO_ENTER_FOLLOW,
00115     MOTOR_AUDIO_TEST_SWEEP,
00116     MOTOR_AUDIO_SIMULATE_MOTOR_NOISE
00117   };
00118 
00123   enum RmpResetIntegrator
00124   {
00125     RESET_LINEAR_POSITION = 0x00000001,
00126     RESET_RIGHT_FRONT_POSITION = 0x00000002,
00127     RESET_LEFT_FRONT_POSITION = 0x00000004,
00128     RESET_RIGHT_REAR_POSITION = 0x00000008,
00129     RESET_LEFT_REAR_POSITION = 0x00000010,
00130     RESET_ALL_POSITION_DATA = 0x0000001F
00131   };
00132 
00133   class RmpConfigurationCommandSet;
00134 
00139   template<typename T>
00140   struct RmpConfigurationCommand
00141   {
00142     friend class RmpConfigurationCommandSet;
00143     
00144   public:
00148     const RmpConfigurationCommandId m_CommandId;
00149 
00153     const T m_Min;
00154 
00158     const T m_Max;
00159 
00163     const UserDefinedFeedbackType m_FeedbackType;
00164 
00165   private:
00178     RmpConfigurationCommand(RmpConfigurationCommandId commandId, T min, T max, UserDefinedFeedbackType feedbackType)
00179       : m_CommandId(commandId)
00180       , m_Min(min)
00181       , m_Max(max)
00182       , m_FeedbackType(feedbackType)
00183     {}
00184 
00188     RmpConfigurationCommand();
00189 
00193     RmpConfigurationCommand(const RmpConfigurationCommand&);
00194 
00198     RmpConfigurationCommand& operator=(const RmpConfigurationCommand&);
00199 
00203     ~RmpConfigurationCommand()
00204     {}
00205   };
00206 
00211   class RmpConfigurationCommandSet
00212   {
00213   public:
00214     const static RmpConfigurationCommand<uint32_t> NONE;
00215     const static RmpConfigurationCommand<float> SET_MAXIMUM_VELOCITY;
00216     const static RmpConfigurationCommand<float> SET_MAXIMUM_ACCELERATION;
00217     const static RmpConfigurationCommand<float> SET_MAXIMUM_DECELERATION;
00218     const static RmpConfigurationCommand<float> SET_MAXIMUM_DTZ_DECEL_RATE;
00219     const static RmpConfigurationCommand<float> SET_COASTDOWN_ACCEL;
00220     const static RmpConfigurationCommand<float> SET_MAXIMUM_TURN_RATE;
00221     const static RmpConfigurationCommand<float> SET_MAXIMUM_TURN_ACCEL;
00222     const static RmpConfigurationCommand<float> SET_TIRE_DIAMETER;
00223     const static RmpConfigurationCommand<float> SET_WHEEL_BASE_LENGTH;
00224     const static RmpConfigurationCommand<float> SET_WHEEL_TRACK_WIDTH;
00225     const static RmpConfigurationCommand<float> SET_TRANSMISSION_RATIO;
00226     const static RmpConfigurationCommand<uint32_t> SET_INPUT_CONFIG_BITMAP;
00227     const static RmpConfigurationCommand<uint32_t> SET_ETH_IP_ADDRESS;
00228     const static RmpConfigurationCommand<uint32_t> SET_ETH_PORT_ADDRESS;
00229     const static RmpConfigurationCommand<uint32_t> SET_ETH_SUBNET_MASK;
00230     const static RmpConfigurationCommand<uint32_t> SET_ETH_GATEWAY;
00231     const static RmpConfigurationCommand<uint32_t> SET_USER_FB_1_BITMAP;
00232     const static RmpConfigurationCommand<uint32_t> SET_USER_FB_2_BITMAP;
00233     const static RmpConfigurationCommand<uint32_t> SET_USER_FB_3_BITMAP;
00234     const static RmpConfigurationCommand<uint32_t> SET_USER_FB_4_BITMAP;
00235     const static RmpConfigurationCommand<uint32_t> FORCE_CONFIG_FEEDBACK_BITMAPS;
00236     const static RmpConfigurationCommand<uint32_t> SET_AUDIO_COMMAND;
00237     const static RmpConfigurationCommand<uint32_t> SET_OPERATIONAL_MODE;
00238     const static RmpConfigurationCommand<uint32_t> SEND_SP_FAULT_LOG;
00239     const static RmpConfigurationCommand<uint32_t> RESET_INTEGRATORS;
00240     const static RmpConfigurationCommand<uint32_t> RESET_PARAMS_TO_DEFAULT;
00241   };
00242   
00243 } // namespace segway
00244 
00245 #endif // RMP_CONFIGURATION_COMMAND_H


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