An exception thrown from the MCInterfaceException class. More...
#include <microcontexception.h>
Public Member Functions | |
MCInterfaceException (const QString &desc, int mcerror, int mcerrorcmd, int mcerrorid, QSerialPort::SerialPortError sperror) | |
Basic constructor. More... | |
MCInterfaceException (const QString &desc, int mcerror, QSerialPort::SerialPortError sperror) | |
Constructor with just the microcontroller error component. More... | |
int | GetMCError (void) const |
Returns the current error code. More... | |
int | GetMCErrorID (void) const |
Returns the IDd the microcontroller had a problem with. More... | |
int | GetMCErrorCMD (void) const |
Returns the command the microcontroller had a problem with. More... | |
QSerialPort::SerialPortError | GetSPError (void) const |
Returns the current serial port error. See the QSerialPort documentation. More... | |
const char * | GetSPErrorText (void) const |
Returns a string describing the current serial port error. More... | |
Private Attributes | |
int | _mcerror |
An error code. More... | |
int | _mcerrorcmd |
Command that the microcontroller had a problem with (returned by the MC) More... | |
int | _mcerrorid |
Powerunit ID that had a problem (returned by the MC) More... | |
QSerialPort::SerialPortError | _sperror |
The current status of the serial port. More... | |
An exception thrown from the MCInterfaceException class.
Definition at line 20 of file microcontexception.h.
MCInterfaceException::MCInterfaceException | ( | const QString & | desc, |
int | mcerror, | ||
int | mcerrorcmd, | ||
int | mcerrorid, | ||
QSerialPort::SerialPortError | sperror | ||
) |
Basic constructor.
Definition at line 24 of file microcontexception.cpp.
MCInterfaceException::MCInterfaceException | ( | const QString & | desc, |
int | mcerror, | ||
QSerialPort::SerialPortError | sperror | ||
) |
Constructor with just the microcontroller error component.
Definition at line 37 of file microcontexception.cpp.
int MCInterfaceException::GetMCError | ( | void | ) | const |
Returns the current error code.
Definition at line 47 of file microcontexception.cpp.
int MCInterfaceException::GetMCErrorCMD | ( | void | ) | const |
Returns the command the microcontroller had a problem with.
This code is returned by the microcontroller itself, indicating a problem with this command
Definition at line 57 of file microcontexception.cpp.
int MCInterfaceException::GetMCErrorID | ( | void | ) | const |
Returns the IDd the microcontroller had a problem with.
This code is returned by the microcontroller itself, indicating a problem with this power unit ID
Definition at line 52 of file microcontexception.cpp.
QSerialPort::SerialPortError MCInterfaceException::GetSPError | ( | void | ) | const |
Returns the current serial port error. See the QSerialPort documentation.
Definition at line 62 of file microcontexception.cpp.
const char * MCInterfaceException::GetSPErrorText | ( | void | ) | const |
Returns a string describing the current serial port error.
Definition at line 67 of file microcontexception.cpp.
|
private |
An error code.
Definition at line 23 of file microcontexception.h.
|
private |
Command that the microcontroller had a problem with (returned by the MC)
Definition at line 24 of file microcontexception.h.
|
private |
Powerunit ID that had a problem (returned by the MC)
Definition at line 25 of file microcontexception.h.
|
private |
The current status of the serial port.
Definition at line 26 of file microcontexception.h.