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 ... ]
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.
config DriverTable.gate // module-wide |
 |
Gate used to make the table thread safe
XDCscript usage |
meta-domain |
config DriverTable.maxNameLen // module-wide |
 |
Length, in MAUs, of the name field in the table
XDCscript usage |
meta-domain |
DriverTable.maxNameLen = UInt 16;
extern const UInt DriverTable_maxNameLen;
config DriverTable.maxRuntimeEntries // module-wide |
 |
Max runtime entries that can be added
XDCscript usage |
meta-domain |
DriverTable.maxRuntimeEntries = UInt 0;
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.
metaonly config DriverTable.common$ // module-wide |
 |
Common module configuration parameters
XDCscript usage |
meta-domain |
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;
DriverTable.add( ) // module-wide |
 |
Add IDriver handle to the table at runtime
ARGUMENTS
name
name of entry
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
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.
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
module-wide built-ins |
 |
// Get this module's unique id
Bool DriverTable_Module_startupDone( );
// Test if this module has completed startup
// 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