module xdc.runtime.Defaults

Default attributes inherited by all target modules

This module defines default values for common$ structure. If other modules do not set common$ properties explicitly, these values will be used.
XDCspec summary sourced in xdc/runtime/Defaults.xdc
module Defaults {  ...
// inherits xdc.runtime.IModule
C synopsis target-domain
XDCscript usage meta-domain
var Defaults = xdc.useModule('xdc.runtime.Defaults');
module-wide config parameters
        diags_ASSERT: Diags.ALWAYS_ON,
        diags_ENTRY: Diags.ALWAYS_OFF,
        diags_EXIT: Diags.ALWAYS_OFF,
        diags_INTERNAL: Diags.ALWAYS_OFF,
        diags_LIFECYCLE: Diags.ALWAYS_OFF,
        diags_USER1: Diags.ALWAYS_OFF,
        diags_USER2: Diags.ALWAYS_OFF,
        diags_USER3: Diags.ALWAYS_OFF,
        diags_USER4: Diags.ALWAYS_OFF,
        diags_USER5: Diags.ALWAYS_OFF,
        diags_USER6: Diags.ALWAYS_OFF,
        diags_USER7: Diags.ALWAYS_OFF,
        diags_USER8: Diags.ALWAYS_OFF,
        fxntab: true,
        gate: null,
        gateParams: null,
        instanceHeap: null,
        instanceSection: null,
        logger: null,
        memoryPolicy: Types.DELETE_POLICY,
        namedInstance: false,
        namedModule: true,
        romPatchTable: false
    };
module-wide functions
 
XDCspec declarations sourced in xdc/runtime/Defaults.xdc
package xdc.runtime;
 
module Defaults {
module-wide config parameters
        diags_ASSERT: Diags.ALWAYS_ON,
        diags_ENTRY: Diags.ALWAYS_OFF,
        diags_EXIT: Diags.ALWAYS_OFF,
        diags_INTERNAL: Diags.ALWAYS_OFF,
        diags_LIFECYCLE: Diags.ALWAYS_OFF,
        diags_USER1: Diags.ALWAYS_OFF,
        diags_USER2: Diags.ALWAYS_OFF,
        diags_USER3: Diags.ALWAYS_OFF,
        diags_USER4: Diags.ALWAYS_OFF,
        diags_USER5: Diags.ALWAYS_OFF,
        diags_USER6: Diags.ALWAYS_OFF,
        diags_USER7: Diags.ALWAYS_OFF,
        diags_USER8: Diags.ALWAYS_OFF,
        fxntab: true,
        gate: null,
        gateParams: null,
        instanceHeap: null,
        instanceSection: null,
        logger: null,
        memoryPolicy: Types.DELETE_POLICY,
        namedInstance: false,
        namedModule: true,
        romPatchTable: false
    };
module-wide functions
    metaonly Any getCommon// Get a specified common parameter from a module( IModule.Module mod, String param );
}
 
metaonly config Defaults.common$  // module-wide

Defaults inherited by all target modules

XDCscript usage meta-domain
Defaults.common$ = Types.Common$ {
    diags_ASSERT: Diags.ALWAYS_ON,
    diags_ENTRY: Diags.ALWAYS_OFF,
    diags_EXIT: Diags.ALWAYS_OFF,
    diags_INTERNAL: Diags.ALWAYS_OFF,
    diags_LIFECYCLE: Diags.ALWAYS_OFF,
    diags_USER1: Diags.ALWAYS_OFF,
    diags_USER2: Diags.ALWAYS_OFF,
    diags_USER3: Diags.ALWAYS_OFF,
    diags_USER4: Diags.ALWAYS_OFF,
    diags_USER5: Diags.ALWAYS_OFF,
    diags_USER6: Diags.ALWAYS_OFF,
    diags_USER7: Diags.ALWAYS_OFF,
    diags_USER8: Diags.ALWAYS_OFF,
    fxntab: true,
    gate: null,
    gateParams: null,
    instanceHeap: null,
    instanceSection: null,
    logger: null,
    memoryPolicy: Types.DELETE_POLICY,
    namedInstance: false,
    namedModule: true,
    romPatchTable: false
};
 
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.
This structure defines the default values for the configuration parameters shared by all modules in a system. Unless otherwise noted, setting one of the fields defined below will set the corresponding value for all modules in the system which have not been explicitly set; i.e., it will establish a default value for the parameter.
DIAGS_ASSERT
Enables asserts at runtime. Default is ALWAYS_ON
DIAGS_ENTRY
Enables entry trace for all functions. Default is ALWAYS_OFF
DIAGS_EXIT
Enables exit trace for all functions. Default is ALWAYS_OFF
DIAGS_INTERNAL
Enables internal asserts. Default is ALWAYS_OFF. When set to ALWAYS_ON, requires diags_ASSERT to be ALWAYS_ON.
DIAGS_LIFECYCLE
Enables lifecycle logs. These logs are written during creates and deletes. Default is ALWAYS_OFF.
DIAGS_USER
Each diags_USER field controls a separate user-defined logging level. Default is ALWAYS_OFF for all diags_USER fileds.
GATE
Default gate used by all modules which are declared as being @Gated. By default, this parameter points to an instance of GateNull, which means there is no protection.
GATEPARAMS
The default parameters used to create gates at runtime. See Types.Common$.gateParams. Default is null.
INSTANCEHEAP
Specify heap to be used for module instances. Default is null. If instanceHeap is null, instances will be allocated from the heap specified by Memory.defaultHeapInstance.
INSTANCESECTION
Specify section to be used to place module instances. Default is null.
LOGGER
Default logger used by modules to write logs. By default there is no logger.
MEMORYPOLICY
Used to specify type of application. Types.STATIC_POLICY is used when all objects are created statically. Types.CREATE_POLICY is used when the application creates objects at runtime. Types.DELETE_POLICY is used when the application creates and deletes objects at runtime. This helps eliminate unwanted create and delete code.
NAMEDINSTANCE
This parameter should be set to true if space needs to be allocated in instance objects for instance names. Allocating space for a name allows object view tools to display the names. The runtime functions Mod_Handle_name() and Mod_Handle_label() defined for each module Mod can be used to retrieve the name at runtime.
NAMEDMODULE
This field allows the name of the module to be retained on the target. Setting this to false will save space but will also prevent the target from being able to display the module names appearing in Log events and Errors.
Setting namedModule to false causes all modules, except for Memory and Main to be unnamed by default. To eliminate the string names for these modules you must explicitly set their common$.namedModule parameters to false; without these two names, target-side display of error messages is somewhat cryptic.
ROMPATCHTABLE
Specify whether modules that are allocated to ROM are patchable.
 
metaonly Defaults.getCommon( )  // module-wide

Get a specified common parameter from a module

XDCscript usage meta-domain
Defaults.getCommon( IModule.Module mod, String param ) returns Any
 
ARGUMENTS
eb — module whose parameter is queried
param — string naming the queried parameter
DETAILS
Get the value of a member of the structure common$ based on defaults and the current value of the parameter.
RETURNS
Returns the value of the parameter named param from the module mod.
 
module-wide built-ins

C synopsis target-domain
Types_ModuleId Defaults_Module_id( );
// Get this module's unique id
 
Bool Defaults_Module_startupDone( );
// Test if this module has completed startup
 
IHeap_Handle Defaults_Module_heap( );
// The heap from which this module allocates memory
 
Bool Defaults_Module_hasMask( );
// Test whether this module has a diagnostics mask
 
Bits16 Defaults_Module_getMask( );
// Returns the diagnostics mask for this module
 
Void Defaults_Module_setMask( Bits16 mask );
// Set the diagnostics mask for this module
generated on Tue, 01 Sep 2009 00:36:15 GMT