TransmitPropertyTransformer

Parent Previous Next

Interfaces and Buses / Wireless_Sensor / Block /  TransmitPropertyTransformer
Block Name: TransmitPropertyTransformer


This actor reads input tokens and sends them unmodified to the output; its role is not to operate on input tokens, but rather to modify the properties of a transmission.

This actor implements the PropertyTransformer interface, which provides a callback that can be use to modify the transmit properties of a transmission. It register itself and its connected wireless output port with the channel that the wireless output port uses. The channel will call its transformProperties() method for each transmission from the registed output port.

When transformProperties() is called, this actor sets the value of three variables and then performs a complete execution of the contained model. The three variables are senderLocation (an array of doubles), receiverLocation (also an array of doubles), and properties (a record token containing the transmit properties to be modified). After execution of the contained model, the (possibly modified) value of the record properties is taken to be the modified properties. Thus, a contained model would normally read the variable properties, change it, and use a SetVariable actor to set the new value of properties.

This actor expects its output port to be connected directly to the inside of a WirelessIOPort belonging to this actor's container. It looks for this port in the preinitialize() method, and registers with the channel specified by that port. If there is no such port, or no such channel, then preinitialize() throws an exception. Note that since this connectivity is checked only during preinitialize(), this actor does not support dynamically reconnecting its output port during execution of the model.



Field Detail

input

public VisualSim.actor.TypedIOPort input


output

public VisualSim.actor.TypedIOPort output


senderLocation

public VisualSim.data.expr.Parameter senderLocation


receiverLocation

public VisualSim.data.expr.Parameter receiverLocation


properties

public VisualSim.data.expr.Parameter properties



Created with the Personal Edition of HelpNDoc: Easily create EBooks