Loading...
Searching...
No Matches
AisErrorCode Class Reference

This class contains the possible error codes returned to the user when working with the API. Error codes can help diagnose issues such as invalid parameters, communication failures, or device malfunctions. By handling errors properly, you can ensure reliable operation of your experiments. More...

#include <AisErrorCode.h>

#include <AisErrorCode.h>

Public Types

enum  ErrorCode : uint8_t {
  Unknown = 255 , Success = 0 , ConnectionFailed = 1 , FirmwareNotSupported = 2 ,
  FirmwareFileNotFound = 3 , FirmwareUptodate = 4 , InvalidChannel = 10 , BusyChannel = 11 ,
  DeviceNotFound = 13 , FeatureNotSupported = 14 , ManualExperimentNotRunning = 51 , ExperimentNotUploaded = 52 ,
  ExperimentIsEmpty = 53 , InvalidParameters = 54 , ChannelNotBusy = 55 , ExperimentUploaded = 56 ,
  DeviceCommunicationFailed = 100 , FailedToSetManualModeCurrentRange = 101 , FailedToSetManualModeConstantVoltage = 102 , FailedToPauseExperiment = 103 ,
  FailedToResumeExperiment = 104 , FailedToStopExperiment = 105 , FailedToUploadExperiment = 106 , ExperimentAlreadyPaused = 107 ,
  ExperimentAlreadyRun = 108 , FailedToSetManualModeVoltageRange = 109 , FailedToSetManualModeConstantCurrent = 110 , FailedToSetManualModeInOCP = 111 ,
  FailedToSetManualModeSamplingInterval = 112 , FailedToSetIRComp = 113 , FailedToSetCompRange = 114 , FailedToSetChannelMaximumVoltage = 115 ,
  FailedToSetChannelMinimumVoltage = 116 , FailedToSetChannelMaximumCurrent = 117 , FailedToSetChannelMinimumCurrent = 118 , FailedToSetChannelMinimumTemperature = 119 ,
  FailedRequest = 254
}
 The possible error codes that can be returned to the user. More...
 

Public Member Functions

QString message () const
 a function to get a message explaining the error.
 
int value () const
 a function to get the error code.
 

Member Enumeration Documentation

◆ ErrorCode

enum AisErrorCode::ErrorCode : uint8_t
Enumerator
Unknown 

indicates that the command failed for an unknown reason.

Success 

indicates success.

ConnectionFailed 

indicates failure connecting the plugged in device when calling AisDeviceTracker::connectToDeviceOnComPort.

FirmwareNotSupported 

indicates failure connecting the plugged in device when calling AisDeviceTracker::connectToDeviceOnComPort because firmware update require.

InvalidChannel 

indicates that the given channel number is not valid.

BusyChannel 

indicates that the failure was due to the channel being busy.

DeviceNotFound 

indicates that no device was detected to be connected.

FeatureNotSupported 

indicates that the feature is not available on the device.

ManualExperimentNotRunning 

indicates that the given command applies when there is a manual experiment running on the channel but there is none.

ExperimentNotUploaded 

indicates that the given command applies when an experiment has already been uploaded to the channel but there is none.

ExperimentIsEmpty 

indicates that the given experiment has no elements. It need to contain at least one.

InvalidParameters 

indicates that a given parameter is invalid. For example, it is out of the allowed range.

ChannelNotBusy 

indicates that the given command applies when there is an experiment running or paused on the channel but there is none.

ExperimentUploaded 

indicates that the given command could not be completed because an experiment is already uploaded to the channel.

DeviceCommunicationFailed 

indicates that there was failure in communication with the device.

FailedToSetManualModeCurrentRange 

indicates failure to set manual mode current range due to a possible communication failure with the device.

FailedToSetManualModeConstantVoltage 

indicates failure to set manual mode constant voltage due to a possible communication failure with the device

FailedToPauseExperiment 

indicates that pausing the experiment failed because either there is no active experiment or due to a possible communication failure with the device.

FailedToResumeExperiment 

indicates that resuming the experiment failed because either there is no paused experiment or due to a possible communication failure with the device.

FailedToStopExperiment 

indicates that stopping the experiment failed because either there is no experiment running, the experiment is paused, or due to a possible communication failure with the device.

FailedToUploadExperiment 

indicates failure to communicate with the device to upload the experiment.

ExperimentAlreadyPaused 

indicates that pausing the experiment failed because the experiment is already paused.

ExperimentAlreadyRun 

indicates that resuming the experiment failed because an experiment is already running.

FailedToSetManualModeConstantCurrent 

indicates failure to set manual mode constant current due to a possible communication failure with the device.

FailedToSetManualModeInOCP 

indicates failure of setting manual mode in open circuit mode for possible communication failure with the device.

FailedToSetManualModeSamplingInterval 

indicates failure of setting manual mode sampling interval. possible communication failure with the device.

FailedToSetIRComp 

indicates failure of setting IR Compensation. Possible communication failure with the device.

FailedToSetCompRange 

indicates failure of setting Compensation Range. Possible communication failure with the device.

FailedToSetChannelMaximumVoltage 

indicates failure of setting Channel Maximum Voltage. Possible communication failure with the device.

FailedToSetChannelMinimumVoltage 

indicates failure of setting Channel Minimum Voltage. Possible communication failure with the device.

FailedToSetChannelMaximumCurrent 

indicates failure of setting Channel Maximum Current. Possible communication failure with the device.

FailedToSetChannelMinimumCurrent 

indicates failure of setting Channel Minimum Current. Possible communication failure with the device.

FailedToSetChannelMinimumTemperature 

indicates failure of setting Channel Maximum Temperature. Possible communication failure with the device.

Member Function Documentation

◆ message()

QString AisErrorCode::message ( ) const
Returns
a message that explains the error.

◆ value()

int AisErrorCode::value ( ) const
Returns
the error code

The documentation for this class was generated from the following file: