BPLightContraption
 All Classes Namespaces Files Functions Variables Macros Pages
Public Member Functions | Private Attributes | List of all members
MCInterfaceException Class Reference

An exception thrown from the MCInterfaceException class. More...

#include <microcontexception.h>

Inheritance diagram for MCInterfaceException:
Inheritance graph
[legend]
Collaboration diagram for MCInterfaceException:
Collaboration graph
[legend]

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...
 

Detailed Description

An exception thrown from the MCInterfaceException class.

Definition at line 20 of file microcontexception.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

int MCInterfaceException::GetMCError ( void  ) const

Returns the current error code.

Definition at line 47 of file microcontexception.cpp.

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

QSerialPort::SerialPortError MCInterfaceException::GetSPError ( void  ) const

Returns the current serial port error. See the QSerialPort documentation.

Definition at line 62 of file microcontexception.cpp.

Here is the caller graph for this function:

const char * MCInterfaceException::GetSPErrorText ( void  ) const

Returns a string describing the current serial port error.

Definition at line 67 of file microcontexception.cpp.

Here is the caller graph for this function:

Member Data Documentation

int MCInterfaceException::_mcerror
private

An error code.

Definition at line 23 of file microcontexception.h.

int MCInterfaceException::_mcerrorcmd
private

Command that the microcontroller had a problem with (returned by the MC)

Definition at line 24 of file microcontexception.h.

int MCInterfaceException::_mcerrorid
private

Powerunit ID that had a problem (returned by the MC)

Definition at line 25 of file microcontexception.h.

QSerialPort::SerialPortError MCInterfaceException::_sperror
private

The current status of the serial port.

Definition at line 26 of file microcontexception.h.


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