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

/* ************************************************************************** */
/* Revision:
### 20121220 JFM
    Verision d'origine.
    
### YYYYMMDD Description du besoin ou du bug
    Description du changement.
 */

/* ************************************************************************** */

#ifndef MONTMORENCY1012_H
#define MONTMORENCY1012_H
#include "Station.h"

#define MONTMORENCY1012_STATION_KEY 0x0048000
#define MONTMORENCY1012_NB_EXTERNAL_INPUT_430_MODULES 1
#define MONTMORENCY1012_NB_EXTERNAL_OUTPUT_440_MODULES 1
#define MONTMORENCY1012_NB_EXTERNAL_MIXED_470_MODULES 0

//Since it's necessary to execute a very fast acquisition and analysis
//of magnetic sensors through the PCI I/O adapter, we will use masks
//instead of bitfields for those sensors.  This will accelerate
//treatment by avoiding the use of a memcpy().
#define MONTMORENCY1012_ZT1_S1_MASK 0x00000001
#define MONTMORENCY1012_ZT1_S2_MASK 0x00000002
#define MONTMORENCY1012_ZT1_PI_MASK 0x00000004
#define MONTMORENCY1012_ZT1_PE_MASK 0x00000008
#define MONTMORENCY1012_ZT1_FN_MASK 0x00000010
#define MONTMORENCY1012_ZT2_S1_MASK 0x00000020
#define MONTMORENCY1012_ZT2_PI_MASK 0x00000040
#define MONTMORENCY1012_ZT2_PE_MASK 0x00000080

//External (ethernet) input module masks for MONTMORENCY
#define MONTMORENCY1012_IN_CDV_12A_MASK		0x00000001
#define MONTMORENCY1012_IN_CDV_12BC_MASK	0x00000002
#define MONTMORENCY1012_IN_CDV_11B_MASK		0x00000004
#define MONTMORENCY1012_IN_CDV_11A_MASK		0x00000008
#define MONTMORENCY1012_IN_CDV_10B_MASK		0x00000010
#define MONTMORENCY1012_IN_CDV_13A_MASK		0x00000020
#define MONTMORENCY1012_IN_CDV_14A_MASK		0x00000040
#define MONTMORENCY1012_IN_CDV_13B_MASK		0x00000080
#define MONTMORENCY1012_IN_CDV_14B_MASK		0x00000100
#define MONTMORENCY1012_IN_ZT1_ITI_MASK     0x00000200
#define MONTMORENCY1012_IN_ZT2_ITI_MASK		0x00000400
#define MONTMORENCY1012_IN_ZT1_AN_MASK      0x00000800
#define MONTMORENCY1012_IN_ZT2_AN_MASK		0x00001000
#define MONTMORENCY1012_IN_ZT1_ARF_MASK		0x00002000
#define MONTMORENCY1012_IN_ZT2_ARF_MASK		0x00004000
#define MONTMORENCY1012_IN_STATION_ID_MASK	0x00078000

//External (ethernet) output module masks for MONTMORENCY
#define MONTMORENCY1012_OUT_VP1_MASK		0x00000001
#define MONTMORENCY1012_OUT_VP2_MASK		0x00000002
#define MONTMORENCY1012_OUT_VP3_MASK		0x00000004
#define MONTMORENCY1012_OUT_VP4_MASK		0x00000008
#define MONTMORENCY1012_OUT_VP5_MASK		0x00000010
#define MONTMORENCY1012_OUT_VP6_MASK		0x00000020
#define MONTMORENCY1012_OUT_VF1_MASK		0x00000040
#define MONTMORENCY1012_OUT_VF2_MASK		0x00000080
#define MONTMORENCY1012_OUT_VF3_MASK		0x00000100
#define MONTMORENCY1012_OUT_VF4_MASK		0x00000200
#define MONTMORENCY1012_OUT_VF5_MASK		0x00000400
#define MONTMORENCY1012_OUT_WP1_MASK		0x00000800
#define MONTMORENCY1012_OUT_WP2_MASK		0x00001000
#define MONTMORENCY1012_OUT_WP3_MASK		0x00002000
#define MONTMORENCY1012_OUT_WP4_MASK		0x00004000
#define MONTMORENCY1012_OUT_WP5_MASK		0x00008000
#define MONTMORENCY1012_OUT_WP6_MASK		0x00010000
#define MONTMORENCY1012_OUT_DPE_MASK		0x00020000
#define MONTMORENCY1012_OUT_DPI_MASK		0x00040000
#define MONTMORENCY1012_OUT_V00_MASK		0x00080000
#define MONTMORENCY1012_OUT_DPG_MASK		0x00100000
#define MONTMORENCY1012_OUT_DFR_MASK		0x00200000
#define MONTMORENCY1012_OUT_RF_MASK			0x00400000
#define MONTMORENCY1012_OUT_RF2_MASK		0x00800000
#define MONTMORENCY1012_OUT_VEL_MASK		0x01000000
#define MONTMORENCY1012_OUT_VEL2_MASK		0x02000000
#define MONTMORENCY1012_OUT_DPI2_MASK		0x04000000
#define MONTMORENCY1012_OUT_DPE2_MASK		0x08000000
#define MONTMORENCY1012_OUT_V002_MASK		0x10000000
#define MONTMORENCY1012_OUT_PEQ1_MASK		0x20000000
#define MONTMORENCY1012_OUT_PEQ2_MASK		0x40000000
#define MONTMORENCY1012_OUT_WATCHDOG_MASK	0x80000000

#define MONTMORENCY1012_SDF_ACQUISITION_CHANNEL 0

class CMontmorency1012Station : public CStation
{
public:

     CMontmorency1012Station();
  //   bool IsZT1ApproachCDVOccupied();

private:
	 virtual unsigned int BuildStationCDVList();
};

#endif // MONTMORENCY_H

