/*******************************************************************************
*                                                                              *
* Société de Transports de Montréal.                                    	   *
* 2012                                                                         *
*                                                                              *
* Projet Zones Tests                                                           *
*                                                                              *
*                                                                              *
*                                                                              *
*******************************************************************************/
/*
    Description:
    Description du fichier si nécessaire.

*/

/* ************************************************************************** */
/* Revision:
### 20121210 JFM
    Verision d'origine.

### YYYYMMDD Description du besoin ou du bug
    Description du changement.
 */

/* ************************************************************************** */
#ifndef GLOBAL_DEFINE
#define GLOBAL_DEFINE

//#include <stdio.h>
#include "EngLog.h"

//Screen resolution.
#define SCREEN_RES_WIDTH 1024
#define SCREEN_RES_HEIGHT 768

//Train parameters
#define MR_BOGIE_LENGTH 1.52 //meters
#define MPM_BOGIE_LENGTH 2.0 //meters

//The amount of millisecs to wait for the sensors to stabilize before
//beginning the execution of ZT application
#define ZT_EXTERNAL_WATCHDOG_TIMEOUT 10000   //10 seconds
#define ZT_EXTERNAL_WATCHDOG_PULSE_TIME 1000   //1 second
#define ZT_SM_MAX_NB_PG_CALIB_PASSAGES 50	//Nb maximal de passages pour calibration du pneu guidage
#define ZT_DEFAULT_DETECTION_RANK 99	//The rank of a detection when there is a count error


//To be able to run the application with no PCI card installed.
//This will skip PCI card initialization.
//#define NO_PCI_CARD_INSTALLED

#define DEFAULT_PASSWORD "zonetest"
#define BASE_FILE_MAGICNBR 0xDEADBEEF
//#define TRAINLOG_FILE_MAGICNBR BASE_FILE_MAGICNBR + 15
#define TRAINLOG_FILE_MAGICNBR BASE_FILE_MAGICNBR + 16      //Ajout de l'état d'inhibition des fonctions de détection dans le fichier Log


//Misc definitions
#define MAX_LOG_FILE_COUNT 100
#define MAX_LOG_DIR_SIZE (qint64)1073741824	//in bytes = 1 GB
#define EXT_DIGITAL_INPUTS_ACQUISITION_PERIOD 100 //milliseconds
#define EXT_ANALOG_INPUT_ACQUISITION_PERIOD 200000 //nanoseconds
#define FILESYSTEM_FORCED_SYNC_TIMEOUT (qint64)2400000  //2.4 million milliseconds = 40 minutes
#define MAX_ENGINEERING_LOG_FILESIZE (qint32)1000000 //~1Mb
#define SEI_CLIENT_RECONNECT_TIMEOUT 200    //ms
#define SEI_CLIENT_CONNECTION_TIMEOUT 5000 //ms

#define USE_DAQNAVI_LIB

#define USE_NETWORKING
#define TCP_SERVER_PORT 1234
#define CUSTOM_KERNEL_INSTALLED //Custom kernel with modified serial.c to disable hardware FIFO.
//#define COMPILE_MODBUS_TEST_MODE    //Utilisé seulement pour les tests d'intégration Modbus.


//Debug defs
//#define LOG_RAM_USAGE

//General purpose return values.
enum eGeneralRetValue
{
    RET_OK,
    RET_ERROR
};

#endif
