Example host module for a basic MiXiM host with configurable NIC, network layer, application layer and mobility module.
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.
| Name | Type | Default value | Description |
|---|---|---|---|
| applType | string |
type of the application layer |
|
| netwType | string |
type of the network layer |
|
| mobType | string |
type of the mobility module |
|
| nicType | string |
type of the NIC module |
| Name | Value | Description |
|---|---|---|
| display | bgb=,,white;i=device/laptop;b=40,40,rect |
| Name | Direction | Size | Description |
|---|---|---|---|
| radioIn | input |
gate for sendDirect |
| Name | Type | Default value | Description |
|---|---|---|---|
| utility.coreDebug | bool |
debug switch for the base framework |
|
| arp.coreDebug | bool |
debug switch for the core framework |
|
| mobility.x | double |
x coordinate of the nodes' position (-1 = random) |
|
| mobility.y | double |
y coordinate of the nodes' position (-1 = random) |
|
| mobility.z | double |
z coordinate of the nodes' position (-1 = random) |
|
| appl.headerLength | int |
length of the application message header (in bits) |
|
| net.stats | bool |
stats switch |
|
| net.headerLength | double |
length of the network packet header (in bits) |
// // Example host module for a basic MiXiM host with configurable NIC, network // layer, application layer and mobility module. // module HostBasic { parameters: string applType; //type of the application layer string netwType; //type of the network layer string mobType; //type of the mobility module string nicType; //type of the NIC module @display("bgb=,,white;i=device/laptop;b=40,40,rect"); gates: input radioIn; // gate for sendDirect submodules: utility: BaseUtility { parameters: @display("p=130,38;b=24,24,rect,black;i=block/blackboard"); } arp: BaseArp { parameters: @display("p=130,108;b=24,24,rect,blue;i=block/process"); } mobility: <mobType> like IBaseMobility { parameters: @display("p=130,172;i=block/cogwheel"); } appl: <applType> like IBaseApplLayer { parameters: @display("p=60,50;i=app"); } net: <netwType> like IBaseNetwLayer { parameters: @display("p=60,108;i=block/layer"); } nic: <nicType> like INic { parameters: @display("p=60,166;i=block/ifcard"); } connections: nic.upperGateOut --> net.lowerGateIn; nic.upperGateIn <-- net.lowerGateOut; nic.upperControlOut --> { @display("ls=red;m=m,70,0,70,0"); } --> net.lowerControlIn; nic.upperControlIn <-- { @display("ls=red;m=m,70,0,70,0"); } <-- net.lowerControlOut; net.upperGateOut --> appl.lowerGateIn; net.upperGateIn <-- appl.lowerGateOut; net.upperControlOut --> { @display("ls=red;m=m,70,0,70,0"); } --> appl.lowerControlIn; net.upperControlIn <-- { @display("ls=red;m=m,70,0,70,0"); } <-- appl.lowerControlOut; radioIn --> nic.radioIn; }