Defining a Wireless Domain Model
This section describes the operations used to define the various code blocks that make up a wireless domain model.
- Auxiliary Callback
- Function Block
- Header Block
- Info Get Callback
- Info Set Callback
- Init Callback
- Member Callback
Note: Each of these operations uses the editor specified by the editor_prog preference (the built-in edit pad is the default editor).
To see examples of each code block and callback, look at one of the wireless domain models provided with Modeler (choose File > Open > Wireless Domain Model).
Auxiliary Callback
The Code Blocks > Auxiliary Callback operation opens an edit pad in which you can define the Auxiliary callback code for a wireless domain model. This callback can be invoked with the KP op_radio_wireless_domain_aux_proc_call() to access specified data from the state information of the wireless domain.
The prototype for this callback appears in <auxproc_callback>.
Function Block
The Code Blocks > Function block operation opens an edit pad in which you can define the function block code for a wireless domain model. The function block contains functions used by the callbacks. These functions are specific to the data structures used by the wireless domain model.
Header Block
The Code Blocks > Header Block operation opens an edit pad in which you can define the header block code for a wireless domain model. The header block contains header information for the model, such as type definitions, variable definitions, and function prototypes.
Info Get Callback
The Code Blocks > Auxiliary Callback operation opens an edit pad in which you can define the Info Get callback code for a wireless domain model. The Simulation Kernel uses the Info Get callback to get information from the wireless domain cache for a specified pair of clusters. This information can be any or all of the values typically stored in the cache (closure, channel match, propagation delay, and path loss).
The prototype for this callback appears in <info_get_callback>.
Info Set Callback
The Code Blocks > Info_Set operation opens an edit pad in which you can define the Info Set callback code for a wireless domain model. The Simulation Kernel uses the Info Set callback to put the results of pipeline stage calculations for a specified pair of clusters into the wireless domain cache.
The prototype for this callback appears in <info_set_callback>.
Init Callback
The Code Blocks > Init Callback operation opens an edit pad in which you can define the Init callback code for a wireless domain model. The Simulation Kernel uses the Init callback to instantiate a wireless domain. Typically, this callback does the following things:
- defines a data structure for the wireless domain cache
- sets the wireless domain attribute of each channel in the wireless domain’s area to the ID of the wireless domain
- returns a state pointer for user-defined information about the wireless domain
The prototype for this callback appears in <init_callback>.
Member Callback
The Code Blocks > Member Callback operation opens an edit pad in which you can define the Member callback code for a wireless domain model. The Simulation Kernel uses the Member callback to find out if a channel is part of a specific wireless domain.
The prototype for this callback appears in <member_callback>.