sdh_codes.cpp
Go to the documentation of this file.
1 //======================================================================
28 //======================================================================
29 
30 
31 //----------------------------------------------------------------------
32 // System Includes - include with <>
33 //----------------------------------------------------------------------
34 
35 
36 //----------------------------------------------------------------------
37 // Project Includes - include with ""
38 //----------------------------------------------------------------------
39 
40 #include "sdh_codes.h"
41 #include "util.h"
42 
43 //----------------------------------------------------------------------
44 // Defines, enums, unions, structs
45 //----------------------------------------------------------------------
46 
47 
48 //----------------------------------------------------------------------
49 // External functions (function declarations)
50 //----------------------------------------------------------------------
51 
52 
53 //----------------------------------------------------------------------
54 // Function prototypes (function declarations)
55 //----------------------------------------------------------------------
56 
57 
58 //----------------------------------------------------------------------
59 // Class declarations
60 //----------------------------------------------------------------------
61 
63 
65 {
66  switch (cc)
67  {
112 
113 #if USE_CMD_TEST
114 
115  DEFINE_TO_CASECOMMAND( CMDC_TEST );
116 #endif
117 
118  // no default here to make compiler warn about unhandled cases
119  }
120  return "Unknown SDH command code!";
121 }
122 //----------------------------------------------------------------------
123 
125 {
126  switch (rc)
127  {
166 
167  // no default here to make compiler warn about unhandled cases
168  }
169  return "Unknown SDH return code!";
170 }
171 //----------------------------------------------------------------------
172 
173 
174 //======================================================================
175 /*
176  Here are some settings for the emacs/xemacs editor (and can be safely ignored):
177  (e.g. to explicitely set C++ mode for *.h header files)
178 
179  Local Variables:
180  mode:C
181  mode:ELSE
182  End:
183  */
184 //======================================================================
CMDC_P_MAX
CMDC_P_MAX
Definition: sdh_command_codes.h:35
CMDC_POS
CMDC_POS
Definition: sdh_command_codes.h:8
CMDC_DEMO
CMDC_DEMO
Definition: sdh_command_codes.h:53
RC_CHECKSUM_ERROR
RC_CHECKSUM_ERROR
Definition: sdh_return_codes.h:12
USING_NAMESPACE_SDH
#define USING_NAMESPACE_SDH
Definition: sdhlibrary_settings.h:81
CMDC_USER_ERRORS
CMDC_USER_ERRORS
Definition: sdh_command_codes.h:54
DEFINE_TO_CASECOMMAND
#define DEFINE_TO_CASECOMMAND(_c)
Definition: util.h:103
RC_DEVICE_NOT_FOUND
RC_DEVICE_NOT_FOUND
Definition: sdh_return_codes.h:22
RC_NO_DATAPIPE
RC_NO_DATAPIPE
Definition: sdh_return_codes.h:27
CMDC_RVEL
CMDC_RVEL
Definition: sdh_command_codes.h:7
CMDC_POWER
CMDC_POWER
Definition: sdh_command_codes.h:50
CMDC_STATE
CMDC_STATE
Definition: sdh_command_codes.h:9
RC_TIMEOUT
RC_TIMEOUT
Error: timeout occured.
Definition: sdh_return_codes.h:8
RC_AXIS_DISABLED
RC_AXIS_DISABLED
Definition: sdh_return_codes.h:30
RC_NO_PARAMS_EXPECTED
RC_NO_PARAMS_EXPECTED
Definition: sdh_return_codes.h:14
RC_ACCESS_DENIED
RC_ACCESS_DENIED
Definition: sdh_return_codes.h:17
RC_CMD_UNKNOWN
RC_CMD_UNKNOWN
Error: unknown command on command line.
Definition: sdh_return_codes.h:15
RC_INCONSISTENT_DATA
RC_INCONSISTENT_DATA
Definition: sdh_return_codes.h:7
RC_INDEX_OUT_OF_BOUNDS
RC_INDEX_OUT_OF_BOUNDS
Error: A given index parameter is invalid.
Definition: sdh_return_codes.h:28
RC_WRITE_ERROR
RC_WRITE_ERROR
Error: could not write.
Definition: sdh_return_codes.h:10
CMDC_KV
CMDC_KV
Definition: sdh_command_codes.h:48
RC_OVER_TEMPERATURE
RC_OVER_TEMPERATURE
Definition: sdh_return_codes.h:31
RC_CMD_ABORTED
RC_CMD_ABORTED
Definition: sdh_return_codes.h:20
CMDC_NUMAXIS
CMDC_NUMAXIS
Definition: sdh_command_codes.h:33
RC_INTERNAL
RC_INTERNAL
Error: callback function reports internal error.
Definition: sdh_return_codes.h:38
CMDC_TPAP
CMDC_TPAP
Definition: sdh_command_codes.h:16
CMDC_VEL
CMDC_VEL
Definition: sdh_command_codes.h:5
CMDC_STOP
CMDC_STOP
Definition: sdh_command_codes.h:13
RC_NOT_AVAILABLE
RC_NOT_AVAILABLE
Error: An accessed ressource is not available.
Definition: sdh_return_codes.h:3
CMDC_CHANGE_RS232
CMDC_CHANGE_RS232
Definition: sdh_command_codes.h:59
CMDC_USE_FIXED_LENGTH
CMDC_USE_FIXED_LENGTH
Definition: sdh_command_codes.h:57
RC_NOT_INITIALIZED
RC_NOT_INITIALIZED
Error: An accessed ressource has not been initialized.
Definition: sdh_return_codes.h:4
SDHReturnCodeToString
char const *NS_SDH SDHReturnCodeToString(eReturnCode rc)
Definition: sdh_codes.cpp:124
CMDC_TVAV
CMDC_TVAV
Definition: sdh_command_codes.h:18
sdh_codes.h
This file contains function to convert the binary command codes of the SDH. To use this from a non gc...
RC_CRC_ERROR
RC_CRC_ERROR
Cyclic Redundancy Code error while receiving binary input.
Definition: sdh_return_codes.h:35
RC_INSUFFICIENT_RESOURCES
RC_INSUFFICIENT_RESOURCES
Error: Insufficient ressources.
Definition: sdh_return_codes.h:11
CMDC_TERMINAL
CMDC_TERMINAL
Definition: sdh_command_codes.h:55
eReturnCode
enum eReturnCodeEnum eReturnCode
typedef for eCommandCodeEnum, see there
Definition: sdh_return_codes.h:118
CMDC_DEBUG
CMDC_DEBUG
Definition: sdh_command_codes.h:56
CMDC_SELGRIP
CMDC_SELGRIP
Definition: sdh_command_codes.h:42
CMDC_M
CMDC_M
Definition: sdh_command_codes.h:12
CMDC_REF
CMDC_REF
Definition: sdh_command_codes.h:24
CMDC_VER_DATE
CMDC_VER_DATE
Definition: sdh_command_codes.h:29
CMDC_TEMP
CMDC_TEMP
Definition: sdh_command_codes.h:25
NS_SDH
#define NS_SDH
Definition: sdhlibrary_settings.h:82
CMDC_P
CMDC_P
Definition: sdh_command_codes.h:10
CMDC_GRIP
CMDC_GRIP
Definition: sdh_command_codes.h:44
CMDC_VLIM
CMDC_VLIM
Definition: sdh_command_codes.h:21
eCommandCode
enum eCommandCodeEnum eCommandCode
typedef for eCommandCodeEnum, see there
Definition: sdh_command_codes.h:148
RC_CMD_FORMAT_ERROR
RC_CMD_FORMAT_ERROR
Error: invalid format of command line parameters.
Definition: sdh_return_codes.h:16
CMDC_CHANGE_CHANNEL
CMDC_CHANGE_CHANNEL
Definition: sdh_command_codes.h:60
CMDC_IHOLD
CMDC_IHOLD
Definition: sdh_command_codes.h:41
RC_DIMENSION
RC_DIMENSION
< End marker and dimension
Definition: sdh_return_codes.h:43
RC_ALREADY_RUNNING
RC_ALREADY_RUNNING
Error: Data acquisition: the acquisition loop is already running.
Definition: sdh_return_codes.h:5
RC_MAX_COMMANDS_EXCEEDED
RC_MAX_COMMANDS_EXCEEDED
Error: cannot add more than CI_MAX_COMMANDS to interpreter / POSCON_MAX_OSCILLOSCOPE parameters to os...
Definition: sdh_return_codes.h:32
RC_INVALID_PASSWORD
RC_INVALID_PASSWORD
Error: invalid password given for change user command.
Definition: sdh_return_codes.h:33
CMDC_A
CMDC_A
Definition: sdh_command_codes.h:11
RC_NO_COMMAND
RC_NO_COMMAND
Not really an error: reading input did not yield a new command.
Definition: sdh_return_codes.h:36
RC_OK
RC_OK
Success, no error.
Definition: sdh_return_codes.h:2
CMDC_SOC
CMDC_SOC
Definition: sdh_command_codes.h:31
CMDC_ID
CMDC_ID
Definition: sdh_command_codes.h:26
CMDC_P_OFFSET
CMDC_P_OFFSET
Definition: sdh_command_codes.h:36
RC_DEVICE_NOT_OPENED
RC_DEVICE_NOT_OPENED
Definition: sdh_return_codes.h:23
CMDC_ALIM
CMDC_ALIM
Definition: sdh_command_codes.h:22
RC_RANGE_ERROR
RC_RANGE_ERROR
Definition: sdh_return_codes.h:26
RC_UNKNOWN_ERROR
RC_UNKNOWN_ERROR
Error: unknown error.
Definition: sdh_return_codes.h:39
RC_NOT_ENOUGH_PARAMS
RC_NOT_ENOUGH_PARAMS
Error: not enough parameters on command line.
Definition: sdh_return_codes.h:13
CMDC_SN
CMDC_SN
Definition: sdh_command_codes.h:27
CMDC_SOC_DATE
CMDC_SOC_DATE
Definition: sdh_command_codes.h:32
CMDC_PID
CMDC_PID
Definition: sdh_command_codes.h:47
RC_READ_ERROR
RC_READ_ERROR
Error: could not read.
Definition: sdh_return_codes.h:9
RC_ALREADY_OPEN
RC_ALREADY_OPEN
Definition: sdh_return_codes.h:18
CMDC_POS_SAVE
CMDC_POS_SAVE
Definition: sdh_command_codes.h:23
CMDC_IGRIP
CMDC_IGRIP
Definition: sdh_command_codes.h:40
CMDC_P_MIN
CMDC_P_MIN
Definition: sdh_command_codes.h:34
CMDC_ILIM
CMDC_ILIM
Definition: sdh_command_codes.h:49
RC_INVALID_HANDLE
RC_INVALID_HANDLE
Definition: sdh_return_codes.h:21
RC_FEATURE_NOT_SUPPORTED
RC_FEATURE_NOT_SUPPORTED
Definition: sdh_return_codes.h:6
CMDC_CON
CMDC_CON
Definition: sdh_command_codes.h:15
RC_IO_ERROR
RC_IO_ERROR
Error: Input/Output error like bus-off detected.
Definition: sdh_return_codes.h:24
CMDC_VER
CMDC_VER
Definition: sdh_command_codes.h:28
RC_MAX_COMMANDLINE_EXCEEDED
RC_MAX_COMMANDLINE_EXCEEDED
Error: the command line given is too long.
Definition: sdh_return_codes.h:34
util.h
Interface of auxilliary utility functions for SDHLibrary-CPP.
CMDC_V
CMDC_V
Definition: sdh_command_codes.h:3
SDHCommandCodeToString
USING_NAMESPACE_SDH char const *NS_SDH SDHCommandCodeToString(eCommandCode cc)
Definition: sdh_codes.cpp:64
RC_INVALID_PARAMETER
RC_INVALID_PARAMETER
Error: invalid parameter on command line.
Definition: sdh_return_codes.h:25
CMDC_VP
CMDC_VP
Definition: sdh_command_codes.h:14
RC_HOMING_ERROR
RC_HOMING_ERROR
Definition: sdh_return_codes.h:29
CMDC_GET_DURATION
CMDC_GET_DURATION
Definition: sdh_command_codes.h:37
RC_CMD_FAILED
RC_CMD_FAILED
Definition: sdh_return_codes.h:19


sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58