diff --git a/modeling/AVATAR/AirbusDoor.xml b/modeling/AVATAR/AirbusDoor.xml index b1436a3b2ca950422c3e5461123b7134f07cabb5..45124e4d6efc3faaf3ff3cffcfce71e02f076817 100644 --- a/modeling/AVATAR/AirbusDoor.xml +++ b/modeling/AVATAR/AirbusDoor.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<TURTLEGMODELING version="0.99-beta4"> +<TURTLEGMODELING version="1.0beta"> <Modeling type="Avatar MAD" nameTab="MADs" > <AvatarMADPanel name="Modeling Assumptions Diagram" minX="10" maxX="1400" minY="10" maxY="900" zoom="1.0" > @@ -876,7 +876,7 @@ <MainCode value="void __user_init() {"/> <MainCode value="}"/> <Optimized value="true" /> -<Validated value="Observer_CanAPilotBeSureToEnterTheCockpit;RegulationManagement;Observer_OnlyPassengersInCockpit;Observer_NoPilotInCockpit;DisplayOfLockbutton;CodePad;LightDisplay;MainDoorController;PeopleManagement;Door;LockButton;Alarm;Buzzer;" /> +<Validated value="" /> <Ignored value="" /> <CONNECTOR type="5002" id="571" > @@ -1692,7 +1692,7 @@ <SUBCOMPONENT type="-1" id="928" > <father id="933" num="3" /> <cdparam x="783" y="756" /> -<sizeparam width="39" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1748,7 +1748,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="945" > <father id="947" num="0" /> <cdparam x="285" y="694" /> -<sizeparam width="175" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="155" height="30" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1777,7 +1777,7 @@ </CONNECTOR><SUBCOMPONENT type="-1" id="952" > <father id="954" num="0" /> <cdparam x="669" y="437" /> -<sizeparam width="145" height="45" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="151" height="45" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -1837,7 +1837,7 @@ <SUBCOMPONENT type="-1" id="962" > <father id="967" num="3" /> <cdparam x="270" y="435" /> -<sizeparam width="122" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="130" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="List of all parameters of an Avatar SMD transition" value="" /> @@ -2096,8 +2096,8 @@ </COMPONENT> <COMPONENT type="5104" id="1095" > -<cdparam x="597" y="604" /> -<sizeparam width="221" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="588" y="604" /> +<sizeparam width="239" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Receive signal" value="getNbOfPilotsInCabin(pilotsInCabin)" /> @@ -2115,7 +2115,7 @@ <COMPONENT type="301" id="1112" > <cdparam x="955" y="509" /> -<sizeparam width="190" height="35" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="203" height="15" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="UML Note" value="Can we always reach 0 pilot ? @@ -2243,8 +2243,8 @@ </COMPONENT> <COMPONENT type="5104" id="1205" > -<cdparam x="375" y="253" /> -<sizeparam width="221" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="366" y="253" /> +<sizeparam width="239" height="20" minWidth="30" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="Receive signal" value="getNbOfPilotsInCabin(pilotsInCabin)" /> @@ -3921,8 +3921,8 @@ <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="null" /> <TGConnectingPoint num="0" id="2011" /> -<P1 x="787" y="437" id="2122" /> -<P2 x="658" y="595" id="2138" /> +<P1 x="787" y="437" id="2288" /> +<P2 x="658" y="595" id="2218" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="2010" > <father id="2012" num="0" /> @@ -3949,8 +3949,8 @@ <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="null" /> <TGConnectingPoint num="0" id="2018" /> -<P1 x="837" y="437" id="2124" /> -<P2 x="892" y="587" id="2195" /> +<P1 x="837" y="437" id="2290" /> +<P2 x="892" y="587" id="2193" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="2017" > <father id="2019" num="0" /> @@ -3977,8 +3977,8 @@ <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="null" /> <TGConnectingPoint num="0" id="2025" /> -<P1 x="875" y="424" id="2107" /> -<P2 x="988" y="469" id="2220" /> +<P1 x="875" y="424" id="2273" /> +<P2 x="988" y="469" id="2136" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="2024" > <father id="2026" num="0" /> @@ -4005,8 +4005,8 @@ <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="null" /> <TGConnectingPoint num="0" id="2032" /> -<P1 x="775" y="412" id="2097" /> -<P2 x="618" y="455" id="2261" /> +<P1 x="775" y="412" id="2263" /> +<P2 x="618" y="455" id="2095" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="2031" > <father id="2033" num="0" /> @@ -4033,8 +4033,8 @@ <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="null" /> <TGConnectingPoint num="0" id="2039" /> -<P1 x="836" y="345" id="2135" /> -<P2 x="825" y="387" id="2095" /> +<P1 x="836" y="345" id="2258" /> +<P2 x="825" y="387" id="2261" /> <AutomaticDrawing data="true" /> </CONNECTOR><SUBCOMPONENT type="-1" id="2038" > <father id="2040" num="0" /> @@ -4216,11 +4216,11 @@ </COMPONENT> <SUBCOMPONENT type="5106" id="2134" > <father id="2341" num="0" /> -<cdparam x="775" y="387" /> +<cdparam x="568" y="455" /> <sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="541" minY="0" maxY="391" /> -<infoparam name="state0" value="Test" /> +<infoparam name="state0" value="IDLE" /> <TGConnectingPoint num="0" id="2094" /> <TGConnectingPoint num="1" id="2095" /> <TGConnectingPoint num="2" id="2096" /> @@ -4264,172 +4264,172 @@ <extraparam> </extraparam> </SUBCOMPONENT> -<SUBCOMPONENT type="5100" id="2136" > +<SUBCOMPONENT type="5106" id="2175" > <father id="2341" num="1" /> -<cdparam x="829" y="325" /> -<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="938" y="469" /> +<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="626" minY="0" maxY="426" /> -<infoparam name="start state" value="null" /> +<cdrectangleparam minX="0" maxX="541" minY="0" maxY="391" /> +<infoparam name="state0" value="FAULT" /> <TGConnectingPoint num="0" id="2135" /> -</SUBCOMPONENT> -<SUBCOMPONENT type="5106" id="2177" > +<TGConnectingPoint num="1" id="2136" /> +<TGConnectingPoint num="2" id="2137" /> +<TGConnectingPoint num="3" id="2138" /> +<TGConnectingPoint num="4" id="2139" /> +<TGConnectingPoint num="5" id="2140" /> +<TGConnectingPoint num="6" id="2141" /> +<TGConnectingPoint num="7" id="2142" /> +<TGConnectingPoint num="8" id="2143" /> +<TGConnectingPoint num="9" id="2144" /> +<TGConnectingPoint num="10" id="2145" /> +<TGConnectingPoint num="11" id="2146" /> +<TGConnectingPoint num="12" id="2147" /> +<TGConnectingPoint num="13" id="2148" /> +<TGConnectingPoint num="14" id="2149" /> +<TGConnectingPoint num="15" id="2150" /> +<TGConnectingPoint num="16" id="2151" /> +<TGConnectingPoint num="17" id="2152" /> +<TGConnectingPoint num="18" id="2153" /> +<TGConnectingPoint num="19" id="2154" /> +<TGConnectingPoint num="20" id="2155" /> +<TGConnectingPoint num="21" id="2156" /> +<TGConnectingPoint num="22" id="2157" /> +<TGConnectingPoint num="23" id="2158" /> +<TGConnectingPoint num="24" id="2159" /> +<TGConnectingPoint num="25" id="2160" /> +<TGConnectingPoint num="26" id="2161" /> +<TGConnectingPoint num="27" id="2162" /> +<TGConnectingPoint num="28" id="2163" /> +<TGConnectingPoint num="29" id="2164" /> +<TGConnectingPoint num="30" id="2165" /> +<TGConnectingPoint num="31" id="2166" /> +<TGConnectingPoint num="32" id="2167" /> +<TGConnectingPoint num="33" id="2168" /> +<TGConnectingPoint num="34" id="2169" /> +<TGConnectingPoint num="35" id="2170" /> +<TGConnectingPoint num="36" id="2171" /> +<TGConnectingPoint num="37" id="2172" /> +<TGConnectingPoint num="38" id="2173" /> +<TGConnectingPoint num="39" id="2174" /> +<extraparam> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="5106" id="2216" > <father id="2341" num="2" /> -<cdparam x="559" y="595" /> -<sizeparam width="198" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> -<hidden value="false" /> -<cdrectangleparam minX="0" maxX="443" minY="0" maxY="391" /> -<infoparam name="state0" value="FAULT_AND_OPEN" /> -<TGConnectingPoint num="0" id="2137" /> -<TGConnectingPoint num="1" id="2138" /> -<TGConnectingPoint num="2" id="2139" /> -<TGConnectingPoint num="3" id="2140" /> -<TGConnectingPoint num="4" id="2141" /> -<TGConnectingPoint num="5" id="2142" /> -<TGConnectingPoint num="6" id="2143" /> -<TGConnectingPoint num="7" id="2144" /> -<TGConnectingPoint num="8" id="2145" /> -<TGConnectingPoint num="9" id="2146" /> -<TGConnectingPoint num="10" id="2147" /> -<TGConnectingPoint num="11" id="2148" /> -<TGConnectingPoint num="12" id="2149" /> -<TGConnectingPoint num="13" id="2150" /> -<TGConnectingPoint num="14" id="2151" /> -<TGConnectingPoint num="15" id="2152" /> -<TGConnectingPoint num="16" id="2153" /> -<TGConnectingPoint num="17" id="2154" /> -<TGConnectingPoint num="18" id="2155" /> -<TGConnectingPoint num="19" id="2156" /> -<TGConnectingPoint num="20" id="2157" /> -<TGConnectingPoint num="21" id="2158" /> -<TGConnectingPoint num="22" id="2159" /> -<TGConnectingPoint num="23" id="2160" /> -<TGConnectingPoint num="24" id="2161" /> -<TGConnectingPoint num="25" id="2162" /> -<TGConnectingPoint num="26" id="2163" /> -<TGConnectingPoint num="27" id="2164" /> -<TGConnectingPoint num="28" id="2165" /> -<TGConnectingPoint num="29" id="2166" /> -<TGConnectingPoint num="30" id="2167" /> -<TGConnectingPoint num="31" id="2168" /> -<TGConnectingPoint num="32" id="2169" /> -<TGConnectingPoint num="33" id="2170" /> -<TGConnectingPoint num="34" id="2171" /> -<TGConnectingPoint num="35" id="2172" /> -<TGConnectingPoint num="36" id="2173" /> -<TGConnectingPoint num="37" id="2174" /> -<TGConnectingPoint num="38" id="2175" /> -<TGConnectingPoint num="39" id="2176" /> -<extraparam> -</extraparam> -</SUBCOMPONENT> -<SUBCOMPONENT type="5106" id="2218" > -<father id="2341" num="3" /> <cdparam x="855" y="587" /> <sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="541" minY="0" maxY="391" /> <infoparam name="state0" value="OPEN" /> -<TGConnectingPoint num="0" id="2178" /> -<TGConnectingPoint num="1" id="2179" /> -<TGConnectingPoint num="2" id="2180" /> -<TGConnectingPoint num="3" id="2181" /> -<TGConnectingPoint num="4" id="2182" /> -<TGConnectingPoint num="5" id="2183" /> -<TGConnectingPoint num="6" id="2184" /> -<TGConnectingPoint num="7" id="2185" /> -<TGConnectingPoint num="8" id="2186" /> -<TGConnectingPoint num="9" id="2187" /> -<TGConnectingPoint num="10" id="2188" /> -<TGConnectingPoint num="11" id="2189" /> -<TGConnectingPoint num="12" id="2190" /> -<TGConnectingPoint num="13" id="2191" /> -<TGConnectingPoint num="14" id="2192" /> -<TGConnectingPoint num="15" id="2193" /> -<TGConnectingPoint num="16" id="2194" /> -<TGConnectingPoint num="17" id="2195" /> -<TGConnectingPoint num="18" id="2196" /> -<TGConnectingPoint num="19" id="2197" /> -<TGConnectingPoint num="20" id="2198" /> -<TGConnectingPoint num="21" id="2199" /> -<TGConnectingPoint num="22" id="2200" /> -<TGConnectingPoint num="23" id="2201" /> -<TGConnectingPoint num="24" id="2202" /> -<TGConnectingPoint num="25" id="2203" /> -<TGConnectingPoint num="26" id="2204" /> -<TGConnectingPoint num="27" id="2205" /> -<TGConnectingPoint num="28" id="2206" /> -<TGConnectingPoint num="29" id="2207" /> -<TGConnectingPoint num="30" id="2208" /> -<TGConnectingPoint num="31" id="2209" /> -<TGConnectingPoint num="32" id="2210" /> -<TGConnectingPoint num="33" id="2211" /> -<TGConnectingPoint num="34" id="2212" /> -<TGConnectingPoint num="35" id="2213" /> -<TGConnectingPoint num="36" id="2214" /> -<TGConnectingPoint num="37" id="2215" /> -<TGConnectingPoint num="38" id="2216" /> -<TGConnectingPoint num="39" id="2217" /> -<extraparam> -</extraparam> -</SUBCOMPONENT> -<SUBCOMPONENT type="5106" id="2259" > +<TGConnectingPoint num="0" id="2176" /> +<TGConnectingPoint num="1" id="2177" /> +<TGConnectingPoint num="2" id="2178" /> +<TGConnectingPoint num="3" id="2179" /> +<TGConnectingPoint num="4" id="2180" /> +<TGConnectingPoint num="5" id="2181" /> +<TGConnectingPoint num="6" id="2182" /> +<TGConnectingPoint num="7" id="2183" /> +<TGConnectingPoint num="8" id="2184" /> +<TGConnectingPoint num="9" id="2185" /> +<TGConnectingPoint num="10" id="2186" /> +<TGConnectingPoint num="11" id="2187" /> +<TGConnectingPoint num="12" id="2188" /> +<TGConnectingPoint num="13" id="2189" /> +<TGConnectingPoint num="14" id="2190" /> +<TGConnectingPoint num="15" id="2191" /> +<TGConnectingPoint num="16" id="2192" /> +<TGConnectingPoint num="17" id="2193" /> +<TGConnectingPoint num="18" id="2194" /> +<TGConnectingPoint num="19" id="2195" /> +<TGConnectingPoint num="20" id="2196" /> +<TGConnectingPoint num="21" id="2197" /> +<TGConnectingPoint num="22" id="2198" /> +<TGConnectingPoint num="23" id="2199" /> +<TGConnectingPoint num="24" id="2200" /> +<TGConnectingPoint num="25" id="2201" /> +<TGConnectingPoint num="26" id="2202" /> +<TGConnectingPoint num="27" id="2203" /> +<TGConnectingPoint num="28" id="2204" /> +<TGConnectingPoint num="29" id="2205" /> +<TGConnectingPoint num="30" id="2206" /> +<TGConnectingPoint num="31" id="2207" /> +<TGConnectingPoint num="32" id="2208" /> +<TGConnectingPoint num="33" id="2209" /> +<TGConnectingPoint num="34" id="2210" /> +<TGConnectingPoint num="35" id="2211" /> +<TGConnectingPoint num="36" id="2212" /> +<TGConnectingPoint num="37" id="2213" /> +<TGConnectingPoint num="38" id="2214" /> +<TGConnectingPoint num="39" id="2215" /> +<extraparam> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="5106" id="2257" > +<father id="2341" num="3" /> +<cdparam x="559" y="595" /> +<sizeparam width="198" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<hidden value="false" /> +<cdrectangleparam minX="0" maxX="443" minY="0" maxY="391" /> +<infoparam name="state0" value="FAULT_AND_OPEN" /> +<TGConnectingPoint num="0" id="2217" /> +<TGConnectingPoint num="1" id="2218" /> +<TGConnectingPoint num="2" id="2219" /> +<TGConnectingPoint num="3" id="2220" /> +<TGConnectingPoint num="4" id="2221" /> +<TGConnectingPoint num="5" id="2222" /> +<TGConnectingPoint num="6" id="2223" /> +<TGConnectingPoint num="7" id="2224" /> +<TGConnectingPoint num="8" id="2225" /> +<TGConnectingPoint num="9" id="2226" /> +<TGConnectingPoint num="10" id="2227" /> +<TGConnectingPoint num="11" id="2228" /> +<TGConnectingPoint num="12" id="2229" /> +<TGConnectingPoint num="13" id="2230" /> +<TGConnectingPoint num="14" id="2231" /> +<TGConnectingPoint num="15" id="2232" /> +<TGConnectingPoint num="16" id="2233" /> +<TGConnectingPoint num="17" id="2234" /> +<TGConnectingPoint num="18" id="2235" /> +<TGConnectingPoint num="19" id="2236" /> +<TGConnectingPoint num="20" id="2237" /> +<TGConnectingPoint num="21" id="2238" /> +<TGConnectingPoint num="22" id="2239" /> +<TGConnectingPoint num="23" id="2240" /> +<TGConnectingPoint num="24" id="2241" /> +<TGConnectingPoint num="25" id="2242" /> +<TGConnectingPoint num="26" id="2243" /> +<TGConnectingPoint num="27" id="2244" /> +<TGConnectingPoint num="28" id="2245" /> +<TGConnectingPoint num="29" id="2246" /> +<TGConnectingPoint num="30" id="2247" /> +<TGConnectingPoint num="31" id="2248" /> +<TGConnectingPoint num="32" id="2249" /> +<TGConnectingPoint num="33" id="2250" /> +<TGConnectingPoint num="34" id="2251" /> +<TGConnectingPoint num="35" id="2252" /> +<TGConnectingPoint num="36" id="2253" /> +<TGConnectingPoint num="37" id="2254" /> +<TGConnectingPoint num="38" id="2255" /> +<TGConnectingPoint num="39" id="2256" /> +<extraparam> +</extraparam> +</SUBCOMPONENT> +<SUBCOMPONENT type="5100" id="2259" > <father id="2341" num="4" /> -<cdparam x="938" y="469" /> -<sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="829" y="325" /> +<sizeparam width="15" height="15" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="541" minY="0" maxY="391" /> -<infoparam name="state0" value="FAULT" /> -<TGConnectingPoint num="0" id="2219" /> -<TGConnectingPoint num="1" id="2220" /> -<TGConnectingPoint num="2" id="2221" /> -<TGConnectingPoint num="3" id="2222" /> -<TGConnectingPoint num="4" id="2223" /> -<TGConnectingPoint num="5" id="2224" /> -<TGConnectingPoint num="6" id="2225" /> -<TGConnectingPoint num="7" id="2226" /> -<TGConnectingPoint num="8" id="2227" /> -<TGConnectingPoint num="9" id="2228" /> -<TGConnectingPoint num="10" id="2229" /> -<TGConnectingPoint num="11" id="2230" /> -<TGConnectingPoint num="12" id="2231" /> -<TGConnectingPoint num="13" id="2232" /> -<TGConnectingPoint num="14" id="2233" /> -<TGConnectingPoint num="15" id="2234" /> -<TGConnectingPoint num="16" id="2235" /> -<TGConnectingPoint num="17" id="2236" /> -<TGConnectingPoint num="18" id="2237" /> -<TGConnectingPoint num="19" id="2238" /> -<TGConnectingPoint num="20" id="2239" /> -<TGConnectingPoint num="21" id="2240" /> -<TGConnectingPoint num="22" id="2241" /> -<TGConnectingPoint num="23" id="2242" /> -<TGConnectingPoint num="24" id="2243" /> -<TGConnectingPoint num="25" id="2244" /> -<TGConnectingPoint num="26" id="2245" /> -<TGConnectingPoint num="27" id="2246" /> -<TGConnectingPoint num="28" id="2247" /> -<TGConnectingPoint num="29" id="2248" /> -<TGConnectingPoint num="30" id="2249" /> -<TGConnectingPoint num="31" id="2250" /> -<TGConnectingPoint num="32" id="2251" /> -<TGConnectingPoint num="33" id="2252" /> -<TGConnectingPoint num="34" id="2253" /> -<TGConnectingPoint num="35" id="2254" /> -<TGConnectingPoint num="36" id="2255" /> -<TGConnectingPoint num="37" id="2256" /> -<TGConnectingPoint num="38" id="2257" /> -<TGConnectingPoint num="39" id="2258" /> -<extraparam> -</extraparam> +<cdrectangleparam minX="0" maxX="626" minY="0" maxY="426" /> +<infoparam name="start state" value="null" /> +<TGConnectingPoint num="0" id="2258" /> </SUBCOMPONENT> <SUBCOMPONENT type="5106" id="2300" > <father id="2341" num="5" /> -<cdparam x="568" y="455" /> +<cdparam x="775" y="387" /> <sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="0" maxX="541" minY="0" maxY="391" /> -<infoparam name="state0" value="IDLE" /> +<infoparam name="state0" value="Test" /> <TGConnectingPoint num="0" id="2260" /> <TGConnectingPoint num="1" id="2261" /> <TGConnectingPoint num="2" id="2262" /> diff --git a/modeling/AVATAR/faulttreetest.xml b/modeling/AVATAR/faulttreetest.xml index 992b21a87ce74352497b6d8b4b42b3d7eca1f7a5..2b542604d9042378324be652deb2ddbb1cacac48 100644 --- a/modeling/AVATAR/faulttreetest.xml +++ b/modeling/AVATAR/faulttreetest.xml @@ -143,7 +143,7 @@ <infoparam name="connector" value="" /> <TGConnectingPoint num="0" id="70" /> <P1 x="315" y="244" id="179" /> -<P2 x="297" y="135" id="144" /> +<P2 x="315" y="180" id="144" /> <AutomaticDrawing data="true" /> </CONNECTOR> <CONNECTOR type="6001" id="73" > @@ -170,7 +170,7 @@ <infoparam name="connector" value="" /> <TGConnectingPoint num="0" id="76" /> <P1 x="615" y="383" id="211" /> -<P2 x="692" y="397" id="167" /> +<P2 x="733" y="380" id="167" /> <AutomaticDrawing data="true" /> </CONNECTOR> <COMPONENT type="6102" id="90" > @@ -228,7 +228,7 @@ <TGConnectingPoint num="22" id="113" /> <TGConnectingPoint num="23" id="114" /> <extraparam> -<info description="blah blah blah" root="false" /> +<info description="blah blah blah" root="false" probability="0.5" /> </extraparam> </COMPONENT> @@ -264,12 +264,12 @@ <TGConnectingPoint num="22" id="138" /> <TGConnectingPoint num="23" id="139" /> <extraparam> -<info description="blah blah blah" root="false" /> +<info description="blah blah blah" root="false" probability="0.5" /> </extraparam> </COMPONENT> <COMPONENT type="6101" id="165" > -<cdparam x="238" y="95" /> +<cdparam x="256" y="140" /> <sizeparam width="118" height="40" minWidth="100" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> @@ -301,12 +301,12 @@ <TGConnectingPoint num="23" id="164" /> <accessibility /> <extraparam> -<info description="blah blah blah" root="true" /> +<info description="blah blah blah" root="true" probability="0.5" /> </extraparam> </COMPONENT> <COMPONENT type="6103" id="178" > -<cdparam x="704" y="378" /> +<cdparam x="745" y="361" /> <sizeparam width="164" height="39" minWidth="78" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1601" minY="10" maxY="962" /> @@ -335,7 +335,7 @@ <sizeparam width="148" height="48" minWidth="99" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1601" minY="10" maxY="962" /> -<infoparam name="TGComponent" value="<<AND>>" /> +<infoparam name="TGComponent" value="<<VOTE>>" /> <TGConnectingPoint num="0" id="179" /> <TGConnectingPoint num="1" id="180" /> <TGConnectingPoint num="2" id="181" /> @@ -349,7 +349,7 @@ <TGConnectingPoint num="10" id="189" /> <TGConnectingPoint num="11" id="190" /> <extraparam> -<info equation="" index="2" /> +<info equation="" index="7" /> </extraparam> </COMPONENT> @@ -386,7 +386,7 @@ <TGConnectingPoint num="23" id="215" /> <accessibility /> <extraparam> -<info description="blah blah blah" root="false" /> +<info description="blah blah blah" root="false" probability="0.4" /> </extraparam> </COMPONENT> diff --git a/src/main/java/avatartranslator/AvatarTransition.java b/src/main/java/avatartranslator/AvatarTransition.java index 17f9a594e7d7a5ae02b5cd795ce8cd01f27578b6..910050a3145a216ed39bd951f2503cd69708e6c7 100644 --- a/src/main/java/avatartranslator/AvatarTransition.java +++ b/src/main/java/avatartranslator/AvatarTransition.java @@ -37,12 +37,8 @@ */ - - package avatartranslator; -import myutil.TraceManager; - import java.util.Iterator; import java.util.LinkedList; @@ -50,25 +46,28 @@ import java.util.LinkedList; /** * Class AvatarTransition * Creation: 20/05/2010 - * @version 1.0 20/05/2010 + * * @author Ludovic APVRILLE + * @version 1.0 20/05/2010 */ public class AvatarTransition extends AvatarStateMachineElement { // Type management: to be used by code generators public static final int UNDEFINED = -1; - + public static final int TYPE_SEND_SYNC = 0; public static final int TYPE_RECV_SYNC = 1; - + public static final int TYPE_ACTIONONLY = 2; public static final int TYPE_EMPTY = 3; public static final int TYPE_METHODONLY = 4; public static final int TYPE_ACTION_AND_METHOD = 5; + public static final double DEFAULT_PROBABILITY = 0.5; + public int type = UNDEFINED; - + private double probability = DEFAULT_PROBABILITY; private AvatarGuard guard; private String minDelay = "", maxDelay = ""; private String minCompute = "", maxCompute = ""; @@ -76,10 +75,10 @@ public class AvatarTransition extends AvatarStateMachineElement { private LinkedList<AvatarAction> actions; // actions on variable, or method call - public AvatarTransition (AvatarStateMachineOwner _block, String _name, Object _referenceObject) { + public AvatarTransition(AvatarStateMachineOwner _block, String _name, Object _referenceObject) { super(_name, _referenceObject); actions = new LinkedList<AvatarAction>(); - this.guard = new AvatarGuardEmpty (); + this.guard = new AvatarGuardEmpty(); this.block = _block; } @@ -91,15 +90,19 @@ public class AvatarTransition extends AvatarStateMachineElement { this.guard = _guard; } - public void setGuard (String _guard) { - this.guard = AvatarGuard.createFromString (this.block, _guard); - //TraceManager.addDev("Setting guard = " + guard); + public void setGuard(String _guard) { + this.guard = AvatarGuard.createFromString(this.block, _guard); + //TraceManager.addDev("Setting guard = " + guard); + } + + public void setProbability(double _probability) { + probability = _probability; } public void addGuard(String _g) { - AvatarGuard guard = AvatarGuard.createFromString (this.block, _g); - //TraceManager.addDev("Adding guard = " + guard); - this.guard = AvatarGuard.addGuard (this.guard, guard, "and"); + AvatarGuard guard = AvatarGuard.createFromString(this.block, _g); + //TraceManager.addDev("Adding guard = " + guard); + this.guard = AvatarGuard.addGuard(this.guard, guard, "and"); } public int getNbOfAction() { @@ -107,53 +110,53 @@ public class AvatarTransition extends AvatarStateMachineElement { } public static boolean isActionType(int _type) { - return ((_type == TYPE_ACTIONONLY) || (_type == TYPE_METHODONLY) || (_type == TYPE_ACTION_AND_METHOD)); + return ((_type == TYPE_ACTIONONLY) || (_type == TYPE_METHODONLY) || (_type == TYPE_ACTION_AND_METHOD)); } public boolean hasMethod() { - for(AvatarAction aa: actions) { - if (aa.containsAMethodCall()) { - return true; - } - } - return false; + for (AvatarAction aa : actions) { + if (aa.containsAMethodCall()) { + return true; + } + } + return false; } public boolean hasAction() { - for(AvatarAction aa: actions) { - if (!(aa.containsAMethodCall())) { - return true; - } - } - return false; + for (AvatarAction aa : actions) { + if (!(aa.containsAMethodCall())) { + return true; + } + } + return false; } - public LinkedList<AvatarAction> getActions () { + public LinkedList<AvatarAction> getActions() { return this.actions; } - public AvatarStateMachineOwner getBlock () { + public AvatarStateMachineOwner getBlock() { return this.block; } - private <T extends AvatarAction> Iterable<T> getIterableForClass (final Class<T> childClass) { - return new Iterable<T> () { + private <T extends AvatarAction> Iterable<T> getIterableForClass(final Class<T> childClass) { + return new Iterable<T>() { @Override - public Iterator<T> iterator () { - return new Iterator<T> () { - private Iterator<AvatarAction> actions = AvatarTransition.this.actions.iterator (); + public Iterator<T> iterator() { + return new Iterator<T>() { + private Iterator<AvatarAction> actions = AvatarTransition.this.actions.iterator(); private boolean hasCached = false; private T cached; @Override - public boolean hasNext () { + public boolean hasNext() { if (this.hasCached) return true; - while (this.actions.hasNext ()) { - AvatarAction action = this.actions.next (); - if (childClass.isInstance (action)) { + while (this.actions.hasNext()) { + AvatarAction action = this.actions.next(); + if (childClass.isInstance(action)) { this.hasCached = true; - this.cached = childClass.cast (action); + this.cached = childClass.cast(action); return true; } } @@ -161,36 +164,36 @@ public class AvatarTransition extends AvatarStateMachineElement { } @Override - public T next () { + public T next() { if (this.hasCached) { this.hasCached = false; return this.cached; } - while (this.actions.hasNext ()) { - AvatarAction action = this.actions.next (); - if (childClass.isInstance (action)) - return childClass.cast (action); + while (this.actions.hasNext()) { + AvatarAction action = this.actions.next(); + if (childClass.isInstance(action)) + return childClass.cast(action); } return null; } @Override - public void remove () { - throw new UnsupportedOperationException (); + public void remove() { + throw new UnsupportedOperationException(); } }; } }; } - public Iterable<AvatarTermFunction> getFunctionCalls () { - return this.getIterableForClass (AvatarTermFunction.class); + public Iterable<AvatarTermFunction> getFunctionCalls() { + return this.getIterableForClass(AvatarTermFunction.class); } - public Iterable<AvatarActionAssignment> getAssignments () { - return this.getIterableForClass (AvatarActionAssignment.class); + public Iterable<AvatarActionAssignment> getAssignments() { + return this.getIterableForClass(AvatarActionAssignment.class); } public AvatarAction getAction(int _index) { @@ -198,15 +201,15 @@ public class AvatarTransition extends AvatarStateMachineElement { } public void addAction(String _action) { - AvatarAction aa = AvatarTerm.createActionFromString (block, _action); - //TraceManager.addDev("**************************** Avatar action : " + aa); + AvatarAction aa = AvatarTerm.createActionFromString(block, _action); + //TraceManager.addDev("**************************** Avatar action : " + aa); if (aa != null) actions.add(aa); } - public void addAction (AvatarAction _action) { + public void addAction(AvatarAction _action) { if (_action != null) - this.actions.add (_action); + this.actions.add(_action); } public void setDelays(String _minDelay, String _maxDelay) { @@ -224,7 +227,7 @@ public class AvatarTransition extends AvatarStateMachineElement { } public String getMaxDelay() { - if (maxDelay.trim().length() ==0) { + if (maxDelay.trim().length() == 0) { return getMinDelay(); } return maxDelay; @@ -235,10 +238,11 @@ public class AvatarTransition extends AvatarStateMachineElement { } public String getMaxCompute() { - if (maxCompute.trim().length() ==0) { + if (maxCompute.trim().length() == 0) { return getMinCompute(); } - return maxCompute; } + return maxCompute; + } public boolean hasElseGuard() { if (guard == null) { @@ -252,7 +256,7 @@ public class AvatarTransition extends AvatarStateMachineElement { if (guard == null) return false; - return !guard.isGuarded (); + return !guard.isGuarded(); } public boolean isEmpty() { @@ -260,24 +264,23 @@ public class AvatarTransition extends AvatarStateMachineElement { return false; } - return (actions.size() == 0); + return (actions.size() == 0); } - public AvatarTransition cloneMe() { AvatarTransition at = new AvatarTransition(block, getName(), getReferenceObject()); at.setGuard(getGuard()); at.setDelays(getMinDelay(), getMaxDelay()); at.setComputes(getMinCompute(), getMaxCompute()); - //TraceManager.addDev("-------------- Cloning actions of " + this); - for(int i=0; i<getNbOfAction(); i++) { - //TraceManager.addDev("-------------- Cloning actions:" + getAction(i)); + //TraceManager.addDev("-------------- Cloning actions of " + this); + for (int i = 0; i < getNbOfAction(); i++) { + //TraceManager.addDev("-------------- Cloning actions:" + getAction(i)); at.addAction(getAction(i)); } - for(int i=0; i<nbOfNexts(); i++) { + for (int i = 0; i < nbOfNexts(); i++) { at.addNext(getNext(i)); } @@ -285,25 +288,25 @@ public class AvatarTransition extends AvatarStateMachineElement { } public AvatarStateMachineElement basicCloneMe(AvatarStateMachineOwner _block) { - AvatarTransition at = new AvatarTransition(_block, getName() + "_clone", getReferenceObject()); + AvatarTransition at = new AvatarTransition(_block, getName() + "_clone", getReferenceObject()); at.setGuard(getGuard()); - //TraceManager.addDev("Cloning actions of " + this); - for(int i=0; i<getNbOfAction(); i++) { - //TraceManager.addDev("-------------- Cloning actions:" + getAction(i)); + //TraceManager.addDev("Cloning actions of " + this); + for (int i = 0; i < getNbOfAction(); i++) { + //TraceManager.addDev("-------------- Cloning actions:" + getAction(i)); at.addAction(getAction(i)); } at.setComputes(getMinCompute(), getMaxCompute()); - at.setDelays(getMinDelay(), getMaxDelay()); + at.setDelays(getMinDelay(), getMaxDelay()); return at; } /*public AvatarStateMachineElement basicCloneMe() { }*/ - + public void removeAllActionsButTheFirstOne() { if (actions.size() < 2) { return; @@ -329,7 +332,7 @@ public class AvatarTransition extends AvatarStateMachineElement { if (guard == null) return false; - return guard.isGuarded (); + return guard.isGuarded(); } public boolean hasDelay() { @@ -345,8 +348,8 @@ public class AvatarTransition extends AvatarStateMachineElement { return false; } - for(AvatarAction a: actions) { - if (a.toString ().trim().length() > 0) { + for (AvatarAction a : actions) { + if (a.toString().trim().length() > 0) { return true; } } @@ -364,16 +367,16 @@ public class AvatarTransition extends AvatarStateMachineElement { ret += "minCompute=" + getMinCompute() + " maxcompute=" + getMaxCompute() + "\n"; } - for(AvatarAction a: actions) { - String s = a.toString (); + for (AvatarAction a : actions) { + String s = a.toString(); if (s.trim().length() > 0) { ret += s.trim() + " / "; } } - String s = guard.toString (); - if (s.trim().length() > 0) { - ret +="guard " + s.trim() + " / "; - } + String s = guard.toString(); + if (s.trim().length() > 0) { + ret += "guard " + s.trim() + " / "; + } if (ret.length() > 0) { ret = "\n" + ret; } @@ -385,7 +388,7 @@ public class AvatarTransition extends AvatarStateMachineElement { // Assumes actions are correctly formatted public boolean hasMethodCall() { - for(AvatarAction action: actions) + for (AvatarAction action : actions) if (action.isAMethodCall()) return true; @@ -393,7 +396,7 @@ public class AvatarTransition extends AvatarStateMachineElement { } public String toString() { - return toString(getNiceName()); + return toString(getNiceName()); } public String getNiceName() { @@ -410,7 +413,7 @@ public class AvatarTransition extends AvatarStateMachineElement { return "Empty transition"; } - public void translate (AvatarTranslator translator, Object arg) { - translator.translateTransition (this, arg); + public void translate(AvatarTranslator translator, Object arg) { + translator.translateTransition(this, arg); } } diff --git a/src/main/java/ui/ftd/FTDFault.java b/src/main/java/ui/ftd/FTDFault.java index a13ce491804a9741e3a6f80a898e048ba4481613..b3c6103b533104b01f7c275e91ae3161fa08b1a3 100644 --- a/src/main/java/ui/ftd/FTDFault.java +++ b/src/main/java/ui/ftd/FTDFault.java @@ -68,6 +68,8 @@ import java.awt.*; */ public class FTDFault extends TGCScalableWithInternalComponent implements SwallowedTGComponent, WithAttributes, CheckableAccessibility, CanBeDisabled { + public static double DEFAULT_PROBABILITY = 0.5; + private int textY1 = 3; // private int textY2 = 3; @@ -76,6 +78,7 @@ public class FTDFault extends TGCScalableWithInternalComponent implements Swallo protected String oldValue = ""; protected String description = ""; + protected double probability = DEFAULT_PROBABILITY; private String stereotype = "fault"; private String rootStereotype = "root fault"; private boolean isRootFault = false; @@ -316,11 +319,16 @@ public class FTDFault extends TGCScalableWithInternalComponent implements Swallo } } - if (dialog.getDescription() != null) { description = dialog.getDescription(); } + if (dialog.getProbability() != null) { + probability = new Double(dialog.getProbability()).doubleValue(); + } + + + isRootFault = dialog.isRootFault(); if (error) { @@ -348,7 +356,8 @@ public class FTDFault extends TGCScalableWithInternalComponent implements Swallo protected String translateExtraParam() { StringBuffer sb = new StringBuffer("<extraparam>\n"); sb.append("<info description=\"" + description); - sb.append("\" root=\"" +isRootFault); + sb.append("\" root=\"" + isRootFault); + sb.append("\" probability=\"" + probability); sb.append("\" />\n"); sb.append("</extraparam>\n"); return new String(sb); @@ -366,6 +375,7 @@ public class FTDFault extends TGCScalableWithInternalComponent implements Swallo String sdescription = null; // String prio; String isRoot = null; + String sproba = null; for(int i=0; i<nl.getLength(); i++) { n1 = nl.item(i); @@ -380,6 +390,12 @@ public class FTDFault extends TGCScalableWithInternalComponent implements Swallo if (elt.getTagName().equals("info")) { sdescription = elt.getAttribute("description"); isRoot = elt.getAttribute("root"); + try { + sproba = elt.getAttribute("probability"); + } catch (Exception e) { + probability = DEFAULT_PROBABILITY; + sproba = null; + } } if (sdescription != null) { description = sdescription; @@ -387,6 +403,14 @@ public class FTDFault extends TGCScalableWithInternalComponent implements Swallo if (isRoot != null) { isRootFault = isRoot.toUpperCase().compareTo("TRUE") == 0; } + if (sproba != null) { + try { + probability = new Double(sproba).doubleValue(); + } catch (Exception e) { + probability = DEFAULT_PROBABILITY; + sproba = null; + } + } } } } @@ -398,6 +422,10 @@ public class FTDFault extends TGCScalableWithInternalComponent implements Swallo } + public double getProbability() { + return probability; + } + public String getDescription() { return description; } diff --git a/src/main/java/ui/window/JDialogFault.java b/src/main/java/ui/window/JDialogFault.java index f51a0dc8c032391d3210dcb99178979ebf322c0a..5509dfae54dcbc4fccce6c6d9d7df3da8d8cee0f 100755 --- a/src/main/java/ui/window/JDialogFault.java +++ b/src/main/java/ui/window/JDialogFault.java @@ -67,7 +67,7 @@ public class JDialogFault extends JDialogBase implements ActionListener { private Frame frame; //protected JTextField taskName; - protected JTextField name, description; + protected JTextField name, description, probability; protected JCheckBox isRootFault; private FTDFault fault; @@ -115,6 +115,13 @@ public class JDialogFault extends JDialogBase implements ActionListener { isRootFault.setSelected(fault.isRootFault()); panel2.add(isRootFault, c1); + c1.gridwidth = 1; + c1.fill = GridBagConstraints.HORIZONTAL; + panel2.add(new JLabel("Probability (<1):"), c2); + c1.gridwidth = GridBagConstraints.REMAINDER; //end row + probability = new JTextField(""+fault.getProbability()); + panel2.add(probability, c1); + c1.gridwidth = 1; c1.fill = GridBagConstraints.HORIZONTAL; panel2.add(new JLabel("Name:"), c2); @@ -171,6 +178,10 @@ public class JDialogFault extends JDialogBase implements ActionListener { return description.getText(); } + public String getProbability() { + return probability.getText(); + } + public String getName() { return name.getText(); }