I'm developing a domain based on the existing wireless domain that allows tokens 
transmitted across the channel to have nonzero transmission time.  When a "send" 
doesn't occur instantaneously, one can model channel noise and contention.  This 
allows me to build an actor that buffers messages before they go out across the 
channel; if the output port detects too much traffic underway, then it can alert the 
buffer and the buffer can try again later.  

The first way that I thought of to implement this is to make each output port an 
input/output port.  It then has a receiver that can track the messages currently in 
flight and determine whether the channel is clear at that location.  However, this 
appears to confuse the director.  

The attached example illustrates the problem.  It consists of two WirelessComposite 
"senders" and a WirelessComposite "listener", with a WirelessDirector and interior 
DEDirectors.  The "senders" both transmit clock signals at the same time from their 
respective input/output WirelessIOPorts.  This causes an error:  the WirelessDirector 
advances the external clock to t=1.0 before the interior DEDirectors can consume the 
tokens that arrived on the input/output ports at t=0.0.  (The example is clearer than 
my explanation).

Is this a bug or a feature?  Are there alternative approaches that would allow an 
output WirelessIOPort to find out what's happening at its location?

Thanks,

ALZ


-----
Andrew Zimdars
Modeling, Simulation, and Information Sciences (Org. ABCS)
Advanced Technology Center, Lockheed Martin Space Systems Co.
Bldg. 153, Col. 2J4
1111 Lockheed Martin Way, Sunnyvale, CA  94089

w: 408/742.2111 m: 510/915.0662
<?xml version="1.0" standalone="no"?>
<!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
    "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd";>
<entity name="WirelessInputOutputExample" class="ptolemy.actor.TypedCompositeActor">
    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="4.0.1">
    </property>
    <property name="WirelessDirector" class="ptolemy.domains.wireless.kernel.WirelessDirector">
        <property name="stopTime" class="ptolemy.data.expr.Parameter" value="10.0">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="{60, 55}">
        </property>
    </property>
    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={292, 270, 815, 509}, maximized=false}">
    </property>
    <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
    </property>
    <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
    </property>
    <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{300.0, 200.0}">
    </property>
    <entity name="AtomicWirelessChannel" class="ptolemy.domains.wireless.kernel.AtomicWirelessChannel">
        <property name="_location" class="ptolemy.kernel.util.Location" value="{60, 110}">
        </property>
    </entity>
    <entity name="WirelessComposite" class="ptolemy.domains.wireless.kernel.WirelessComposite">
        <property name="DEDirector" class="ptolemy.domains.de.kernel.DEDirector">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[70.0, 35.0]">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="{145, 220}">
        </property>
        <port name="output" class="ptolemy.domains.wireless.kernel.WirelessIOPort">
            <property name="input"/>
            <property name="output"/>
            <property name="outsideChannel" class="ptolemy.data.expr.StringParameter" value="AtomicWirelessChannel">
            </property>
            <property name="outsideTransmitProperties" class="ptolemy.data.expr.Parameter">
            </property>
            <property name="insideChannel" class="ptolemy.data.expr.StringParameter">
            </property>
            <property name="insideTransmitProperties" class="ptolemy.data.expr.Parameter">
            </property>
            <property name="_type" class="ptolemy.actor.TypeAttribute" value="unknown">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[525.0, 200.0]">
            </property>
        </port>
        <entity name="Clock" class="ptolemy.actor.lib.Clock">
            <doc>Create a set of pulses</doc>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{175, 160}">
            </property>
        </entity>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
        </relation>
        <link port="output" relation="relation"/>
        <link port="Clock.output" relation="relation"/>
    </entity>
    <entity name="WirelessComposite2" class="ptolemy.domains.wireless.kernel.WirelessComposite">
        <property name="DEDirector" class="ptolemy.domains.de.kernel.DEDirector">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[70.0, 35.0]">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[335.0, 225.0]">
        </property>
        <port name="input" class="ptolemy.domains.wireless.kernel.WirelessIOPort">
            <property name="input"/>
            <property name="outsideChannel" class="ptolemy.data.expr.StringParameter" value="AtomicWirelessChannel">
            </property>
            <property name="outsideTransmitProperties" class="ptolemy.data.expr.Parameter">
            </property>
            <property name="insideChannel" class="ptolemy.data.expr.StringParameter">
            </property>
            <property name="insideTransmitProperties" class="ptolemy.data.expr.Parameter">
            </property>
            <property name="_type" class="ptolemy.actor.TypeAttribute" value="int">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[20.0, 150.0]">
            </property>
        </port>
        <entity name="TimedPlotter" class="ptolemy.actor.lib.gui.TimedPlotter">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[230.0, 150.0]">
            </property>
            <configure>
<?plotml <!DOCTYPE plot PUBLIC "-//UC Berkeley//DTD PlotML 1//EN"
"http://ptolemy.eecs.berkeley.edu/xml/dtd/PlotML_1.dtd";>
<plot>
<title>TimedPlotter</title>
<xRange min="0.0" max="1.0"/>
<yRange min="-1.0" max="1.0"/>
</plot>?>
            </configure>
        </entity>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
        </relation>
        <link port="input" relation="relation"/>
        <link port="TimedPlotter.input" relation="relation"/>
    </entity>
    <entity name="WirelessComposite3" class="ptolemy.domains.wireless.kernel.WirelessComposite">
        <property name="DEDirector" class="ptolemy.domains.de.kernel.DEDirector">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[70.0, 35.0]">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[135.0, 310.0]">
        </property>
        <port name="output" class="ptolemy.domains.wireless.kernel.WirelessIOPort">
            <property name="input"/>
            <property name="output"/>
            <property name="outsideChannel" class="ptolemy.data.expr.StringParameter" value="AtomicWirelessChannel">
            </property>
            <property name="_type" class="ptolemy.actor.TypeAttribute" value="unknown">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[525.0, 200.0]">
            </property>
        </port>
        <entity name="Clock" class="ptolemy.actor.lib.Clock">
            <property name="values" class="ptolemy.data.expr.Parameter" value="{-1, 0}">
            </property>
            <doc>Create a set of pulses</doc>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{175, 160}">
            </property>
        </entity>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
        </relation>
        <link port="output" relation="relation"/>
        <link port="Clock.output" relation="relation"/>
    </entity>
</entity>

Reply via email to