Commands to create shared elements and set their values.
With MLDesigner you can use a number of so-called shared elements to model the functionality of a component (see Shared Model Elements). Such elements are called shared elements, since they are used to share information without exchanging data. For that purpose they can be linked over different model hierarchy levels. Linking means that different model components use the same model element to manipulate the data. Shared elements are
The command
newmemory <name> <scope> <type> <value>
adds a memory of given type to the current module. The type can be any data structure derived from Root excluding Ptolemy base types. The scope defines whether the memory is internal or external. The memory may have an initial value. To set the value of a memory, issue the command:
setmemory <block> <name> <value> [link]
Using this command, you change the initial value of the external memory name of the block block within the current module to the new value value. In this case you can specify the link link as the name of a memory of same or derived data structure type to which the memory is linked.
The command
setmemory this <name> <value>
changes the initial value of the memory name of the current module.
The command
newevent <name> <scope> <type> <value>
adds an event of given type to the current module. The type can be any data structure derived from Root excluding Ptolemy base types. The scope defines whether the event is internal or external. The event can have an initial value. To change the value of an event, issue the command:
setevent <block> <name> <value> [link]
Using this command, you change the initial value of the external event name of the block block within the current module to the new value value. The command
setevent this <name> <value>
changes the initial value of the event name of the current module.
The command
newquantity <name> <scope> <indexed|non-indexed>
adds a new quantity resource to the current module. For quantity resources, you have to define the addressing mode which can be indexed or non-indexed. The scope defines whether the quantity resource is internal or external. By using the command
setquantity <block> <name> <dimension> <capacity> <occupancy> <blocking> <discipline> <reject> <fit>
you can change the properties of the external quantity resource name of block block. You can use this as block name to change the properties of the quantity resource name of the current module. By using
setquantity <block> <name> <link>
you can link the quantity resource name of block block to a quantity resource of the current module with same name.
The command
newserver <name> <scope>
adds a new server resource to the current module. The scope defines whether the server resource is internal or external. By using the command
setserver <block> <name> <dimension> <servers> <rate> <mechanism> <occupancy> <overhead> <preempt> <discipline> <reject>
you can change the properties of the external server resource name of block block. You can use this as block name to change the properties of the server resource name of the current module. By using the command
setserver <block> <name> <link>
you can link the server resource name of block block to a server resource of the current module with same name.