14#include <CIntegratorOptions.h>
15#include <CPrintDuringExec.h>
18#include "sfh/math/math.h"
19#include "sfh/sim/kinematics.h"
20#include "sfh/constants.h"
28#include <sys/socket.h>
29#include <netinet/in.h>
98class CTCP :
public SimObject
101 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
104 CTCP(std::string sSimObjectName, ISimObjectCreator* pCreator);
105 virtual void FinalSetup(
const double dT,
const double*
const adX, ISimObjectCreator*
const pCreator);
106 virtual void InitialConditionSetup(
const double T,
const double *
const currentIC,
double* updatedIC, ISimObjectCreator* creator);
110 virtual void OdeFcn(
const double dT,
const double*
const adX,
double*
const adXDot,
const bool bIsMajorTimeStep);
113 bool SetupTCP(
const std::string& IPString,
const int& port);
116 bool SendMsg(
const double dT,
const double*
const adX);
124#ifdef FH_VISUALIZATION
126 virtual void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator) {};
129 virtual void RenderUpdate(
const double dT,
const double*
const adX) {};
134 CPrintDuringExec* m_Logger;
137 ISignalPort* m_InSig;
144 virtual const double* OutMsg(
const double dT,
const double*
const adX);
154 std::string m_TCPName;
155 std::string m_IPString;
162 SOCKET m_ListenSocket;
163 SOCKET m_ClientSocket;