Création station DuCollege
This commit is contained in:
parent
da697ff567
commit
79645ef3c8
167
sources/Stations/DuCollege.cpp
Normal file
167
sources/Stations/DuCollege.cpp
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* *
|
||||||
|
* Société de Transports de Montréal. *
|
||||||
|
* 2012 *
|
||||||
|
* *
|
||||||
|
* Projet Zones Tests *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
*******************************************************************************/
|
||||||
|
/*
|
||||||
|
Description:
|
||||||
|
Classe instantiable dérivée de la classe de base CStation. Les paramètres
|
||||||
|
physiques de la station sont définis et initialisés ici. Ils sont ensuite
|
||||||
|
accédés de manière générique à travers la classe CStation.
|
||||||
|
Les paramètres dépend du câblage de l'armoire ZT et de la configuration
|
||||||
|
particulière des CDVs de la station.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ************************************************************************** */
|
||||||
|
/* Revision:
|
||||||
|
### 20121217 JFM
|
||||||
|
Verision d'origine.
|
||||||
|
|
||||||
|
### YYYYMMDD Description du besoin ou du bug
|
||||||
|
Description du changement.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
#include "Angrignon.h"
|
||||||
|
#include <QtGlobal>
|
||||||
|
#ifndef WINDOWS_OS
|
||||||
|
#include "ExternalIOMgr.h"
|
||||||
|
#include "Seaio430driver.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//rydy
|
||||||
|
CAngrignonStation::CAngrignonStation()
|
||||||
|
{
|
||||||
|
//All the inherited variables from base class must be initialized here
|
||||||
|
//according to the physical implementation in the station.
|
||||||
|
mNbExtInputModules430 = ANGRIGNON_NB_EXTERNAL_INPUT_430_MODULES;
|
||||||
|
mNbExtOutputModules440 = ANGRIGNON_NB_EXTERNAL_OUTPUT_440_MODULES;
|
||||||
|
mNbExtMixedModules470 = ANGRIGNON_NB_EXTERNAL_MIXED_470_MODULES;
|
||||||
|
mStationPhysicalKey = ANGRIGNON_STATION_KEY;
|
||||||
|
|
||||||
|
//Initialize mask structures
|
||||||
|
//
|
||||||
|
|
||||||
|
mStationInputMasks.InputZT1S1Mask = ANGRIGNON_ZT1_S1_MASK;
|
||||||
|
mStationInputMasks.InputZT1S2Mask = ANGRIGNON_ZT1_S2_MASK;
|
||||||
|
mStationInputMasks.InputZT1PIMask = ANGRIGNON_ZT1_PI_MASK;
|
||||||
|
mStationInputMasks.InputZT1PEMask = ANGRIGNON_ZT1_PE_MASK;
|
||||||
|
mStationInputMasks.InputZT1FNMask = ANGRIGNON_ZT1_FN_MASK;
|
||||||
|
mStationInputMasks.InputZT2S1Mask = ANGRIGNON_ZT2_S1_MASK;
|
||||||
|
mStationInputMasks.InputZT2PIMask = ANGRIGNON_ZT2_PI_MASK;
|
||||||
|
mStationInputMasks.InputZT2PEMask = ANGRIGNON_ZT2_PE_MASK;
|
||||||
|
|
||||||
|
//External (ethernet) input module masks
|
||||||
|
mStationInputMasks.InputZT1ITIMask = ANGRIGNON_IN_ZT1_ITI_MASK;
|
||||||
|
mStationInputMasks.InputZT2ITIMask = ANGRIGNON_IN_ZT2_ITI_MASK;
|
||||||
|
mStationInputMasks.InputZT1ANMask = ANGRIGNON_IN_ZT1_AN_MASK;
|
||||||
|
mStationInputMasks.InputZT2ANMask = ANGRIGNON_IN_ZT2_AN_MASK;
|
||||||
|
mStationInputMasks.InputZT1ARFMask = ANGRIGNON_IN_ZT1_ARF_MASK;
|
||||||
|
mStationInputMasks.InputZT2ARFMask = ANGRIGNON_IN_ZT2_ARF_MASK;
|
||||||
|
mStationInputMasks.InputStationIDMask = ANGRIGNON_IN_STATION_ID_MASK;
|
||||||
|
|
||||||
|
//Logic input masks
|
||||||
|
mStationInputMasks.InputCDVZT1ApproachMask = ANGRIGNON_IN_CDV_11A_MASK;
|
||||||
|
mStationInputMasks.InputCDVZT1Mask = ANGRIGNON_IN_CDV_11B_MASK;
|
||||||
|
mStationInputMasks.InputCDVZT2ApproachMask = ANGRIGNON_IN_CDV_12B_MASK;
|
||||||
|
mStationInputMasks.InputCDVZT2Mask = ANGRIGNON_IN_CDV_13A_MASK;
|
||||||
|
|
||||||
|
//Output masks
|
||||||
|
mStationOutputMasks.OutputVP1Mask = ANGRIGNON_OUT_VP1_MASK;
|
||||||
|
mStationOutputMasks.OutputVP2Mask = ANGRIGNON_OUT_VP2_MASK;
|
||||||
|
mStationOutputMasks.OutputVP3Mask = ANGRIGNON_OUT_VP3_MASK;
|
||||||
|
mStationOutputMasks.OutputVP4Mask = ANGRIGNON_OUT_VP4_MASK;
|
||||||
|
mStationOutputMasks.OutputVP5Mask = ANGRIGNON_OUT_VP5_MASK;
|
||||||
|
mStationOutputMasks.OutputVP6Mask = ANGRIGNON_OUT_VP6_MASK;
|
||||||
|
mStationOutputMasks.OutputVF1Mask = ANGRIGNON_OUT_VF1_MASK;
|
||||||
|
mStationOutputMasks.OutputVF2Mask = ANGRIGNON_OUT_VF2_MASK;
|
||||||
|
mStationOutputMasks.OutputVF3Mask = ANGRIGNON_OUT_VF3_MASK;
|
||||||
|
mStationOutputMasks.OutputVF4Mask = ANGRIGNON_OUT_VF4_MASK;
|
||||||
|
mStationOutputMasks.OutputVF5Mask = ANGRIGNON_OUT_VF5_MASK;
|
||||||
|
mStationOutputMasks.OutputWP1Mask = ANGRIGNON_OUT_WP1_MASK;
|
||||||
|
mStationOutputMasks.OutputWP2Mask = ANGRIGNON_OUT_WP2_MASK;
|
||||||
|
mStationOutputMasks.OutputWP3Mask = ANGRIGNON_OUT_WP3_MASK;
|
||||||
|
mStationOutputMasks.OutputWP4Mask = ANGRIGNON_OUT_WP4_MASK;
|
||||||
|
mStationOutputMasks.OutputWP5Mask = ANGRIGNON_OUT_WP5_MASK;
|
||||||
|
mStationOutputMasks.OutputWP6Mask = ANGRIGNON_OUT_WP6_MASK;
|
||||||
|
mStationOutputMasks.OutputDPEMask = ANGRIGNON_OUT_DPE_MASK;
|
||||||
|
mStationOutputMasks.OutputDPIMask = ANGRIGNON_OUT_DPI_MASK;
|
||||||
|
mStationOutputMasks.OutputV00Mask = ANGRIGNON_OUT_V00_MASK;
|
||||||
|
mStationOutputMasks.OutputDPGMask = ANGRIGNON_OUT_DPG_MASK;
|
||||||
|
mStationOutputMasks.OutputDFRMask = ANGRIGNON_OUT_DFR_MASK;
|
||||||
|
mStationOutputMasks.OutputRFMask = ANGRIGNON_OUT_RF_MASK;
|
||||||
|
mStationOutputMasks.OutputRF2Mask = ANGRIGNON_OUT_RF2_MASK;
|
||||||
|
mStationOutputMasks.OutputVELMask = ANGRIGNON_OUT_VEL_MASK;
|
||||||
|
mStationOutputMasks.OutputVEL2Mask = ANGRIGNON_OUT_VEL2_MASK;
|
||||||
|
mStationOutputMasks.OutputDPI2Mask = ANGRIGNON_OUT_DPI2_MASK;
|
||||||
|
mStationOutputMasks.OutputDPE2Mask = ANGRIGNON_OUT_DPE2_MASK;
|
||||||
|
mStationOutputMasks.OutputV002Mask = ANGRIGNON_OUT_V002_MASK;
|
||||||
|
mStationOutputMasks.OutputPEQ1Mask = ANGRIGNON_OUT_PEQ1_MASK;
|
||||||
|
mStationOutputMasks.OutputPEQ2Mask = ANGRIGNON_OUT_PEQ2_MASK;
|
||||||
|
mStationOutputMasks.OutputWatchdogMask = ANGRIGNON_OUT_WATCHDOG_MASK;
|
||||||
|
|
||||||
|
mAnalogAcqChannels.SDFAcquisitionChannel = ANGRIGNON_SDF_ACQUISITION_CHANNEL;
|
||||||
|
|
||||||
|
mStationHasZT2 = true;
|
||||||
|
mTextualStationName = "Angrignon";
|
||||||
|
mTextualShortName = "ANG";
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int CAngrignonStation::BuildStationCDVList()
|
||||||
|
{
|
||||||
|
CCDV *NewCDV;
|
||||||
|
mCDVList.empty();
|
||||||
|
|
||||||
|
NewCDV = new CCDV(ANGRIGNON_IN_ZT2_ITI_MASK,ANGRIGNON_IN_CDV_14B_MASK,CDV_NORMAL_TYPE,"14B",1,0);
|
||||||
|
mCDVList.append(NewCDV);
|
||||||
|
|
||||||
|
NewCDV = new CCDV(ANGRIGNON_IN_ZT2_ITI_MASK,ANGRIGNON_IN_CDV_14A_MASK,CDV_NORMAL_TYPE,"14A",1,1);
|
||||||
|
mCDVList.append(NewCDV);
|
||||||
|
|
||||||
|
NewCDV = new CCDV(ANGRIGNON_IN_ZT2_ITI_MASK,ANGRIGNON_IN_CDV_13BC_MASK,CDV_NORMAL_TYPE,"13BC",1,2);
|
||||||
|
mZT2AlarmAutoAcquireCDV = NewCDV;
|
||||||
|
mCDVList.append(NewCDV);
|
||||||
|
|
||||||
|
|
||||||
|
NewCDV = new CCDV(ANGRIGNON_IN_ZT2_ITI_MASK,ANGRIGNON_IN_CDV_13A_MASK,CDV_NORMAL_TYPE,"13A ZT2",1,3);
|
||||||
|
mZT2CDV = NewCDV;
|
||||||
|
mZT2ApproachCDV = NewCDV;
|
||||||
|
mCDVList.append(NewCDV);
|
||||||
|
|
||||||
|
|
||||||
|
NewCDV = new CCDV(ANGRIGNON_IN_ZT1_ITI_MASK,ANGRIGNON_IN_CDV_12B_MASK,CDV_NORMAL_TYPE,"12B",1,4);
|
||||||
|
mCDVList.append(NewCDV);
|
||||||
|
NewCDV->SetCDVDeck(true);
|
||||||
|
|
||||||
|
|
||||||
|
NewCDV = new CCDV(ANGRIGNON_IN_ZT1_ITI_MASK,ANGRIGNON_IN_CDV_12A_MASK,CDV_NORMAL_TYPE,"12A",1,5);
|
||||||
|
mZT1AlarmAutoAcquireCDV = NewCDV;
|
||||||
|
mZT1SubsequentCDV = NewCDV;
|
||||||
|
mCDVList.append(NewCDV);
|
||||||
|
NewCDV->SetCDVDeck(true);
|
||||||
|
|
||||||
|
|
||||||
|
NewCDV = new CCDV(ANGRIGNON_IN_ZT1_ITI_MASK,ANGRIGNON_IN_CDV_11B_MASK,CDV_NORMAL_TYPE,"11B ZT1",1,6);
|
||||||
|
mZT1CDV = NewCDV;
|
||||||
|
mCDVList.append(NewCDV);
|
||||||
|
|
||||||
|
|
||||||
|
NewCDV = new CCDV(ANGRIGNON_IN_ZT1_ITI_MASK,ANGRIGNON_IN_CDV_11A_MASK,CDV_NORMAL_TYPE,"11A",1,7);
|
||||||
|
mZT1ApproachCDV = NewCDV;
|
||||||
|
mCDVList.append(NewCDV);
|
||||||
|
|
||||||
|
|
||||||
|
NewCDV = new CCDV(ANGRIGNON_IN_ZT1_ITI_MASK,ANGRIGNON_IN_CDV_10B_MASK,CDV_NORMAL_TYPE,"10B",1,8);
|
||||||
|
mCDVList.append(NewCDV);
|
||||||
|
|
||||||
|
return RET_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
119
sources/Stations/DuCollege.h
Normal file
119
sources/Stations/DuCollege.h
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* *
|
||||||
|
* Société de Transports de Montréal. *
|
||||||
|
* 2012 *
|
||||||
|
* *
|
||||||
|
* Projet Zones Tests *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
*******************************************************************************/
|
||||||
|
/*
|
||||||
|
Description:
|
||||||
|
Description du fichier si nécessaire.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ************************************************************************** */
|
||||||
|
/* Revision:
|
||||||
|
### 20121217 JFM
|
||||||
|
Verision d'origine.
|
||||||
|
|
||||||
|
### YYYYMMDD Description du besoin ou du bug
|
||||||
|
Description du changement.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
#ifndef Angrignon_H
|
||||||
|
#define Angrignon_H
|
||||||
|
#include "Station.h"
|
||||||
|
|
||||||
|
#define ANGRIGNON_STATION_KEY 0x0010000
|
||||||
|
#define ANGRIGNON_NB_EXTERNAL_INPUT_430_MODULES 1
|
||||||
|
#define ANGRIGNON_NB_EXTERNAL_OUTPUT_440_MODULES 1
|
||||||
|
#define ANGRIGNON_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 ANGRIGNON_ZT1_S1_MASK 0x00000001
|
||||||
|
#define ANGRIGNON_ZT1_S2_MASK 0x00000002
|
||||||
|
#define ANGRIGNON_ZT1_PI_MASK 0x00000004
|
||||||
|
#define ANGRIGNON_ZT1_PE_MASK 0x00000008
|
||||||
|
#define ANGRIGNON_ZT1_FN_MASK 0x00000010
|
||||||
|
#define ANGRIGNON_ZT2_S1_MASK 0x00000020
|
||||||
|
#define ANGRIGNON_ZT2_PI_MASK 0x00000040
|
||||||
|
#define ANGRIGNON_ZT2_PE_MASK 0x00000080
|
||||||
|
|
||||||
|
//External (ethernet) input module masks for Angrignon
|
||||||
|
#define ANGRIGNON_IN_CDV_12A_MASK 0x00000001
|
||||||
|
#define ANGRIGNON_IN_CDV_12B_MASK 0x00000002
|
||||||
|
#define ANGRIGNON_IN_CDV_11B_MASK 0x00000004
|
||||||
|
#define ANGRIGNON_IN_CDV_11A_MASK 0x00000008
|
||||||
|
#define ANGRIGNON_IN_CDV_10B_MASK 0x00000010
|
||||||
|
#define ANGRIGNON_IN_CDV_13A_MASK 0x00000020
|
||||||
|
#define ANGRIGNON_IN_CDV_14A_MASK 0x00000040
|
||||||
|
#define ANGRIGNON_IN_CDV_13BC_MASK 0x00000080
|
||||||
|
#define ANGRIGNON_IN_CDV_14B_MASK 0x00000100
|
||||||
|
#define ANGRIGNON_IN_ZT1_ITI_MASK 0x00000200
|
||||||
|
#define ANGRIGNON_IN_ZT2_ITI_MASK 0x00000400
|
||||||
|
#define ANGRIGNON_IN_ZT1_AN_MASK 0x00000800
|
||||||
|
#define ANGRIGNON_IN_ZT2_AN_MASK 0x00001000
|
||||||
|
#define ANGRIGNON_IN_ZT1_ARF_MASK 0x00002000
|
||||||
|
#define ANGRIGNON_IN_ZT2_ARF_MASK 0x00004000
|
||||||
|
#define ANGRIGNON_IN_STATION_ID_MASK 0x00078000
|
||||||
|
|
||||||
|
//External (ethernet) output module masks for Angrignon
|
||||||
|
#define ANGRIGNON_OUT_VP1_MASK 0x00000001
|
||||||
|
#define ANGRIGNON_OUT_VP2_MASK 0x00000002
|
||||||
|
#define ANGRIGNON_OUT_VP3_MASK 0x00000004
|
||||||
|
#define ANGRIGNON_OUT_VP4_MASK 0x00000008
|
||||||
|
#define ANGRIGNON_OUT_VP5_MASK 0x00000010
|
||||||
|
#define ANGRIGNON_OUT_VP6_MASK 0x00000020
|
||||||
|
#define ANGRIGNON_OUT_VF1_MASK 0x00000040
|
||||||
|
#define ANGRIGNON_OUT_VF2_MASK 0x00000080
|
||||||
|
#define ANGRIGNON_OUT_VF3_MASK 0x00000100
|
||||||
|
#define ANGRIGNON_OUT_VF4_MASK 0x00000200
|
||||||
|
#define ANGRIGNON_OUT_VF5_MASK 0x00000400
|
||||||
|
#define ANGRIGNON_OUT_WP1_MASK 0x00000800
|
||||||
|
#define ANGRIGNON_OUT_WP2_MASK 0x00001000
|
||||||
|
#define ANGRIGNON_OUT_WP3_MASK 0x00002000
|
||||||
|
#define ANGRIGNON_OUT_WP4_MASK 0x00004000
|
||||||
|
#define ANGRIGNON_OUT_WP5_MASK 0x00008000
|
||||||
|
#define ANGRIGNON_OUT_WP6_MASK 0x00010000
|
||||||
|
#define ANGRIGNON_OUT_DPE_MASK 0x00020000
|
||||||
|
#define ANGRIGNON_OUT_DPI_MASK 0x00040000
|
||||||
|
#define ANGRIGNON_OUT_V00_MASK 0x00080000
|
||||||
|
#define ANGRIGNON_OUT_DPG_MASK 0x00100000
|
||||||
|
#define ANGRIGNON_OUT_DFR_MASK 0x00200000
|
||||||
|
#define ANGRIGNON_OUT_RF_MASK 0x00400000
|
||||||
|
#define ANGRIGNON_OUT_RF2_MASK 0x00800000
|
||||||
|
#define ANGRIGNON_OUT_VEL_MASK 0x01000000
|
||||||
|
#define ANGRIGNON_OUT_VEL2_MASK 0x02000000
|
||||||
|
#define ANGRIGNON_OUT_DPI2_MASK 0x04000000
|
||||||
|
#define ANGRIGNON_OUT_DPE2_MASK 0x08000000
|
||||||
|
#define ANGRIGNON_OUT_V002_MASK 0x10000000
|
||||||
|
#define ANGRIGNON_OUT_PEQ1_MASK 0x20000000
|
||||||
|
#define ANGRIGNON_OUT_PEQ2_MASK 0x40000000
|
||||||
|
#define ANGRIGNON_OUT_WATCHDOG_MASK 0x80000000
|
||||||
|
|
||||||
|
#define ANGRIGNON_SDF_ACQUISITION_CHANNEL 0
|
||||||
|
|
||||||
|
|
||||||
|
class CAngrignonStation : public CStation
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
CAngrignonStation();
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
virtual unsigned int BuildStationCDVList();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // Angrignon_H
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user