#ifndef __ORDEVICE_SYNC_DEVICE_H__
#define __ORDEVICE_SYNC_DEVICE_H__
#include "ordevicesync_hardware.h"
#define ORDEVICESYNCTEMPLATE__CLASSNAME ORDeviceSync_Template
#define ORDEVICESYNCTEMPLATE__CLASSSTR "ORDeviceSync_Template"
class ORDeviceSync_Template : public FBDeviceSync
{
public:
virtual bool FBCreate();
virtual void FBDestroy();
virtual bool DeviceSyncAnimationNodeNotify ( FBAnimationNode* pAnimationNode, FBEvaluateInfo* pEvaluateInfo, int pCorrectedSync );
virtual void DeviceIONotify ( kDeviceIOs pAction, FBDeviceNotifyInfo &pDeviceNotifyInfo );
virtual bool DeviceOperation ( kDeviceOperations pOperation );
virtual void RecordingDoneAnimation ( FBAnimationNode* pAnimationNode );
virtual bool FbxStore ( FBFbxObject* pFbxObject,
kFbxObjectStore pStoreWhat );
virtual bool FbxRetrieve( FBFbxObject* pFbxObject,
kFbxObjectStore pStoreWhat );
bool Init();
bool Done();
bool Stop();
bool Start();
void SetServerAddress(char *pIPAddress) { mHardware.SetServerAddress(pIPAddress); }
char * GetServerAddress() { return mHardware.GetServerAddress(); }
void SetServerPort(int pPort) { mHardware.SetServerPort(pPort); }
int GetServerPort() { return mHardware.GetServerPort(); }
void SetSerialPort(int pPort) { mHardware.SetSerialPort(pPort); }
int GetSerialPort() { return mHardware.GetSerialPort(); }
virtual void DeviceRecordFrame(FBTime &pTime,ORDeviceSync_Template_Packet* pPacket);
private:
FBPlayerControl mPlayerControl;
ORDeviceSync_Template_Hardware mHardware;
FBAnimationNode* mNodeCamera_InData;
bool mFirstPacket;
FBTime mRecordStartTime;
FBTime mFirstPacketTime;
};
#endif