/*
 * api_constants.h
 *
 *  Created on: Jul 2, 2010
 *      Author: zumbruch
 */

#ifndef API_CONSTANTS_H_
#define API_CONSTANTS_H_

#ifdef API_CONSTANTS_H_
//#include "can.h"
#include "api_define.h"
#include "api_global.h"
#include "api_constants.h"

extern const char *general_error[] PROGMEM;
enum ge_index
{
   GENERAL_ERROR_init_for_timer0_failed = 0,
   GENERAL_ERROR_init_for_timer0A_failed,
   GENERAL_ERROR_family_code_not_found,
   GENERAL_ERROR_all_message_were_read,
   GENERAL_ERROR_no_device_is_connected_to_the_bus,
   GENERAL_ERROR_undefined_bus,
   GENERAL_ERROR_channel_undefined,
   GENERAL_ERROR_value_has_invalid_type,
   GENERAL_ERROR_adress_has_invalid_type,
   GENERAL_ERROR_undefined_family_code,
   GENERAL_ERROR_invalid_argument,
   GENERAL_ERROR_MAXIMUM_INDEX
};

extern const char *serial_error[] PROGMEM;
enum se_index
{
   SERIAL_ERROR_no_valid_command_name = 0,
   SERIAL_ERROR_command_type_is_too_long,
   SERIAL_ERROR_adresse_is_too_long,
   SERIAL_ERROR_length_is_too_long,
   SERIAL_ERROR_data_0_is_too_long,
   SERIAL_ERROR_data_1_is_too_long,
   SERIAL_ERROR_data_2_is_too_long,
   SERIAL_ERROR_data_3_is_too_long,
   SERIAL_ERROR_data_4_is_too_long,
   SERIAL_ERROR_data_5_is_too_long,
   SERIAL_ERROR_data_6_is_too_long,
   SERIAL_ERROR_data_7_is_too_long,
   SERIAL_ERROR_command_is_too_long,
   SERIAL_ERROR_argument_has_invalid_type,
   SERIAL_ERROR_command_type_has_invalid_type,
   SERIAL_ERROR_adresse_has_invalid_type,
   SERIAL_ERROR_length_has_invalid_type,
   SERIAL_ERROR_data_0_has_invalid_type,
   SERIAL_ERROR_data_1_has_invalid_type,
   SERIAL_ERROR_data_2_has_invalid_type,
   SERIAL_ERROR_data_3_has_invalid_type,
   SERIAL_ERROR_data_4_has_invalid_type,
   SERIAL_ERROR_data_5_has_invalid_type,
   SERIAL_ERROR_data_6_has_invalid_type,
   SERIAL_ERROR_data_7_has_invalid_type,
   SERIAL_ERROR_undefined_error_type,
   SERIAL_ERROR_first_value_is_too_long,
   SERIAL_ERROR_second_value_is_too_long,
   SERIAL_ERROR_arguments_have_invalid_type,
   SERIAL_ERROR_arguments_exceed_boundaries,
   SERIAL_ERROR_too_many_arguments,
   SERIAL_ERROR_MAXIMUM_INDEX

};

extern const char *twi_error[] PROGMEM;
enum te_index
{
   TWI_ERROR_Error_in_initiating_TWI_interface = 0,
   TWI_ERROR_Could_not_start_TWI_Bus_for_WRITE,
   TWI_ERROR_Could_not_start_TWI_Bus_for_READ,
   TWI_ERROR_MAXIMUM_INDEX

};

// 

extern const char* responseKeywords[] PROGMEM;
/* those are the corresponding command key numbers to commandKeywords, beware of the same order*/
enum responseKeyNumber
{
      responseKeyNumber_RECV = 0,
               responseKeyNumber_MAXIMUM_INDEX
};

extern const char* commandKeywords[] PROGMEM;
/* those are the corresponding command key numbers to commandKeywords, beware of the same order*/
enum cmdKeyNumber
{
               commandKeyNumber_TWIS = 0,
        

               commandKeyNumber_RSET,
               commandKeyNumber_OWON,

               commandKeyNumber_SHOW,
              
             
               commandKeyNumber_MAXIMUM_NUMBER
};

extern const char* commandShortDescriptions[] PROGMEM;
extern const char* commandImplementations[] PROGMEM;

extern const char *errorTypes[] PROGMEM;
/* those are the corresponding ERRx numbers to errorTypes, beware of the same order*/
enum ERRs
{
   ERRG = 0,
   ERRA,
   ERRT,
   ERRU,
   ERR_MAXIMUM_NUMBER
};

extern const char *debugLevelNames[] PROGMEM;
extern const char *debugSystemNames[] PROGMEM;

#endif /* API_CONSTANTS_H_ */
#endif /* API_CONSTANTS_H_ */
