module ti.sdo.io.DriverTable

DriverTable module

This module maintains a table of IDriver.Handle. Other modules can lookup these handles by name and open channels for IO. The Stream module will open channels using this table. All names in this table have to be unique. [ more ... ]
C synopsis target-domain sourced in ti/sdo/io/DriverTable.xdc
DETAILS
This module maintains a table of IDriver.Handle. Other modules can lookup these handles by name and open channels for IO. The Stream module will open channels using this table. All names in this table have to be unique.
This module allows addition of IDriver handles into the table at configuration time as well as at runtime. However, the total number of runtime entries have to be decided at configuration time. There is no limit to entries added statically.
This module uses ti.sdo.utils.NameServer to maintain its table
 
config DriverTable_gate  // module-wide

Gate used to make the table thread safe

C synopsis target-domain
extern const IGateProvider_Handle DriverTable_gate;
 
 
config DriverTable_maxNameLen  // module-wide

Length, in MAUs, of the name field in the table

C synopsis target-domain
extern const UInt DriverTable_maxNameLen;
 
 
config DriverTable_maxRuntimeEntries  // module-wide

Max runtime entries that can be added

C synopsis target-domain
extern const UInt DriverTable_maxRuntimeEntries;
 
DETAILS
Currently this module requires total number of entries that need to be added at runtime to be identified at configuration time.
 
DriverTable_add()  // module-wide

Add IDriver handle to the table at runtime

C synopsis target-domain
Void DriverTable_add(String name, IDriver_Handle driverHandle, Error_Block *eb);
 
ARGUMENTS
name — name of entry
driverHandle — IDriver.Handle
eb — Error Block
DETAILS
Will raise an error when name already exists in table. This API is not thread safe. Set gate parameter to protect table if called from multiple threads.
 
DriverTable_remove()  // module-wide

Remove entry from IDriver table at runtime

C synopsis target-domain
Void DriverTable_remove(String name, Error_Block *eb);
 
ARGUMENTS
name — name of entry
eb — error block
DETAILS
Will raise an error when name not found in table This API is not thread safe. Set gate parameter to protect table if called from multiple threads.
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId DriverTable_Module_id();
// Get this module's unique id
 
Bool DriverTable_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle DriverTable_Module_heap();
// The heap from which this module allocates memory
 
Bool DriverTable_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 DriverTable_Module_getMask();
// Returns the diagnostics mask for this module
 
Void DriverTable_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
XDCscript usage meta-domain sourced in ti/sdo/io/DriverTable.xdc
 
config DriverTable.gate  // module-wide

Gate used to make the table thread safe

XDCscript usage meta-domain
DriverTable.gate = IGateProvider.Handle null;
 
C SYNOPSIS
 
config DriverTable.maxNameLen  // module-wide

Length, in MAUs, of the name field in the table

XDCscript usage meta-domain
DriverTable.maxNameLen = UInt 16;
 
C SYNOPSIS
 
config DriverTable.maxRuntimeEntries  // module-wide

Max runtime entries that can be added

XDCscript usage meta-domain
DriverTable.maxRuntimeEntries = UInt 0;
 
DETAILS
Currently this module requires total number of entries that need to be added at runtime to be identified at configuration time.
C SYNOPSIS
 
metaonly config DriverTable.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
DriverTable.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
 
metaonly config DriverTable.tableSection  // module-wide

Section name is used to place the IDriver table

XDCscript usage meta-domain
DriverTable.tableSection = String null;
 
 
metaonly DriverTable.addMeta()  // module-wide

Add to IDriver handle to the table at configuration time

XDCscript usage meta-domain
DriverTable.addMeta(String name, IDriver.Handle driverHandle) returns Void
 
ARGUMENTS
name — name of entry
driverHandle — IDriver.Handle
generated on Sat, 11 Feb 2012 00:37:46 GMT