#ifndef __ORDEVICE_CAMERA_DEVICE_H__
#define __ORDEVICE_CAMERA_DEVICE_H__
#include "ordevicecamera_hardware.h"
#define ORDEVICECAMERATEMPLATE__CLASSNAME ORDeviceCamera_Template
#define ORDEVICECAMERATEMPLATE__CLASSSTR "ORDeviceCamera_Template"
class ORDeviceCamera_Template : public FBDeviceCamera
{
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 DeviceCameraEvalData ( FBDeviceNotifyInfo &pDeviceNotifyInfo );
virtual void RecordingDoneAnimation ( FBAnimationNode* pAnimationNode );
virtual bool ModelTemplateBindNotify ( FBModel* pModel, int pIndex, FBModelTemplate* pModelTemplate );
virtual bool FbxStore ( FBFbxObject* pFbxObject,
kFbxObjectStore pStoreWhat );
virtual bool FbxRetrieve( FBFbxObject* pFbxObject,
kFbxObjectStore pStoreWhat );
bool Init();
bool Done();
bool Stop();
bool Start();
int GetCommunicationType() { return mHardware.GetCommunicationType(); }
void SetHardwareSetting(double pSetting) { mHardware.SetHardwareSetting( pSetting ); }
double GetHardwareSetting() { return mHardware.GetHardwareSetting(); }
void SetSerialPort (int pPort) { mHardware.SetSerialPort(pPort); }
int GetSerialPort () { return mHardware.GetSerialPort(); }
void SetSerialBaudRate (int pRate) { mHardware.SetSerialBaudRate(pRate); }
int GetSerialBaudRate () { return mHardware.GetSerialBaudRate(); }
void SetNetworkAddress (const char* pIPAddress){ mHardware.SetNetworkAddress(pIPAddress); }
const char* GetNetworkAddress () { return mHardware.GetNetworkAddress(); }
void SetNetworkPort (int pPort) { mHardware.SetNetworkPort(pPort); }
int GetNetworkPort () { return mHardware.GetNetworkPort(); }
void SetNetworkProtocol (
FBCommType pType ) { mHardware.SetNetworkProtocol(pType); }
FBCommType GetNetworkProtocol () {
return mHardware.GetNetworkProtocol(); }
void SetSimulatorFrequency ( double pFrequency ) { mHardware.SetSimulatorFrequency( pFrequency ); }
double GetSimulatorFrequency () { return mHardware.GetSimulatorFrequency(); }
void SetSimulatorAmplitude ( double pAmplitude ) { mHardware.SetSimulatorAmplitude( pAmplitude ); }
double GetSimulatorAmplitude () { return mHardware.GetSimulatorAmplitude(); }
void SetSimulatorZoom ( double pZoom ) { mHardware.SetSimulatorZoom( pZoom ); }
double GetSimulatorZoom () { return mHardware.GetSimulatorZoom(); }
void SetSimulatorFocus ( double pFocus ) { mHardware.SetSimulatorFocus( pFocus ); }
double GetSimulatorFocus () { return mHardware.GetSimulatorFocus(); }
void SetSharedMemoryHandle( const char* pHandle ) { mHardware.SetSharedMemoryHandle( pHandle ); }
const char* GetSharedMemoryHandle() { return mHardware.GetSharedMemoryHandle(); }
void SetSharedMemoryAddress( kReference pAddr) { mHardware.SetSharedMemoryAddress( pAddr ); }
kReference GetSharedMemoryAddress() { return mHardware.GetSharedMemoryAddress(); }
virtual void DeviceCameraRecordFrame( FBTime &pRecordTime, FBDeviceNotifyInfo& pNotifyInfo, ORDeviceCamera_Template_Packet* pPacket );
private:
FBSystem mSystem;
FBPlayerControl mPlayerControl;
ORDeviceCamera_Template_Hardware mHardware;
FBAnimationNode* mNodeCamera_InData;
bool mFirstPacket;
FBTime mRecordStartTime;
FBTime mFirstPacketTime;
};
#endif