#ifndef _MODBUS_TABLE_V2
#define _MODBUS_TABLE_V2

//#include "RS_Functions_modbus.h"
#include "modbus_struct.h"

#ifdef __cplusplus
  extern "C" {  
#endif

//#define ADR_MODBUS_TABLE 0x0001
#define ADR_MODBUS_TABLE            0x0001
#define ADR_MODBUS_TABLE_REMOUTE    0x0000

//#define SIZE_MODBUS_TABLE 820 //409 // 21300 //700  // 745.2
#define SIZE_MODBUS_TABLE 250 //490


//#define ADR_CAN_TEST_PLUS_ONE 28
//#define ADR_CAN_TEST_PLUS_TWO 18


extern MODBUS_REG_STRUCT modbus_table_rs_out[SIZE_MODBUS_TABLE];
extern MODBUS_REG_STRUCT modbus_table_rs_in[SIZE_MODBUS_TABLE];

extern MODBUS_REG_STRUCT modbus_table_can_out[SIZE_MODBUS_TABLE];
extern MODBUS_REG_STRUCT modbus_table_can_out_temp[SIZE_MODBUS_TABLE];
extern MODBUS_REG_STRUCT modbus_table_can_in[SIZE_MODBUS_TABLE];


void clear_modbus_table_in();
void clear_modbus_table_out();
void copy_from_can_out_to_rs_out(void);
void initModbusTable(void);


#ifdef __cplusplus
  }
#endif

#endif /* _MODBUS_TABLE_V2 */