FBDevice Class Reference

#include <fbcore.h>
FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice
Inheritance diagram for FBDevice:
Inheritance graph
[legend]

List of all members.


Detailed Description

Base Device class.

Definition at line 668 of file fbcore.h.


Public Types

enum   kDeviceOperations {
   kOpInit,
   kOpStart,
   kOpAutoDetect,
   kOpStop,
   kOpReset,
   kOpDone
}
  Types of operations for device. More...
enum   kDeviceIOs {
   kIOStopModeRead,
   kIOPlayModeRead,
   kIOStopModeWrite,
   kIOPlayModeWrite
}
  Types of I/O for device. More...
enum   kTransportMode {
   kPreparePlay,
   kPlayReady,
   kPlayStop,
   kStop,
   kPlay,
   kJog
}
  Transport control types for device. More...

Public Member Functions

  FBDevice (char *pName, HIObject pObject=NULL)
  Constructor.
virtual bool  FBCreate ()
  Open Reality Creation function.
virtual void  FBDestroy ()
  Open Reality destruction function.
virtual HFBAnimationNode  AnimationNodeInCreate (kReference pUserId, char *pName, char *pDataType, bool pIsPublic=true, double *pMin=NULL, double *pMax=NULL, bool pUserData=false)
  Creation of IN/OUT Animation Nodes.
virtual HFBAnimationNode  AnimationNodeOutCreate (kReference pUserId, char *pName, char *pDataType, bool pIsPublic=true, double *pMin=NULL, double *pMax=NULL, bool pUserData=false)
  Creation of IN/OUT Animation Nodes.
virtual bool  DeviceOperation (kDeviceOperations pOperation)
  Operate device.
virtual void  DeviceTransportNotify (kTransportMode pMode, FBTime pTime, FBTime pSystem)
  Real-Time engine thread: Tranport notifications.
virtual void  DeviceIONotify (kDeviceIOs pAction, FBDeviceNotifyInfo &pDeviceNotifyInfo)
  Real-Time engine thread: Device I/O.
virtual bool  DeviceEvaluationNotify (kTransportMode pMode, HFBEvaluateInfo pEvaluateInfo)
  Real-Time engine thread: Output device evaluation.
virtual bool  ModelTemplateBindNotify (HFBModel pModel, int pIndex, HFBModelTemplate pModelTemplate)
  Model Template binding notification callback.
virtual bool  ModelTemplateUnBindNotify (int pIndex, HFBModelTemplate pModelTemplate)
  Model Template unbinding notification callback.
virtual bool  AnimationNodeNotify (HFBAnimationNode pAnimationNode, HFBEvaluateInfo pEvaluateInfo) override
  Notification function for animation thread.
virtual char *  FbxGetObjectType () override
  Object Type "Device".
virtual void  DeviceSendCommand (kDeviceOperations pOperation)
  Send a command to the device.
void  AckOneSampleReceived ()
  Acknowlege that one sample was received (for statistical purposes).
void  AckOneBadSampleReceived ()
  Acknowlege that one bad sample was received (for statistical purposes).
void  AckOneSampleSent ()
  Acknowlege that one sample was sent (for statistical purposes).
virtual void  RecordingInitAnimation (HFBAnimationNode pAnimationNode)
  When recording, initialize animation.
virtual void  RecordingDoneAnimation (HFBAnimationNode pAnimationNode)
  When recording, finish animation.
virtual bool  FbxStore (HFBFbxObject pFbxObject, kFbxObjectStore pStoreWhat) override
  Storage/Retrieval of information into the FBX file format.
virtual bool  FbxRetrieve (HFBFbxObject pFbxObject, kFbxObjectStore pStoreWhat) override
  Storage/Retrieval of information into the FBX file format.

Public Attributes

FBPropertyString  IconFilename
  Read Write Property: Icon filename.
FBPropertyString  Status
  Read Write Property: Device information: status.
FBPropertyString  Information
  Read Write Property: Device information: information.
FBPropertyString  HardwareVersionInfo
  Read Write Property: Device information: hardware version.
FBPropertyTime  SamplingPeriod
  Read Write Property: How often a device is evaluated in 1 second. If not set, the Period is based on the internal variable from the [Sync] section of the .Application.txt file (NTSC, PAL, CINEMA). If set to 0: the device is evaluated on the Sync signal. When the sync occurs; the device is schedule to be evaluated. There is no theoretical maximum value but practically you should consider Scene complexity, system resources, network speed, etc.
FBPropertyBool  Online
  Read Write Property: Is online?
FBPropertyEvent  OnStatusChange
  Event: Status of device changed.
FBModelTemplate  ModelTemplate
  Component: Root of model template structure.
FBPropertyDeviceSamplingMode  SamplingMode
  Read Write Property: Mode to use to record device.
FBPropertyInt  CommType
  Read Write Property: Type of communications.
FBPropertyListDeviceInstrument  Instruments
  List: List of instruments.
FBPropertyTime  RecordingStartTime
  Read Only Property: The time at which the recording started.
FBPropertyTime  RecordingStopTime
  Read Only Property: The time at which the recording stopped.

Member Enumeration Documentation

enum kDeviceOperations

Types of operations for device.

These are parameters for the DeviceSendCommand() function.

Enumerator:
kOpInit  Initalize device (creation).
kOpStart  Start device (online).
kOpAutoDetect  Autodetect (automatic).
kOpStop  Stop device (offline).
kOpReset  Reset device (stop->start).
kOpDone  Remove device (destruction).

Definition at line 674 of file fbcore.h.

enum kDeviceIOs

Types of I/O for device.

These are states of the engine for the DeviceIONotify callback.

Enumerator:
kIOStopModeRead  Read from device (Transport=stopped).
kIOPlayModeRead  Read from device (Transport=playing).
kIOStopModeWrite  Write to device (Transport=stopped).
kIOPlayModeWrite  Write to device (Transport=playing).

Definition at line 686 of file fbcore.h.

enum kTransportMode

Transport control types for device.

These are states of the engine for the DeviceEvaluationNofity callback.

Enumerator:
kPreparePlay  Preparing to play.
kPlayReady  Ready to play.
kPlayStop  Stopping play.
kStop  Play stopped.
kPlay  Playing.
kJog  Jog.

Definition at line 696 of file fbcore.h.


Constructor & Destructor Documentation

FBDevice ( char *  pName,
HIObject  pObject = NULL  
)

Constructor.

Parameters:
pName  Name of device.
pObject  For internal use only (default is NULL).

Member Function Documentation

virtual bool FBCreate (  )  [virtual]

Open Reality Creation function.

Returns:
Outcome of creation (true/false).

Reimplemented from FBComponent.

Reimplemented in FBDeviceOptical, FBDeviceSync, and FBDeviceCamera.

virtual void FBDestroy (  )  [virtual]

Open Reality destruction function.

Reimplemented from FBComponent.

Reimplemented in FBDeviceOptical, FBDeviceSync, and FBDeviceCamera.

virtual HFBAnimationNode AnimationNodeInCreate ( kReference  pUserId,
char *  pName,
char *  pDataType,
bool  pIsPublic = true,
double *  pMin = NULL,
double *  pMax = NULL,
bool  pUserData = false  
) [virtual]

Creation of IN/OUT Animation Nodes.

Parameters:
pUserId  User-defined reference number.
pName  Name of animation node.
pDataType  Type of data being animated.
pType  Determine if the animation node is published (default is true).
pMin  Minimum values for data (default is NuLL).
pMax  Maximum values for data (default is NULL).
pUserData  Is this user data? (default is false)
Returns:
A handle to the newly created animation node.

Reimplemented from FBBox.

virtual HFBAnimationNode AnimationNodeOutCreate ( kReference  pUserId,
char *  pName,
char *  pDataType,
bool  pIsPublic = true,
double *  pMin = NULL,
double *  pMax = NULL,
bool  pUserData = false  
) [virtual]

Creation of IN/OUT Animation Nodes.

Parameters:
pUserId  User-defined reference number.
pName  Name of animation node.
pDataType  Type of data being animated.
pType  Determine if the animation node is published (default is true).
pMin  Minimum values for data (default is NuLL).
pMax  Maximum values for data (default is NULL).
pUserData  Is this user data? (default is false)
Returns:
A handle to the newly created animation node.

Reimplemented from FBBox.

virtual bool DeviceOperation ( kDeviceOperations  pOperation  )  [virtual]

Operate device.

This is an operation such as Init, Start, Done, Reset, etc.

Parameters:
pOperation  Operation to have device perform.
Returns:
Current state : <b true if online.

Reimplemented in FBDeviceOptical.

virtual void DeviceTransportNotify ( kTransportMode  pMode,
FBTime  pTime,
FBTime  pSystem  
) [virtual]

Real-Time engine thread: Tranport notifications.

The device I/O thread calls this function when there is a transport change.

Parameters:
pMode  Transport mode.
pTime  Local time.
pSystem  System time.

virtual void DeviceIONotify ( kDeviceIOs  pAction,
FBDeviceNotifyInfo pDeviceNotifyInfo  
) [virtual]

Real-Time engine thread: Device I/O.

The device I/O thread calls this function (required) which is a highly optimized non-blocking function registering input/output information from/to the device.

Parameters:
pAction  Different reading/writing actions for the device.
pDeviceNotifyInfo  Access to the system and local time.

Reimplemented in FBDeviceOptical, and FBDeviceCamera.

virtual bool DeviceEvaluationNotify ( kTransportMode  pMode,
HFBEvaluateInfo  pEvaluateInfo  
) [virtual]

Real-Time engine thread: Output device evaluation.

Parameters:
pMode  Transport mode.
pEvaluateInfo  Access to the system and local time.
Returns:
true if successful.

virtual bool ModelTemplateBindNotify ( HFBModel  pModel,
int  pIndex,
HFBModelTemplate  pModelTemplate  
) [virtual]

Model Template binding notification callback.

Parameters:
pModel  Model being bound to model template.
pIndex  Index of model template where binding is occuring.
pModelTemplate  Model being affected with binding.
Returns:
true if successful.

Reimplemented in FBDeviceCamera.

virtual bool ModelTemplateUnBindNotify ( int  pIndex,
HFBModelTemplate  pModelTemplate  
) [virtual]

Model Template unbinding notification callback.

Parameters:
pIndex  Index in pModelTemplate where unbinding has occured.
pModelTemplate  Model template from which binding is removed.
Returns:
true if successful.

virtual bool AnimationNodeNotify ( HFBAnimationNode  pAnimationNode,
HFBEvaluateInfo  pEvaluateInfo  
) [override, virtual]

Notification function for animation thread.

This function is called by the real-time engine in order to process animation information.

Parameters:
pAnimationNode  Node containing the modified information.
pEvaluateInfo  Information concerning the evaluation of the animation (time, etc.)
Returns:
true if animation node notification is successful.

Reimplemented from FBBox.

Reimplemented in FBDeviceOptical, and FBDeviceSync.

virtual char* FbxGetObjectType (  )  [override, virtual]

Object Type "Device".

Reimplemented from FBBox.

virtual bool FbxStore ( HFBFbxObject  pFbxObject,
kFbxObjectStore  pStoreWhat  
) [override, virtual]

Storage/Retrieval of information into the FBX file format.

Parameters:
pFbxObject  Object to interface with FBX file format.
pStoreWhat  Attributes to store in FBX file.
Returns:
true if successful.

Reimplemented from FBBox.

Reimplemented in FBDeviceOptical, FBDeviceSync, and FBDeviceCamera.

virtual bool FbxRetrieve ( HFBFbxObject  pFbxObject,
kFbxObjectStore  pStoreWhat  
) [override, virtual]

Storage/Retrieval of information into the FBX file format.

Parameters:
pFbxObject  Object to interface with FBX file format.
pStoreWhat  Attributes to store in FBX file.
Returns:
true if successful.

Reimplemented from FBBox.

Reimplemented in FBDeviceOptical, FBDeviceSync, and FBDeviceCamera.

virtual void DeviceSendCommand ( kDeviceOperations  pOperation  )  [virtual]

Send a command to the device.

This function will send the Init, Start, etc. commands to the device.

Parameters:
pOperation  Operation for device to perform.

void AckOneSampleReceived (  ) 

Acknowlege that one sample was received (for statistical purposes).

void AckOneBadSampleReceived (  ) 

Acknowlege that one bad sample was received (for statistical purposes).

void AckOneSampleSent (  ) 

Acknowlege that one sample was sent (for statistical purposes).

virtual void RecordingInitAnimation ( HFBAnimationNode  pAnimationNode  )  [virtual]

When recording, initialize animation.

Parameters:
pAnimationNode  Animation node to read information from.

Reimplemented in FBDeviceGlove, FBDeviceOptical, and FBDeviceCamera.

virtual void RecordingDoneAnimation ( HFBAnimationNode  pAnimationNode  )  [virtual]

When recording, finish animation.

Parameters:
pAnimationNode  Animation node to write information to.

Reimplemented in FBDeviceGlove, FBDeviceOptical, and FBDeviceCamera.


Member Data Documentation

FBPropertyString IconFilename

Read Write Property: Icon filename.

Definition at line 792 of file fbcore.h.

FBPropertyString Status

Read Write Property: Device information: status.

Definition at line 793 of file fbcore.h.

FBPropertyString Information

Read Write Property: Device information: information.

Definition at line 794 of file fbcore.h.

FBPropertyString HardwareVersionInfo

Read Write Property: Device information: hardware version.

Definition at line 795 of file fbcore.h.

FBPropertyTime SamplingPeriod

Read Write Property: How often a device is evaluated in 1 second. If not set, the Period is based on the internal variable from the [Sync] section of the .Application.txt file (NTSC, PAL, CINEMA). If set to 0: the device is evaluated on the Sync signal. When the sync occurs; the device is schedule to be evaluated. There is no theoretical maximum value but practically you should consider Scene complexity, system resources, network speed, etc.

Definition at line 796 of file fbcore.h.

FBPropertyBool Online

Read Write Property: Is online?

Definition at line 797 of file fbcore.h.

FBPropertyEvent OnStatusChange

Event: Status of device changed.

Definition at line 799 of file fbcore.h.

FBModelTemplate ModelTemplate

Component: Root of model template structure.

Definition at line 801 of file fbcore.h.

FBPropertyDeviceSamplingMode SamplingMode

Read Write Property: Mode to use to record device.

Definition at line 803 of file fbcore.h.

FBPropertyInt CommType

Read Write Property: Type of communications.

Definition at line 804 of file fbcore.h.

FBPropertyListDeviceInstrument Instruments

List: List of instruments.

Definition at line 806 of file fbcore.h.

FBPropertyTime RecordingStartTime

Read Only Property: The time at which the recording started.

Definition at line 808 of file fbcore.h.

FBPropertyTime RecordingStopTime

Read Only Property: The time at which the recording stopped.

Definition at line 809 of file fbcore.h.


Please send us your comments about this page.