Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ippErrorNameType.cpp

Go to the documentation of this file.
00001 #include "stdafx.h"
00002 #include "ippdme/ippErrorNameType.h"
00003 
00004 
00005 #define ENUMERATION  \
00006   IPP_ENUM_VALUE_NM(BufferFull                , '0', "Buffer full")                                         \
00007   IPP_ENUM_VALUE_NM(IllegalTag                , '2', "Illegal tag")                                         \
00008   IPP_ENUM_VALUE_NM(NoSpaceAtPos6             , '2', "No space at pos. 6")                                  \
00009   IPP_ENUM_VALUE_NM(Reserved3                 , '2', "Reserved")                                            \
00010   IPP_ENUM_VALUE_NM(Reserved4                 , '2', "Reserved")                                            \
00011   IPP_ENUM_VALUE_NM(Reserved5                 , '2', "Reserved")                                            \
00012   IPP_ENUM_VALUE_NM(TransactionAborted        , '2', "Transaction aborted (Use ClearAllErrors to Continue)")\
00013   IPP_ENUM_VALUE_NM(IllegalCharacter          , '3', "Illegal character")                                   \
00014   IPP_ENUM_VALUE_NM(ProtocolError             , '3', "Protocol error")                                      \
00015   IPP_ENUM_VALUE_NM(EmergencyStop             , '3', "Emergency stop")                                      \
00016   IPP_ENUM_VALUE_NM(UnsupportedCommand        , '3', "Unsupported command")                                 \
00017   IPP_ENUM_VALUE_NM(IncorrectArguments        , '3', "Incorrect arguments")                                 \
00018   IPP_ENUM_VALUE_NM(ControllerCommFailure     , '9', "Controller communications failure")                   \
00019   IPP_ENUM_VALUE_NM(ArgumentOutOfRange        , '1', "Argument out of range")                               \
00020   IPP_ENUM_VALUE_NM(ArgumentNotRecognized     , '3', "Argument not recognized")                             \
00021   IPP_ENUM_VALUE_NM(ArgumentNotSupported      , '3', "Argument not supported")                              \
00022   IPP_ENUM_VALUE_NM(IllegalCommand            , '3', "Illegal command")                                     \
00023   IPP_ENUM_VALUE_NM(BadContext                , '3', "Bad context")                                         \
00024   IPP_ENUM_VALUE_NM(BadArgument               , '3', "Bad argument")                                        \
00025   IPP_ENUM_VALUE_NM(BadProperty               , '3', "Bad property")                                        \
00026   IPP_ENUM_VALUE_NM(ErrorProcessingMethod     , '3', "Error processing method")                             \
00027   IPP_ENUM_VALUE_NM(NoDaemonsAreActive        , '1', "No daemons are active")                               \
00028   IPP_ENUM_VALUE_NM(DaemonDoesNotExist        , '2', "Daemon does not exist")                               \
00029   IPP_ENUM_VALUE_NM(UseClearAllErrorsToCont   , '2', "Use ClearAllErrors to continue")                      \
00030   IPP_ENUM_VALUE_NM(DaemonAlreadyExists       , '2', "Daemon already exists")                               \
00031   IPP_ENUM_VALUE_NM(MachineInErrorState       , '3', "Machine in error state")                              \
00032   IPP_ENUM_VALUE_NM(IllegalTouch              , '2', "Illegal touch")                                       \
00033   IPP_ENUM_VALUE_NM(AxisDoesNotExist          , '9', "Axis does not exist")                                 \
00034   IPP_ENUM_VALUE_NM(NoTouch                   , '2', "No touch")                                            \
00035   IPP_ENUM_VALUE_NM(NumAnglNotSupOnCurrDev    , '9', "Number of angles not supported on current device")    \
00036   IPP_ENUM_VALUE_NM(ErrorDuringHome           , '3', "Error during home")                                   \
00037   IPP_ENUM_VALUE_NM(SurfaceNotFound           , '2', "Surface not found")                                   \
00038   IPP_ENUM_VALUE_NM(ThetaOutOfRange           , '3', "Theta out of range")                                  \
00039   IPP_ENUM_VALUE_NM(TargetPosOutOfMachVol     , '3', "Target position out of machine volume")               \
00040   IPP_ENUM_VALUE_NM(AirPressureOutOfRange     , '3', "Air pressure out of range")                           \
00041   IPP_ENUM_VALUE_NM(VectorHasNoNorm           , '2', "Vector has no norm")                                  \
00042   IPP_ENUM_VALUE_NM(FailedToReseatHead        , '3', "Failed to re-seat head")                              \
00043   IPP_ENUM_VALUE_NM(ProbeNotArmed             , '3', "Probe not armed")                                     \
00044   IPP_ENUM_VALUE_NM(ToolNotFound              , '3', "Tool not found")                                      \
00045   IPP_ENUM_VALUE_NM(ToolNotDefined            , '3', "Tool not defined")                                    \
00046   IPP_ENUM_VALUE_NM(ToolNotCalibrated         , '3', "Tool not calibrated")                                 \
00047   IPP_ENUM_VALUE_NM(HeadErrorExcessiveForce   , '2', "Head error excessive force")                          \
00048   IPP_ENUM_VALUE_NM(TypeProbeDoesNotAllowOper , '3', "Type of probe does not allow this operation")         \
00049   IPP_ENUM_VALUE_NM(MachineLimitEncountered   , '3', "Machine limit encountered [Move Out Of Limits]")      \
00050   IPP_ENUM_VALUE_NM(AxisNotActive             , '3', "Axis not active")                                     \
00051   IPP_ENUM_VALUE_NM(AxisPositionError         , '3', "Axis position error")                                 \
00052   IPP_ENUM_VALUE_NM(ScaleReadHeadFailure      , '9', "Scale read head failure")                             \
00053   IPP_ENUM_VALUE_NM(Collision                 , '3', "Collision")                                           \
00054   IPP_ENUM_VALUE_NM(SpecifiedAngleOutOfRange  , '2', "Specified angle out of range")                        \
00055   IPP_ENUM_VALUE_NM(PartNotAligned            , '2', "Part not aligned")                                    \
00056 
00057 
00058 const char * ippErrorNameType::toString() const
00059 {
00060   switch(_t)                     
00061   {
00062 #define IPP_ENUM_VALUE_NM(X,c,d)  case X : return d;
00063      ENUMERATION
00064   default:
00065     return"";
00066   }
00067 #undef  IPP_ENUM_VALUE_NM
00068 }
00069 
00071 ippErrorNameType ippErrorNameType::from(int value)
00072 {
00073   switch(value)                     
00074   {
00075 #define IPP_ENUM_VALUE_NM(X,c,d) case X : return X;
00076     ENUMERATION
00077   default:
00078     return GenericError;
00079   }
00080 #undef  IPP_ENUM_VALUE_NM
00081 }
00082 
00083 int ippErrorNameType::severity() const
00084 {
00085   switch(_t)                     
00086   {
00087 #define IPP_ENUM_VALUE_NM(X,severity,d)  case X : return severity;
00088     ENUMERATION
00089   default:
00090     return '0';
00091   }
00092 #undef  IPP_ENUM_VALUE_NM
00093 }
00094 

Generated on Wed Nov 8 00:20:03 2006 for IPPDME by  doxygen 1.4.1