/*******************************************************************************
*                                                                              *
* 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 BERRIUQAM_H
#define BERRIUQAM_H
#include "Station.h"

#define BERRIUQAM_STATION_KEY 0x0028000
#define BERRIUQAM_NB_EXTERNAL_INPUT_430_MODULES 1
#define BERRIUQAM_NB_EXTERNAL_OUTPUT_440_MODULES 1
#define BERRIUQAM_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 BERRIUQAM_ZT1_S1_MASK 0x00000001
#define BERRIUQAM_ZT1_S2_MASK 0x00000002
#define BERRIUQAM_ZT1_PI_MASK 0x00000004
#define BERRIUQAM_ZT1_PE_MASK 0x00000008
#define BERRIUQAM_ZT1_FN_MASK 0x00000010
#define BERRIUQAM_ZT2_S1_MASK 0x00000020
#define BERRIUQAM_ZT2_PI_MASK 0x00000040
#define BERRIUQAM_ZT2_PE_MASK 0x00000080

//External (ethernet) input module masks for Angrignon
#define BERRIUQAM_IN_CDV_12A_MASK	 0x00000001
#define BERRIUQAM_IN_CDV_12B_MASK	 0x00000002
#define BERRIUQAM_IN_CDV_11_MASK	 0x00000004
#define BERRIUQAM_IN_CDV_10B_MASK	 0x00000008
#define BERRIUQAM_IN_CDV_10A_MASK	 0x00000010
#define BERRIUQAM_IN_CDV_13A_MASK	 0x00000020
#define BERRIUQAM_IN_CDV_14A_MASK	 0x00000040
#define BERRIUQAM_IN_CDV_13B_MASK    0x00000080
#define BERRIUQAM_IN_CDV_14B_MASK	 0x00000100
#define BERRIUQAM_IN_ZT1_ITI_MASK	 0x00000200
#define BERRIUQAM_IN_ZT2_ITI_MASK	 0x00000400
#define BERRIUQAM_IN_ZT1_AN_MASK	 0x00000800
#define BERRIUQAM_IN_ZT2_AN_MASK	 0x00001000
#define BERRIUQAM_IN_ZT1_ARF_MASK	 0x00002000
#define BERRIUQAM_IN_ZT2_ARF_MASK	 0x00004000
#define BERRIUQAM_IN_STATION_ID_MASK 0x00078000

//External (ethernet) output module masks for Angrignon
#define BERRIUQAM_OUT_VP1_MASK		0x00000001
#define BERRIUQAM_OUT_VP2_MASK		0x00000002
#define BERRIUQAM_OUT_VP3_MASK		0x00000004
#define BERRIUQAM_OUT_VP4_MASK		0x00000008
#define BERRIUQAM_OUT_VP5_MASK		0x00000010
#define BERRIUQAM_OUT_VP6_MASK		0x00000020
#define BERRIUQAM_OUT_VF1_MASK		0x00000040
#define BERRIUQAM_OUT_VF2_MASK		0x00000080
#define BERRIUQAM_OUT_VF3_MASK		0x00000100
#define BERRIUQAM_OUT_VF4_MASK		0x00000200
#define BERRIUQAM_OUT_VF5_MASK		0x00000400
#define BERRIUQAM_OUT_WP1_MASK		0x00000800
#define BERRIUQAM_OUT_WP2_MASK		0x00001000
#define BERRIUQAM_OUT_WP3_MASK		0x00002000
#define BERRIUQAM_OUT_WP4_MASK		0x00004000
#define BERRIUQAM_OUT_WP5_MASK		0x00008000
#define BERRIUQAM_OUT_WP6_MASK		0x00010000
#define BERRIUQAM_OUT_DPE_MASK		0x00020000
#define BERRIUQAM_OUT_DPI_MASK		0x00040000
#define BERRIUQAM_OUT_V00_MASK		0x00080000
#define BERRIUQAM_OUT_DPG_MASK		0x00100000
#define BERRIUQAM_OUT_DFR_MASK		0x00200000
#define BERRIUQAM_OUT_RF_MASK		0x00400000
#define BERRIUQAM_OUT_RF2_MASK		0x00800000
#define BERRIUQAM_OUT_VEL_MASK		0x01000000
#define BERRIUQAM_OUT_VEL2_MASK		0x02000000
#define BERRIUQAM_OUT_DPI2_MASK		0x04000000
#define BERRIUQAM_OUT_DPE2_MASK		0x08000000
#define BERRIUQAM_OUT_V002_MASK		0x10000000
#define BERRIUQAM_OUT_PEQ1_MASK     0x20000000
#define BERRIUQAM_OUT_PEQ2_MASK     0x40000000
#define BERRIUQAM_OUT_WATCHDOG_MASK 0x80000000

#define BERRIUQAM_SDF_ACQUISITION_CHANNEL 0

class CBerriUQAMStation : public CStation
{
public:

    CBerriUQAMStation();



private:

    virtual unsigned int BuildStationCDVList();
};

#endif // BERRIUQAM_H

