61 lines
1.8 KiB
C++
61 lines
1.8 KiB
C++
/*******************************************************************************
|
|
* *
|
|
* Société de Transports de Montréal. *
|
|
* 2012 *
|
|
* *
|
|
* Projet Zones Tests *
|
|
* *
|
|
* *
|
|
* *
|
|
*******************************************************************************/
|
|
/*
|
|
Description:
|
|
Classe instantiable d'un module d'entrées/sorties externe mixte simulé.
|
|
|
|
*/
|
|
|
|
/* ************************************************************************** */
|
|
/* Revision:
|
|
### YYYMMDD JFM
|
|
Verision d'origine.
|
|
|
|
### YYYYMMDD Description du besoin ou du bug
|
|
Description du changement.
|
|
*/
|
|
|
|
/* ************************************************************************** */
|
|
|
|
#include "SimulatorMixedModule.h"
|
|
|
|
|
|
|
|
CSimulatorMixedModule::CSimulatorMixedModule()
|
|
{
|
|
mRealExtenalMixedModule = 0;
|
|
}
|
|
|
|
void CSimulatorMixedModule::BindRealExternalMixedModule(CAnalogInputModule *MixedModule)
|
|
{
|
|
mRealExtenalMixedModule = MixedModule;
|
|
}
|
|
|
|
unsigned int CSimulatorMixedModule::GetAnalogInput(int Channel, int *Data)
|
|
{
|
|
Q_UNUSED(Channel);
|
|
Q_UNUSED(Data);
|
|
|
|
if(mRealExtenalMixedModule == 0)
|
|
return 0;
|
|
|
|
return mRealExtenalMixedModule->GetAnalogInput(Channel,Data);
|
|
// return 1;
|
|
}
|
|
|
|
unsigned int CSimulatorMixedModule::GetAnalogInput(int Channel, double &Data)
|
|
{
|
|
int reading;
|
|
unsigned int ret = GetAnalogInput(Channel,&reading);
|
|
Data = (double)reading;
|
|
return ret;
|
|
}
|