Public Types | Public Member Functions | Public Attributes | Friends

FBDevice Class Reference

This reference page is linked to from the following overview topics: Your First Python Program, Threading, Motion Capture Devices, Optical devices, Device layouts.


Search for all occurrences

Detailed Description

Base Device class. Cannot be instantiated from Python.

Definition at line 726 of file fbcore.h.

#include <fbcore.h>

Inheritance diagram for FBDevice:
Inheritance graph
[legend]

List of all members.

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, kPlayReverse
}
 

Transport control types for device.

More...

Public Member Functions

 FBDevice (const char *pName, HIObject pObject=NULL)
 Constructor.
virtual bool FBCreate ()
 Open Reality Creation function.
virtual void FBDestroy ()
 Open Reality destruction function.
virtual FBAnimationNodeAnimationNodeInCreate (kReference pUserId, const char *pName, const char *pDataType, bool pIsPublic=true, double *pMin=NULL, double *pMax=NULL, bool pUserData=false)
 Creation of IN/OUT Animation Nodes.
virtual FBAnimationNodeAnimationNodeOutCreate (kReference pUserId, const char *pName, const char *pDataType, bool pIsPublic=true, double *pMin=NULL, double *pMax=NULL, bool pUserData=false)
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, FBEvaluateInfo *pEvaluateInfo)
 Real-Time engine thread: Output device evaluation.
virtual bool ModelTemplateBindNotify (FBModel *pModel, int pIndex, FBModelTemplate *pModelTemplate)
 Model Template binding notification callback.
virtual bool ModelTemplateUnBindNotify (int pIndex, FBModelTemplate *pModelTemplate)
 Model Template unbinding notification callback.
FBModelModelBindingCreate ()
 Create a new model binding.
void ModelBindingRootsList (FBModelList &pList)
 Get the list of all the possible root models for binding.
virtual bool AnimationNodeNotify (FBAnimationNode *pAnimationNode, FBEvaluateInfo *pEvaluateInfo) override
 Notification function for animation thread.
virtual const char * FbxGetObjectType () override
 Object Type "Device".
virtual void DeviceSendCommand (kDeviceOperations pOperation)
 Send a command to the device.
 IObject_Declare (K_IMPLEMENTATION)
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 (FBAnimationNode *pAnimationNode)
 When recording, initialize animation.
virtual void RecordingDoneAnimation (FBAnimationNode *pAnimationNode)
 When recording, finish animation.
virtual bool FbxStore (FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat) override
 Storage/Retrieval of information into the FBX file format.
virtual bool FbxRetrieve (FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat) override

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: Set this to how many times a device is to be evaluated in one second.
FBPropertyBool Online
 Read Write Property: Is online?
FBPropertyEvent OnStatusChange
 Event: Status of device changed.
FBModelTemplate ModelTemplate
 Component: Root of model template structure.
FBPropertyModel ModelBindingRoot
 Component: Root of model currently binded model hierarchy.
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.

Friends

class __FBDevice
class DataFBDeviceOptical

Member Enumeration Documentation

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 732 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 744 of file fbcore.h.

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.

kPlayReverse 

Playing Reverse.

Definition at line 754 of file fbcore.h.


Constructor & Destructor Documentation

FBDevice ( const char *  pName,
HIObject  pObject = NULL 
)

Constructor.

Parameters:
pNameName of device.
pObjectFor 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 FBAnimationNode* AnimationNodeInCreate ( kReference  pUserId,
const char *  pName,
const char *  pDataType,
bool  pIsPublic = true,
double *  pMin = NULL,
double *  pMax = NULL,
bool  pUserData = false 
) [virtual]

Creation of IN/OUT Animation Nodes.

Parameters:
pUserIdUser-defined reference number.
pNameName of animation node.
pDataTypeType of data being animated.
pIsPublicDetermine if the animation node is published, that means whether to show it in property editor and have input / output in relation constraints editor (default is false).
pMinMinimum values for data (default is NULL).
pMaxMaximum values for data (default is NULL).
pUserDataIs this user data? False means the property is NOT animated, user cannot change the data. Especially for device, it doesn't make sense to make it animated, unless you want to record the device data. (default is false).
Returns:
A handle to the newly created animation node.

Reimplemented from FBBox.

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

Reimplemented from FBBox.

virtual bool DeviceOperation ( kDeviceOperations  pOperation) [virtual]

Operate device.

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

Parameters:
pOperationOperation 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:
pModeTransport mode.
pTimeLocal time.
pSystemSystem 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:
pActionDifferent reading/writing actions for the device.
pDeviceNotifyInfoAccess to the system and local time.

Reimplemented in FBDeviceOptical, and FBDeviceCamera.

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

Real-Time engine thread: Output device evaluation.

Parameters:
pModeTransport mode.
pEvaluateInfoAccess to the system and local time.
Returns:
true if successful.
virtual bool ModelTemplateBindNotify ( FBModel pModel,
int  pIndex,
FBModelTemplate pModelTemplate 
) [virtual]

Model Template binding notification callback.

Parameters:
pModelModel being bound to model template.
pIndexIndex of model template where binding is occuring.
pModelTemplateModel being affected with binding.
Returns:
true if successful.

Reimplemented in FBDeviceCamera.

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

Model Template unbinding notification callback.

Parameters:
pIndexIndex in pModelTemplate where unbinding has occured.
pModelTemplateModel template from which binding is removed.
Returns:
true if successful.
FBModel* ModelBindingCreate ( )

Create a new model binding.

Returns:
The model root that has been created or NULL is an error occured.
void ModelBindingRootsList ( FBModelList pList)

Get the list of all the possible root models for binding.

Return values:
pListList to add found models to.
virtual bool AnimationNodeNotify ( FBAnimationNode pAnimationNode,
FBEvaluateInfo pEvaluateInfo 
) [override, virtual]

Notification function for animation thread.

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

Parameters:
pAnimationNodeNode containing the modified information.
pEvaluateInfoInformation 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 const char* FbxGetObjectType ( ) [override, virtual]

Object Type "Device".

Reimplemented from FBBox.

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

Storage/Retrieval of information into the FBX file format.

Parameters:
pFbxObjectObject to interface with FBX file format.
pStoreWhatAttributes to store in FBX file.
Returns:
true if successful.

Reimplemented from FBBox.

Reimplemented in FBDeviceOptical, FBDeviceSync, and FBDeviceCamera.

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

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:
pOperationOperation for device to perform.
IObject_Declare ( K_IMPLEMENTATION  )

Reimplemented from FBBox.

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 ( FBAnimationNode pAnimationNode) [virtual]

When recording, initialize animation.

Parameters:
pAnimationNodeAnimation node to read information from.

Reimplemented in FBDeviceGlove, FBDeviceOptical, and FBDeviceCamera.

virtual void RecordingDoneAnimation ( FBAnimationNode pAnimationNode) [virtual]

When recording, finish animation.

Parameters:
pAnimationNodeAnimation node to write information to.

Reimplemented in FBDeviceGlove, FBDeviceOptical, and FBDeviceCamera.


Friends And Related Function Documentation

friend class __FBDevice [friend]

Definition at line 900 of file fbcore.h.

friend class DataFBDeviceOptical [friend]

Definition at line 901 of file fbcore.h.


Member Data Documentation

Read Write Property: Icon filename.

Definition at line 861 of file fbcore.h.

Read Write Property: Device information: status.

Definition at line 862 of file fbcore.h.

Read Write Property: Device information: information.

Definition at line 863 of file fbcore.h.

Read Write Property: Device information: hardware version.

Definition at line 864 of file fbcore.h.

Read Write Property: Set this to how many times a device is to be evaluated in one second.

There is no theoretical maximum value but practically you should consider scene complexity, system resources, network speed, etc. If set to 0: the device is evaluated on the sync signal. When the sync occurs; the device is scheduled to be evaluated. If you do not set, the sampling period is based on the internal variable from the [Sync] section of the .Application.txt file (NTSC, PAL, CINEMA).

Definition at line 865 of file fbcore.h.

Read Write Property: Is online?

Definition at line 866 of file fbcore.h.

Event: Status of device changed.

Definition at line 868 of file fbcore.h.

Component: Root of model template structure.

Definition at line 870 of file fbcore.h.

FBPropertyModel ModelBindingRoot

Component: Root of model currently binded model hierarchy.

Definition at line 871 of file fbcore.h.

FBPropertyDeviceSamplingMode SamplingMode

Read Write Property: Mode to use to record device.

Definition at line 873 of file fbcore.h.

Read Write Property: Type of communications.

Definition at line 874 of file fbcore.h.

List: List of instruments.

Definition at line 876 of file fbcore.h.

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

Definition at line 878 of file fbcore.h.

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

Definition at line 879 of file fbcore.h.


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

FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice
FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice FBDevice