Pseudo code pour Module Physiqye
- NOMENMAJUSCULE : partie a remplacer via generation de code
-
__foreach xxxxx___
traitement a faire en boucle via generation de code
- Exemple de fichier genere
Fichier PhR_NOMMODULEPHYS.h
//----------------------------------------------------------
// Physical Resource NOMMODULEPHYS
//----------------------------------------------------------
#ifndef __phr_NOMMODULEPHYS_h
#define __phr_NOMMODULEPHYS_h
#include "Exec/phr.h"
class orc_PhR_NOMMODULEPHYS : public PhR {
private:
public:
orc_PhR_NOMMODULEPHYS(ProcedureRobot *prr, char *ch ,int a, int b,int c ,int d) : PhR (prr,ch,a,b,c,d) {};
//~orc_PhR_NOMMODULEPHYS();//Should it be defined ?
// Output Ports declaration
__foreach output port write declaration as : typename OUTPUTPORTVARNAME;__
// Event Ports declaration
__foreach output port write declaration as : int EVENTPORTVARNAME;__
// Methods to call functions driver
__foreach input port write declaration as : void PUT_INPUTPORTVARNAME(const typename &INPUTPORTVARNAME);__
__foreach output port write declaration as : void GET_OUTPUTPORTVARNAME();__
// Methods to control the driver mode
void reinit();
void param();
int Init();
int Close();
};
#endif
// End of Physical Resource NOMMODULEPHYS
Fichier PhR_NOMMODULEPHYS.cpp
//----------------------------------------------------------
// Physical Resource NOMMODULEPHYS
//----------------------------------------------------------
#include "PhR_NOMNODULEPHYS.h"
__foreach input port write definition as :
//
// Orccad Version: ORCCADVERSION
// Driver Call
// Module : PUT_INPUTPORTVARNAME
// Call Driver File for variable:
// input typename INPUTPORTVARNAME
// Date of creation : DATEOFREATION
//
void orc_PhR_NOMMODULEPHYSS::PUT_INPUTPORTVARNAME(const typename &INPUTPUTPORTVARNAME)
)
{
__Add code specified by user if any ?__
}
__
__foreach input port write definition as :
//
// Orccad Version: ORCCADVERSION
// Driver Call
// Module : GET_OUTPUTPORTVARNAME
// Call Driver File for variable:
// output typename OUTPUTPORTVARNAME
// Date of creation : DATEOFREATION
//
void orc_PhR_NOMMODULEPHYS::GET_OUTPUTPORTVARNAME()
)
{
__Add code specified by user if any ?__
}
__
//
// Orccad Version: ORCCADVERSION
// Module : NOMMODULEPHYS
// Initialisation Driver File
//
// Driver Ports :
// __foreach input port write declaration as : input typename INPUTPORTVARNAME__
// __foreach output port write declaration as : output typename OUTPUTPORTVARNAME__
// Date of creation : DATEOFREATION
//
void orc_PhR_NOMMODULEPHYS::Init()
{
__Add code specified by user if any ?__
}
//
// Orccad Version: ORCCADVERSION
// Module : NOMMODULEPHYS
// End File
//
// Driver Ports :
// __foreach input port write declaration as : input typename INPUTPORTVARNAME__
// __foreach output port write declaration as : output typename OUTPUTPORTVARNAME__
// Date of creation : DATEOFREATION
//
void orc_PhR_NOMMODULEPHYS::Close()
{
__Add code specified by user if any ?__
}
//
// Orccad Version: ORCCADVERSION
// Module : NOMMODULEPHYS
// End File
//
// Driver Ports :
// __foreach input port write declaration as : input typename INPUTPORTVARNAME__
// __foreach output port write declaration as : output typename OUTPUTPORTVARNAME__
// Date of creation : DATEOFREATION
//
void orc_PhR_NOMMODULEPHYS::reinit()
{
__Add code specified by user if any ?__
}
//
// Orccad Version: ORCCADVERSION
// Module : NOMMODULEPHYS
// End File
//
// Driver Ports :
// __foreach input port write declaration as : input typename INPUTPORTVARNAME__
// __foreach output port write declaration as : output typename OUTPUTPORTVARNAME__
// Date of creation : DATEOFREATION
//
void orc_PhR_NOMMODULEPHYS::param()
{
__Add code specified by user if any ?__
}
// End of class orc_PhR_NOMMODULEPHYS
--
SorayaArias - 03 Mar 2010