tool/FoeCommand.cpp
branch1.4-foe
changeset 1707 11ec009e145d
child 1336 e27b37e80a99
equal deleted inserted replaced
1706:c55ebaa206f8 1707:11ec009e145d
       
     1 /*****************************************************************************
       
     2  *
       
     3  * $Id$
       
     4  *
       
     5  ****************************************************************************/
       
     6 
       
     7 #include "FoeCommand.h"
       
     8 #include "foe.h"
       
     9 
       
    10 /*****************************************************************************/
       
    11 
       
    12 FoeCommand::FoeCommand(const string &name, const string &briefDesc):
       
    13     Command(name, briefDesc)
       
    14 {
       
    15 }
       
    16 
       
    17 /****************************************************************************/
       
    18 
       
    19 std::string FoeCommand::errorString(int abort_code)
       
    20 {
       
    21 	switch (abort_code) {
       
    22 		case FOE_BUSY:
       
    23 			return "FOE_BUSY";
       
    24 		case FOE_READY:
       
    25 			return "FOE_READY";
       
    26 		case FOE_IDLE:
       
    27 			return "FOE_IDLE";
       
    28 		case FOE_WC_ERROR:
       
    29 			return "FOE_WC_ERROR";
       
    30 		case FOE_RECEIVE_ERROR:
       
    31 			return "FOE_RECEIVE_ERROR";
       
    32 		case FOE_PROT_ERROR:
       
    33 			return "FOE_PROT_ERROR";
       
    34 		case FOE_NODATA_ERROR:
       
    35 			return "FOE_NODATA_ERROR";
       
    36 		case FOE_PACKETNO_ERROR:
       
    37 			return "FOE_PACKETNO_ERROR";
       
    38 		case FOE_OPMODE_ERROR:
       
    39 			return "FOE_OPMODE_ERROR";
       
    40 		case FOE_TIMEOUT_ERROR:
       
    41 			return "FOE_TIMEOUT_ERROR";
       
    42 		case FOE_SEND_RX_DATA_ERROR:
       
    43 			return "FOE_SEND_RX_DATA_ERROR";
       
    44 		case FOE_RX_DATA_ACK_ERROR:
       
    45 			return "FOE_RX_DATA_ACK_ERROR";
       
    46 		case FOE_ACK_ERROR:
       
    47 			return "FOE_ACK_ERROR";
       
    48 		case FOE_MBOX_FETCH_ERROR:
       
    49 			return "FOE_MBOX_FETCH_ERROR";
       
    50 		case FOE_READ_NODATA_ERROR:
       
    51 			return "FOE_READ_NODATA_ERROR";
       
    52 		case FOE_MBOX_PROT_ERROR:
       
    53 			return "FOE_MBOX_PROT_ERROR";
       
    54 		default:
       
    55 			return "???";
       
    56 	}
       
    57 }
       
    58 
       
    59 /****************************************************************************/