Loading...
Searching...
No Matches
AisErrorCode.h
1
2#ifndef AIS_ERROR_CODE_H
3#define AIS_ERROR_CODE_H
4
5#include "AisSquidstatGlobal.h"
6#include <qstring.h>
7
18class SQUIDSTATLIBRARY_EXPORT AisErrorCode {
19
20public:
24 enum ErrorCode : uint8_t {
25 Unknown = 255,
26 Success = 0,
27 ConnectionFailed = 1,
28 FirmwareNotSupported = 2,
29 FirmwareFileNotFound = 3,
30 FirmwareUptodate = 4,
31
32 InvalidChannel = 10,
33 BusyChannel = 11,
34 DeviceNotFound = 13,
35 FeatureNotSupported = 14,
37 ManualExperimentNotRunning = 51,
38 ExperimentNotUploaded = 52,
39 ExperimentIsEmpty = 53,
40 InvalidParameters = 54,
41 ChannelNotBusy = 55,
42 ExperimentUploaded = 56,
44 DeviceCommunicationFailed = 100,
46 FailedToSetManualModeCurrentRange = 101,
47 FailedToSetManualModeConstantVoltage = 102,
48 FailedToPauseExperiment = 103,
49 FailedToResumeExperiment = 104,
50 FailedToStopExperiment = 105,
51 FailedToUploadExperiment = 106,
52 ExperimentAlreadyPaused = 107,
53 ExperimentAlreadyRun = 108,
54 FailedToSetManualModeVoltageRange = 109, /* !< indicates failure to set manual mode voltage range due to a possible communication failure with the device.*/
55 FailedToSetManualModeConstantCurrent = 110,
56 FailedToSetManualModeInOCP = 111,
57 FailedToSetManualModeSamplingInterval = 112,
58 FailedToSetIRComp = 113,
59 FailedToSetCompRange = 114,
60 FailedToSetChannelMaximumVoltage = 115,
61 FailedToSetChannelMinimumVoltage = 116,
62 FailedToSetChannelMaximumCurrent = 117,
63 FailedToSetChannelMinimumCurrent = 118,
64 FailedToSetChannelMinimumTemperature = 119,
66 FailedRequest = 254 /* !< indicates a failed request to the device. */
67 };
68
71 AisErrorCode(ErrorCode error);
72 AisErrorCode(ErrorCode error, QString message);
74
79 QString message() const;
80
85 int value() const;
86
88 operator ErrorCode() const;
90
91private:
92 ErrorCode code;
93 QString errorMessage;
94};
95
96#endif // ! AIS_ERROR_CODE_H
This class contains the possible error codes returned to the user when working with the API....
Definition AisErrorCode.h:18
QString message() const
a function to get a message explaining the error.
ErrorCode
The possible error codes that can be returned to the user.
Definition AisErrorCode.h:24
int value() const
a function to get the error code.