Marine systems simulation
CLogic.h
1#ifndef C_LOGIC_H
2#define C_LOGIC_H
3
62#include "SimObject.h"
63
64class CLogic : public SimObject
65{
66 public:
68 CLogic(std::string sSimObjectName, ISimObjectCreator* pCreator);
69 ~CLogic();
70 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep) { }
71
72 const double* Output(const double T, const double* const X);
73
74
75#ifdef FH_VISUALIZATION
77 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator) { }
78
80 virtual void RenderUpdate(const double T, const double* const X) { }
81#endif
82
83 protected:
84 ISignalPort** m_Input;
85
86 double* m_Signal;
87
90 {
91 LogicType_OR,
92 LogicType_XOR,
93 LogicType_AND,
94 };
95
101};
102
103
104#endif
Definition: CLogic.h:65
int m_iPortWidth
Definition: CLogic.h:99
int m_iNumInput
Definition: CLogic.h:97
ELogicType
An enumerator which tells which kind of logics is wanted.
Definition: CLogic.h:90
ELogicType m_ELogicType
The type of logic.
Definition: CLogic.h:100
CLogic(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.