metaonly module ti.sdo.ce.Engine

Engine Configuration interface

XDCscript usage meta-domain sourced in ti/sdo/ce/Engine.xdc
var Engine = xdc.useModule('ti.sdo.ce.Engine');
module-wide constants & types
 
        obj.name// Alg nick-name = String  ...
        obj.mod// The alg implementation = ICodec.Module  ...
        obj.local// Run algorithm locally = Bool  ...
        obj.groupId// Alg group ID for sharing resources = Int  ...
module-wide config parameters
module-wide functions
    Engine.createFromServer// Create an Engine from a Server package(Any engineName, Any serverExecutable, Any serverPackage) returns Any
    Engine.getDspMemTableFromServer// Get a remote processor's memory table from a Server package(Any serverExecutable, Any serverPackage) returns Any
per-instance config parameters
    var params = new Engine.Params// Instance config-params object;
        params.heapId// Optional heap id to be used for this Engine = UInt32 undefined;
        params.name// Name of the Engine = String undefined;
        params.server// Optional name of a remote Server = String undefined;
per-instance creation
    var inst = Engine.create// Create an instance-object(String name, Engine.AlgDesc[] algs, params);
 
 
const Engine.MAXGROUPID

Maximum group id

XDCscript usage meta-domain
const Engine.MAXGROUPID = 20;
 
 
struct Engine.AlgDesc

Algorithm descriptor

XDCscript usage meta-domain
var obj = new Engine.AlgDesc;
 
    obj.name = String  ...
    // Alg nick-name
    obj.mod = ICodec.Module  ...
    // The alg implementation
    obj.local = Bool  ...
    // Run algorithm locally
    obj.groupId = Int  ...
    // Alg group ID for sharing resources
 
FIELDS
name — This string specifies the "local" name used by the application to identify the algorithm to instantiate
mod — This field is a module reference that identifies the actual module implementing the algorithm to instantiate
local — If true, the algorithm should be instantiated on the "local" CPU; otherwise the server will create an instance of the algorithm identifed by mod.
groupId — This id specifies which resource sharing group this codec will be placed into. This 'group' concept is used by the framework to ensure algorithms in the same group don't pre-empt each other and corrupt the shared resources.
Note that this parameter is ignored if local is not TRUE.
DETAILS
Each engine "contains" multiple algorithms described by AlgDesc structures.
 
config Engine.initFromServer  // module-wide

Allow alg tables of engines with a remote server to be populated by querying the server

XDCscript usage meta-domain
Engine.initFromServer = Bool true;
 
 
Engine.createFromServer()  // module-wide

Create an Engine from a Server package

XDCscript usage meta-domain
Engine.createFromServer(Any engineName, Any serverExecutable, Any serverPackage) returns Any
 
ARGUMENTS
engineName — Name to be used for the engine created
serverExecutable — Path to the server executable (including the executable), relative from server package
serverPackage — Name of the server package
DETAILS
Given a Server package and an executable in that package, this method creates an Engine instance and initializes it from details in the Server provided.
An Engine instance created this way has all the codecs that exist in the Server executable - with codec names matching the names configured into the Server, and is configured to use an appropriate memory map and other DSP-specific info.
Example usage:
  var myEngine = Engine.createFromServer("video_copy",
                     "./video_copy.x64P",
                     "ti.sdo.ce.examples.servers.video_copy");

RETURNS
An Engine instance of the same type as if create() were called.
 
Engine.getDspMemTableFromServer()  // module-wide

Get a remote processor's memory table from a Server package

XDCscript usage meta-domain
Engine.getDspMemTableFromServer(Any serverExecutable, Any serverPackage) returns Any
 
ARGUMENTS
serverExecutable — Path to the server executable (including the executable), relative from server package
serverPackage — Name of the server package
DETAILS
Given a Server package and an executable in that package, this method returns an object that contains the Server's memory map details.
For example:
  myEngine.armDspLinkConfig.memTable =
      Engine.getDspMemTableFromServer(
                     "./video_copy.x64P",
                     "ti.sdo.ce.examples.servers.video_copy");

There is no need to use this method when the preferred createFromServer() method is used first.
RETURNS
A DSP memory table "map" object, of type ti.sdo.ce.osal.Global. ArmDspLinkConfigMemTableEntry[string]
SEE
Instance Config Parameters

XDCscript usage meta-domain
var params = new Engine.Params;
// Instance config-params object
    params.algs = Engine.AlgDesc[] undefined;
    // Array of algorithms available in the Engine
    params.armDspLinkConfig = IIpc.ArmDspLinkConfig undefined;
    // Optional GPP-side Link configuration
    params.heapId = UInt32 undefined;
    // Optional heap id to be used for this Engine
    params.memMap = String undefined;
    // Optional name of file containing slave processor's memory map
    params.name = String undefined;
    // Name of the Engine
    params.server = String undefined;
    // Optional name of a remote Server
    params.useExtLoader = Bool false;
    // In the case where the Engine has a remote server, @c useExtLoader specifies whether or not an external loader is used to load the server. If @c useExtLoader is set to false, Codec Engine will load the server when the Engine is opened. Otherwise, it will be assumed that the server has already been loaded
 
config Engine.algs  // instance

Array of algorithms available in the Engine

XDCscript usage meta-domain
var params = new Engine.Params;
  ...
params.algs = Engine.AlgDesc[] undefined;
 
DETAILS
An array of algorithms which this Engine instance provides. A mix of local and remote algorithms can be specified in this array.
createFromServer() can be used to populate this array with algorithms configured into a remote Server.
SEE
 
config Engine.armDspLinkConfig  // instance

Optional GPP-side Link configuration

XDCscript usage meta-domain
var params = new Engine.Params;
  ...
params.armDspLinkConfig = IIpc.ArmDspLinkConfig undefined;
 
DETAILS
The ARM-side DSP Link configuration. If left undefined will revert to ti.sdo.ce.ipc.DEFAULT_ARMDSPLINKCONFIG, but with a warning
Applies only to CE configurations where osal.Global.runtimeEnv == DSPLINK_LINUX
There is no need to use this method when the preferred createFromServer() method is used first.
SEE
 
config Engine.heapId  // instance

Optional heap id to be used for this Engine

XDCscript usage meta-domain
var params = new Engine.Params;
  ...
params.heapId = UInt32 undefined;
 
DETAILS
This is used internally, for example, by Comm_alloc().
 
config Engine.memMap  // instance

Optional name of file containing slave processor's memory map

XDCscript usage meta-domain
var params = new Engine.Params;
  ...
params.memMap = String undefined;
 
DETAILS
This parameter is only needed when Codec Engine will be loading the slave processor.
 
config Engine.name  // instance

Name of the Engine

XDCscript usage meta-domain
var params = new Engine.Params;
  ...
params.name = String undefined;
 
DETAILS
This string provided by the application in the Engine_open() call.
 
config Engine.server  // instance

Optional name of a remote Server

XDCscript usage meta-domain
var params = new Engine.Params;
  ...
params.server = String undefined;
 
DETAILS
This parameter is only necessary when there are algorithms configured to run remotely - i.e., their local field is set to false.
Engines containing these remote algorithms will need to set this server parameter to the name of the binary which should be loaded on the remote processor.
 
config Engine.useExtLoader  // instance

In the case where the Engine has a remote server, @c useExtLoader specifies whether or not an external loader is used to load the server. If @c useExtLoader is set to false, Codec Engine will load the server when the Engine is opened. Otherwise, it will be assumed that the server has already been loaded

XDCscript usage meta-domain
var params = new Engine.Params;
  ...
params.useExtLoader = Bool false;
 
Instance Creation

XDCscript usage meta-domain
var params = new Engine.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = Engine.create(String name, Engine.AlgDesc[] algs, params);
// Create an instance-object
DETAILS
Parameters:
name
Name of this engine; this name is used by clients via the Engine_open() API to identify the collection of algorithms available.
algs
Array of algorithms this engine supports
server
Optional name of the DSP Server; this name is used (if necessary) to load and start any associated DSP CPUs required to support this Engine instance
generated on Tue, 17 Jan 2012 07:28:56 GMT