Commit bd886307 authored by Evangelia Gousiou's avatar Evangelia Gousiou

added sw source code

parent 5eee233c

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NftcControl", "NftcControl\NftcControl.vcproj", "{CDB334AF-1716-404D-B4D8-A90DD9E06660}"
ProjectSection(ProjectDependencies) = postProject
{C790031A-257F-438E-8E8F-C7468E9699BD} = {C790031A-257F-438E-8E8F-C7468E9699BD}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SerialProtocol", "SerialProtocol\SerialProtocol.vcproj", "{C790031A-257F-438E-8E8F-C7468E9699BD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release_Production|Win32 = Release_Production|Win32
Release_User|Win32 = Release_User|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CDB334AF-1716-404D-B4D8-A90DD9E06660}.Debug|Win32.ActiveCfg = Debug|Win32
{CDB334AF-1716-404D-B4D8-A90DD9E06660}.Debug|Win32.Build.0 = Debug|Win32
{CDB334AF-1716-404D-B4D8-A90DD9E06660}.Release_Production|Win32.ActiveCfg = Release_Production|Win32
{CDB334AF-1716-404D-B4D8-A90DD9E06660}.Release_Production|Win32.Build.0 = Release_Production|Win32
{CDB334AF-1716-404D-B4D8-A90DD9E06660}.Release_User|Win32.ActiveCfg = Release_User|Win32
{CDB334AF-1716-404D-B4D8-A90DD9E06660}.Release_User|Win32.Build.0 = Release_User|Win32
{C790031A-257F-438E-8E8F-C7468E9699BD}.Debug|Win32.ActiveCfg = Debug|Win32
{C790031A-257F-438E-8E8F-C7468E9699BD}.Debug|Win32.Build.0 = Debug|Win32
{C790031A-257F-438E-8E8F-C7468E9699BD}.Release_Production|Win32.ActiveCfg = Release_Production|Win32
{C790031A-257F-438E-8E8F-C7468E9699BD}.Release_Production|Win32.Build.0 = Release_Production|Win32
{C790031A-257F-438E-8E8F-C7468E9699BD}.Release_User|Win32.ActiveCfg = Release_User|Win32
{C790031A-257F-438E-8E8F-C7468E9699BD}.Release_User|Win32.Build.0 = Release_User|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="NftcControl"
type="win32"
/>
<description>Your app description here</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
\ No newline at end of file
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="8,00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="NICOLASW7"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release_User|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="NICOLASW7"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release_Production|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="NICOLASW7"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>
================================================================================
BIBLIOTHÈQUE MICROSOFT FOUNDATION CLASS : Vue d'ensemble du projet NftcControl
===============================================================================
L'Assistant Application a créé cette application NftcControl pour
vous. Cette application décrit les principes de base de l'utilisation de
Microsoft Foundation Classes et vous permet de créer votre application.
Ce fichier contient un résumé du contenu de chacun des fichiers qui
constituent votre application NftcControl.
NftcControl.vcproj
Il s'agit du fichier projet principal pour les projets VC++ générés à l'aide
d'un Assistant Application.
Il contient les informations sur la version de Visual C++ qui a généré le
fichier et
des informations sur les plates-formes, configurations et fonctionnalités du
projet sélectionnées avec
l'Assistant Application.
NftcControl.h
Il s'agit du fichier d'en-tête principal de l'application. Il contient
d'autres
en-têtes de projet spécifiques (y compris Resource.h) et déclare la
classe d'application CNftcControlApp.
NftcControl.cpp
Il s'agit du fichier source principal de l'application qui contient la
classe d'application CNftcControlApp.
NftcControl.rc
Il s'agit de la liste de toutes les ressources Microsoft Windows que le
programme utilise. Elle comprend les icônes, les bitmaps et les curseurs
qui sont stockés
dans le sous-répertoire RES. Ce fichier peut être modifié directement dans
Microsoft
Visual C++. Vos ressources de projet sont dans 1036.
res\NftcControl.ico
Il s'agit d'un fichier icône, qui est utilisé comme icône de l'application.
Cette
icône est incluse par le fichier de ressource principal NftcControl.rc.
res\NftcControl.rc2
Ce fichier contient les ressources qui ne sont pas modifiées par Microsoft
Visual C++. Vous devez placer toutes les ressources non modifiables par
l'éditeur de ressources dans ce fichier.
/////////////////////////////////////////////////////////////////////////////
Pour la fenêtre frame principale :
Le projet comprend une interface MFC standard.
MainFrm.h, MainFrm.cpp
Ces fichiers contiennent la classe de frame CMainFrame
dérivée de
CFrameWnd et qui contrôle toutes les fonctionnalités des frames SDI.
res\Toolbar.bmp
Ce fichier bitmap sert à créer des images en mosaïque pour la barre
d'outils.
La barre d'outils et la barre d'état initiales sont construites dans la
classe
CMainFrame. Modifiez cette image de barre d'outils avec
l'éditeur de ressources et
actualisez le tableau IDR_MAINFRAME TOOLBAR dans NftcControl.rc
pour ajouter
les boutons de barre d'outils.
/////////////////////////////////////////////////////////////////////////////
L'Assistant Application crée un type de document et une vue :
NftcControlDoc.h, NftcControlDoc.cpp - le document
Ces fichiers contiennent votre classe CNftcControlDoc. Modifiez ces
fichiers pour
ajouter les données de document spéciales et implémenter l'enregistrement et
le
chargement des fichiers (via CNftcControlDoc::Serialize).
NftcControlView.h, NftcControlView.cpp - la vue du document
Ces fichiers contiennent votre classe CNftcControlView.
Les objets CNftcControlView servent à afficher les objets CNftcControlDoc.
/////////////////////////////////////////////////////////////////////////////
Autres fonctionnalités :
Contrôles ActiveX
L'application comprend la prise en charge des contrôles ActiveX.
/////////////////////////////////////////////////////////////////////////////
Autres fichiers standard :
StdAfx.h, StdAfx.cpp
Ces fichiers sont utilisés pour générer un fichier d'en-tête précompilé
(PCH)
nommé NftcControl.pch et un fichier de type précompilé nommé
Stdafx.obj.
Resource.h
Il s'agit du ficher d'en-tête standard, qui définit les nouveaux ID de
ressources.
Microsoft Visual C++ lit et met à jour ce fichier.
NftcControl.manifest
Les fichiers manifestes d'application sont utilisés par Windows XP pour
décrire les dépendances des applications
sur des versions spécifiques des assemblys côte à côte. Le chargeur
utilise ces
informations pour charger l'assembly approprié à partir du cache de
l'assembly ou directement
à partir de l'application. Le manifeste de l'application peut être inclus
pour redistribution
comme fichier .manifest externe installé dans le même dossier que
l'exécutable de l'application
ou être inclus dans l'exécutable sous la forme d'une ressource.
/////////////////////////////////////////////////////////////////////////////
Autres remarques :
L'Assistant Application utilise "TODO:" pour indiquer les parties du code source
vous devrez ajouter ou modifier du code.
Si votre application utilise les MFC dans une DLL partagée vous devez redistribuer
les DLL MFC. Si la langue de votre application n'est pas celle du système
d'exploitation, vous devez également redistribuer le fichier des ressources
localisées MFC80XXX.DLL. Pour plus d'informations, consultez la section relative
à la redistribution des applications Visual C++ dans la documentation MSDN.
/////////////////////////////////////////////////////////////////////////////
// ResetCardDlg.cpp: fichier d'implmentation
//
#include "stdafx.h"
#include "NftcControl.h"
#include "ResetCardDlg.h"
// Bote de dialogue ResetCardDlg
IMPLEMENT_DYNAMIC(ResetCardDlg, CDialog)
ResetCardDlg::ResetCardDlg(CWnd* pParent /*=NULL*/)
: CDialog(ResetCardDlg::IDD, pParent)
{
}
ResetCardDlg::~ResetCardDlg()
{
}
void ResetCardDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(ResetCardDlg, CDialog)
ON_BN_CLICKED(IDOK, &ResetCardDlg::OnBnClickedOk)
ON_BN_CLICKED(IDCANCEL, &ResetCardDlg::OnBnClickedCancel)
END_MESSAGE_MAP()
//--------------------------------------------------------------
// Nom : OnInitDialog ()
//--------------------------------------------------------------
/**
* Initialisation de la boite de dialogue
*
* @param[in] none
* @param[out] none
*
* @return void
*
* @nothrow
*/
BOOL ResetCardDlg::OnInitDialog()
{
CDialog::OnInitDialog();
this->SetWindowText("Reset NFTC confirmation");
return FALSE; // return TRUE unless you set the focus to a control
// EXCEPTION: les pages de proprits OCX devraient retourner FALSE
}
// Gestionnaires de messages de ResetCardDlg
//--------------------------------------------------------------
// Nom : OnBnClickedOk ()
//--------------------------------------------------------------
/**
* Reset de la carte NFTC
*
* @param[in] none
* @param[out] none
*
* @return void
*
* @nothrow
*/
void ResetCardDlg::OnBnClickedOk()
{
OnOK();
}
//--------------------------------------------------------------
// Nom : OnBnClickedCancel ()
//--------------------------------------------------------------
/**
* Pas de reset de la carte
*
* @param[in] none
* @param[out] none
*
* @return void
*
* @nothrow
*/
void ResetCardDlg::OnBnClickedCancel()
{
OnCancel();
}
#pragma once
// Bote de dialogue ResetCardDlg
class ResetCardDlg : public CDialog
{
DECLARE_DYNAMIC(ResetCardDlg)
public:
ResetCardDlg(CWnd* pParent = NULL); // constructeur standard
virtual ~ResetCardDlg();
// Donnes de bote de dialogue
enum { IDD = IDD_RESET_NFTC };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge de DDX/DDV
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
afx_msg void OnBnClickedOk();
afx_msg void OnBnClickedCancel();
};
#pragma once
#include "CNanofipTestBench.hpp"
#include <string>
// Bote de dialogue BaseTabDialog
class BaseTabDialog : public CDialog
{
DECLARE_DYNAMIC(BaseTabDialog)
public:
BaseTabDialog( NFTB::CNanofipTestBench* aNfTestBench, CWnd* pParent = NULL); // constructeur standard
virtual ~BaseTabDialog();
void setMainView( CNftcControlView* aView) { _mainView = aView;};
// Force l'application traiter ses messages
void DoEvents(void);
// Controle de la carte NFTC
int sendNftcCardControl();
// Statut de la carte NFTC
int receiveNftcCardStatus( const bool& aHistory = true );
// Mise jour de l'affichage
virtual void updateDisplay() = 0;
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge DDX/DDV
// Pointeur sur le banc de test
NFTB::CNanofipTestBench* _nfTestBench;
// Polices de la fenetre
CFont _titleFont;
CFont _webLinkFont;
CFont _legendFont_thin;
CFont _legendFont_thin_italic;
// Palettes de la fenetre
CBrush *_greenBrush;
CBrush *_yellowBrush;
CBrush *_redBrush;
// Bitmap LED
CBitmap* _pBitmapGreenLedOn;
CBitmap* _pBitmapGreenLedOff;
CBitmap* _pBitmapRedLedOn;
CBitmap* _pBitmapRedLedOff;
CBitmap* _pBitmapBlueLedOn;
CBitmap* _pBitmapBlueLedOff;
CBitmap* _pBitmapWhiteLedOff;
// Controle de la carte NFTC
bool _fipSupply;
bool _fipReset;
bool _fipOn485;
bool _fipLoopbackVar1;
bool _fipLoopbackVar2;
bool _globalReset;
// Etat de la carte NFTC
bool _nftcInitialisation;
bool _externalFipReset;
bool _sloneMode;
bool _powerOnInitialisation;
CToolTipCtrl m_tooltip;
// Vue principale de l'API
CNftcControlView* _mainView;
CBitmap* doCreateCompatibleBitmap(int Width, int Height, unsigned char* BGRA, CWnd* pCompatibleWindow) const;
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
virtual afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
};
#pragma once
#include "CNanofipTestBench.hpp"
#include <string>
// Bote de dialogue BaseTabDialog
class BaseTabDialog : public CDialog
{
DECLARE_DYNAMIC(BaseTabDialog)
public:
BaseTabDialog( NFTB::CNanofipTestBench* aNfTestBench, CWnd* pParent = NULL); // constructeur standard
virtual ~BaseTabDialog();
void setMainView( CNftcControlView* aView) { _mainView = aView;};
// Force l'application traiter ses messages
void DoEvents(void);
// Controle de la carte NFTC
int sendNftcCardControl();
// Statut de la carte NFTC
int receiveNftcCardStatus( const bool& aHistory = true );
// Mise jour de l'affichage
virtual void updateDisplay() = 0;
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge DDX/DDV
// Pointeur sur le banc de test
NFTB::CNanofipTestBench* _nfTestBench;
// Polices de la fenetre
CFont _titleFont;
CFont _webLinkFont;
CFont _legendFont_thin;
CFont _legendFont_thin_italic;
// Palettes de la fenetre
CBrush *_greenBrush;
CBrush *_yellowBrush;
CBrush *_redBrush;
// Bitmap LED
CBitmap* _pBitmapGreenLedOn;
CBitmap* _pBitmapGreenLedOff;
CBitmap* _pBitmapRedLedOn;
CBitmap* _pBitmapRedLedOff;
CBitmap* _pBitmapBlueLedOn;
CBitmap* _pBitmapBlueLedOff;
CBitmap* _pBitmapWhiteLedOff;
// Controle de la carte NFTC
bool _fipSupply;
bool _fipReset;
bool _fipOn485;
bool _fipLoopback;
bool _globalReset;
// Etat de la carte NFTC
bool _nftcInitialisation;
bool _externalFipReset;
bool _sloneMode;
bool _powerOnInitialisation;
CToolTipCtrl m_tooltip;
// Vue principale de l'API
CNftcControlView* _mainView;
CBitmap* doCreateCompatibleBitmap(int Width, int Height, unsigned char* BGRA, CWnd* pCompatibleWindow) const;
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
virtual afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
};
/**
* @file CConfigurationEeprom.hpp
*
* @brief Classe dfinissant le composant de configuration EEPROM
*
* @cvs
* $Source: $
* $Revision: $
* $Date: $
* $Name: $
* $Author: $
*/
#ifndef _CCONFIGURATION_EEPROM_HPP__
#define _CCONFIGURATION_EEPROM_HPP__
#include "GlobalConstants.hpp"
#include <string>
#include <vector>
#ifdef _CCONFIGURATION_EEPROM_EXPORT__
#define _CCONFIGURATION_EEPROM_DECLARE__ __declspec(dllexport)
#else
#define _CCONFIGURATION_EEPROM_DECLARE__ __declspec(dllimport)
#endif
/// Espace de nommage NFTB
namespace NFTB {
/**
* @class CConfigurationEeprom
*
* @brief Classe dfinissant le composant de configuration EEPROM
*/
class _CCONFIGURATION_EEPROM_DECLARE__ CConfigurationEeprom
{
public:
/// Constructeur par dfaut
CConfigurationEeprom();
/// Destructeur
virtual ~CConfigurationEeprom();
/// Accesseurs en lecture
unsigned char getMajorVersion() const { return _majorVersion; };
unsigned char getMinorVersion() const { return _minorVersion; };
int getHardwiredFipSpeed() const { return _hardwiredFipSpeed; };
int getHardwiredFipImpedance() const { return _hardwiredFipImpedance; };
unsigned char getFdCorrectionFactor() const { return _fdCorrectionFactor; };
unsigned char getNfCorrectionFactor() const { return _nfCorrectionFactor; };
bool getIsEepromPowerOnInitialisation() const { return _isEepromPowerOnInitialisation; };
bool getIsLoopbackVar1Activated() const { return _isLoopbackVar1Activated; };
bool getIsLoopbackVar2Activated() const { return _isLoopbackVar2Activated; };
bool getIsSloneActivated() const { return _isSloneActivated; };
bool getIsNanofipStatusActivated() const { return _isNanofipStatusActivated; };
bool getIsFipSupplyActivated() const { return _isFipSupplyActivated; };
int getNanoFipRate() const { return _nanoFipRate; };
int getP3Lgth() const { return _p3Lgth; };
unsigned char getNanofipAddress() const { return _nanofipAddress; };
unsigned char getDefaultFdPwm() const { return _defaultFdPwm; };
unsigned char getDefaultNfPwm() const { return _defaultNfPwm; };
unsigned char* getIdentificationArea();
unsigned char* getConfigurationArea();
unsigned char* getUserArea() { return _userArea; };
/// Accesseurs en criture
void setMajorVersion ( const unsigned char& aParam ) { _majorVersion = aParam; };
void setMinorVersion ( const unsigned char& aParam ) { _minorVersion = aParam; };
void setHardwiredFipSpeed ( const int& aParam ) { _hardwiredFipSpeed = aParam; };
void setHardwiredFipImpedance ( const int& aParam ) { _hardwiredFipImpedance = aParam; };
void setFdCorrectionFactor ( const unsigned char& aParam ) { _fdCorrectionFactor = aParam; };
void setNfCorrectionFactor ( const unsigned char& aParam ) { _nfCorrectionFactor = aParam; };
void setIsEepromPowerOnInitialisation ( const bool& aParam ) { _isEepromPowerOnInitialisation = aParam; };
void setIsLoopbackVar1Activated ( const bool& aParam ) { _isLoopbackVar1Activated = aParam; };
void setIsLoopbackVar2Activated ( const bool& aParam ) { _isLoopbackVar2Activated = aParam; };
void setIsSloneActivated ( const bool& aParam ) { _isSloneActivated = aParam; };
void setIsNanofipStatusActivated ( const bool& aParam ) { _isNanofipStatusActivated = aParam; };
void setIsFipSupplyActivated ( const bool& aParam ) { _isFipSupplyActivated = aParam; };
void setNanoFipRate ( const int& aParam ) { _nanoFipRate = aParam; };
void setP3Lgth ( const int& aParam ) { _p3Lgth = aParam; };
void setNanofipAddress ( const unsigned char& aParam ) { _nanofipAddress = aParam; };
void setDefaultFdPwm ( const unsigned char& aParam ) { _defaultFdPwm = aParam; };
void setDefaultNfPwm ( const unsigned char& aParam ) { _defaultNfPwm = aParam; };
void setIdentificationArea ( unsigned char* aBuffer, unsigned char aBufferSize );
void setConfigurationArea ( unsigned char* aBuffer, unsigned char aBufferSize );
void setUserArea ( unsigned char* aBuffer, unsigned char aBufferSize );
/// Ecriture de tout le contenu en EEPROM
int writeAllContentToEeprom();
/// Ecriture de la zone d'identification en EEPROM
int writeIdentificationToEeprom();
/// Ecriture de la zone de configuration en EEPROM
int writeConfigurationToEeprom();
/// Lecture de tout le contenu de l'EEPROM
int readAllContentFromEeprom();
/// Lecture de la zone d'identification de l'EEPROM
int readIdentificationFromEeprom();
/// Lecture de la zone de configuration de l'EEPROM
int readConfigurationFromEeprom();
/// Dump de l'objet
std::string dump();
protected:
/// Constructeur de copie (interdit)
CConfigurationEeprom ( const CConfigurationEeprom& );
/// Operateur d'affectation (interdit)
CConfigurationEeprom& operator= ( const CConfigurationEeprom& );
/// Lecture dans l'EEPROM
int readFromEeprom( unsigned char& aStartAddress, unsigned char& aSizeToRead, unsigned char* aRcvBuffer );
/// Interprtation des donnes d'identification
void retrieveIdentificationFromBuffer();
/// Interprtation des donnes de configuration
void retrieveConfigurationFromBuffer();
/// Ecriture dans l'EEPROM
int writeToEeprom( unsigned char& aStartAddress, unsigned char& aSizeToWrite, unsigned char* aSendBuffer );
/// Export des donnes d'identification
void exportIdentificationToBuffer();
/// Export des donnes de configuration
void exportConfigurationToBuffer();
private:
/// Zone d'identification de l'EEPROM
unsigned char _identificationArea[ NFTC_CONSTANTS::EEPROM_IDENTIFICATION_SIZE ];
/// Zone de configuration de l'EEPROM
unsigned char _configurationArea[ NFTC_CONSTANTS::EEPROM_CONFIGURATION_SIZE ];
/// Zone utilisateur de l'EEPROM
unsigned char _userArea[ NFTC_CONSTANTS::EEPROM_USER_AREA_SIZE ];
//--------------------------------------------------------
// Zone d'identification
//--------------------------------------------------------
unsigned char _majorVersion;
unsigned char _minorVersion;
// Vitesse FIP cable
int _hardwiredFipSpeed;
// Impdance FIP cable
int _hardwiredFipImpedance;
unsigned char _fdCorrectionFactor;
unsigned char _nfCorrectionFactor;
//--------------------------------------------------------
// Zone de configuration
//--------------------------------------------------------
// Type d'initialisation du banc : EEPROM / JUMPER
bool _isEepromPowerOnInitialisation;
// Mode Loopback Var1
bool _isLoopbackVar1Activated;
// Mode Loopback Var2
bool _isLoopbackVar2Activated;
// Mode Stand Alone
bool _isSloneActivated;
// Statut NanoFip
bool _isNanofipStatusActivated;
// Alimentation de la fonction FIP
bool _isFipSupplyActivated;
// Fip rate en entre du NanoFip
int _nanoFipRate;
// Longueur P3 en entre du NanoFip
int _p3Lgth;
// Adresse du NanoFip
unsigned char _nanofipAddress;
// Valeur initiale du PWM de chauffage Fieldrive
unsigned char _defaultFdPwm;
// Valeur initiale du PWM de chauffage NanoFip
unsigned char _defaultNfPwm;
}; // class CConfigurationEeprom
} // namespace NFTB
#endif // _CCONFIGURATION_EEPROM_HPP__
/**
* @file CConfigurationEeprom.hpp
*
* @brief Classe dfinissant le composant de configuration EEPROM
*
* @cvs
* $Source: $
* $Revision: $
* $Date: $
* $Name: $
* $Author: $
*/
#ifndef _CCONFIGURATION_EEPROM_HPP__
#define _CCONFIGURATION_EEPROM_HPP__
#include "GlobalConstants.hpp"
#include <string>
#include <vector>
#ifdef _CCONFIGURATION_EEPROM_EXPORT__
#define _CCONFIGURATION_EEPROM_DECLARE__ __declspec(dllexport)
#else
#define _CCONFIGURATION_EEPROM_DECLARE__ __declspec(dllimport)
#endif
/// Espace de nommage NFTB
namespace NFTB {
/**
* @class CConfigurationEeprom
*
* @brief Classe dfinissant le composant de configuration EEPROM
*/
class _CCONFIGURATION_EEPROM_DECLARE__ CConfigurationEeprom
{
public:
/// Constructeur par dfaut
CConfigurationEeprom();
/// Destructeur
virtual ~CConfigurationEeprom();
/// Accesseurs en lecture
unsigned char getMajorVersion() const { return _majorVersion; };
unsigned char getMinorVersion() const { return _minorVersion; };
int getHardwiredFipSpeed() const { return _hardwiredFipSpeed; };
int getHardwiredFipImpedance() const { return _hardwiredFipImpedance; };
unsigned char getFdCorrectionFactor() const { return _fdCorrectionFactor; };
unsigned char getNfCorrectionFactor() const { return _nfCorrectionFactor; };
bool getIsEepromPowerOnInitialisation() const { return _isEepromPowerOnInitialisation; };
bool getIsLoopbackActivated() const { return _isLoopbackActivated; };
bool getIsSloneActivated() const { return _isSloneActivated; };
bool getIsNanofipStatusActivated() const { return _isNanofipStatusActivated; };
bool getIsFipSupplyActivated() const { return _isFipSupplyActivated; };
int getNanoFipRate() const { return _nanoFipRate; };
int getP3Lgth() const { return _p3Lgth; };
unsigned char getNanofipAddress() const { return _nanofipAddress; };
unsigned char getDefaultFdPwm() const { return _defaultFdPwm; };
unsigned char getDefaultNfPwm() const { return _defaultNfPwm; };
unsigned char* getIdentificationArea();
unsigned char* getConfigurationArea();
unsigned char* getUserArea() { return _userArea; };
/// Accesseurs en criture
void setMajorVersion ( const unsigned char& aParam ) { _majorVersion = aParam; };
void setMinorVersion ( const unsigned char& aParam ) { _minorVersion = aParam; };
void setHardwiredFipSpeed ( const int& aParam ) { _hardwiredFipSpeed = aParam; };
void setHardwiredFipImpedance ( const int& aParam ) { _hardwiredFipImpedance = aParam; };
void setFdCorrectionFactor ( const unsigned char& aParam ) { _fdCorrectionFactor = aParam; };
void setNfCorrectionFactor ( const unsigned char& aParam ) { _nfCorrectionFactor = aParam; };
void setIsEepromPowerOnInitialisation ( const bool& aParam ) { _isEepromPowerOnInitialisation = aParam; };
void setIsLoopbackActivated ( const bool& aParam ) { _isLoopbackActivated = aParam; };
void setIsSloneActivated ( const bool& aParam ) { _isSloneActivated = aParam; };
void setIsNanofipStatusActivated ( const bool& aParam ) { _isNanofipStatusActivated = aParam; };
void setIsFipSupplyActivated ( const bool& aParam ) { _isFipSupplyActivated = aParam; };
void setNanoFipRate ( const int& aParam ) { _nanoFipRate = aParam; };
void setP3Lgth ( const int& aParam ) { _p3Lgth = aParam; };
void setNanofipAddress ( const unsigned char& aParam ) { _nanofipAddress = aParam; };
void setDefaultFdPwm ( const unsigned char& aParam ) { _defaultFdPwm = aParam; };
void setDefaultNfPwm ( const unsigned char& aParam ) { _defaultNfPwm = aParam; };
void setIdentificationArea ( unsigned char* aBuffer, unsigned char aBufferSize );
void setConfigurationArea ( unsigned char* aBuffer, unsigned char aBufferSize );
void setUserArea ( unsigned char* aBuffer, unsigned char aBufferSize );
/// Ecriture de tout le contenu en EEPROM
int writeAllContentToEeprom();
/// Ecriture de la zone d'identification en EEPROM
int writeIdentificationToEeprom();
/// Ecriture de la zone de configuration en EEPROM
int writeConfigurationToEeprom();
/// Lecture de tout le contenu de l'EEPROM
int readAllContentFromEeprom();
/// Lecture de la zone d'identification de l'EEPROM
int readIdentificationFromEeprom();
/// Lecture de la zone de configuration de l'EEPROM
int readConfigurationFromEeprom();
/// Dump de l'objet
std::string dump();
protected:
/// Constructeur de copie (interdit)
CConfigurationEeprom ( const CConfigurationEeprom& );
/// Operateur d'affectation (interdit)
CConfigurationEeprom& operator= ( const CConfigurationEeprom& );
/// Lecture dans l'EEPROM
int readFromEeprom( unsigned char& aStartAddress, unsigned char& aSizeToRead, unsigned char* aRcvBuffer );
/// Interprtation des donnes d'identification
void retrieveIdentificationFromBuffer();
/// Interprtation des donnes de configuration
void retrieveConfigurationFromBuffer();
/// Ecriture dans l'EEPROM
int writeToEeprom( unsigned char& aStartAddress, unsigned char& aSizeToWrite, unsigned char* aSendBuffer );
/// Export des donnes d'identification
void exportIdentificationToBuffer();
/// Export des donnes de configuration
void exportConfigurationToBuffer();
private:
/// Zone d'identification de l'EEPROM
unsigned char _identificationArea[ NFTC_CONSTANTS::EEPROM_IDENTIFICATION_SIZE ];
/// Zone de configuration de l'EEPROM
unsigned char _configurationArea[ NFTC_CONSTANTS::EEPROM_CONFIGURATION_SIZE ];
/// Zone utilisateur de l'EEPROM
unsigned char _userArea[ NFTC_CONSTANTS::EEPROM_USER_AREA_SIZE ];
//--------------------------------------------------------
// Zone d'identification
//--------------------------------------------------------
unsigned char _majorVersion;
unsigned char _minorVersion;
// Vitesse FIP cable
int _hardwiredFipSpeed;
// Impdance FIP cable
int _hardwiredFipImpedance;
unsigned char _fdCorrectionFactor;
unsigned char _nfCorrectionFactor;
//--------------------------------------------------------
// Zone de configuration
//--------------------------------------------------------
// Type d'initialisation du banc : EEPROM / JUMPER
bool _isEepromPowerOnInitialisation;
// Mode Loopback
bool _isLoopbackActivated;
// Mode Stand Alone
bool _isSloneActivated;
// Statut NanoFip
bool _isNanofipStatusActivated;
// Alimentation de la fonction FIP
bool _isFipSupplyActivated;
// Fip rate en entre du NanoFip
int _nanoFipRate;
// Longueur P3 en entre du NanoFip
int _p3Lgth;
// Adresse du NanoFip
unsigned char _nanofipAddress;
// Valeur initiale du PWM de chauffage Fieldrive
unsigned char _defaultFdPwm;
// Valeur initiale du PWM de chauffage NanoFip
unsigned char _defaultNfPwm;
}; // class CConfigurationEeprom
} // namespace NFTB
#endif // _CCONFIGURATION_EEPROM_HPP__
/**
* @file CNanoFip.hpp
*
* @brief Classe dfinissant le composant NanoFip et sa configuration
*
* @cvs
* $Source: $
* $Revision: $
* $Date: $
* $Name: $
* $Author: $
*/
#ifndef _CNANOFIP_HPP__
#define _CNANOFIP_HPP__
#include <string>
#include <vector>
#ifdef _CNANOFIP_EXPORT__
#define _CNANOFIP_DECLARE__ __declspec(dllexport)
#else
#define _CNANOFIP_DECLARE__ __declspec(dllimport)
#endif
/// Espace de nommage NFTB
namespace NFTB {
/**
* @class CNanoFip
*
* @brief Classe dfinissant le composant NanoFip et sa configuration
*/
class _CNANOFIP_DECLARE__ CNanoFip
{
public:
/// Constructeur par dfaut
CNanoFip();
/// Destructeur
virtual ~CNanoFip();
/// Acceseurs en lecture
int getFipSpeed() const { return _fipSpeed; };
int getFipImpedance() const { return _fipImpedance; };
unsigned char getFipAddress() const { return _fipAddress; };
int getVar3LengthCode() const { return _var3LengthCode; };
int getVar3Length();
bool getIsStandAloneMode() const { return _isStandAloneMode; };
bool getIsStatusActive() const { return _isStatusActive; };
/// Accesseurs en criture
void setFipSpeed ( const int& aParam ) { _fipSpeed = aParam; } ;
void setFipImpedance ( const int& aParam ) { _fipImpedance = aParam; } ;
void setFipAddress ( const unsigned char& aParam ) { _fipAddress = aParam; } ;
void setVar3LengthCode ( const int& aCode );
void setIsStandAloneMode ( const bool& aParam ) { _isStandAloneMode = aParam; } ;
void setIsStatusActive ( const bool& aParam ) { _isStatusActive = aParam; } ;
/// Export des donnes du FIPBOX vers l'EEPROM
int exportToEeprom( const int& aBufferSize, unsigned char* aEepromBuffer );
/// Dump de l'objet
std::string dump();
protected:
/// Constructeur de copie (interdit)
CNanoFip ( const CNanoFip& );
/// Operateur d'affectation (interdit)
CNanoFip& operator= ( const CNanoFip& );
private:
/// Vitesse du rseau FIP
int _fipSpeed;
/// Impdance du rseau FIP
int _fipImpedance;
/// Adresse du nanoFip sur le rseau
unsigned char _fipAddress;
/// Mode de fonctionnement
// true : stand alone
// false : memory mode
bool _isStandAloneMode;
/// Statut du nanoFip
// true : envoi du statut du nanoFip sur la variable produite 06xy
// false : pas d'envoi du statut
bool _isStatusActive;
/// Longueur de la variable produite 06xy
int _var3LengthCode;
int _var3Length;
}; // class CNanoFip
} // namespace NFTB
#endif // _CNANOFIP_HPP__
/**
* @file CNanofipTestBench.hpp
*
* @brief Classe dfinissant le banc de test NanoFIP
*
* @cvs
* $Source: $
* $Revision: $
* $Date: $
* $Name: $
* $Author: $
*/
#ifndef _CNANOFIP_TESTBENCH_HPP__
#define _CNANOFIP_TESTBENCH_HPP__
#include <string>
#include <vector>
#include "CNanoFip.hpp"
#include "CConfigurationEeprom.hpp"
#include "LogFile.hpp"
#ifdef _NANOFIP_TESTBENCH_EXPORT__
#define _NANOFIP_TESTBENCH_DECLARE__ __declspec(dllexport)
#else
#define _NANOFIP_TESTBENCH_DECLARE__ __declspec(dllimport)
#endif
extern const float ADC_COEFF_9V;
extern const float ADC_COEFF_5V;
extern const float ADC_COEFF_3V3;
extern const float ADC_COEFF_1V5;
extern const float ADC_COEFF_NF_CURR;
extern const float ADC_COEFF_FD_CURR;
/// Espace de nommage NFTB
namespace NFTB {
class CNanoFip;
/**
* @class CNanofipTestBench
*
* @brief Classe dfinissant le banc de test NanoFIP
*/
class _NANOFIP_TESTBENCH_DECLARE__ CNanofipTestBench
{
public:
/// Constructeur par dfaut
CNanofipTestBench();
/// Destructeur
virtual ~CNanofipTestBench();
/// Initialisation du banc de test
int initializeTestBench();
/// Rcupration du statut de la carte NFTC
int getNftcCardStatus();
// Accesseurs en criture
void setSaveMeasuresInFile( bool aParam ) { _saveMeasuresInFile = aParam; };
// Accesseurs en lecture
NFTB::CNanoFip* getNanoFipPointer() { return &_nanoFip; };
NFTB::CConfigurationEeprom* getConfigurationEepromPointer() { return &_configurationEeprom; };
int getState() const { return _state; };
float get9vMeasure() const { return _9vMeasure; };
float get5vMeasure() const { return _5vMeasure; };
float get3v3Measure() const { return _3v3Measure; };
float get1v5Measure() const { return _1v5Measure; };
float getNanofipConsumption() const { return _nanofipConsumption; };
float getFieldriveConsumption() const { return _fieldriveConsumption; };
float getNanofipTemperature() const { return _nanofipTemperature; };
float getFieldriveTemperature() const { return _fieldriveTemperature; };
unsigned char getFdPwmValueNftc() const { return _fdPwmValueNftc; };
unsigned char getNfPwmValueNftc() const { return _nfPwmValueNftc; };
unsigned char getFdPwmValue100() const { return _fdPwmValue100; };
unsigned char getNfPwmValue100() const { return _nfPwmValue100; };
/// Acquisition des canaux analogiques : tempratures / tensions / courants
int acquireAnalogChannels();
/// Dump de l'objet
std::string dump();
/// Initialisation des tables de conversion de temperature
void initConversionTables();
/// Mise jour de la tolrance de la mesure de temprature du Fieldrive
void setFdToleranceFactor( unsigned char& aValue );
/// Mise jour de la tolrance de la mesure de temprature du NanoFip
void setNfToleranceFactor( unsigned char& aValue );
/// Mise jour de la commande de chauffage (valeur NFTC)
void setFdPwmValueNftc( const unsigned char& aValue );
void setNfPwmValueNftc( const unsigned char& aValue );
/// Mise jour de la commande de chauffage (valeur %)
void setFdPwmValue100( const unsigned char& aValue );
void setNfPwmValue100( const unsigned char& aValue );
protected:
/// Constructeur de copie (interdit)
CNanofipTestBench ( const CNanofipTestBench& );
/// Operateur d'affectation (interdit)
CNanofipTestBench& operator= ( const CNanofipTestBench& );
/// Initialisation du banc de test avec les donnes EEPROM
int initializeTestBenchWithEeprom();
/// Initialisation du banc de test avec les jumpers de la carte
int initializeTestBenchWithJumper();
/// Conversion tension->temperature
void getTemperatureFromVoltage( const float& aVoltage, float& aTemperature, unsigned char& aChannel );
private:
// Sauve les acquisitions dans un fichier
bool _saveMeasuresInFile;
bool _fileInitialized;
// Fichier de dpot des mesures effectues sur le banc
GPL::FILE::LogFile _logFile;
//------------------------------------------------------------
// Paramtres gnraux
//------------------------------------------------------------
// Etat d'initialisation de l'objet "banc de test"
int _state;
// Carte en mode Loopback Var1
bool _fipLoopbackVar1;
// Carte en mode Loopback Var2 (broadcast)
bool _fipLoopbackVar2;
// Alimentation FIP tablie
bool _fipSupply;
// Initialisation de la carte avec les donnes de l'EEPROM
bool _eepromPowerOnInitialisation;
// Carte en mode Stand Alone
bool _sloneMode;
// Reset FIP externe
bool _externalFipReset;
// Carte initialise avec succs
bool _nftcInitialisation;
//------------------------------------------------------------
// Mesures analogiques
//------------------------------------------------------------
// Tension 9V gnral (en V)
float _9vMeasure;
// Tension 5V gnral (en V)
float _5vMeasure;
// Tension 3.3V du NanoFip (en V)
float _3v3Measure;
// Tension 1.5V du NanoFip (en V)
float _1v5Measure;
// Consommation du NanoFip (en mA)
float _nanofipConsumption;
// Consommation du Fieldrive (en mA)
float _fieldriveConsumption;
// Temperature du NanoFip (en C)
float _nanofipTemperature;
// Temperature du Fieldrive (en C)
float _fieldriveTemperature;
// Tolrance des mesures de temperature
float _fdToleranceFactor;
float _nfToleranceFactor;
//------------------------------------------------------------
// Commandes de chauffage
//------------------------------------------------------------
// Valeur en % du PWM de chauffage
unsigned char _fdPwmValue100;
unsigned char _nfPwmValue100;
// Valeur NFTC du PWM de chauffage
unsigned char _fdPwmValueNftc;
unsigned char _nfPwmValueNftc;
//------------------------------------------------------------
// NanoFip
//------------------------------------------------------------
/// Gestion nanoFip
NFTB::CNanoFip _nanoFip;
//------------------------------------------------------------
// EEPROM de configuration
//------------------------------------------------------------
/// Gestion nanoFip
NFTB::CConfigurationEeprom _configurationEeprom;
// For test only
unsigned char _testOnly;
}; // class CNanofipTestBench
} // namespace NFTB
#endif // _CNANOFIP_TESTBENCH_HPP__
/**
* @file CNanofipTestBench.hpp
*
* @brief Classe dfinissant le banc de test NanoFIP
*
* @cvs
* $Source: $
* $Revision: $
* $Date: $
* $Name: $
* $Author: $
*/
#ifndef _CNANOFIP_TESTBENCH_HPP__
#define _CNANOFIP_TESTBENCH_HPP__
#include <string>
#include <vector>
#include "CNanoFip.hpp"
#include "CConfigurationEeprom.hpp"
#include "LogFile.hpp"
#ifdef _NANOFIP_TESTBENCH_EXPORT__
#define _NANOFIP_TESTBENCH_DECLARE__ __declspec(dllexport)
#else
#define _NANOFIP_TESTBENCH_DECLARE__ __declspec(dllimport)
#endif
extern const float ADC_COEFF_9V;
extern const float ADC_COEFF_5V;
extern const float ADC_COEFF_3V3;
extern const float ADC_COEFF_1V5;
extern const float ADC_COEFF_NF_CURR;
extern const float ADC_COEFF_FD_CURR;
/// Espace de nommage NFTB
namespace NFTB {
class CNanoFip;
/**
* @class CNanofipTestBench
*
* @brief Classe dfinissant le banc de test NanoFIP
*/
class _NANOFIP_TESTBENCH_DECLARE__ CNanofipTestBench
{
public:
/// Constructeur par dfaut
CNanofipTestBench();
/// Destructeur
virtual ~CNanofipTestBench();
/// Initialisation du banc de test
int initializeTestBench();
/// Rcupration du statut de la carte NFTC
int getNftcCardStatus();
// Accesseurs en criture
void setSaveMeasuresInFile( bool aParam ) { _saveMeasuresInFile = aParam; };
// Accesseurs en lecture
NFTB::CNanoFip* getNanoFipPointer() { return &_nanoFip; };
NFTB::CConfigurationEeprom* getConfigurationEepromPointer() { return &_configurationEeprom; };
int getState() const { return _state; };
float get9vMeasure() const { return _9vMeasure; };
float get5vMeasure() const { return _5vMeasure; };
float get3v3Measure() const { return _3v3Measure; };
float get1v5Measure() const { return _1v5Measure; };
float getNanofipConsumption() const { return _nanofipConsumption; };
float getFieldriveConsumption() const { return _fieldriveConsumption; };
float getNanofipTemperature() const { return _nanofipTemperature; };
float getFieldriveTemperature() const { return _fieldriveTemperature; };
unsigned char getFdPwmValueNftc() const { return _fdPwmValueNftc; };
unsigned char getNfPwmValueNftc() const { return _nfPwmValueNftc; };
unsigned char getFdPwmValue100() const { return _fdPwmValue100; };
unsigned char getNfPwmValue100() const { return _nfPwmValue100; };
/// Acquisition des canaux analogiques : tempratures / tensions / courants
int acquireAnalogChannels();
/// Dump de l'objet
std::string dump();
/// Initialisation des tables de conversion de temperature
void initConversionTables();
/// Mise jour de la tolrance de la mesure de temprature du Fieldrive
void setFdToleranceFactor( unsigned char& aValue );
/// Mise jour de la tolrance de la mesure de temprature du NanoFip
void setNfToleranceFactor( unsigned char& aValue );
/// Mise jour de la commande de chauffage (valeur NFTC)
void setFdPwmValueNftc( const unsigned char& aValue );
void setNfPwmValueNftc( const unsigned char& aValue );
/// Mise jour de la commande de chauffage (valeur %)
void setFdPwmValue100( const unsigned char& aValue );
void setNfPwmValue100( const unsigned char& aValue );
protected:
/// Constructeur de copie (interdit)
CNanofipTestBench ( const CNanofipTestBench& );
/// Operateur d'affectation (interdit)
CNanofipTestBench& operator= ( const CNanofipTestBench& );
/// Initialisation du banc de test avec les donnes EEPROM
int initializeTestBenchWithEeprom();
/// Initialisation du banc de test avec les jumpers de la carte
int initializeTestBenchWithJumper();
/// Conversion tension->temperature
void getTemperatureFromVoltage( const float& aVoltage, float& aTemperature, unsigned char& aChannel );
private:
// Sauve les acquisitions dans un fichier
bool _saveMeasuresInFile;
bool _fileInitialized;
// Fichier de dpot des mesures effectues sur le banc
GPL::FILE::LogFile _logFile;
//------------------------------------------------------------
// Paramtres gnraux
//------------------------------------------------------------
// Etat d'initialisation de l'objet "banc de test"
int _state;
// Carte en mode Loopback
bool _fipLoopback;
// Alimentation FIP tablie
bool _fipSupply;
// Initialisation de la carte avec les donnes de l'EEPROM
bool _eepromPowerOnInitialisation;
// Carte en mode Stand Alone
bool _sloneMode;
// Reset FIP externe
bool _externalFipReset;
// Carte initialise avec succs
bool _nftcInitialisation;
//------------------------------------------------------------
// Mesures analogiques
//------------------------------------------------------------
// Tension 9V gnral (en V)
float _9vMeasure;
// Tension 5V gnral (en V)
float _5vMeasure;
// Tension 3.3V du NanoFip (en V)
float _3v3Measure;
// Tension 1.5V du NanoFip (en V)
float _1v5Measure;
// Consommation du NanoFip (en mA)
float _nanofipConsumption;
// Consommation du Fieldrive (en mA)
float _fieldriveConsumption;
// Temperature du NanoFip (en C)
float _nanofipTemperature;
// Temperature du Fieldrive (en C)
float _fieldriveTemperature;
// Tolrance des mesures de temperature
float _fdToleranceFactor;
float _nfToleranceFactor;
//------------------------------------------------------------
// Commandes de chauffage
//------------------------------------------------------------
// Valeur en % du PWM de chauffage
unsigned char _fdPwmValue100;
unsigned char _nfPwmValue100;
// Valeur NFTC du PWM de chauffage
unsigned char _fdPwmValueNftc;
unsigned char _nfPwmValueNftc;
//------------------------------------------------------------
// NanoFip
//------------------------------------------------------------
/// Gestion nanoFip
NFTB::CNanoFip _nanoFip;
//------------------------------------------------------------
// EEPROM de configuration
//------------------------------------------------------------
/// Gestion nanoFip
NFTB::CConfigurationEeprom _configurationEeprom;
}; // class CNanofipTestBench
} // namespace NFTB
#endif // _CNANOFIP_TESTBENCH_HPP__
#pragma once
#include "BaseTabDialog.h"
#include <string>
// Bote de dialogue ConfigTabDialog
class ConfigTabDialog : public BaseTabDialog
{
DECLARE_DYNAMIC(ConfigTabDialog)
public:
ConfigTabDialog( NFTB::CNanofipTestBench* aNfTestBench, CWnd* pParent = NULL ); // constructeur standard
virtual ~ConfigTabDialog();
// Force l'application traiter ses messages
void DoEvents(void);
// Donnes de bote de dialogue
enum { IDD = IDD_CONFIG_DLG };
// Mise jour de l'affichage
void updateDisplay() {};
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge DDX/DDV
// Activation des paramtres FIP
void enableFipControls();
// Dsactivation des paramtres FIP
void disableFipControls();
CComboBox* _rateCombo;
CComboBox* _p3LgthCombo;
CEdit* _fipAddressEdit;
CSliderCtrl* _pwmFdCtrl;
CSliderCtrl* _pwmNfCtrl;
CStatic* _pLedInitialisation;
bool _ledInitialisationState;
CStatic* _pLedSlone;
bool _ledSloneState;
CStatic* _pLedSupply;
bool _ledSupplyState;
CStatic* _pLedStat;
bool _ledStatState;
CStatic* _pLedLoopbackVar1;
bool _ledLoopbackVar1State;
CStatic* _pLedLoopbackVar2;
bool _ledLoopbackVar2State;
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
virtual afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
virtual afx_msg void OnShowWindow( BOOL bShow, UINT nStatus );
afx_msg void OnEnChangeConfigAddress();
afx_msg void OnStnClickedConfigPoi();
afx_msg void OnStnClickedConfigSlone();
afx_msg void OnBnClickedConfigUpdate();
afx_msg void OnNMReleasedcaptureConfigPwmFd(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnNMReleasedcaptureConfigPwmNf(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnStnClickedConfigSupply();
afx_msg void OnStnClickedConfigStat();
afx_msg void OnStnClickedConfigLoop1();
afx_msg void OnStnClickedConfigLoop2();
};
#pragma once
#include "BaseTabDialog.h"
#include <string>
// Bote de dialogue ConfigTabDialog
class ConfigTabDialog : public BaseTabDialog
{
DECLARE_DYNAMIC(ConfigTabDialog)
public:
ConfigTabDialog( NFTB::CNanofipTestBench* aNfTestBench, CWnd* pParent = NULL ); // constructeur standard
virtual ~ConfigTabDialog();
// Force l'application traiter ses messages
void DoEvents(void);
// Donnes de bote de dialogue
enum { IDD = IDD_CONFIG_DLG };
// Mise jour de l'affichage
void updateDisplay() {};
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge DDX/DDV
// Activation des paramtres FIP
void enableFipControls();
// Dsactivation des paramtres FIP
void disableFipControls();
CComboBox* _rateCombo;
CComboBox* _p3LgthCombo;
CEdit* _fipAddressEdit;
CSliderCtrl* _pwmFdCtrl;
CSliderCtrl* _pwmNfCtrl;
CStatic* _pLedInitialisation;
bool _ledInitialisationState;
CStatic* _pLedSlone;
bool _ledSloneState;
CStatic* _pLedSupply;
bool _ledSupplyState;
CStatic* _pLedStat;
bool _ledStatState;
CStatic* _pLedLoopback;
bool _ledLoopbackState;
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
virtual afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
virtual afx_msg void OnShowWindow( BOOL bShow, UINT nStatus );
afx_msg void OnEnChangeConfigAddress();
afx_msg void OnStnClickedConfigPoi();
afx_msg void OnStnClickedConfigSlone();
afx_msg void OnBnClickedConfigUpdate();
afx_msg void OnNMReleasedcaptureConfigPwmFd(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnNMReleasedcaptureConfigPwmNf(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnStnClickedConfigSupply();
afx_msg void OnStnClickedConfigStat();
afx_msg void OnStnClickedConfigLoop();
};
#pragma once
#include "BaseTabDialog.h"
#include <string>
// Bote de dialogue EepromTabDialog
class EepromTabDialog : public BaseTabDialog
{
DECLARE_DYNAMIC(EepromTabDialog)
public:
EepromTabDialog( NFTB::CNanofipTestBench* aNfTestBench, CWnd* pParent = NULL ); // constructeur standard
virtual ~EepromTabDialog();
// Force l'application traiter ses messages
void DoEvents(void);
// Donnes de bote de dialogue
enum { IDD = IDD_EEPROM_DLG };
// Mise jour de l'affichage
void updateDisplay() {};
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge DDX/DDV
// Controles de l'onglet
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
virtual afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
virtual afx_msg void OnShowWindow( BOOL bShow, UINT nStatus );
virtual afx_msg void EepromTabDialog::OnEnChangeByteValue( UINT nID );
afx_msg void OnBnClickedEepromLoad();
};
#pragma once
#include "BaseTabDialog.h"
#include <string>
// Bote de dialogue FipTabDialog
class FipTabDialog : public BaseTabDialog
{
DECLARE_DYNAMIC(FipTabDialog)
public:
FipTabDialog( NFTB::CNanofipTestBench* aNfTestBench, CWnd* pParent = NULL); // constructeur standard
virtual ~FipTabDialog();
// Force l'application traiter ses messages
void DoEvents(void);
// Donnes de bote de dialogue
enum { IDD = IDD_FIP_DLG };
// Mise jour de l'affichage
void updateDisplay();
// Accesseur publics en criture
void setFipAddressValue( unsigned char& aValue ) { _fipAddress = aValue; };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge DDX/DDV
// Affichage FIP
CComboBox* _readVariableIdCB;
CComboBox* _writeVariableIdCB;
CEdit* _readVariableData;
CEdit* _writeVariableData;
CButton* _sendFipDataButton;
// LEDs
CStatic* _pLedFipReset;
CStatic* _pLedFipOn485;
CStatic* _pLedFipLoopbackVar1;
CStatic* _pLedFipLoopbackVar2;
int _testOnly;
// Valeurs charges
unsigned char _fipAddress;
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
virtual afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
virtual afx_msg void OnShowWindow( BOOL bShow, UINT nStatus );
afx_msg void OnStnClickedFipLed485();
afx_msg void OnBnClickedButton1();
afx_msg void OnStnClickedFipLedLoop1();
afx_msg void OnStnClickedFipLedLoop2();
};
#pragma once
#include "BaseTabDialog.h"
#include <string>
// Bote de dialogue FipTabDialog
class FipTabDialog : public BaseTabDialog
{
DECLARE_DYNAMIC(FipTabDialog)
public:
FipTabDialog( NFTB::CNanofipTestBench* aNfTestBench, CWnd* pParent = NULL); // constructeur standard
virtual ~FipTabDialog();
// Force l'application traiter ses messages
void DoEvents(void);
// Donnes de bote de dialogue
enum { IDD = IDD_FIP_DLG };
// Mise jour de l'affichage
void updateDisplay();
// Accesseur publics en criture
void setFipAddressValue( unsigned char& aValue ) { _fipAddress = aValue; };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge DDX/DDV
// Affichage FIP
CComboBox* _readVariableIdCB;
CComboBox* _writeVariableIdCB;
CEdit* _readVariableData;
CEdit* _writeVariableData;
CButton* _sendFipDataButton;
// LEDs
CStatic* _pLedFipReset;
CStatic* _pLedFipOn485;
CStatic* _pLedFipLoopback;
int _testOnly;
// Valeurs charges
unsigned char _fipAddress;
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
virtual afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
virtual afx_msg void OnShowWindow( BOOL bShow, UINT nStatus );
afx_msg void OnStnClickedFipLed485();
afx_msg void OnBnClickedButton1();
afx_msg void OnStnClickedFipLedLoop();
};
/**
* @file GlobalConstants.hpp
*
* @brief définitions globales de constantes
*
* @cvs
* $Source: $
* $Revision: 1.0 $
* $Date: $
* $Name: $
* $Author: nm $
*/
#ifndef _NFTC_GLOBAL_CONSTANTS_HPP__
#define _NFTC_GLOBAL_CONSTANTS_HPP__
#include <string>
#include <vector>
/// Espace de nommage NFTC_CONSTANTS
namespace NFTC_CONSTANTS {
const float ADC_INVALID_VALUE = (float)-1;
const float TEMPERATURE_INVALID_VALUE = (float)-127;
// Données HW
const int PWM_BIT_WIDTH = 5;
const int ADC_BIT_WIDTH = 12;
const float ADC_REF_IN = (float)3.3;
// Constantes nanoFIP
const int NFIP_MAX_FRAME_LGTH = 124; // en octets
//
const int P3_LGTH_2_BYTES_CODE = 0;
const int P3_LGTH_8_BYTES_CODE = 1;
const int P3_LGTH_16_BYTES_CODE = 2;
const int P3_LGTH_32_BYTES_CODE = 3;
const int P3_LGTH_64_BYTES_CODE = 4;
const int P3_LGTH_124_BYTES_CODE = 5;
const int P3_LGTH_ERROR = -1;
const int FIP_SPEED_RATE_31_25K = 0;
const int FIP_SPEED_RATE_1_M = 1;
const int FIP_SPEED_RATE_2_5M = 2;
const int FIP_SPEED_ERROR = -1;
const std::string STR_FIP_SPEED_RATE_31_25K = "31.25 kbps";
const std::string STR_FIP_SPEED_RATE_1_M = "1 Mbps";
const std::string STR_FIP_SPEED_RATE_2_5M = "2.5 Mbps";
const std::string STR_FIP_SPEED_RATE_ERROR = "Error";
const int FIP_IMP_120 = 0;
const int FIP_IMP_150 = 1;
const int FIP_IMP_ERROR = -1;
const std::string STR_FIP_IMP_120 = "120 ohms";
const std::string STR_FIP_IMP_150 = "150 ohms";
const std::string STR_FIP_IMP_ERROR = "Error";
//------------------------------------------------------
// mapping de l'EEPROM du banc de test NanoFip
//------------------------------------------------------
const int EEPROM_SIZE = 128;
const unsigned char EEPROM_START_ADDRESS = 0x00;
const unsigned char EEPROM_TOTAL_SIZE = 0x80; // en octets
// Adresses générales banc de test NanoFip
const unsigned char EEPROM_IDENTIFICATION_START = 0x00;
const unsigned char EEPROM_IDENTIFICATION_SIZE = 0x06; // en octets
const int FIPBOX_VERSION = 0;
const int FIP_HW_PARAMETERS = 1;
const int FD_TEMP_CORRECTION = 2;
const int NF_TEMP_CORRECTION = 3;
// Adresses de configuration
const unsigned char EEPROM_CONFIGURATION_START = 0x06;
const unsigned char EEPROM_CONFIGURATION_SIZE = 0x0A; // en octets
const int INIT_FIP_CONFIG_1 = 0;
const int INIT_FIP_CONFIG_2 = 1;
const int INIT_FIP_ADDRESS = 2;
const int INIT_FD_HEATER = 3;
const int INIT_NF_HEATER = 4;
// Adresses de l'espace utilisateur
const unsigned char EEPROM_USER_AREA_START = 0x10;
const unsigned char EEPROM_USER_AREA_SIZE = 0x70; // en octets
//------------------------------------------------------
// Masques de l'EEPROM du banc de test NanoFip
//------------------------------------------------------
const unsigned char MASK_VERSION_MAJ = 0xF0;
const unsigned char MASK_VERSION_MIN = 0x0F;
const unsigned char MASK_FIP_SPEED = 0xC0;
const unsigned char MASK_FIP_IMP = 0x30;
const unsigned char MASK_POI = 0x80;
const unsigned char MASK_RATE = 0x30;
const unsigned char MASK_P3_LGTH = 0x07;
const unsigned char MASK_LOOPBACK_VAR1 = 0x20;
const unsigned char MASK_LOOPBACK_VAR2 = 0x10;
const unsigned char MASK_STAT = 0x04;
const unsigned char MASK_SLONE = 0x02;
const unsigned char MASK_SUPPLY = 0x01;
const unsigned char MASK_PWM_FD = 0x1F;
const unsigned char MASK_PWM_NF = 0x1F;
// ------------------- Codes erreur --------------------
// ------------------- Codes généraux
const std::string CR_OK = "000000";
const std::string CR_FAILED = "GEN001";
// ------------------- Codes liés à l'EEPROM
const std::string CR_READ_EEPROM_FAILED = "MEM001";
const std::string CR_WRITE_EEPROM_FAILED = "MEM002";
const std::string CR_EEPROM_INVALID_FIPSPEED = "MEM010";
const std::string CR_EEPROM_INVALID_FIPIMP = "MEM011";
const std::string CR_EEPROM_INVALID_RATE = "MEM015";
const std::string CR_EEPROM_INVALID_P3_LGTH = "MEM016";
// ------------------- Codes liés aux ADC
const std::string CR_READ_ADC_FAILED = "ADC001";
// ------------------- Codes liés au chauffage
const std::string CR_CMD_HEAT_FAILED = "HEA001";
// ------------------- Codes liés à FIP
const std::string CR_READ_FIP_FAILED = "FIP001";
const std::string CR_WRITE_FIP_FAILED = "FIP002";
// ------------------- Codes liés aux registres généraux
const std::string CR_STATUS_READ_FAILED = "GLB001";
const std::string CR_CONTROL_WRITE_FAILED = "GBL002";
// ------------------- Constantes liées à un label --------------------
// constantes générales
const int FALSE_ = 0;
const int TRUE_ = 1;
const int OK = 2;
const int FAILED = 3;
const int NA = 4;
const int UNDEFINED = 5;
const int YES = 6;
const int NO = 7;
const int UNKNOWN = 8;
const int NOT_INITIALIZED = 10;
const int INITIALIZED = 11;
// translation Constante -> texte
static const char* TO_TEXT[] = {
"FALSE", // 0
"TRUE", // 1
"OK", // 2
"FAILED", // 3
"NOT_APPLICABLE", // 4
"UNDEFINED", // 5
"YES", // 6
"NO", // 7
"UNKNOWN", //
"", //
"NOT_INITIALIZED", // 10
"INITIALIZED", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", // 20
"", // 21
"", // 22
"", // 23
"", //
"", //
"", //
"", //
"", //
"", //
"", // 30
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", // 40
"", //
"", //
"", //
"", //
"", // 45
"", //
"", //
"", //
"", //
"", // 50
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", // 60
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", // 70
"LAST_LABEL" // x
};
} // namespace NFTC_CONSTANTS
#endif // _NFTC_GLOBAL_CONSTANTS_HPP__
/**
* @file GlobalConstants.hpp
*
* @brief définitions globales de constantes
*
* @cvs
* $Source: $
* $Revision: 1.0 $
* $Date: $
* $Name: $
* $Author: nm $
*/
#ifndef _NFTC_GLOBAL_CONSTANTS_HPP__
#define _NFTC_GLOBAL_CONSTANTS_HPP__
#include <string>
#include <vector>
/// Espace de nommage NFTC_CONSTANTS
namespace NFTC_CONSTANTS {
const float ADC_INVALID_VALUE = (float)-1;
const float TEMPERATURE_INVALID_VALUE = (float)-127;
// Données HW
const int PWM_BIT_WIDTH = 5;
const int ADC_BIT_WIDTH = 12;
const float ADC_REF_IN = (float)3.3;
// Constantes nanoFIP
const int NFIP_MAX_FRAME_LGTH = 124; // en octets
//
const int P3_LGTH_2_BYTES_CODE = 0;
const int P3_LGTH_8_BYTES_CODE = 1;
const int P3_LGTH_16_BYTES_CODE = 2;
const int P3_LGTH_32_BYTES_CODE = 3;
const int P3_LGTH_64_BYTES_CODE = 4;
const int P3_LGTH_124_BYTES_CODE = 5;
const int P3_LGTH_ERROR = -1;
const int FIP_SPEED_RATE_31_25K = 0;
const int FIP_SPEED_RATE_1_M = 1;
const int FIP_SPEED_RATE_2_5M = 2;
const int FIP_SPEED_ERROR = -1;
const std::string STR_FIP_SPEED_RATE_31_25K = "31.25 kbps";
const std::string STR_FIP_SPEED_RATE_1_M = "1 Mbps";
const std::string STR_FIP_SPEED_RATE_2_5M = "2.5 Mbps";
const std::string STR_FIP_SPEED_RATE_ERROR = "Error";
const int FIP_IMP_120 = 0;
const int FIP_IMP_150 = 1;
const int FIP_IMP_ERROR = -1;
const std::string STR_FIP_IMP_120 = "120 ohms";
const std::string STR_FIP_IMP_150 = "150 ohms";
const std::string STR_FIP_IMP_ERROR = "Error";
//------------------------------------------------------
// mapping de l'EEPROM du banc de test NanoFip
//------------------------------------------------------
const int EEPROM_SIZE = 128;
const unsigned char EEPROM_START_ADDRESS = 0x00;
const unsigned char EEPROM_TOTAL_SIZE = 0x80; // en octets
// Adresses générales banc de test NanoFip
const unsigned char EEPROM_IDENTIFICATION_START = 0x00;
const unsigned char EEPROM_IDENTIFICATION_SIZE = 0x06; // en octets
const int FIPBOX_VERSION = 0;
const int FIP_HW_PARAMETERS = 1;
const int FD_TEMP_CORRECTION = 2;
const int NF_TEMP_CORRECTION = 3;
// Adresses de configuration
const unsigned char EEPROM_CONFIGURATION_START = 0x06;
const unsigned char EEPROM_CONFIGURATION_SIZE = 0x0A; // en octets
const int INIT_FIP_CONFIG_1 = 0;
const int INIT_FIP_CONFIG_2 = 1;
const int INIT_FIP_ADDRESS = 2;
const int INIT_FD_HEATER = 3;
const int INIT_NF_HEATER = 4;
// Adresses de l'espace utilisateur
const unsigned char EEPROM_USER_AREA_START = 0x10;
const unsigned char EEPROM_USER_AREA_SIZE = 0x70; // en octets
//------------------------------------------------------
// Masques de l'EEPROM du banc de test NanoFip
//------------------------------------------------------
const unsigned char MASK_VERSION_MAJ = 0xF0;
const unsigned char MASK_VERSION_MIN = 0x0F;
const unsigned char MASK_FIP_SPEED = 0xC0;
const unsigned char MASK_FIP_IMP = 0x30;
const unsigned char MASK_POI = 0x80;
const unsigned char MASK_RATE = 0x30;
const unsigned char MASK_P3_LGTH = 0x07;
const unsigned char MASK_LOOPBACK = 0x10;
const unsigned char MASK_STAT = 0x04;
const unsigned char MASK_SLONE = 0x02;
const unsigned char MASK_SUPPLY = 0x01;
const unsigned char MASK_PWM_FD = 0x1F;
const unsigned char MASK_PWM_NF = 0x1F;
// ------------------- Codes erreur --------------------
// ------------------- Codes généraux
const std::string CR_OK = "000000";
const std::string CR_FAILED = "GEN001";
// ------------------- Codes liés à l'EEPROM
const std::string CR_READ_EEPROM_FAILED = "MEM001";
const std::string CR_WRITE_EEPROM_FAILED = "MEM002";
const std::string CR_EEPROM_INVALID_FIPSPEED = "MEM010";
const std::string CR_EEPROM_INVALID_FIPIMP = "MEM011";
const std::string CR_EEPROM_INVALID_RATE = "MEM015";
const std::string CR_EEPROM_INVALID_P3_LGTH = "MEM016";
// ------------------- Codes liés aux ADC
const std::string CR_READ_ADC_FAILED = "ADC001";
// ------------------- Codes liés au chauffage
const std::string CR_CMD_HEAT_FAILED = "HEA001";
// ------------------- Codes liés à FIP
const std::string CR_READ_FIP_FAILED = "FIP001";
const std::string CR_WRITE_FIP_FAILED = "FIP002";
// ------------------- Codes liés aux registres généraux
const std::string CR_STATUS_READ_FAILED = "GLB001";
const std::string CR_CONTROL_WRITE_FAILED = "GBL002";
// ------------------- Constantes liées à un label --------------------
// constantes générales
const int FALSE_ = 0;
const int TRUE_ = 1;
const int OK = 2;
const int FAILED = 3;
const int NA = 4;
const int UNDEFINED = 5;
const int YES = 6;
const int NO = 7;
const int UNKNOWN = 8;
const int NOT_INITIALIZED = 10;
const int INITIALIZED = 11;
// translation Constante -> texte
static const char* TO_TEXT[] = {
"FALSE", // 0
"TRUE", // 1
"OK", // 2
"FAILED", // 3
"NOT_APPLICABLE", // 4
"UNDEFINED", // 5
"YES", // 6
"NO", // 7
"UNKNOWN", //
"", //
"NOT_INITIALIZED", // 10
"INITIALIZED", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", // 20
"", // 21
"", // 22
"", // 23
"", //
"", //
"", //
"", //
"", //
"", //
"", // 30
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", // 40
"", //
"", //
"", //
"", //
"", // 45
"", //
"", //
"", //
"", //
"", // 50
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", // 60
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", //
"", // 70
"LAST_LABEL" // x
};
} // namespace NFTC_CONSTANTS
#endif // _NFTC_GLOBAL_CONSTANTS_HPP__
#pragma once
#include "BaseTabDialog.h"
#include <string>
// Bote de dialogue HeaterTabDialog
class HeaterTabDialog : public BaseTabDialog
{
DECLARE_DYNAMIC(HeaterTabDialog)
public:
HeaterTabDialog( NFTB::CNanofipTestBench* aNfTestBench, CWnd* pParent = NULL); // constructeur standard
virtual ~HeaterTabDialog();
// Force l'application traiter ses messages
void DoEvents(void);
// Accesseur publics en criture
// Donnes de bote de dialogue
enum { IDD = IDD_HEATER_DLG };
// Mise jour de l'affichage
void updateDisplay();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge DDX/DDV
// Controles de l'onglet
CEdit* _fdHeatMeasure;
CEdit* _nfHeatMeasure;
CSliderCtrl* _pwmFdCtrl;
CSliderCtrl* _pwmNfCtrl;
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
virtual afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
virtual afx_msg void OnShowWindow( BOOL bShow, UINT nStatus );
afx_msg void OnNMReleasedcaptureHeatPwmFd(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnNMReleasedcaptureHeatPwmNf(NMHDR *pNMHDR, LRESULT *pResult);
};
#pragma once
#include "BaseTabDialog.h"
#include <string>
// Bote de dialogue IdentificationTabDialog
class IdentificationTabDialog : public BaseTabDialog
{
DECLARE_DYNAMIC(IdentificationTabDialog)
public:
IdentificationTabDialog( NFTB::CNanofipTestBench* aNfTestBench, CWnd* pParent = NULL); // constructeur standard
virtual ~IdentificationTabDialog();
// Force l'application traiter ses messages
void DoEvents(void);
// Donnes de bote de dialogue
enum { IDD = IDD_IDENTIFICATION_DLG };
// Mise jour de l'affichage
void updateDisplay() {};
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge DDX/DDV
// Bitmap pointers
CBitmap* _pHlpLogo;
CBitmap* _pCernLogo;
// Control pointers
CStatic* _pHlpLogoCtrl;
CStatic* _pCernLogoCtrl;
// Sauvegarde des acquisitions
bool _saveMeasuresInFile;
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
virtual afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
virtual afx_msg void OnShowWindow( BOOL bShow, UINT nStatus );
afx_msg void OnBnClickedIdButtonAcq();
afx_msg void OnBnClickedIdButtonReset();
};
// MainFrm.h : interface de la classe CMainFrame
//
#pragma once
class CMainFrame : public CFrameWnd
{
protected: // cration partir de la srialisation uniquement
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
// Attributs
public:
// Oprations
public:
// Substitutions
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
// Implmentation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: // membres incorpors de la barre de contrle
CStatusBar m_wndStatusBar;
CToolBar m_wndToolBar;
// Fonctions gnres de la table des messages
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
DECLARE_MESSAGE_MAP()
};
// NftcControl.h: fichier d'en-tte principal pour l'application NftcControl
//
#pragma once
#ifndef __AFXWIN_H__
#error "incluez 'stdafx.h' avant d'inclure ce fichier pour PCH"
#endif
#include "resource.h" // symboles principaux
#include <string>
extern const std::string NftcControlSw_Major;
extern const std::string NftcControlSw_Minor;
extern const std::string NftcControlSw_Edition;
// CNftcControlApp:
// Consultez NftcControl.cpp pour l'implmentation de cette classe
//
class CNftcControlApp : public CWinApp
{
public:
CNftcControlApp();
// Substitutions
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
// Implmentation
afx_msg void OnAppAbout();
DECLARE_MESSAGE_MAP()
};
extern CNftcControlApp theApp;
\ No newline at end of file
// NftcControlDoc.h : interface de la classe CNftcControlDoc
//
#pragma once
class CNftcControlDoc : public CDocument
{
protected: // création à partir de la sérialisation uniquement
CNftcControlDoc();
DECLARE_DYNCREATE(CNftcControlDoc)
// Attributs
public:
// Opérations
public:
// Substitutions
public:
virtual BOOL OnNewDocument();
//virtual void Serialize(CArchive& ar);
// Implémentation
public:
virtual ~CNftcControlDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Fonctions générées de la table des messages
protected:
DECLARE_MESSAGE_MAP()
};
// NftcControlView.h : interface de la classe CNftcControlView
//
#pragma once
#include "NftcControl.h"
#include "GlobalConstants.hpp"
#include "CNanofipTestBench.hpp"
#include <string>
class ConfigTabDialog;
class IdentificationTabDialog;
class SupplyTabDialog;
class HeaterTabDialog;
class FipTabDialog;
class EepromTabDialog;
class CNftcControlDoc;
#define BLEU_FONCE RGB( 3, 11, 105 )
#define VERT_CLAIR RGB( 242, 255, 250 )
#define VERT_FONCE RGB( 2, 94, 4 )
#define JAUNE_CLAIR RGB( 255, 253, 232 )
#define ROUGE_FONCE RGB( 105, 10, 5 )
#define ROUGE RGB( 255, 0, 0 )
#define ROUGE_CLAIR RGB( 255, 244, 243 )
extern const int IDX_CODELIST_VALUE;
extern const int IDX_CODELIST_LEVEL;
extern const int IDX_CODELIST_COMMENT;
extern const std::string LGTH_2;
extern const std::string LGTH_8;
extern const std::string LGTH_16;
extern const std::string LGTH_32;
extern const std::string LGTH_64;
extern const std::string LGTH_124;
extern const std::string LGTH_ERROR;
class CNftcControlView : public CFormView
{
protected: // cration partir de la srialisation uniquement
CNftcControlView();
DECLARE_DYNCREATE(CNftcControlView)
public:
enum{ IDD = IDD_NFTCCONTROL_FORM };
// Attributs
public:
CNftcControlDoc* GetDocument() const;
// Oprations
public:
//CListCtrl* getReturnCodeList() {return _retCodeHistory; };
void setReturnCodeHistory( const std::string& aCode, const std::string& aLevel, const std::string& aComment );
void disableTabCtrl();
void enableTabCtrl();
// Force l'application traiter ses messages
void DoEvents(void);
// Substitutions
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge de DDX/DDV
virtual void OnInitialUpdate(); // premier appel aprs la construction
virtual void OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/);
void setRectangle();
// Implmentation
public:
virtual ~CNftcControlView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Banc de test NanoFip
NFTB::CNanofipTestBench _nfTestBench;
//
CListCtrl* _retCodeHistory;
CTabCtrl* _mainTabCtrl;
ConfigTabDialog* _configurationPage;
IdentificationTabDialog* _identificationPage;
SupplyTabDialog* _supplyPage;
HeaterTabDialog* _heaterPage;
FipTabDialog* _fipPage;
EepromTabDialog* _eepromPage;
int _currentTab;
//bool _unchangeableTab;
// Handle du Timer
UINT_PTR _hTimer;
// Fonctions gnres de la table des messages
protected:
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnTcnSelchangeTab1(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg LRESULT OnTimerExpired( WPARAM wParam, LPARAM lParam );
};
#ifndef _DEBUG // version de dbogage dans NftcControlView.cpp
inline CNftcControlDoc* CNftcControlView::GetDocument() const
{ return reinterpret_cast<CNftcControlDoc*>(m_pDocument); }
#endif
#pragma once
#include "BaseTabDialog.h"
#include <string>
// Bote de dialogue SupplyTabDialog
class SupplyTabDialog : public BaseTabDialog
{
DECLARE_DYNAMIC(SupplyTabDialog)
public:
SupplyTabDialog( NFTB::CNanofipTestBench* aNfTestBench, CWnd* pParent = NULL); // constructeur standard
virtual ~SupplyTabDialog();
// Force l'application traiter ses messages
void DoEvents(void);
// Donnes de bote de dialogue
enum { IDD = IDD_SUPPLY_DLG };
// Mise jour de l'affichage
void updateDisplay();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // Prise en charge DDX/DDV
CStatic* _pLedFipSupply;
bool _ledFipSupplyState;
unsigned char _testOnly;
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
virtual afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
virtual afx_msg void OnShowWindow( BOOL bShow, UINT nStatus );
afx_msg void OnStnClickedSupplyFipSupply();
};
// stdafx.h : fichier Include pour les fichiers Include système standard,
// ou les fichiers Include spécifiques aux projets qui sont utilisés fréquemment,
// et sont rarement modifiés
#pragma once
#ifndef _SECURE_ATL
#define _SECURE_ATL 1
#endif
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // Exclure les en-têtes Windows rarement utilisés
#endif
// Modifiez les définitions suivantes si vous devez cibler une plate-forme avant celles spécifiées ci-dessous.
// Reportez-vous à MSDN pour obtenir les dernières informations sur les valeurs correspondantes pour les différentes plates-formes.
#ifndef WINVER // Autorise l'utilisation des fonctionnalités spécifiques à Windows XP ou version ultérieure.
#define WINVER 0x0501 // Attribuez la valeur appropriée à cet élément pour cibler d'autres versions de Windows.
#endif
#ifndef _WIN32_WINNT // Autorise l'utilisation des fonctionnalités spécifiques à Windows XP ou version ultérieure.
#define _WIN32_WINNT 0x0501 // Attribuez la valeur appropriée à cet élément pour cibler d'autres versions de Windows.
#endif
#ifndef _WIN32_WINDOWS // Autorise l'utilisation des fonctionnalités spécifiques à Windows 98 ou version ultérieure.
#define _WIN32_WINDOWS 0x0410 // Attribuez la valeur appropriée à cet élément pour cibler Windows Me ou version ultérieure.
#endif
#ifndef _WIN32_IE // Autorise l'utilisation des fonctionnalités spécifiques à Internet Explorer 6.0 ou version ultérieure.
#define _WIN32_IE 0x0600 // Attribuez la valeur appropriée à cet élément pour cibler d'autres versions d'Internet Explorer.
#endif
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // certains constructeurs CString seront explicites
// désactive le masquage MFC de certains messages d'avertissement courants et par ailleurs souvent ignorés
#define _AFX_ALL_WARNINGS
#include <afxwin.h> // composants MFC principaux et standard
#include <afxext.h> // extensions MFC
#include <afxdisp.h> // Classes MFC Automation
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // Prise en charge MFC pour les contrôles communs Internet Explorer 4
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // Prise en charge des MFC pour les contrôles communs Windows
#endif // _AFX_NO_AFXCMN_SUPPORT
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif
2011-05-25-16:12:52.203 | INFORMATION | LogManager::getLogDirectorySize | Current Log size is <0> Bytes
2011-05-25-16:12:52.203 | INFORMATION | LogManager::verifySize | MAX log size is <4194304> Bytes
2011-05-25-16:12:52.203 | INFORMATION | CNftcControlView::OnInitialUpdate() | LOG module initialised.
2011-05-25-16:12:52.203 | ERROR | Com232Connection::init | Opening COM port failed with code : 2.
2011-05-25-16:12:52.203 | ERROR | Com232Connection::init | -> Message error : Le fichier spcifi est introuvable.
2011-05-25-16:12:52.203 | ERROR | CNftcControlView::OnInitialUpdate() | Failed to initialise COM module.
2011-05-25-16:12:52.218 | ERROR | Com232Connection::purgeComBuffers | Failed to purge COM port.
2011-05-25-16:12:52.218 | WARNING | SerialProtocol::readNftcStatusRegister() | Failed to purge COM buffers with code : FAILED
2011-05-25-16:12:52.218 | WARNING | Com232Connection::sendByte | Failed to send byte : 
2011-05-25-16:16:16.671 | WARNING | Com232Connection::sendByte | Code stopped with code : 183.
2011-05-25-16:16:16.671 | WARNING | Com232Connection::sendByte | -> Message error : Impossible de crer un fichier dj existant.
2011-05-25-16:16:16.671 | ERROR | SerialProtocol::readNftcStatusRegister() | Sending command byte <0x16> failed with code : FAILED
2011-05-25-16:16:16.671 | ERROR | CNanofipTestBench::getNftcCardStatus() | Failed to retrieve NFTC status.
2011-05-25-16:16:16.671 | ERROR | CNanofipTestBench::initializeTestBench() | Failed to read NFTC status.
2011-05-25-16:16:16.671 | WARNING | CNftcControlView::OnInitialUpdate() | Failed to read EEPROM Configuration area.
2011-05-25-16:16:16.734 | ERROR | Com232Connection::purgeComBuffers | Failed to purge COM port.
2011-05-25-16:16:16.734 | WARNING | SerialProtocol::readNftcStatusRegister() | Failed to purge COM buffers with code : FAILED
2011-05-25-16:16:16.734 | WARNING | Com232Connection::sendByte | Failed to send byte : 
2011-05-25-16:16:20.109 | WARNING | Com232Connection::sendByte | Code stopped with code : 183.
2011-05-25-16:16:20.109 | WARNING | Com232Connection::sendByte | -> Message error : Impossible de crer un fichier dj existant.
2011-05-25-16:16:20.109 | ERROR | SerialProtocol::readNftcStatusRegister() | Sending command byte <0x16> failed with code : FAILED
2011-05-25-16:16:20.156 | INFORMATION | CNftcControlView::OnInitialUpdate() | IHM initialised.
2011-05-25-16:16:20.156 | INFORMATION | CNftcControlView::OnInitialUpdate() | Timer initialised.
2011-05-25-16:16:20.656 | ERROR | Com232Connection::purgeComBuffers | Failed to purge COM port.
2011-05-25-16:16:20.656 | WARNING | SerialProtocol::readFromAnalogConverter() | Failed to purge COM buffers with code : FAILED
2011-05-25-16:16:20.656 | WARNING | Com232Connection::sendByte | Failed to send byte : 
2011-05-25-16:16:22.156 | WARNING | Com232Connection::sendByte | Code stopped with code : 183.
2011-05-25-16:16:22.156 | WARNING | Com232Connection::sendByte | -> Message error : Impossible de crer un fichier dj existant.
2011-05-25-16:16:22.156 | ERROR | SerialProtocol::readFromAnalogConverter() | Sending command byte <0x12> failed with code : FAILED
2011-05-25-16:16:22.156 | ERROR | Com232Connection::purgeComBuffers | Failed to purge COM port.
2011-05-25-16:16:22.156 | WARNING | SerialProtocol::readFromAnalogConverter() | Failed to purge COM buffers with code : FAILED
2011-05-25-16:16:22.156 | WARNING | Com232Connection::sendByte | Failed to send byte : 
2011-05-25-16:16:52.093 | WARNING | Com232Connection::sendByte | Code stopped with code : 183.
2011-05-25-16:16:52.093 | WARNING | Com232Connection::sendByte | -> Message error : Impossible de crer un fichier dj existant.
2011-05-25-16:16:52.093 | ERROR | SerialProtocol::readFromAnalogConverter() | Sending command byte <0x12> failed with code : FAILED
2011-05-25-16:16:52.093 | ERROR | Com232Connection::purgeComBuffers | Failed to purge COM port.
2011-05-25-16:16:52.093 | WARNING | SerialProtocol::readFromAnalogConverter() | Failed to purge COM buffers with code : FAILED
2011-05-25-16:16:52.093 | WARNING | Com232Connection::sendByte | Failed to send byte : 
2011-05-25-16:18:18.703 | INFORMATION | LogManager::init | Current trace level is: INFORMATION
2011-05-25-16:18:18.703 | INFORMATION | LogManager::getLogDirectorySize | Current Log size is <4294> Bytes
2011-05-25-16:18:18.703 | INFORMATION | LogManager::verifySize | MAX log size is <4194304> Bytes
2011-05-25-16:18:18.703 | INFORMATION | CNftcControlView::OnInitialUpdate() | LOG module initialised.
2011-05-25-16:18:18.703 | ERROR | Com232Connection::init | Opening COM port failed with code : 2.
2011-05-25-16:18:18.703 | ERROR | Com232Connection::init | -> Message error : Le fichier spcifi est introuvable.
2011-05-25-16:18:18.703 | ERROR | CNftcControlView::OnInitialUpdate() | Failed to initialise COM module.
2011-05-25-16:18:18.703 | ERROR | Com232Connection::purgeComBuffers | Failed to purge COM port.
2011-05-25-16:18:18.718 | WARNING | SerialProtocol::readNftcStatusRegister() | Failed to purge COM buffers with code : FAILED
2011-05-25-16:18:18.718 | WARNING | Com232Connection::sendByte | Failed to send byte : 
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
</assembly>
La ressource de manifeste a ‚t‚ mise … jour pour la derniŠre fois … 16:56:41,25 le 25/05/2011
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
</assembly>
La ressource de manifeste a ‚t‚ mise … jour pour la derniŠre fois … 17:06:45,54 le 25/05/2011
//
// NftcControl.RC2 - ressources que Microsoft Visual C++ ne modifie pas directement
//
#ifdef APSTUDIO_INVOKED
#error ce fichier n'est pas modifiable par Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Ajouter ici les ressources modifies manuellement...
/////////////////////////////////////////////////////////////////////////////
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment