FBDevice Class Reference


Detailed Description

Base Device class.

Cannot be instantiated from Python.

Examples
Tasks/StartDevice.py, Tasks/StopDevice.py
Inheritance diagram for FBDevice:

List of all members.

Public Member Functions

bool FbxStore (FBFbxObject pFbxObject, kFbxObjectStore pStoreWhat)
 Storage/Retrieval of information into the FBX file format.
bool FbxRetrieve (FBFbxObject pFbxObject, kFbxObjectStore pStoreWhat)
 __init__ (str pName, object pObject=None)
 Constructor.
bool FBCreate ()
 Open Reality Creation function.
 FBDestroy ()
 Open Reality destruction function.
FBAnimationNode AnimationNodeInCreate (uintptr_t pUserId, str pName, str pDataType, bool pIsPublic=True, float pMin=None, float pMax=None, bool pUserData=False)
 Creation of IN/OUT Animation Nodes.
FBAnimationNode AnimationNodeOutCreate (uintptr_t pUserId, str pName, str pDataType, bool pIsPublic=True, float pMin=None, float pMax=None, bool pUserData=False)
bool DeviceOperation (kDeviceOperations pOperation)
 Operate device.
 DeviceTransportNotify (kTransportMode pMode, FBTime pTime, FBTime pSystem)
 Real-Time engine thread: Tranport notifications.
 DeviceIONotify (kDeviceIOs pAction, FBDeviceNotifyInfo pDeviceNotifyInfo)
 Real-Time engine thread: Device I/O.
bool DeviceEvaluationNotify (kTransportMode pMode, FBEvaluateInfo pEvaluateInfo)
 Real-Time engine thread: Output device evaluation.
bool ModelTemplateBindNotify (FBModel pModel, int pIndex, FBModelTemplate pModelTemplate)
 Model Template binding notification callback.
bool ModelTemplateUnBindNotify (int pIndex, FBModelTemplate pModelTemplate)
 Model Template unbinding notification callback.
FBModel ModelBindingCreate ()
 Create a new model binding.
 ModelBindingRootsList (tuple pList)
 Get the list of all the possible root models for binding.
bool AnimationNodeNotify (FBAnimationNode pAnimationNode, FBEvaluateInfo pEvaluateInfo)
 Notification function for animation thread.
str FbxGetObjectType ()
 Object Type "Device".
 DeviceSendCommand (kDeviceOperations pOperation)
 Send a command to the device.
 IObject_Declare (K_IMPLEMENTATION)
 AckOneSampleReceived ()
 Acknowlege that one sample was received (for statistical purposes).
 AckOneBadSampleReceived ()
 Acknowlege that one bad sample was received (for statistical purposes).
 AckOneSampleSent ()
 Acknowlege that one sample was sent (for statistical purposes).
 RecordingInitAnimation (FBAnimationNode pAnimationNode)
 When recording, initialize animation.
 RecordingDoneAnimation (FBAnimationNode pAnimationNode)
 When recording, finish animation.

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.
FBPropertyBase SamplingPeriod
 Read Write Property: Set this to how many times a device is to be evaluated in one second.
FBPropertyBase 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.
FBPropertyBase CommType
 Read Write Property: Type of communications.
FBPropertyListDeviceInstrument Instruments
 List: List of instruments.
FBPropertyBase RecordingStartTime
 Read Only Property: The time at which the recording started.
FBPropertyBase RecordingStopTime
 Read Only Property: The time at which the recording stopped.

Member Function Documentation

bool FbxStore ( FBFbxObject  pFbxObject,
kFbxObjectStore  pStoreWhat 
)

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.

bool FbxRetrieve ( FBFbxObject  pFbxObject,
kFbxObjectStore  pStoreWhat 
)

Reimplemented from FBBox.

Reimplemented in FBDeviceOptical.

__init__ ( str  pName,
object  pObject = None 
)

Constructor.

Parameters:
pNameName of device.
pObjectFor internal use only (default is NULL).
Examples
Tasks/StartDevice.py, Tasks/StopDevice.py

Reimplemented from FBBox.

Reimplemented in FBDeviceOptical.

bool FBCreate ( )

Open Reality Creation function.

Returns:
Outcome of creation (true/false).

Reimplemented from FBComponent.

Reimplemented in FBDeviceOptical.

FBDestroy ( )

Open Reality destruction function.

Reimplemented from FBComponent.

Reimplemented in FBDeviceOptical.

FBAnimationNode AnimationNodeInCreate ( uintptr_t  pUserId,
str  pName,
str  pDataType,
bool  pIsPublic = True,
float  pMin = None,
float  pMax = None,
bool  pUserData = False 
)

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.

FBAnimationNode AnimationNodeOutCreate ( uintptr_t  pUserId,
str  pName,
str  pDataType,
bool  pIsPublic = True,
float  pMin = None,
float  pMax = None,
bool  pUserData = False 
)

Reimplemented from FBBox.

bool DeviceOperation ( kDeviceOperations  pOperation)

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.

DeviceTransportNotify ( kTransportMode  pMode,
FBTime  pTime,
FBTime  pSystem 
)

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.
DeviceIONotify ( kDeviceIOs  pAction,
FBDeviceNotifyInfo  pDeviceNotifyInfo 
)

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.

bool DeviceEvaluationNotify ( kTransportMode  pMode,
FBEvaluateInfo  pEvaluateInfo 
)

Real-Time engine thread: Output device evaluation.

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

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.
bool ModelTemplateUnBindNotify ( int  pIndex,
FBModelTemplate  pModelTemplate 
)

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.
ModelBindingRootsList ( tuple  pList)

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

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

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.

str FbxGetObjectType ( )

Object Type "Device".

Reimplemented from FBBox.

DeviceSendCommand ( kDeviceOperations  pOperation)

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.

AckOneSampleReceived ( )

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

AckOneBadSampleReceived ( )

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

AckOneSampleSent ( )

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

RecordingInitAnimation ( FBAnimationNode  pAnimationNode)

When recording, initialize animation.

Parameters:
pAnimationNodeAnimation node to read information from.

Reimplemented in FBDeviceOptical.

RecordingDoneAnimation ( FBAnimationNode  pAnimationNode)

When recording, finish animation.

Parameters:
pAnimationNodeAnimation node to write information to.

Reimplemented in FBDeviceOptical.


Member Data Documentation

Read Write Property: Icon filename.

Read Write Property: Device information: status.

Read Write Property: Device information: information.

Read Write Property: Device information: hardware version.

FBPropertyBase SamplingPeriod

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).

FBPropertyBase Online

Read Write Property: Is online?.

FBPropertyEvent OnStatusChange

Event: Status of device changed.

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.

FBPropertyBase CommType

Read Write Property: Type of communications.

FBPropertyBase RecordingStartTime

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

FBPropertyBase RecordingStopTime

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


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