pyP2Monitor  1.0.0
Monitor a P2 furnace activity reading data on serial port
 All Data Structures Namespaces Functions Variables Groups Pages
Public Member Functions | Data Fields | Static Public Attributes
P2ComError Class Reference

Class handling I/O exception. More...

Public Member Functions

def __init__
 Instanciate a P2ComError object.
def __str__
 Cast a P2ComError into a string.
def getErrno
 Return the associated error code.
def getErrStr
 Return the associated error string.
def getData
 Return the associated data.

Data Fields

 errno
 The associated error code.
 data
 The associaed datas.

Static Public Attributes

dictionary ERR_STR
 Stores string representation for an error code.
int ERR_TIMEOUT = 9
 Error code for timeout.
int ERR_HEADER = 10
 Error code for header receive.
int ERR_DATASZ = 11
 Error code for invalid data size.
int ERR_DATA = 12
 Error code for global data error.
int ERR_CHKSUM_RECV = 13
 Error code for invalid checksum on received frame.
int ERR_CHKSUM = 2
 Error code for checksum error.

Detailed Description

Class handling I/O exception.

This class is an exception class used to handle serial port I/O errors such as timeout.

Definition at line 43 of file p2com.py.

Constructor & Destructor Documentation

def __init__ (   self,
  errno,
  data = None 
)

Instanciate a P2ComError object.

Parameters
errnoThe error code
dataThe data received on serial port

Definition at line 70 of file p2com.py.

Field Documentation

dictionary ERR_STR
static
Initial value:
{ 10: "Incomplete or timeout header recv",
11: "Timeout on data size recv",
12: "Incomplete or timeout data recv",
13: "Incomplete message or checksum or timeout on checksum recv",
2 : "Invalid checksum",
9 : "Global timeout, no frame received"}

Stores string representation for an error code.

Definition at line 46 of file p2com.py.


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