Marine systems simulation
CSwitch.h
1#ifndef CSwitch_H
2#define CSwitch_H
3
62#include "SimObject.h"
63
64#include <string>
65
66class CSwitch : public SimObject
67{
68 public:
69 enum SwitchType
70 {
71 PASS1_IF2_POSITIVE,
72 PASS3_IF2_POSITIVE,
73 PASS1_IF2_ZERO,
74 PASS3_IF2_ZERO
75 };
76
78 CSwitch(std::string sSimObjectName, ISimObjectCreator* pCreator);
79 ~CSwitch();
80 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep) { }
81
82 const double* Output(const double T, const double* const X);
83
84
85#ifdef FH_VISUALIZATION
87 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator) { }
88
90 virtual void RenderUpdate(const double T, const double* const X) { }
91#endif
92
93 protected:
94 SwitchType Type;
95
96 ISignalPort* m_Input1;
97 ISignalPort* m_Input2;
98 ISignalPort* m_Input3;
99
100 double* m_Signal;
101
103};
104
105
106#endif
Definition: CSwitch.h:67
int m_iPortWidth
The width of the input and output ports.
Definition: CSwitch.h:102
CSwitch(std::string sSimObjectName, ISimObjectCreator *pCreator)
Constructor.