From RTSC-Pedia
[printable version] [offline version] | offline version generated on 04-Aug-2010 21:08 UTC |
XDCscript - Module-Body.module$use
Use other modules required by this module
Synopsis
| function module$use() |
Description
module$use() is called after the user's configuration script and changes to the configuration are allowed within this function. This function is used by modules that require other modules in their implementation. As a rule, any module that directly references another RTSC module must implement this function with the necessary calls to xdc.useModule().
For example, if the implementation of a module Mod calls Log_print, then Mod.xs should contain an implementation of module$use() that contains a call to xdc.useModule('xdc.runtime.Log').
|
|
Whenever you need to include another module's header in your module's C code, there should be a corresponding xdc.useModule() call in your module's module$use() function.
The configuration model invokes module$use before both module$static$init and instance$static$init. For more information about the order in which module functions are invoked, see Creating Configurable Content.
You should leverage this function as the locale for binding all unbound proxies associated with this module. Any proxies left unbound going forward will cause the entire configuration process to terminate with an appropriate error message, thus inhibiting any subsequent target-program build steps.
See also
XDCscript - xdc.useModule | Specify that a module is used in a configuration |
Creating Configurable Content | How to leverage the configuration process |
XDCscript - Module-Body.module$static$init | Initialize module's State object |
XDCscript - Instance-Body.instance$static$init | Statically initialize a target module's instance object |
[printable version] [offline version] | offline version generated on 04-Aug-2010 21:08 UTC |