Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR::SensorDeviceImpl Class Reference

#include "OVR_SensorImpl.h"

Inheritance diagram for OVR::SensorDeviceImpl:
Inheritance graph
Collaboration diagram for OVR::SensorDeviceImpl:
Collaboration graph

Public Member Functions

 SensorDeviceImpl (SensorDeviceCreateDesc *createDesc)
 
 ~SensorDeviceImpl ()
 
virtual bool Initialize (DeviceBase *parent)
 
virtual void Shutdown ()
 
virtual void AddMessageHandler (MessageHandler *handler)
 
virtual void OnInputReport (UByte *pData, UInt32 length)
 
virtual double OnTicks (double tickSeconds)
 
virtual void SetCoordinateFrame (CoordinateFrame coordframe)
 
virtual CoordinateFrame GetCoordinateFrame () const
 
virtual bool SetRange (const SensorRange &range, bool waitFlag)
 
virtual void GetRange (SensorRange *range) const
 
virtual void GetFactoryCalibration (Vector3f *AccelOffset, Vector3f *GyroOffset, Matrix4f *AccelMatrix, Matrix4f *GyroMatrix, float *Temperature)
 
virtual void SetOnboardCalibrationEnabled (bool enabled)
 
virtual bool IsMagCalibrated ()
 
virtual void SetReportRate (unsigned rateHz)
 
virtual unsigned GetReportRate () const
 
bool SetSerialReport (const SerialReport &data)
 
bool GetSerialReport (SerialReport *data)
 
virtual bool SetMagCalibrationReport (const MagCalibrationReport &data)
 
virtual bool GetMagCalibrationReport (MagCalibrationReport *data)
 
- Public Member Functions inherited from OVR::HIDDeviceImpl< OVR::SensorDevice >
 HIDDeviceImpl (HIDDeviceCreateDesc *createDesc, DeviceBase *parent)
 
virtual void OnDeviceMessage (HIDDeviceMessageType messageType)
 
DeviceManagerGetDeviceManager ()
 
HIDDeviceManagerGetHIDDeviceManager ()
 
bool SetFeatureReport (UByte *data, UInt32 length)
 
bool setFeatureReport (UByte *data, UInt32 length)
 
bool GetFeatureReport (UByte *data, UInt32 length)
 
bool getFeatureReport (UByte *data, UInt32 length)
 
UByte GetDeviceInterfaceVersion ()
 
- Public Member Functions inherited from OVR::DeviceImpl< OVR::SensorDevice >
 DeviceImpl (DeviceCreateDesc *createDesc, DeviceBase *parent)
 
DeviceManagerImplGetManagerImpl () const
 
DeviceImplgetThis ()
 
virtual DeviceCommongetDeviceCommon () const
 
- Public Member Functions inherited from OVR::SensorDevice
 SensorDevice ()
 
virtual DeviceType GetType () const
 
virtual void SetCoordinateFrame (CoordinateFrame coordframe)=0
 
virtual bool SetTrackingReport (const TrackingReport &)
 
virtual bool GetTrackingReport (TrackingReport *)
 
virtual bool SetDisplayReport (const DisplayReport &)
 
virtual bool GetDisplayReport (DisplayReport *)
 
virtual bool SetPositionCalibrationReport (const PositionCalibrationReport &)
 
virtual bool GetAllPositionCalibrationReports (Array< PositionCalibrationReport > *)
 
virtual bool SetCustomPatternReport (const CustomPatternReport &)
 
virtual bool GetCustomPatternReport (CustomPatternReport *)
 
virtual bool SetKeepAliveMuxReport (const KeepAliveMuxReport &)
 
virtual bool GetKeepAliveMuxReport (KeepAliveMuxReport *)
 
virtual bool SetManufacturingReport (const ManufacturingReport &)
 
virtual bool GetManufacturingReport (ManufacturingReport *)
 
virtual bool SetUUIDReport (const UUIDReport &)
 
virtual bool GetUUIDReport (UUIDReport *)
 
virtual bool SetTemperatureReport (const TemperatureReport &)
 
virtual bool GetAllTemperatureReports (Array< Array< TemperatureReport > > *)
 
virtual bool GetGyroOffsetReport (GyroOffsetReport *)
 
virtual bool SetLensDistortionReport (const LensDistortionReport &)
 
virtual bool GetLensDistortionReport (LensDistortionReport *)
 
- Public Member Functions inherited from OVR::HIDDeviceBase
virtual ~HIDDeviceBase ()
 
- Public Member Functions inherited from OVR::DeviceBase
virtual ~DeviceBase ()
 
virtual void AddRef ()
 
virtual void Release ()
 
virtual DeviceBaseGetParent () const
 
virtual DeviceManagerGetManager () const
 
virtual bool GetDeviceInfo (DeviceInfo *info) const
 
virtual bool IsConnected ()
 
LockGetHandlerLock () const
 
- Public Member Functions inherited from OVR::DeviceCommon
 DeviceCommon (DeviceCreateDesc *createDesc, DeviceBase *device, DeviceBase *parent)
 
virtual ~DeviceCommon ()
 
void DeviceAddRef ()
 
void DeviceRelease ()
 
LockGetLock () const
 

Static Public Member Functions

static void EnumerateHMDFromSensorDisplayInfo (const SensorDisplayInfoImpl &displayInfo, DeviceFactory::EnumerateVisitor &visitor)
 

Protected Member Functions

virtual void openDevice ()
 
void closeDeviceOnError ()
 
Void setCoordinateFrame (CoordinateFrame coordframe)
 
bool setRange (const SensorRange &range)
 
Void setReportRate (unsigned rateHz)
 
Void setOnboardCalibrationEnabled (bool enabled)
 
bool setSerialReport (const SerialReport &data)
 
bool getSerialReport (SerialReport *data)
 
void onTrackerMessage (TrackerMessage *message)
 
bool decodeTrackerMessage (TrackerMessage *message, UByte *buffer, int size)
 
- Protected Member Functions inherited from OVR::HIDDeviceImpl< OVR::SensorDevice >
HIDDeviceGetInternalDevice () const
 
HIDDeviceDescgetHIDDesc () const
 
HIDDeviceCreateDescgetCreateDesc () const
 

Protected Attributes

CoordinateFrame Coordinates
 
CoordinateFrame HWCoordinates
 
double NextKeepAliveTickSeconds
 
bool SequenceValid
 
UInt16 LastTimestamp
 
UByte LastSampleCount
 
float LastTemperature
 
Vector3f LastAcceleration
 
Vector3f LastRotationRate
 
Vector3f LastMagneticField
 
UInt32 FullTimestamp
 
SensorRange MaxValidRange
 
SensorRange CurrentRange
 
Vector3f AccelCalibrationOffset
 
Vector3f GyroCalibrationOffset
 
Matrix4f AccelCalibrationMatrix
 
Matrix4f GyroCalibrationMatrix
 
float CalibrationTemperature
 
UInt16 OldCommandId
 
SensorTimeFilter TimeFilter
 
double PrevAbsoluteTime
 

Private Attributes

Matrix4f magCalibration
 
bool magCalibrated
 

Additional Inherited Members

- Public Types inherited from OVR::SensorDevice
enum  { EnumDeviceType = Device_Sensor }
 
enum  CoordinateFrame { Coord_Sensor = 0, Coord_HMD = 1 }
 
- Public Types inherited from OVR::DeviceBase
enum  { EnumDeviceType = Device_All }
 
- Public Types inherited from OVR::HIDDevice::HIDHandler
enum  HIDDeviceMessageType { HIDDeviceMessage_DeviceAdded = 0, HIDDeviceMessage_DeviceRemoved = 1 }
 
- Data Fields inherited from OVR::DeviceCommon
AtomicInt< UInt32RefCount
 
Ptr< DeviceCreateDescpCreateDesc
 
Ptr< DeviceBasepParent
 
volatile bool ConnectedFlag
 
MessageHandlerRef HandlerRef
 

Detailed Description

Definition at line 188 of file OVR_SensorImpl.h.

Constructor & Destructor Documentation

OVR::SensorDeviceImpl::SensorDeviceImpl ( SensorDeviceCreateDesc createDesc)

Definition at line 303 of file OVR_SensorImpl.cpp.

OVR::SensorDeviceImpl::~SensorDeviceImpl ( )

Definition at line 325 of file OVR_SensorImpl.cpp.

Member Function Documentation

void OVR::SensorDeviceImpl::AddMessageHandler ( MessageHandler handler)
virtual

Reimplemented from OVR::DeviceBase.

Definition at line 611 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::closeDeviceOnError ( )
protected

Definition at line 398 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::decodeTrackerMessage ( TrackerMessage message,
UByte buffer,
int  size 
)
protected

Definition at line 666 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo ( const SensorDisplayInfoImpl displayInfo,
DeviceFactory::EnumerateVisitor visitor 
)
static

Definition at line 36 of file OVR_Linux_SensorDevice.cpp.

SensorDevice::CoordinateFrame OVR::SensorDeviceImpl::GetCoordinateFrame ( ) const
virtual

Implements OVR::SensorDevice.

Definition at line 492 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::GetFactoryCalibration ( Vector3f AccelOffset,
Vector3f GyroOffset,
Matrix4f AccelMatrix,
Matrix4f GyroMatrix,
float *  Temperature 
)
virtual

Implements OVR::SensorDevice.

Definition at line 568 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::GetMagCalibrationReport ( MagCalibrationReport data)
virtual

Reimplemented from OVR::SensorDevice.

Reimplemented in OVR::Sensor2DeviceImpl.

Definition at line 996 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::GetRange ( SensorRange range) const
virtual

Implements OVR::SensorDevice.

Definition at line 465 of file OVR_SensorImpl.cpp.

unsigned OVR::SensorDeviceImpl::GetReportRate ( ) const
virtual

Implements OVR::SensorDevice.

Definition at line 534 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::GetSerialReport ( SerialReport data)
virtual

Reimplemented from OVR::SensorDevice.

Definition at line 1140 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::getSerialReport ( SerialReport data)
protected

Definition at line 1152 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::Initialize ( DeviceBase parent)
virtual

Reimplemented from OVR::HIDDeviceImpl< OVR::SensorDevice >.

Definition at line 333 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::IsMagCalibrated ( )
virtual

Reimplemented from OVR::SensorDevice.

Definition at line 579 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::OnInputReport ( UByte pData,
UInt32  length 
)
virtual

Reimplemented from OVR::HIDDevice::HIDHandler.

Reimplemented in OVR::Sensor2DeviceImpl.

Definition at line 411 of file OVR_SensorImpl.cpp.

double OVR::SensorDeviceImpl::OnTicks ( double  tickSeconds)
virtual

Reimplemented from OVR::HIDDevice::HIDHandler.

Reimplemented in OVR::Sensor2DeviceImpl.

Definition at line 426 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::onTrackerMessage ( TrackerMessage message)
protected

Definition at line 690 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::openDevice ( )
protectedvirtual

Reimplemented in OVR::Sensor2DeviceImpl.

Definition at line 344 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::SetCoordinateFrame ( CoordinateFrame  coordframe)
virtual

Definition at line 485 of file OVR_SensorImpl.cpp.

Void OVR::SensorDeviceImpl::setCoordinateFrame ( CoordinateFrame  coordframe)
protected

Definition at line 497 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::SetMagCalibrationReport ( const MagCalibrationReport data)
virtual

Reimplemented from OVR::SensorDevice.

Reimplemented in OVR::Sensor2DeviceImpl.

Definition at line 854 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::SetOnboardCalibrationEnabled ( bool  enabled)
virtual

Implements OVR::SensorDevice.

Definition at line 584 of file OVR_SensorImpl.cpp.

Void OVR::SensorDeviceImpl::setOnboardCalibrationEnabled ( bool  enabled)
protected

Definition at line 591 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::SetRange ( const SensorRange range,
bool  waitFlag 
)
virtual

Implements OVR::SensorDevice.

Definition at line 444 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::setRange ( const SensorRange range)
protected

Definition at line 471 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::SetReportRate ( unsigned  rateHz)
virtual

Implements OVR::SensorDevice.

Definition at line 527 of file OVR_SensorImpl.cpp.

Void OVR::SensorDeviceImpl::setReportRate ( unsigned  rateHz)
protected

Definition at line 546 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::SetSerialReport ( const SerialReport data)
virtual

Reimplemented from OVR::SensorDevice.

Definition at line 1122 of file OVR_SensorImpl.cpp.

bool OVR::SensorDeviceImpl::setSerialReport ( const SerialReport data)
protected

Definition at line 1134 of file OVR_SensorImpl.cpp.

void OVR::SensorDeviceImpl::Shutdown ( )
virtual

Reimplemented from OVR::HIDDeviceImpl< OVR::SensorDevice >.

Definition at line 404 of file OVR_SensorImpl.cpp.

Field Documentation

Matrix4f OVR::SensorDeviceImpl::AccelCalibrationMatrix
protected

Definition at line 295 of file OVR_SensorImpl.h.

Vector3f OVR::SensorDeviceImpl::AccelCalibrationOffset
protected

Definition at line 293 of file OVR_SensorImpl.h.

float OVR::SensorDeviceImpl::CalibrationTemperature
protected

Definition at line 297 of file OVR_SensorImpl.h.

CoordinateFrame OVR::SensorDeviceImpl::Coordinates
protected

Definition at line 273 of file OVR_SensorImpl.h.

SensorRange OVR::SensorDeviceImpl::CurrentRange
protected

Definition at line 290 of file OVR_SensorImpl.h.

UInt32 OVR::SensorDeviceImpl::FullTimestamp
protected

Definition at line 286 of file OVR_SensorImpl.h.

Matrix4f OVR::SensorDeviceImpl::GyroCalibrationMatrix
protected

Definition at line 296 of file OVR_SensorImpl.h.

Vector3f OVR::SensorDeviceImpl::GyroCalibrationOffset
protected

Definition at line 294 of file OVR_SensorImpl.h.

CoordinateFrame OVR::SensorDeviceImpl::HWCoordinates
protected

Definition at line 274 of file OVR_SensorImpl.h.

Vector3f OVR::SensorDeviceImpl::LastAcceleration
protected

Definition at line 281 of file OVR_SensorImpl.h.

Vector3f OVR::SensorDeviceImpl::LastMagneticField
protected

Definition at line 283 of file OVR_SensorImpl.h.

Vector3f OVR::SensorDeviceImpl::LastRotationRate
protected

Definition at line 282 of file OVR_SensorImpl.h.

UByte OVR::SensorDeviceImpl::LastSampleCount
protected

Definition at line 279 of file OVR_SensorImpl.h.

float OVR::SensorDeviceImpl::LastTemperature
protected

Definition at line 280 of file OVR_SensorImpl.h.

UInt16 OVR::SensorDeviceImpl::LastTimestamp
protected

Definition at line 278 of file OVR_SensorImpl.h.

bool OVR::SensorDeviceImpl::magCalibrated
private

Definition at line 311 of file OVR_SensorImpl.h.

Matrix4f OVR::SensorDeviceImpl::magCalibration
private

Definition at line 310 of file OVR_SensorImpl.h.

SensorRange OVR::SensorDeviceImpl::MaxValidRange
protected

Definition at line 289 of file OVR_SensorImpl.h.

double OVR::SensorDeviceImpl::NextKeepAliveTickSeconds
protected

Definition at line 275 of file OVR_SensorImpl.h.

UInt16 OVR::SensorDeviceImpl::OldCommandId
protected

Definition at line 299 of file OVR_SensorImpl.h.

double OVR::SensorDeviceImpl::PrevAbsoluteTime
protected

Definition at line 302 of file OVR_SensorImpl.h.

bool OVR::SensorDeviceImpl::SequenceValid
protected

Definition at line 277 of file OVR_SensorImpl.h.

SensorTimeFilter OVR::SensorDeviceImpl::TimeFilter
protected

Definition at line 301 of file OVR_SensorImpl.h.


The documentation for this class was generated from the following files: