diff --git a/examples/README b/examples/README index 07a03466eae8006ecb108a86e53c3461af46a5de..f459ad1fccfb5704d4f58937f823d974b02df8e2 100644 --- a/examples/README +++ b/examples/README @@ -27,7 +27,11 @@ ui and smi directories) "make; make install" -8) execute inside bin directory: +8) create symbolic link to user.cfg from processor matching configuration file in +common/config: +e.g. "ln -s ../../common/config/user.cfg.i7 ./user.cfg" + +9) execute inside bin directory: for PREEMPT_RT: @@ -37,6 +41,10 @@ configure: build: "make" +create symbolic link to start.sh from processor matching script in +common/scripts: +e.g. "ln -s ../../common/scripts/start.sh.i7 ./start.sh" + start run-time environment: "sudo ./start.sh" @@ -65,7 +73,7 @@ kill run-time environment: CTRL-C "sudo ./rtaicleanup.sh" -8) state transitions can be monitored with "make debug" in the esm directory +10) state transitions can be monitored with "make debug" in the esm directory of the example --------------------------------- diff --git a/examples/common/config/user.cfg.i7 b/examples/common/config/user.cfg.i7 new file mode 100644 index 0000000000000000000000000000000000000000..064ae65122ee5b738a8b4a51a2fec6fd43285044 --- /dev/null +++ b/examples/common/config/user.cfg.i7 @@ -0,0 +1,9 @@ +150000 RTSLEEP_TOLERANCE +120000 TASK_SLOT_TIME_TOLERANCE +1 DELAY_CORRECTION +0 PRINT_STATES +15 1 0 0 0 0 0 0 0 0 0 0 0 -10 0 0 NUMBER_OF_PROCESSES PRIORITIES -20..19 +localhost ESM_GUI +nil ESM_GUI TELEM +1 FREE_CPU +5000 NANOSLEEP_UNIT diff --git a/examples/common/esminterf_base.xml b/examples/common/esminterf_base.xml index f1fb8984c2acc96c82c0d72b5b90d7abd798eeee..0dd02be46c4419ccb8a56c92f09977c20e322f7e 100644 --- a/examples/common/esminterf_base.xml +++ b/examples/common/esminterf_base.xml @@ -2,7 +2,6 @@ <!-- duration unit: nano seconds --> <task-declarations> - <task name="smi" duration="250000" oneshot="no" non-realtime="no" realtime="yes"> <input-flags> </input-flags> @@ -14,30 +13,8 @@ <output-ports> </output-ports> </task> - - <task name="rtSuspend" duration="250000" oneshot="no" non-realtime="no" realtime="yes"> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - </task> - - <task name="rtSuspend2" duration="250000" oneshot="no" non-realtime="no" realtime="yes"> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - </task> - - <task name="quit" duration="5000" oneshot="yes" non-realtime="no" realtime="yes"> + + <task name="quit" duration="40000" oneshot="yes" non-realtime="no" realtime="yes"> <input-flags> </input-flags> <output-flags> @@ -76,7 +53,6 @@ <task name="inputKeyboard" duration="0" oneshot="no" non-realtime="yes" realtime="no"> <input-flags> - <flag name="quitChar" /> </input-flags> <output-flags> <flag name="0" /> @@ -86,7 +62,7 @@ <flag name="4" /> <flag name="5" /> <flag name="6" /> - <flag name="7" /> + <flag name="quit" /> </output-flags> <input-ports> </input-ports> @@ -153,10 +129,11 @@ <flag name="smiLogOverflow" /> </output-flags> <input-ports> + <port name="smiTelem" allocation="no" release="no" write="no" read="yes" optional="yes" type="smiTelemStruct" /> </input-ports> <output-ports> - <port name="log" allocation="no" release="no" write="yes" read="no" optional="yes" type="logStruct" argpos="0" /> - <port name="smiTelem" allocation="no" release="no" write="yes" read="no" optional="yes" type="smiTelemStruct" argpos="1" /> + <port name="log" allocation="no" release="no" write="yes" read="no" optional="yes" type="logStruct" /> + <port name="smiTelem_" allocation="no" release="no" write="yes" read="no" optional="yes" type="smiTelemStruct" /> </output-ports> </task> @@ -182,7 +159,7 @@ <input-ports> </input-ports> <output-ports> - <port name="logNRT" allocation="yes" release="no" write="no" read="no" optional="no" type="logStruct" argpos="0" /> + <port name="logNRT" allocation="yes" release="no" write="yes" read="no" optional="no" type="logStruct" argpos="0" /> </output-ports> </task> @@ -243,30 +220,30 @@ </output-ports> </task> - <task name="createProcessID" duration="0" oneshot="no" non-realtime="yes" realtime="no"> + <task name="createProcessId" duration="0" oneshot="no" non-realtime="yes" realtime="no"> <input-flags> - <flag name="process1" /> - <flag name="process2" /> - <flag name="process3" /> - <flag name="process4" /> - <flag name="process5" /> - <flag name="process6" /> - <flag name="process7" /> - <flag name="process8" /> + <flag name="bit0" /> + <flag name="bit1" /> + <flag name="bit2" /> + <flag name="bit3" /> </input-flags> <output-flags> </output-flags> <input-ports> </input-ports> <output-ports> - <port name="nrtProcessID" allocation="yes" release="no" write="yes" read="no" optional="no" type="processType" argpos="0" /> + <port name="nrtProcessID" allocation="yes" release="no" write="yes" read="no" optional="no" type="processType" /> </output-ports> </task> - <task name="createProcess" duration="0" oneshot="no" non-realtime="yes" realtime="no"> + <task name="createProcess" duration="0" oneshot="yes" non-realtime="yes" realtime="no"> <input-flags> <flag name="debug" /> <flag name="core02" /> + <flag name="core0" /> + <flag name="core1" /> + <flag name="core2" /> + <flag name="core3" /> </input-flags> <output-flags> <flag name="error" /> @@ -295,7 +272,7 @@ <output-flags> </output-flags> <input-ports> - <port name="nrtProcessID" allocation="no" release="no" write="no" read="yes" optional="no" type="processType" argpos="0" /> + <port name="nrtProcessID" allocation="no" release="no" write="no" read="yes" optional="yes" type="processType" argpos="0" /> </input-ports> <output-ports> </output-ports> @@ -324,22 +301,7 @@ <port name="smiTelem" allocation="yes" release="no" write="yes" read="no" optional="no" type="smiTelemStruct" argpos="0" /> </output-ports> </task> - - <task name="getKey" duration="0" oneshot="no" non-realtime="yes" realtime="no"> - <input-flags> - </input-flags> - <output-flags> - <flag name="quit" /> - <flag name="debug" /> - <flag name="log" /> - </output-flags> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - </task> - - <task name="getQuitChar" duration="2000" oneshot="yes" non-realtime="no" realtime="yes"> + <task name="setQuitChar" duration="2000" oneshot="yes" non-realtime="no" realtime="yes"> <input-flags> </input-flags> <output-flags> @@ -351,28 +313,54 @@ </output-ports> </task> - <task name="shutdown" duration="0" oneshot="no" non-realtime="yes" realtime="no"> + <task name="gsLogSave" duration="0" oneshot="no" non-realtime="yes" realtime="no"> <input-flags> + <flag name="init" /> + <flag name="last" /> </input-flags> <output-flags> + <flag name="error" /> </output-flags> <input-ports> </input-ports> <output-ports> + <port name="logNRT" allocation="no" release="no" write="yes" read="no" optional="no" type="logStruct" /> </output-ports> </task> - <task name="gsLogSave" duration="0" oneshot="no" non-realtime="yes" realtime="no"> + <task name="rtclock" duration="10000" oneshot="no" non-realtime="no" realtime="yes"> + <input-flags> + </input-flags> + <output-flags> + <flag name="busy" /> + <flag name="unlocked" /> + </output-flags> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + </task> + <task name="readClockNRT" duration="0" oneshot="no" non-realtime="yes" realtime="no"> + <input-flags> + </input-flags> + <output-flags> + <flag name="unlocked" /> + </output-flags> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + </task> + + <task name="testEndianess" duration="5000" oneshot="yes" non-realtime="yes" realtime="yes"> <input-flags> - <flag name="init" /> </input-flags> <output-flags> - <flag name="error" /> + <flag name="littleEndian" /> </output-flags> <input-ports> </input-ports> <output-ports> - <port name="logNRT" allocation="no" release="no" write="yes" read="no" optional="no" type="logStruct" /> </output-ports> </task> diff --git a/examples/common/esminterf_serial.xml b/examples/common/esminterf_serial.xml index 4793dcbafbefde659cf1d5c2d908a59ed28ee1a3..c6461fd7d1580fff0a4dff564aefa55b83e0c110 100644 --- a/examples/common/esminterf_serial.xml +++ b/examples/common/esminterf_serial.xml @@ -26,9 +26,9 @@ <port name="comWrite" allocation="yes" release="no" write="no" read="no" optional="no" type="comWStruct" argpos="3" /> </output-ports> </task> - <task name="serialOpenComPort" duration="90000" oneshot="yes" non-realtime="no" realtime="yes"> <input-flags> + <flag name="noMCR" /> </input-flags> <output-flags> <flag name="done" /> @@ -42,9 +42,9 @@ <output-ports> </output-ports> </task> - - <task name="serialCloseComPort" duration="40000" oneshot="yes" non-realtime="no" realtime="yes"> + <task name="serialCloseComPort" duration="60000" oneshot="yes" non-realtime="no" realtime="yes"> <input-flags> + <flag name="noMCR" /> </input-flags> <output-flags> </output-flags> @@ -54,7 +54,6 @@ <output-ports> </output-ports> </task> - <task name="serialSetComPar" duration="80000" oneshot="yes" non-realtime="no" realtime="yes"> <input-flags> <flag name="b0" /> @@ -76,11 +75,12 @@ </output-ports> </task> - <task name="serialReadWriteCom12B10B" duration="120000" oneshot="no" non-realtime="no" realtime="yes"> + <task name="serialReadWriteCom12B10B" duration="90000" oneshot="no" non-realtime="no" realtime="yes"> <input-flags> <flag name="check" /> </input-flags> <output-flags> + <flag name="overrun" /> </output-flags> <input-ports> <port name="ioRegionId" allocation="no" release="no" write="no" read="yes" optional="no" type="int" argpos="0" /> @@ -117,10 +117,11 @@ </output-ports> </task> - <task name="serialReadWriteCom12B5B" duration="100000" oneshot="no" non-realtime="no" realtime="yes"> + <task name="serialReadWriteCom12B5B" duration="120000" oneshot="no" non-realtime="no" realtime="yes"> <input-flags> </input-flags> <output-flags> + <flag name="overrun" /> </output-flags> <input-ports> <port name="ioRegionId" allocation="no" release="no" write="no" read="yes" optional="no" type="int" argpos="0" /> @@ -131,7 +132,7 @@ </output-ports> </task> - <task name="serialReadCom12B" duration="120000" oneshot="no" non-realtime="no" realtime="yes"> + <task name="serialReadCom12B" duration="125000" oneshot="no" non-realtime="no" realtime="yes"> <input-flags> </input-flags> <output-flags> @@ -144,7 +145,7 @@ </output-ports> </task> - <task name="serialWriteCom10B" duration="55000" oneshot="no" non-realtime="no" realtime="yes"> + <task name="serialWriteCom10B" duration="100000" oneshot="no" non-realtime="no" realtime="yes"> <input-flags> </input-flags> <output-flags> diff --git a/examples/common/esmlib/debug.esm b/examples/common/esmlib/debug.esm index d61517011a486983002d74a7d8e8eb61af352ee7..7d154d11487f38213687f0a105e4dd249f429dbe 100644 --- a/examples/common/esmlib/debug.esm +++ b/examples/common/esmlib/debug.esm @@ -1,6 +1,7 @@ <?xml version="1.0"?> <esmcontainer uuid="{f1f44589-694b-4d48-ba82-62625c71c8be}" name="debug" cloned-from="" comment="" scene-width="0" scene-height="0"> <data-storage-list> + <data-storage uuid="{27556139-0f62-436d-8024-b88c7ad09131}" name="processID2" comment=""/> </data-storage-list> <input-ports> </input-ports> @@ -13,14 +14,20 @@ <output-flags> </output-flags> <container-events> - <event uuid="{acd1f689-b0e8-497d-b7f0-7484c3e7cf3f}" name="debugOff" comment=""/> <event uuid="{208bc082-d4fc-45ff-8c8a-f77d60cca61f}" name="debugError" comment=""/> + <event uuid="{acd1f689-b0e8-497d-b7f0-7484c3e7cf3f}" name="debugOff" comment=""/> <event uuid="{e711d06d-fcb3-457a-8db9-d3c15c61d8bd}" name="debugOn" comment=""/> + <event uuid="{8bcc67e8-e8f3-419f-ba25-3f4c64a9bf5a}" name="quadCore" comment=""/> + <event uuid="{61023f40-bd9c-4278-a933-f684c1237745}" name="reqConfig" comment=""/> + <event uuid="{46af78bf-4d73-4e2b-88ca-ae4fc8d531b0}" name="singleCore" comment=""/> </container-events> <input-events> + <event-ref uuid="{46af78bf-4d73-4e2b-88ca-ae4fc8d531b0}" name="singleCore"/> + <event-ref uuid="{8bcc67e8-e8f3-419f-ba25-3f4c64a9bf5a}" name="quadCore"/> </input-events> <output-events> <event-ref uuid="{acd1f689-b0e8-497d-b7f0-7484c3e7cf3f}" name="debugOff"/> + <event-ref uuid="{61023f40-bd9c-4278-a933-f684c1237745}" name="reqConfig"/> </output-events> <global-events> <event uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}" name="PULSEEVENT" type="pulseevent" comment=""/> @@ -33,7 +40,7 @@ <flag uuid="{4d11bc04-49c7-480a-a171-30e8118137ec}" name="Timeout" comment="" type="timeout"/> </system-flags> </initial-state> - <task-state uuid="{74d79760-605b-4748-858d-02dc6aa0dce3}" name="connect" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="sendSMILog" task-slot-name="system" process-name="system" real-time="0"> + <task-state uuid="{74d79760-605b-4748-858d-02dc6aa0dce3}" name="connect" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="sendSMILog" task-slot-name="" process-name="debug" real-time="0"> <input-ports> </input-ports> <output-ports> @@ -52,11 +59,11 @@ <flag uuid="{9a14451f-40bd-4874-9df8-d7a046878dab}" name="Busy" comment="" type="busy"/> </system-flags> </task-state> - <basic-state uuid="{7cbfb3e7-7076-4100-8f93-3c3841ec7e93}" name="error" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <basic-state uuid="{7cbfb3e7-7076-4100-8f93-3c3841ec7e93}" name="error" comment="" timeout="5000" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> <flag uuid="{b307e42d-9186-4869-8a49-42eeec2f7d1b}" name="Timeout" comment="" type="timeout"/> </system-flags> </basic-state> - <task-state uuid="{33f68ae0-250a-4613-a8ca-25bd833d78d0}" name="sendSMILog" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="0" task-function="sendSMILog" task-slot-name="system" process-name="system" real-time="0"> + <task-state uuid="{33f68ae0-250a-4613-a8ca-25bd833d78d0}" name="sendSMILog" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="0" task-function="sendSMILog" task-slot-name="" process-name="debug" real-time="0"> <input-ports> </input-ports> <output-ports> @@ -75,7 +82,7 @@ <flag uuid="{16160425-079a-4b43-be36-6ae0ebf5910a}" name="Busy" comment="" type="busy"/> </system-flags> </task-state> - <task-state uuid="{f5a882fa-ad8c-41e0-8788-033d5f5cbe7a}" name="lastDebugMsg" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="sendSMILog" task-slot-name="system" process-name="system" real-time="0"> + <task-state uuid="{f5a882fa-ad8c-41e0-8788-033d5f5cbe7a}" name="lastDebugMsg" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="sendSMILog" task-slot-name="" process-name="debug" real-time="0"> <input-ports> </input-ports> <output-ports> @@ -99,23 +106,112 @@ <flag uuid="{8d696831-1748-4ff8-b68a-fcff4603f439}" name="Timeout" comment="" type="timeout"/> </system-flags> </basic-state> + <task-state uuid="{ba47f610-5e1a-48fc-9dff-dd3530782ee4}" name="createProcess" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="createProcess" task-slot-name="" process-name="system" real-time="0"> + <input-ports> + <port uuid="{33ec004b-9937-45ec-9c30-837b3b78c001}" name="nrtProcessID" comment="" data-storage-uuid="{27556139-0f62-436d-8024-b88c7ad09131}" optional="0" allocation="0" release="0" read="1" write="0"/> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + <flag uuid="{79fafb2c-c114-42ed-bd34-8a27ab045207}" name="debug" comment="" type="user_defined"/> + <flag uuid="{efaf6255-45bd-4c53-8aef-3589c4dc570f}" name="core02" comment="" type="user_defined"/> + <flag uuid="{96be8a97-3c8e-49a0-a5ab-f2fba41f8cb7}" name="core0" comment="" type="user_defined"/> + <flag uuid="{c25b2c10-b8b3-400a-abbd-8ef69959c585}" name="core1" comment="" type="user_defined"/> + <flag uuid="{74ddfc52-757b-4e74-87bf-a5bebeda7315}" name="core2" comment="" type="user_defined"/> + </input-flags> + <output-flags> + <flag uuid="{dd41f6e7-33c6-4fea-9e9a-da5ab809d1ee}" name="error" comment="" type="user_defined"/> + </output-flags> + <system-flags> + <flag uuid="{662a25bd-6100-4e2a-8285-877d8740cf4a}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{8022a295-42cd-47c9-8a95-78bbc049a37c}" name="Exit" comment="" type="exit"/> + <flag uuid="{8f211721-94de-46da-b47f-c98d886ffdb4}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + <task-state uuid="{4031d45d-1066-4ca8-9b63-45e3bba67f40}" name="testProcess" comment="" timeout="10000" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="testProcess" task-slot-name="" process-name="debug" real-time="0"> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + </output-flags> + <system-flags> + <flag uuid="{5f817699-f09b-4e04-8d89-e198004e8b55}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{64a8673b-06a9-4b49-8ed2-6cfdb9bd61ac}" name="Exit" comment="" type="exit"/> + <flag uuid="{3f60c3f1-2245-4521-b6fd-ab8efbebaf5c}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + <task-state uuid="{4f6ca39d-9d13-4085-afd5-3cc5240438ee}" name="killProcess" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="killProcess" task-slot-name="" process-name="system" real-time="0"> + <input-ports> + <port uuid="{0a4e15f6-54a7-4489-b7e5-cdfbc58f52fc}" name="nrtProcessID" comment="" data-storage-uuid="{27556139-0f62-436d-8024-b88c7ad09131}" optional="0" allocation="0" release="0" read="1" write="0"/> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + </output-flags> + <system-flags> + <flag uuid="{1b7fe9a9-f1ac-4edb-8150-a6dd9ab3ea9d}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{7e741c76-2ef7-4d65-a363-6154a02919c2}" name="Exit" comment="" type="exit"/> + <flag uuid="{86e1e4db-12fa-412f-a313-9e30a80b9d3a}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + <basic-state uuid="{62bd3e2c-4fc3-4223-813c-df4f899f3228}" name="process error" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{f32f6acb-d672-43ee-9f50-e056223b8ccc}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + <basic-state uuid="{ffbdf2b4-ffc0-480a-9ac8-718194b22c85}" name="" comment="" timeout="100" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{5baa9a41-71d9-49cf-bc87-eff8b7e4c18f}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + <basic-state uuid="{4c71d9bb-7154-40db-8c00-5ab1a6d3918e}" name="multi core" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{e95109ab-c84b-4cab-bd04-2abfd802bc73}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + <basic-state uuid="{c1ce98eb-eed0-4244-b40c-e76fd43d364b}" name="error" comment="" timeout="1000" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{211c9cb7-6b50-4158-9175-00ae8a63d420}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + <task-state uuid="{91403f81-6e8e-436d-8877-1fc55725c2cf}" name="createProcessId" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="createProcessId" task-slot-name="" process-name="system" real-time="0"> + <input-ports> + </input-ports> + <output-ports> + <port uuid="{731cba44-c836-44f0-a174-83640266ba6b}" name="nrtProcessID" comment="" data-storage-uuid="{27556139-0f62-436d-8024-b88c7ad09131}" optional="0" allocation="1" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + <flag uuid="{9b3fcbe3-d087-46e3-ad32-dc61d7d7cc6c}" name="bit0" comment="" type="user_defined"/> + <flag uuid="{acc7ec69-f178-4683-9ce2-1543cd84bc73}" name="bit1" comment="" type="user_defined"/> + <flag uuid="{fffe0223-4449-4108-b5c8-cd30d7a45887}" name="bit2" comment="" type="user_defined"/> + <flag uuid="{20f109d1-7cee-4a3c-bf5b-b8c0db9fbbc4}" name="bit3" comment="" type="user_defined"/> + </input-flags> + <output-flags> + </output-flags> + <system-flags> + <flag uuid="{50f762b0-ba06-4b43-9e19-3bf664fdca94}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{f043dc90-deb9-42bb-bd08-125fa9b561e5}" name="Exit" comment="" type="exit"/> + <flag uuid="{2b0467a2-fa81-4217-88cb-5cd348f606f5}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> </states> <transitions> - <transition uuid="{85b8c93c-4e98-4d0d-beb4-df2870310250}" comment="" from-state-uuid="{4bd3b704-9fa2-45bc-a873-d5fa4b3d0328}" to-state-uuid="{74d79760-605b-4748-858d-02dc6aa0dce3}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <transition uuid="{85b8c93c-4e98-4d0d-beb4-df2870310250}" comment="" from-state-uuid="{4bd3b704-9fa2-45bc-a873-d5fa4b3d0328}" to-state-uuid="{91403f81-6e8e-436d-8877-1fc55725c2cf}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> <actions> - <set-flag-action uuid="{f602b6b0-3d71-4571-954f-5812649fb374}" name="set flag init" comment="" flag-uuid="{fa87c7d7-1811-42d1-bd12-e826104c283c}" flag-value="1"/> + <set-flag-action uuid="{44293713-b730-4e24-add8-9bde981d9f5b}" name="" comment="" flag-uuid="{acc7ec69-f178-4683-9ce2-1543cd84bc73}" flag-value="0"/> </actions> <guard operator="none" flag-uuid="{121acff7-9ba4-44e3-891f-4aa1589ef10c}"/> </transition> <transition uuid="{96dc3cf8-38fb-4206-916d-d52000df8041}" comment="" from-state-uuid="{74d79760-605b-4748-858d-02dc6aa0dce3}" to-state-uuid="{7cbfb3e7-7076-4100-8f93-3c3841ec7e93}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> <actions> - <send-event-action uuid="{8e034115-5317-4828-819e-4e71c0fccfa2}" name="debugError" comment="" event-uuid="{208bc082-d4fc-45ff-8c8a-f77d60cca61f}"/> + <send-event-action uuid="{8e034115-5317-4828-819e-4e71c0fccfa2}" name="" comment="" event-uuid="{208bc082-d4fc-45ff-8c8a-f77d60cca61f}"/> </actions> <guard operator="none" flag-uuid="{31b35aa2-4360-49ad-afd5-325e74da766b}"/> </transition> <transition uuid="{f293a9d6-3dbc-4733-894d-e491b45e2f45}" comment="" from-state-uuid="{74d79760-605b-4748-858d-02dc6aa0dce3}" to-state-uuid="{33f68ae0-250a-4613-a8ca-25bd833d78d0}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> <actions> - <send-event-action uuid="{a94bf936-c093-4245-aedd-24fc765a75bd}" name="debugOn" comment="" event-uuid="{e711d06d-fcb3-457a-8db9-d3c15c61d8bd}"/> + <send-event-action uuid="{a94bf936-c093-4245-aedd-24fc765a75bd}" name="" comment="" event-uuid="{e711d06d-fcb3-457a-8db9-d3c15c61d8bd}"/> </actions> <guard operator="and" flag-uuid=""> <guard operator="none" flag-uuid="{407fb6d6-baa6-407f-99f1-0d6ce59d11f2}"/> @@ -128,29 +224,28 @@ </actions> <guard operator="none" flag-uuid="{5ff26d0e-2448-4f0d-87ab-d8da70a973a3}"/> </transition> - <transition uuid="{74be964c-e87b-4739-a77b-28db69a23afe}" comment="" from-state-uuid="{7cbfb3e7-7076-4100-8f93-3c3841ec7e93}" to-state-uuid="{f5a882fa-ad8c-41e0-8788-033d5f5cbe7a}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <transition uuid="{74be964c-e87b-4739-a77b-28db69a23afe}" comment="" from-state-uuid="{7cbfb3e7-7076-4100-8f93-3c3841ec7e93}" to-state-uuid="{4f6ca39d-9d13-4085-afd5-3cc5240438ee}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> <actions> - <set-flag-action uuid="{cc88d505-7c07-4cb2-9430-12d423a88dd5}" name="set flag exit" comment="" flag-uuid="{91e45665-3806-4fc9-91d8-45962201cf43}" flag-value="1"/> </actions> <guard operator="none" flag-uuid="{5ff26d0e-2448-4f0d-87ab-d8da70a973a3}"/> </transition> - <transition uuid="{2485d464-a76d-4a90-ae2c-599285aca3b2}" comment="" from-state-uuid="{f5a882fa-ad8c-41e0-8788-033d5f5cbe7a}" to-state-uuid="{302dc21e-d843-437c-b737-2f64d35a065e}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <transition uuid="{2485d464-a76d-4a90-ae2c-599285aca3b2}" comment="" from-state-uuid="{f5a882fa-ad8c-41e0-8788-033d5f5cbe7a}" to-state-uuid="{4f6ca39d-9d13-4085-afd5-3cc5240438ee}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> <actions> </actions> -<guard operator="and" flag-uuid=""> <guard operator="none" flag-uuid="{03eb22b2-4569-497e-9182-d835a974c7e5}"/> -<guard operator="none" flag-uuid="{5ff26d0e-2448-4f0d-87ab-d8da70a973a3}"/> -</guard> </transition> - <transition uuid="{bca33421-10de-4781-946d-12d1c01de34b}" comment="" from-state-uuid="{33f68ae0-250a-4613-a8ca-25bd833d78d0}" to-state-uuid="{7cbfb3e7-7076-4100-8f93-3c3841ec7e93}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <transition uuid="{bca33421-10de-4781-946d-12d1c01de34b}" comment="" from-state-uuid="{33f68ae0-250a-4613-a8ca-25bd833d78d0}" to-state-uuid="{c1ce98eb-eed0-4244-b40c-e76fd43d364b}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> <actions> - <send-event-action uuid="{b53b1731-501c-498b-a28e-e1b35c27f721}" name="debugError" comment="" event-uuid="{208bc082-d4fc-45ff-8c8a-f77d60cca61f}"/> + <send-event-action uuid="{b53b1731-501c-498b-a28e-e1b35c27f721}" name="" comment="" event-uuid="{208bc082-d4fc-45ff-8c8a-f77d60cca61f}"/> </actions> +<guard operator="and" flag-uuid=""> <guard operator="none" flag-uuid="{aadb3387-0718-4251-92aa-b7793af66f95}"/> +<guard operator="negation" flag-uuid="{5ff26d0e-2448-4f0d-87ab-d8da70a973a3}"/> +</guard> </transition> <transition uuid="{c0b5e7d8-d83c-403e-8811-40715bdd4a9f}" comment="" from-state-uuid="{4bd3b704-9fa2-45bc-a873-d5fa4b3d0328}" to-state-uuid="{f201a9cf-ce6b-4e36-8226-8e434b9e1102}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> <actions> - <send-event-action uuid="{6733c7a3-f9f8-45c5-b063-028e95e7f8ac}" name="debugOff" comment="" event-uuid="{acd1f689-b0e8-497d-b7f0-7484c3e7cf3f}"/> + <send-event-action uuid="{6733c7a3-f9f8-45c5-b063-028e95e7f8ac}" name="" comment="" event-uuid="{acd1f689-b0e8-497d-b7f0-7484c3e7cf3f}"/> </actions> <guard operator="negation" flag-uuid="{121acff7-9ba4-44e3-891f-4aa1589ef10c}"/> </transition> @@ -159,6 +254,84 @@ </actions> <guard operator="none" flag-uuid="{5ff26d0e-2448-4f0d-87ab-d8da70a973a3}"/> </transition> + <transition uuid="{d58a62c1-cd25-439d-b0eb-54b0fac7d073}" comment="" from-state-uuid="{4031d45d-1066-4ca8-9b63-45e3bba67f40}" to-state-uuid="{74d79760-605b-4748-858d-02dc6aa0dce3}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + <set-flag-action uuid="{8612198e-6c10-4785-ace9-c3e825672da9}" name="" comment="" flag-uuid="{fa87c7d7-1811-42d1-bd12-e826104c283c}" flag-value="0"/> + </actions> +<guard operator="none" flag-uuid="{64a8673b-06a9-4b49-8ed2-6cfdb9bd61ac}"/> + </transition> + <transition uuid="{ca1fb0d6-e299-4ce9-af7d-2d092b20bdb0}" comment="" from-state-uuid="{4031d45d-1066-4ca8-9b63-45e3bba67f40}" to-state-uuid="{62bd3e2c-4fc3-4223-813c-df4f899f3228}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{5f817699-f09b-4e04-8d89-e198004e8b55}"/> + </transition> + <transition uuid="{6d29d5b9-b41c-4785-a3cf-b2855e517d2f}" comment="" from-state-uuid="{4f6ca39d-9d13-4085-afd5-3cc5240438ee}" to-state-uuid="{302dc21e-d843-437c-b737-2f64d35a065e}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{7e741c76-2ef7-4d65-a363-6154a02919c2}"/> + </transition> + <transition uuid="{64ce8532-a38b-40f0-bc4b-94bed05f30e6}" comment="" from-state-uuid="{4c71d9bb-7154-40db-8c00-5ab1a6d3918e}" to-state-uuid="{ba47f610-5e1a-48fc-9dff-dd3530782ee4}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + <set-flag-action uuid="{8b6f72dc-4245-44e2-b036-247ded8ecc68}" name="" comment="" flag-uuid="{efaf6255-45bd-4c53-8aef-3589c4dc570f}" flag-value="0"/> + </actions> + </transition> + <transition uuid="{7e9878ce-6708-44d2-a85f-267c1e4983bc}" comment="" from-state-uuid="{ba47f610-5e1a-48fc-9dff-dd3530782ee4}" to-state-uuid="{4031d45d-1066-4ca8-9b63-45e3bba67f40}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + </actions> +<guard operator="and" flag-uuid=""> +<guard operator="none" flag-uuid="{8022a295-42cd-47c9-8a95-78bbc049a37c}"/> +<guard operator="negation" flag-uuid="{dd41f6e7-33c6-4fea-9e9a-da5ab809d1ee}"/> +</guard> + </transition> + <transition uuid="{1b1b555c-1966-42fc-b20f-1404f32f463f}" comment="" from-state-uuid="{ba47f610-5e1a-48fc-9dff-dd3530782ee4}" to-state-uuid="{62bd3e2c-4fc3-4223-813c-df4f899f3228}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{dd41f6e7-33c6-4fea-9e9a-da5ab809d1ee}"/> + </transition> + <transition uuid="{2a6cebe0-3274-4af5-8170-17a80ac1f325}" comment="" from-state-uuid="{62bd3e2c-4fc3-4223-813c-df4f899f3228}" to-state-uuid="{4f6ca39d-9d13-4085-afd5-3cc5240438ee}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{5ff26d0e-2448-4f0d-87ab-d8da70a973a3}"/> + </transition> + <transition uuid="{953511cf-156d-4cb6-883b-cec1b82803d0}" comment="" from-state-uuid="{ffbdf2b4-ffc0-480a-9ac8-718194b22c85}" to-state-uuid="{ba47f610-5e1a-48fc-9dff-dd3530782ee4}" event-uuid="{46af78bf-4d73-4e2b-88ca-ae4fc8d531b0}"> + <actions> + </actions> + </transition> + <transition uuid="{2bb42942-b815-432f-b1d6-ac5d7bd801c7}" comment="" from-state-uuid="{91403f81-6e8e-436d-8877-1fc55725c2cf}" to-state-uuid="{ffbdf2b4-ffc0-480a-9ac8-718194b22c85}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + <send-event-action uuid="{115106a5-2e64-4b64-8fa8-b8e2113f0c23}" name="" comment="" event-uuid="{61023f40-bd9c-4278-a933-f684c1237745}"/> + </actions> +<guard operator="none" flag-uuid="{f043dc90-deb9-42bb-bd08-125fa9b561e5}"/> + </transition> + <transition uuid="{e83a9c23-3ef2-4e19-a6b3-f264f06ac803}" comment="" from-state-uuid="{ffbdf2b4-ffc0-480a-9ac8-718194b22c85}" to-state-uuid="{4c71d9bb-7154-40db-8c00-5ab1a6d3918e}" event-uuid="{8bcc67e8-e8f3-419f-ba25-3f4c64a9bf5a}"> + <actions> + </actions> + </transition> + <transition uuid="{4877c56b-accc-46f3-a0c8-3118d0382715}" comment="" from-state-uuid="{7cbfb3e7-7076-4100-8f93-3c3841ec7e93}" to-state-uuid="{74d79760-605b-4748-858d-02dc6aa0dce3}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + <set-flag-action uuid="{857c6c6b-2632-4863-8ad3-f6dda76c022f}" name="" comment="" flag-uuid="{fa87c7d7-1811-42d1-bd12-e826104c283c}" flag-value="0"/> + </actions> +<guard operator="and" flag-uuid=""> +<guard operator="none" flag-uuid="{b307e42d-9186-4869-8a49-42eeec2f7d1b}"/> +<guard operator="negation" flag-uuid="{5ff26d0e-2448-4f0d-87ab-d8da70a973a3}"/> +</guard> + </transition> + <transition uuid="{005765cb-18c8-4447-8bf0-c6f9e39e118a}" comment="" from-state-uuid="{c1ce98eb-eed0-4244-b40c-e76fd43d364b}" to-state-uuid="{33f68ae0-250a-4613-a8ca-25bd833d78d0}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{211c9cb7-6b50-4158-9175-00ae8a63d420}"/> + </transition> + <transition uuid="{8424309b-cb2d-4995-8475-e8bde31d9809}" comment="" from-state-uuid="{c1ce98eb-eed0-4244-b40c-e76fd43d364b}" to-state-uuid="{f5a882fa-ad8c-41e0-8788-033d5f5cbe7a}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + <set-flag-action uuid="{1f15955a-d20b-4220-b525-c3168faeb5a1}" name="" comment="" flag-uuid="{91e45665-3806-4fc9-91d8-45962201cf43}" flag-value="0"/> + </actions> +<guard operator="none" flag-uuid="{5ff26d0e-2448-4f0d-87ab-d8da70a973a3}"/> + </transition> + <transition uuid="{ab9e8384-2b6e-4166-ac1f-871c7d9d5e76}" comment="" from-state-uuid="{ffbdf2b4-ffc0-480a-9ac8-718194b22c85}" to-state-uuid="{302dc21e-d843-437c-b737-2f64d35a065e}" event-uuid="{83a98365-5a8f-45b5-8576-cfa0ffed72fa}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{5baa9a41-71d9-49cf-bc87-eff8b7e4c18f}"/> + </transition> </transitions> </region> </regions> @@ -169,11 +342,23 @@ <box-item uuid="{fbaeaba4-1c69-439f-8dca-12410bac9289}" comment="" model-uuid="{74d79760-605b-4748-858d-02dc6aa0dce3}" x="-424" y="-263" width="100" height="50" type="standard_box"/> <box-item uuid="{e6ca51e9-694a-48b7-b949-6f38f1e08fd6}" comment="" model-uuid="{7cbfb3e7-7076-4100-8f93-3c3841ec7e93}" x="-255" y="-136" width="100" height="50" type="standard_box"/> <box-item uuid="{3bc7afc7-314b-46a5-a500-9f0afd53e653}" comment="" model-uuid="{33f68ae0-250a-4613-a8ca-25bd833d78d0}" x="-416" y="9" width="100" height="50" type="standard_box"/> - <box-item uuid="{c61471ae-3912-414a-ab23-378b5e333cd8}" comment="" model-uuid="{f5a882fa-ad8c-41e0-8788-033d5f5cbe7a}" x="-130" y="10" width="100" height="50" type="standard_box"/> - <box-item uuid="{8d17a765-1915-4da8-94a6-54f708c4428b}" comment="" model-uuid="{302dc21e-d843-437c-b737-2f64d35a065e}" x="52" y="-124" width="20" height="20" type="standard_box"/> + <box-item uuid="{c61471ae-3912-414a-ab23-378b5e333cd8}" comment="" model-uuid="{f5a882fa-ad8c-41e0-8788-033d5f5cbe7a}" x="-130" y="11" width="100" height="50" type="standard_box"/> + <box-item uuid="{8d17a765-1915-4da8-94a6-54f708c4428b}" comment="" model-uuid="{302dc21e-d843-437c-b737-2f64d35a065e}" x="41" y="-116" width="20" height="20" type="standard_box"/> <box-item uuid="{844cce22-a6db-432e-bf53-d5e5327fcd6f}" comment="" model-uuid="{f201a9cf-ce6b-4e36-8226-8e434b9e1102}" x="-259" y="-308" width="100" height="50" type="standard_box"/> - <transition-item uuid="{5fe18987-ed22-4ffd-b200-1798584f04a9}" comment="" model-uuid="{85b8c93c-4e98-4d0d-beb4-df2870310250}" start-anchor-pos-x="-1" start-anchor-pos-y="4" end-anchor-pos-x="4" end-anchor-pos-y="-25"> - <control-point x="-421" y="-381"/> + <box-item uuid="{a4174392-d625-4dc4-b041-a39f1d079502}" comment="" model-uuid="{ba47f610-5e1a-48fc-9dff-dd3530782ee4}" x="154" y="-243" width="100" height="50" type="standard_box"/> + <box-item uuid="{42929cc0-cab4-4d26-9c3e-386650cb64db}" comment="" model-uuid="{33ec004b-9937-45ec-9c30-837b3b78c001}" x="50" y="1" width="10" height="10" type="standard_box"/> + <box-item uuid="{614427b5-2e4a-45d5-8965-7c4d25d07871}" comment="" model-uuid="{4031d45d-1066-4ca8-9b63-45e3bba67f40}" x="148" y="-146" width="100" height="50" type="standard_box"/> + <box-item uuid="{31212679-9162-4ad0-ae51-8f768163434d}" comment="" model-uuid="{4f6ca39d-9d13-4085-afd5-3cc5240438ee}" x="153" y="-39" width="100" height="50" type="standard_box"/> + <box-item uuid="{a3902ba9-b6d2-4cd7-866a-15f0ae8e558e}" comment="" model-uuid="{0a4e15f6-54a7-4489-b7e5-cdfbc58f52fc}" x="50" y="-4" width="10" height="10" type="standard_box"/> + <box-item uuid="{d3067953-f3ab-49db-8bbb-5ecf99f22b41}" comment="" model-uuid="{62bd3e2c-4fc3-4223-813c-df4f899f3228}" x="368" y="-153" width="100" height="50" type="standard_box"/> + <box-item uuid="{8662d0a2-c171-4e10-a2f1-7de662cc1c29}" comment="" model-uuid="{ffbdf2b4-ffc0-480a-9ac8-718194b22c85}" x="146" y="-311" width="24" height="28" type="standard_box"/> + <box-item uuid="{1b06ac83-2d36-4d56-883b-900432c01957}" comment="" model-uuid="{4c71d9bb-7154-40db-8c00-5ab1a6d3918e}" x="-11" y="-333" width="84" height="30" type="standard_box"/> + <box-item uuid="{6c131d50-93ce-469c-88cb-deed843a81d0}" comment="" model-uuid="{c1ce98eb-eed0-4244-b40c-e76fd43d364b}" x="-254" y="139" width="100" height="50" type="standard_box"/> + <box-item uuid="{101af541-ac49-4936-8220-2cdfa54fc695}" comment="" model-uuid="{91403f81-6e8e-436d-8877-1fc55725c2cf}" x="159" y="-384" width="100" height="50" type="standard_box"/> + <box-item uuid="{2bab7eaa-1444-4811-8f85-111d8c17f2e5}" comment="" model-uuid="{731cba44-c836-44f0-a174-83640266ba6b}" x="50" y="2" width="10" height="10" type="standard_box"/> + <data-storage-item uuid="{654b9f9e-b9b3-4967-9569-9a0648329ddf}" description="" comment="" model-uuid="{27556139-0f62-436d-8024-b88c7ad09131}" region-uuid="{96646b44-5d46-487b-b91a-ef3a3a4aaee3}" x="346" y="-388" width="86" height="28"/> + <transition-item uuid="{5fe18987-ed22-4ffd-b200-1798584f04a9}" comment="" model-uuid="{85b8c93c-4e98-4d0d-beb4-df2870310250}" start-anchor-pos-x="-1" start-anchor-pos-y="4" end-anchor-pos-x="-50" end-anchor-pos-y="2"> + <control-point x="-218" y="-401"/> </transition-item> <transition-item uuid="{4ac75f66-9981-4c7e-bf52-06c8a30b43ce}" comment="" model-uuid="{96dc3cf8-38fb-4206-916d-d52000df8041}" start-anchor-pos-x="49" start-anchor-pos-y="-3" end-anchor-pos-x="-4" end-anchor-pos-y="-25"> <control-point x="-268" y="-218"/> @@ -184,13 +369,13 @@ <transition-item uuid="{69b0431d-b2d6-45bb-ab96-f2be00b04e9f}" comment="" model-uuid="{f27332da-c4d9-4267-96a9-e179b09098d5}" start-anchor-pos-x="49" start-anchor-pos-y="4" end-anchor-pos-x="-50" end-anchor-pos-y="2"> <control-point x="-357" y="13"/> </transition-item> - <transition-item uuid="{103dda5d-d742-4ef0-84bb-bad920840ed4}" comment="" model-uuid="{74be964c-e87b-4739-a77b-28db69a23afe}" start-anchor-pos-x="49" start-anchor-pos-y="1" end-anchor-pos-x="-2" end-anchor-pos-y="-25"> + <transition-item uuid="{103dda5d-d742-4ef0-84bb-bad920840ed4}" comment="" model-uuid="{74be964c-e87b-4739-a77b-28db69a23afe}" start-anchor-pos-x="49" start-anchor-pos-y="1" end-anchor-pos-x="-50" end-anchor-pos-y="-9"> <control-point x="-170" y="-130"/> </transition-item> - <transition-item uuid="{2e7978fe-cb61-4404-ab53-d8123f254e1b}" comment="" model-uuid="{2485d464-a76d-4a90-ae2c-599285aca3b2}" start-anchor-pos-x="49" start-anchor-pos-y="-1" end-anchor-pos-x="-3" end-anchor-pos-y="9"> + <transition-item uuid="{2e7978fe-cb61-4404-ab53-d8123f254e1b}" comment="" model-uuid="{2485d464-a76d-4a90-ae2c-599285aca3b2}" start-anchor-pos-x="49" start-anchor-pos-y="-1" end-anchor-pos-x="-50" end-anchor-pos-y="1"> <control-point x="-18" y="-8"/> </transition-item> - <transition-item uuid="{26fae839-5758-4d11-982b-ce2f05737979}" comment="" model-uuid="{bca33421-10de-4781-946d-12d1c01de34b}" start-anchor-pos-x="49" start-anchor-pos-y="-13" end-anchor-pos-x="-3" end-anchor-pos-y="24"> + <transition-item uuid="{26fae839-5758-4d11-982b-ce2f05737979}" comment="" model-uuid="{bca33421-10de-4781-946d-12d1c01de34b}" start-anchor-pos-x="49" start-anchor-pos-y="-13" end-anchor-pos-x="0" end-anchor-pos-y="-25"> <control-point x="-267" y="-48"/> </transition-item> <transition-item uuid="{1917ed38-4a40-41c8-a92d-bfff82b90b40}" comment="" model-uuid="{c0b5e7d8-d83c-403e-8811-40715bdd4a9f}" start-anchor-pos-x="4" start-anchor-pos-y="2" end-anchor-pos-x="-6" end-anchor-pos-y="-25"> @@ -199,6 +384,51 @@ <transition-item uuid="{19e1481e-3073-4e5d-a429-4a0c17d119db}" comment="" model-uuid="{1ce192c6-ea1c-454d-b96f-0bfd73d3a056}" start-anchor-pos-x="49" start-anchor-pos-y="-14" end-anchor-pos-x="0" end-anchor-pos-y="-10"> <control-point x="-9" y="-276"/> </transition-item> + <transition-item uuid="{23722a73-9332-4db4-97cb-4495f3eeb38f}" comment="" model-uuid="{d58a62c1-cd25-439d-b0eb-54b0fac7d073}" start-anchor-pos-x="-50" start-anchor-pos-y="2" end-anchor-pos-x="50" end-anchor-pos-y="-12"> + <control-point x="-145.5" y="-245.5"/> + </transition-item> + <transition-item uuid="{bccbd6c0-07f3-4254-9c61-ae00e390e5b4}" comment="" model-uuid="{ca1fb0d6-e299-4ce9-af7d-2d092b20bdb0}" start-anchor-pos-x="50" start-anchor-pos-y="-5" end-anchor-pos-x="-50" end-anchor-pos-y="1"> + <control-point x="238.5" y="-149"/> + </transition-item> + <transition-item uuid="{788123ec-d573-4e70-9e07-3a4dfbb3f8be}" comment="" model-uuid="{6d29d5b9-b41c-4785-a3cf-b2855e517d2f}" start-anchor-pos-x="2" start-anchor-pos-y="-25" end-anchor-pos-x="1" end-anchor-pos-y="10"> + <control-point x="135" y="-91.5"/> + </transition-item> + <transition-item uuid="{be03cb67-84da-4192-8ad6-f908e029dc5c}" comment="" model-uuid="{64ce8532-a38b-40f0-bc4b-94bed05f30e6}" start-anchor-pos-x="3" start-anchor-pos-y="15" end-anchor-pos-x="-23" end-anchor-pos-y="-25"> + <control-point x="40" y="-298"/> + </transition-item> + <transition-item uuid="{e26c96b9-8812-4ae0-9d56-6e9fb64be8a9}" comment="" model-uuid="{7e9878ce-6708-44d2-a85f-267c1e4983bc}" start-anchor-pos-x="0" start-anchor-pos-y="25" end-anchor-pos-x="7" end-anchor-pos-y="-25"> + <control-point x="154.5" y="-195.5"/> + </transition-item> + <transition-item uuid="{f1a3ca5f-3100-4dbc-89ab-cfee9f291ff5}" comment="" model-uuid="{1b1b555c-1966-42fc-b20f-1404f32f463f}" start-anchor-pos-x="50" start-anchor-pos-y="9" end-anchor-pos-x="-4" end-anchor-pos-y="-25"> + <control-point x="265.5" y="-233"/> + </transition-item> + <transition-item uuid="{19dd6399-d6bd-4bff-a52a-415f5433fcca}" comment="" model-uuid="{2a6cebe0-3274-4af5-8170-17a80ac1f325}" start-anchor-pos-x="-6" start-anchor-pos-y="25" end-anchor-pos-x="50" end-anchor-pos-y="-13"> + <control-point x="316" y="-76"/> + </transition-item> + <transition-item uuid="{27b4d49e-da6a-48d8-bc37-d5af63f34b7e}" comment="" model-uuid="{953511cf-156d-4cb6-883b-cec1b82803d0}" start-anchor-pos-x="12" start-anchor-pos-y="2" end-anchor-pos-x="31" end-anchor-pos-y="-25"> + <control-point x="204" y="-293"/> + </transition-item> + <transition-item uuid="{d1d26b77-d691-4f4b-949b-eeb406a6d3e6}" comment="" model-uuid="{2bb42942-b815-432f-b1d6-ac5d7bd801c7}" start-anchor-pos-x="-8" start-anchor-pos-y="25" end-anchor-pos-x="0" end-anchor-pos-y="-14"> + <control-point x="145.5" y="-343.5"/> + </transition-item> + <transition-item uuid="{d2848c35-8d9b-4df7-be37-2f8f4f7d451f}" comment="" model-uuid="{e83a9c23-3ef2-4e19-a6b3-f264f06ac803}" start-anchor-pos-x="-12" start-anchor-pos-y="-3" end-anchor-pos-x="42" end-anchor-pos-y="2"> + <control-point x="64.5" y="-341"/> + </transition-item> + <transition-item uuid="{53f1f5d9-5962-46c5-8dd8-3f7c288c96f3}" comment="" model-uuid="{4877c56b-accc-46f3-a0c8-3118d0382715}" start-anchor-pos-x="-50" start-anchor-pos-y="-10" end-anchor-pos-x="33" end-anchor-pos-y="25"> + <control-point x="-380.5" y="-174.5"/> + </transition-item> + <transition-item uuid="{e079dd61-9045-4a6c-a41e-40ebc173448e}" comment="" model-uuid="{005765cb-18c8-4447-8bf0-c6f9e39e118a}" start-anchor-pos-x="-50" start-anchor-pos-y="4" end-anchor-pos-x="0" end-anchor-pos-y="25"> + <control-point x="-403.5" y="123.5"/> + </transition-item> + <transition-item uuid="{116dcb01-cd75-4245-af85-47605e1fd9ee}" comment="" model-uuid="{8424309b-cb2d-4995-8475-e8bde31d9809}" start-anchor-pos-x="50" start-anchor-pos-y="0" end-anchor-pos-x="-17" end-anchor-pos-y="25"> + <control-point x="-85" y="128"/> + </transition-item> + <transition-item uuid="{408f8c3c-cf47-42b1-bbed-01c241a009e3}" comment="" model-uuid="{ab9e8384-2b6e-4166-ac1f-871c7d9d5e76}" start-anchor-pos-x="-12" start-anchor-pos-y="9" end-anchor-pos-x="1" end-anchor-pos-y="-10"> + <control-point x="50" y="-200"/> + </transition-item> + <connection-item uuid="{e01de52f-4e9d-4445-80ec-15d2994a2d57}" comment="" region-uuid="{96646b44-5d46-487b-b91a-ef3a3a4aaee3}" item0-uuid="{654b9f9e-b9b3-4967-9569-9a0648329ddf}" item1-uuid="{2bab7eaa-1444-4811-8f85-111d8c17f2e5}" start-anchor-pos-x="-43" start-anchor-pos-y="2" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="249" y="-381"/> + </connection-item> </diagram> </diagrams> </esmcontainer> diff --git a/examples/common/esmlib/flash_logging.esm b/examples/common/esmlib/flash_logging.esm deleted file mode 100644 index 51a08275e7324f667864dc9f7a9a9d3d0d49fb30..0000000000000000000000000000000000000000 --- a/examples/common/esmlib/flash_logging.esm +++ /dev/null @@ -1,789 +0,0 @@ -<?xml version="1.0"?> -<esmcontainer uuid="{60ecd752-315f-42a4-850e-64a416f647f8}" name="flash_logging" cloned-from="logging.esm" comment="" scene-width="0" scene-height="0"> - <data-storage-list> - <data-storage uuid="{3adc0f1b-71c6-49f1-93de-1194853f14e7}" name="log" comment=""/> - <data-storage uuid="{1019f132-3b0a-467d-9080-af09fc0388da}" name="logConfig" comment=""/> - <data-storage uuid="{f6509e01-5ed0-4073-b338-1e1421f66a14}" name="logNRT" comment=""/> - <data-storage uuid="{eae4448d-2a55-454c-9f3f-3626eea2cc73}" name="processID1" comment=""/> - <data-storage uuid="{fc9456db-6952-49c8-ab82-a00926edef47}" name="smiTelem" comment=""/> - </data-storage-list> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{79d62be4-4ca8-43da-82e1-c1a3b3459539}" name="log" comment="" data-storage-uuid="{3adc0f1b-71c6-49f1-93de-1194853f14e7}" optional="1" allocation="1" release="0" read="0" write="1"/> - <port uuid="{549d2284-d8e6-4c3d-bdf4-bad010eb3553}" name="smiTelem" comment="" data-storage-uuid="{fc9456db-6952-49c8-ab82-a00926edef47}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{07e69f5e-fe8a-4380-872e-996ab3d024bf}" name="quit" comment="" type="user_defined"/> - <flag uuid="{b6c0d659-dbc2-4a98-858a-6d330910f133}" name="log" comment="" type="user_defined"/> - <flag uuid="{869743ac-7b24-4bb0-92fb-68766029acf6}" name="smi" comment="" type="user_defined"/> - </input-flags> - <output-flags> - </output-flags> - <container-events> - <event uuid="{a85bdf4f-218b-40d9-b3b6-068a9942f10a}" name="keyboardQuit" comment=""/> - <event uuid="{0bd344bc-1d84-4094-a5b5-4145473d5789}" name="logProcessUp" comment=""/> - <event uuid="{1968df05-2da0-4c9e-851b-5858534786f8}" name="logReady" comment=""/> - <event uuid="{9412343e-b26d-4638-b56f-370bc4bc7f63}" name="logReqReady" comment=""/> - <event uuid="{fce11b68-f540-44b8-9a59-f939743e9d57}" name="logVarReady" comment=""/> - </container-events> - <input-events> - <event-ref uuid="{9412343e-b26d-4638-b56f-370bc4bc7f63}" name="logReqReady"/> - </input-events> - <output-events> - <event-ref uuid="{1968df05-2da0-4c9e-851b-5858534786f8}" name="logReady"/> - <event-ref uuid="{0bd344bc-1d84-4094-a5b5-4145473d5789}" name="logProcessUp"/> - <event-ref uuid="{a85bdf4f-218b-40d9-b3b6-068a9942f10a}" name="keyboardQuit"/> - </output-events> - <global-events> - <event uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}" name="PULSEEVENT" type="pulseevent" comment=""/> - </global-events> - <regions> - <region uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" name="Region0" comment="" number="0"> - <states> - <initial-state uuid="{813495ac-b778-4293-ac46-7d15663fb69e}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{f22ba397-0e01-48ff-9583-03d70a8832aa}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <task-state uuid="{063c1264-f5f9-4ba3-9d50-e0bca72bd6e3}" name="getLogVar" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="logGetLogVar" task-slot-name="init" process-name="" real-time="1"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{b603b490-7b21-4c7f-b37f-f352976e5113}" name="log" comment="" data-storage-uuid="{3adc0f1b-71c6-49f1-93de-1194853f14e7}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{dcebe6ed-77ed-4ac2-a8cc-cd7c96b9e878}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{f4749ef8-88bd-4a5d-8af2-82d770563516}" name="Exit" comment="" type="exit"/> - <flag uuid="{91b4bf32-5774-4f73-ab1f-f9dcea62f41b}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{2e812d3b-e0b7-4af3-9946-51db1d260b55}" name="getSmiTelemVar" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="getSmiTelemVar" task-slot-name="init" process-name="" real-time="1"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{95781a78-8ef3-48ae-a98d-5dcb33e3ebec}" name="smiTelem" comment="" data-storage-uuid="{fc9456db-6952-49c8-ab82-a00926edef47}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{944803d9-afd5-4ba9-98ef-a93128c4a8b1}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{9c929de6-32a0-4e99-af8b-e444a4f9837e}" name="Exit" comment="" type="exit"/> - <flag uuid="{fd595779-88b8-4a82-9b24-637c0ed1f680}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{f5ca648e-c2df-495c-9545-402df9074f90}" name="logSMI on" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="0" task-function="logSMI" task-slot-name="log" process-name="" real-time="1"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{81e44736-c5c1-41fd-a603-5bd4c9049d4e}" name="log" comment="" data-storage-uuid="{3adc0f1b-71c6-49f1-93de-1194853f14e7}" optional="1" allocation="0" release="0" read="0" write="1"/> - <port uuid="{a9ede697-2e00-4a3a-ac71-808bf949bd2a}" name="smiTelem" comment="" data-storage-uuid="{fc9456db-6952-49c8-ab82-a00926edef47}" optional="1" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{e9312588-0a55-4bcc-8c3e-a4ff3f0a5731}" name="writeSmiTelem" comment="" type="user_defined"/> - <flag uuid="{59da7ea7-7d73-4e25-9b8d-3caa70356cc2}" name="readSmiTelem" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{455fd538-1468-4104-9ab1-73b83e6ae2bc}" name="logOverflow" comment="" type="user_defined"/> - <flag uuid="{bc460c43-73c2-4246-aa1f-ae44cf183023}" name="smiLogOverflow" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{bd4f7ef8-f2e8-4de1-8a81-a126e39bbf7a}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{2991b685-68a7-4a4e-bbd7-a13c659c4f29}" name="Exit" comment="" type="exit"/> - <flag uuid="{9b66f995-d38d-4039-81c4-2f71f5a9cace}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{19092f17-1f03-4e46-afe3-6e3bf640010c}" name="logSMI off" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="0" task-function="logSMI" task-slot-name="log" process-name="" real-time="1"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{b14dc28d-3a4f-4c15-a408-a33bdeaeae69}" name="log" comment="" data-storage-uuid="{3adc0f1b-71c6-49f1-93de-1194853f14e7}" optional="1" allocation="0" release="0" read="0" write="1"/> - <port uuid="{87e9f399-9798-4a03-96c0-68aba36194a0}" name="smiTelem" comment="" data-storage-uuid="{fc9456db-6952-49c8-ab82-a00926edef47}" optional="1" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{c6a03a10-3546-4f71-9a9e-72ceadc4d640}" name="writeSmiTelem" comment="" type="user_defined"/> - <flag uuid="{52122f1a-526f-4983-82b6-6713130e7777}" name="readSmiTelem" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{f8cb42df-ec7f-484f-abfe-131059d11acd}" name="logOverflow" comment="" type="user_defined"/> - <flag uuid="{2abdda05-89cc-4123-9f47-48359a320ad1}" name="smiLogOverflow" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{5a2ff13d-2c90-457a-8893-b36cf975ab1e}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{76e0089e-b8cd-48f7-92fa-54fa787b3a24}" name="Exit" comment="" type="exit"/> - <flag uuid="{ea4f0b95-3d71-44c8-82b3-25a64650935e}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - </states> - <transitions> - <transition uuid="{05103772-89bc-4fd6-910b-edeb4e36f770}" comment="" from-state-uuid="{813495ac-b778-4293-ac46-7d15663fb69e}" to-state-uuid="{2e812d3b-e0b7-4af3-9946-51db1d260b55}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> - </transition> - <transition uuid="{59c4eb36-98fc-4bd7-b84b-4da4f81ccce7}" comment="" from-state-uuid="{063c1264-f5f9-4ba3-9d50-e0bca72bd6e3}" to-state-uuid="{f5ca648e-c2df-495c-9545-402df9074f90}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - <set-flag-action uuid="{d8ade872-fddf-4900-bf44-60094cf31ba5}" name="set flag writeSmiTelem" comment="" flag-uuid="{e9312588-0a55-4bcc-8c3e-a4ff3f0a5731}" flag-value="0"/> - <send-event-action uuid="{2b752abf-719b-4fed-9f6b-c2d40aab22bb}" name="" comment="" event-uuid="{fce11b68-f540-44b8-9a59-f939743e9d57}"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{f4749ef8-88bd-4a5d-8af2-82d770563516}"/> -<guard operator="none" flag-uuid="{b6c0d659-dbc2-4a98-858a-6d330910f133}"/> -</guard> -<guard operator="none" flag-uuid="{869743ac-7b24-4bb0-92fb-68766029acf6}"/> -</guard> - </transition> - <transition uuid="{3198cc1a-0f26-498e-8b12-61ae6b4ec335}" comment="" from-state-uuid="{2e812d3b-e0b7-4af3-9946-51db1d260b55}" to-state-uuid="{063c1264-f5f9-4ba3-9d50-e0bca72bd6e3}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{9c929de6-32a0-4e99-af8b-e444a4f9837e}"/> - </transition> - <transition uuid="{1b2ac955-e294-4f2f-b828-c35f2c9f4de0}" comment="" from-state-uuid="{063c1264-f5f9-4ba3-9d50-e0bca72bd6e3}" to-state-uuid="{19092f17-1f03-4e46-afe3-6e3bf640010c}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - <set-flag-action uuid="{d8ade872-fddf-4900-bf44-60094cf31ba5}" name="set flag writeSmiTelem" comment="" flag-uuid="{c6a03a10-3546-4f71-9a9e-72ceadc4d640}" flag-value="1"/> - <send-event-action uuid="{c30daa4d-0071-4d85-a4d2-da07459ed027}" name="" comment="" event-uuid="{fce11b68-f540-44b8-9a59-f939743e9d57}"/> - </actions> -<guard operator="or" flag-uuid=""> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{f4749ef8-88bd-4a5d-8af2-82d770563516}"/> -<guard operator="negation" flag-uuid="{869743ac-7b24-4bb0-92fb-68766029acf6}"/> -</guard> -<guard operator="negation" flag-uuid="{b6c0d659-dbc2-4a98-858a-6d330910f133}"/> -</guard> - </transition> - </transitions> - </region> - <region uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" name="Region2" comment="" number="1"> - <states> - <task-state uuid="{871b4194-c51d-4964-b6ed-b42e0af3e560}" name="getLogVarNRT" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="logGetLogVarNRT" task-slot-name="logging" process-name="logging" real-time="0"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{0632167e-c227-46f6-a5ed-6b5d1b8a6b4f}" name="logNRT" comment="" data-storage-uuid="{f6509e01-5ed0-4073-b338-1e1421f66a14}" optional="0" allocation="1" release="0" read="0" write="0"/> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{19c672a7-929b-4ad2-a692-bf732b246fff}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{4010e57f-ce85-48b7-930c-ccac8d95dc63}" name="Exit" comment="" type="exit"/> - <flag uuid="{743b76c2-2bfa-4239-b43e-67eff7c9f10e}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{2d4179f3-5be0-4887-a31f-ede57a79ba20}" name="save last" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="logSave" task-slot-name="logging" process-name="logging" real-time="0"> - <input-ports> - <port uuid="{e687234a-6b2d-443b-90a2-70f0d1c6790e}" name="logConfig" comment="" data-storage-uuid="{1019f132-3b0a-467d-9080-af09fc0388da}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - <port uuid="{a2acceae-1a1c-4cf7-b5e9-d5330a96ef90}" name="logNRT" comment="" data-storage-uuid="{f6509e01-5ed0-4073-b338-1e1421f66a14}" optional="0" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{ebed4df7-c5f9-4149-b4c7-27cb4665ee95}" name="clear" comment="" type="user_defined"/> - <flag uuid="{c72925ac-fd27-48e3-b059-9bcaaef80a40}" name="last" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{dabf755b-3723-4bf7-b68b-69725343737d}" name="error" comment="" type="user_defined"/> - <flag uuid="{bb5a6b47-74d9-4906-9009-5dec19fb200e}" name="done" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{15b16176-c01d-4802-95f2-476a3489e34f}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{599819a2-1553-4024-9db6-e7b2c21db2bd}" name="Exit" comment="" type="exit"/> - <flag uuid="{b0c49b9e-931d-4172-aeb4-a3f8bcd1c303}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{ec1a5d6a-5087-408e-bcb3-72af78962431}" name="check" comment="" timeout="1000" flash-logging="0" gui-logging="0" telemetry-logging="0" task-function="logCheckLogBuff" task-slot-name="logging" process-name="logging" real-time="0"> - <input-ports> - <port uuid="{478025cf-3547-40fc-98bd-df7350a06804}" name="logNRT" comment="" data-storage-uuid="{f6509e01-5ed0-4073-b338-1e1421f66a14}" optional="0" allocation="0" release="0" read="1" write="0"/> - <port uuid="{8e343858-e24b-4ce1-9a7e-a20c835fd933}" name="logConfig" comment="" data-storage-uuid="{1019f132-3b0a-467d-9080-af09fc0388da}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - <flag uuid="{bdf0bec9-0bd6-48ac-b08c-cc6bd8eac65f}" name="logfull" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{0c438a5b-17a4-4129-80ba-e59c3b2d9cec}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{6e337d4c-334c-49fb-9491-10e3751fffd1}" name="Exit" comment="" type="exit"/> - <flag uuid="{a09def2b-7d08-4547-bad9-000e0c773c51}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{6b8d6e4d-eb0c-47cd-b168-8444cfc93abc}" name="getLogConfigVarNRT" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="logGetLogConfigVarNRT" task-slot-name="logging" process-name="logging" real-time="0"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{526db431-5aa0-4fa1-a059-f3d10ddc289e}" name="logConfig" comment="" data-storage-uuid="{1019f132-3b0a-467d-9080-af09fc0388da}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{6d375648-a69f-48f9-8596-a3fa64bb95b5}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{af2b6f39-d0e5-428d-9def-3334f7b4931c}" name="Exit" comment="" type="exit"/> - <flag uuid="{f1da9a34-adfd-4ec6-8ad9-5a34503bdfba}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{4047d883-9eb0-41e3-a7bd-c2cc73030ac4}" name="readConfig" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="logReadLogConfig" task-slot-name="logging" process-name="logging" real-time="0"> - <input-ports> - <port uuid="{1ecefdf7-7fe6-4f08-854b-0b1833265118}" name="logConfig" comment="" data-storage-uuid="{1019f132-3b0a-467d-9080-af09fc0388da}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - <flag uuid="{459837f9-ce4c-44a1-a30b-af165da0fb2c}" name="ok" comment="" type="user_defined"/> - <flag uuid="{32fb017e-1536-45df-afb1-834550db5ea4}" name="error" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{1c617c93-751a-42bc-841e-a1d43e5dd0ba}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{da914eb3-92c8-46cf-b830-5b03792dcda2}" name="Exit" comment="" type="exit"/> - <flag uuid="{f81cc155-7692-40b1-b3b9-e6ea3ec65546}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <basic-state uuid="{605e9fc2-4cad-4577-9d59-ffe2f5656a7c}" name="error" comment="" timeout="5000" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{82f5eb07-37da-47f0-b0eb-eb5c1592aa58}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <initial-state uuid="{5056e7d9-4129-4433-92ef-ea983a533568}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{9b9f2254-3ffd-4f81-bdb5-52e21d3b7a76}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <task-state uuid="{c40bc502-d569-4d1a-8541-891066bba621}" name="createProcessID" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="createProcessID" task-slot-name="system" process-name="system" real-time="0"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{9375bd0c-6e23-4a64-b92b-4e41b873b2e5}" name="nrtProcessID" comment="" data-storage-uuid="{eae4448d-2a55-454c-9f3f-3626eea2cc73}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{3cae6442-8b4c-4da8-846a-11983c49cc78}" name="process1" comment="" type="user_defined"/> - <flag uuid="{979c2e52-aa46-4f50-aa74-cfc41dd46037}" name="process2" comment="" type="user_defined"/> - <flag uuid="{88de6c1b-f6c6-4d7e-bedb-4a3ba70f4e6f}" name="process3" comment="" type="user_defined"/> - <flag uuid="{c8793e6b-ced4-4736-b6c9-eb87d153c8e1}" name="process4" comment="" type="user_defined"/> - <flag uuid="{c7dcf91e-375f-46f7-9eeb-69c24d888b26}" name="process5" comment="" type="user_defined"/> - <flag uuid="{2b985659-f64e-4931-875f-29909732dcad}" name="process6" comment="" type="user_defined"/> - <flag uuid="{fe57b881-97aa-4238-84e4-de042444d413}" name="process7" comment="" type="user_defined"/> - <flag uuid="{df4e4405-0b38-4bce-8408-38ab9d298d2a}" name="process8" comment="" type="user_defined"/> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{82fd015b-8127-471b-8dad-75e2912c1480}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{66975496-c4e8-4cb0-a970-85214a553295}" name="Exit" comment="" type="exit"/> - <flag uuid="{3b4ded67-c482-4c91-845c-c2b019d41d63}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{007ecc6e-72c8-4fd0-93c7-1521efaf150b}" name="createProcess" comment="" timeout="10000" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="createProcess" task-slot-name="system" process-name="system" real-time="0"> - <input-ports> - <port uuid="{a9173f12-bc22-4d1d-985b-ea64edb4baf5}" name="nrtProcessID" comment="" data-storage-uuid="{eae4448d-2a55-454c-9f3f-3626eea2cc73}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - <flag uuid="{a16cc032-cd8c-447f-be29-579af7c94c22}" name="error" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{83a0c62a-9dc7-4049-84fc-9af4ef5059fd}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{bc9284c4-9d30-49b0-85cb-cdaeb72b8437}" name="Exit" comment="" type="exit"/> - <flag uuid="{71da7ca3-fe75-47b4-b664-8664d2373c5c}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <basic-state uuid="{28eb534e-0e86-4066-85f9-874372c98003}" name="processError" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{1ed3fefd-13ce-4b3f-9937-e1a313a92034}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <task-state uuid="{f0eafc3b-55e5-473e-b9f3-e7d941b022a9}" name="testProcess" comment="" timeout="10000" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="testProcess" task-slot-name="logging" process-name="logging" real-time="0"> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{21f1c59c-d5b9-489b-8650-52c143dcfb76}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{37ba7f28-ebe7-473a-b522-2d5fae02e2c8}" name="Exit" comment="" type="exit"/> - <flag uuid="{06eb9f6c-5b42-489d-b8b5-81316a23461a}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{a0e1c296-5eb3-49ce-b81e-564384662660}" name="killProcess" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="killProcess" task-slot-name="system" process-name="system" real-time="0"> - <input-ports> - <port uuid="{4cd12258-779f-45f8-acb8-4ecbdbd6d34c}" name="nrtProcessID" comment="" data-storage-uuid="{eae4448d-2a55-454c-9f3f-3626eea2cc73}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{729c37ff-9e85-49a3-ab4d-f303b3594b23}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{66a9ce4f-2d59-44f2-a131-5a396be70507}" name="Exit" comment="" type="exit"/> - <flag uuid="{d207d2c3-e086-445c-8b51-3d6b3b730869}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <final-state uuid="{cdf59ace-3d18-4d10-8960-7b01971391db}" name="[exit]" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> - <task-state uuid="{0df8fe68-e8c2-42dc-9ba2-a45d9ab3a9c5}" name="save" comment="" timeout="0" flash-logging="0" gui-logging="0" telemetry-logging="0" task-function="logSave" task-slot-name="logging" process-name="logging" real-time="0"> - <input-ports> - <port uuid="{b86a41ea-676b-4d12-986b-0a2deab6a362}" name="logConfig" comment="" data-storage-uuid="{1019f132-3b0a-467d-9080-af09fc0388da}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - <port uuid="{438ccc02-0c9f-4ed8-bd53-6fe097082005}" name="logNRT" comment="" data-storage-uuid="{f6509e01-5ed0-4073-b338-1e1421f66a14}" optional="0" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{6e1eecc3-f7aa-45ef-acad-22680c4a8dc4}" name="clear" comment="" type="user_defined"/> - <flag uuid="{f43b570e-6e81-4009-b9de-348f8b750e80}" name="last" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{21ba091d-2ac8-44bd-ae2e-442793bc65c3}" name="error" comment="" type="user_defined"/> - <flag uuid="{621f8fbd-caf5-4894-a233-823889e49d95}" name="done" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{bd6a5046-62b6-46a0-9991-352ef34186be}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{891a1a93-c063-464b-bee1-dd57f72e8c3b}" name="Exit" comment="" type="exit"/> - <flag uuid="{9d872aef-9342-47e2-8305-db58ac286446}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{7ecdd5cf-4353-4801-bf1a-8555cb1343b4}" name="logProfile" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="logProfile" task-slot-name="init" process-name="" real-time="1"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{0c613b7b-2cce-4585-a666-0b1a5c6c6701}" name="log" comment="" data-storage-uuid="{3adc0f1b-71c6-49f1-93de-1194853f14e7}" optional="0" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{16891c96-aef6-4427-a10e-460d8d5fa84a}" name="log" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{9779ad73-cf5e-4dcb-bde0-5ec2e7c88821}" name="done" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{646dada2-ebbe-47cc-908b-04332a351060}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{68235f76-7ece-43ed-868a-93a9ca1655e0}" name="Exit" comment="" type="exit"/> - <flag uuid="{50cfe476-accf-4efe-8104-7ec44ae88935}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <basic-state uuid="{5dd0b36b-9a2f-4048-aad2-f14ec7a84580}" name="lastSmiPrint" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{5dfd0aff-8117-432e-9fda-f30770208bf6}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <basic-state uuid="{7bf53ddd-90f7-48e0-9bd9-e94236f4955c}" name="logging Off" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="0"> <system-flags> - <flag uuid="{7bbd5018-f307-40c8-89c0-72b1727312e2}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - </states> - <transitions> - <transition uuid="{155808c9-c960-4ea3-87b7-28442e33e570}" comment="" from-state-uuid="{2d4179f3-5be0-4887-a31f-ede57a79ba20}" to-state-uuid="{605e9fc2-4cad-4577-9d59-ffe2f5656a7c}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{dabf755b-3723-4bf7-b68b-69725343737d}"/> - </transition> - <transition uuid="{d2530f1e-952a-469b-99b9-3d14f6cc5725}" comment="" from-state-uuid="{2d4179f3-5be0-4887-a31f-ede57a79ba20}" to-state-uuid="{a0e1c296-5eb3-49ce-b81e-564384662660}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{599819a2-1553-4024-9db6-e7b2c21db2bd}"/> -<guard operator="none" flag-uuid="{bb5a6b47-74d9-4906-9009-5dec19fb200e}"/> -</guard> - </transition> - <transition uuid="{52d943f8-77fa-47e2-b168-bdd22430aa56}" comment="" from-state-uuid="{6b8d6e4d-eb0c-47cd-b168-8444cfc93abc}" to-state-uuid="{4047d883-9eb0-41e3-a7bd-c2cc73030ac4}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{af2b6f39-d0e5-428d-9def-3334f7b4931c}"/> - </transition> - <transition uuid="{c523d16f-4f95-4fd1-92ed-d5f260181275}" comment="" from-state-uuid="{4047d883-9eb0-41e3-a7bd-c2cc73030ac4}" to-state-uuid="{605e9fc2-4cad-4577-9d59-ffe2f5656a7c}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="or" flag-uuid=""> -<guard operator="and" flag-uuid=""> -<guard operator="or" flag-uuid=""> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{1c617c93-751a-42bc-841e-a1d43e5dd0ba}"/> -<guard operator="none" flag-uuid="{f81cc155-7692-40b1-b3b9-e6ea3ec65546}"/> -</guard> -<guard operator="none" flag-uuid="{32fb017e-1536-45df-afb1-834550db5ea4}"/> -</guard> -<guard operator="none" flag-uuid="{da914eb3-92c8-46cf-b830-5b03792dcda2}"/> -</guard> -<guard operator="none" flag-uuid="{07e69f5e-fe8a-4380-872e-996ab3d024bf}"/> -</guard> - </transition> - <transition uuid="{6e2abf59-807e-4d6f-912e-25970cc168e5}" comment="" from-state-uuid="{4047d883-9eb0-41e3-a7bd-c2cc73030ac4}" to-state-uuid="{871b4194-c51d-4964-b6ed-b42e0af3e560}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{da914eb3-92c8-46cf-b830-5b03792dcda2}"/> -<guard operator="none" flag-uuid="{459837f9-ce4c-44a1-a30b-af165da0fb2c}"/> -</guard> - </transition> - <transition uuid="{067015a5-3465-4074-88d9-b261592f561e}" comment="" from-state-uuid="{605e9fc2-4cad-4577-9d59-ffe2f5656a7c}" to-state-uuid="{a0e1c296-5eb3-49ce-b81e-564384662660}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{07e69f5e-fe8a-4380-872e-996ab3d024bf}"/> - </transition> - <transition uuid="{fcb62bb5-714c-462f-8f58-7ec0a21aae3d}" comment="" from-state-uuid="{871b4194-c51d-4964-b6ed-b42e0af3e560}" to-state-uuid="{ec1a5d6a-5087-408e-bcb3-72af78962431}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - <send-event-action uuid="{d13359ba-fb85-4c62-8b10-bdf5850d201c}" name="" comment="" event-uuid="{1968df05-2da0-4c9e-851b-5858534786f8}"/> - </actions> -<guard operator="none" flag-uuid="{4010e57f-ce85-48b7-930c-ccac8d95dc63}"/> - </transition> - <transition uuid="{208672f8-233a-42f2-b487-6b4fe306fb21}" comment="" from-state-uuid="{ec1a5d6a-5087-408e-bcb3-72af78962431}" to-state-uuid="{0df8fe68-e8c2-42dc-9ba2-a45d9ab3a9c5}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="or" flag-uuid=""> -<guard operator="none" flag-uuid="{bdf0bec9-0bd6-48ac-b08c-cc6bd8eac65f}"/> -<guard operator="none" flag-uuid="{0c438a5b-17a4-4129-80ba-e59c3b2d9cec}"/> -</guard> -<guard operator="none" flag-uuid="{b6c0d659-dbc2-4a98-858a-6d330910f133}"/> -</guard> - </transition> - <transition uuid="{1e9ac17d-3833-4350-adf4-b32ef8a33cbc}" comment="" from-state-uuid="{5056e7d9-4129-4433-92ef-ea983a533568}" to-state-uuid="{c40bc502-d569-4d1a-8541-891066bba621}" event-uuid="{fce11b68-f540-44b8-9a59-f939743e9d57}"> - <actions> - <set-flag-action uuid="{b6b27c29-6410-44bb-851a-197c2dd20e0d}" name="set flag process1" comment="" flag-uuid="{3cae6442-8b4c-4da8-846a-11983c49cc78}" flag-value="1"/> - </actions> - </transition> - <transition uuid="{f1ccb28b-936f-41cd-bef4-23a370564f66}" comment="" from-state-uuid="{c40bc502-d569-4d1a-8541-891066bba621}" to-state-uuid="{007ecc6e-72c8-4fd0-93c7-1521efaf150b}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{66975496-c4e8-4cb0-a970-85214a553295}"/> - </transition> - <transition uuid="{92e62da5-5178-455e-a39e-cfc0fc12020f}" comment="" from-state-uuid="{007ecc6e-72c8-4fd0-93c7-1521efaf150b}" to-state-uuid="{f0eafc3b-55e5-473e-b9f3-e7d941b022a9}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{bc9284c4-9d30-49b0-85cb-cdaeb72b8437}"/> -<guard operator="negation" flag-uuid="{a16cc032-cd8c-447f-be29-579af7c94c22}"/> -</guard> - </transition> - <transition uuid="{577096fd-89b0-465b-bf05-b217576b78b8}" comment="" from-state-uuid="{007ecc6e-72c8-4fd0-93c7-1521efaf150b}" to-state-uuid="{28eb534e-0e86-4066-85f9-874372c98003}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - <send-event-action uuid="{5cd1ca2f-fb72-4583-87f9-a613ac997b1c}" name="" comment="" event-uuid="{a85bdf4f-218b-40d9-b3b6-068a9942f10a}"/> - </actions> -<guard operator="or" flag-uuid=""> -<guard operator="none" flag-uuid="{a16cc032-cd8c-447f-be29-579af7c94c22}"/> -<guard operator="none" flag-uuid="{83a0c62a-9dc7-4049-84fc-9af4ef5059fd}"/> -</guard> - </transition> - <transition uuid="{b70e35f1-35e1-4247-98da-31c1b817c6e4}" comment="" from-state-uuid="{f0eafc3b-55e5-473e-b9f3-e7d941b022a9}" to-state-uuid="{28eb534e-0e86-4066-85f9-874372c98003}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - <send-event-action uuid="{3639b1a4-0cd9-45d9-95d0-af674ab9f157}" name="" comment="" event-uuid="{a85bdf4f-218b-40d9-b3b6-068a9942f10a}"/> - </actions> -<guard operator="none" flag-uuid="{21f1c59c-d5b9-489b-8650-52c143dcfb76}"/> - </transition> - <transition uuid="{618a1e55-5a7f-425b-915a-c673a797c133}" comment="" from-state-uuid="{f0eafc3b-55e5-473e-b9f3-e7d941b022a9}" to-state-uuid="{6b8d6e4d-eb0c-47cd-b168-8444cfc93abc}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - <send-event-action uuid="{b9caebb0-a6bc-45f9-bb04-dc040f195033}" name="" comment="" event-uuid="{0bd344bc-1d84-4094-a5b5-4145473d5789}"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{37ba7f28-ebe7-473a-b522-2d5fae02e2c8}"/> -<guard operator="negation" flag-uuid="{21f1c59c-d5b9-489b-8650-52c143dcfb76}"/> -</guard> -<guard operator="none" flag-uuid="{b6c0d659-dbc2-4a98-858a-6d330910f133}"/> -</guard> - </transition> - <transition uuid="{5ee56053-c70e-4ecf-8316-2f33da01c0f5}" comment="" from-state-uuid="{a0e1c296-5eb3-49ce-b81e-564384662660}" to-state-uuid="{5dd0b36b-9a2f-4048-aad2-f14ec7a84580}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{66a9ce4f-2d59-44f2-a131-5a396be70507}"/> - </transition> - <transition uuid="{1ae4ca20-77ba-4a65-bcc7-cd07cde23a00}" comment="" from-state-uuid="{0df8fe68-e8c2-42dc-9ba2-a45d9ab3a9c5}" to-state-uuid="{ec1a5d6a-5087-408e-bcb3-72af78962431}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{891a1a93-c063-464b-bee1-dd57f72e8c3b}"/> -<guard operator="negation" flag-uuid="{21ba091d-2ac8-44bd-ae2e-442793bc65c3}"/> -</guard> - </transition> - <transition uuid="{3aa389d7-7c29-4943-aa2c-18f35041d271}" comment="" from-state-uuid="{0df8fe68-e8c2-42dc-9ba2-a45d9ab3a9c5}" to-state-uuid="{605e9fc2-4cad-4577-9d59-ffe2f5656a7c}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{21ba091d-2ac8-44bd-ae2e-442793bc65c3}"/> - </transition> - <transition uuid="{9d40bb14-ec60-4023-b061-8ea3866adb91}" comment="" from-state-uuid="{28eb534e-0e86-4066-85f9-874372c98003}" to-state-uuid="{a0e1c296-5eb3-49ce-b81e-564384662660}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{07e69f5e-fe8a-4380-872e-996ab3d024bf}"/> - </transition> - <transition uuid="{ccfcc36a-83fe-4c42-a46f-1bfc0bfbbe70}" comment="" from-state-uuid="{ec1a5d6a-5087-408e-bcb3-72af78962431}" to-state-uuid="{7ecdd5cf-4353-4801-bf1a-8555cb1343b4}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - <set-flag-action uuid="{a677edd0-061f-49a4-8d66-7d2887c1ff31}" name="set flag log" comment="" flag-uuid="{16891c96-aef6-4427-a10e-460d8d5fa84a}" flag-value="1"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{6e337d4c-334c-49fb-9491-10e3751fffd1}"/> -<guard operator="none" flag-uuid="{07e69f5e-fe8a-4380-872e-996ab3d024bf}"/> -</guard> - </transition> - <transition uuid="{9280f700-4bb6-4858-ac10-18cee8b7f0d4}" comment="" from-state-uuid="{5056e7d9-4129-4433-92ef-ea983a533568}" to-state-uuid="{cdf59ace-3d18-4d10-8960-7b01971391db}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="negation" flag-uuid="{b6c0d659-dbc2-4a98-858a-6d330910f133}"/> -<guard operator="none" flag-uuid="{07e69f5e-fe8a-4380-872e-996ab3d024bf}"/> -</guard> - </transition> - <transition uuid="{dbc1a4ac-c079-4cc7-915d-1540c5c472b2}" comment="" from-state-uuid="{7ecdd5cf-4353-4801-bf1a-8555cb1343b4}" to-state-uuid="{2d4179f3-5be0-4887-a31f-ede57a79ba20}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - <set-flag-action uuid="{41db2c4a-8901-4f5f-87ca-d718a7066be2}" name="set flag last" comment="" flag-uuid="{c72925ac-fd27-48e3-b059-9bcaaef80a40}" flag-value="1"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{68235f76-7ece-43ed-868a-93a9ca1655e0}"/> -<guard operator="none" flag-uuid="{9779ad73-cf5e-4dcb-bde0-5ec2e7c88821}"/> -</guard> - </transition> - <transition uuid="{5e1aa848-fe2b-40f0-a264-f7e12251b29e}" comment="" from-state-uuid="{5dd0b36b-9a2f-4048-aad2-f14ec7a84580}" to-state-uuid="{cdf59ace-3d18-4d10-8960-7b01971391db}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> - </transition> - <transition uuid="{208e6a2f-231c-4681-855a-0c237fe00904}" comment="" from-state-uuid="{ec1a5d6a-5087-408e-bcb3-72af78962431}" to-state-uuid="{ec1a5d6a-5087-408e-bcb3-72af78962431}" event-uuid="{9412343e-b26d-4638-b56f-370bc4bc7f63}"> - <actions> - <send-event-action uuid="{b86941ec-9a17-4d26-a906-7a4b48621923}" name="" comment="" event-uuid="{1968df05-2da0-4c9e-851b-5858534786f8}"/> - </actions> - </transition> - <transition uuid="{bb37adb9-b38b-4302-b0d9-7af8d2fe50a6}" comment="" from-state-uuid="{f0eafc3b-55e5-473e-b9f3-e7d941b022a9}" to-state-uuid="{7bf53ddd-90f7-48e0-9bd9-e94236f4955c}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - <send-event-action uuid="{104f90a8-6241-4fdd-8ce0-c184f6f5a86a}" name="" comment="" event-uuid="{0bd344bc-1d84-4094-a5b5-4145473d5789}"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{37ba7f28-ebe7-473a-b522-2d5fae02e2c8}"/> -<guard operator="negation" flag-uuid="{21f1c59c-d5b9-489b-8650-52c143dcfb76}"/> -</guard> -<guard operator="negation" flag-uuid="{b6c0d659-dbc2-4a98-858a-6d330910f133}"/> -</guard> - </transition> - <transition uuid="{ca4b3853-0cdf-46f6-87cb-c48fa25263ea}" comment="" from-state-uuid="{7bf53ddd-90f7-48e0-9bd9-e94236f4955c}" to-state-uuid="{a0e1c296-5eb3-49ce-b81e-564384662660}" event-uuid="{f0a51357-e919-4ce0-96e7-0325dda6ede0}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{07e69f5e-fe8a-4380-872e-996ab3d024bf}"/> - </transition> - <transition uuid="{68f72ad5-caaf-404e-865d-42a79a5acbe6}" comment="" from-state-uuid="{0df8fe68-e8c2-42dc-9ba2-a45d9ab3a9c5}" to-state-uuid="{0df8fe68-e8c2-42dc-9ba2-a45d9ab3a9c5}" event-uuid="{9412343e-b26d-4638-b56f-370bc4bc7f63}"> - <actions> - <send-event-action uuid="{3568a984-b856-4365-b2cd-5ba6c3b14c12}" name="" comment="" event-uuid="{1968df05-2da0-4c9e-851b-5858534786f8}"/> - </actions> - </transition> - </transitions> - </region> - </regions> - <diagrams> - <diagram uuid="{704f0f2c-3655-4b96-8008-9acefb31af78}" name="" comment=""> - <box-item uuid="{538c3bbc-930f-4c0e-90dc-e4b765fbe697}" comment="" model-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" x="2730" y="3120" width="480" height="1260" type="standard_box"/> - <box-item uuid="{99d33ccf-5888-4c2b-ae5a-6d4b35513b20}" comment="" model-uuid="{813495ac-b778-4293-ac46-7d15663fb69e}" x="-196" y="-596" width="10" height="10" type="standard_box"/> - <box-item uuid="{c179943d-423c-49d5-bba3-c1f287388a86}" comment="" model-uuid="{063c1264-f5f9-4ba3-9d50-e0bca72bd6e3}" x="-89" y="-432" width="100" height="50" type="standard_box"/> - <box-item uuid="{3a29be41-eb17-4307-954c-5916b6cd9caf}" comment="" model-uuid="{b603b490-7b21-4c7f-b37f-f352976e5113}" x="50" y="-2" width="20" height="20" type="standard_box"/> - <box-item uuid="{d2b8bdd1-5da0-40ab-9f90-f850ec54db7b}" comment="" model-uuid="{2e812d3b-e0b7-4af3-9946-51db1d260b55}" x="-2" y="-496" width="100" height="50" type="standard_box"/> - <box-item uuid="{68c7b0bd-313e-4a40-8fd5-caf48ec68d2a}" comment="" model-uuid="{95781a78-8ef3-48ae-a98d-5dcb33e3ebec}" x="50" y="4" width="20" height="20" type="standard_box"/> - <box-item uuid="{a0ab7e30-a8f5-48ae-9a61-f005f1d69a7e}" comment="" model-uuid="{f5ca648e-c2df-495c-9545-402df9074f90}" x="142" y="-200" width="100" height="50" type="standard_box"/> - <box-item uuid="{9273501e-87e0-432c-983c-aa4cd9d6c0f4}" comment="" model-uuid="{81e44736-c5c1-41fd-a603-5bd4c9049d4e}" x="-17" y="-25" width="20" height="20" type="standard_box"/> - <box-item uuid="{e3183f56-8e92-48f2-9e63-798a11029a7c}" comment="" model-uuid="{a9ede697-2e00-4a3a-ac71-808bf949bd2a}" x="16" y="-25" width="20" height="20" type="standard_box"/> - <box-item uuid="{b98dbefd-95d0-40ac-9f44-c0a35ef1ed05}" comment="" model-uuid="{19092f17-1f03-4e46-afe3-6e3bf640010c}" x="-58" y="-195" width="100" height="50" type="standard_box"/> - <box-item uuid="{53f32dc4-a851-4537-98f4-8e8abff38ed2}" comment="" model-uuid="{b14dc28d-3a4f-4c15-a408-a33bdeaeae69}" x="-50" y="-13" width="20" height="20" type="standard_box"/> - <box-item uuid="{6ae894b8-8b84-4974-88dd-eb4ce27fd813}" comment="" model-uuid="{87e9f399-9798-4a03-96c0-68aba36194a0}" x="-50" y="8" width="20" height="20" type="standard_box"/> - <box-item uuid="{f8ec59aa-d8d3-4061-b432-b8da5386acc4}" comment="" model-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" x="3420" y="3120" width="840" height="1260" type="standard_box"/> - <box-item uuid="{01411196-be1d-470b-a3cb-dbc796ec450d}" comment="" model-uuid="{871b4194-c51d-4964-b6ed-b42e0af3e560}" x="-171" y="-57" width="100" height="50" type="standard_box"/> - <box-item uuid="{1c1e140e-dd90-4bc6-a124-1191659320a4}" comment="" model-uuid="{0632167e-c227-46f6-a5ed-6b5d1b8a6b4f}" x="50" y="9" width="20" height="20" type="standard_box"/> - <box-item uuid="{1b4d1c26-863a-4a31-a58e-01063d1cfa42}" comment="" model-uuid="{2d4179f3-5be0-4887-a31f-ede57a79ba20}" x="-169" y="399" width="100" height="50" type="standard_box"/> - <box-item uuid="{641d2513-b7e9-4330-a929-7bf06e780c8b}" comment="" model-uuid="{a2acceae-1a1c-4cf7-b5e9-d5330a96ef90}" x="50" y="-11" width="20" height="20" type="standard_box"/> - <box-item uuid="{27246ef9-fac1-4478-9fc1-de820e46fa36}" comment="" model-uuid="{e687234a-6b2d-443b-90a2-70f0d1c6790e}" x="-50" y="4" width="20" height="20" type="standard_box"/> - <box-item uuid="{0ebaee8b-22f7-4172-ac17-985a9da86bda}" comment="" model-uuid="{ec1a5d6a-5087-408e-bcb3-72af78962431}" x="-175" y="97" width="100" height="50" type="standard_box"/> - <box-item uuid="{052ef46c-a125-4c91-8e2b-9030afdd10bf}" comment="" model-uuid="{478025cf-3547-40fc-98bd-df7350a06804}" x="34" y="25" width="20" height="20" type="standard_box"/> - <box-item uuid="{b43c69b6-c828-4fb9-b2d1-236b92d39354}" comment="" model-uuid="{8e343858-e24b-4ce1-9a7e-a20c835fd933}" x="-50" y="7" width="20" height="20" type="standard_box"/> - <box-item uuid="{c1226695-8bbc-4502-ba62-59f4660c5758}" comment="" model-uuid="{6b8d6e4d-eb0c-47cd-b168-8444cfc93abc}" x="-36" y="-224" width="100" height="50" type="standard_box"/> - <box-item uuid="{a2f6bb13-3096-41bd-9884-fee535166c5f}" comment="" model-uuid="{526db431-5aa0-4fa1-a059-f3d10ddc289e}" x="50" y="-1" width="20" height="20" type="standard_box"/> - <box-item uuid="{0df4e86a-3e9c-4a9f-8ba7-b8800976bd11}" comment="" model-uuid="{4047d883-9eb0-41e3-a7bd-c2cc73030ac4}" x="-35" y="-133" width="100" height="50" type="standard_box"/> - <box-item uuid="{2c36e007-7f68-4f47-9181-f9dadd5bf770}" comment="" model-uuid="{1ecefdf7-7fe6-4f08-854b-0b1833265118}" x="50" y="-14" width="20" height="20" type="standard_box"/> - <box-item uuid="{030d9a6d-dcfb-4d50-bd64-9c0ad38ae6bd}" comment="" model-uuid="{605e9fc2-4cad-4577-9d59-ffe2f5656a7c}" x="180" y="217" width="100" height="50" type="standard_box"/> - <box-item uuid="{a93c4ac3-371b-4c34-92d1-62e75c9e24a4}" comment="" model-uuid="{5056e7d9-4129-4433-92ef-ea983a533568}" x="-350" y="-610" width="10" height="10" type="standard_box"/> - <box-item uuid="{530ba468-33cb-45c7-9d5b-9c01e5c1e773}" comment="" model-uuid="{c40bc502-d569-4d1a-8541-891066bba621}" x="-293" y="-519" width="100" height="50" type="standard_box"/> - <box-item uuid="{298f4fbe-2e17-4f21-b4e2-2dee73ff224d}" comment="" model-uuid="{9375bd0c-6e23-4a64-b92b-4e41b873b2e5}" x="50" y="-2" width="20" height="20" type="standard_box"/> - <box-item uuid="{0f3bc0bc-c5dc-4168-be1b-5f1b4268f150}" comment="" model-uuid="{007ecc6e-72c8-4fd0-93c7-1521efaf150b}" x="-293" y="-425" width="100" height="50" type="standard_box"/> - <box-item uuid="{416f5759-afa3-496d-a2d9-9524ad9d9a6f}" comment="" model-uuid="{a9173f12-bc22-4d1d-985b-ea64edb4baf5}" x="50" y="-11" width="20" height="20" type="standard_box"/> - <box-item uuid="{ca4b8745-66c2-478c-b033-2bc158ae6df0}" comment="" model-uuid="{28eb534e-0e86-4066-85f9-874372c98003}" x="-293" y="-319" width="100" height="50" type="standard_box"/> - <box-item uuid="{74a80bd6-47e9-4d16-a67e-c4b7b3030560}" comment="" model-uuid="{f0eafc3b-55e5-473e-b9f3-e7d941b022a9}" x="-37" y="-318" width="100" height="50" type="standard_box"/> - <box-item uuid="{58b18c34-4f23-4626-bda4-a3d93a206e27}" comment="" model-uuid="{a0e1c296-5eb3-49ce-b81e-564384662660}" x="-285" y="503" width="100" height="50" type="standard_box"/> - <box-item uuid="{99d4e23c-2825-4876-876e-490dd5bff4f7}" comment="" model-uuid="{4cd12258-779f-45f8-acb8-4ecbdbd6d34c}" x="14" y="-25" width="20" height="20" type="standard_box"/> - <box-item uuid="{21be701a-9a9a-417c-9506-12b86561a0dd}" comment="" model-uuid="{cdf59ace-3d18-4d10-8960-7b01971391db}" x="-138" y="608" width="20" height="20" type="standard_box"/> - <box-item uuid="{46e1bd45-4bae-4207-b083-6c7837e14d2b}" comment="" model-uuid="{0df8fe68-e8c2-42dc-9ba2-a45d9ab3a9c5}" x="118" y="96" width="100" height="50" type="standard_box"/> - <box-item uuid="{5dc58083-7190-4537-87d4-51867baf32d4}" comment="" model-uuid="{438ccc02-0c9f-4ed8-bd53-6fe097082005}" x="-33" y="25" width="20" height="20" type="standard_box"/> - <box-item uuid="{9844a8a9-a2fe-42d8-9e43-05f2a83fa3e3}" comment="" model-uuid="{b86a41ea-676b-4d12-986b-0a2deab6a362}" x="0" y="-25" width="20" height="20" type="standard_box"/> - <box-item uuid="{10bfc3d4-d9c2-43ca-954a-fa2f29713e58}" comment="" model-uuid="{7ecdd5cf-4353-4801-bf1a-8555cb1343b4}" x="-178" y="292" width="100" height="50" type="standard_box"/> - <box-item uuid="{d214dfa8-6144-4ca3-8e3f-d96065c43804}" comment="" model-uuid="{0c613b7b-2cce-4585-a666-0b1a5c6c6701}" x="50" y="1" width="20" height="20" type="standard_box"/> - <box-item uuid="{9d178f10-abf3-4ee5-94e0-9614bfae39d5}" comment="" model-uuid="{5dd0b36b-9a2f-4048-aad2-f14ec7a84580}" x="-116" y="535" width="100" height="50" type="standard_box"/> - <box-item uuid="{f0a2cca6-e9d9-4426-8da9-a9ff2f47c777}" comment="" model-uuid="{7bf53ddd-90f7-48e0-9bd9-e94236f4955c}" x="-231" y="-220" width="100" height="50" type="standard_box"/> - <data-storage-item uuid="{a1d831d6-46df-4a92-802b-e2e8d4c026a0}" description="" comment="" model-uuid="{3adc0f1b-71c6-49f1-93de-1194853f14e7}" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" x="19" y="-434" width="32" height="30"/> - <data-storage-item uuid="{91afd6cd-8903-4a28-a8b5-902d81d30b23}" description="" comment="" model-uuid="{fc9456db-6952-49c8-ab82-a00926edef47}" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" x="197" y="-449" width="72" height="30"/> - <data-storage-item uuid="{4c6d1b56-4561-4879-8ab4-47a86601cab4}" description="" comment="" model-uuid="{fc9456db-6952-49c8-ab82-a00926edef47}" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" x="-186" y="-182" width="72" height="30"/> - <data-storage-item uuid="{83f9bea4-aacf-4062-bc8a-bcfd79bae7fa}" description="" comment="" model-uuid="{3adc0f1b-71c6-49f1-93de-1194853f14e7}" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" x="-207" y="-227" width="32" height="30"/> - <data-storage-item uuid="{137b5047-2653-4b21-9bed-acef1c7725d3}" description="" comment="" model-uuid="{1019f132-3b0a-467d-9080-af09fc0388da}" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" x="98" y="-224" width="68" height="30"/> - <data-storage-item uuid="{6627193e-a861-475a-b878-4937f2f24c12}" description="" comment="" model-uuid="{1019f132-3b0a-467d-9080-af09fc0388da}" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" x="-277" y="190" width="68" height="30"/> - <data-storage-item uuid="{b0be3f0f-716d-413b-bee4-c44506ceaa70}" description="" comment="" model-uuid="{eae4448d-2a55-454c-9f3f-3626eea2cc73}" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" x="-156" y="-522" width="82" height="30"/> - <data-storage-item uuid="{358e8227-e6bc-43b2-8e45-9dbc3f504a2e}" description="" comment="" model-uuid="{eae4448d-2a55-454c-9f3f-3626eea2cc73}" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" x="-266" y="439" width="82" height="30"/> - <data-storage-item uuid="{c2dd0d4b-5a85-472f-ab29-487f66fcfc9a}" description="" comment="" model-uuid="{f6509e01-5ed0-4073-b338-1e1421f66a14}" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" x="6" y="192" width="56" height="30"/> - <data-storage-item uuid="{a4a417f3-1f28-4011-9a99-c9a13ea95874}" description="" comment="" model-uuid="{f6509e01-5ed0-4073-b338-1e1421f66a14}" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" x="-62" y="-47" width="56" height="30"/> - <data-storage-item uuid="{56408532-227e-444d-b34d-c1427f9e4e3b}" description="" comment="" model-uuid="{1019f132-3b0a-467d-9080-af09fc0388da}" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" x="119" y="20" width="68" height="30"/> - <data-storage-item uuid="{447de153-121a-41ed-bed9-15b0f1f2a256}" description="" comment="" model-uuid="{3adc0f1b-71c6-49f1-93de-1194853f14e7}" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" x="-84" y="296" width="32" height="30"/> - <transition-item uuid="{fbc558b2-c4fd-424c-a7d1-843d575c60f1}" comment="" model-uuid="{05103772-89bc-4fd6-910b-edeb4e36f770}" start-anchor-pos-x="4" start-anchor-pos-y="0" end-anchor-pos-x="0" end-anchor-pos-y="-25"> - <control-point x="-68" y="-584"/> - </transition-item> - <connection-item uuid="{7f717924-14b7-41dd-ae7f-0dc8a7d6b647}" comment="" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" item0-uuid="{a1d831d6-46df-4a92-802b-e2e8d4c026a0}" item1-uuid="{3a29be41-eb17-4307-954c-5916b6cd9caf}" start-anchor-pos-x="-16" start-anchor-pos-y="-1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-20" y="-434"/> - </connection-item> - <transition-item uuid="{364b41fb-6e16-4e18-ba8f-30706d916b2c}" comment="" model-uuid="{59c4eb36-98fc-4bd7-b84b-4da4f81ccce7}" start-anchor-pos-x="-34" start-anchor-pos-y="24" end-anchor-pos-x="-50" end-anchor-pos-y="-3"> - <control-point x="-116" y="-360"/> - </transition-item> - <transition-item uuid="{9c68ebac-a290-4ef9-b332-af9974bcd17e}" comment="" model-uuid="{3198cc1a-0f26-498e-8b12-61ae6b4ec335}" start-anchor-pos-x="-50" start-anchor-pos-y="9" end-anchor-pos-x="-5" end-anchor-pos-y="-25"> - <control-point x="-73" y="-472"/> - </transition-item> - <connection-item uuid="{1049ce88-1443-4ffd-baf1-1b26f096e284}" comment="" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" item0-uuid="{91afd6cd-8903-4a28-a8b5-902d81d30b23}" item1-uuid="{68c7b0bd-313e-4a40-8fd5-caf48ec68d2a}" start-anchor-pos-x="-36" start-anchor-pos-y="-1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="130" y="-478"/> - </connection-item> - <connection-item uuid="{d66558ab-1e2e-4a47-8e13-1c3ed3b45026}" comment="" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" item0-uuid="{a1d831d6-46df-4a92-802b-e2e8d4c026a0}" item1-uuid="{9273501e-87e0-432c-983c-aa4cd9d6c0f4}" start-anchor-pos-x="-8" start-anchor-pos-y="14" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="18" y="-408"/> - </connection-item> - <connection-item uuid="{416aa496-d8ff-453a-99d9-edc39ddc11db}" comment="" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" item0-uuid="{91afd6cd-8903-4a28-a8b5-902d81d30b23}" item1-uuid="{e3183f56-8e92-48f2-9e63-798a11029a7c}" start-anchor-pos-x="11" start-anchor-pos-y="14" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="206" y="-397"/> - </connection-item> - <transition-item uuid="{dc74662b-0754-4519-8b9d-efbb736b6774}" comment="" model-uuid="{1b2ac955-e294-4f2f-b828-c35f2c9f4de0}" start-anchor-pos-x="-50" start-anchor-pos-y="18" end-anchor-pos-x="-31" end-anchor-pos-y="-25"> - <control-point x="-185" y="-321"/> - </transition-item> - <connection-item uuid="{bc56200d-c100-471c-8cf3-b12a020e9d72}" comment="" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" item0-uuid="{4c6d1b56-4561-4879-8ab4-47a86601cab4}" item1-uuid="{6ae894b8-8b84-4974-88dd-eb4ce27fd813}" start-anchor-pos-x="35" start-anchor-pos-y="-1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-136" y="-187"/> - </connection-item> - <connection-item uuid="{bd445055-f596-4587-bdb5-5a1cfc919d42}" comment="" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" item0-uuid="{83f9bea4-aacf-4062-bc8a-bcfd79bae7fa}" item1-uuid="{53f32dc4-a851-4537-98f4-8e8abff38ed2}" start-anchor-pos-x="15" start-anchor-pos-y="2" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-168" y="-217"/> - </connection-item> - <transition-item uuid="{89e2f95b-3a4d-4ac9-b342-92b154b0e7ef}" comment="" model-uuid="{155808c9-c960-4ea3-87b7-28442e33e570}" start-anchor-pos-x="49" start-anchor-pos-y="13" end-anchor-pos-x="-50" end-anchor-pos-y="4"> - <control-point x="4" y="362"/> - </transition-item> - <transition-item uuid="{89cac8fd-c2cb-48ef-ae9b-bfcdaa1b0a35}" comment="" model-uuid="{d2530f1e-952a-469b-99b9-3d14f6cc5725}" start-anchor-pos-x="0" start-anchor-pos-y="24" end-anchor-pos-x="49" end-anchor-pos-y="-14"> - <control-point x="-174" y="449"/> - </transition-item> - <transition-item uuid="{d550268e-060d-4abb-bc2f-735c61773e1c}" comment="" model-uuid="{52d943f8-77fa-47e2-b168-bdd22430aa56}" start-anchor-pos-x="3" start-anchor-pos-y="24" end-anchor-pos-x="2" end-anchor-pos-y="-25"> - <control-point x="-33" y="-181"/> - </transition-item> - <connection-item uuid="{a66a2c63-4af5-4f5e-8551-7c69469e64ef}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{137b5047-2653-4b21-9bed-acef1c7725d3}" item1-uuid="{2c36e007-7f68-4f47-9181-f9dadd5bf770}" start-anchor-pos-x="1" start-anchor-pos-y="14" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="95" y="-175"/> - </connection-item> - <connection-item uuid="{aa1126c2-d455-481c-a44b-9f72bc0353f1}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{137b5047-2653-4b21-9bed-acef1c7725d3}" item1-uuid="{a2f6bb13-3096-41bd-9884-fee535166c5f}" start-anchor-pos-x="-34" start-anchor-pos-y="-2" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="44" y="-225"/> - </connection-item> - <transition-item uuid="{282f12fc-9be9-46f5-a589-76c8bbb92448}" comment="" model-uuid="{c523d16f-4f95-4fd1-92ed-d5f260181275}" start-anchor-pos-x="49" start-anchor-pos-y="0" end-anchor-pos-x="28" end-anchor-pos-y="-25"> - <control-point x="215" y="-86"/> - </transition-item> - <transition-item uuid="{41465473-4657-4fbf-8e8b-21d3f3963236}" comment="" model-uuid="{6e2abf59-807e-4d6f-912e-25970cc168e5}" start-anchor-pos-x="-50" start-anchor-pos-y="2" end-anchor-pos-x="-31" end-anchor-pos-y="-25"> - <control-point x="-178" y="-107"/> - </transition-item> - <transition-item uuid="{4c19a946-7ba2-4684-ad75-f16c7401f92c}" comment="" model-uuid="{067015a5-3465-4074-88d9-b261592f561e}" start-anchor-pos-x="-3" start-anchor-pos-y="24" end-anchor-pos-x="49" end-anchor-pos-y="13"> - <control-point x="30" y="446"/> - </transition-item> - <transition-item uuid="{cfd24c07-ba9d-4fb0-aa17-82f2d6553ec6}" comment="" model-uuid="{fcb62bb5-714c-462f-8f58-7ec0a21aae3d}" start-anchor-pos-x="-33" start-anchor-pos-y="24" end-anchor-pos-x="-29" end-anchor-pos-y="-25"> - <control-point x="-204" y="-20"/> - </transition-item> - <connection-item uuid="{bbb8f252-cbe0-4774-a0a4-23a3e467e778}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{6627193e-a861-475a-b878-4937f2f24c12}" item1-uuid="{27246ef9-fac1-4478-9fc1-de820e46fa36}" start-anchor-pos-x="-5" start-anchor-pos-y="14" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-272" y="333"/> - </connection-item> - <transition-item uuid="{9d518f8e-ab76-4fea-ab02-562560a453bc}" comment="" model-uuid="{208672f8-233a-42f2-b487-6b4fe306fb21}" start-anchor-pos-x="49" start-anchor-pos-y="-14" end-anchor-pos-x="-50" end-anchor-pos-y="-12"> - <control-point x="-108" y="83"/> - </transition-item> - <connection-item uuid="{669e68e9-cf35-4650-9e88-061f3d2c218d}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{6627193e-a861-475a-b878-4937f2f24c12}" item1-uuid="{b43c69b6-c828-4fb9-b2d1-236b92d39354}" start-anchor-pos-x="-5" start-anchor-pos-y="-15" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-259" y="114"/> - </connection-item> - <transition-item uuid="{b199ef15-f537-4d09-8430-5cb733850088}" comment="" model-uuid="{1e9ac17d-3833-4350-adf4-b32ef8a33cbc}" start-anchor-pos-x="4" start-anchor-pos-y="-1" end-anchor-pos-x="-3" end-anchor-pos-y="-25"> - <control-point x="-329" y="-597"/> - </transition-item> - <transition-item uuid="{d900ebb2-82b4-4408-b2a3-14489ec0403d}" comment="" model-uuid="{f1ccb28b-936f-41cd-bef4-23a370564f66}" start-anchor-pos-x="1" start-anchor-pos-y="24" end-anchor-pos-x="2" end-anchor-pos-y="-25"> - <control-point x="-291" y="-480"/> - </transition-item> - <transition-item uuid="{ba079e27-1f4e-46b4-82ed-d839f5f379b8}" comment="" model-uuid="{92e62da5-5178-455e-a39e-cfc0fc12020f}" start-anchor-pos-x="49" start-anchor-pos-y="0" end-anchor-pos-x="-3" end-anchor-pos-y="-25"> - <control-point x="-70" y="-383"/> - </transition-item> - <transition-item uuid="{c259991e-247c-4b96-b672-1c952808a913}" comment="" model-uuid="{577096fd-89b0-465b-bf05-b217576b78b8}" start-anchor-pos-x="-29" start-anchor-pos-y="24" end-anchor-pos-x="-30" end-anchor-pos-y="-25"> - <control-point x="-329" y="-376"/> - </transition-item> - <transition-item uuid="{8d685040-4a0a-455d-8f10-a97a8ec99909}" comment="" model-uuid="{b70e35f1-35e1-4247-98da-31c1b817c6e4}" start-anchor-pos-x="-50" start-anchor-pos-y="-1" end-anchor-pos-x="49" end-anchor-pos-y="-1"> - <control-point x="-198" y="-356"/> - </transition-item> - <connection-item uuid="{58643fa9-8ac3-42a6-9304-2570018a7645}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{b0be3f0f-716d-413b-bee4-c44506ceaa70}" item1-uuid="{298f4fbe-2e17-4f21-b4e2-2dee73ff224d}" start-anchor-pos-x="-41" start-anchor-pos-y="2" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-218" y="-520"/> - </connection-item> - <connection-item uuid="{c504823e-709e-4fe1-8e2d-ebe69c458a49}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{b0be3f0f-716d-413b-bee4-c44506ceaa70}" item1-uuid="{416f5759-afa3-496d-a2d9-9524ad9d9a6f}" start-anchor-pos-x="-2" start-anchor-pos-y="14" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-164" y="-459"/> - </connection-item> - <transition-item uuid="{3fa1439d-44f1-4214-a9f4-24bddde786af}" comment="" model-uuid="{618a1e55-5a7f-425b-915a-c673a797c133}" start-anchor-pos-x="-2" start-anchor-pos-y="24" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> - <control-point x="6" y="-272"/> - </transition-item> - <transition-item uuid="{2c5c9ce0-2ca6-4054-98b3-748384559482}" comment="" model-uuid="{5ee56053-c70e-4ecf-8316-2f33da01c0f5}" start-anchor-pos-x="-4" start-anchor-pos-y="24" end-anchor-pos-x="-50" end-anchor-pos-y="3"> - <control-point x="-288" y="539"/> - </transition-item> - <connection-item uuid="{df5589be-2ecd-4ef5-afba-84bb52655d91}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{358e8227-e6bc-43b2-8e45-9dbc3f504a2e}" item1-uuid="{99d4e23c-2825-4876-876e-490dd5bff4f7}" start-anchor-pos-x="-5" start-anchor-pos-y="14" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-271" y="462"/> - </connection-item> - <transition-item uuid="{260785c0-fad2-4839-afe3-f4fdf8c63647}" comment="" model-uuid="{1ae4ca20-77ba-4a65-bcc7-cd07cde23a00}" start-anchor-pos-x="-42" start-anchor-pos-y="-25" end-anchor-pos-x="41" end-anchor-pos-y="-25"> - <control-point x="-80" y="46"/> - </transition-item> - <connection-item uuid="{36145b3d-e402-43d6-bf7b-2a80033956ae}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{56408532-227e-444d-b34d-c1427f9e4e3b}" item1-uuid="{9844a8a9-a2fe-42d8-9e43-05f2a83fa3e3}" start-anchor-pos-x="-1" start-anchor-pos-y="14" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="118" y="53"/> - </connection-item> - <transition-item uuid="{e332e7a8-93ab-4854-99da-82606f98b07e}" comment="" model-uuid="{3aa389d7-7c29-4943-aa2c-18f35041d271}" start-anchor-pos-x="36" start-anchor-pos-y="24" end-anchor-pos-x="-34" end-anchor-pos-y="-25"> - <control-point x="155" y="149"/> - </transition-item> - <transition-item uuid="{59491fc9-a6e0-4a8c-9a6c-3068efda89c4}" comment="" model-uuid="{9d40bb14-ec60-4023-b061-8ea3866adb91}" start-anchor-pos-x="-32" start-anchor-pos-y="24" end-anchor-pos-x="-34" end-anchor-pos-y="-25"> - <control-point x="-383" y="-50"/> - </transition-item> - <transition-item uuid="{c544529a-669c-43d2-9f4e-9bd1509f9c61}" comment="" model-uuid="{ccfcc36a-83fe-4c42-a46f-1bfc0bfbbe70}" start-anchor-pos-x="-31" start-anchor-pos-y="24" end-anchor-pos-x="-13" end-anchor-pos-y="-25"> - <control-point x="-200" y="133"/> - </transition-item> - <transition-item uuid="{e7b18fd2-097c-41f5-8db1-a3345e3b9323}" comment="" model-uuid="{9280f700-4bb6-4858-ac10-18cee8b7f0d4}" start-anchor-pos-x="-1" start-anchor-pos-y="-5" end-anchor-pos-x="9" end-anchor-pos-y="2"> - <control-point x="208" y="-498"/> - <control-point x="277" y="499"/> - </transition-item> - <connection-item uuid="{d306bec0-70c9-419f-99b9-565589e6bdd6}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{447de153-121a-41ed-bed9-15b0f1f2a256}" item1-uuid="{d214dfa8-6144-4ca3-8e3f-d96065c43804}" start-anchor-pos-x="-16" start-anchor-pos-y="-2" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-109" y="295"/> - </connection-item> - <transition-item uuid="{c53f5aee-cce6-4d3b-97ed-f71fca80f1ca}" comment="" model-uuid="{dbc1a4ac-c079-4cc7-915d-1540c5c472b2}" start-anchor-pos-x="12" start-anchor-pos-y="24" end-anchor-pos-x="2" end-anchor-pos-y="-25"> - <control-point x="-166" y="345"/> - </transition-item> - <transition-item uuid="{3b1223c6-25c7-40a8-b20d-2a40ac6e85f1}" comment="" model-uuid="{5e1aa848-fe2b-40f0-a264-f7e12251b29e}" start-anchor-pos-x="-6" start-anchor-pos-y="24" end-anchor-pos-x="2" end-anchor-pos-y="-10"> - <control-point x="-122" y="579"/> - </transition-item> - <transition-item uuid="{3808637f-8cc5-4b17-af66-3202ef61d0ca}" comment="" model-uuid="{208e6a2f-231c-4681-855a-0c237fe00904}" start-anchor-pos-x="-16" start-anchor-pos-y="-25" end-anchor-pos-x="8" end-anchor-pos-y="-25"> - <control-point x="-172" y="8"/> - </transition-item> - <transition-item uuid="{16f1b4a1-4ee5-4ca1-a6ed-4c9f18955e99}" comment="" model-uuid="{bb37adb9-b38b-4302-b0d9-7af8d2fe50a6}" start-anchor-pos-x="-50" start-anchor-pos-y="12" end-anchor-pos-x="-8" end-anchor-pos-y="-25"> - <control-point x="-201" y="-274"/> - </transition-item> - <transition-item uuid="{9ecb4b78-05e5-470d-9799-5f7c92d4211d}" comment="" model-uuid="{ca4b3853-0cdf-46f6-87cb-c48fa25263ea}" start-anchor-pos-x="-32" start-anchor-pos-y="24" end-anchor-pos-x="-28" end-anchor-pos-y="-25"> - <control-point x="-330" y="34"/> - </transition-item> - <transition-item uuid="{36ad3a36-2125-45b5-8003-a1987932d78c}" comment="" model-uuid="{68f72ad5-caaf-404e-865d-42a79a5acbe6}" start-anchor-pos-x="33" start-anchor-pos-y="-25" end-anchor-pos-x="49" end-anchor-pos-y="-6"> - <control-point x="186" y="41"/> - </transition-item> - <connection-item uuid="{3e1752d5-944f-4ed5-895b-29abfd130b6a}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{a4a417f3-1f28-4011-9a99-c9a13ea95874}" item1-uuid="{1c1e140e-dd90-4bc6-a124-1191659320a4}" start-anchor-pos-x="-28" start-anchor-pos-y="-3" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-104" y="-49"/> - </connection-item> - <connection-item uuid="{cc2895f7-1f23-4070-a808-be64668126f4}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{c2dd0d4b-5a85-472f-ab29-487f66fcfc9a}" item1-uuid="{052ef46c-a125-4c91-8e2b-9030afdd10bf}" start-anchor-pos-x="2" start-anchor-pos-y="-15" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-67" y="153"/> - </connection-item> - <connection-item uuid="{6d3a92e0-284b-4e0a-98ff-496647b4b874}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{c2dd0d4b-5a85-472f-ab29-487f66fcfc9a}" item1-uuid="{641d2513-b7e9-4330-a929-7bf06e780c8b}" start-anchor-pos-x="0" start-anchor-pos-y="15" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-31.5" y="317"/> - </connection-item> - <connection-item uuid="{23aed132-6694-4791-8228-d4f90b1a3414}" comment="" region-uuid="{69450a3d-d8c3-4213-8047-3c95d5307036}" item0-uuid="{c2dd0d4b-5a85-472f-ab29-487f66fcfc9a}" item1-uuid="{5dc58083-7190-4537-87d4-51867baf32d4}" start-anchor-pos-x="11" start-anchor-pos-y="-15" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="50.5" y="156"/> - </connection-item> - <comment-item uuid="{b135fab4-df69-45a4-9a40-57b94aad4d44}" region-uuid="{1ab3ed91-0fda-433a-83d5-f083a523706a}" comment="log slot rate >= smi slot rate" x="-1.5" y="-134.5" width="207" height="31"/> - </diagram> - </diagrams> -</esmcontainer> diff --git a/examples/common/esmlib/input.esm b/examples/common/esmlib/input.esm index a8b22c47585101cc4379b98c7b6309fb496a5c72..4beb4e1af66676b9950e272579aba178e336d1b1 100644 --- a/examples/common/esmlib/input.esm +++ b/examples/common/esmlib/input.esm @@ -14,16 +14,19 @@ <flag uuid="{0416de1a-707a-4439-affb-7b65141b36ee}" name="quit" comment="" type="user_defined"/> <flag uuid="{d22ea071-ffea-43e7-903b-d3af52a589bc}" name="keyboard" comment="" type="user_defined"/> <flag uuid="{64fc7765-20b8-4177-80f9-ea055274b594}" name="timeout" comment="" type="user_defined"/> + <flag uuid="{a12184a1-b2e4-4b9a-a8a0-ce3c03465fa3}" name="quitChar" comment="" type="user_defined"/> </input-flags> <output-flags> </output-flags> <container-events> <event uuid="{99ab8caf-9069-429f-93e5-30249c050b9e}" name="keyboardQuit" comment=""/> + <event uuid="{970e8b84-1240-4884-9437-6adefb94a01d}" name="keyboardReady" comment=""/> </container-events> <input-events> </input-events> <output-events> <event-ref uuid="{99ab8caf-9069-429f-93e5-30249c050b9e}" name="keyboardQuit"/> + <event-ref uuid="{970e8b84-1240-4884-9437-6adefb94a01d}" name="keyboardReady"/> </output-events> <global-events> <event uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}" name="PULSEEVENT" type="pulseevent" comment=""/> @@ -43,7 +46,6 @@ <port uuid="{950a8753-b9be-4b84-9454-cc1dc6f02abd}" name="keyboard" comment="" data-storage-uuid="{7fa54bd8-973b-4ffe-ad4a-506fb627a013}" optional="0" allocation="1" release="0" read="0" write="1"/> </output-ports> <input-flags> - <flag uuid="{2c7387f6-1c77-44b3-8866-6489934eebd4}" name="quitChar" comment="" type="user_defined"/> </input-flags> <output-flags> <flag uuid="{363a8ec8-c9f8-4426-8701-69005dff227c}" name="0" comment="" type="user_defined"/> @@ -53,7 +55,7 @@ <flag uuid="{32b01e79-9a03-47ef-9a88-aea9577b45cc}" name="4" comment="" type="user_defined"/> <flag uuid="{362d2fe2-5800-43b2-a394-539c420d87d6}" name="5" comment="" type="user_defined"/> <flag uuid="{205530fe-f6cd-4b78-a5fd-34f5bc95855d}" name="6" comment="" type="user_defined"/> - <flag uuid="{c9a9d819-eede-46c1-858b-264542724887}" name="7" comment="" type="user_defined"/> + <flag uuid="{9af4cfd5-a0ab-40ca-a0d9-3a6ff788d692}" name="quit" comment="" type="user_defined"/> </output-flags> <system-flags> <flag uuid="{7edaad39-eaec-4269-9f9f-c2c6a2ee544a}" name="Timeout" comment="" type="timeout"/> @@ -87,6 +89,46 @@ <flag uuid="{0fdf2e6b-72ab-45ea-af78-235f7799b915}" name="Timeout" comment="" type="timeout"/> </system-flags> </basic-state> + <task-state uuid="{2a38f00d-953e-4242-93f6-ee9612be70eb}" name="setQuitChar" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="setQuitChar" task-slot-name="init" process-name="" real-time="1"> + <input-ports> + </input-ports> + <output-ports> + <port uuid="{c3a74469-cb12-484b-9619-bd10cd5966c2}" name="keyboard" comment="" data-storage-uuid="{38e0daf8-fac0-4052-ab73-56f7d689e3e5}" optional="0" allocation="0" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + </output-flags> + <system-flags> + <flag uuid="{94f75d50-ea57-44af-8d2c-1b1632d9a3d7}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{2554f1cc-af95-499b-8fdf-35a29a0200dd}" name="Exit" comment="" type="exit"/> + <flag uuid="{2241c48c-e98f-4443-ad9b-0344d4d742dd}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + <task-state uuid="{4c976404-f276-49b6-9e87-c5dd943baf46}" name="inputKeyboard" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="inputKeyboard" task-slot-name="" process-name="system" real-time="0"> + <input-ports> + </input-ports> + <output-ports> + <port uuid="{1f957fd0-6573-46e9-b45a-915ddca8a89d}" name="keyboard" comment="" data-storage-uuid="{7fa54bd8-973b-4ffe-ad4a-506fb627a013}" optional="0" allocation="1" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + <flag uuid="{397cae95-bbe8-414e-b530-071d72296d05}" name="0" comment="" type="user_defined"/> + <flag uuid="{7347aebb-b594-44e7-a5db-5b07e6af9dab}" name="1" comment="" type="user_defined"/> + <flag uuid="{1075acf0-9cbe-44df-86b9-8f306d6d7df6}" name="2" comment="" type="user_defined"/> + <flag uuid="{1f356f56-b0fa-4d01-894a-2d269db51c03}" name="3" comment="" type="user_defined"/> + <flag uuid="{bdbebbaa-173d-4b39-801e-0722d39da558}" name="4" comment="" type="user_defined"/> + <flag uuid="{564210fc-f289-4aa8-beb3-33d9f04aaadd}" name="5" comment="" type="user_defined"/> + <flag uuid="{81c2e1f3-7306-4d61-b0f2-45ffd7c9c802}" name="6" comment="" type="user_defined"/> + <flag uuid="{0e1d8c46-20da-41b7-bb26-e59913075d0c}" name="quit" comment="" type="user_defined"/> + </output-flags> + <system-flags> + <flag uuid="{a8d5f0f8-e44c-4a34-8673-be76f4104c01}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{b1b294f3-5a57-40fc-9d02-f377e020ea26}" name="Exit" comment="" type="exit"/> + <flag uuid="{38abd4a2-0630-49be-8e08-4d322ef8285d}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> </states> <transitions> <transition uuid="{179b4539-a04c-496c-aa17-b9fc6b4ee05c}" comment="" from-state-uuid="{850d1e49-9fa3-49e3-942d-c59c743e0374}" to-state-uuid="{ad0fce3d-2f82-423b-adfc-628064fe3865}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> @@ -118,7 +160,7 @@ </guard> <guard operator="none" flag-uuid="{205530fe-f6cd-4b78-a5fd-34f5bc95855d}"/> </guard> -<guard operator="negation" flag-uuid="{c9a9d819-eede-46c1-858b-264542724887}"/> +<guard operator="none" flag-uuid="{120864de-3e4b-4684-b2bd-32c313faff2a}"/> </guard> </transition> <transition uuid="{8e93ea72-3dae-48f2-9c7a-e3b8a6084190}" comment="" from-state-uuid="{6b6d2efe-6c07-48e0-8e9f-f5efd0f51482}" to-state-uuid="{0c42e806-a3b1-4922-a921-42633041c955}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> @@ -129,7 +171,10 @@ <transition uuid="{53ae1996-f5a6-41f6-84ab-0e02a3f9bddf}" comment="" from-state-uuid="{ad0fce3d-2f82-423b-adfc-628064fe3865}" to-state-uuid="{6b6d2efe-6c07-48e0-8e9f-f5efd0f51482}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> <actions> </actions> +<guard operator="and" flag-uuid=""> <guard operator="none" flag-uuid="{743e1303-f69a-449e-bd90-a8b11e970af1}"/> +<guard operator="negation" flag-uuid="{a12184a1-b2e4-4b9a-a8a0-ce3c03465fa3}"/> +</guard> </transition> <transition uuid="{3e27dc4d-2c0f-465e-b79f-ddec32d53bf9}" comment="" from-state-uuid="{850d1e49-9fa3-49e3-942d-c59c743e0374}" to-state-uuid="{311785f6-0fab-4011-90b5-0907fe621bf6}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> <actions> @@ -163,10 +208,120 @@ <transition uuid="{4455c632-3476-4477-a57f-714f279b5023}" comment="" from-state-uuid="{7df7c99d-4317-456a-936e-37559f75f1c3}" to-state-uuid="{0c42e806-a3b1-4922-a921-42633041c955}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> <actions> </actions> +<guard operator="none" flag-uuid="{0416de1a-707a-4439-affb-7b65141b36ee}"/> + </transition> + <transition uuid="{ebf7a8b8-97a4-4d43-9d8c-a7f93c01dd1c}" comment="" from-state-uuid="{ad0fce3d-2f82-423b-adfc-628064fe3865}" to-state-uuid="{2a38f00d-953e-4242-93f6-ee9612be70eb}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> + <actions> + </actions> +<guard operator="and" flag-uuid=""> +<guard operator="none" flag-uuid="{743e1303-f69a-449e-bd90-a8b11e970af1}"/> +<guard operator="none" flag-uuid="{a12184a1-b2e4-4b9a-a8a0-ce3c03465fa3}"/> +</guard> + </transition> + <transition uuid="{8d903399-d397-48f3-becc-00c2b9133c97}" comment="" from-state-uuid="{2a38f00d-953e-4242-93f6-ee9612be70eb}" to-state-uuid="{4c976404-f276-49b6-9e87-c5dd943baf46}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> + <actions> + <send-event-action uuid="{405fdcc2-09ec-46d2-a722-c8c628a1ea13}" name="" comment="" event-uuid="{970e8b84-1240-4884-9437-6adefb94a01d}"/> + </actions> +<guard operator="none" flag-uuid="{2554f1cc-af95-499b-8fdf-35a29a0200dd}"/> + </transition> + <transition uuid="{e6ba6a6d-bc66-4bf5-a32a-207b2093399d}" comment="" from-state-uuid="{4c976404-f276-49b6-9e87-c5dd943baf46}" to-state-uuid="{a03f5020-f0e5-468b-a7aa-f066ff6db18a}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> + <actions> + <send-event-action uuid="{f6d34698-5ca1-48fe-bc33-e8b8a941e09c}" name="" comment="" event-uuid="{99ab8caf-9069-429f-93e5-30249c050b9e}"/> + </actions> +<guard operator="none" flag-uuid="{0e1d8c46-20da-41b7-bb26-e59913075d0c}"/> + </transition> + <transition uuid="{83dc2927-026a-4880-b000-a841fd3be8a7}" comment="" from-state-uuid="{4c976404-f276-49b6-9e87-c5dd943baf46}" to-state-uuid="{0c42e806-a3b1-4922-a921-42633041c955}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> + <actions> + </actions> <guard operator="none" flag-uuid="{0416de1a-707a-4439-affb-7b65141b36ee}"/> </transition> </transitions> </region> + <region uuid="{9c790751-8e4b-40e0-8f4d-b86d78cd4192}" name="" comment="" number="1"> + <states> + <initial-state uuid="{ce5ad263-2b5f-4c43-b574-dae696a16971}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{94de9f1e-11a7-46d7-9a8e-1390cb45df10}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <task-state uuid="{272bbde2-288e-4448-a0be-add7daa29e44}" name="rtclock" comment="" timeout="0" flash-logging="0" gui-logging="0" telemetry-logging="0" task-function="rtclock" task-slot-name="rtclock" process-name="" real-time="1"> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + <flag uuid="{563fed32-dd16-47f0-a478-e4091fd814aa}" name="busy" comment="" type="user_defined"/> + <flag uuid="{d182a314-14cf-4b95-821b-419983daa7b4}" name="unlocked" comment="" type="user_defined"/> + </output-flags> + <system-flags> + <flag uuid="{8d5be606-3ae0-4a33-9e00-aeae0a05454c}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{097c07bf-0663-4a0a-9b7b-20fd4ad7fcd0}" name="Exit" comment="" type="exit"/> + <flag uuid="{ce29f960-b4e6-4577-8bac-e0a21a21a6c2}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + <task-state uuid="{d0c015f2-ec6b-422d-a08f-7229a863cae8}" name="busy" comment="" timeout="0" flash-logging="0" gui-logging="0" telemetry-logging="0" task-function="rtclock" task-slot-name="rtclock" process-name="" real-time="1"> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + </output-flags> + <system-flags> + <flag uuid="{c6621ae9-c825-4c70-bf7e-933d09a0d691}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{53fe5a74-d70a-46d3-a2c9-0608fdc516aa}" name="Exit" comment="" type="exit"/> + <flag uuid="{6055b097-60f7-4736-85cc-42ca69e4fdae}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + <task-state uuid="{0c7538c4-ed4e-4b00-97c3-b1c3f92696aa}" name="unlocked" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="rtclock" task-slot-name="rtclock" process-name="" real-time="1"> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + <flag uuid="{af9b124c-0b73-481b-8f9b-3d83829d4744}" name="busy" comment="" type="user_defined"/> + <flag uuid="{11d25511-2d09-45ed-88d6-d5c18746daae}" name="unlocked" comment="" type="user_defined"/> + </output-flags> + <system-flags> + <flag uuid="{8da9506f-34ea-4c0f-9baa-821d241f04aa}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{e0644ef1-9af3-4e1d-8831-6c44d3d0b6b7}" name="Exit" comment="" type="exit"/> + <flag uuid="{af5d30e9-17bd-48bf-b6f5-914928fcd38e}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + </states> + <transitions> + <transition uuid="{554ca140-b09e-4405-be8a-516cd67beb25}" comment="" from-state-uuid="{ce5ad263-2b5f-4c43-b574-dae696a16971}" to-state-uuid="{272bbde2-288e-4448-a0be-add7daa29e44}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> + <actions> + </actions> + </transition> + <transition uuid="{e21012fb-c7b5-4e55-99ed-02032de8638b}" comment="" from-state-uuid="{272bbde2-288e-4448-a0be-add7daa29e44}" to-state-uuid="{d0c015f2-ec6b-422d-a08f-7229a863cae8}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> + <actions> + </actions> +<guard operator="and" flag-uuid=""> +<guard operator="none" flag-uuid="{563fed32-dd16-47f0-a478-e4091fd814aa}"/> +<guard operator="negation" flag-uuid="{d182a314-14cf-4b95-821b-419983daa7b4}"/> +</guard> + </transition> + <transition uuid="{26403c15-f4ed-4b70-8543-86cde1d93cd1}" comment="" from-state-uuid="{d0c015f2-ec6b-422d-a08f-7229a863cae8}" to-state-uuid="{272bbde2-288e-4448-a0be-add7daa29e44}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> + <actions> + </actions> + </transition> + <transition uuid="{e7c6a97c-5442-4b8d-83eb-52b31765e52e}" comment="" from-state-uuid="{272bbde2-288e-4448-a0be-add7daa29e44}" to-state-uuid="{0c7538c4-ed4e-4b00-97c3-b1c3f92696aa}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{d182a314-14cf-4b95-821b-419983daa7b4}"/> + </transition> + <transition uuid="{1e256dd1-9b9f-46aa-853f-0b5107797fe9}" comment="" from-state-uuid="{0c7538c4-ed4e-4b00-97c3-b1c3f92696aa}" to-state-uuid="{272bbde2-288e-4448-a0be-add7daa29e44}" event-uuid="{3537eb78-3551-44e6-a6ea-912c04f080c3}"> + <actions> + </actions> + </transition> + </transitions> + </region> </regions> <diagrams> <diagram uuid="{5ad1d2bb-c8c7-4eb0-8a40-d7d3df3a06fe}" name="" comment=""> @@ -180,6 +335,15 @@ <box-item uuid="{1c443fb9-92c4-46cb-ac60-d7eb16b59833}" comment="" model-uuid="{311785f6-0fab-4011-90b5-0907fe621bf6}" x="-226" y="-348" width="20" height="20" type="standard_box"/> <box-item uuid="{445a3a1d-ebb6-47f9-8d13-5a6dcd36025a}" comment="" model-uuid="{a03f5020-f0e5-468b-a7aa-f066ff6db18a}" x="-105" y="-93" width="100" height="50" type="standard_box"/> <box-item uuid="{5525e30a-9679-4639-b667-a46ee15891b3}" comment="" model-uuid="{7df7c99d-4317-456a-936e-37559f75f1c3}" x="85" y="-56" width="100" height="50" type="standard_box"/> + <box-item uuid="{18c5460c-39e2-455b-943d-b173c1055898}" comment="" model-uuid="{9c790751-8e4b-40e0-8f4d-b86d78cd4192}" x="3270" y="2730" width="480" height="480" type="standard_box"/> + <box-item uuid="{2009d11e-6198-4fe7-8853-3720f345a27f}" comment="" model-uuid="{ce5ad263-2b5f-4c43-b574-dae696a16971}" x="-166" y="-186" width="12" height="12" type="standard_box"/> + <box-item uuid="{31a1dbd8-26b4-4053-bf60-6faf39a53b2f}" comment="" model-uuid="{272bbde2-288e-4448-a0be-add7daa29e44}" x="-37" y="-85" width="100" height="50" type="standard_box"/> + <box-item uuid="{8319653e-b012-4a27-9060-89923e0ad200}" comment="" model-uuid="{d0c015f2-ec6b-422d-a08f-7229a863cae8}" x="-126" y="34" width="100" height="50" type="standard_box"/> + <box-item uuid="{7dbd7960-9c6e-4258-a8f0-e432cf6376b5}" comment="" model-uuid="{0c7538c4-ed4e-4b00-97c3-b1c3f92696aa}" x="103" y="39" width="100" height="50" type="standard_box"/> + <box-item uuid="{7c0c514b-4f2a-40e3-8b77-4e1955eba8c8}" comment="" model-uuid="{2a38f00d-953e-4242-93f6-ee9612be70eb}" x="171" y="-283" width="100" height="50" type="standard_box"/> + <box-item uuid="{e5b53170-4e0f-4e6f-b491-df82f51f1526}" comment="" model-uuid="{c3a74469-cb12-484b-9619-bd10cd5966c2}" x="-40" y="25" width="10" height="10" type="standard_box"/> + <box-item uuid="{80839d3b-de42-4f41-b693-abeb656be821}" comment="" model-uuid="{4c976404-f276-49b6-9e87-c5dd943baf46}" x="176" y="-112" width="100" height="50" type="standard_box"/> + <box-item uuid="{5ce397e8-e3b4-4a77-bf74-87b664358d26}" comment="" model-uuid="{1f957fd0-6573-46e9-b45a-915ddca8a89d}" x="-40" y="25" width="10" height="10" type="standard_box"/> <data-storage-item uuid="{d1e9f5e3-d1f8-4b9d-9411-0fc2d4ee0b01}" description="" comment="" model-uuid="{7fa54bd8-973b-4ffe-ad4a-506fb627a013}" region-uuid="{4c2cf255-3d05-43c6-9c8d-e77eddc194dd}" x="8" y="-234" width="96" height="30"/> <data-storage-item uuid="{b0cb5961-d140-4798-a7a1-216d23c9da51}" description="" comment="" model-uuid="{38e0daf8-fac0-4052-ab73-56f7d689e3e5}" region-uuid="{4c2cf255-3d05-43c6-9c8d-e77eddc194dd}" x="39" y="-337" width="68" height="30"/> <transition-item uuid="{85ddad5e-5fad-4c8f-ad12-1773c9e306d2}" comment="" model-uuid="{179b4539-a04c-496c-aa17-b9fc6b4ee05c}" start-anchor-pos-x="4" start-anchor-pos-y="1" end-anchor-pos-x="-2" end-anchor-pos-y="-25.5"> @@ -219,6 +383,33 @@ <transition-item uuid="{e065b339-bc79-4411-830e-6bac248acbd9}" comment="" model-uuid="{4455c632-3476-4477-a57f-714f279b5023}" start-anchor-pos-x="-26" start-anchor-pos-y="25" end-anchor-pos-x="10" end-anchor-pos-y="-2"> <control-point x="-50.5" y="-2.5"/> </transition-item> + <transition-item uuid="{d6d6c016-53bf-4c0c-9944-8f61c6349912}" comment="" model-uuid="{554ca140-b09e-4405-be8a-516cd67beb25}" start-anchor-pos-x="6" start-anchor-pos-y="2" end-anchor-pos-x="0" end-anchor-pos-y="-25"> + <control-point x="-73.5" y="-175.5"/> + </transition-item> + <transition-item uuid="{d68b79c5-7ccc-42c5-b8af-afef53f8e65a}" comment="" model-uuid="{e21012fb-c7b5-4e55-99ed-02032de8638b}" start-anchor-pos-x="-19" start-anchor-pos-y="25" end-anchor-pos-x="21" end-anchor-pos-y="-25"> + <control-point x="-67.5" y="-23.5"/> + </transition-item> + <transition-item uuid="{912871fd-c082-4f2a-8b50-0a874ce5df1c}" comment="" model-uuid="{26403c15-f4ed-4b70-8543-86cde1d93cd1}" start-anchor-pos-x="-26" start-anchor-pos-y="-25" end-anchor-pos-x="-50" end-anchor-pos-y="-4"> + <control-point x="-156.5" y="-43.5"/> + </transition-item> + <transition-item uuid="{136fdafb-29b2-4cf5-9191-741e4c8a8703}" comment="" model-uuid="{e7c6a97c-5442-4b8d-83eb-52b31765e52e}" start-anchor-pos-x="50" start-anchor-pos-y="3" end-anchor-pos-x="-8" end-anchor-pos-y="-25"> + <control-point x="67.5" y="-57"/> + </transition-item> + <transition-item uuid="{badf3cbf-f2a5-4a5b-9b48-8418ec503f4a}" comment="" model-uuid="{1e256dd1-9b9f-46aa-853f-0b5107797fe9}" start-anchor-pos-x="21" start-anchor-pos-y="-25" end-anchor-pos-x="50" end-anchor-pos-y="-7"> + <control-point x="156" y="-78.5"/> + </transition-item> + <transition-item uuid="{06b92d2b-458a-41af-93fc-51a4a3e9ea38}" comment="" model-uuid="{ebf7a8b8-97a4-4d43-9d8c-a7f93c01dd1c}" start-anchor-pos-x="70.5" start-anchor-pos-y="25.5" end-anchor-pos-x="-50" end-anchor-pos-y="-11"> + <control-point x="-1.5" y="-299.5"/> + </transition-item> + <transition-item uuid="{d6b1d8b8-7f4f-4fdf-805d-601015f66dba}" comment="" model-uuid="{8d903399-d397-48f3-becc-00c2b9133c97}" start-anchor-pos-x="23" start-anchor-pos-y="25" end-anchor-pos-x="3" end-anchor-pos-y="-25"> + <control-point x="101.5" y="-201.5"/> + </transition-item> + <transition-item uuid="{1b592f67-a513-4369-9f72-11958d52a9d2}" comment="" model-uuid="{e6ba6a6d-bc66-4bf5-a32a-207b2093399d}" start-anchor-pos-x="-50" start-anchor-pos-y="1" end-anchor-pos-x="50" end-anchor-pos-y="-8"> + <control-point x="35.5" y="-96"/> + </transition-item> + <transition-item uuid="{20450194-e351-4043-ad5e-e194335b28cd}" comment="" model-uuid="{83dc2927-026a-4880-b000-a841fd3be8a7}" start-anchor-pos-x="25" start-anchor-pos-y="25" end-anchor-pos-x="10" end-anchor-pos-y="2"> + <control-point x="129" y="47.5"/> + </transition-item> </diagram> </diagrams> </esmcontainer> diff --git a/examples/common/esmlib/input_char.esm b/examples/common/esmlib/input_char.esm new file mode 100644 index 0000000000000000000000000000000000000000..f6a88459c811ec06df7e3551a0070ddf54c236b1 --- /dev/null +++ b/examples/common/esmlib/input_char.esm @@ -0,0 +1,198 @@ +<?xml version="1.0"?> +<esmcontainer uuid="{8b522a95-a8b4-4f4c-b837-234e343d4c4e}" name="input" cloned-from="input_char.esm" comment="" scene-width="0" scene-height="0"> + <data-storage-list> + <data-storage uuid="{3bf6db79-e325-4918-a0a1-2806b06f5b4a}" name="keyboard" comment=""/> + <data-storage uuid="{53379f92-0249-44c5-82ca-d0fc87ad1532}" name="keyboardNRT" comment=""/> + <data-storage uuid="{7b23c762-cf50-4ea3-9635-46fdbf3f552f}" name="quitChar" comment=""/> + </data-storage-list> + <input-ports> + </input-ports> + <output-ports> + <port uuid="{783ac6bb-e25b-4336-9161-9c6e5a174291}" name="keyboard" comment="" data-storage-uuid="{3bf6db79-e325-4918-a0a1-2806b06f5b4a}" optional="0" allocation="1" release="0" read="0" write="1"/> + <port uuid="{44cd2810-83c5-46a6-98ee-1398a0eb4b08}" name="keyboardNRT" comment="" data-storage-uuid="{53379f92-0249-44c5-82ca-d0fc87ad1532}" optional="0" allocation="1" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + <flag uuid="{33a10cfb-d3ce-4ae2-991a-abc5d8a28bb3}" name="quit" comment="" type="user_defined"/> + <flag uuid="{bec3bc4a-dd81-49c4-b03f-d6d7b4b67a06}" name="keyboard" comment="" type="user_defined"/> + </input-flags> + <output-flags> + </output-flags> + <container-events> + <event uuid="{9e0cae6e-2745-42f1-8d4f-35609eff2cd3}" name="keyboardQuit" comment=""/> + <event uuid="{8c9a24d5-84d5-4e8e-afac-524316fa2265}" name="keyboardReady" comment=""/> + </container-events> + <input-events> + </input-events> + <output-events> + <event-ref uuid="{9e0cae6e-2745-42f1-8d4f-35609eff2cd3}" name="keyboardQuit"/> + <event-ref uuid="{8c9a24d5-84d5-4e8e-afac-524316fa2265}" name="keyboardReady"/> + </output-events> + <global-events> + <event uuid="{626a46ae-7d52-468b-944a-5f045a787a78}" name="PULSEEVENT" type="pulseevent" comment=""/> + </global-events> + <regions> + <region uuid="{fb240be1-8071-4802-a920-a5b64cb78489}" name="Region0" comment="" number="0"> + <states> + <initial-state uuid="{c4afe65c-8baf-4445-97e5-8a2d094cc101}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{17d7d427-772a-4061-9eef-4b14d059f8f8}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <task-state uuid="{1b095afc-3295-48cb-a67d-9754acec53fe}" name="getKey" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="0" task-function="inputKeyboard" task-slot-name="system" process-name="system" real-time="0"> + <input-ports> + </input-ports> + <output-ports> + <port uuid="{37c59970-4bb2-4cc1-9a4a-01063444e91e}" name="keyboard" comment="" data-storage-uuid="{53379f92-0249-44c5-82ca-d0fc87ad1532}" optional="0" allocation="1" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + <flag uuid="{8258f8d2-b8e3-4ba2-b0b9-79b29e0e060f}" name="0" comment="" type="user_defined"/> + <flag uuid="{cb709d88-b571-45a0-be88-e8b4a00bc3dc}" name="1" comment="" type="user_defined"/> + <flag uuid="{81ee0689-1fe7-4edd-b7b9-22866e5b6a72}" name="2" comment="" type="user_defined"/> + <flag uuid="{24247045-8a30-4f7a-b663-c198534eb700}" name="3" comment="" type="user_defined"/> + <flag uuid="{9a5a1987-ba03-4aa8-8f5e-81e2db0cdea0}" name="4" comment="" type="user_defined"/> + <flag uuid="{690a4731-7822-4335-9783-16d5ac97e4ed}" name="5" comment="" type="user_defined"/> + <flag uuid="{32f080c2-9817-4260-aba7-0d73f8a26366}" name="6" comment="" type="user_defined"/> + <flag uuid="{82f85da0-64ac-468d-ba0f-6b8014578b3d}" name="quit" comment="" type="user_defined"/> + </output-flags> + <system-flags> + <flag uuid="{64adfb4c-992a-4fe0-a7ba-a0dc22af19ba}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{733bb8ed-7ea0-43b7-8bfd-28352d19af03}" name="Exit" comment="" type="exit"/> + <flag uuid="{8b4b751e-0121-4579-87b8-23162bbbffe9}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + <task-state uuid="{56bdb2e9-1444-419f-b3a4-4d1310d10843}" name="inputGetKeyboardVar" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="inputGetKeyboardVar" task-slot-name="init" process-name="" real-time="1"> + <input-ports> + </input-ports> + <output-ports> + <port uuid="{39fb0bda-05b8-40d8-a0b2-b988fcd8e1fa}" name="keyboard" comment="" data-storage-uuid="{3bf6db79-e325-4918-a0a1-2806b06f5b4a}" optional="0" allocation="1" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + </output-flags> + <system-flags> + <flag uuid="{75b8fb0e-260a-4f42-984a-fc11f0cd1347}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{856d8a54-75ff-4efe-9c02-edd669b57ce7}" name="Exit" comment="" type="exit"/> + <flag uuid="{bae5fff8-ff4b-4869-994b-a0536121e14a}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + <final-state uuid="{506d1998-63ac-4845-ba64-5c2d7ab9529f}" name="[exit]" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> + <task-state uuid="{98b7334f-06ff-4067-9375-c306923da129}" name="setQuitChar" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="setQuitChar" task-slot-name="init" process-name="" real-time="1"> + <input-ports> + </input-ports> + <output-ports> + <port uuid="{412ec040-6a11-4c32-879d-9cd839a0e049}" name="keyboard" comment="" data-storage-uuid="{3bf6db79-e325-4918-a0a1-2806b06f5b4a}" optional="0" allocation="0" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + </output-flags> + <system-flags> + <flag uuid="{d7f42b0a-a67a-4045-8d8b-2ac2e5897458}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{7f49b203-e21c-4a37-9a7d-226d3340e5a6}" name="Exit" comment="" type="exit"/> + <flag uuid="{7a082c96-c02b-469b-b303-c59e64c87ede}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + <basic-state uuid="{1bd53f12-2c02-4cfd-b418-355f42c7b63b}" name="wait" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{db95f73d-d4d6-4bea-b6b2-8e4009e6fc3d}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + </states> + <transitions> + <transition uuid="{d64d799e-410a-4e2a-8ef7-d826c9356488}" comment="" from-state-uuid="{c4afe65c-8baf-4445-97e5-8a2d094cc101}" to-state-uuid="{56bdb2e9-1444-419f-b3a4-4d1310d10843}" event-uuid="{626a46ae-7d52-468b-944a-5f045a787a78}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{bec3bc4a-dd81-49c4-b03f-d6d7b4b67a06}"/> + </transition> + <transition uuid="{15481e7b-9941-4296-8081-f37b403c6afe}" comment="" from-state-uuid="{1bd53f12-2c02-4cfd-b418-355f42c7b63b}" to-state-uuid="{506d1998-63ac-4845-ba64-5c2d7ab9529f}" event-uuid="{626a46ae-7d52-468b-944a-5f045a787a78}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{33a10cfb-d3ce-4ae2-991a-abc5d8a28bb3}"/> + </transition> + <transition uuid="{fe9c2138-656b-4161-904d-f6c0c861e45b}" comment="" from-state-uuid="{56bdb2e9-1444-419f-b3a4-4d1310d10843}" to-state-uuid="{98b7334f-06ff-4067-9375-c306923da129}" event-uuid="{626a46ae-7d52-468b-944a-5f045a787a78}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{856d8a54-75ff-4efe-9c02-edd669b57ce7}"/> + </transition> + <transition uuid="{b82177ae-9968-4368-84dc-f18e9c86e2be}" comment="" from-state-uuid="{c4afe65c-8baf-4445-97e5-8a2d094cc101}" to-state-uuid="{506d1998-63ac-4845-ba64-5c2d7ab9529f}" event-uuid="{626a46ae-7d52-468b-944a-5f045a787a78}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{33a10cfb-d3ce-4ae2-991a-abc5d8a28bb3}"/> + </transition> + <transition uuid="{6590bb80-8a1e-4a38-8955-a398c8dd8294}" comment="" from-state-uuid="{1b095afc-3295-48cb-a67d-9754acec53fe}" to-state-uuid="{1bd53f12-2c02-4cfd-b418-355f42c7b63b}" event-uuid="{626a46ae-7d52-468b-944a-5f045a787a78}"> + <actions> + <send-event-action uuid="{bfa14c35-c46c-4ebe-9fc7-d1e7b33ab50a}" name="" comment="" event-uuid="{9e0cae6e-2745-42f1-8d4f-35609eff2cd3}"/> + </actions> +<guard operator="none" flag-uuid="{82f85da0-64ac-468d-ba0f-6b8014578b3d}"/> + </transition> + <transition uuid="{ebbca6f4-f9c8-471e-8c05-8e9620e49683}" comment="" from-state-uuid="{98b7334f-06ff-4067-9375-c306923da129}" to-state-uuid="{1b095afc-3295-48cb-a67d-9754acec53fe}" event-uuid="{626a46ae-7d52-468b-944a-5f045a787a78}"> + <actions> + <send-event-action uuid="{edc7a08c-eada-4339-853c-760df35b5049}" name="" comment="" event-uuid="{8c9a24d5-84d5-4e8e-afac-524316fa2265}"/> + </actions> +<guard operator="none" flag-uuid="{7f49b203-e21c-4a37-9a7d-226d3340e5a6}"/> + </transition> + <transition uuid="{7a4eafee-4750-4e5f-b6d5-b78e85eba823}" comment="" from-state-uuid="{1b095afc-3295-48cb-a67d-9754acec53fe}" to-state-uuid="{506d1998-63ac-4845-ba64-5c2d7ab9529f}" event-uuid="{626a46ae-7d52-468b-944a-5f045a787a78}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{33a10cfb-d3ce-4ae2-991a-abc5d8a28bb3}"/> + </transition> + <transition uuid="{c4da18e4-68ed-472c-85cc-a54e97d2349e}" comment="" from-state-uuid="{98b7334f-06ff-4067-9375-c306923da129}" to-state-uuid="{506d1998-63ac-4845-ba64-5c2d7ab9529f}" event-uuid="{626a46ae-7d52-468b-944a-5f045a787a78}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{33a10cfb-d3ce-4ae2-991a-abc5d8a28bb3}"/> + </transition> + </transitions> + </region> + </regions> + <diagrams> + <diagram uuid="{7a0e9c67-9647-4961-9342-f484e5b10910}" name="" comment=""> + <box-item uuid="{40848566-0b9f-4a0c-a8ed-d0df8a95c581}" comment="" model-uuid="{fb240be1-8071-4802-a920-a5b64cb78489}" x="2430" y="2700" width="480" height="600" type="standard_box"/> + <box-item uuid="{1b95507f-91fd-48ef-9b7f-ad5b1bd69751}" comment="" model-uuid="{c4afe65c-8baf-4445-97e5-8a2d094cc101}" x="-160" y="-271" width="10" height="10" type="standard_box"/> + <box-item uuid="{4b19aeff-5893-4f1b-8b2a-04116de06720}" comment="" model-uuid="{1b095afc-3295-48cb-a67d-9754acec53fe}" x="-30" y="47" width="100" height="50" type="standard_box"/> + <box-item uuid="{a81ddf5e-8550-4a19-8bc2-4756995fbf99}" comment="" model-uuid="{37c59970-4bb2-4cc1-9a4a-01063444e91e}" x="50" y="-2" width="20" height="20" type="standard_box"/> + <box-item uuid="{16069b21-aa81-422a-8e9b-33e118e4100c}" comment="" model-uuid="{56bdb2e9-1444-419f-b3a4-4d1310d10843}" x="-34" y="-173.5" width="162" height="51" type="standard_box"/> + <box-item uuid="{578af28e-8f53-4e62-a345-f2ec719046ef}" comment="" model-uuid="{39fb0bda-05b8-40d8-a0b2-b988fcd8e1fa}" x="81" y="2" width="20" height="20" type="standard_box"/> + <box-item uuid="{85182cf5-1b70-4be6-89aa-8496609ad4c2}" comment="" model-uuid="{506d1998-63ac-4845-ba64-5c2d7ab9529f}" x="-169" y="271" width="20" height="20" type="standard_box"/> + <box-item uuid="{2f66d138-87ce-46d9-9ed2-67bac7f1f4aa}" comment="" model-uuid="{98b7334f-06ff-4067-9375-c306923da129}" x="-32" y="-76" width="100" height="50" type="standard_box"/> + <box-item uuid="{f5a10884-ec11-4705-9d48-352ea8fab058}" comment="" model-uuid="{412ec040-6a11-4c32-879d-9cd839a0e049}" x="50" y="-2" width="10" height="10" type="standard_box"/> + <box-item uuid="{2c839ebf-0073-4c45-aac0-cbba57e72666}" comment="" model-uuid="{1bd53f12-2c02-4cfd-b418-355f42c7b63b}" x="-28" y="205" width="100" height="50" type="standard_box"/> + <data-storage-item uuid="{fba08ee3-93b5-4414-8f5d-692acaa299d6}" description="" comment="" model-uuid="{53379f92-0249-44c5-82ca-d0fc87ad1532}" region-uuid="{fb240be1-8071-4802-a920-a5b64cb78489}" x="123.5" y="44.5" width="101" height="33"/> + <data-storage-item uuid="{9b2c379e-cf57-4188-b5cb-8efb9793cb38}" description="" comment="" model-uuid="{3bf6db79-e325-4918-a0a1-2806b06f5b4a}" region-uuid="{fb240be1-8071-4802-a920-a5b64cb78489}" x="133.5" y="-173" width="75" height="30"/> + <transition-item uuid="{61d445fe-8d97-478a-9c9a-14c0dfd3a8e1}" comment="" model-uuid="{d64d799e-410a-4e2a-8ef7-d826c9356488}" start-anchor-pos-x="0" start-anchor-pos-y="5" end-anchor-pos-x="-2" end-anchor-pos-y="-25.5"> + <control-point x="-72" y="-253"/> + </transition-item> + <transition-item uuid="{830268bc-f040-43a5-af88-d092135beb24}" comment="" model-uuid="{15481e7b-9941-4296-8081-f37b403c6afe}" start-anchor-pos-x="-6" start-anchor-pos-y="25" end-anchor-pos-x="10" end-anchor-pos-y="-2"> + <control-point x="-87" y="260"/> + </transition-item> + <connection-item uuid="{49d814e6-7fb7-49dc-93e2-fdb9dd388bee}" comment="" region-uuid="{fb240be1-8071-4802-a920-a5b64cb78489}" item0-uuid="{fba08ee3-93b5-4414-8f5d-692acaa299d6}" item1-uuid="{a81ddf5e-8550-4a19-8bc2-4756995fbf99}" start-anchor-pos-x="-50.5" start-anchor-pos-y="2" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="40" y="46"/> + </connection-item> + <transition-item uuid="{88c98b04-d72a-409d-a239-22c469635b9b}" comment="" model-uuid="{fe9c2138-656b-4161-904d-f6c0c861e45b}" start-anchor-pos-x="2" start-anchor-pos-y="25.5" end-anchor-pos-x="2" end-anchor-pos-y="-25"> + <control-point x="-31" y="-127"/> + </transition-item> + <transition-item uuid="{f3821650-762a-423b-adfc-d4fc6b049698}" comment="" model-uuid="{b82177ae-9968-4368-84dc-f18e9c86e2be}" start-anchor-pos-x="2" start-anchor-pos-y="4" end-anchor-pos-x="1" end-anchor-pos-y="-10"> + <control-point x="-175" y="-132"/> + </transition-item> + <connection-item uuid="{bd1157d0-8418-4e53-91a0-74f2dbf19937}" comment="" region-uuid="{fb240be1-8071-4802-a920-a5b64cb78489}" item0-uuid="{9b2c379e-cf57-4188-b5cb-8efb9793cb38}" item1-uuid="{578af28e-8f53-4e62-a345-f2ec719046ef}" start-anchor-pos-x="-37.5" start-anchor-pos-y="1" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="74" y="-171.5"/> + </connection-item> + <transition-item uuid="{8b6ef673-028d-4e34-bdc6-afc1e40c650c}" comment="" model-uuid="{6590bb80-8a1e-4a38-8955-a398c8dd8294}" start-anchor-pos-x="1" start-anchor-pos-y="25" end-anchor-pos-x="0" end-anchor-pos-y="-25"> + <control-point x="-29" y="127"/> + </transition-item> + <connection-item uuid="{ee86fa5f-4421-4fa7-a81d-08628e258c55}" comment="" region-uuid="{fb240be1-8071-4802-a920-a5b64cb78489}" item0-uuid="{9b2c379e-cf57-4188-b5cb-8efb9793cb38}" item1-uuid="{f5a10884-ec11-4705-9d48-352ea8fab058}" start-anchor-pos-x="-2" start-anchor-pos-y="15" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="97.5" y="-84.5"/> + </connection-item> + <transition-item uuid="{06c655b1-6af8-4c9f-a438-0b1b9eced35a}" comment="" model-uuid="{ebbca6f4-f9c8-471e-8c05-8e9620e49683}" start-anchor-pos-x="0" start-anchor-pos-y="25" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> + <control-point x="-31.5" y="-14"/> + </transition-item> + <transition-item uuid="{63089237-569c-4ee7-9d8c-012deba0c477}" comment="" model-uuid="{7a4eafee-4750-4e5f-b6d5-b78e85eba823}" start-anchor-pos-x="-50" start-anchor-pos-y="6" end-anchor-pos-x="2" end-anchor-pos-y="-10"> + <control-point x="-150" y="87"/> + </transition-item> + <transition-item uuid="{02908645-8b43-4e4d-a1db-530d1ae4c7fa}" comment="" model-uuid="{c4da18e4-68ed-472c-85cc-a54e97d2349e}" start-anchor-pos-x="-50" start-anchor-pos-y="4" end-anchor-pos-x="3" end-anchor-pos-y="-10"> + <control-point x="-154.5" y="-1.5"/> + </transition-item> + </diagram> + </diagrams> +</esmcontainer> diff --git a/examples/common/esmlib/ioPorts.esm b/examples/common/esmlib/ioPorts.esm index b47dc68c76b58838e804f8b85158a691cb3ca5be..5cbe99bbbd11619f473c28a71f25050936c647e0 100644 --- a/examples/common/esmlib/ioPorts.esm +++ b/examples/common/esmlib/ioPorts.esm @@ -13,13 +13,15 @@ </output-flags> <container-events> <event uuid="{468df0ae-8bc5-4d3c-893f-798c2f237b38}" name="ioPortsAllocated" comment=""/> - <event uuid="{d94f0f2c-e4af-44c9-8baa-1d9fd4953760}" name="ioReqPortsAllocated" comment=""/> + <event uuid="{638f39f9-f8a5-429b-a75d-b1f8cd4309ad}" name="ioPortsError" comment=""/> + <event uuid="{d94f0f2c-e4af-44c9-8baa-1d9fd4953760}" name="reqIoPortsState" comment=""/> </container-events> <input-events> - <event-ref uuid="{d94f0f2c-e4af-44c9-8baa-1d9fd4953760}" name="ioReqPortsAllocated"/> + <event-ref uuid="{d94f0f2c-e4af-44c9-8baa-1d9fd4953760}" name="reqIoPortsState"/> </input-events> <output-events> <event-ref uuid="{468df0ae-8bc5-4d3c-893f-798c2f237b38}" name="ioPortsAllocated"/> + <event-ref uuid="{638f39f9-f8a5-429b-a75d-b1f8cd4309ad}" name="ioPortsError"/> </output-events> <global-events> <event uuid="{6535242d-aa16-4220-bde8-4ccec1a9b8c1}" name="PULSEEVENT" type="pulseevent" comment=""/> @@ -126,8 +128,12 @@ </transition> <transition uuid="{364cca83-c522-4c7d-bcd2-edd77ce6a6fb}" comment="" from-state-uuid="{a9e00c66-6727-4cc0-a3ba-ccf83d25f128}" to-state-uuid="{a2efaa38-4e5c-4f2e-88d1-92d838dd0f38}" event-uuid="{6535242d-aa16-4220-bde8-4ccec1a9b8c1}"> <actions> + <send-event-action uuid="{255b0b8e-32fd-46c1-97fc-7ca51a9156d5}" name="" comment="" event-uuid="{638f39f9-f8a5-429b-a75d-b1f8cd4309ad}"/> </actions> +<guard operator="and" flag-uuid=""> <guard operator="none" flag-uuid="{120c85ab-a1fc-44f5-a841-294391184ff3}"/> +<guard operator="negation" flag-uuid="{df9aa902-bcb4-42c5-8ffc-3aca8be6e872}"/> +</guard> </transition> <transition uuid="{9a5296e5-ae47-402b-bcb0-39d3d0b10724}" comment="" from-state-uuid="{a2efaa38-4e5c-4f2e-88d1-92d838dd0f38}" to-state-uuid="{52159f7f-9463-437c-bb5f-28c0b6ebcc39}" event-uuid="{6535242d-aa16-4220-bde8-4ccec1a9b8c1}"> <actions> @@ -146,6 +152,7 @@ </transition> <transition uuid="{767656fa-c604-4171-b1de-6b7553c8de3d}" comment="" from-state-uuid="{80e97acd-b5be-4ffc-9bd4-8cf289c6a21d}" to-state-uuid="{a2efaa38-4e5c-4f2e-88d1-92d838dd0f38}" event-uuid="{6535242d-aa16-4220-bde8-4ccec1a9b8c1}"> <actions> + <send-event-action uuid="{76bcf585-a1a0-4e89-9b3f-4dafba2d889c}" name="" comment="" event-uuid="{638f39f9-f8a5-429b-a75d-b1f8cd4309ad}"/> </actions> <guard operator="none" flag-uuid="{e7c04cd0-8544-4996-81d2-247b2aab70d2}"/> </transition> @@ -156,6 +163,12 @@ </transition> <transition uuid="{afe5a881-08c1-4682-8a4a-526df65cbc8a}" comment="" from-state-uuid="{7fc6bf3e-0a49-4977-9960-781dc17fdcd0}" to-state-uuid="{a2efaa38-4e5c-4f2e-88d1-92d838dd0f38}" event-uuid="{6535242d-aa16-4220-bde8-4ccec1a9b8c1}"> <actions> + <send-event-action uuid="{4a7ada17-3a97-48e4-9855-5c58b0cbbd3e}" name="" comment="" event-uuid="{638f39f9-f8a5-429b-a75d-b1f8cd4309ad}"/> + </actions> + </transition> + <transition uuid="{2dacd50b-a079-4f71-ba17-e6976c351557}" comment="" from-state-uuid="{a2efaa38-4e5c-4f2e-88d1-92d838dd0f38}" to-state-uuid="{a2efaa38-4e5c-4f2e-88d1-92d838dd0f38}" event-uuid="{d94f0f2c-e4af-44c9-8baa-1d9fd4953760}"> + <actions> + <send-event-action uuid="{19850fe1-7635-43ac-a20b-aa5ad6d4f74f}" name="" comment="" event-uuid="{638f39f9-f8a5-429b-a75d-b1f8cd4309ad}"/> </actions> </transition> </transitions> @@ -169,13 +182,13 @@ <box-item uuid="{da013335-d1ec-48e4-8d95-5b2d07f2062c}" comment="" model-uuid="{80e97acd-b5be-4ffc-9bd4-8cf289c6a21d}" x="-132" y="-294" width="100" height="50" type="standard_box"/> <box-item uuid="{9ffbc551-b146-4697-8943-e96e422d37ff}" comment="" model-uuid="{a9e00c66-6727-4cc0-a3ba-ccf83d25f128}" x="-131" y="-189" width="100" height="50" type="standard_box"/> <box-item uuid="{fa971e93-fa9a-4914-82bd-870ef2e7b1f4}" comment="" model-uuid="{52159f7f-9463-437c-bb5f-28c0b6ebcc39}" x="-127" y="26" width="100" height="50" type="standard_box"/> - <box-item uuid="{eb823f9e-e895-4c12-a6a5-60c3557c6ca3}" comment="" model-uuid="{a2efaa38-4e5c-4f2e-88d1-92d838dd0f38}" x="136" y="45" width="100" height="50" type="standard_box"/> + <box-item uuid="{eb823f9e-e895-4c12-a6a5-60c3557c6ca3}" comment="" model-uuid="{a2efaa38-4e5c-4f2e-88d1-92d838dd0f38}" x="113" y="23" width="100" height="50" type="standard_box"/> <box-item uuid="{9246fff1-3d84-4901-8258-256650a46e23}" comment="" model-uuid="{cf371202-afd2-4f3e-afcb-e7234eadb06d}" x="-129" y="120" width="20" height="20" type="standard_box"/> - <box-item uuid="{094efa07-635a-498a-b21f-bc853932aa8f}" comment="" model-uuid="{7fc6bf3e-0a49-4977-9960-781dc17fdcd0}" x="164.5" y="-158" width="119" height="50" type="standard_box"/> + <box-item uuid="{094efa07-635a-498a-b21f-bc853932aa8f}" comment="" model-uuid="{7fc6bf3e-0a49-4977-9960-781dc17fdcd0}" x="163.5" y="-175" width="119" height="50" type="standard_box"/> <transition-item uuid="{baa90949-cbb3-4dae-8b62-272e083d1a73}" comment="" model-uuid="{d4587fea-8627-440f-9d79-5f7fa86a7078}" start-anchor-pos-x="4" start-anchor-pos-y="0" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> <control-point x="-150" y="-367"/> </transition-item> - <transition-item uuid="{5f391e6f-5ef0-4a53-9112-da44645ee1c9}" comment="" model-uuid="{ad1b106a-6ecc-4c49-a245-f2e520fb254d}" start-anchor-pos-x="1" start-anchor-pos-y="24" end-anchor-pos-x="-4" end-anchor-pos-y="-25"> + <transition-item uuid="{5f391e6f-5ef0-4a53-9112-da44645ee1c9}" comment="" model-uuid="{ad1b106a-6ecc-4c49-a245-f2e520fb254d}" start-anchor-pos-x="1" start-anchor-pos-y="24" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> <control-point x="-138" y="-24"/> </transition-item> <transition-item uuid="{02cb3fe4-5260-459b-8b52-7854bef25459}" comment="" model-uuid="{e767ebbb-3a81-4a52-9a55-7cc23937ebe3}" start-anchor-pos-x="0" start-anchor-pos-y="24" end-anchor-pos-x="-2" end-anchor-pos-y="-25"> @@ -185,9 +198,9 @@ <control-point x="-165" y="-119"/> </transition-item> <transition-item uuid="{7dca18a5-28f1-4939-91bb-9d2dcb0d3f4c}" comment="" model-uuid="{364cca83-c522-4c7d-bcd2-edd77ce6a6fb}" start-anchor-pos-x="49" start-anchor-pos-y="-1" end-anchor-pos-x="-2" end-anchor-pos-y="-25"> - <control-point x="1" y="-171"/> + <control-point x="-4" y="-140"/> </transition-item> - <transition-item uuid="{620c82f3-91af-475f-aa7c-ca937413d385}" comment="" model-uuid="{9a5296e5-ae47-402b-bcb0-39d3d0b10724}" start-anchor-pos-x="-50" start-anchor-pos-y="3" end-anchor-pos-x="49" end-anchor-pos-y="-1"> + <transition-item uuid="{620c82f3-91af-475f-aa7c-ca937413d385}" comment="" model-uuid="{9a5296e5-ae47-402b-bcb0-39d3d0b10724}" start-anchor-pos-x="-50" start-anchor-pos-y="3" end-anchor-pos-x="50" end-anchor-pos-y="-4"> <control-point x="-44" y="25"/> </transition-item> <transition-item uuid="{5d978daf-774d-4bd8-968c-2231a3967bbd}" comment="" model-uuid="{fc8dc2d1-f594-44d3-b1ef-9110ceb5c837}" start-anchor-pos-x="-4" start-anchor-pos-y="24" end-anchor-pos-x="-2" end-anchor-pos-y="-10"> @@ -197,7 +210,7 @@ <control-point x="-46" y="-80"/> </transition-item> <transition-item uuid="{e0b19a58-a7b3-47be-8da9-c8eba46cda5f}" comment="" model-uuid="{767656fa-c604-4171-b1de-6b7553c8de3d}" start-anchor-pos-x="50" start-anchor-pos-y="-3" end-anchor-pos-x="12" end-anchor-pos-y="-25"> - <control-point x="148.5" y="-248.5"/> + <control-point x="148.5" y="-247.5"/> </transition-item> <comment-item uuid="{8c2e0ad0-8541-4a70-a646-1d92e432791a}" region-uuid="{de859fdc-ce7b-4047-b561-fbc266379bff}" comment="uses rtshm" x="15.5" y="-246" width="95" height="48"/> <transition-item uuid="{7737aece-facd-43c6-9e62-bf52ee409689}" comment="" model-uuid="{9ac98c22-7c04-44c2-a7d9-196efc2e3d35}" start-anchor-pos-x="50" start-anchor-pos-y="-10" end-anchor-pos-x="-59.5" end-anchor-pos-y="-15"> @@ -206,6 +219,9 @@ <transition-item uuid="{bcdf189c-1a92-4ef5-b650-fc21316810b2}" comment="" model-uuid="{afe5a881-08c1-4682-8a4a-526df65cbc8a}" start-anchor-pos-x="28.5" start-anchor-pos-y="25" end-anchor-pos-x="23" end-anchor-pos-y="-25"> <control-point x="176" y="-55"/> </transition-item> + <transition-item uuid="{d3ac1403-acfa-4f3d-bd0f-a6c6338dcffd}" comment="" model-uuid="{2dacd50b-a079-4f71-ba17-e6976c351557}" start-anchor-pos-x="-32" start-anchor-pos-y="25" end-anchor-pos-x="-11" end-anchor-pos-y="25"> + <control-point x="37" y="85.5"/> + </transition-item> </diagram> </diagrams> </esmcontainer> diff --git a/examples/common/esmlib/logging.esm b/examples/common/esmlib/logging.esm index 20699c96142194cd5f04638ec2a12017a5a645a8..997c38801e3837fb8a0acdab5a833af99bb32b12 100644 --- a/examples/common/esmlib/logging.esm +++ b/examples/common/esmlib/logging.esm @@ -26,17 +26,23 @@ <event uuid="{9cb5c5f9-17ad-4398-b560-c4ad105609e9}" name="keyboardQuit" comment=""/> <event uuid="{9dc5e5e2-5b6a-4abc-91fb-6ae67f08d57a}" name="logProcessUp" comment=""/> <event uuid="{d4ebf9c2-b928-439f-80b5-ecd676556f79}" name="logReady" comment=""/> + <event uuid="{795c395c-86f1-4a11-9cb8-9ed7dcc5944f}" name="logVarReady" comment=""/> <event uuid="{ebc50913-c25d-4365-b2b4-2f8430aef30c}" name="noLogging" comment=""/> - <event uuid="{562a99fb-0157-4584-990b-bbe59ac8e4f8}" name="reqLogReady" comment=""/> + <event uuid="{28b79f16-f733-4248-9663-c739de64c8f5}" name="quadCore" comment=""/> + <event uuid="{198e547e-33b6-4240-a25f-0087759375cb}" name="reqConfig" comment=""/> + <event uuid="{562a99fb-0157-4584-990b-bbe59ac8e4f8}" name="reqLogState" comment=""/> + <event uuid="{ccbecd12-d626-4edc-ace3-b1a21fbc0ad2}" name="singleCore" comment=""/> </container-events> <input-events> - <event-ref uuid="{6182e521-c897-4bb9-ab10-13fcce9fb1cf}" name="clearLog"/> - <event-ref uuid="{562a99fb-0157-4584-990b-bbe59ac8e4f8}" name="reqLogReady"/> + <event-ref uuid="{562a99fb-0157-4584-990b-bbe59ac8e4f8}" name="reqLogState"/> + <event-ref uuid="{ccbecd12-d626-4edc-ace3-b1a21fbc0ad2}" name="singleCore"/> + <event-ref uuid="{28b79f16-f733-4248-9663-c739de64c8f5}" name="quadCore"/> </input-events> <output-events> <event-ref uuid="{d4ebf9c2-b928-439f-80b5-ecd676556f79}" name="logReady"/> <event-ref uuid="{9dc5e5e2-5b6a-4abc-91fb-6ae67f08d57a}" name="logProcessUp"/> <event-ref uuid="{9cb5c5f9-17ad-4398-b560-c4ad105609e9}" name="keyboardQuit"/> + <event-ref uuid="{198e547e-33b6-4240-a25f-0087759375cb}" name="reqConfig"/> </output-events> <global-events> <event uuid="{56430f91-7dfd-4730-ae5d-daa414118742}" name="PULSEEVENT" type="pulseevent" comment=""/> @@ -65,7 +71,7 @@ <flag uuid="{4665b417-5e44-4f61-8831-2734287450fb}" name="Busy" comment="" type="busy"/> </system-flags> </task-state> - <basic-state uuid="{ec36ddf2-9674-413e-a365-38c82b8ddebb}" name="wait" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <basic-state uuid="{ec36ddf2-9674-413e-a365-38c82b8ddebb}" name="log ready" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> <flag uuid="{fa1f90a3-125b-4ef8-bda1-76bd0940c583}" name="Timeout" comment="" type="timeout"/> </system-flags> </basic-state> @@ -74,30 +80,6 @@ <flag uuid="{7fd529bb-911a-4a8b-99a5-2d83cc1d8cb3}" name="Timeout" comment="" type="timeout"/> </system-flags> </basic-state> - <task-state uuid="{88c7723e-2b20-4691-8b7a-0c5a24f4d280}" name="createProcessID" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="createProcessID" task-slot-name="" process-name="system" real-time="0"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{edf4d275-034d-4153-9a66-f732f2a1117d}" name="nrtProcessID" comment="" data-storage-uuid="{1a6b6ba4-7c5b-4e2e-916c-f412908a01ba}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{dccd0e7d-e3a7-4668-ab57-878ed828b329}" name="process1" comment="" type="user_defined"/> - <flag uuid="{acbc808a-e581-40f3-8cd2-aa5ff7195095}" name="process2" comment="" type="user_defined"/> - <flag uuid="{ac25226f-2716-4a7f-8d25-36f0e5a4b82a}" name="process3" comment="" type="user_defined"/> - <flag uuid="{d1d12007-78b9-4110-be88-7a23d2f9d34c}" name="process4" comment="" type="user_defined"/> - <flag uuid="{7114f7e5-079f-4372-8649-494e2c334c5b}" name="process5" comment="" type="user_defined"/> - <flag uuid="{6cc116b9-1bbb-417d-9a1b-907580d49382}" name="process6" comment="" type="user_defined"/> - <flag uuid="{a41b0ba8-5cd6-4e77-85ff-50ecb7c8b731}" name="process7" comment="" type="user_defined"/> - <flag uuid="{5ac16cd9-da1a-49dc-bc15-429f6800567e}" name="process8" comment="" type="user_defined"/> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{1e78df66-f8b5-4849-b408-294bbce62b2c}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{906da1d0-7e08-4c83-8346-fe64128993cb}" name="Exit" comment="" type="exit"/> - <flag uuid="{3869e925-c7cc-4139-b57b-24a7a8b5efae}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> <task-state uuid="{87f6403e-e2d7-4342-a29b-865bc9a588fe}" name="createProcess" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="createProcess" task-slot-name="" process-name="system" real-time="0"> <input-ports> <port uuid="{80c2ff35-b2d2-47e3-81ca-40dbe45e6404}" name="nrtProcessID" comment="" data-storage-uuid="{1a6b6ba4-7c5b-4e2e-916c-f412908a01ba}" optional="0" allocation="0" release="0" read="1" write="0"/> @@ -105,6 +87,9 @@ <output-ports> </output-ports> <input-flags> + <flag uuid="{91efe4e8-a025-42e2-8457-d5de1a65518b}" name="debug" comment="" type="user_defined"/> + <flag uuid="{e9f4aae4-9e50-46ef-b4ae-b41c158a9e83}" name="core02" comment="" type="user_defined"/> + <flag uuid="{1606a9cb-f6fe-4849-a682-527af8df8bf1}" name="core0" comment="" type="user_defined"/> </input-flags> <output-flags> <flag uuid="{8c7a7bf9-f751-4b6c-b84c-5c08ebcd67e4}" name="error" comment="" type="user_defined"/> @@ -134,12 +119,36 @@ <flag uuid="{8744675b-a359-45b9-89eb-51f37603aad0}" name="Timeout" comment="" type="timeout"/> </system-flags> </basic-state> + <basic-state uuid="{a269756c-b8a2-4753-ae0d-973ddee292be}" name="" comment="" timeout="100" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{8945e3cd-c54f-49cc-9af7-d20a5475d542}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + <basic-state uuid="{b1855a76-64ef-47cd-adf7-a94560327ab3}" name="wait" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{4f0b8c2f-cddd-4bf0-bf6e-6674f08a9236}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + <task-state uuid="{865e6b1d-c131-48af-907c-4be84fee5b01}" name="createProcessId" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="createProcessId" task-slot-name="" process-name="system" real-time="0"> + <input-ports> + </input-ports> + <output-ports> + <port uuid="{974411c2-dcb1-4f6e-8feb-095fd43c23d6}" name="nrtProcessID" comment="" data-storage-uuid="{1a6b6ba4-7c5b-4e2e-916c-f412908a01ba}" optional="0" allocation="1" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + <flag uuid="{6f6b15f3-c839-422c-bec1-8390716f9a51}" name="bit0" comment="" type="user_defined"/> + <flag uuid="{0259e1d8-899e-46d0-a189-161c7388407b}" name="bit1" comment="" type="user_defined"/> + <flag uuid="{7d879a0a-cf81-417c-adea-f129db6aab69}" name="bit2" comment="" type="user_defined"/> + <flag uuid="{582099a8-2bbc-4198-b98a-6f2f46a88bba}" name="bit3" comment="" type="user_defined"/> + </input-flags> + <output-flags> + </output-flags> + <system-flags> + <flag uuid="{94f2629d-527d-4f36-ba2e-a98c3412b873}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{de150232-683a-4dd0-b1a8-802a594a5c80}" name="Exit" comment="" type="exit"/> + <flag uuid="{b72ef685-2fa9-4058-bf29-052ad43eb872}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> </states> <transitions> - <transition uuid="{dd793c79-a002-4846-8f19-a7af6756dcc8}" comment="" from-state-uuid="{ec36ddf2-9674-413e-a365-38c82b8ddebb}" to-state-uuid="{4fabd349-9d65-420a-9fc2-03490e211204}" event-uuid="{6182e521-c897-4bb9-ab10-13fcce9fb1cf}"> - <actions> - </actions> - </transition> <transition uuid="{7e1c55a5-035b-441c-ab4a-7e1167d46459}" comment="" from-state-uuid="{9e147ee0-d22c-42ec-bbde-d35d019897a7}" to-state-uuid="{4eb46663-a618-4a45-b0d5-d855582a3162}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> <actions> </actions> @@ -150,9 +159,9 @@ <send-event-action uuid="{30a0f7a5-e932-42f2-ba57-2c8901f4504b}" name="" comment="" event-uuid="{d4ebf9c2-b928-439f-80b5-ecd676556f79}"/> </actions> </transition> - <transition uuid="{112b9b7a-a096-406c-9ec4-540aa17d870d}" comment="" from-state-uuid="{d6ca5230-0a66-42fb-b8df-c0a8d7b543f2}" to-state-uuid="{88c7723e-2b20-4691-8b7a-0c5a24f4d280}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> + <transition uuid="{112b9b7a-a096-406c-9ec4-540aa17d870d}" comment="" from-state-uuid="{d6ca5230-0a66-42fb-b8df-c0a8d7b543f2}" to-state-uuid="{865e6b1d-c131-48af-907c-4be84fee5b01}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> <actions> - <set-flag-action uuid="{1ce7bd8b-5fa0-4a12-8e3e-09d40a011c05}" name="" comment="" flag-uuid="{dccd0e7d-e3a7-4668-ab57-878ed828b329}" flag-value="0"/> + <set-flag-action uuid="{1ce7bd8b-5fa0-4a12-8e3e-09d40a011c05}" name="" comment="" flag-uuid="{6f6b15f3-c839-422c-bec1-8390716f9a51}" flag-value="0"/> </actions> <guard operator="none" flag-uuid="{28d641b5-2604-4aff-9794-1e1e86a9b527}"/> </transition> @@ -162,16 +171,17 @@ </actions> <guard operator="negation" flag-uuid="{28d641b5-2604-4aff-9794-1e1e86a9b527}"/> </transition> - <transition uuid="{3c62de3c-0d14-4285-a1aa-321a476c9900}" comment="" from-state-uuid="{4fabd349-9d65-420a-9fc2-03490e211204}" to-state-uuid="{ec36ddf2-9674-413e-a365-38c82b8ddebb}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> + <transition uuid="{3c62de3c-0d14-4285-a1aa-321a476c9900}" comment="" from-state-uuid="{4fabd349-9d65-420a-9fc2-03490e211204}" to-state-uuid="{b1855a76-64ef-47cd-adf7-a94560327ab3}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> <actions> - <send-event-action uuid="{4577092f-d33b-447c-8068-035b04a1103b}" name="" comment="" event-uuid="{d4ebf9c2-b928-439f-80b5-ecd676556f79}"/> + <send-event-action uuid="{4577092f-d33b-447c-8068-035b04a1103b}" name="" comment="" event-uuid="{795c395c-86f1-4a11-9cb8-9ed7dcc5944f}"/> </actions> <guard operator="none" flag-uuid="{1493f741-d552-4119-bb25-b5dbba721116}"/> </transition> - <transition uuid="{2e048b3b-9f96-4d8b-bba5-d45545d82832}" comment="" from-state-uuid="{88c7723e-2b20-4691-8b7a-0c5a24f4d280}" to-state-uuid="{87f6403e-e2d7-4342-a29b-865bc9a588fe}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> + <transition uuid="{2e048b3b-9f96-4d8b-bba5-d45545d82832}" comment="" from-state-uuid="{865e6b1d-c131-48af-907c-4be84fee5b01}" to-state-uuid="{a269756c-b8a2-4753-ae0d-973ddee292be}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> <actions> + <send-event-action uuid="{6b189837-a0a9-4dc2-95c7-8e9bf593dd47}" name="" comment="" event-uuid="{198e547e-33b6-4240-a25f-0087759375cb}"/> </actions> -<guard operator="none" flag-uuid="{906da1d0-7e08-4c83-8346-fe64128993cb}"/> +<guard operator="none" flag-uuid="{de150232-683a-4dd0-b1a8-802a594a5c80}"/> </transition> <transition uuid="{d0a27ad9-ce43-4af5-9c1e-f1e9b1ffa180}" comment="" from-state-uuid="{87f6403e-e2d7-4342-a29b-865bc9a588fe}" to-state-uuid="{85dc1367-6471-46eb-9e83-cd23b24b2971}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> <actions> @@ -207,6 +217,29 @@ </actions> <guard operator="none" flag-uuid="{93814e40-91b2-483d-a8ef-78513e861865}"/> </transition> + <transition uuid="{46f80dca-bda3-4b18-a1dc-56d210f48aad}" comment="" from-state-uuid="{a269756c-b8a2-4753-ae0d-973ddee292be}" to-state-uuid="{87f6403e-e2d7-4342-a29b-865bc9a588fe}" event-uuid="{ccbecd12-d626-4edc-ace3-b1a21fbc0ad2}"> + <actions> + </actions> + </transition> + <transition uuid="{3a805f91-1768-4966-af19-3e7c3ac6989d}" comment="" from-state-uuid="{a269756c-b8a2-4753-ae0d-973ddee292be}" to-state-uuid="{4eb46663-a618-4a45-b0d5-d855582a3162}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{8945e3cd-c54f-49cc-9af7-d20a5475d542}"/> + </transition> + <transition uuid="{c1035eff-3a89-41c0-9f7e-307b66091fb6}" comment="" from-state-uuid="{a269756c-b8a2-4753-ae0d-973ddee292be}" to-state-uuid="{87f6403e-e2d7-4342-a29b-865bc9a588fe}" event-uuid="{28b79f16-f733-4248-9663-c739de64c8f5}"> + <actions> + <set-flag-action uuid="{a3d4cbfc-9c18-4add-a982-19ebfd26bde5}" name="" comment="" flag-uuid="{1606a9cb-f6fe-4849-a682-527af8df8bf1}" flag-value="0"/> + </actions> + </transition> + <transition uuid="{1f032009-976c-4f65-ab4c-66b5c5bb23b7}" comment="" from-state-uuid="{b1855a76-64ef-47cd-adf7-a94560327ab3}" to-state-uuid="{ec36ddf2-9674-413e-a365-38c82b8ddebb}" event-uuid="{d4ebf9c2-b928-439f-80b5-ecd676556f79}"> + <actions> + </actions> + </transition> + <transition uuid="{1a1f43a3-06a6-47f8-85a9-d293029c5bd4}" comment="" from-state-uuid="{9e147ee0-d22c-42ec-bbde-d35d019897a7}" to-state-uuid="{9e147ee0-d22c-42ec-bbde-d35d019897a7}" event-uuid="{562a99fb-0157-4584-990b-bbe59ac8e4f8}"> + <actions> + <send-event-action uuid="{272bdba7-6356-495f-9714-b850a326321b}" name="" comment="" event-uuid="{ebc50913-c25d-4365-b2b4-2f8430aef30c}"/> + </actions> + </transition> </transitions> </region> <region uuid="{24a12628-5cda-4db2-8ae3-33e7d1a815bc}" name="Region2" comment="" number="1"> @@ -220,7 +253,7 @@ <input-ports> </input-ports> <output-ports> - <port uuid="{8610d1e1-fb7b-402c-af06-a0e4ae16263f}" name="logNRT" comment="" data-storage-uuid="{8be2338d-75d9-443a-a02c-a7e8d147a3e6}" optional="0" allocation="1" release="0" read="0" write="0"/> + <port uuid="{8610d1e1-fb7b-402c-af06-a0e4ae16263f}" name="logNRT" comment="" data-storage-uuid="{8be2338d-75d9-443a-a02c-a7e8d147a3e6}" optional="0" allocation="1" release="0" read="0" write="1"/> </output-ports> <input-flags> </input-flags> @@ -277,7 +310,7 @@ <flag uuid="{bd3e2a48-9013-4356-8b89-5f107338f575}" name="Busy" comment="" type="busy"/> </system-flags> </task-state> - <task-state uuid="{8a54b01d-5eb2-40f8-8c2b-432aff2d837c}" name="gsLogSave" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="gsLogSave" task-slot-name="" process-name="logging" real-time="0"> + <task-state uuid="{8a54b01d-5eb2-40f8-8c2b-432aff2d837c}" name="save last" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="gsLogSave" task-slot-name="" process-name="logging" real-time="0"> <input-ports> </input-ports> <output-ports> @@ -285,6 +318,7 @@ </output-ports> <input-flags> <flag uuid="{7915f6c8-b31c-4a6f-a6bf-c824d882b4b8}" name="init" comment="" type="user_defined"/> + <flag uuid="{b7733bd1-ab60-47c9-b5de-7b5a2a4a4a1d}" name="last" comment="" type="user_defined"/> </input-flags> <output-flags> <flag uuid="{5b5abe54-7724-4581-8d5e-cb0382dc3173}" name="error" comment="" type="user_defined"/> @@ -334,7 +368,10 @@ <transition uuid="{46c2f080-84e3-47d3-8935-fd5ef98439e6}" comment="" from-state-uuid="{3d32fdba-7eb5-4275-9b4d-e9abfc69fe33}" to-state-uuid="{d31a4799-19c6-4182-b948-519b946a3acf}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> <actions> </actions> +<guard operator="and" flag-uuid=""> <guard operator="none" flag-uuid="{941def2a-24a7-40bb-a1ea-40eb6a37dc68}"/> +<guard operator="none" flag-uuid="{d1327bc3-6bef-4cff-81cf-b3a84cd11e3e}"/> +</guard> </transition> <transition uuid="{8025502d-31df-4a76-af46-7a178a03408b}" comment="" from-state-uuid="{3d32fdba-7eb5-4275-9b4d-e9abfc69fe33}" to-state-uuid="{3d1401cb-e70d-403f-be41-797a5b1d7d1e}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> <actions> @@ -355,8 +392,9 @@ </transition> <transition uuid="{9a786b21-0ea9-4a68-b26b-bec46c851092}" comment="" from-state-uuid="{9edc14cf-a597-4a76-81ec-4efeeec6329e}" to-state-uuid="{de325e9c-81c5-4816-ab63-ff45b347621b}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> <actions> - <set-flag-action uuid="{1f522b3c-2e74-426f-a099-7cd98bb39cf9}" name="set flag log" comment="" flag-uuid="{011e1b73-b304-4a6a-814a-efdc4aca2501}" flag-value="1"/> - <set-flag-action uuid="{5d224ee3-f9c1-4cfa-b69d-62d76f23c309}" name="set flag init" comment="" flag-uuid="{907b24bf-de3d-492e-b3cc-b0b566d097e2}" flag-value="1"/> + <set-flag-action uuid="{1f522b3c-2e74-426f-a099-7cd98bb39cf9}" name="set flag log" comment="" flag-uuid="{011e1b73-b304-4a6a-814a-efdc4aca2501}" flag-value="0"/> + <set-flag-action uuid="{5d224ee3-f9c1-4cfa-b69d-62d76f23c309}" name="set flag init" comment="" flag-uuid="{907b24bf-de3d-492e-b3cc-b0b566d097e2}" flag-value="0"/> + <send-event-action uuid="{527aeaae-0574-43d6-9028-15dee59f94cb}" name="" comment="" event-uuid="{d4ebf9c2-b928-439f-80b5-ecd676556f79}"/> </actions> <guard operator="none" flag-uuid="{c1b10055-f2f1-4cae-887f-1b82469970d2}"/> </transition> @@ -394,6 +432,7 @@ </transition> <transition uuid="{509632e2-9995-4705-b908-02bba1b59aef}" comment="" from-state-uuid="{3d1401cb-e70d-403f-be41-797a5b1d7d1e}" to-state-uuid="{8a54b01d-5eb2-40f8-8c2b-432aff2d837c}" event-uuid="{56430f91-7dfd-4730-ae5d-daa414118742}"> <actions> + <set-flag-action uuid="{5e260852-840a-4c9f-bc8d-dddbd85411ae}" name="" comment="" flag-uuid="{b7733bd1-ab60-47c9-b5de-7b5a2a4a4a1d}" flag-value="0"/> </actions> <guard operator="none" flag-uuid="{8c0e473e-961d-4244-a5a8-006e37bf7272}"/> </transition> @@ -402,7 +441,7 @@ </actions> <guard operator="none" flag-uuid="{68becc34-33f7-40a6-af2e-6f859f6fd026}"/> </transition> - <transition uuid="{884583b4-5e7d-4d7a-bf02-88f14ecf5f7a}" comment="" from-state-uuid="{510b0aa5-ac32-448f-b645-543e1521494e}" to-state-uuid="{9edc14cf-a597-4a76-81ec-4efeeec6329e}" event-uuid="{d4ebf9c2-b928-439f-80b5-ecd676556f79}"> + <transition uuid="{884583b4-5e7d-4d7a-bf02-88f14ecf5f7a}" comment="" from-state-uuid="{510b0aa5-ac32-448f-b645-543e1521494e}" to-state-uuid="{9edc14cf-a597-4a76-81ec-4efeeec6329e}" event-uuid="{795c395c-86f1-4a11-9cb8-9ed7dcc5944f}"> <actions> </actions> </transition> @@ -417,10 +456,11 @@ <states> <task-state uuid="{3c1307fd-9383-4853-89e6-cab0659fc534}" name="logSMI" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="logSMI" task-slot-name="log" process-name="" real-time="1"> <input-ports> + <port uuid="{f3afbcc9-c899-4bb5-a17b-99d16adafe37}" name="smiTelem" comment="" data-storage-uuid="{808a586a-1fae-46f8-93e0-6452daf0f26b}" optional="1" allocation="0" release="0" read="1" write="0"/> </input-ports> <output-ports> <port uuid="{8843a56b-0dde-4f2e-8fe8-82826bd39b0c}" name="log" comment="" data-storage-uuid="{3ada9a9a-be83-4aca-9289-55674613127a}" optional="1" allocation="0" release="0" read="0" write="1"/> - <port uuid="{57097ac4-d78d-4ed8-b44e-d014a418553b}" name="smiTelem" comment="" data-storage-uuid="{808a586a-1fae-46f8-93e0-6452daf0f26b}" optional="1" allocation="0" release="0" read="0" write="1"/> + <port uuid="{57097ac4-d78d-4ed8-b44e-d014a418553b}" name="smiTelem_" comment="" data-storage-uuid="{808a586a-1fae-46f8-93e0-6452daf0f26b}" optional="1" allocation="0" release="0" read="0" write="1"/> </output-ports> <input-flags> <flag uuid="{aa7eb201-e357-4a85-b87e-f8faec18bff7}" name="writeSmiTelem" comment="" type="user_defined"/> @@ -505,8 +545,6 @@ <box-item uuid="{6742e941-424b-4301-a984-5b1a4fba867b}" comment="" model-uuid="" x="3150" y="2220" width="420" height="60" type="input_flags_box"/> <box-item uuid="{520c9848-a756-4936-9ffc-bb103e4b48b0}" comment="" model-uuid="" x="3150" y="3210" width="420" height="60" type="output_flags_box"/> <box-item uuid="{f150d78f-b6c5-4ee0-bd26-6490d8e6f404}" comment="" model-uuid="" x="2715" y="2715" width="1350" height="1110" type="container_box"/> - <box-item uuid="{c61f5c2b-e154-47e6-9237-6de0512a80fe}" comment="" model-uuid="{88c7723e-2b20-4691-8b7a-0c5a24f4d280}" x="14" y="-204" width="100" height="50" type="standard_box"/> - <box-item uuid="{482e46eb-68bd-43c9-890a-95cc2ff95e89}" comment="" model-uuid="{edf4d275-034d-4153-9a66-f732f2a1117d}" x="50" y="-1" width="10" height="10" type="standard_box"/> <box-item uuid="{4d3269ed-6e08-49ff-874e-d21db1ebb9ba}" comment="" model-uuid="{87f6403e-e2d7-4342-a29b-865bc9a588fe}" x="16" y="-111" width="100" height="50" type="standard_box"/> <box-item uuid="{87109c93-c3d9-4821-8b79-1714ba555f77}" comment="" model-uuid="{80c2ff35-b2d2-47e3-81ca-40dbe45e6404}" x="50" y="-2" width="10" height="10" type="standard_box"/> <box-item uuid="{0a8ca7d7-b02c-40dc-ac56-4483ce991073}" comment="" model-uuid="{85dc1367-6471-46eb-9e83-cd23b24b2971}" x="19" y="-22" width="100" height="50" type="standard_box"/> @@ -515,34 +553,36 @@ <box-item uuid="{64525f93-9317-415c-b5e5-345b2bd0c0cd}" comment="" model-uuid="{1239156f-315e-486b-bdd6-3c5124968edb}" x="50" y="4" width="10" height="10" type="standard_box"/> <box-item uuid="{8c08a12a-8be1-4fda-9bb1-dc68b9b075c4}" comment="" model-uuid="{7b5a3348-4d3e-48d3-bd1d-ca6b17c3adb5}" x="-181" y="-76" width="12" height="12" type="standard_box"/> <box-item uuid="{5c4b59e3-ac53-4152-b9e4-20065ce77acf}" comment="" model-uuid="{eec97d0c-aa52-4b91-a091-30959dc600c2}" x="-155" y="44.5" width="32" height="31" type="standard_box"/> + <box-item uuid="{443eb872-3915-4205-bda8-386448b8fd4c}" comment="" model-uuid="{f3afbcc9-c899-4bb5-a17b-99d16adafe37}" x="50" y="13" width="10" height="10" type="standard_box"/> + <box-item uuid="{34402fb4-8b51-46d2-81a9-b21ad169067b}" comment="" model-uuid="{a269756c-b8a2-4753-ae0d-973ddee292be}" x="-22.5" y="-180" width="27" height="26" type="standard_box"/> + <box-item uuid="{c90df422-a352-4d0a-b807-3568aa987634}" comment="" model-uuid="{b1855a76-64ef-47cd-adf7-a94560327ab3}" x="87" y="175" width="100" height="50" type="standard_box"/> + <box-item uuid="{7f923058-b9c8-4fab-ba20-140addac849e}" comment="" model-uuid="{865e6b1d-c131-48af-907c-4be84fee5b01}" x="17" y="-227" width="100" height="50" type="standard_box"/> + <box-item uuid="{330b6d9d-8f6b-4364-8d41-29014f16285c}" comment="" model-uuid="{974411c2-dcb1-4f6e-8feb-095fd43c23d6}" x="50" y="-7" width="10" height="10" type="standard_box"/> <data-storage-item uuid="{4c920876-bc24-4154-810b-e5cfc0a2eceb}" description="" comment="" model-uuid="{3ada9a9a-be83-4aca-9289-55674613127a}" region-uuid="{e4a08fb3-2716-4dc0-8fc4-93d014bd57fc}" x="93" y="74" width="32" height="30"/> <data-storage-item uuid="{7aa13774-ac1b-4cd4-95dd-199a93cafb4d}" description="" comment="" model-uuid="{8be2338d-75d9-443a-a02c-a7e8d147a3e6}" region-uuid="{24a12628-5cda-4db2-8ae3-33e7d1a815bc}" x="-160" y="60" width="56" height="30"/> <data-storage-item uuid="{94c5da99-07de-4525-8adb-a61baf976253}" description="" comment="" model-uuid="{8be2338d-75d9-443a-a02c-a7e8d147a3e6}" region-uuid="{24a12628-5cda-4db2-8ae3-33e7d1a815bc}" x="-84" y="-172" width="56" height="30"/> <data-storage-item uuid="{e76b405b-6daa-445b-bb88-b9bcaa21de94}" description="" comment="" model-uuid="{8be2338d-75d9-443a-a02c-a7e8d147a3e6}" region-uuid="{24a12628-5cda-4db2-8ae3-33e7d1a815bc}" x="297" y="58" width="56" height="30"/> <data-storage-item uuid="{9d1a1bf5-463c-45f6-8837-c9385f4fb7d6}" description="" comment="" model-uuid="{3ada9a9a-be83-4aca-9289-55674613127a}" region-uuid="{24a12628-5cda-4db2-8ae3-33e7d1a815bc}" x="266" y="-47" width="32" height="30"/> <data-storage-item uuid="{cc6d984e-bc57-4be0-864b-743059d4c648}" description="" comment="" model-uuid="{808a586a-1fae-46f8-93e0-6452daf0f26b}" region-uuid="{e74ee7c0-607d-456a-be18-905a3f9c60c1}" x="151" y="31" width="72" height="30"/> - <data-storage-item uuid="{cc53fc7e-9c34-475b-8bf7-f626be102acc}" description="" comment="" model-uuid="{1a6b6ba4-7c5b-4e2e-916c-f412908a01ba}" region-uuid="{e4a08fb3-2716-4dc0-8fc4-93d014bd57fc}" x="137.5" y="-206" width="81" height="30"/> + <data-storage-item uuid="{cc53fc7e-9c34-475b-8bf7-f626be102acc}" description="" comment="" model-uuid="{1a6b6ba4-7c5b-4e2e-916c-f412908a01ba}" region-uuid="{e4a08fb3-2716-4dc0-8fc4-93d014bd57fc}" x="139.5" y="-233" width="81" height="30"/> <data-storage-item uuid="{607003db-e752-4a63-a7db-eea2935997f7}" description="" comment="" model-uuid="{1a6b6ba4-7c5b-4e2e-916c-f412908a01ba}" region-uuid="{24a12628-5cda-4db2-8ae3-33e7d1a815bc}" x="276" y="213" width="98" height="30"/> <data-storage-item uuid="{066e779d-77d7-4104-9b77-0c0013792b77}" description="" comment="" model-uuid="{3ada9a9a-be83-4aca-9289-55674613127a}" region-uuid="{e74ee7c0-607d-456a-be18-905a3f9c60c1}" x="137" y="-12.5" width="38" height="37"/> <connection-item uuid="{331d68d3-a259-4aa4-8732-021f57addd84}" comment="" region-uuid="{e4a08fb3-2716-4dc0-8fc4-93d014bd57fc}" item0-uuid="{4c920876-bc24-4154-810b-e5cfc0a2eceb}" item1-uuid="{f0756f24-269a-497d-b49b-b43c94404218}" start-anchor-pos-x="-16" start-anchor-pos-y="0" end-anchor-pos-x="0" end-anchor-pos-y="0"> <control-point x="48" y="81"/> </connection-item> - <transition-item uuid="{675d0505-ca29-4c20-b0c6-04ab71516cc2}" comment="" model-uuid="{dd793c79-a002-4846-8f19-a7af6756dcc8}" start-anchor-pos-x="28" start-anchor-pos-y="-25" end-anchor-pos-x="25" end-anchor-pos-y="24"> - <control-point x="41" y="148"/> - </transition-item> <transition-item uuid="{5f107309-6be3-45d6-8aec-2118a5089805}" comment="" model-uuid="{7e1c55a5-035b-441c-ab4a-7e1167d46459}" start-anchor-pos-x="-7" start-anchor-pos-y="24" end-anchor-pos-x="0" end-anchor-pos-y="-10"> <control-point x="-141" y="-139"/> </transition-item> <transition-item uuid="{2b6cee87-346d-43bc-9d73-6b80ce5b3695}" comment="" model-uuid="{5a9cd4a4-fd5a-4f20-ae7b-b6a4498dff3c}" start-anchor-pos-x="-12" start-anchor-pos-y="24" end-anchor-pos-x="14" end-anchor-pos-y="24"> <control-point x="-36" y="283"/> </transition-item> - <transition-item uuid="{541b3d1b-6f74-4310-b0b3-d73fef47143a}" comment="" model-uuid="{112b9b7a-a096-406c-9ec4-540aa17d870d}" start-anchor-pos-x="4" start-anchor-pos-y="1" end-anchor-pos-x="5" end-anchor-pos-y="-25"> - <control-point x="21" y="-273"/> + <transition-item uuid="{541b3d1b-6f74-4310-b0b3-d73fef47143a}" comment="" model-uuid="{112b9b7a-a096-406c-9ec4-540aa17d870d}" start-anchor-pos-x="4" start-anchor-pos-y="1" end-anchor-pos-x="-2" end-anchor-pos-y="-25"> + <control-point x="12" y="-281"/> </transition-item> <transition-item uuid="{287f133a-923c-4b5d-b0fc-7eb891e5b136}" comment="" model-uuid="{ec20abeb-e159-456a-9a3e-d5f3c5767369}" start-anchor-pos-x="-1" start-anchor-pos-y="4" end-anchor-pos-x="1" end-anchor-pos-y="-25"> <control-point x="-126" y="-264"/> </transition-item> - <transition-item uuid="{68232dc0-d2ca-4286-8cdf-79938138e83f}" comment="" model-uuid="{3c62de3c-0d14-4285-a1aa-321a476c9900}" start-anchor-pos-x="-15" start-anchor-pos-y="24" end-anchor-pos-x="-22" end-anchor-pos-y="-25"> + <transition-item uuid="{68232dc0-d2ca-4286-8cdf-79938138e83f}" comment="" model-uuid="{3c62de3c-0d14-4285-a1aa-321a476c9900}" start-anchor-pos-x="-15" start-anchor-pos-y="24" end-anchor-pos-x="-50" end-anchor-pos-y="-2"> <control-point x="-78" y="147"/> </transition-item> <transition-item uuid="{d28367dc-319d-4b6f-915d-69771dce9be1}" comment="" model-uuid="{46c2f080-84e3-47d3-8935-fd5ef98439e6}" start-anchor-pos-x="-27" start-anchor-pos-y="24" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> @@ -600,14 +640,11 @@ <control-point x="-176.5" y="6"/> </connection-item> <comment-item uuid="{6bf9bd5a-3eeb-40e8-8c51-19247a5c5f6f}" region-uuid="{24a12628-5cda-4db2-8ae3-33e7d1a815bc}" comment="uses rtshm" x="-82.5" y="-258" width="101" height="34"/> - <connection-item uuid="{5e2c77c5-3079-4ce5-a929-06930863cd98}" comment="" region-uuid="{e4a08fb3-2716-4dc0-8fc4-93d014bd57fc}" item0-uuid="{cc53fc7e-9c34-475b-8bf7-f626be102acc}" item1-uuid="{482e46eb-68bd-43c9-890a-95cc2ff95e89}" start-anchor-pos-x="-40.5" start-anchor-pos-y="2" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="85.5" y="-203"/> - </connection-item> <connection-item uuid="{0d50a0f7-9592-4a2d-9f66-01bb0254d774}" comment="" region-uuid="{e4a08fb3-2716-4dc0-8fc4-93d014bd57fc}" item0-uuid="{cc53fc7e-9c34-475b-8bf7-f626be102acc}" item1-uuid="{87109c93-c3d9-4821-8b79-1714ba555f77}" start-anchor-pos-x="-1.5" start-anchor-pos-y="15" end-anchor-pos-x="0" end-anchor-pos-y="0"> <control-point x="130.5" y="-119.5"/> </connection-item> - <transition-item uuid="{6d011860-2973-431d-ab2a-ea7a23d19aeb}" comment="" model-uuid="{2e048b3b-9f96-4d8b-bba5-d45545d82832}" start-anchor-pos-x="-2" start-anchor-pos-y="25" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> - <control-point x="11.5" y="-158.5"/> + <transition-item uuid="{6d011860-2973-431d-ab2a-ea7a23d19aeb}" comment="" model-uuid="{2e048b3b-9f96-4d8b-bba5-d45545d82832}" start-anchor-pos-x="-4" start-anchor-pos-y="25" end-anchor-pos-x="13.5" end-anchor-pos-y="-1"> + <control-point x="17.5" y="-190.5"/> </transition-item> <transition-item uuid="{c680f31a-33cb-4918-b2c0-f44deb0c1014}" comment="" model-uuid="{d0a27ad9-ce43-4af5-9c1e-f1e9b1ffa180}" start-anchor-pos-x="5" start-anchor-pos-y="25" end-anchor-pos-x="1" end-anchor-pos-y="-25"> <control-point x="60.5" y="-66.5"/> @@ -644,6 +681,27 @@ </transition-item> <comment-item uuid="{deab2ee1-2916-407b-ab97-5769a632ae3b}" region-uuid="{e74ee7c0-607d-456a-be18-905a3f9c60c1}" comment="log slot rate >= smi slot rate" x="93" y="-90" width="208" height="30"/> <comment-item uuid="{30f2522c-c56e-443b-9103-4feebe5de9ed}" region-uuid="{24a12628-5cda-4db2-8ae3-33e7d1a815bc}" comment="adjust save rate to log rate " x="48" y="-25.5" width="100" height="65"/> + <connection-item uuid="{53340f8c-5101-41e2-b062-ca44fed84a70}" comment="" region-uuid="{e74ee7c0-607d-456a-be18-905a3f9c60c1}" item0-uuid="{cc6d984e-bc57-4be0-864b-743059d4c648}" item1-uuid="{443eb872-3915-4205-bda8-386448b8fd4c}" start-anchor-pos-x="-36" start-anchor-pos-y="2" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="98.5" y="34.5"/> + </connection-item> + <transition-item uuid="{3257f9eb-16e7-4f71-a24e-693216089745}" comment="" model-uuid="{46f80dca-bda3-4b18-a1dc-56d210f48aad}" start-anchor-pos-x="0.5" start-anchor-pos-y="13" end-anchor-pos-x="-16" end-anchor-pos-y="-25"> + <control-point x="-20" y="-155.5"/> + </transition-item> + <transition-item uuid="{dfcd126b-0eaf-4329-9992-75d6cae3a9b7}" comment="" model-uuid="{3a805f91-1768-4966-af19-3e7c3ac6989d}" start-anchor-pos-x="13.5" start-anchor-pos-y="4" end-anchor-pos-x="4" end-anchor-pos-y="-10"> + <control-point x="-100" y="-121.5"/> + </transition-item> + <transition-item uuid="{b2e71400-905f-466d-848e-fb89ab34600d}" comment="" model-uuid="{c1035eff-3a89-41c0-9f7e-307b66091fb6}" start-anchor-pos-x="13.5" start-anchor-pos-y="0" end-anchor-pos-x="33" end-anchor-pos-y="-25"> + <control-point x="57.5" y="-161"/> + </transition-item> + <transition-item uuid="{25a42a4b-9664-413d-b033-fca7e840717f}" comment="" model-uuid="{1f032009-976c-4f65-ab4c-66b5c5bb23b7}" start-anchor-pos-x="-10" start-anchor-pos-y="25" end-anchor-pos-x="50" end-anchor-pos-y="3"> + <control-point x="74" y="232"/> + </transition-item> + <transition-item uuid="{ba141da5-b952-4786-8886-d3986448fc21}" comment="" model-uuid="{1a1f43a3-06a6-47f8-85a9-d293029c5bd4}" start-anchor-pos-x="2" start-anchor-pos-y="25" end-anchor-pos-x="22" end-anchor-pos-y="25"> + <control-point x="-178.5" y="-88"/> + </transition-item> + <connection-item uuid="{9fe9c4da-d052-48eb-9381-c4132f30cff4}" comment="" region-uuid="{e4a08fb3-2716-4dc0-8fc4-93d014bd57fc}" item0-uuid="{cc53fc7e-9c34-475b-8bf7-f626be102acc}" item1-uuid="{330b6d9d-8f6b-4364-8d41-29014f16285c}" start-anchor-pos-x="-40.5" start-anchor-pos-y="-1" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="88" y="-223"/> + </connection-item> </diagram> </diagrams> </esmcontainer> diff --git a/examples/common/esmlib/process.esm b/examples/common/esmlib/process.esm deleted file mode 100644 index cd6f5b1bf89185def7a72ec3fcfc8105e68b2b84..0000000000000000000000000000000000000000 --- a/examples/common/esmlib/process.esm +++ /dev/null @@ -1,300 +0,0 @@ -<?xml version="1.0"?> -<esmcontainer uuid="{8e6266fb-16eb-4203-8e75-09856043af10}" name="process2" cloned-from="/tmp/process2.esm" comment="" scene-width="0" scene-height="0"> - <data-storage-list> - <data-storage uuid="{24af60a0-56fc-4aed-9d5b-d2eb271a1044}" name="processID2" comment=""/> - </data-storage-list> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{a84f24ca-f22a-4842-ba27-869b06fd92b3}" name="processID" comment="" data-storage-uuid="{24af60a0-56fc-4aed-9d5b-d2eb271a1044}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{6accacdf-0ace-4593-8306-75b2ee4cbb70}" name="quit" comment="" type="user_defined"/> - <flag uuid="{51ed4c4b-d4da-4450-9541-6040517201c0}" name="restart" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{9cf41375-c819-4dc6-8ac0-d51a3e00ec49}" name="process2Done" comment="" type="user_defined"/> - </output-flags> - <container-events> - <event uuid="{cd23ae40-7eb4-4ac8-b82e-2245dfba6142}" name="process2Error" comment=""/> - <event uuid="{0d60928d-c3b1-4c24-afd0-62d8fc917b91}" name="process2Up" comment=""/> - <event uuid="{9a62d2b7-896f-4257-bfb2-376b76b3a67a}" name="reqProcessUp" comment=""/> - <event uuid="{2a883416-0c2b-459c-af78-45facd6d4645}" name="restartProcess2" comment=""/> - </container-events> - <input-events> - <event-ref uuid="{9a62d2b7-896f-4257-bfb2-376b76b3a67a}" name="reqProcessUp"/> - </input-events> - <output-events> - <event-ref uuid="{0d60928d-c3b1-4c24-afd0-62d8fc917b91}" name="process2Up"/> - <event-ref uuid="{cd23ae40-7eb4-4ac8-b82e-2245dfba6142}" name="process2Error"/> - </output-events> - <global-events> - <event uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}" name="PULSEEVENT" type="pulseevent" comment=""/> - </global-events> - <regions> - <region uuid="{55e6357d-9c7e-4dee-878f-d74f9b4286e4}" name="Region4" comment="" number="0"> - <states> - <initial-state uuid="{fe8bfdbd-d1dc-4aee-88fe-f16b16ed2b9f}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{b804621f-6116-4c21-ae8f-63ec9250d9b7}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <task-state uuid="{2fc7eced-36da-48e2-b5a4-a7f4fc7eee14}" name="createProcessID" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="createProcessID" task-slot-name="system" process-name="system" real-time="0"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{150edbea-722e-4816-916b-189660bf6be8}" name="nrtProcessID" comment="" data-storage-uuid="{24af60a0-56fc-4aed-9d5b-d2eb271a1044}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{80a30ed5-5ef8-486e-b5ad-c0b7648043d8}" name="process1" comment="" type="user_defined"/> - <flag uuid="{5d4221eb-7879-4857-8dee-5d7ecb6e0ca6}" name="process2" comment="" type="user_defined"/> - <flag uuid="{cf5f5c62-6fcd-4e2e-835d-7234f35b13d7}" name="process3" comment="" type="user_defined"/> - <flag uuid="{9d05baee-1a6d-4fd1-bedc-66b257449ddc}" name="process4" comment="" type="user_defined"/> - <flag uuid="{1639e240-84ae-4b10-9efa-3cc60e6a49bb}" name="process5" comment="" type="user_defined"/> - <flag uuid="{fcac2982-f43f-4d52-82f8-a01b4a2bc333}" name="process6" comment="" type="user_defined"/> - <flag uuid="{eb9aa0dc-ceae-4be5-82c8-3b24da18846a}" name="process7" comment="" type="user_defined"/> - <flag uuid="{4062f7f2-b3e3-4bbf-b509-457fa8fc850f}" name="process8" comment="" type="user_defined"/> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{01d49863-68a4-4972-ac09-d5e13cc8a486}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{4892a04c-f110-41bc-b5cc-b67e37a3800f}" name="Exit" comment="" type="exit"/> - <flag uuid="{a725d4c3-7b24-489d-9906-6aeed9dd8f6d}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{919eb05d-5d39-4223-9e0e-35177b03b10f}" name="createProcess" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="createProcess" task-slot-name="system" process-name="system" real-time="0"> - <input-ports> - <port uuid="{c5e759a9-2483-4a11-86f9-369516bdfcb8}" name="nrtProcessID" comment="" data-storage-uuid="{24af60a0-56fc-4aed-9d5b-d2eb271a1044}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - <flag uuid="{865510bd-1467-4613-b61a-6906bb1d4481}" name="debug" comment="" type="user_defined"/> - <flag uuid="{fe67f4ab-2b19-469c-b931-4bce413322a9}" name="core02" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{b3b5a5b2-9793-4bee-8e8b-19a2baffd727}" name="error" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{e46d2680-90d6-4aca-b030-837d18cfb53e}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{e3310997-3d15-49bd-a20a-b954f877b92b}" name="Exit" comment="" type="exit"/> - <flag uuid="{a5063e77-ddf3-4379-95e9-b0aac36ea890}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <final-state uuid="{f075591b-f872-4260-b653-5340fb552cab}" name="[exit]" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> - <task-state uuid="{47b21d09-6e20-48de-a823-43d24779faf1}" name="killProcess" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="killProcess" task-slot-name="system" process-name="system" real-time="0"> - <input-ports> - <port uuid="{21956737-b29c-4bf9-80ff-e0ac6df34e8c}" name="nrtProcessID" comment="" data-storage-uuid="{24af60a0-56fc-4aed-9d5b-d2eb271a1044}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{7141d5f0-3c53-4bcd-953f-de5322cb0008}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{2e30791a-8292-4989-81da-8ed4f59e9c05}" name="Exit" comment="" type="exit"/> - <flag uuid="{118a0c1b-1302-4618-9972-55ea902a0fb1}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <basic-state uuid="{fe28f051-c026-4a4d-b04c-45e63b69476a}" name="processError" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{68cb4398-8be0-4e8c-9274-2417577ce86c}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <task-state uuid="{3fb4c6c7-95ec-4315-8a98-7db1e4bd3b78}" name="testProcess" comment="" timeout="10000" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="testProcess" task-slot-name="process2" process-name="process2" real-time="0"> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{5340f833-4a63-47eb-9c16-8237fbaa5277}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{bd35022b-2839-44b3-8c00-5ce154fe38a9}" name="Exit" comment="" type="exit"/> - <flag uuid="{4951b97b-f7bf-4107-9517-c084c29246c8}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <basic-state uuid="{dd05a7ea-9922-4c1b-b3ca-4f7db28501b3}" name="ready" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{5f5f02bc-32ea-44c9-9a39-3b94b0197093}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <task-state uuid="{a15db530-0c7d-41e7-bc34-93e8e2c48a87}" name="killProcess" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="killProcess" task-slot-name="" process-name="system" real-time="0"> - <input-ports> - <port uuid="{45955f02-a099-49f8-873c-3bd78b27bec8}" name="nrtProcessID" comment="" data-storage-uuid="{24af60a0-56fc-4aed-9d5b-d2eb271a1044}" optional="0" allocation="0" release="1" read="1" write="0"/> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{288f3aea-a7dd-4b10-a48b-9be289167d54}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{485c491b-ef41-4342-baf3-021bd799d293}" name="Exit" comment="" type="exit"/> - <flag uuid="{ace731c6-8a99-4856-a909-89060be3b303}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - </states> - <transitions> - <transition uuid="{cfe64f94-b717-4fa7-8f13-f008d95ba2dc}" comment="" from-state-uuid="{fe8bfdbd-d1dc-4aee-88fe-f16b16ed2b9f}" to-state-uuid="{2fc7eced-36da-48e2-b5a4-a7f4fc7eee14}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - <set-flag-action uuid="{d7443d47-2142-409f-b8fc-89ccae87e285}" name="set flag process2" comment="" flag-uuid="{5d4221eb-7879-4857-8dee-5d7ecb6e0ca6}" flag-value="0"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="negation" flag-uuid="{51ed4c4b-d4da-4450-9541-6040517201c0}"/> -<guard operator="negation" flag-uuid="{6accacdf-0ace-4593-8306-75b2ee4cbb70}"/> -</guard> - </transition> - <transition uuid="{84cda22f-ddc6-4689-87fb-c6cb8f8c1d3b}" comment="" from-state-uuid="{2fc7eced-36da-48e2-b5a4-a7f4fc7eee14}" to-state-uuid="{919eb05d-5d39-4223-9e0e-35177b03b10f}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{4892a04c-f110-41bc-b5cc-b67e37a3800f}"/> - </transition> - <transition uuid="{e0a0ecba-9e0f-49e9-a461-5ba697460547}" comment="" from-state-uuid="{919eb05d-5d39-4223-9e0e-35177b03b10f}" to-state-uuid="{3fb4c6c7-95ec-4315-8a98-7db1e4bd3b78}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{e3310997-3d15-49bd-a20a-b954f877b92b}"/> -<guard operator="negation" flag-uuid="{b3b5a5b2-9793-4bee-8e8b-19a2baffd727}"/> -</guard> - </transition> - <transition uuid="{a2759055-c037-4e7e-ba9d-ab85f97a5b5c}" comment="" from-state-uuid="{47b21d09-6e20-48de-a823-43d24779faf1}" to-state-uuid="{f075591b-f872-4260-b653-5340fb552cab}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - <set-flag-action uuid="{4ad49c45-ae9d-4603-9118-419286477cc0}" name="set flag process2Done" comment="" flag-uuid="{9cf41375-c819-4dc6-8ac0-d51a3e00ec49}" flag-value="1"/> - </actions> -<guard operator="none" flag-uuid="{2e30791a-8292-4989-81da-8ed4f59e9c05}"/> - </transition> - <transition uuid="{9ad4aa9a-4bdf-48be-96a8-8854d648a632}" comment="" from-state-uuid="{919eb05d-5d39-4223-9e0e-35177b03b10f}" to-state-uuid="{fe28f051-c026-4a4d-b04c-45e63b69476a}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - <send-event-action uuid="{793d0b74-833d-450b-83a3-9e64eb4e6407}" name="" comment="" event-uuid="{cd23ae40-7eb4-4ac8-b82e-2245dfba6142}"/> - </actions> -<guard operator="none" flag-uuid="{b3b5a5b2-9793-4bee-8e8b-19a2baffd727}"/> - </transition> - <transition uuid="{944d0022-5e83-44fc-8138-6863ed0b5285}" comment="" from-state-uuid="{3fb4c6c7-95ec-4315-8a98-7db1e4bd3b78}" to-state-uuid="{fe28f051-c026-4a4d-b04c-45e63b69476a}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - <send-event-action uuid="{9f51c795-e2b1-4620-957a-caec2c003a21}" name="" comment="" event-uuid="{cd23ae40-7eb4-4ac8-b82e-2245dfba6142}"/> - </actions> -<guard operator="none" flag-uuid="{5340f833-4a63-47eb-9c16-8237fbaa5277}"/> - </transition> - <transition uuid="{bad50f01-5dfb-4f1e-81ae-b6d01a4373bb}" comment="" from-state-uuid="{fe28f051-c026-4a4d-b04c-45e63b69476a}" to-state-uuid="{47b21d09-6e20-48de-a823-43d24779faf1}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{6accacdf-0ace-4593-8306-75b2ee4cbb70}"/> - </transition> - <transition uuid="{048cf545-d6fe-4acc-9817-7970d2a6d80f}" comment="" from-state-uuid="{3fb4c6c7-95ec-4315-8a98-7db1e4bd3b78}" to-state-uuid="{dd05a7ea-9922-4c1b-b3ca-4f7db28501b3}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - <send-event-action uuid="{3fae5914-11b4-497b-a4a8-32c358e9997d}" name="" comment="" event-uuid="{0d60928d-c3b1-4c24-afd0-62d8fc917b91}"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{bd35022b-2839-44b3-8c00-5ce154fe38a9}"/> -<guard operator="negation" flag-uuid="{5340f833-4a63-47eb-9c16-8237fbaa5277}"/> -</guard> - </transition> - <transition uuid="{18e0977b-839a-4ba5-832f-5f34a8172d39}" comment="" from-state-uuid="{dd05a7ea-9922-4c1b-b3ca-4f7db28501b3}" to-state-uuid="{47b21d09-6e20-48de-a823-43d24779faf1}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{6accacdf-0ace-4593-8306-75b2ee4cbb70}"/> - </transition> - <transition uuid="{3989732b-49bd-4cdd-bc6c-0514ccacb991}" comment="" from-state-uuid="{dd05a7ea-9922-4c1b-b3ca-4f7db28501b3}" to-state-uuid="{dd05a7ea-9922-4c1b-b3ca-4f7db28501b3}" event-uuid="{9a62d2b7-896f-4257-bfb2-376b76b3a67a}"> - <actions> - <send-event-action uuid="{6fcd15c1-979b-4b1b-8528-1cb675128941}" name="" comment="" event-uuid="{0d60928d-c3b1-4c24-afd0-62d8fc917b91}"/> - </actions> - </transition> - <transition uuid="{2960c957-51af-4952-b9f1-b67486aea7bf}" comment="" from-state-uuid="{a15db530-0c7d-41e7-bc34-93e8e2c48a87}" to-state-uuid="{2fc7eced-36da-48e2-b5a4-a7f4fc7eee14}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - <set-flag-action uuid="{64e71f5b-56a8-4f85-8ba9-87255fd7598d}" name="" comment="" flag-uuid="{5d4221eb-7879-4857-8dee-5d7ecb6e0ca6}" flag-value="0"/> - </actions> -<guard operator="none" flag-uuid="{485c491b-ef41-4342-baf3-021bd799d293}"/> - </transition> - <transition uuid="{95917cff-e495-43dd-aa8a-6f91bf88c2dc}" comment="" from-state-uuid="{fe8bfdbd-d1dc-4aee-88fe-f16b16ed2b9f}" to-state-uuid="{a15db530-0c7d-41e7-bc34-93e8e2c48a87}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{51ed4c4b-d4da-4450-9541-6040517201c0}"/> -<guard operator="negation" flag-uuid="{6accacdf-0ace-4593-8306-75b2ee4cbb70}"/> -</guard> - </transition> - <transition uuid="{fcaa2da0-7af0-4ee6-bfba-0de379e5b91e}" comment="" from-state-uuid="{fe8bfdbd-d1dc-4aee-88fe-f16b16ed2b9f}" to-state-uuid="{47b21d09-6e20-48de-a823-43d24779faf1}" event-uuid="{8dcd991b-773f-4b4b-98aa-e72a3e810c04}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{6accacdf-0ace-4593-8306-75b2ee4cbb70}"/> - </transition> - </transitions> - </region> - </regions> - <diagrams> - <diagram uuid="{170f19b1-c31c-44b1-a0b0-0488529bc3fe}" name="" comment=""> - <box-item uuid="{bedc4124-9bd2-4f36-b24d-be2c05a42d62}" comment="" model-uuid="{55e6357d-9c7e-4dee-878f-d74f9b4286e4}" x="2520" y="2580" width="720" height="660" type="standard_box"/> - <box-item uuid="{d8274feb-0ea6-402f-9921-1df3e8429041}" comment="" model-uuid="{fe8bfdbd-d1dc-4aee-88fe-f16b16ed2b9f}" x="-146" y="-303" width="10" height="10" type="standard_box"/> - <box-item uuid="{38719070-5689-48fa-b16c-0edb6fd3cfd1}" comment="" model-uuid="{2fc7eced-36da-48e2-b5a4-a7f4fc7eee14}" x="-32" y="-209" width="100" height="50" type="standard_box"/> - <box-item uuid="{0f3a161c-e648-430e-9321-fc29a8eb0e2b}" comment="" model-uuid="{150edbea-722e-4816-916b-189660bf6be8}" x="-35" y="25" width="20" height="20" type="standard_box"/> - <box-item uuid="{cdaf9bd1-570b-472c-97e2-4e53bd4e60f1}" comment="" model-uuid="{919eb05d-5d39-4223-9e0e-35177b03b10f}" x="25" y="-105" width="100" height="50" type="standard_box"/> - <box-item uuid="{8ea27e70-72d7-461d-8cfb-ff5f76f3d8fc}" comment="" model-uuid="{c5e759a9-2483-4a11-86f9-369516bdfcb8}" x="-50" y="6" width="20" height="20" type="standard_box"/> - <box-item uuid="{7ee6e354-370d-406a-816b-cb56b4fed180}" comment="" model-uuid="{f075591b-f872-4260-b653-5340fb552cab}" x="75" y="301" width="20" height="20" type="standard_box"/> - <box-item uuid="{44b686d4-d2e9-4e49-80e8-51a4f6c1da34}" comment="" model-uuid="{47b21d09-6e20-48de-a823-43d24779faf1}" x="25" y="222" width="100" height="50" type="standard_box"/> - <box-item uuid="{6852eac5-a203-47a4-8dcc-ea82d8c1fafb}" comment="" model-uuid="{21956737-b29c-4bf9-80ff-e0ac6df34e8c}" x="-50" y="-2" width="20" height="20" type="standard_box"/> - <box-item uuid="{3bb734f6-2ed2-4c56-ac32-76628fb8f30c}" comment="" model-uuid="{fe28f051-c026-4a4d-b04c-45e63b69476a}" x="220" y="9" width="100" height="50" type="standard_box"/> - <box-item uuid="{c27a3db3-3924-4bbf-98d3-ee506e84739a}" comment="" model-uuid="{3fb4c6c7-95ec-4315-8a98-7db1e4bd3b78}" x="26" y="3" width="100" height="50" type="standard_box"/> - <box-item uuid="{19f08e43-a8a7-4d07-8c1d-ac61643ee67a}" comment="" model-uuid="{dd05a7ea-9922-4c1b-b3ca-4f7db28501b3}" x="26" y="113" width="100" height="50" type="standard_box"/> - <box-item uuid="{616e5b69-a363-4740-be36-14967c284850}" comment="" model-uuid="{a15db530-0c7d-41e7-bc34-93e8e2c48a87}" x="-86" y="257" width="100" height="50" type="standard_box"/> - <box-item uuid="{a1c993e6-683d-4936-9fee-3d455cb477b0}" comment="" model-uuid="{45955f02-a099-49f8-873c-3bd78b27bec8}" x="-29" y="-25" width="10" height="10" type="standard_box"/> - <data-storage-item uuid="{b5abcaf5-7d75-4142-9dc0-c283c68d274d}" description="" comment="" model-uuid="{24af60a0-56fc-4aed-9d5b-d2eb271a1044}" region-uuid="{55e6357d-9c7e-4dee-878f-d74f9b4286e4}" x="-76" y="51" width="82" height="30"/> - <transition-item uuid="{b17446ce-8f29-45bd-a2e2-600c1a85809b}" comment="" model-uuid="{cfe64f94-b717-4fa7-8f13-f008d95ba2dc}" start-anchor-pos-x="4" start-anchor-pos-y="-1" end-anchor-pos-x="-3" end-anchor-pos-y="-25"> - <control-point x="-46" y="-292"/> - </transition-item> - <transition-item uuid="{4b5a0b24-71d1-4c81-9235-5d27d29dd3fc}" comment="" model-uuid="{84cda22f-ddc6-4689-87fb-c6cb8f8c1d3b}" start-anchor-pos-x="1" start-anchor-pos-y="24" end-anchor-pos-x="3" end-anchor-pos-y="-25"> - <control-point x="3" y="-160"/> - </transition-item> - <transition-item uuid="{c34db3a7-3cc1-435b-9046-9512050dec65}" comment="" model-uuid="{e0a0ecba-9e0f-49e9-a461-5ba697460547}" start-anchor-pos-x="0" start-anchor-pos-y="24" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> - <control-point x="24" y="-53"/> - </transition-item> - <transition-item uuid="{caeb9e83-24aa-47bd-b95a-016ae4374107}" comment="" model-uuid="{a2759055-c037-4e7e-ba9d-ab85f97a5b5c}" start-anchor-pos-x="1" start-anchor-pos-y="24" end-anchor-pos-x="-10" end-anchor-pos-y="0"> - <control-point x="28" y="266"/> - </transition-item> - <connection-item uuid="{6dadd6df-9a19-4ee0-a75b-168f40b268f5}" comment="" region-uuid="{55e6357d-9c7e-4dee-878f-d74f9b4286e4}" item0-uuid="{b5abcaf5-7d75-4142-9dc0-c283c68d274d}" item1-uuid="{6852eac5-a203-47a4-8dcc-ea82d8c1fafb}" start-anchor-pos-x="0" start-anchor-pos-y="14" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-75" y="178"/> - </connection-item> - <transition-item uuid="{78ae135f-37f6-4dd8-b0ed-2711024138d0}" comment="" model-uuid="{9ad4aa9a-4bdf-48be-96a8-8854d648a632}" start-anchor-pos-x="49" start-anchor-pos-y="2" end-anchor-pos-x="-3" end-anchor-pos-y="-25"> - <control-point x="172" y="-77"/> - </transition-item> - <transition-item uuid="{e2d7b4a2-ca06-4131-a563-3a15b1d8c7eb}" comment="" model-uuid="{944d0022-5e83-44fc-8138-6863ed0b5285}" start-anchor-pos-x="49" start-anchor-pos-y="3" end-anchor-pos-x="-50" end-anchor-pos-y="-2"> - <control-point x="112" y="-31"/> - </transition-item> - <transition-item uuid="{b4d9e3c4-4f6a-4588-93ba-043ef09f8377}" comment="" model-uuid="{bad50f01-5dfb-4f1e-81ae-b6d01a4373bb}" start-anchor-pos-x="-11" start-anchor-pos-y="24" end-anchor-pos-x="49" end-anchor-pos-y="-2"> - <control-point x="176" y="175"/> - </transition-item> - <transition-item uuid="{f12958dd-f11e-4f05-85a2-3214fee5dda6}" comment="" model-uuid="{048cf545-d6fe-4acc-9817-7970d2a6d80f}" start-anchor-pos-x="1" start-anchor-pos-y="24" end-anchor-pos-x="2" end-anchor-pos-y="-25"> - <control-point x="27" y="49"/> - </transition-item> - <connection-item uuid="{7bd29581-0c7a-41b6-807d-06ee3431e158}" comment="" region-uuid="{55e6357d-9c7e-4dee-878f-d74f9b4286e4}" item0-uuid="{b5abcaf5-7d75-4142-9dc0-c283c68d274d}" item1-uuid="{0f3a161c-e648-430e-9321-fc29a8eb0e2b}" start-anchor-pos-x="-13" start-anchor-pos-y="-15" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-81" y="-143"/> - </connection-item> - <connection-item uuid="{82dbc33e-35b4-4947-865f-7bd78a397240}" comment="" region-uuid="{55e6357d-9c7e-4dee-878f-d74f9b4286e4}" item0-uuid="{b5abcaf5-7d75-4142-9dc0-c283c68d274d}" item1-uuid="{8ea27e70-72d7-461d-8cfb-ff5f76f3d8fc}" start-anchor-pos-x="10" start-anchor-pos-y="-15" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-56" y="-72"/> - </connection-item> - <transition-item uuid="{e5e6b221-1e5c-412d-9402-57fa13e3318c}" comment="" model-uuid="{18e0977b-839a-4ba5-832f-5f34a8172d39}" start-anchor-pos-x="0" start-anchor-pos-y="24" end-anchor-pos-x="3" end-anchor-pos-y="-25"> - <control-point x="44" y="163"/> - </transition-item> - <transition-item uuid="{1e52f331-b7df-4ca2-a4db-4b867c3c7f0e}" comment="" model-uuid="{3989732b-49bd-4cdd-bc6c-0514ccacb991}" start-anchor-pos-x="50" start-anchor-pos-y="-11" end-anchor-pos-x="50" end-anchor-pos-y="9"> - <control-point x="103" y="108"/> - </transition-item> - <connection-item uuid="{275fbaf2-1a05-4ebc-ab06-6b18909159e5}" comment="" region-uuid="{55e6357d-9c7e-4dee-878f-d74f9b4286e4}" item0-uuid="{b5abcaf5-7d75-4142-9dc0-c283c68d274d}" item1-uuid="{a1c993e6-683d-4936-9fee-3d455cb477b0}" start-anchor-pos-x="-30" start-anchor-pos-y="15" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-98.5" y="152.5"/> - </connection-item> - <transition-item uuid="{e5edf3e4-9973-4208-9c5a-e6a3b751a2a2}" comment="" model-uuid="{2960c957-51af-4952-b9f1-b67486aea7bf}" start-anchor-pos-x="-50" start-anchor-pos-y="6" end-anchor-pos-x="-50" end-anchor-pos-y="-4"> - <control-point x="-245" y="67.5"/> - </transition-item> - <transition-item uuid="{10923101-ae2a-4124-a353-82d97326fff3}" comment="" model-uuid="{95917cff-e495-43dd-aa8a-6f91bf88c2dc}" start-anchor-pos-x="-5" start-anchor-pos-y="1" end-anchor-pos-x="-40" end-anchor-pos-y="-25"> - <control-point x="-166" y="-98.5"/> - </transition-item> - <transition-item uuid="{97c6c043-0206-4e3c-ab22-b80fe1ddcb4a}" comment="" model-uuid="{fcaa2da0-7af0-4ee6-bfba-0de379e5b91e}" start-anchor-pos-x="0" start-anchor-pos-y="5" end-anchor-pos-x="-50" end-anchor-pos-y="-15"> - <control-point x="-243" y="-37"/> - </transition-item> - <comment-item uuid="{00ce3176-b02a-4312-834e-8aa344f67174}" region-uuid="{55e6357d-9c7e-4dee-878f-d74f9b4286e4}" comment="flags: debug core02" x="83.5" y="-171" width="69" height="66"/> - </diagram> - </diagrams> -</esmcontainer> diff --git a/examples/common/esmlib/services.esm b/examples/common/esmlib/services.esm deleted file mode 100644 index 7164c81431bf340866e41df37edd91ad5b7f4f98..0000000000000000000000000000000000000000 --- a/examples/common/esmlib/services.esm +++ /dev/null @@ -1,526 +0,0 @@ -<?xml version="1.0"?> -<esmcontainer uuid="{96ee2608-a6bb-4daa-b1de-3c92f4164f6e}" name="services" cloned-from="" comment="" scene-width="0" scene-height="0"> - <data-storage-list> - <data-storage uuid="{564f8d28-487f-4fae-809b-4813b37e903e}" name="keyboard" comment=""/> - <data-storage uuid="{cb50521e-bb19-4c3d-9665-e144f6e34c82}" name="keyboardNRT" comment=""/> - <data-storage uuid="{6879d1d7-261c-47be-abfb-f36ad4ed35cf}" name="log" comment=""/> - <data-storage uuid="{ac153c03-45cb-4a7c-97a7-4b21b0d506e4}" name="smiTelem" comment=""/> - </data-storage-list> - <input-ports> - <port uuid="{d536e5ba-750d-44d0-8c93-a49bd67adfb8}" name="smiTelemIn" comment="" data-storage-uuid="{ac153c03-45cb-4a7c-97a7-4b21b0d506e4}" optional="1" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - <port uuid="{3f5995a4-6841-4fa1-855d-196452bc2021}" name="log" comment="" data-storage-uuid="{6879d1d7-261c-47be-abfb-f36ad4ed35cf}" optional="1" allocation="1" release="0" read="0" write="1"/> - <port uuid="{0a70823a-93b0-4f41-8875-1226481755ca}" name="keyboard" comment="" data-storage-uuid="{564f8d28-487f-4fae-809b-4813b37e903e}" optional="0" allocation="1" release="0" read="0" write="1"/> - <port uuid="{4821fb44-cc87-4022-bd21-55d70c7cb0ed}" name="smiTelem" comment="" data-storage-uuid="{ac153c03-45cb-4a7c-97a7-4b21b0d506e4}" optional="1" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{58209005-d7d4-49d5-815c-6c2335e10b4f}" name="quit" comment="" type="user_defined"/> - <flag uuid="{7f8766d8-a7f9-4952-bfa2-f57d62f60e77}" name="stopLogging" comment="" type="user_defined"/> - <flag uuid="{d6d9d599-4482-4565-a7e6-880aa1e0cd3f}" name="flashLogging" comment="" type="user_defined"/> - <flag uuid="{282a040a-de72-4ec8-aac8-24a98ff38991}" name="readSmiTelem" comment="" type="user_defined"/> - <flag uuid="{30a20d23-0d5c-4e4b-bedb-d109506215ee}" name="fsLogging" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{a9d556aa-3a72-4ee4-93f4-28d7ce8a1a84}" name="servicesDone" comment="" type="user_defined"/> - </output-flags> - <container-events> - <event uuid="{33e72b08-3939-49bd-b2c9-65fdf0c1f49d}" name="clearLog" comment=""/> - <event uuid="{1a07d8ff-236e-4b9f-aae6-45be34485c62}" name="debugOff" comment=""/> - <event uuid="{edef28c9-f1b0-4171-8c25-db6feb2cfafc}" name="inputDone" comment=""/> - <event uuid="{21862f28-eb69-4c24-8d44-4912161e28d6}" name="ioPortsAllocated" comment=""/> - <event uuid="{4f52b6c3-73b5-43a4-8003-9c655fd766db}" name="ioPortsDone" comment=""/> - <event uuid="{47fa8bf5-8633-4d32-b346-d2997714ff5b}" name="ioReqPortsAllocated" comment=""/> - <event uuid="{d78d4df6-7d4e-4923-8a5d-ab01fd954674}" name="keyboardQuit" comment=""/> - <event uuid="{3d416fb1-5ef1-4991-9e17-49a1c5b2a7d6}" name="logProcessUp" comment=""/> - <event uuid="{ca7ae7eb-9a90-4db2-8de2-11fe9b630403}" name="logReady" comment=""/> - <event uuid="{b758a5c9-4f28-43b2-835b-f9a4fb4b288b}" name="logReqReady" comment=""/> - <event uuid="{70663ae1-8c3b-46f8-9034-9ae09843993c}" name="loggingDone" comment=""/> - <event uuid="{7b199871-bd02-4bc5-ae42-ca182bf71a0c}" name="loggingStopped" comment=""/> - <event uuid="{ad75abb2-df50-44b6-85d1-dcb0ec71f0b2}" name="reqLogReady" comment=""/> - <event uuid="{d71c2f5c-4dcc-4600-bc42-9b4a3e52f3e9}" name="servicesDone" comment=""/> - </container-events> - <input-events> - <event-ref uuid="{47fa8bf5-8633-4d32-b346-d2997714ff5b}" name="ioReqPortsAllocated"/> - </input-events> - <output-events> - <event-ref uuid="{d78d4df6-7d4e-4923-8a5d-ab01fd954674}" name="keyboardQuit"/> - <event-ref uuid="{21862f28-eb69-4c24-8d44-4912161e28d6}" name="ioPortsAllocated"/> - <event-ref uuid="{d71c2f5c-4dcc-4600-bc42-9b4a3e52f3e9}" name="servicesDone"/> - <event-ref uuid="{7b199871-bd02-4bc5-ae42-ca182bf71a0c}" name="loggingStopped"/> - <event-ref uuid="{ca7ae7eb-9a90-4db2-8de2-11fe9b630403}" name="logReady"/> - <event-ref uuid="{3d416fb1-5ef1-4991-9e17-49a1c5b2a7d6}" name="logProcessUp"/> - </output-events> - <global-events> - <event uuid="{a5da61cc-e966-46be-8984-18f82496c183}" name="PULSEEVENT" type="pulseevent" comment=""/> - </global-events> - <regions> - <region uuid="{b0af1ef1-10e6-42c3-bb25-7d94b7e9c1ce}" name="Region2" comment="" number="0"> - <states> - <initial-state uuid="{eb2f24ba-f357-49bf-9efc-19af5055737d}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{4dc24dcb-3872-4107-bd8c-0926de2edbdf}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <super-state uuid="{249db851-4c4e-4a1f-a24c-7da820d91be5}" cloned-from-uuid="" name="debug" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="debug.esm" path-string=""> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - <flag uuid="{12150f30-54ff-4b60-b669-0a72b574488b}" name="quit" comment="" type="user_defined"/> - <flag uuid="{aef1ccc6-c0a3-4c75-88ee-22ef08a980a7}" name="debug" comment="" type="user_defined"/> - </input-flags> - <system-flags> - <flag uuid="{5a676cf7-7fd9-4f59-98e1-bd6c85879191}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{0181e8e8-75bf-46ba-af84-ba29e86563a6}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - </output-flags> - <input-events> - </input-events> - <output-events> - <event-ref uuid="{1a07d8ff-236e-4b9f-aae6-45be34485c62}" name="debugOff"/> - </output-events> - </super-state> - <final-state uuid="{370cdb8d-b2ef-442c-8d13-ec87d92ddfbf}" name="[exit]" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> - </states> - <transitions> - <transition uuid="{f5b240ef-dad1-41f3-8049-f3dfb79a28d6}" comment="" from-state-uuid="{eb2f24ba-f357-49bf-9efc-19af5055737d}" to-state-uuid="{249db851-4c4e-4a1f-a24c-7da820d91be5}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <set-flag-action uuid="{7c1c936d-e200-4a50-8cf0-13b47752fa8c}" name="set flag debug" comment="" flag-uuid="{aef1ccc6-c0a3-4c75-88ee-22ef08a980a7}" flag-value="1"/> - </actions> - </transition> - <transition uuid="{e4ff7a3b-0ebc-4f57-adb7-f870ec60e3eb}" comment="" from-state-uuid="{249db851-4c4e-4a1f-a24c-7da820d91be5}" to-state-uuid="{370cdb8d-b2ef-442c-8d13-ec87d92ddfbf}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <send-event-action uuid="{dd8bf755-c879-4ebc-92e4-3dda83c99a96}" name="" comment="" event-uuid="{d71c2f5c-4dcc-4600-bc42-9b4a3e52f3e9}"/> - </actions> -<guard operator="none" flag-uuid="{0181e8e8-75bf-46ba-af84-ba29e86563a6}"/> - </transition> - <transition uuid="{befcc605-ef20-4f35-ab96-5caada0f38e0}" comment="" from-state-uuid="{249db851-4c4e-4a1f-a24c-7da820d91be5}" to-state-uuid="{249db851-4c4e-4a1f-a24c-7da820d91be5}" event-uuid="{edef28c9-f1b0-4171-8c25-db6feb2cfafc}"> - <actions> - <set-flag-action uuid="{d72bd7ae-9c9b-4cbe-89d7-2c160a9d4c50}" name="set flag quit" comment="" flag-uuid="{12150f30-54ff-4b60-b669-0a72b574488b}" flag-value="0"/> - </actions> -<guard operator="negation" flag-uuid="{0181e8e8-75bf-46ba-af84-ba29e86563a6}"/> - </transition> - </transitions> - </region> - <region uuid="{538f023a-7f44-4664-8a3f-a9f9d7f32eaf}" name="Region4" comment="" number="1"> - <states> - <super-state uuid="{7b45d0e7-6cdb-4ac7-af7b-efb3be50df09}" cloned-from-uuid="" name="input" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="input.esm" path-string=""> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{9d97b700-1479-4530-9a5d-e46c43c3eec5}" name="keyboard" comment="" data-storage-uuid="{564f8d28-487f-4fae-809b-4813b37e903e}" optional="0" allocation="1" release="0" read="0" write="1"/> - <port uuid="{202c4875-2a43-4b02-8c93-0b800e2bc53d}" name="keyboardNRT" comment="" data-storage-uuid="{cb50521e-bb19-4c3d-9665-e144f6e34c82}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{5a42c6e3-4f78-41e0-8ab5-5dd86e15e51a}" name="quit" comment="" type="user_defined"/> - <flag uuid="{a7d3e3ec-ee49-4100-bd8e-908c6546c74c}" name="keyboard" comment="" type="user_defined"/> - <flag uuid="{b67f88bb-e7b8-4d91-9c11-48c98465a67c}" name="timeout" comment="" type="user_defined"/> - </input-flags> - <system-flags> - <flag uuid="{0c7d4581-f84b-41ab-b825-5a0992d5081d}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{0d77cf2f-cd9e-4a54-8561-b30606ba546b}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - </output-flags> - <input-events> - </input-events> - <output-events> - <event-ref uuid="{d78d4df6-7d4e-4923-8a5d-ab01fd954674}" name="keyboardQuit"/> - </output-events> - </super-state> - <initial-state uuid="{28b3802a-7d81-4cf2-8497-acbfea07bf2c}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{cc840da7-6a23-4c4f-b9e3-139565c8823a}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <basic-state uuid="{613d417e-fdd2-4197-9bb2-ea739bee33f8}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{fdc7b56a-9127-406f-8e99-ed4d1c419fa9}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - </states> - <transitions> - <transition uuid="{a0c913d2-bf28-4a1c-b039-601a1fe7e3b7}" comment="" from-state-uuid="{28b3802a-7d81-4cf2-8497-acbfea07bf2c}" to-state-uuid="{7b45d0e7-6cdb-4ac7-af7b-efb3be50df09}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <set-flag-action uuid="{4799cb51-bbe4-4aed-ad71-ba231e2784ad}" name="set flag keyboard" comment="" flag-uuid="{a7d3e3ec-ee49-4100-bd8e-908c6546c74c}" flag-value="0"/> - </actions> - </transition> - <transition uuid="{aef0e181-309b-43e0-bc76-3814f98005c4}" comment="" from-state-uuid="{7b45d0e7-6cdb-4ac7-af7b-efb3be50df09}" to-state-uuid="{7b45d0e7-6cdb-4ac7-af7b-efb3be50df09}" event-uuid="{4f52b6c3-73b5-43a4-8003-9c655fd766db}"> - <actions> - <set-flag-action uuid="{b39a7d7f-a5e2-46cc-aea8-1c9aefb367df}" name="set flag quit" comment="" flag-uuid="{5a42c6e3-4f78-41e0-8ab5-5dd86e15e51a}" flag-value="0"/> - </actions> -<guard operator="negation" flag-uuid="{0d77cf2f-cd9e-4a54-8561-b30606ba546b}"/> - </transition> - <transition uuid="{fc794ed4-2c41-4812-a4b1-e758386ff297}" comment="" from-state-uuid="{7b45d0e7-6cdb-4ac7-af7b-efb3be50df09}" to-state-uuid="{613d417e-fdd2-4197-9bb2-ea739bee33f8}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <send-event-action uuid="{f9b1b4e3-f803-48e2-8aff-1a3a56a95f65}" name="" comment="" event-uuid="{edef28c9-f1b0-4171-8c25-db6feb2cfafc}"/> - </actions> -<guard operator="none" flag-uuid="{0d77cf2f-cd9e-4a54-8561-b30606ba546b}"/> - </transition> - </transitions> - </region> - <region uuid="{b094563c-d110-435e-9400-e24c7606f869}" name="Region6" comment="" number="2"> - <states> - <super-state uuid="{ba101749-1b2c-472d-95dc-d3e594510684}" cloned-from-uuid="" name="ioPorts" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="ioPorts.esm" path-string=""> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - <flag uuid="{4c05785d-1fca-48b5-a39f-fa7ac2092efa}" name="quit" comment="" type="user_defined"/> - </input-flags> - <system-flags> - <flag uuid="{ee719b16-c3a2-40b9-a00f-559719d04bec}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{ef5dab83-8348-47d5-bea7-0936510a8d2b}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - </output-flags> - <input-events> - <event-ref uuid="{47fa8bf5-8633-4d32-b346-d2997714ff5b}" name="ioReqPortsAllocated"/> - </input-events> - <output-events> - <event-ref uuid="{21862f28-eb69-4c24-8d44-4912161e28d6}" name="ioPortsAllocated"/> - </output-events> - </super-state> - <initial-state uuid="{ee516bcf-39bf-4c96-9825-c4ff83f3eda8}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{c82bcea5-fb10-4eb8-a7ce-f6a9fd6a3f28}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <basic-state uuid="{9eebaba7-4000-4091-9412-9d1dc0a640ab}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{b404e105-5fe8-4684-a22f-3d2bccbf33e4}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - </states> - <transitions> - <transition uuid="{21142fd7-39d0-4cc9-8fff-b788d3c2f442}" comment="" from-state-uuid="{ee516bcf-39bf-4c96-9825-c4ff83f3eda8}" to-state-uuid="{ba101749-1b2c-472d-95dc-d3e594510684}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - </actions> - </transition> - <transition uuid="{931122c4-b198-4acf-9c04-673e5b32474c}" comment="" from-state-uuid="{ba101749-1b2c-472d-95dc-d3e594510684}" to-state-uuid="{ba101749-1b2c-472d-95dc-d3e594510684}" event-uuid="{70663ae1-8c3b-46f8-9034-9ae09843993c}"> - <actions> - <set-flag-action uuid="{b86bf487-9448-470d-bfef-6bff63477de8}" name="set flag quit" comment="" flag-uuid="{4c05785d-1fca-48b5-a39f-fa7ac2092efa}" flag-value="0"/> - </actions> -<guard operator="negation" flag-uuid="{ef5dab83-8348-47d5-bea7-0936510a8d2b}"/> - </transition> - <transition uuid="{703b001a-d6f9-4181-b0eb-70749f0c9cd6}" comment="" from-state-uuid="{ba101749-1b2c-472d-95dc-d3e594510684}" to-state-uuid="{9eebaba7-4000-4091-9412-9d1dc0a640ab}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <send-event-action uuid="{bf2f5ca7-8ae6-4db1-99d1-9dfcf0625630}" name="" comment="" event-uuid="{4f52b6c3-73b5-43a4-8003-9c655fd766db}"/> - </actions> -<guard operator="none" flag-uuid="{ef5dab83-8348-47d5-bea7-0936510a8d2b}"/> - </transition> - </transitions> - </region> - <region uuid="{edbe7195-5906-4539-a039-71e0c516a572}" name="Region6" comment="" number="3"> - <states> - <initial-state uuid="{74eab206-664d-416e-9779-7d869bad4a4e}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{096288d1-f8ec-4b35-acb1-3168ad9b6bd2}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <super-state uuid="{fc85c310-66dc-424d-ab75-a959d41e9554}" cloned-from-uuid="" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="flash_logging.esm" path-string=""> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{544f3134-6bf0-45c3-ad60-1104062ad9b9}" name="log" comment="" data-storage-uuid="{6879d1d7-261c-47be-abfb-f36ad4ed35cf}" optional="1" allocation="1" release="0" read="0" write="1"/> - <port uuid="{3aeff094-ce7c-4f98-87b0-9cb2721d3fb1}" name="smiTelem" comment="" data-storage-uuid="{ac153c03-45cb-4a7c-97a7-4b21b0d506e4}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{ce85f428-c7fc-44ef-bbe5-998307d1ddfa}" name="quit" comment="" type="user_defined"/> - <flag uuid="{189ce655-faa1-4231-be6a-1ce64514a41f}" name="log" comment="" type="user_defined"/> - <flag uuid="{d37a066e-7b44-4be3-bd23-bd18047926df}" name="smi" comment="" type="user_defined"/> - </input-flags> - <system-flags> - <flag uuid="{0f0c8356-0738-4c68-aa0f-2fa4e98a1a38}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{8913b014-b85c-4a7e-9a61-fb77c68e175b}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - </output-flags> - <input-events> - <event-ref uuid="{b758a5c9-4f28-43b2-835b-f9a4fb4b288b}" name="logReqReady"/> - </input-events> - <output-events> - <event-ref uuid="{ca7ae7eb-9a90-4db2-8de2-11fe9b630403}" name="logReady"/> - <event-ref uuid="{3d416fb1-5ef1-4991-9e17-49a1c5b2a7d6}" name="logProcessUp"/> - <event-ref uuid="{d78d4df6-7d4e-4923-8a5d-ab01fd954674}" name="keyboardQuit"/> - </output-events> - </super-state> - <basic-state uuid="{30b5ddec-0187-4728-85aa-50e9c0aaeae1}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{9cd0f861-19d5-4004-98d4-fd7519af57c6}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <super-state uuid="{df0bab65-ca22-4561-b550-992ffd92c953}" cloned-from-uuid="" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="logging.esm" path-string=""> - <input-ports> - <port uuid="{3141078b-fb7c-47b4-ad51-442611373d7e}" name="smiTelemIn" comment="" data-storage-uuid="{ac153c03-45cb-4a7c-97a7-4b21b0d506e4}" optional="1" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - <port uuid="{c0662e59-e9af-4445-ac3f-ebde628df79f}" name="log" comment="" data-storage-uuid="{6879d1d7-261c-47be-abfb-f36ad4ed35cf}" optional="1" allocation="1" release="0" read="0" write="1"/> - <port uuid="{a8387b51-ae52-4469-be9c-17232bec597d}" name="smiTelem" comment="" data-storage-uuid="{ac153c03-45cb-4a7c-97a7-4b21b0d506e4}" optional="1" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{3dffd4bd-5cc0-40b8-b4cf-746357387e4c}" name="quit" comment="" type="user_defined"/> - <flag uuid="{a2f148b1-266e-4dc1-98f1-9a2b828be4a6}" name="log" comment="" type="user_defined"/> - <flag uuid="{589788d7-66b0-4858-86fd-6db447bfe785}" name="readSmiTelem" comment="" type="user_defined"/> - </input-flags> - <system-flags> - <flag uuid="{ca85b512-2374-4171-96e9-e80e5a3bcc8a}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{11a659f5-c3a5-44f9-83e2-2cee029a0f91}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - <flag uuid="{3985bd0d-7dc2-4d3b-96a2-74f01264d079}" name="log" comment="" type="user_defined"/> - </output-flags> - <input-events> - <event-ref uuid="{33e72b08-3939-49bd-b2c9-65fdf0c1f49d}" name="clearLog"/> - <event-ref uuid="{ad75abb2-df50-44b6-85d1-dcb0ec71f0b2}" name="reqLogReady"/> - </input-events> - <output-events> - <event-ref uuid="{ca7ae7eb-9a90-4db2-8de2-11fe9b630403}" name="logReady"/> - <event-ref uuid="{3d416fb1-5ef1-4991-9e17-49a1c5b2a7d6}" name="logProcessUp"/> - <event-ref uuid="{d78d4df6-7d4e-4923-8a5d-ab01fd954674}" name="keyboardQuit"/> - </output-events> - </super-state> - <task-state uuid="{9bd649b0-236a-4184-9bc0-f667561f6d0c}" name="getSmiTelemVar" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="getSmiTelemVar" task-slot-name="init" process-name="" real-time="1"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{69bf8d14-652c-4b50-8812-932066a9d7b5}" name="smiTelem" comment="" data-storage-uuid="{ac153c03-45cb-4a7c-97a7-4b21b0d506e4}" optional="0" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{ccccbc5b-885d-452c-9e12-651e29af21a9}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{ce680c05-d4db-45f6-af8e-f83b9ed5c598}" name="Exit" comment="" type="exit"/> - <flag uuid="{18b2d4ee-b223-46cb-8851-8439b6a55a60}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <basic-state uuid="{eab6398a-7aa4-4a58-9b01-e3167b1a87d2}" name="wait" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{5b169687-6af8-4cd5-bf83-0d9fd3d4bb54}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - </states> - <transitions> - <transition uuid="{c781ec8b-b76b-41a7-b429-5d4ac73789c8}" comment="" from-state-uuid="{74eab206-664d-416e-9779-7d869bad4a4e}" to-state-uuid="{fc85c310-66dc-424d-ab75-a959d41e9554}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <set-flag-action uuid="{2963d265-6fe0-4581-b7d5-27da3b90d7e1}" name="set flag log" comment="" flag-uuid="{189ce655-faa1-4231-be6a-1ce64514a41f}" flag-value="0"/> - <set-flag-action uuid="{244ec7f3-3d98-42ef-ba19-0047b169d0de}" name="set flag smi" comment="" flag-uuid="{d37a066e-7b44-4be3-bd23-bd18047926df}" flag-value="0"/> - </actions> -<guard operator="none" flag-uuid="{d6d9d599-4482-4565-a7e6-880aa1e0cd3f}"/> - </transition> - <transition uuid="{10df37b1-ffb7-43af-b063-dd6b610dd091}" comment="" from-state-uuid="{fc85c310-66dc-424d-ab75-a959d41e9554}" to-state-uuid="{eab6398a-7aa4-4a58-9b01-e3167b1a87d2}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <send-event-action uuid="{9625fe2f-f130-4ee6-b042-c4175c4b644e}" name="" comment="" event-uuid="{7b199871-bd02-4bc5-ae42-ca182bf71a0c}"/> - </actions> -<guard operator="none" flag-uuid="{8913b014-b85c-4a7e-9a61-fb77c68e175b}"/> - </transition> - <transition uuid="{96911990-3eb9-48b4-b56e-2467a4570ee6}" comment="" from-state-uuid="{9bd649b0-236a-4184-9bc0-f667561f6d0c}" to-state-uuid="{df0bab65-ca22-4561-b550-992ffd92c953}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <set-flag-action uuid="{73a030be-5ffa-4998-8403-ee1dbe9b3482}" name="" comment="" flag-uuid="{a2f148b1-266e-4dc1-98f1-9a2b828be4a6}" flag-value="0"/> - <set-flag-action uuid="{ded0e5ff-a9f4-45fc-bef1-4894561bcf19}" name="" comment="" flag-uuid="{589788d7-66b0-4858-86fd-6db447bfe785}" flag-value="0"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{ce680c05-d4db-45f6-af8e-f83b9ed5c598}"/> -<guard operator="none" flag-uuid="{282a040a-de72-4ec8-aac8-24a98ff38991}"/> -</guard> - </transition> - <transition uuid="{8b13a9cb-a1cc-4b99-9948-7cd86d5ef4da}" comment="" from-state-uuid="{df0bab65-ca22-4561-b550-992ffd92c953}" to-state-uuid="{eab6398a-7aa4-4a58-9b01-e3167b1a87d2}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <send-event-action uuid="{729ede5a-d545-4885-94d9-cd57bf9626da}" name="" comment="" event-uuid="{7b199871-bd02-4bc5-ae42-ca182bf71a0c}"/> - </actions> -<guard operator="none" flag-uuid="{11a659f5-c3a5-44f9-83e2-2cee029a0f91}"/> - </transition> - <transition uuid="{b30f42d6-6bd4-4402-b9b1-9f451b09e8d4}" comment="" from-state-uuid="{df0bab65-ca22-4561-b550-992ffd92c953}" to-state-uuid="{df0bab65-ca22-4561-b550-992ffd92c953}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <set-flag-action uuid="{80e920eb-127a-45b9-8e1e-5486e76a0ff3}" name="" comment="" flag-uuid="{3dffd4bd-5cc0-40b8-b4cf-746357387e4c}" flag-value="0"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="negation" flag-uuid="{11a659f5-c3a5-44f9-83e2-2cee029a0f91}"/> -<guard operator="none" flag-uuid="{58209005-d7d4-49d5-815c-6c2335e10b4f}"/> -</guard> - </transition> - <transition uuid="{c72dda4b-ab7e-498b-9a29-2fbe34a548ae}" comment="" from-state-uuid="{74eab206-664d-416e-9779-7d869bad4a4e}" to-state-uuid="{9bd649b0-236a-4184-9bc0-f667561f6d0c}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{30a20d23-0d5c-4e4b-bedb-d109506215ee}"/> - </transition> - <transition uuid="{a0e2c944-ce39-491a-9806-dda32eed6882}" comment="" from-state-uuid="{df0bab65-ca22-4561-b550-992ffd92c953}" to-state-uuid="{df0bab65-ca22-4561-b550-992ffd92c953}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <set-flag-action uuid="{245361f5-b25d-4552-a4dd-85a51fb14086}" name="" comment="" flag-uuid="{3dffd4bd-5cc0-40b8-b4cf-746357387e4c}" flag-value="0"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="negation" flag-uuid="{11a659f5-c3a5-44f9-83e2-2cee029a0f91}"/> -<guard operator="none" flag-uuid="{7f8766d8-a7f9-4952-bfa2-f57d62f60e77}"/> -</guard> - </transition> - <transition uuid="{72bdfbfc-3353-4d9e-bbc9-ddc2e2d2df78}" comment="" from-state-uuid="{eab6398a-7aa4-4a58-9b01-e3167b1a87d2}" to-state-uuid="{30b5ddec-0187-4728-85aa-50e9c0aaeae1}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <send-event-action uuid="{24d22213-3776-41c7-a789-a78fa51aa129}" name="" comment="" event-uuid="{70663ae1-8c3b-46f8-9034-9ae09843993c}"/> - </actions> -<guard operator="none" flag-uuid="{58209005-d7d4-49d5-815c-6c2335e10b4f}"/> - </transition> - <transition uuid="{d9b9ff25-36e7-4bed-b4ad-4ea819924eae}" comment="" from-state-uuid="{9bd649b0-236a-4184-9bc0-f667561f6d0c}" to-state-uuid="{df0bab65-ca22-4561-b550-992ffd92c953}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <set-flag-action uuid="{6016f3ff-50cd-4125-bd49-5d28a6568cb6}" name="" comment="" flag-uuid="{a2f148b1-266e-4dc1-98f1-9a2b828be4a6}" flag-value="0"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{ce680c05-d4db-45f6-af8e-f83b9ed5c598}"/> -<guard operator="negation" flag-uuid="{282a040a-de72-4ec8-aac8-24a98ff38991}"/> -</guard> - </transition> - <transition uuid="{c1cfcd93-a092-4fd6-a0f1-a89d52edbac7}" comment="" from-state-uuid="{74eab206-664d-416e-9779-7d869bad4a4e}" to-state-uuid="{fc85c310-66dc-424d-ab75-a959d41e9554}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <set-flag-action uuid="{c2521106-7eca-493a-bfb9-b839c3ecc8f0}" name="" comment="" flag-uuid="{d37a066e-7b44-4be3-bd23-bd18047926df}" flag-value="0"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="negation" flag-uuid="{d6d9d599-4482-4565-a7e6-880aa1e0cd3f}"/> -<guard operator="negation" flag-uuid="{30a20d23-0d5c-4e4b-bedb-d109506215ee}"/> -</guard> - </transition> - <transition uuid="{7386b7d1-ff54-4190-9662-103f5b25b861}" comment="" from-state-uuid="{fc85c310-66dc-424d-ab75-a959d41e9554}" to-state-uuid="{fc85c310-66dc-424d-ab75-a959d41e9554}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <set-flag-action uuid="{fc262646-150c-4e87-adc9-ddcc9b60904d}" name="" comment="" flag-uuid="{ce85f428-c7fc-44ef-bbe5-998307d1ddfa}" flag-value="0"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="negation" flag-uuid="{8913b014-b85c-4a7e-9a61-fb77c68e175b}"/> -<guard operator="none" flag-uuid="{58209005-d7d4-49d5-815c-6c2335e10b4f}"/> -</guard> - </transition> - <transition uuid="{c4cb9478-462c-48d7-a304-d8adda32f743}" comment="" from-state-uuid="{fc85c310-66dc-424d-ab75-a959d41e9554}" to-state-uuid="{fc85c310-66dc-424d-ab75-a959d41e9554}" event-uuid="{a5da61cc-e966-46be-8984-18f82496c183}"> - <actions> - <set-flag-action uuid="{6fad0069-9f3c-40b3-a271-65a779760284}" name="" comment="" flag-uuid="{ce85f428-c7fc-44ef-bbe5-998307d1ddfa}" flag-value="0"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="negation" flag-uuid="{8913b014-b85c-4a7e-9a61-fb77c68e175b}"/> -<guard operator="none" flag-uuid="{7f8766d8-a7f9-4952-bfa2-f57d62f60e77}"/> -</guard> - </transition> - </transitions> - </region> - </regions> - <diagrams> - <diagram uuid="{c9116f55-6406-427c-8b77-5e3d05fca0dc}" name="" comment=""> - <box-item uuid="{846ac2b6-25a5-49fc-a94a-579987bd9fec}" comment="" model-uuid="{b0af1ef1-10e6-42c3-bb25-7d94b7e9c1ce}" x="2190" y="2400" width="240" height="240" type="standard_box"/> - <box-item uuid="{f71c0b63-0b74-42b1-a343-7f1098ca664d}" comment="" model-uuid="{eb2f24ba-f357-49bf-9efc-19af5055737d}" x="-76" y="-88" width="10" height="10" type="standard_box"/> - <box-item uuid="{bbca5681-3ba8-41ce-b4d7-309ebd144f3a}" comment="" model-uuid="{249db851-4c4e-4a1f-a24c-7da820d91be5}" x="-30" y="-11" width="100" height="50" type="standard_box"/> - <box-item uuid="{01843463-fb8d-49fa-98e2-0ab4efe5fa1f}" comment="" model-uuid="{370cdb8d-b2ef-442c-8d13-ec87d92ddfbf}" x="100" y="104" width="20" height="20" type="standard_box"/> - <box-item uuid="{5d27343e-d4ae-421d-9b7f-2df92658d832}" comment="" model-uuid="{538f023a-7f44-4664-8a3f-a9f9d7f32eaf}" x="2580" y="2400" width="420" height="240" type="standard_box"/> - <box-item uuid="{0fcbb3b0-2677-46c0-ac76-b7a5c5c2a4e2}" comment="" model-uuid="{7b45d0e7-6cdb-4ac7-af7b-efb3be50df09}" x="-45" y="-22" width="100" height="50" type="standard_box"/> - <box-item uuid="{cb8fff34-b50a-49cb-aecb-98dad8ed6c66}" comment="" model-uuid="{9d97b700-1479-4530-9a5d-e46c43c3eec5}" x="50" y="-3" width="20" height="20" type="standard_box"/> - <box-item uuid="{bfea130c-bdef-4d79-8dd1-2758b46e0cb6}" comment="" model-uuid="{28b3802a-7d81-4cf2-8497-acbfea07bf2c}" x="-110" y="-95" width="10" height="10" type="standard_box"/> - <box-item uuid="{6f42932b-5580-4949-a9cf-9a1bb914cfb3}" comment="" model-uuid="{613d417e-fdd2-4197-9bb2-ea739bee33f8}" x="75" y="82" width="46" height="32" type="standard_box"/> - <box-item uuid="{a2580495-3087-46a4-97be-b70578c6182d}" comment="" model-uuid="{b094563c-d110-435e-9400-e24c7606f869}" x="2220" y="2670" width="300" height="240" type="standard_box"/> - <box-item uuid="{71be4e89-fe33-4090-857f-5aa442fef3fa}" comment="" model-uuid="{ba101749-1b2c-472d-95dc-d3e594510684}" x="-22" y="-26" width="100" height="50" type="standard_box"/> - <box-item uuid="{4059c675-1c8b-413a-b2cb-aa4a0e7eb8b4}" comment="" model-uuid="{ee516bcf-39bf-4c96-9825-c4ff83f3eda8}" x="-92" y="-100" width="10" height="10" type="standard_box"/> - <box-item uuid="{8b41b39e-6e47-42bb-acc5-0a1e70886c43}" comment="" model-uuid="{9eebaba7-4000-4091-9412-9d1dc0a640ab}" x="85" y="84.5" width="58" height="31" type="standard_box"/> - <box-item uuid="{bdba586d-1e63-496f-8e61-83be077ec9e3}" comment="" model-uuid="{edbe7195-5906-4539-a039-71e0c516a572}" x="2820" y="2760" width="840" height="420" type="standard_box"/> - <box-item uuid="{d2f2e3b1-7cee-4838-84f3-21aef706ff04}" comment="" model-uuid="{74eab206-664d-416e-9779-7d869bad4a4e}" x="-327" y="-131" width="10" height="10" type="standard_box"/> - <box-item uuid="{5c56c0f4-8db6-4157-9b89-a8f4c3e96b62}" comment="" model-uuid="{fc85c310-66dc-424d-ab75-a959d41e9554}" x="-270" y="-18" width="100" height="50" type="standard_box"/> - <box-item uuid="{171c65dd-dcb1-485a-a06d-27f6834afb58}" comment="" model-uuid="{544f3134-6bf0-45c3-ad60-1104062ad9b9}" x="50" y="0" width="20" height="20" type="standard_box"/> - <box-item uuid="{718dc4ce-4e6b-4e12-9646-6698bffa530a}" comment="" model-uuid="{3aeff094-ce7c-4f98-87b0-9cb2721d3fb1}" x="16" y="-25" width="20" height="20" type="standard_box"/> - <box-item uuid="{7f6ad659-ded4-4d40-9b70-d0291843f0d6}" comment="" model-uuid="{30b5ddec-0187-4728-85aa-50e9c0aaeae1}" x="-165.5" y="119" width="43" height="34" type="standard_box"/> - <box-item uuid="{be2f4856-e48f-4158-a4fa-051d8370a2bc}" comment="" model-uuid="{202c4875-2a43-4b02-8c93-0b800e2bc53d}" x="50" y="-16" width="10" height="10" type="standard_box"/> - <box-item uuid="{6e54eacc-5a10-4f75-968c-638ec3c0f2ce}" comment="" model-uuid="{df0bab65-ca22-4561-b550-992ffd92c953}" x="85" y="34" width="100" height="50" type="standard_box"/> - <box-item uuid="{5afe8f6b-a794-4e43-90a2-0b2593e63b5c}" comment="" model-uuid="{c0662e59-e9af-4445-ac3f-ebde628df79f}" x="-50" y="11" width="10" height="10" type="standard_box"/> - <box-item uuid="{28656d58-dd2d-4aac-a4b6-6f0cb04d69f9}" comment="" model-uuid="{a8387b51-ae52-4469-be9c-17232bec597d}" x="-50" y="-10" width="10" height="10" type="standard_box"/> - <box-item uuid="{ec012b7e-0aac-477c-8bc5-4955c13cfdb8}" comment="" model-uuid="{9bd649b0-236a-4184-9bc0-f667561f6d0c}" x="106.5" y="-98" width="137" height="50" type="standard_box"/> - <box-item uuid="{14cfec2a-59b6-4d2f-8512-737a4baea25e}" comment="" model-uuid="{69bf8d14-652c-4b50-8812-932066a9d7b5}" x="-68.5" y="4" width="10" height="10" type="standard_box"/> - <box-item uuid="{497665e2-64c9-49f6-81cc-89b0de88a415}" comment="" model-uuid="{eab6398a-7aa4-4a58-9b01-e3167b1a87d2}" x="-13.5" y="124.5" width="63" height="37" type="standard_box"/> - <box-item uuid="{51a671fa-62b9-4154-be14-54eb9944206b}" comment="" model-uuid="{3141078b-fb7c-47b4-ad51-442611373d7e}" x="-50" y="-16" width="10" height="10" type="standard_box"/> - <data-storage-item uuid="{1729e22f-2e02-4c11-b06b-618f678f5c3c}" description="" comment="" model-uuid="{564f8d28-487f-4fae-809b-4813b37e903e}" region-uuid="{538f023a-7f44-4664-8a3f-a9f9d7f32eaf}" x="88" y="-24" width="68" height="30"/> - <data-storage-item uuid="{eb618d57-3f08-410b-b177-24efccfa7371}" description="" comment="" model-uuid="{6879d1d7-261c-47be-abfb-f36ad4ed35cf}" region-uuid="{edbe7195-5906-4539-a039-71e0c516a572}" x="-140" y="-16" width="32" height="30"/> - <data-storage-item uuid="{66f25af7-28eb-4ba2-b8a9-2f174c014482}" description="" comment="" model-uuid="{ac153c03-45cb-4a7c-97a7-4b21b0d506e4}" region-uuid="{edbe7195-5906-4539-a039-71e0c516a572}" x="-92" y="-62" width="72" height="30"/> - <data-storage-item uuid="{9a9e8827-05b0-45a5-a328-46c39b25aa87}" description="" comment="" model-uuid="{cb50521e-bb19-4c3d-9665-e144f6e34c82}" region-uuid="{538f023a-7f44-4664-8a3f-a9f9d7f32eaf}" x="139" y="-83.5" width="98" height="31"/> - <transition-item uuid="{5e52eeb1-66e6-4a11-8edd-fe1216abaf3d}" comment="" model-uuid="{f5b240ef-dad1-41f3-8049-f3dfb79a28d6}" start-anchor-pos-x="4" start-anchor-pos-y="0" end-anchor-pos-x="-2" end-anchor-pos-y="-25"> - <control-point x="-41" y="-65"/> - </transition-item> - <transition-item uuid="{c0271fb0-057b-49e9-978d-ab5bedb49af3}" comment="" model-uuid="{e4ff7a3b-0ebc-4f57-adb7-f870ec60e3eb}" start-anchor-pos-x="21" start-anchor-pos-y="24" end-anchor-pos-x="-10" end-anchor-pos-y="-1"> - <control-point x="-3" y="73"/> - </transition-item> - <transition-item uuid="{489e92e2-8fea-4174-948b-00aa6fde0537}" comment="" model-uuid="{befcc605-ef20-4f35-ab96-5caada0f38e0}" start-anchor-pos-x="-39" start-anchor-pos-y="24" end-anchor-pos-x="0" end-anchor-pos-y="24"> - <control-point x="-56" y="43"/> - </transition-item> - <transition-item uuid="{745da299-a7ae-4f71-8696-cb281917582f}" comment="" model-uuid="{a0c913d2-bf28-4a1c-b039-601a1fe7e3b7}" start-anchor-pos-x="4" start-anchor-pos-y="1" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> - <control-point x="-73" y="-82"/> - </transition-item> - <transition-item uuid="{de3c94bc-3715-4cf0-aac0-139078e8a8bd}" comment="" model-uuid="{aef0e181-309b-43e0-bc76-3814f98005c4}" start-anchor-pos-x="-40" start-anchor-pos-y="24" end-anchor-pos-x="3" end-anchor-pos-y="24"> - <control-point x="-63" y="32"/> - </transition-item> - <transition-item uuid="{9df97c47-a49c-43e0-85cd-62026f34d6e3}" comment="" model-uuid="{fc794ed4-2c41-4812-a4b1-e758386ff297}" start-anchor-pos-x="22" start-anchor-pos-y="24" end-anchor-pos-x="-23" end-anchor-pos-y="3"> - <control-point x="-6" y="56"/> - </transition-item> - <connection-item uuid="{477b02cc-009f-44d5-8e18-1cfc1c8412a0}" comment="" region-uuid="{538f023a-7f44-4664-8a3f-a9f9d7f32eaf}" item0-uuid="{1729e22f-2e02-4c11-b06b-618f678f5c3c}" item1-uuid="{cb8fff34-b50a-49cb-aecb-98dad8ed6c66}" start-anchor-pos-x="-34" start-anchor-pos-y="-1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="28" y="-25"/> - </connection-item> - <transition-item uuid="{75825568-44a5-43eb-8eb2-eeab2db6e8fc}" comment="" model-uuid="{21142fd7-39d0-4cc9-8fff-b788d3c2f442}" start-anchor-pos-x="4" start-anchor-pos-y="-1" end-anchor-pos-x="1" end-anchor-pos-y="-25"> - <control-point x="-23" y="-77"/> - </transition-item> - <transition-item uuid="{15ad1120-85d9-462b-9669-67541bc5fd24}" comment="" model-uuid="{931122c4-b198-4acf-9c04-673e5b32474c}" start-anchor-pos-x="-42" start-anchor-pos-y="24" end-anchor-pos-x="1" end-anchor-pos-y="24"> - <control-point x="-37" y="31"/> - </transition-item> - <transition-item uuid="{a162b8a7-d520-46c8-9e5c-c648146e3b1e}" comment="" model-uuid="{703b001a-d6f9-4181-b0eb-70749f0c9cd6}" start-anchor-pos-x="24" start-anchor-pos-y="24" end-anchor-pos-x="-29" end-anchor-pos-y="3"> - <control-point x="19" y="53"/> - </transition-item> - <connection-item uuid="{8cbea42e-1632-4521-8cd2-b014e9fe8cd6}" comment="" region-uuid="{edbe7195-5906-4539-a039-71e0c516a572}" item0-uuid="{eb618d57-3f08-410b-b177-24efccfa7371}" item1-uuid="{171c65dd-dcb1-485a-a06d-27f6834afb58}" start-anchor-pos-x="-16" start-anchor-pos-y="1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-179" y="-15"/> - </connection-item> - <transition-item uuid="{47897f02-d680-4a36-9616-c4deea1f866c}" comment="" model-uuid="{c781ec8b-b76b-41a7-b429-5d4ac73789c8}" start-anchor-pos-x="1" start-anchor-pos-y="-5" end-anchor-pos-x="0" end-anchor-pos-y="-25"> - <control-point x="-283" y="-114"/> - </transition-item> - <transition-item uuid="{0ce19507-2efb-44a1-a78d-d7035812a9af}" comment="" model-uuid="{10df37b1-ffb7-43af-b063-dd6b610dd091}" start-anchor-pos-x="19" start-anchor-pos-y="24" end-anchor-pos-x="6.5" end-anchor-pos-y="-18.5"> - <control-point x="-226" y="55"/> - </transition-item> - <connection-item uuid="{5b3bf2cb-71c2-4855-aff6-00d96b0bcffc}" comment="" region-uuid="{edbe7195-5906-4539-a039-71e0c516a572}" item0-uuid="{66f25af7-28eb-4ba2-b8a9-2f174c014482}" item1-uuid="{718dc4ce-4e6b-4e12-9646-6698bffa530a}" start-anchor-pos-x="-36" start-anchor-pos-y="-2" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-187" y="-57"/> - </connection-item> - <connection-item uuid="{73828a9c-a466-41f5-95ff-0dcddc7acdf0}" comment="" region-uuid="{538f023a-7f44-4664-8a3f-a9f9d7f32eaf}" item0-uuid="{9a9e8827-05b0-45a5-a328-46c39b25aa87}" item1-uuid="{be2f4856-e48f-4158-a4fa-051d8370a2bc}" start-anchor-pos-x="-2" start-anchor-pos-y="15.5" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="61" y="-53"/> - </connection-item> - <transition-item uuid="{afc6a40a-bdb0-41d5-8a0a-3f0af4f8472f}" comment="" model-uuid="{96911990-3eb9-48b4-b56e-2467a4570ee6}" start-anchor-pos-x="-25" start-anchor-pos-y="25" end-anchor-pos-x="-27" end-anchor-pos-y="-25"> - <control-point x="37.5" y="-44.5"/> - </transition-item> - <transition-item uuid="{1aae7ed7-4c91-46f6-bf08-b3d6aa28a137}" comment="" model-uuid="{8b13a9cb-a1cc-4b99-9948-7cd86d5ef4da}" start-anchor-pos-x="0" start-anchor-pos-y="25" end-anchor-pos-x="31.5" end-anchor-pos-y="1.5"> - <control-point x="69.5" y="108.5"/> - </transition-item> - <connection-item uuid="{6ec4868d-ba35-477f-8b78-8ad2543d8e0b}" comment="" region-uuid="{edbe7195-5906-4539-a039-71e0c516a572}" item0-uuid="{eb618d57-3f08-410b-b177-24efccfa7371}" item1-uuid="{5afe8f6b-a794-4e43-90a2-0b2593e63b5c}" start-anchor-pos-x="16" start-anchor-pos-y="4" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-38.5" y="-4"/> - </connection-item> - <transition-item uuid="{0d1e3176-c14c-449d-a15f-576ce39e9c51}" comment="" model-uuid="{b30f42d6-6bd4-4402-b9b1-9f451b09e8d4}" start-anchor-pos-x="50" start-anchor-pos-y="-14" end-anchor-pos-x="50" end-anchor-pos-y="10"> - <control-point x="173.5" y="25"/> - </transition-item> - <connection-item uuid="{c4190c9d-d9c6-4223-8972-46be04b3ea01}" comment="" region-uuid="{edbe7195-5906-4539-a039-71e0c516a572}" item0-uuid="{66f25af7-28eb-4ba2-b8a9-2f174c014482}" item1-uuid="{14cfec2a-59b6-4d2f-8512-737a4baea25e}" start-anchor-pos-x="36" start-anchor-pos-y="-5" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-20" y="-83.5"/> - </connection-item> - <transition-item uuid="{d6ededb1-737a-4b54-b7e1-3eed3c480e7e}" comment="" model-uuid="{c72dda4b-ab7e-498b-9a29-2fbe34a548ae}" start-anchor-pos-x="-5" start-anchor-pos-y="0" end-anchor-pos-x="-6" end-anchor-pos-y="-25"> - <control-point x="-124" y="-181"/> - </transition-item> - <transition-item uuid="{949895bd-2202-4783-960f-e9d410e3f179}" comment="" model-uuid="{a0e2c944-ce39-491a-9806-dda32eed6882}" start-anchor-pos-x="39" start-anchor-pos-y="25" end-anchor-pos-x="17" end-anchor-pos-y="25"> - <control-point x="157" y="85.5"/> - </transition-item> - <transition-item uuid="{04662524-901b-4a6f-b6c8-4a5a302f7f04}" comment="" model-uuid="{72bdfbfc-3353-4d9e-bbc9-ddc2e2d2df78}" start-anchor-pos-x="-31.5" start-anchor-pos-y="3.5" end-anchor-pos-x="21.5" end-anchor-pos-y="2"> - <control-point x="-100" y="158.5"/> - </transition-item> - <transition-item uuid="{4debe388-f417-40c0-9c25-e213153cfeb8}" comment="" model-uuid="{d9b9ff25-36e7-4bed-b4ad-4ea819924eae}" start-anchor-pos-x="17" start-anchor-pos-y="25" end-anchor-pos-x="34" end-anchor-pos-y="-25"> - <control-point x="121.5" y="-20.5"/> - </transition-item> - <connection-item uuid="{1f9276e1-779b-4a79-a6d2-6f2c876e7647}" comment="" region-uuid="{edbe7195-5906-4539-a039-71e0c516a572}" item0-uuid="{66f25af7-28eb-4ba2-b8a9-2f174c014482}" item1-uuid="{28656d58-dd2d-4aac-a4b6-6f0cb04d69f9}" start-anchor-pos-x="36" start-anchor-pos-y="3" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-15" y="-14"/> - </connection-item> - <connection-item uuid="{5b36d36e-122e-43ef-bc8b-910834e9db89}" comment="" region-uuid="{edbe7195-5906-4539-a039-71e0c516a572}" item0-uuid="{66f25af7-28eb-4ba2-b8a9-2f174c014482}" item1-uuid="{51a671fa-62b9-4154-be14-54eb9944206b}" start-anchor-pos-x="36" start-anchor-pos-y="-3" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-6" y="-26"/> - </connection-item> - <transition-item uuid="{fa50b594-11a2-4cfd-8d38-9d28c6d1ee72}" comment="" model-uuid="{c1cfcd93-a092-4fd6-a0f1-a89d52edbac7}" start-anchor-pos-x="-5" start-anchor-pos-y="1" end-anchor-pos-x="-50" end-anchor-pos-y="-2"> - <control-point x="-355.5" y="-92"/> - </transition-item> - <transition-item uuid="{1cea26b6-ddcf-452e-a6be-e827a6fa1b6e}" comment="" model-uuid="{7386b7d1-ff54-4190-9662-103f5b25b861}" start-anchor-pos-x="-50" start-anchor-pos-y="15" end-anchor-pos-x="-35" end-anchor-pos-y="25"> - <control-point x="-388" y="57"/> - </transition-item> - <comment-item uuid="{0203f8ae-6e6a-4c5a-9262-327e925262e1}" region-uuid="{538f023a-7f44-4664-8a3f-a9f9d7f32eaf}" comment="flags: keyboard timeout" x="-150" y="-49.5" width="100" height="65"/> - <transition-item uuid="{1c804caa-8e6b-4af3-bfe1-95b44ec7d52a}" comment="" model-uuid="{c4cb9478-462c-48d7-a304-d8adda32f743}" start-anchor-pos-x="-18" start-anchor-pos-y="25" end-anchor-pos-x="2" end-anchor-pos-y="25"> - <control-point x="-277.5" y="30"/> - </transition-item> - </diagram> - </diagrams> -</esmcontainer> diff --git a/examples/common/esmlib/services_no_flash.esm b/examples/common/esmlib/services_no_flash.esm new file mode 100644 index 0000000000000000000000000000000000000000..0bfb79168316001edaa51e35b01bf77488069254 --- /dev/null +++ b/examples/common/esmlib/services_no_flash.esm @@ -0,0 +1,469 @@ +<?xml version="1.0"?> +<esmcontainer uuid="{2941fa1f-0cbe-4ff6-af86-40002f342096}" name="services" cloned-from="services.esm" comment="" scene-width="0" scene-height="0"> + <data-storage-list> + <data-storage uuid="{10b59921-fcd0-49d4-abb1-bb9e3c85a502}" name="keyboard" comment=""/> + <data-storage uuid="{b63f0e71-5fbc-4fbf-96c2-d0a4ecfda891}" name="keyboardNRT" comment=""/> + <data-storage uuid="{b6142470-5ad5-4bde-98cd-f59242c40e7f}" name="log" comment=""/> + <data-storage uuid="{02bcc531-21c3-4dc9-8e3c-693d42ed8a93}" name="smiTelem" comment=""/> + </data-storage-list> + <input-ports> + <port uuid="{5880b4d4-c60f-4f73-abc7-5ed0db837462}" name="smiTelem" comment="" data-storage-uuid="{02bcc531-21c3-4dc9-8e3c-693d42ed8a93}" optional="1" allocation="0" release="1" read="1" write="0"/> + </input-ports> + <output-ports> + <port uuid="{337e2e5f-e4f5-4afb-9278-2b15e776ab8b}" name="log" comment="" data-storage-uuid="{b6142470-5ad5-4bde-98cd-f59242c40e7f}" optional="1" allocation="1" release="0" read="0" write="1"/> + <port uuid="{0436c7c9-78bf-4a97-bae9-a77dc2f91891}" name="keyboard" comment="" data-storage-uuid="{10b59921-fcd0-49d4-abb1-bb9e3c85a502}" optional="0" allocation="1" release="0" read="0" write="1"/> + <port uuid="{3496fe51-a951-441f-b1dd-bb6981144f4f}" name="smiTelem" comment="" data-storage-uuid="{02bcc531-21c3-4dc9-8e3c-693d42ed8a93}" optional="1" allocation="1" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + <flag uuid="{c7fff639-a8d2-4ef1-85cf-a5aa907cf5e4}" name="quit" comment="" type="user_defined"/> + <flag uuid="{36e4e885-367c-4565-8050-04f4504f3c66}" name="stopLogging" comment="" type="user_defined"/> + <flag uuid="{8a67d377-f734-418d-a280-13288f4e2de9}" name="flashLogging" comment="" type="user_defined"/> + <flag uuid="{a363cec2-dcd5-49f0-a6a8-44585b927c22}" name="readSmiTelem" comment="" type="user_defined"/> + <flag uuid="{47e9d909-8ca7-4de8-9426-53e62d57a6d0}" name="fsLogging" comment="" type="user_defined"/> + <flag uuid="{e1a3d2d3-d561-4dae-95cc-ee5e0e47e66a}" name="quitChar" comment="" type="user_defined"/> + </input-flags> + <output-flags> + <flag uuid="{45fe6f5c-26b5-43dd-b269-ea30b3835b01}" name="servicesDone" comment="" type="user_defined"/> + </output-flags> + <container-events> + <event uuid="{dc456221-3409-41e8-915b-50dd1b57d385}" name="buzzerOn" comment=""/> + <event uuid="{d205358a-34ad-4845-9615-7e63ca6cd2fd}" name="clearLog" comment=""/> + <event uuid="{4a15be5f-45da-470a-96f8-af283bc6a740}" name="debugOff" comment=""/> + <event uuid="{39405adf-3de1-4ec0-9422-6b86cbe100f3}" name="dummy" comment=""/> + <event uuid="{8c6397ba-11eb-4e63-a143-8e049f486f1e}" name="inputDone" comment=""/> + <event uuid="{048d120a-64a7-40f5-98c1-2ef055e625a0}" name="ioPortsAllocated" comment=""/> + <event uuid="{f15465bd-b5e6-4e50-9d2e-11a4e6498c16}" name="ioPortsDone" comment=""/> + <event uuid="{c072dc5c-544d-4386-8517-8fbb82bc188f}" name="ioPortsError" comment=""/> + <event uuid="{817ffcb1-4df1-48e9-89e0-aef55d547edc}" name="keyboardQuit" comment=""/> + <event uuid="{b6bea62d-a590-43d9-8b2e-90bbe9a4442e}" name="keyboardReady" comment=""/> + <event uuid="{f28eecf9-d046-4834-bb69-e3bc25e503f6}" name="logProcessUp" comment=""/> + <event uuid="{499a5786-e4f8-475e-ae84-6539ea7a790f}" name="logReady" comment=""/> + <event uuid="{58304182-762a-46f1-8ccd-941056f03528}" name="loggingDone" comment=""/> + <event uuid="{f8f49048-956a-4bb6-8d17-39158d889e94}" name="loggingOff" comment=""/> + <event uuid="{1c39cf0d-ad8c-49fa-9e6c-d3da0ec111f0}" name="loggingStopped" comment=""/> + <event uuid="{9e78fd85-8912-49fd-8a7d-d7f8b6b01d60}" name="quadCore" comment=""/> + <event uuid="{fba1014a-6955-4ee8-aa3b-15a3bfb20457}" name="reqConfig" comment=""/> + <event uuid="{77efcc96-1a48-45f3-92d9-544fbf497738}" name="reqIoPortsState" comment=""/> + <event uuid="{89ad4ffa-f08e-4a1b-89aa-958396a7a327}" name="reqLogState" comment=""/> + <event uuid="{a9a16f39-8510-4287-9064-cf6d20f86aaf}" name="servicesDone" comment=""/> + <event uuid="{22713de3-1d56-438b-9a36-adf21929afce}" name="singleCore" comment=""/> + <event uuid="{b5d2b683-1ceb-4fa1-b228-30198c380047}" name="startLogging" comment=""/> + </container-events> + <input-events> + <event-ref uuid="{77efcc96-1a48-45f3-92d9-544fbf497738}" name="reqIoPortsState"/> + <event-ref uuid="{89ad4ffa-f08e-4a1b-89aa-958396a7a327}" name="reqLogState"/> + <event-ref uuid="{22713de3-1d56-438b-9a36-adf21929afce}" name="singleCore"/> + <event-ref uuid="{9e78fd85-8912-49fd-8a7d-d7f8b6b01d60}" name="quadCore"/> + </input-events> + <output-events> + <event-ref uuid="{817ffcb1-4df1-48e9-89e0-aef55d547edc}" name="keyboardQuit"/> + <event-ref uuid="{048d120a-64a7-40f5-98c1-2ef055e625a0}" name="ioPortsAllocated"/> + <event-ref uuid="{a9a16f39-8510-4287-9064-cf6d20f86aaf}" name="servicesDone"/> + <event-ref uuid="{1c39cf0d-ad8c-49fa-9e6c-d3da0ec111f0}" name="loggingStopped"/> + <event-ref uuid="{499a5786-e4f8-475e-ae84-6539ea7a790f}" name="logReady"/> + <event-ref uuid="{f28eecf9-d046-4834-bb69-e3bc25e503f6}" name="logProcessUp"/> + <event-ref uuid="{c072dc5c-544d-4386-8517-8fbb82bc188f}" name="ioPortsError"/> + <event-ref uuid="{b6bea62d-a590-43d9-8b2e-90bbe9a4442e}" name="keyboardReady"/> + <event-ref uuid="{fba1014a-6955-4ee8-aa3b-15a3bfb20457}" name="reqConfig"/> + <event-ref uuid="{dc456221-3409-41e8-915b-50dd1b57d385}" name="buzzerOn"/> + <event-ref uuid="{f8f49048-956a-4bb6-8d17-39158d889e94}" name="loggingOff"/> + </output-events> + <global-events> + <event uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}" name="PULSEEVENT" type="pulseevent" comment=""/> + </global-events> + <regions> + <region uuid="{8fa9094a-02b4-40de-8e2a-83b13498ab09}" name="Region2" comment="" number="0"> + <states> + <initial-state uuid="{8d7ccd41-225d-4244-83be-8f7acf2a7468}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{9fbe14ca-4ff3-4fa0-8cb6-0ece88d96ffb}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <super-state uuid="{b9d008d7-0524-4ca2-a9e1-950102d73c3f}" cloned-from-uuid="{249db851-4c4e-4a1f-a24c-7da820d91be5}" name="debug" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="debug.esm" path-string=""> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + <flag uuid="{0889fcd0-cd07-46b1-9204-96a5cfec6f21}" name="quit" comment="" type="user_defined"/> + <flag uuid="{015fae8e-662c-4c8e-af30-1d15d020584a}" name="debug" comment="" type="user_defined"/> + </input-flags> + <system-flags> + <flag uuid="{238efdf6-42d7-482f-853b-36b713bee471}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{4510cacf-1258-477d-9c34-633c4e9583ab}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + </output-flags> + <input-events> + <event-ref uuid="{22713de3-1d56-438b-9a36-adf21929afce}" name="singleCore"/> + <event-ref uuid="{9e78fd85-8912-49fd-8a7d-d7f8b6b01d60}" name="quadCore"/> + </input-events> + <output-events> + <event-ref uuid="{4a15be5f-45da-470a-96f8-af283bc6a740}" name="debugOff"/> + <event-ref uuid="{fba1014a-6955-4ee8-aa3b-15a3bfb20457}" name="reqConfig"/> + </output-events> + </super-state> + <final-state uuid="{a361ef1d-b6a0-4c2e-abfe-60c28c761ce0}" name="[exit]" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> + </states> + <transitions> + <transition uuid="{7a725c5c-e99f-4114-9591-a6083a6b1a1b}" comment="" from-state-uuid="{8d7ccd41-225d-4244-83be-8f7acf2a7468}" to-state-uuid="{b9d008d7-0524-4ca2-a9e1-950102d73c3f}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <set-flag-action uuid="{7c1c936d-e200-4a50-8cf0-13b47752fa8c}" name="set flag debug" comment="" flag-uuid="{015fae8e-662c-4c8e-af30-1d15d020584a}" flag-value="1"/> + </actions> + </transition> + <transition uuid="{bd91044f-9d04-4d18-98c8-8c8b1395900e}" comment="" from-state-uuid="{b9d008d7-0524-4ca2-a9e1-950102d73c3f}" to-state-uuid="{a361ef1d-b6a0-4c2e-abfe-60c28c761ce0}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <send-event-action uuid="{dd8bf755-c879-4ebc-92e4-3dda83c99a96}" name="" comment="" event-uuid="{a9a16f39-8510-4287-9064-cf6d20f86aaf}"/> + </actions> +<guard operator="none" flag-uuid="{4510cacf-1258-477d-9c34-633c4e9583ab}"/> + </transition> + <transition uuid="{5a198266-e243-43bd-9bbb-ea0db600cd11}" comment="" from-state-uuid="{b9d008d7-0524-4ca2-a9e1-950102d73c3f}" to-state-uuid="{b9d008d7-0524-4ca2-a9e1-950102d73c3f}" event-uuid="{8c6397ba-11eb-4e63-a143-8e049f486f1e}"> + <actions> + <set-flag-action uuid="{d72bd7ae-9c9b-4cbe-89d7-2c160a9d4c50}" name="set flag quit" comment="" flag-uuid="{0889fcd0-cd07-46b1-9204-96a5cfec6f21}" flag-value="0"/> + </actions> +<guard operator="negation" flag-uuid="{4510cacf-1258-477d-9c34-633c4e9583ab}"/> + </transition> + </transitions> + </region> + <region uuid="{6b834690-8584-4821-b8e3-1130db688f5f}" name="Region4" comment="" number="1"> + <states> + <super-state uuid="{73decd3a-3ad9-436c-a3a0-c284d1a8f4a0}" cloned-from-uuid="{7b45d0e7-6cdb-4ac7-af7b-efb3be50df09}" name="input" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="input.esm" path-string=""> + <input-ports> + </input-ports> + <output-ports> + <port uuid="{3549b93f-a15d-46c8-9202-5a868f0a209f}" name="keyboard" comment="" data-storage-uuid="{10b59921-fcd0-49d4-abb1-bb9e3c85a502}" optional="0" allocation="1" release="0" read="0" write="1"/> + <port uuid="{718a4cfa-2453-43f3-85e3-65a969364f49}" name="keyboardNRT" comment="" data-storage-uuid="{b63f0e71-5fbc-4fbf-96c2-d0a4ecfda891}" optional="0" allocation="1" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + <flag uuid="{edfa06f8-ebb3-4cf8-90a0-c9ccb5720259}" name="quit" comment="" type="user_defined"/> + <flag uuid="{0d7281ba-b953-4069-a733-1859b3ed97c6}" name="keyboard" comment="" type="user_defined"/> + <flag uuid="{df8cefc0-e4b6-426e-8a24-b7cf033aaac8}" name="timeout" comment="" type="user_defined"/> + <flag uuid="{876f6791-d421-4e3e-825d-5f7fdf3c4a35}" name="quitChar" comment="" type="user_defined"/> + </input-flags> + <system-flags> + <flag uuid="{295df9a0-04f3-456b-b489-df5c8b5147be}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{332c96e5-5a76-4a93-afa3-82286d27ae24}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + </output-flags> + <input-events> + </input-events> + <output-events> + <event-ref uuid="{817ffcb1-4df1-48e9-89e0-aef55d547edc}" name="keyboardQuit"/> + <event-ref uuid="{b6bea62d-a590-43d9-8b2e-90bbe9a4442e}" name="keyboardReady"/> + </output-events> + </super-state> + <initial-state uuid="{efe30a19-96cf-4945-b167-c145165b22f7}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{e7739031-c109-4355-b041-f4b69c05c0d2}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <basic-state uuid="{b66039db-e965-4f98-b7ef-0bdb619df26d}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{e2bac571-3afd-4c4f-b7d0-8147f0abee69}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + </states> + <transitions> + <transition uuid="{39b8ea71-8532-427d-b70a-c66fcc0352c8}" comment="" from-state-uuid="{efe30a19-96cf-4945-b167-c145165b22f7}" to-state-uuid="{73decd3a-3ad9-436c-a3a0-c284d1a8f4a0}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <set-flag-action uuid="{4799cb51-bbe4-4aed-ad71-ba231e2784ad}" name="set flag keyboard" comment="" flag-uuid="{0d7281ba-b953-4069-a733-1859b3ed97c6}" flag-value="0"/> + </actions> +<guard operator="negation" flag-uuid="{e1a3d2d3-d561-4dae-95cc-ee5e0e47e66a}"/> + </transition> + <transition uuid="{0e4c04b6-fdc5-4131-a2be-827a7ff95bd6}" comment="" from-state-uuid="{73decd3a-3ad9-436c-a3a0-c284d1a8f4a0}" to-state-uuid="{73decd3a-3ad9-436c-a3a0-c284d1a8f4a0}" event-uuid="{f15465bd-b5e6-4e50-9d2e-11a4e6498c16}"> + <actions> + <set-flag-action uuid="{b39a7d7f-a5e2-46cc-aea8-1c9aefb367df}" name="set flag quit" comment="" flag-uuid="{edfa06f8-ebb3-4cf8-90a0-c9ccb5720259}" flag-value="0"/> + </actions> +<guard operator="negation" flag-uuid="{332c96e5-5a76-4a93-afa3-82286d27ae24}"/> + </transition> + <transition uuid="{cbfa17dd-e315-435a-a0f9-a4fcaf18ca0a}" comment="" from-state-uuid="{73decd3a-3ad9-436c-a3a0-c284d1a8f4a0}" to-state-uuid="{b66039db-e965-4f98-b7ef-0bdb619df26d}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <send-event-action uuid="{f9b1b4e3-f803-48e2-8aff-1a3a56a95f65}" name="" comment="" event-uuid="{8c6397ba-11eb-4e63-a143-8e049f486f1e}"/> + </actions> +<guard operator="none" flag-uuid="{332c96e5-5a76-4a93-afa3-82286d27ae24}"/> + </transition> + <transition uuid="{bec367d2-6e14-4b3d-9500-b05f93c30102}" comment="" from-state-uuid="{efe30a19-96cf-4945-b167-c145165b22f7}" to-state-uuid="{73decd3a-3ad9-436c-a3a0-c284d1a8f4a0}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <set-flag-action uuid="{db3926f2-fd14-40c0-8de7-044c40a0b703}" name="" comment="" flag-uuid="{0d7281ba-b953-4069-a733-1859b3ed97c6}" flag-value="0"/> + <set-flag-action uuid="{006ba564-9208-43dc-a789-b1bbf9b90634}" name="" comment="" flag-uuid="{876f6791-d421-4e3e-825d-5f7fdf3c4a35}" flag-value="0"/> + </actions> +<guard operator="none" flag-uuid="{e1a3d2d3-d561-4dae-95cc-ee5e0e47e66a}"/> + </transition> + </transitions> + </region> + <region uuid="{f3e80067-71b0-4969-9206-1893588a6767}" name="Region6" comment="" number="2"> + <states> + <super-state uuid="{5be8ef3f-c95c-4697-b434-c8aeda71d6de}" cloned-from-uuid="{ba101749-1b2c-472d-95dc-d3e594510684}" name="ioPorts" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="ioPorts.esm" path-string=""> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + <flag uuid="{3f911961-fdb4-4d85-be72-1fe52cff65fd}" name="quit" comment="" type="user_defined"/> + </input-flags> + <system-flags> + <flag uuid="{5932a763-de0f-4349-8da6-efec500eefbc}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{7289bfe7-d56e-4b77-82da-d2ab6b3938fd}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + </output-flags> + <input-events> + <event-ref uuid="{77efcc96-1a48-45f3-92d9-544fbf497738}" name="reqIoPortsState"/> + </input-events> + <output-events> + <event-ref uuid="{048d120a-64a7-40f5-98c1-2ef055e625a0}" name="ioPortsAllocated"/> + <event-ref uuid="{c072dc5c-544d-4386-8517-8fbb82bc188f}" name="ioPortsError"/> + </output-events> + </super-state> + <initial-state uuid="{054aee7b-ff60-4dc9-9d53-da5d21f5daea}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{46b5f361-3e2a-43e2-abd8-f721c4815031}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <basic-state uuid="{ba08529a-93e0-40bf-b0b3-a393eb53004e}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{d59ce4ee-b8c0-48fc-be92-e8c7b7ab6699}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + </states> + <transitions> + <transition uuid="{ac7a59f8-8ce3-4bf1-846e-23009a4df2ee}" comment="" from-state-uuid="{054aee7b-ff60-4dc9-9d53-da5d21f5daea}" to-state-uuid="{5be8ef3f-c95c-4697-b434-c8aeda71d6de}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + </actions> + </transition> + <transition uuid="{418eac80-ef97-4edf-8c2a-e77cf10327c2}" comment="" from-state-uuid="{5be8ef3f-c95c-4697-b434-c8aeda71d6de}" to-state-uuid="{5be8ef3f-c95c-4697-b434-c8aeda71d6de}" event-uuid="{58304182-762a-46f1-8ccd-941056f03528}"> + <actions> + <set-flag-action uuid="{b86bf487-9448-470d-bfef-6bff63477de8}" name="set flag quit" comment="" flag-uuid="{3f911961-fdb4-4d85-be72-1fe52cff65fd}" flag-value="0"/> + </actions> +<guard operator="negation" flag-uuid="{7289bfe7-d56e-4b77-82da-d2ab6b3938fd}"/> + </transition> + <transition uuid="{8bc8c1e5-7b0d-46a0-9d1e-888b6ba40fb5}" comment="" from-state-uuid="{5be8ef3f-c95c-4697-b434-c8aeda71d6de}" to-state-uuid="{ba08529a-93e0-40bf-b0b3-a393eb53004e}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <send-event-action uuid="{bf2f5ca7-8ae6-4db1-99d1-9dfcf0625630}" name="" comment="" event-uuid="{f15465bd-b5e6-4e50-9d2e-11a4e6498c16}"/> + </actions> +<guard operator="none" flag-uuid="{7289bfe7-d56e-4b77-82da-d2ab6b3938fd}"/> + </transition> + </transitions> + </region> + <region uuid="{dcec6a8e-d6bd-4e40-92f9-0fe4295f9151}" name="Region6" comment="" number="3"> + <states> + <initial-state uuid="{3e0c381a-e817-4a82-aabf-f8e352c88292}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{8f6ff648-c168-4f0a-a873-44c4b14bd2a2}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <super-state uuid="{a362def6-539f-4967-a555-335cd926939e}" cloned-from-uuid="{df0bab65-ca22-4561-b550-992ffd92c953}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="logging.esm" path-string=""> + <input-ports> + <port uuid="{88a5f8c7-9b64-4f98-9786-829f741bd3e9}" name="smiTelemIn" comment="" data-storage-uuid="{02bcc531-21c3-4dc9-8e3c-693d42ed8a93}" optional="1" allocation="0" release="0" read="1" write="0"/> + </input-ports> + <output-ports> + <port uuid="{7eea5c09-8c2d-44f0-b596-211dd040e0d4}" name="log" comment="" data-storage-uuid="{b6142470-5ad5-4bde-98cd-f59242c40e7f}" optional="1" allocation="1" release="0" read="0" write="1"/> + <port uuid="{cd6a3790-e360-402a-9b39-a18834aad0ef}" name="smiTelem" comment="" data-storage-uuid="{02bcc531-21c3-4dc9-8e3c-693d42ed8a93}" optional="1" allocation="0" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + <flag uuid="{4797dcf7-07c9-476b-8997-f194ed571f70}" name="quit" comment="" type="user_defined"/> + <flag uuid="{27e10140-3dbc-4ff1-8f4c-8c457d922736}" name="log" comment="" type="user_defined"/> + <flag uuid="{a0bd7f64-3e35-495c-a7ce-2bf107a602ac}" name="readSmiTelem" comment="" type="user_defined"/> + </input-flags> + <system-flags> + <flag uuid="{0a83e84d-607f-4e55-a924-e0aee816a1b0}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{38014b7d-6e86-4566-a1e7-5773907988b5}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + <flag uuid="{8cd8cda2-4c71-4498-9ebd-e02b2e698a2a}" name="log" comment="" type="user_defined"/> + </output-flags> + <input-events> + <event-ref uuid="{89ad4ffa-f08e-4a1b-89aa-958396a7a327}" name="reqLogState"/> + <event-ref uuid="{22713de3-1d56-438b-9a36-adf21929afce}" name="singleCore"/> + <event-ref uuid="{9e78fd85-8912-49fd-8a7d-d7f8b6b01d60}" name="quadCore"/> + </input-events> + <output-events> + <event-ref uuid="{499a5786-e4f8-475e-ae84-6539ea7a790f}" name="logReady"/> + <event-ref uuid="{f28eecf9-d046-4834-bb69-e3bc25e503f6}" name="logProcessUp"/> + <event-ref uuid="{817ffcb1-4df1-48e9-89e0-aef55d547edc}" name="keyboardQuit"/> + <event-ref uuid="{fba1014a-6955-4ee8-aa3b-15a3bfb20457}" name="reqConfig"/> + </output-events> + </super-state> + <task-state uuid="{374b6342-759d-43f9-bceb-d708f3f95ef7}" name="getSmiTelemVar" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="getSmiTelemVar" task-slot-name="init" process-name="" real-time="1"> + <input-ports> + </input-ports> + <output-ports> + <port uuid="{0bd0313a-3330-4caa-9314-1dfd64c555a4}" name="smiTelem" comment="" data-storage-uuid="{02bcc531-21c3-4dc9-8e3c-693d42ed8a93}" optional="0" allocation="1" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + </output-flags> + <system-flags> + <flag uuid="{b89fb395-8df0-41ac-94fe-7155c85cdb5f}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{2180f90a-b368-48d4-a625-e7ed1b8d1546}" name="Exit" comment="" type="exit"/> + <flag uuid="{9cb43892-1cef-4cb0-a7b2-ea3b4a688847}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + <basic-state uuid="{7cf112e1-6ae9-4175-bf9b-313a12c66d35}" name="wait" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{8b7f60c1-40fe-44b3-8281-1e6130a9dd9c}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + <basic-state uuid="{6a4316c7-622c-4501-a247-fe9e79b831b2}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{6b2cd079-e21b-4397-b17d-360a2cd886a1}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + </states> + <transitions> + <transition uuid="{6a83df09-605e-4ef1-998f-441098478698}" comment="" from-state-uuid="{374b6342-759d-43f9-bceb-d708f3f95ef7}" to-state-uuid="{a362def6-539f-4967-a555-335cd926939e}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <set-flag-action uuid="{73a030be-5ffa-4998-8403-ee1dbe9b3482}" name="" comment="" flag-uuid="{27e10140-3dbc-4ff1-8f4c-8c457d922736}" flag-value="0"/> + </actions> +<guard operator="and" flag-uuid=""> +<guard operator="none" flag-uuid="{2180f90a-b368-48d4-a625-e7ed1b8d1546}"/> +<guard operator="none" flag-uuid="{47e9d909-8ca7-4de8-9426-53e62d57a6d0}"/> +</guard> + </transition> + <transition uuid="{0cf350ae-cb1a-431b-bd49-d8ad72c88104}" comment="" from-state-uuid="{a362def6-539f-4967-a555-335cd926939e}" to-state-uuid="{7cf112e1-6ae9-4175-bf9b-313a12c66d35}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <send-event-action uuid="{729ede5a-d545-4885-94d9-cd57bf9626da}" name="" comment="" event-uuid="{1c39cf0d-ad8c-49fa-9e6c-d3da0ec111f0}"/> + </actions> +<guard operator="none" flag-uuid="{38014b7d-6e86-4566-a1e7-5773907988b5}"/> + </transition> + <transition uuid="{ed85d7f2-7784-47c6-9e68-0bf5f650ac03}" comment="" from-state-uuid="{a362def6-539f-4967-a555-335cd926939e}" to-state-uuid="{a362def6-539f-4967-a555-335cd926939e}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <set-flag-action uuid="{80e920eb-127a-45b9-8e1e-5486e76a0ff3}" name="" comment="" flag-uuid="{4797dcf7-07c9-476b-8997-f194ed571f70}" flag-value="0"/> + </actions> +<guard operator="and" flag-uuid=""> +<guard operator="negation" flag-uuid="{38014b7d-6e86-4566-a1e7-5773907988b5}"/> +<guard operator="none" flag-uuid="{c7fff639-a8d2-4ef1-85cf-a5aa907cf5e4}"/> +</guard> + </transition> + <transition uuid="{3eb2a884-1a84-45ec-af51-3d172c845edc}" comment="" from-state-uuid="{3e0c381a-e817-4a82-aabf-f8e352c88292}" to-state-uuid="{374b6342-759d-43f9-bceb-d708f3f95ef7}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + </actions> + </transition> + <transition uuid="{352e9ddc-2c48-4342-adde-c0fc8bea7b73}" comment="" from-state-uuid="{a362def6-539f-4967-a555-335cd926939e}" to-state-uuid="{a362def6-539f-4967-a555-335cd926939e}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <set-flag-action uuid="{245361f5-b25d-4552-a4dd-85a51fb14086}" name="" comment="" flag-uuid="{4797dcf7-07c9-476b-8997-f194ed571f70}" flag-value="0"/> + </actions> +<guard operator="and" flag-uuid=""> +<guard operator="negation" flag-uuid="{38014b7d-6e86-4566-a1e7-5773907988b5}"/> +<guard operator="none" flag-uuid="{36e4e885-367c-4565-8050-04f4504f3c66}"/> +</guard> + </transition> + <transition uuid="{8fef5e95-184d-4555-b33d-aab712bf65a7}" comment="" from-state-uuid="{7cf112e1-6ae9-4175-bf9b-313a12c66d35}" to-state-uuid="{6a4316c7-622c-4501-a247-fe9e79b831b2}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + <send-event-action uuid="{24d22213-3776-41c7-a789-a78fa51aa129}" name="" comment="" event-uuid="{58304182-762a-46f1-8ccd-941056f03528}"/> + </actions> +<guard operator="none" flag-uuid="{c7fff639-a8d2-4ef1-85cf-a5aa907cf5e4}"/> + </transition> + <transition uuid="{4034cad8-72cf-43b0-ae27-399f060cb496}" comment="" from-state-uuid="{374b6342-759d-43f9-bceb-d708f3f95ef7}" to-state-uuid="{a362def6-539f-4967-a555-335cd926939e}" event-uuid="{b1e0e6da-0f53-49cd-b1d0-7aa2c83f44d9}"> + <actions> + </actions> +<guard operator="and" flag-uuid=""> +<guard operator="none" flag-uuid="{2180f90a-b368-48d4-a625-e7ed1b8d1546}"/> +<guard operator="negation" flag-uuid="{47e9d909-8ca7-4de8-9426-53e62d57a6d0}"/> +</guard> + </transition> + </transitions> + </region> + </regions> + <diagrams> + <diagram uuid="{8f454b8d-f021-4af2-82f6-157edf4c74a0}" name="" comment=""> + <box-item uuid="{862a2ec8-e7f8-400e-a4f3-a18ad332a1b5}" comment="" model-uuid="{8fa9094a-02b4-40de-8e2a-83b13498ab09}" x="2190" y="2400" width="240" height="240" type="standard_box"/> + <box-item uuid="{86c7d287-eb0a-4f63-a23f-3594424dd09a}" comment="" model-uuid="{8d7ccd41-225d-4244-83be-8f7acf2a7468}" x="-76" y="-88" width="10" height="10" type="standard_box"/> + <box-item uuid="{95c8bd56-f208-4173-a2e0-f112117b09c6}" comment="" model-uuid="{b9d008d7-0524-4ca2-a9e1-950102d73c3f}" x="-30" y="-11" width="100" height="50" type="standard_box"/> + <box-item uuid="{ba942a5f-9425-47db-bbb7-55b275c20ee5}" comment="" model-uuid="{a361ef1d-b6a0-4c2e-abfe-60c28c761ce0}" x="100" y="104" width="20" height="20" type="standard_box"/> + <box-item uuid="{a04b5090-3033-4f7b-a8e9-7661c5d78cec}" comment="" model-uuid="{6b834690-8584-4821-b8e3-1130db688f5f}" x="2580" y="2400" width="420" height="240" type="standard_box"/> + <box-item uuid="{c608537f-a3ab-462e-842a-89633408cacc}" comment="" model-uuid="{73decd3a-3ad9-436c-a3a0-c284d1a8f4a0}" x="-45" y="-22" width="100" height="50" type="standard_box"/> + <box-item uuid="{106041c0-4cec-49ab-aa49-6af467800140}" comment="" model-uuid="{3549b93f-a15d-46c8-9202-5a868f0a209f}" x="50" y="-3" width="20" height="20" type="standard_box"/> + <box-item uuid="{76c383f7-d851-40b0-9611-153a6a06c917}" comment="" model-uuid="{efe30a19-96cf-4945-b167-c145165b22f7}" x="-110" y="-95" width="10" height="10" type="standard_box"/> + <box-item uuid="{7e448f93-448b-4563-933e-1afd26aba79e}" comment="" model-uuid="{b66039db-e965-4f98-b7ef-0bdb619df26d}" x="75" y="82" width="46" height="32" type="standard_box"/> + <box-item uuid="{b56fe1ee-b1d5-47b0-9f38-caaa3621ef0c}" comment="" model-uuid="{f3e80067-71b0-4969-9206-1893588a6767}" x="2220" y="2670" width="300" height="240" type="standard_box"/> + <box-item uuid="{3b2534e7-f9c4-4ca5-801d-7ffc3eaa8af2}" comment="" model-uuid="{5be8ef3f-c95c-4697-b434-c8aeda71d6de}" x="-22" y="-26" width="100" height="50" type="standard_box"/> + <box-item uuid="{1dfb66a9-85df-47ea-b749-3036ffce1e2a}" comment="" model-uuid="{054aee7b-ff60-4dc9-9d53-da5d21f5daea}" x="-92" y="-100" width="10" height="10" type="standard_box"/> + <box-item uuid="{c12c4d7c-1331-4caf-a35b-998dbc1968f1}" comment="" model-uuid="{ba08529a-93e0-40bf-b0b3-a393eb53004e}" x="85" y="84.5" width="58" height="31" type="standard_box"/> + <box-item uuid="{156f16bd-d200-4a9c-a087-9e20118bba02}" comment="" model-uuid="{dcec6a8e-d6bd-4e40-92f9-0fe4295f9151}" x="2820" y="2760" width="840" height="420" type="standard_box"/> + <box-item uuid="{b0871034-4640-4bb7-ac0c-bf22db3e2bb6}" comment="" model-uuid="{3e0c381a-e817-4a82-aabf-f8e352c88292}" x="-361" y="-177" width="10" height="10" type="standard_box"/> + <box-item uuid="{bf1ad44e-b6ed-4ac7-b068-b5248aaea4ca}" comment="" model-uuid="{718a4cfa-2453-43f3-85e3-65a969364f49}" x="50" y="-16" width="10" height="10" type="standard_box"/> + <box-item uuid="{59895bc7-0461-4e7f-951e-6a3c67ae3ae8}" comment="" model-uuid="{a362def6-539f-4967-a555-335cd926939e}" x="85" y="34" width="100" height="50" type="standard_box"/> + <box-item uuid="{cfd73c41-8a78-4c50-8e07-25aac7c23655}" comment="" model-uuid="{7eea5c09-8c2d-44f0-b596-211dd040e0d4}" x="-50" y="11" width="10" height="10" type="standard_box"/> + <box-item uuid="{1b1b5514-0e66-460d-b924-2419a1ec1881}" comment="" model-uuid="{cd6a3790-e360-402a-9b39-a18834aad0ef}" x="-50" y="-10" width="10" height="10" type="standard_box"/> + <box-item uuid="{18ba7c77-dcb0-497a-901f-f66b00b34104}" comment="" model-uuid="{374b6342-759d-43f9-bceb-d708f3f95ef7}" x="106.5" y="-98" width="137" height="50" type="standard_box"/> + <box-item uuid="{d1191d78-3316-4ef1-a38a-e5d68ab8f2cf}" comment="" model-uuid="{0bd0313a-3330-4caa-9314-1dfd64c555a4}" x="-68.5" y="4" width="10" height="10" type="standard_box"/> + <box-item uuid="{b4012373-91dc-431d-b2a5-4ac15f3aa728}" comment="" model-uuid="{7cf112e1-6ae9-4175-bf9b-313a12c66d35}" x="-13.5" y="124.5" width="63" height="37" type="standard_box"/> + <box-item uuid="{a50d4ed8-817a-4897-91d1-11bab2a71899}" comment="" model-uuid="{88a5f8c7-9b64-4f98-9786-829f741bd3e9}" x="-50" y="-16" width="10" height="10" type="standard_box"/> + <box-item uuid="{4b0896fb-3ffb-465a-b8bf-71d2d03e61cc}" comment="" model-uuid="{6a4316c7-622c-4501-a247-fe9e79b831b2}" x="-211.5" y="121.5" width="55" height="33" type="standard_box"/> + <data-storage-item uuid="{88be053d-4fa5-402c-b6fa-55e2d10fe32e}" description="" comment="" model-uuid="{10b59921-fcd0-49d4-abb1-bb9e3c85a502}" region-uuid="{6b834690-8584-4821-b8e3-1130db688f5f}" x="88" y="-24" width="68" height="30"/> + <data-storage-item uuid="{e4e50354-6875-449b-9eb5-76c685309a90}" description="" comment="" model-uuid="{b6142470-5ad5-4bde-98cd-f59242c40e7f}" region-uuid="{dcec6a8e-d6bd-4e40-92f9-0fe4295f9151}" x="-140" y="-16" width="32" height="30"/> + <data-storage-item uuid="{50f3db3e-a2c8-417e-a231-f220942270c1}" description="" comment="" model-uuid="{02bcc531-21c3-4dc9-8e3c-693d42ed8a93}" region-uuid="{dcec6a8e-d6bd-4e40-92f9-0fe4295f9151}" x="-92" y="-62" width="72" height="30"/> + <data-storage-item uuid="{f33b2594-5b56-4c66-89b5-94490c5a5c27}" description="" comment="" model-uuid="{b63f0e71-5fbc-4fbf-96c2-d0a4ecfda891}" region-uuid="{6b834690-8584-4821-b8e3-1130db688f5f}" x="139" y="-83.5" width="98" height="31"/> + <transition-item uuid="{24ea4b33-ecfe-4484-be6c-d732fc56efee}" comment="" model-uuid="{7a725c5c-e99f-4114-9591-a6083a6b1a1b}" start-anchor-pos-x="4" start-anchor-pos-y="0" end-anchor-pos-x="-2" end-anchor-pos-y="-25"> + <control-point x="-41" y="-65"/> + </transition-item> + <transition-item uuid="{2f2687bb-3ba5-4c2d-a31d-08ce877f4458}" comment="" model-uuid="{bd91044f-9d04-4d18-98c8-8c8b1395900e}" start-anchor-pos-x="21" start-anchor-pos-y="24" end-anchor-pos-x="-10" end-anchor-pos-y="-1"> + <control-point x="-3" y="73"/> + </transition-item> + <transition-item uuid="{e3dfa769-ebc1-4722-92ca-9cb8f42baefa}" comment="" model-uuid="{5a198266-e243-43bd-9bbb-ea0db600cd11}" start-anchor-pos-x="-39" start-anchor-pos-y="24" end-anchor-pos-x="0" end-anchor-pos-y="24"> + <control-point x="-56" y="43"/> + </transition-item> + <transition-item uuid="{1ff40466-0665-405d-b48e-e55837fd7b2e}" comment="" model-uuid="{39b8ea71-8532-427d-b70a-c66fcc0352c8}" start-anchor-pos-x="4" start-anchor-pos-y="1" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> + <control-point x="-73" y="-82"/> + </transition-item> + <transition-item uuid="{b9fe99e1-d48e-46cb-8eaf-ab12ae709db5}" comment="" model-uuid="{0e4c04b6-fdc5-4131-a2be-827a7ff95bd6}" start-anchor-pos-x="-40" start-anchor-pos-y="24" end-anchor-pos-x="3" end-anchor-pos-y="24"> + <control-point x="-63" y="32"/> + </transition-item> + <transition-item uuid="{d21c9c6f-9df1-4db7-bf72-4521f94f99a8}" comment="" model-uuid="{cbfa17dd-e315-435a-a0f9-a4fcaf18ca0a}" start-anchor-pos-x="22" start-anchor-pos-y="24" end-anchor-pos-x="-23" end-anchor-pos-y="3"> + <control-point x="-6" y="56"/> + </transition-item> + <connection-item uuid="{f32cecd0-5d2b-49df-8347-ceb62542755f}" comment="" region-uuid="{6b834690-8584-4821-b8e3-1130db688f5f}" item0-uuid="{88be053d-4fa5-402c-b6fa-55e2d10fe32e}" item1-uuid="{106041c0-4cec-49ab-aa49-6af467800140}" start-anchor-pos-x="-34" start-anchor-pos-y="-1" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="28" y="-25"/> + </connection-item> + <transition-item uuid="{20466a44-0ca4-46d8-afcb-84010567646a}" comment="" model-uuid="{ac7a59f8-8ce3-4bf1-846e-23009a4df2ee}" start-anchor-pos-x="4" start-anchor-pos-y="-1" end-anchor-pos-x="1" end-anchor-pos-y="-25"> + <control-point x="-23" y="-77"/> + </transition-item> + <transition-item uuid="{46ef183c-f1d9-4789-8a4c-3fc788f720bc}" comment="" model-uuid="{418eac80-ef97-4edf-8c2a-e77cf10327c2}" start-anchor-pos-x="-42" start-anchor-pos-y="24" end-anchor-pos-x="1" end-anchor-pos-y="24"> + <control-point x="-37" y="31"/> + </transition-item> + <transition-item uuid="{6ca06f18-b0d5-4bca-94c8-01af10d2be00}" comment="" model-uuid="{8bc8c1e5-7b0d-46a0-9d1e-888b6ba40fb5}" start-anchor-pos-x="24" start-anchor-pos-y="24" end-anchor-pos-x="-29" end-anchor-pos-y="3"> + <control-point x="19" y="53"/> + </transition-item> + <connection-item uuid="{951112f0-6e64-423a-bcec-6c7647e3d08d}" comment="" region-uuid="{6b834690-8584-4821-b8e3-1130db688f5f}" item0-uuid="{f33b2594-5b56-4c66-89b5-94490c5a5c27}" item1-uuid="{bf1ad44e-b6ed-4ac7-b068-b5248aaea4ca}" start-anchor-pos-x="-2" start-anchor-pos-y="15.5" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="61" y="-53"/> + </connection-item> + <transition-item uuid="{132349b4-b016-4d2f-9d40-15f799b6943c}" comment="" model-uuid="{6a83df09-605e-4ef1-998f-441098478698}" start-anchor-pos-x="-25" start-anchor-pos-y="25" end-anchor-pos-x="-27" end-anchor-pos-y="-25"> + <control-point x="37.5" y="-44.5"/> + </transition-item> + <transition-item uuid="{3c46412f-66e1-4018-9b3f-c46388caaab9}" comment="" model-uuid="{0cf350ae-cb1a-431b-bd49-d8ad72c88104}" start-anchor-pos-x="0" start-anchor-pos-y="25" end-anchor-pos-x="31.5" end-anchor-pos-y="1.5"> + <control-point x="69.5" y="108.5"/> + </transition-item> + <connection-item uuid="{3b6f0988-a6a1-4e57-ac92-0617413ea3ad}" comment="" region-uuid="{dcec6a8e-d6bd-4e40-92f9-0fe4295f9151}" item0-uuid="{e4e50354-6875-449b-9eb5-76c685309a90}" item1-uuid="{cfd73c41-8a78-4c50-8e07-25aac7c23655}" start-anchor-pos-x="16" start-anchor-pos-y="4" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="-38.5" y="-4"/> + </connection-item> + <transition-item uuid="{57746433-432c-4554-9d14-0c027785837b}" comment="" model-uuid="{ed85d7f2-7784-47c6-9e68-0bf5f650ac03}" start-anchor-pos-x="50" start-anchor-pos-y="-14" end-anchor-pos-x="50" end-anchor-pos-y="10"> + <control-point x="173.5" y="25"/> + </transition-item> + <connection-item uuid="{483fd1ee-aae4-491f-a74b-9ffec6ceccc3}" comment="" region-uuid="{dcec6a8e-d6bd-4e40-92f9-0fe4295f9151}" item0-uuid="{50f3db3e-a2c8-417e-a231-f220942270c1}" item1-uuid="{d1191d78-3316-4ef1-a38a-e5d68ab8f2cf}" start-anchor-pos-x="36" start-anchor-pos-y="-5" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="-20" y="-83.5"/> + </connection-item> + <transition-item uuid="{815e0fdd-70b8-4459-9140-f6a043569d9e}" comment="" model-uuid="{3eb2a884-1a84-45ec-af51-3d172c845edc}" start-anchor-pos-x="-5" start-anchor-pos-y="0" end-anchor-pos-x="-6" end-anchor-pos-y="-25"> + <control-point x="9" y="-177"/> + </transition-item> + <transition-item uuid="{6b7ce502-26d7-4da9-a3f3-59bd06d10d47}" comment="" model-uuid="{352e9ddc-2c48-4342-adde-c0fc8bea7b73}" start-anchor-pos-x="39" start-anchor-pos-y="25" end-anchor-pos-x="17" end-anchor-pos-y="25"> + <control-point x="157" y="85.5"/> + </transition-item> + <transition-item uuid="{52ebcf73-3e20-4ca8-ba8d-e4b6d4dacbc4}" comment="" model-uuid="{8fef5e95-184d-4555-b33d-aab712bf65a7}" start-anchor-pos-x="-31.5" start-anchor-pos-y="3.5" end-anchor-pos-x="27.5" end-anchor-pos-y="3.5"> + <control-point x="-117" y="171.5"/> + </transition-item> + <transition-item uuid="{635fea13-18f1-4bc2-a9cf-ad4e090d7eaf}" comment="" model-uuid="{4034cad8-72cf-43b0-ae27-399f060cb496}" start-anchor-pos-x="17" start-anchor-pos-y="25" end-anchor-pos-x="34" end-anchor-pos-y="-25"> + <control-point x="189.5" y="-45.5"/> + </transition-item> + <connection-item uuid="{eb34e32d-2568-4d16-8cba-92dad52ce436}" comment="" region-uuid="{dcec6a8e-d6bd-4e40-92f9-0fe4295f9151}" item0-uuid="{50f3db3e-a2c8-417e-a231-f220942270c1}" item1-uuid="{1b1b5514-0e66-460d-b924-2419a1ec1881}" start-anchor-pos-x="36" start-anchor-pos-y="3" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="-15" y="-14"/> + </connection-item> + <connection-item uuid="{df3e067d-683d-4761-b060-9110f4f298d9}" comment="" region-uuid="{dcec6a8e-d6bd-4e40-92f9-0fe4295f9151}" item0-uuid="{50f3db3e-a2c8-417e-a231-f220942270c1}" item1-uuid="{a50d4ed8-817a-4897-91d1-11bab2a71899}" start-anchor-pos-x="36" start-anchor-pos-y="-3" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="-6" y="-26"/> + </connection-item> + <comment-item uuid="{d6db6bcb-40b2-4bd3-8481-17df1ec758d0}" region-uuid="{6b834690-8584-4821-b8e3-1130db688f5f}" comment="flags: keyboard timeout quitChar" x="-150" y="-30" width="100" height="104"/> + <transition-item uuid="{85d0b183-7d6a-43f0-aa43-b5f7e158dc40}" comment="" model-uuid="{bec367d2-6e14-4b3d-9500-b05f93c30102}" start-anchor-pos-x="0" start-anchor-pos-y="-5" end-anchor-pos-x="12" end-anchor-pos-y="-25"> + <control-point x="-51.5" y="-97.5"/> + </transition-item> + <comment-item uuid="{086ffad5-6683-4b5c-bdb3-2855c2abfe9e}" region-uuid="{dcec6a8e-d6bd-4e40-92f9-0fe4295f9151}" comment="some CPU boards need rtSuspend for rmmod when done" x="-289.833" y="176" width="236.333" height="50"/> + </diagram> + </diagrams> +</esmcontainer> diff --git a/examples/common/esmlib/smi.esm b/examples/common/esmlib/smi.esm index 300060de07547f30d05b2b63c9544e1ce714c376..65fbe9bb903ccc8971276bea127c0005b9741991 100644 --- a/examples/common/esmlib/smi.esm +++ b/examples/common/esmlib/smi.esm @@ -133,7 +133,7 @@ <flag uuid="{7e099d12-ae95-4620-9b70-530e87d57d68}" name="Timeout" comment="" type="timeout"/> </system-flags> </initial-state> - <task-state uuid="{318d403d-5c20-4141-a762-41e2d206fca8}" name="rtSuspend" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="0" task-function="rtSuspend" task-slot-name="suspendSlot" process-name="" real-time="1"> + <task-state uuid="{318d403d-5c20-4141-a762-41e2d206fca8}" name="rtSuspend" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="0" task-function="rtSuspend" task-slot-name="suspend" process-name="" real-time="1"> <input-ports> </input-ports> <output-ports> @@ -148,7 +148,7 @@ <flag uuid="{b8a7279e-60d1-4943-be2f-5e69d9130361}" name="Busy" comment="" type="busy"/> </system-flags> </task-state> - <task-state uuid="{9f889d34-5b5b-4b3d-8c1d-03274f2be936}" name="waitSmiReady" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="rtSuspend" task-slot-name="suspendSlot" process-name="" real-time="1"> + <task-state uuid="{9f889d34-5b5b-4b3d-8c1d-03274f2be936}" name="waitSmiReady" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="rtSuspend" task-slot-name="suspend" process-name="" real-time="1"> <input-ports> </input-ports> <output-ports> @@ -210,7 +210,7 @@ <flag uuid="{d5a279af-08f0-461f-a2d3-0e7bcd912dd5}" name="Timeout" comment="" type="timeout"/> </system-flags> </basic-state> - <task-state uuid="{294ea539-313c-41df-b04c-11353c495512}" name="shutdown" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="shutdown" task-slot-name="" process-name="system" real-time="0"> + <task-state uuid="{294ea539-313c-41df-b04c-11353c495512}" name="shutdown" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="printBuffers" task-slot-name="" process-name="system" real-time="0"> <input-ports> </input-ports> <output-ports> @@ -352,6 +352,7 @@ <transition-item uuid="{84700d83-a7ac-451f-b2cb-0edee12ffe99}" comment="" model-uuid="{1f0070f6-29b3-4555-9f61-cc3a222cf276}" start-anchor-pos-x="50" start-anchor-pos-y="2" end-anchor-pos-x="0" end-anchor-pos-y="-25"> <control-point x="58.5" y="-56"/> </transition-item> + <comment-item uuid="{eeec53c2-765e-4660-9168-e097a442f06e}" region-uuid="{3648672c-ba96-4f04-a507-fa367aff87cb}" comment="shutdown was shutdown C function" x="131" y="102" width="144" height="50"/> </diagram> </diagrams> </esmcontainer> diff --git a/examples/common/input/input.h b/examples/common/input/input.h index 2d638720454e1a50da0c98a02c493b9b44c0a715..7a8b3821520c30a6700ec76752b82a630eb3a4a9 100644 --- a/examples/common/input/input.h +++ b/examples/common/input/input.h @@ -23,18 +23,32 @@ #define _INPUT #define KEY_BUFSIZE 128 -#define KEYBOARD_STATUS_READY 0; -#define KEYBOARD_STATUS_ERROR 1; -#define KEYBOARD_STATUS_CONNECTED 2; +#define KEYBOARD_STATUS_READY 0 +#define KEYBOARD_STATUS_ERROR 1 +#define KEYBOARD_STATUS_CONNECTED 2 typedef struct { - - unsigned char status; - char key[KEY_BUFSIZE]; + atomicInt8Type status; + atomicInt8Type key[KEY_BUFSIZE]; unsigned int time; - unsigned char index; - unsigned char quitChar; - + atomicInt8Type rIndex; + atomicInt8Type wIndex; + atomicInt8Type quitChar; } KeyboardStruct; +/* + ************************************************************************** + * FUNCTION DEFINITIONS + ************************************************************************** + */ + +#ifdef _NRT +RTIME readClockBlocking(unsigned int stateID); +#endif + +#ifndef _NRT +char getKey(void); +char getLastKey(void); +#endif + #endif /* _INPUT */ diff --git a/examples/common/input/input_nrt.c b/examples/common/input/input_nrt.c index adfb239617c0b837df6be6fc6bc1079d3e58872d..23fd006146f8d3ab929e60e15c7ff60159f979e5 100644 --- a/examples/common/input/input_nrt.c +++ b/examples/common/input/input_nrt.c @@ -34,6 +34,7 @@ #include <signal.h> #include <errno.h> #include <fcntl.h> +#include <time.h> #include "smi.h" #include "esminterf_def.h" @@ -115,13 +116,12 @@ char getch2 (void) { void inputKeyboard(taskStateStruct *taskState, KeyboardStruct **keyboard // Allocation Write Mandatory - // Input Flags: quitChar - // Output Flags: 0 1 2 3 4 5 6 7 + // Input Flags: + // Output Flags: 0 1 2 3 4 5 6 quit // NRT ) { static int init=0; char c; - int i; #if(KEYBOARD_RTSHM) (*keyboard) = (KeyboardStruct*) &(rtshm->keyboard); @@ -133,8 +133,9 @@ void inputKeyboard(taskStateStruct *taskState, if (init==0) { init=1; (*keyboard)->status = KEYBOARD_STATUS_CONNECTED; - (*keyboard)->index = 0; - memset(&((*keyboard)->key), 0, KEY_BUFSIZE); + (*keyboard)->rIndex = 0; + (*keyboard)->wIndex = 0; + memset((signed char*)&((*keyboard)->key), 0, KEY_BUFSIZE); //printf("[nrtGetKey] ------------------------- commands: q=quit i=info\n"); } @@ -142,25 +143,91 @@ void inputKeyboard(taskStateStruct *taskState, c=getch2(); if (c!=0) { /* Copy the character bits to the keyboard struct */ - //(*keyboard)->time = GETTIME_MS; - (*keyboard)->index = (((*keyboard)->index+1)%KEY_BUFSIZE); - (*keyboard)->key[(*keyboard)->index] = c; - - if (taskState->inputControlFlag[1-1]==1) { + unsigned int i,i2; +#if(KEYBOARD_RTSHM) + RTIME t; + t=readClockBlocking(taskState->stateID); + __sync_fetch_and_add(&(*keyboard)->time,t/1000-(*keyboard)->time); +//__sync_lock_test_and_set(&(*keyboard)->time,t/1000); +#endif + i=(*keyboard)->wIndex%KEY_BUFSIZE; + i2=(i+1)%KEY_BUFSIZE; + if (i2==(*keyboard)->rIndex) { + printf("[inputKeyboard] buffer overflow\n"); + i2=(i+1)%KEY_BUFSIZE; + } +// else + { + (*keyboard)->key[i] = c; + __sync_synchronize(); + (*keyboard)->wIndex = i2; +//printf("%c_%d",c,(*keyboard)->index); + } + if ((*keyboard)->quitChar==c) { - taskState->outputControlFlag[1-1]=1; + taskState->outputControlFlag[8-1]=1; } - } else { - /* Copy the character bits to the output flag */ - for(i=0;i<8;i++) { + + /* Copy 7 character bits to the output flag */ + for(i=0;i<7;i++) { taskState->outputControlFlag[i]=(c>>i)&1; } - } } } } +/* returns time in usec and updates localtime reading */ +RTIME readClockBlocking(unsigned int stateID) { + unsigned int id=stateID; + unsigned int *lockVar=(unsigned int*)&(rtshm->ustime.lock); + int error; + int lockIter=0; + int staleLock=0; + int removedLock=0; + RTIME tTmp=0; + static RTIME t=0; + + int i; + char localtime_str[32]; + time_t dtg; + time(&dtg); + strftime(localtime_str,sizeof(localtime_str),"%Y%m%d_%H%M%S",localtime(&dtg)); + + do { + while (!(__sync_bool_compare_and_swap(lockVar, + ATOMIC_UNLOCKED0,id))) { +//printf("readClockBlocking busy\n");fflush(stdout); + usleep(STD_SLEEP); + if (lockIter++>MAX_LOCK_ITER) { + staleLock=1; + lockIter=0; +printf("[readClockBlocking] stale lock; lock removed\n"); +// __sync_fetch_and_nand(lockVar,0); // for ATOMIC_UNLOCKED=-1 + __sync_fetch_and_and(lockVar,0); // for ATOMIC_UNLOCKED0=0 + } + } // lock with id - blocking + __sync_synchronize(); + tTmp=rtshm->ustime.time; + for (i=0;i<sizeof(rtshm->ustime.localtime);i++) + rtshm->ustime.localtime[i]=localtime_str[i]; +//usleep(20000); + __sync_synchronize(); + if (__sync_val_compare_and_swap(lockVar, + id,ATOMIC_UNLOCKED0)!=id) { // unlock with id +printf("[readClockBlocking] lock was removed, trying again\n"); + usleep(STD_SLEEP); + removedLock=1; + error=1; + } else error=0; + } while (error); // repeat until success + if (error==0) t=tTmp; + removedLock=removedLock;staleLock=staleLock; + return t; +} + + +#if 0 void getKey(taskStateStruct *taskState // Input Flags: // Output Flags: quit debug log @@ -199,3 +266,25 @@ void getKey(taskStateStruct *taskState } } } +#endif + + +void readClockNRT(taskStateStruct *taskState + // Input Flags: + // Output Flags: + // NRT +) { +// RTIME t; +// static RTIME tLast=0; +//printf("d=%lld ",rtshm->ustime.time/1000);fflush(stdout); +// t=readClockBlocking(taskState->stateID); +/* +if (t!=tLast) { + printf("%lld ",t/1000);fflush(stdout); + tLast=t; +} +*/ + readClockBlocking(taskState->stateID); +//printf("%s\n",rtshm->ustime.localtime); +// usleep(200); +} diff --git a/examples/common/input/input_nrt.c~ b/examples/common/input/input_nrt.c~ new file mode 100644 index 0000000000000000000000000000000000000000..d9871617b8b81bc5f545aaa0af16c10916218396 --- /dev/null +++ b/examples/common/input/input_nrt.c~ @@ -0,0 +1,289 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * user_nrt.c - esm task source file for user nrt + * + * CSIRO - Heli Project + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file user_nrt.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <unistd.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <signal.h> +#include <errno.h> +#include <fcntl.h> +#include <time.h> + +#include "smi.h" +#include "esminterf_def.h" + +//#include "services_io.h" + +#include "rtshm.h" +//#include "ushm.h" +#include "input.h" + +/* + ************************************************************************** + * DEFINES + ************************************************************************** + */ +#define KEYBOARD_RTSHM 1 + +/* + ************************************************************************** + * GLOBALS + ************************************************************************** + */ +extern rtshm_struct *rtshm; +const int stdin_fd = 0; + +/* + ************************************************************************** + * FUNCTIONS + ************************************************************************** + */ +int kbhit2 (void) { + + fd_set readfds; + int fd_max = -1; + int r; + struct timeval tv; + + FD_ZERO(&readfds); + FD_SET(stdin_fd, &readfds); + if (fd_max < stdin_fd) + fd_max = stdin_fd+1; + + tv.tv_sec = 0; + tv.tv_usec = 0; + r = select (fd_max, &readfds, NULL, NULL, &tv); + if (r == -1) { + /* b�r egentligen kolla efter EINTR h�r */ + perror("kbhit select failed"); + return 0; + } + + if (FD_ISSET(stdin_fd, &readfds)) + return 1; + else + return 0; +} + + +char getch2 (void) { + + char c; + int r; + + r = read(stdin_fd, &c, 1); + if (r == -1) { + perror("getch read failed"); + return 0; + } + if (r == 0) /* EOF */ + return 0; + return c; +} + +/* + ************************************************************************** + * NRT TASKS + ************************************************************************** + */ + +void inputKeyboard(taskStateStruct *taskState, + KeyboardStruct **keyboard // Allocation Write Mandatory + // Input Flags: + // Output Flags: 0 1 2 3 4 5 6 quit + // NRT +) { + static int init=0; + char c; + +#if(KEYBOARD_RTSHM) + (*keyboard) = (KeyboardStruct*) &(rtshm->keyboard); +#else + static KeyboardStruct keyboardVar; + (*keyboard) = &keyboardVar; +#endif + + if (init==0) { + init=1; + (*keyboard)->status = KEYBOARD_STATUS_CONNECTED; + (*keyboard)->rIndex = 0; + (*keyboard)->wIndex = 0; + memset((signed char*)&((*keyboard)->key), 0, KEY_BUFSIZE); + //printf("[nrtGetKey] ------------------------- commands: q=quit i=info\n"); + } + + if (kbhit2()!=0) { + c=getch2(); + if (c!=0) { + /* Copy the character bits to the keyboard struct */ + unsigned int i,i2; +#if(KEYBOARD_RTSHM) + RTIME t; + t=readClockBlocking(taskState->stateID); + __sync_fetch_and_add(&(*keyboard)->time,t/1000-(*keyboard)->time); +//__sync_lock_test_and_set(&(*keyboard)->time,t/1000); +#endif + i=(*keyboard)->wIndex%KEY_BUFSIZE; + i2=(i+1)%KEY_BUFSIZE; + if (i2==(*keyboard)->rIndex) { + printf("[inputKeyboard] buffer overflow\n"); + i2=(i+1)%KEY_BUFSIZE; + } +// else + { + (*keyboard)->key[i] = c; + __sync_synchronize(); + (*keyboard)->wIndex = i2; +//printf("%c_%d",c,(*keyboard)->index); + } + + if ((*keyboard)->quitChar==c) { + taskState->outputControlFlag[8-1]=1; + } + + /* Copy 7 character bits to the output flag */ + for(i=0;i<7;i++) { + taskState->outputControlFlag[i]=(c>>i)&1; + } + } + } +} + + +/* returns time in usec and updates localtime reading */ +RTIME readClockBlocking(unsigned int stateID) { + unsigned int id=stateID; + unsigned int *lockVar=(unsigned int*)&(rtshm->ustime.lock); + int error; + int lockIter=0; + int staleLock=0; + int removedLock=0; + RTIME tTmp=0; + static RTIME t=0; + + int i; + char localtime_str[32]; + time_t dtg; + time(&dtg); + strftime(localtime_str,sizeof(localtime_str),"%Y%m%d_%H%M%S",localtime(&dtg)); + + do { + while (!(__sync_bool_compare_and_swap(lockVar, + ATOMIC_UNLOCKED0,id))) { +//printf("readClockBlocking busy\n");fflush(stdout); + usleep(STD_SLEEP); + if (lockIter++>MAX_LOCK_ITER) { + staleLock=1; + lockIter=0; +printf("[readClockBlocking] stale lock; lock removed\n"); +// __sync_fetch_and_nand(lockVar,0); // for ATOMIC_UNLOCKED=-1 + __sync_fetch_and_and(lockVar,0); // for ATOMIC_UNLOCKED0=0 + } + } // lock with id - blocking + __sync_synchronize(); + tTmp=rtshm->ustime.time; + for (i=0;i<sizeof(rtshm->ustime.localtime);i++) + rtshm->ustime.localtime[i]=localtime_str[i]; +//usleep(20000); + __sync_synchronize(); + if (__sync_val_compare_and_swap(lockVar, + id,ATOMIC_UNLOCKED0)!=id) { // unlock with id +printf("[readClockBlocking] lock was removed, trying again\n"); + removedLock=1; + error=1; + } else error=0; + } while (error); // repeat until success + if (error==0) t=tTmp; + removedLock=removedLock;staleLock=staleLock; + return t; +} + + +#if 0 +void getKey(taskStateStruct *taskState + // Input Flags: + // Output Flags: quit debug log + // NRT +) { + static int init=0; + char c; + + if (init==0) { + init=1; + printf("[nrtGetKey] ------------------------- commands: q=quit i=info\n"); + } + + if (kbhit2()!=0) { + c=getch2(); + if (c!=0) { + printf("[nrtGetKey] Keyboard has been hit: char=%c int=%d\n",c,(int)(c-0x30)); + printf("[nrtGetKey] Press 'h' for commands\n"); + /* + Copy the character bits to the output flag + for(i=0;i<8;i++) { + taskState->outputControlFlag[i]=(c>>i)&1; + } + */ + if (c == 'i' || c == 'I') { + printf("[nrtGetKey] info\n"); + } + else if (c == 'q' || c == 'Q') { + printf("[nrtGetKey] quit commanded\n"); + taskState->outputControlFlag[1-1]=1; + } + else if (c == 'd' || c == 'D') { + printf("[nrtGetKey] debug commanded\n"); + taskState->outputControlFlag[2-1]=1; + } + } + } +} +#endif + + +void readClockNRT(taskStateStruct *taskState + // Input Flags: + // Output Flags: + // NRT +) { +// RTIME t; +// static RTIME tLast=0; +//printf("d=%lld ",rtshm->ustime.time/1000);fflush(stdout); +// t=readClockBlocking(taskState->stateID); +/* +if (t!=tLast) { + printf("%lld ",t/1000);fflush(stdout); + tLast=t; +} +*/ + readClockBlocking(taskState->stateID); +//printf("%s\n",rtshm->ustime.localtime); +// usleep(200); +} diff --git a/examples/common/input/input_rt.c b/examples/common/input/input_rt.c index 9a83d0820df363450b98d71fc0d163cb36f72630..c88c2cbf72852d699143d2a12bb3dea6feebde3d 100644 --- a/examples/common/input/input_rt.c +++ b/examples/common/input/input_rt.c @@ -82,6 +82,8 @@ void inputGetKeyboardVar(taskStateStruct *taskState, (*keyboard) = &keyboardVar; (*keyboard)->status = KEYBOARD_STATUS_ERROR; #endif + (*keyboard)->rIndex=0; + (*keyboard)->wIndex=0; #if(KEYBOARD_PROFILE) profile_stop(taskState,&taskProfile); @@ -89,7 +91,7 @@ void inputGetKeyboardVar(taskStateStruct *taskState, } -void getQuitChar(taskStateStruct *taskState, +void setQuitChar(taskStateStruct *taskState, KeyboardStruct **keyboard // Write Mandatory // Input Flags: // Output Flags: @@ -103,3 +105,108 @@ void getQuitChar(taskStateStruct *taskState, (*keyboard)->quitChar='`'; } + +void rtclock(taskStateStruct *taskState + // Input Flags: + // Output Flags: busy unlocked +) +{ + unsigned int *lockVar=(unsigned int*)&(rtshm->ustime.lock); + unsigned int tmpId; + static RTIME tLast=0; + int staleLock=0; + int duplicateId=0; + int relock=0; + int busy=0; + unsigned int id=taskState->stateID; + + tmpId=__sync_val_compare_and_swap(lockVar, + ATOMIC_UNLOCKED0,id); // lock with id if possible + if (tmpId==ATOMIC_UNLOCKED0) { // lock secured + __sync_synchronize(); + rtshm->ustime.time=GETTIME/1000; + rtshm->ustime.time_ms=rtshm->ustime.time/1000; + __sync_synchronize(); +//rt_printf("rt=%lld ",rtshm->ustime.time); + tmpId=__sync_val_compare_and_swap(lockVar, + id,ATOMIC_UNLOCKED0); // unlock if possible + if (tmpId!=id) { // locked by another mechanism +rt_printf("[rtclock] re-locked, lock removed; should not happen in RT!\n"); +/* + if (!(__sync_bool_compare_and_swap(lockVar, + tmpId,ATOMIC_UNLOCKED0))) { // remove lock +rt_printf("[writeAtomicRT_int] 1: can't remove lock in RT; fatal error!\n"); + return 3; + } +*/ +// __sync_fetch_and_nand(lockVar,0); // for ATOMIC_UNLOCKED=-1 + __sync_fetch_and_and(lockVar,0); // for ATOMIC_UNLOCKED0=0 + relock=1; + } + tLast=0; + } else { // busy + if (tLast==0) { +//rt_printf("[rtclock] busy\n"); + tLast=GETTIME; + } +//else rt_printf("[rtclock] busy=%dms\n",(int)(GETTIME-tLast)/1000000); + busy=1; + taskState->outputControlFlag[1-1]=1; + if (tmpId==id) { +rt_printf("[rtclock] task locked by another mechanism, should not happen\n"); + duplicateId=1; + } + if (GETTIME-tLast>MAX_LOCK_TIME*1000000) { + staleLock=1; + taskState->outputControlFlag[2-1]=1; +/* + if (!(__sync_bool_compare_and_swap(lockVar, + tmpId,ATOMIC_UNLOCKED0))) { // remove lock +rt_printf("[writeAtomicRT_int] 2: can't remove lock in RT; fatal error!\n"); + return 3; + } +*/ +// __sync_fetch_and_nand(lockVar,0); // for ATOMIC_UNLOCKED=-1 + + __sync_fetch_and_and(lockVar,0); // for ATOMIC_UNLOCKED0=0 + tLast=0; +rt_printf("[rtclock] stale lock; lock removed\n"); + +//rt_printf("[rtclock] stale lock t_stale=%dms\n",(int)(GETTIME-tLast)/1000000); + } + } + busy=busy;relock=relock;duplicateId=duplicateId;staleLock=staleLock; +} + +char getKey(void) { + unsigned char wIndex,rIndex; + char key=0; + if (rtshm->keyboard.status!=KEYBOARD_STATUS_CONNECTED) return 0; + wIndex=(rtshm->keyboard.wIndex)%KEY_BUFSIZE; + rIndex=(rtshm->keyboard.rIndex)%KEY_BUFSIZE; +//rt_printf("w=%d r=%d\n",wIndex,rIndex); + if (wIndex!=rIndex) { + key=rtshm->keyboard.key[rIndex]; + rIndex=(rIndex+1)%KEY_BUFSIZE; + rtshm->keyboard.rIndex=rIndex; +// rtshm->keyboard.rIndex=rIndex; +// rt_printf("%c",key); + } + return key; +} + +char getLastKey(void) { + unsigned char wIndex,rIndex; + char key=0; + if (rtshm->keyboard.status!=KEYBOARD_STATUS_CONNECTED) return 0; + wIndex=(rtshm->keyboard.wIndex)%KEY_BUFSIZE; + rIndex=(rtshm->keyboard.rIndex)%KEY_BUFSIZE; +//rt_printf("w=%d r=%d\n",wIndex,rIndex); + if (wIndex!=rIndex) { + rIndex=(wIndex-1)%KEY_BUFSIZE; +//rt_printf("r_%d\n",rIndex); + key=rtshm->keyboard.key[rIndex]; +// rt_printf("%c",key); + } + return key; +} diff --git a/examples/common/logging/flash_logger.h b/examples/common/logging/flash_logger.h index 9a9b3d6c47bcfb555454bebcb56855c6d27f7f36..d8fceb736a8d6750a4a74b27db1b40350527256e 100644 --- a/examples/common/logging/flash_logger.h +++ b/examples/common/logging/flash_logger.h @@ -8,18 +8,20 @@ #include <errno.h> #include <math.h> #include <inttypes.h> +#include <stdint.h> /////////////////////////////////////////////// // USER-SETTABLE PARAMETERS AT COMPILE TIME // /////////////////////////////////////////////// -#define FL_DEVICE_FILE "/dev/logger" // Hard drive device file, e.g "/dev/sda". You can also use a regular filename for testing purposes (the file must exist) +//#define FL_DEVICE_FILE "/dev/logger" // Hard drive device file, e.g "/dev/sda". You can also use a regular filename for testing purposes (the file must exist) // !!!! BE VERY CAREFUL AS WRITING TO THE WRONG HARDDRIVE WILL ERASE YOUR MBR, PARTITION TABLE etc. !!! //#define FL_DS 10383777792LLU // total device file size, determine with fdisk for now //#define FL_DS 2080374784LLU // athena3-ph //#define FL_BS 6*4*1024 // BLOCK size. This is the size of the blocks that are written to disk. Every log entry corresponds to one write operation with FL_BS byte -#define FL_BS 256*1024 // flash block size from manufacturer -#define FL_DS 6929513984LLU // (End-Start from fdisk of partition)*(Sector size from fdisk) +//#define FL_BS 32*1024 //256*1024 // flash block size in bytes from manufacturer +//#define FL_DS 7757955072LLU // ToughMax USB2 partition size in bytes +//#define FL_DS 6929513984LLU // (End-Start from fdisk of partition)*(Sector size from fdisk) //#define FL_DEVICE_FILE "/home/hil305/testfile" // Hard drive device file, e.g "/dev/sda". You can also use a regular filename for testing purposes (the file must exist) // !!!! BE VERY CAREFUL AS WRITING TO THE WRONG HARDDRIVE WILL ERASE YOUR MBR, PARTITION TABLE etc. !!! //#define FL_DS 67108864 // total device file size, determine with fdisk for now @@ -30,72 +32,91 @@ #define FL_AHSIZE 1024*1024 // Size in bytes reserved on-flash aircraft history log (flight hours, engine hours) // these probably don't need to be touched -#define FL_CRC_SIZE 4 -#define FL_NBYTES_SIZE 4 -#define FL_RESERVED_SIZE 16 -#define FL_TIMESTAMP_SIZE 4 // based on sizeof(time_t) on a 32bit Linux system +//#define FL_CRC_SIZE 4 +//#define FL_NBYTES_SIZE 4 +//#define FL_TIMESTAMP_SIZE 8 +#define FL_RESERVED_SIZE 16 + #define LH_MAGIC_NR 1234 #define AH_MAGIC_NR 5678 +typedef int64_t myTime_t; -typedef struct logDevInfo{ +typedef volatile struct __attribute__((__packed__)){ /* variables that need to be set by the user */ - char *dev; // device file - unsigned long long ds; // disk size in bytes (probably can determine automatically, determine manually using fdisk for now) - unsigned long bs; // block size in bytes - unsigned long max_le_size; // log entry size - unsigned long lh_startblock; // start block for logbook housekeeping data - unsigned long lh_length; // length (in bytes) of logbook housekeeping data - unsigned long ah_startblock; // start block for aircraft history log - unsigned long ah_length; // length (in bytes) of aircraft history log - unsigned long log_startblock; // first block of the actual flight log - +// unsigned long long ds; // disk size in bytes (probably can determine automatically, determine manually using fdisk for now) + uint64_t ds; +// unsigned long bs; // block size in bytes + uint32_t bs; +// unsigned long max_le_size; // log entry size + uint32_t max_le_size; +// unsigned long lh_startblock; // start block for logbook housekeeping data + uint32_t lh_startblock; +// unsigned long lh_length; // length (in bytes) of logbook housekeeping data + uint32_t lh_length; +// unsigned long ah_startblock; // start block for aircraft history log + uint32_t ah_startblock; +// unsigned long ah_length; // length (in bytes) of aircraft history log + uint32_t ah_length; +// unsigned long log_startblock; // first block of the actual flight log + uint32_t log_startblock; /* state variables */ // log start address - unsigned long cur_le_pos; // current log entry position - +// unsigned long cur_le_pos; // current log entry position + uint32_t cur_le_pos; // flags // wrap-around mode, if enabled, log is treated as a ring buffer int wrap_around_mode; /* derived variables (these are calculated) */ - unsigned long blocks_total; // total number of erase blocks - unsigned long remainder_bytes; // if disksize is not an integer multiple of erase block size, +// unsigned long blocks_total; // total number of erase blocks + uint32_t blocks_total; +// unsigned long remainder_bytes; // if disksize is not an integer multiple of erase block size, // this variable holds the remaining number of bytes (should really be zero) // TODO: do we need this ? - unsigned long le_total; // total number of log entries that will fit on device. - unsigned long lh_blocks; - unsigned long ah_blocks; - unsigned long offset_reserved; // reserver for future use - unsigned long offset_nbytes; - unsigned long offset_timestamp; // NOTE: the timestamp is calculated using the time() function, + uint32_t remainder_bytes; +// unsigned long le_total; // total number of log entries that will fit on device. + uint32_t le_total; +// unsigned long lh_blocks; + uint32_t lh_blocks; +// unsigned long ah_blocks; + uint32_t ah_blocks; +// unsigned long offset_reserved; // reserver for future use + uint32_t offset_reserved; +// unsigned long offset_nbytes; + uint32_t offset_nbytes; +// unsigned long offset_timestamp; // NOTE: the timestamp is calculated using the time() function, // this may cause problems in 2038. Also, the resolution is only seconds, i.e. // it is not possible to "sort" two log entries that are taken within the same second. // This should not cause a problem as the position on the device should be able to resolve this. - unsigned long offset_CRC; + uint32_t offset_timestamp; +// unsigned long offset_CRC; + uint32_t offset_CRC; } logDevInfo; -typedef struct logBookHousekeeping{ +typedef volatile struct __attribute__((__packed__)){ int magic_nr; - time_t start_time; - time_t end_time; + myTime_t start_time; + myTime_t end_time; int log_nr; // not used int opened; int closed; - long first_block; - long nr_entries; +// long first_block; + uint32_t first_block; +// long nr_entries; + uint32_t nr_entries; logDevInfo ldi; } logBookHousekeeping; -typedef struct logAircraftHistory{ +typedef volatile struct __attribute__((__packed__)){ int magic_nr; - time_t timestamp; + myTime_t timestamp; int length; unsigned char CRCbuf[4]; } logAircraftHistory; -typedef struct logFlightHours{ +typedef volatile struct __attribute__((__packed__)){ int number1; int number2; double number3; @@ -107,19 +128,21 @@ typedef struct logFlightHours{ void displayLoggerError(char *function, char *message, int level); int calculateDiskUtilization(logDevInfo *ldiInfo); void printHeliLogDeviceInfo(logDevInfo *ldi); -void fillHeliLogDeviceInfo(logDevInfo *ldi); +void fillHeliLogDeviceInfo(logDevInfo *ldi, uint64_t ds, unsigned int bs); int checkLDIconsistency(logDevInfo *ldi); -int calculateLogEntryOffset(logDevInfo *ldi, unsigned long entry_nr, off_t* offset); -int writeLogEntry(logDevInfo *ldi, unsigned long entry_nr, unsigned long nbytes, void *buffer); -int readLogEntry(logDevInfo *ldi, unsigned long entry_nr, void *read_buffer, unsigned long *nbytes,time_t *timestamp); -int dumpLogDeviceToFile(char *logdev, char *dstfile, long maxnrentries, long minnrofentries, int maxtimediff); +int calculateLogEntryOffset(logDevInfo *ldi, uint32_t entry_nr, int64_t* offset); +int writeLogEntry(char *device, logDevInfo *ldi, uint32_t entry_nr, uint32_t nbytes, void *buffer); +int readLogEntry(char *device, logDevInfo *ldi, uint32_t entry_nr, void *read_buffer, uint32_t *nbytes,myTime_t *timestamp); +int dumpLogDeviceToFile(char *device, char *dstfile, int32_t maxnrentries, int32_t minnrofentries, int maxtimediff); void copyLogDevInfo(logDevInfo *dst, logDevInfo *src); -int shutdownFlashLogger(logDevInfo *ldi, int logentry_count); +int shutdownFlashLogger(char *device, logDevInfo *ldi, int logentry_count); void printLogHousekeepingData(logBookHousekeeping *lh_data); int readLogHousekeepingData(char *device, logBookHousekeeping *lh_data); -int writeLogHousekeepingData(logDevInfo *ldi, logBookHousekeeping *lh_data); -int initFlashLogger(logDevInfo *ldi); -int logWriteFlightHours(logDevInfo *ldi,logFlightHours *FH); -int logReadFlightHours(logDevInfo *ldi,logFlightHours *FH); +int writeLogHousekeepingData(char *device, logDevInfo *ldi, logBookHousekeeping *lh_data); +int initFlashLogger(char *device, logBookHousekeeping *lh_data); +int formatFlashLogger(char *device, uint64_t ds, unsigned int bs); +int logWriteFlightHours(char *device, logDevInfo *ldi,logFlightHours *FH); +int logReadFlightHours(char *device, logDevInfo *ldi,logFlightHours *FH); +int logReadAircraftHistory(char *device, logDevInfo *ldi, int32_t max_nbytes, char *buffer); #endif // _FLASH_LOGGER_H diff --git a/examples/common/logging/flash_logger_dist.c b/examples/common/logging/flash_logger_dist.c index 0fcc91ce7fffa2ee78511eedce0163ff0936fc1e..715315a68d69ec91275289d27149cc3ddc9502a4 100644 --- a/examples/common/logging/flash_logger_dist.c +++ b/examples/common/logging/flash_logger_dist.c @@ -1,16 +1,26 @@ #include "flash_logger.h" -int shutdownFlashLogger(logDevInfo *ldi, int logentry_count) +int shutdownFlashLogger(char *device, logDevInfo *ldi, int logentry_count) { return 0; } -int writeLogEntry(logDevInfo *ldi, unsigned long entry_nr, unsigned long nbytes, void *buffer) +int writeLogEntry(char *device, logDevInfo *ldi, uint32_t entry_nr, uint32_t nbytes, void *buffer) { return 0; } -int initFlashLogger(logDevInfo *ldi) +int initFlashLogger(char *device, logBookHousekeeping *lh_data) { return 0; } + +int readLogHousekeepingData(char *device, logBookHousekeeping *lh_data) +{ + return 0; +} + +void copyLogDevInfo(logDevInfo *dst, logDevInfo *src) +{ +; +} \ No newline at end of file diff --git a/examples/common/logging/logging.c b/examples/common/logging/logging.c index 5b2b1bc94df2bdf2d9650db1d01dc062c4da821c..ad4097b79c6116d966569d4e1a71d8bb55a48f96 100644 --- a/examples/common/logging/logging.c +++ b/examples/common/logging/logging.c @@ -27,6 +27,136 @@ */ #include <stdio.h> #include <string.h> +#include <signal.h> #include "smi.h" +//#include "common.h" #include "logging.h" + +void testEndianess(taskStateStruct *taskState + // Input Flags: + // Output Flags: littleEndian + // RT + // NRT + // Oneshot +) { + uint32_t test; + + unsigned char *tp; + + test=1; + tp=(unsigned char*)&test; + if (tp[0]==1) { +//printf("little endian\n"); + taskState->outputControlFlag[1-1]=1; + } +} + + +/* + ************************************************************************** + * WRITELOG + ************************************************************************** + */ + + + +#ifndef _NRT +// only for RT functions in single thread +int writeLog(int *count, int div, unsigned char id, int size, unsigned char *data, logStruct *log) { + + signed int n; + n=0; + + if (*count%div==0) { +/* +#ifndef _NRT + if (lockShm(&(log->lock))==1) +#else + lockShmBlock(&(log->lock)); +#endif + { + __sync_synchronize(); +*/ +// unsigned int w=log->writeIndex; + unsigned int w=__sync_fetch_and_add(&(log->writeIndex),0); + // calculate the number of bytes available for writing +// n=log->readIndex+log->RingBufferSize-w; + n=__sync_fetch_and_add(&(log->readIndex),0)+log->RingBufferSize-w; +//printf("@%d_%d ",size,n);fflush(stdout); + if (n<=size) { +#ifndef _NRT + rt_printf("[writeLog] overflow! data not written to log buffer #n=%d;r=%d;w=%d \n",n,(int)log->readIndex,(int)log->writeIndex); +#else + printf("[writeLog] overflow! data not written to log buffer #n=%d;r=%d;w=%d \n",n,(int)log->readIndex,(int)log->writeIndex); +#endif + n=0; + goto exit; + } else { + log->logBuf[w]=id; + if (w+size+1 < log->RingBufferSize) + { + // copy in one part + memcpy((unsigned char*) &(log->logBuf[w+1]),data,size); + w += size + 1; + + } else + { + // copy in two parts + memcpy((unsigned char*) &(log->logBuf[w+1]),data,log->RingBufferSize-w-1); + memcpy((unsigned char*) &(log->logBuf[0]),data+(log->RingBufferSize-w-1),size-(log->RingBufferSize-w-1)); + w += size + 1; + w = w - log->RingBufferSize; + } +// log->writeIndex=w; + __sync_fetch_and_add(&(log->writeIndex),w-log->writeIndex); +//__sync_lock_test_and_set(&(log->writeIndex),w); + n=size; + } + + +exit: +; +/* + __sync_synchronize(); + unlockShm(&(log->lock)); + } +*/ + } + *count=*count+1; + + return n; +} +#endif + +/* +#ifdef _NRT +void lockShmBlock(volatile int *ptr) { +// volatile sig_atomic_t lock; + while (!__sync_bool_compare_and_swap(ptr, 0, 1)) {} +} +#endif + +int lockShm(volatile int *ptr) { + return(__sync_bool_compare_and_swap(ptr, 0, 1)); +} + +void unlockShm(volatile int *ptr) { + __sync_bool_compare_and_swap(ptr, 1, 0); +} + +#ifdef _NRT +void idLockShmBlock(volatile int *ptr, int id) { +// volatile sig_atomic_t lock; + while (!__sync_bool_compare_and_swap(ptr, 0, id)) {} +} +#endif + +int idLockShm(volatile int *ptr, int id) { + return(__sync_bool_compare_and_swap(ptr, 0, id)); +} + +int idUnlockShm(volatile int *ptr, int id) { + return(__sync_bool_compare_and_swap(ptr, id, 0)); +} +*/ diff --git a/examples/common/logging/logging.h b/examples/common/logging/logging.h index 5d6bd10b0756562d40aa4802516c11fbf91d6edc..bfb3fee2c7037b6c02f9398f5a324503b266ed28 100644 --- a/examples/common/logging/logging.h +++ b/examples/common/logging/logging.h @@ -30,16 +30,21 @@ */ /* size of log buffer in bytes */ -#define LOG_RINGBUFFER_SIZE 1024*1024 // TODO see where this is used and whether this needs to be refactored RINGBUFFER_SIZE would be a better name +#define LOG_RINGBUFFER_SIZE 1024*1024 + +/* log entry trigger for flash logger*/ //#define WRITE_TRIGGER_SIZE 22*1024 -#define WRITE_TRIGGER_SIZE (256/2)*1024 +//#define WRITE_TRIGGER_SIZE (256/2)*1024 +//#define WRITE_TRIGGER_SIZE (32/2)*1024 -/* Tolerance in available space */ +/* Tolerance in available space for fsLogging */ #define LOG_SPACE_TOL 25*1024*1024 /* Path to log files */ #define LOG_PATH "/log" +/* Flash partition device node */ +#define FLASH_LOGGER_DEV_NODE "/dev/logger" /* ************************************************************************** @@ -48,6 +53,7 @@ */ #include "log_def.h" #include "flash_logger.h" +#include "signal.h" /* ************************************************************************** @@ -58,11 +64,16 @@ * Structure used to manage ring bugger used for data logging */ typedef volatile struct { - unsigned char lock; +// int lock; unsigned char logBuf[LOG_RINGBUFFER_SIZE]; - unsigned long RingBufferSize; - unsigned long writeIndex; - unsigned long readIndex; + uint64_t RingBufferSize; + + unsigned int writeIndex; + unsigned int readIndex; +/* sig_atomic_t writeIndex; + sig_atomic_t readIndex; +*/ + char logName[64]; } logStruct; /** @@ -76,7 +87,7 @@ typedef volatile struct { /** * Structure used to contain smi log data */ -typedef volatile struct { +typedef volatile struct __attribute__((__packed__)){ unsigned int time; unsigned short numberOfStates; unsigned int smiIteration; @@ -85,7 +96,7 @@ typedef volatile struct { /** * Structure used to contain smi log data */ -typedef volatile struct { +typedef volatile struct __attribute__((__packed__)){ stateIDType state; flagsIDType flags; } logSmi2Struct; @@ -95,6 +106,22 @@ typedef volatile struct { * FUNCTIONS ************************************************************************** */ +#ifndef _NRT int writeLog(int *count, int div, unsigned char id, int size, unsigned char *data, logStruct *log); +#endif + +#ifdef _NRT +void lockShmBlock(volatile int *ptr); +#endif +int lockShm(volatile int *ptr); +void unlockShm(volatile int *ptr); + + +#ifdef _NRT +void idLockShmBlock(volatile int *ptr, int id); +#endif + +int idLockShm(volatile int *ptr, int id); +int idUnlockShm(volatile int *ptr, int id); #endif // _LOGGING_H diff --git a/examples/common/logging/logging_nrt.c b/examples/common/logging/logging_nrt.c index 87db1d9144033b79223defa2882e7f40dd6fee06..184a7556502784eee500d8d89ab4e8500b0a5aaf 100644 --- a/examples/common/logging/logging_nrt.c +++ b/examples/common/logging/logging_nrt.c @@ -48,6 +48,7 @@ #include <libxml/tree.h> #define BREAKPOINT *run=0; for(;;) {usleep(10000);} +#define LOG_ENTRY_PRINT 0 //#define FILL_LOG_WITH_STUFF /* @@ -121,16 +122,27 @@ void logGetLogVarNRT(taskStateStruct *taskState, // Output Flags: // NRT ) { + time_t dtg; +// RTIME t; + // it is assumed that logGetLogVar in rt will be called first and initializes everything // printf("-> entering getLogVarNRT\n"); fflush(stdout); printf("[getLogVarNRT] Allocating memory\n"); *logNRT=&(rtshm->log); - // can I assume that logGetLogVar in rt will be called first and initialize everything ? + time(&dtg); +//printf("aaaaaaaaaaaaaaaaa %ld %lld\n",dtg,(rtshm->ustime.time-rtshm->smiStart/1000)/1000000); +//printf("aaaaaaaaaaaaaaaaa %lld\n",((rtshm->ustime.time-rtshm->smiStart/1000)/1000000)); +// t=(RTIME)dtg-rtshm->smiStart/1000000000; + // dtg=t; +//printf("bbbbbb %ld\n",dtg); + dtg=dtg-((rtshm->ustime.time-rtshm->smiStart/1000)/1000000); + strftime((char*)(*logNRT)->logName,32,"%Y%m%d_%H%M%S",localtime(&dtg)); + printf("[getLogVarNRT] logname: %s\n",(*logNRT)->logName); } void gsLogSave(taskStateStruct *taskState, logStruct **logNRT // Write Mandatory - // Input Flags: init + // Input Flags: init last // Output Flags: error // NRT ) { @@ -140,14 +152,14 @@ void gsLogSave(taskStateStruct *taskState, } static FILE *fp; - signed long n,n1,n2; - static char fileName[256]; + int n,n1,n2; + static char fileName[128+16]; char command[256]; char sysBuf[BUFSIZ]; - char szDateTime[256]; - time_t dtg; - unsigned int uiCurrentWriteIndex; - signed long size; +// char szDateTime[128]; +// time_t dtg; + int uiCurrentWriteIndex; + int size; unsigned int blocks; unsigned int used; @@ -160,6 +172,11 @@ void gsLogSave(taskStateStruct *taskState, n2 = 0; n = 0; + if (taskState->inputControlFlag[2-1]==1) { + printf("[gsLogSave] waiting\n"); + usleep(500000); + } + if (taskState->inputControlFlag[1-1] == 1) { /* Check if there is enough disk space */ sprintf(command,"df "LOG_PATH); @@ -187,9 +204,12 @@ if (taskState->inputControlFlag[1-1] == 1) { } /* Generate the logfile name */ - time(&dtg); - strftime(szDateTime,32,"%Y%m%d_%H%M%S",localtime(&dtg)); - sprintf(fileName,LOG_PATH"/log_%s.bin",szDateTime); +// time(&dtg); +// strftime(szDateTime,32,"%Y%m%d_%H%M%S",localtime(&dtg)); +// strftime((char*)rtshm->szDateTime,32,"%Y%m%d_%H%M%S",localtime(&dtg)); +// sprintf(fileName,LOG_PATH"/log_%s.bin",szDateTime); +// sprintf(fileName,LOG_PATH"/log_%s.bin",rtshm->szDateTime); + sprintf(fileName,LOG_PATH"/log_%s.bin",(*logNRT)->logName); sprintf(command,"test -e %s",fileName); if (system(command)==0) { printf("[gsLogSave] log file exists and will be overwritten\n"); @@ -198,8 +218,11 @@ if (taskState->inputControlFlag[1-1] == 1) { // fp=fopen(fileName,"ab"); taskState->inputControlFlag[1-1]=0; } - if (error == 0 && (*logNRT)->writeIndex!=(*logNRT)->readIndex ) { - + if (error == 0 && +// (*logNRT)->writeIndex!=(*logNRT)->readIndex +__sync_fetch_and_add(&((*logNRT)->writeIndex),0)!= +__sync_fetch_and_add(&((*logNRT)->readIndex),0) + ) { fp=fopen(fileName,"ab"); if (fp==NULL) { printf("[gsLogSave] error opening log file (%s): %s\n",fileName,strerror(errno)); @@ -217,7 +240,7 @@ if (taskState->inputControlFlag[1-1] == 1) { // without us knowing here. uiCurrentWriteIndex=(*logNRT)->writeIndex; size = uiCurrentWriteIndex - (*logNRT)->readIndex; - +//printf("size=%d %d %d ",size,uiCurrentWriteIndex, (*logNRT)->readIndex);fflush(stdout); // check for wrapping // if the buffer is wrapped, need to write in two parts if (size<0) @@ -231,17 +254,21 @@ if (taskState->inputControlFlag[1-1] == 1) { { // write in one part n=fwrite((unsigned char*)&((*logNRT)->logBuf[(*logNRT)->readIndex]),1,size,fp); - } + } +//printf("size2=%d\n",size);fflush(stdout); + // set the new read index - (*logNRT)->readIndex = uiCurrentWriteIndex; - +// (*logNRT)->readIndex = uiCurrentWriteIndex; +__sync_fetch_and_add(&((*logNRT)->readIndex),uiCurrentWriteIndex-(*logNRT)->readIndex); +//__sync_lock_test_and_set(&((*logNRT)->readIndex),uiCurrentWriteIndex); // release locks // (*logNRT)->lock=0; fclose(fp); // printf("[gsLogSave] file closed\n"); if (n!=size) { - printf("[gsLogSave] error writing log file: n=%ld; size=%ld; n1=%ld; n2=%ld\n",n,size,n1,n2); + printf("[gsLogSave] error writing log file: n=%lld; size=%lld; n1=%lld; n2=%lld\n", + (long long int)n,(long long int)size,(long long int)n1,(long long int)n2); error=1; } else { // printf("[gsLogSave] log file written: n=%ld; size=%ld\n",n,size); @@ -273,20 +300,23 @@ void logSave(taskStateStruct *taskState, return; } - static unsigned char tmp_buffer[FL_BS]; // temporary buffer,in case we need to copy data - // out of the ring buffer in two parts. - // Striclty, the buffer only needs to be ldi->max_le_size - // big, but we don't have that at compile time (at least not without - // lots of boilerplate code). - + static unsigned char *tmp_buffer; + // static time_t start; ? - static unsigned long logentry_nr = 0; // each logentry has an entry number + static uint64_t logentry_nr = 0; // each logentry has an entry number - signed long size; int ret; unsigned char error = 0; - unsigned int uiCurrentWriteIndex, uiCurrentReadIndex; + int nbytes,size,remainingSize; + int uiCurrentWriteIndex, uiCurrentReadIndex; + + static int tLast=0; + static int tMax=0; + int tStop,tLast2; +// int t; + + // printf("-> entering logSave\n"); fflush(stdout); @@ -296,8 +326,31 @@ void logSave(taskStateStruct *taskState, taskState->outputControlFlag[1-1]=1; return; } + + if ((*logConfig)->ldi.max_le_size==0) { + printf("[logSave] error: block size zero\n"); + taskState->outputControlFlag[1-1]=1; + } + + if (taskState->inputControlFlag[2-1]==1) { + printf("[logSave] waiting\n"); + usleep(500000); + } + + int tStart; + tStart=__sync_fetch_and_add(&(rtshm->ustime.time_ms),0); + +//int tstart=rtshm->ustime.time_ms; +//printf("entering: %d\n",tstart);fflush(stdout); + tmp_buffer=malloc((*logConfig)->ldi.max_le_size); // temporary buffer,in case we need to copy data + // out of the ring buffer in two parts. + // Striclty, the buffer only needs to be ldi->max_le_size + // big, but we don't have that at compile time (at least not without + // lots of boilerplate code). + /* log the data */ + nbytes=0; if ((*logNRT)->writeIndex == (*logNRT)->readIndex) { // printf("[logSave] no data to write to log file\n"); @@ -305,14 +358,19 @@ void logSave(taskStateStruct *taskState, else if (taskState->inputControlFlag[1-1] == 1) { printf("[logSave] clearing the log buffer\n"); - (*logNRT)->lock=1; - (*logNRT)->writeIndex = 0; - (*logNRT)->readIndex = 0; - (*logNRT)->lock=0; +// (*logNRT)->lock=1; +// (*logNRT)->writeIndex = 0; +//__sync_fetch_and_add(&((*logNRT)->writeIndex),0-(*logNRT)->writeIndex); +__sync_fetch_and_and(&((*logNRT)->writeIndex),0); +//__sync_lock_test_and_set(&((*logNRT)->writeIndex),0); +// (*logNRT)->readIndex = 0; +//__sync_fetch_and_add(&((*logNRT)->readIndex),0-(*logNRT)->readIndex); +//__sync_lock_test_and_set(&((*logNRT)->readIndex),0); +__sync_fetch_and_and(&((*logNRT)->readIndex),0); +// (*logNRT)->lock=0; } else { - // printf("[logSave] saving log entry\n"); ///////////////////////////////////////// @@ -324,87 +382,117 @@ void logSave(taskStateStruct *taskState, // save the current write index, and calculate the amount of data to write to file // remember that writeLog could be running concurrently and so could increment writeIndex // without us knowing here. - uiCurrentWriteIndex=(*logNRT)->writeIndex; - uiCurrentReadIndex=(*logNRT)->readIndex; + uiCurrentWriteIndex=__sync_fetch_and_add(&((*logNRT)->writeIndex),0); + uiCurrentReadIndex=__sync_fetch_and_add(&((*logNRT)->readIndex),0); // write content of ringbuffer between readIndex and writeIndex, but cap // at ldi.max_le_size. size=uiCurrentWriteIndex - uiCurrentReadIndex; if(size < 0) size += (*logNRT)->RingBufferSize; + nbytes=size; // printf("ringbuffer accumulated %ld bytes\n",size); // printf("ringbuffer read, write pointers: %u %u,\n", uiCurrentReadIndex, uiCurrentWriteIndex); - if(size > (*logConfig)->ldi.max_le_size) + +//size=0; + remainingSize=size; + +if (tLast==0) tLast=tStart; +if (LOG_ENTRY_PRINT>0) { + printf("[logSave] t=%d size=%d dt=%d\n",tStart,size,tStart-tLast); +} +tLast=tStart; +tLast2=tStart; + + + do { +//printf("while: %d %ld\n",rtshm->ustime.time_ms,remainingSize);fflush(stdout); +// t=__sync_fetch_and_add(&(rtshm->ustime.time),0)/1000; // operation not available on vortex + + if (remainingSize>(*logConfig)->ldi.max_le_size) { - printf("ringbuffer has more data waiting than a log entry can accomodate. Capping at maximum log entry size.\n"); size=(*logConfig)->ldi.max_le_size; - } - - // check for wrapping - if(uiCurrentReadIndex + size <= (*logNRT)->RingBufferSize) - { // copy in one part + } else size=remainingSize; + + remainingSize-=size; + + // check for wrapping + if(uiCurrentReadIndex + size <= (*logNRT)->RingBufferSize) + { // copy in one part memcpy((void *)tmp_buffer,(void *)&((*logNRT)->logBuf[uiCurrentReadIndex]),size); - (*logNRT)->readIndex += size; // increase read index + uiCurrentReadIndex+=size; // increase read index } - else + else { // copy in two parts - long int size_one= (*logNRT)->RingBufferSize - uiCurrentReadIndex; - long int size_two= size - size_one; + int64_t size_one= (*logNRT)->RingBufferSize - uiCurrentReadIndex; + int64_t size_two= size - size_one; memcpy((void *)tmp_buffer,(void *)&((*logNRT)->logBuf[uiCurrentReadIndex]),size_one); memcpy((void *)tmp_buffer+(*logNRT)->RingBufferSize-uiCurrentReadIndex,(void *)&((*logNRT)->logBuf[0]),size_two); - (*logNRT)->readIndex = size_two; // new wrapped read index - } - - - /* - // if the buffer is wrapped, need to write in two parts - if (size<0) - { - // copy in two parts - size += (*logNRT)->RingBufferSize; - memcpy((void *)tmp_buffer,(void *)&((*logNRT)->logBuf[uiCurrentReadIndex]),(*logNRT)->RingBufferSize-uiCurrentReadIndex); - memcpy((void *)tmp_buffer+(*logNRT)->RingBufferSize-uiCurrentReadIndex,(void *)&((*logNRT)->logBuf[0]),size-((*logNRT)->RingBufferSize-uiCurrentReadIndex)); + uiCurrentReadIndex=size_two; // new wrapped read index } - else - { - // copy in one part - //printf("tmp buffer: %p\n logbuf: %p, readindex %i, dest addr %p , size %d\n", (void *)tmp_buffer, (void *)(*logNRT)->logBuf, uiCurrentReadIndex,(void *)&((*logNRT)->logBuf[uiCurrentReadIndex]),size); - memcpy((void *)tmp_buffer,(void *)&((*logNRT)->logBuf[uiCurrentReadIndex]),size); - } - // set the new read index - (*logNRT)->readIndex = uiCurrentWriteIndex; - */ - // release locks -// (*logNRT)->lock=0; + /////////////////////////////////////////// + // write temporary buffer to flash + /////////////////////////////////////////// - /////////////////////////////////////////// - // write temporart buffer to flash - /////////////////////////////////////////// - - ret=writeLogEntry((logDevInfo*)&((*logConfig)->ldi), logentry_nr, size, tmp_buffer); - logentry_nr++; + ret=writeLogEntry(FLASH_LOGGER_DEV_NODE,(logDevInfo*)&((*logConfig)->ldi), logentry_nr, size, tmp_buffer); + logentry_nr++; - if (ret!=0) + if (ret!=0) { printf("[logSave] error writing log entry.\n"); error=1; } - else + else { -// printf("[logSave] wrote logentry nr %lu\n", logentry_nr-1); +if (LOG_ENTRY_PRINT>0 && (*logConfig)->ldi.max_le_size>0) { + tStop=__sync_fetch_and_add(&(rtshm->ustime.time_ms),0); + printf("[logSave] wrote logentry %llu %d bytes %lld%% dt=%d\n", + (long long unsigned int)logentry_nr-1,size,(long long int)(100*size/(*logConfig)->ldi.max_le_size),tStop-tLast2); + tLast2=tStop; +} } + + if (remainingSize>0) + { +/* + printf("[logSave] t=%d ringbuffer has more data waiting than a log entry can accomodate (n=%ld bs=%ld). Creating additional log entry.\n", + t, remainingSize, (*logConfig)->ldi.max_le_size); +*/ + } + } while (remainingSize>0); + __sync_fetch_and_add(&((*logNRT)->readIndex),uiCurrentReadIndex-(*logNRT)->readIndex); +//__sync_lock_test_and_set(&((*logNRT)->readIndex),uiCurrentReadIndex); } - +//int tstop=rtshm->ustime.time_ms; +tStop=__sync_fetch_and_add(&(rtshm->ustime.time_ms),0); + + +if (tStop-tStart>tMax) { + tMax=tStop-tStart; + printf("[logSave] t=%d tMax=%d n=%d\n",tStart,tMax,nbytes);fflush(stdout); +} + +if (LOG_ENTRY_PRINT>0) { + printf("[logSave] dt=%d tMax=%d\n",tStop-tStart,tMax); +} + +//printf("exiting: %d dt=%d tmax=%d\n",tstop,tstop-tstart,tmax);fflush(stdout); /* Output the error flag */ if (error == 1) { // clear the log buffer - (*logNRT)->lock=1; - (*logNRT)->writeIndex = 0; - (*logNRT)->readIndex = 0; - (*logNRT)->lock=0; +// (*logNRT)->lock=1; +// (*logNRT)->writeIndex = 0; +//__sync_fetch_and_add(&((*logNRT)->writeIndex),0-(*logNRT)->writeIndex); +//__sync_lock_test_and_set(&((*logNRT)->writeIndex),0); +__sync_fetch_and_and(&((*logNRT)->writeIndex),0); +// (*logNRT)->readIndex = 0; +//__sync_fetch_and_add(&((*logNRT)->readIndex),0-(*logNRT)->readIndex); +//__sync_lock_test_and_set(&((*logNRT)->readIndex),0); +__sync_fetch_and_and(&((*logNRT)->readIndex),0); +// (*logNRT)->lock=0; taskState->outputControlFlag[1-1]=1; } else @@ -415,14 +503,17 @@ void logSave(taskStateStruct *taskState, /* Output the done flag */ if (taskState->inputControlFlag[2-1]==1) { +//printf("---> %d %d\n",(*logNRT)->writeIndex,(*logNRT)->readIndex); printf("[logSave] saving last log file entry\n"); printf("[logSave] shutting down logger\n"); - if(shutdownFlashLogger((logDevInfo* )&(*logConfig)->ldi,logentry_nr)!=0) + if(shutdownFlashLogger(FLASH_LOGGER_DEV_NODE,(logDevInfo* )&(*logConfig)->ldi,logentry_nr)!=0) { printf("[logSave] error shutting down flashlogger\n"); } taskState->outputControlFlag[2-1]=1; } + + free(tmp_buffer); } @@ -446,7 +537,7 @@ void logCheckLogBuff(taskStateStruct *taskState, return; } - signed long n; + int64_t n; #ifdef FILL_LOG_WITH_STUFF static int count; @@ -490,49 +581,38 @@ void logReadLogConfig(taskStateStruct *taskState, return; } - static int initialized=0; - //char *configFileName = LOG_CONFIG_FILE; - + static logBookHousekeeping lh_data; int configResult = -1; -// printf("-> entering logReadLogConfig\n"); fflush(stdout); - /* Check memory allocation */ - // TODO do I need this ? .... coul - if (*logConfig == NULL) - { - printf("[logReadLogConfig] missing data:%p\n",*logConfig); fflush(stdout); - // TODO what should I do if this occurs ? - // I assume I need to return or set an error flag !???? - } - else - { // initialize flash_logger - if(!initialized) - { - (*logConfig)->write_trigger_size = WRITE_TRIGGER_SIZE ; // set the size at which writing to disk is triggered +// (*logConfig)->write_trigger_size = WRITE_TRIGGER_SIZE ; // set the size at which writing to disk is triggered printf("[logReadLogConfig] initializing HeliLogDeviceInfo.\n"); fflush(stdout); - if((&((*logConfig)->ldi))!=NULL) - { +// if((&((*logConfig)->ldi))!=NULL) +// { + configResult=readLogHousekeepingData(FLASH_LOGGER_DEV_NODE,&lh_data); + if (configResult==0) { +// (*logConfig)->ldi.dev=disk; + copyLogDevInfo((logDevInfo *)&((*logConfig)->ldi),&(lh_data.ldi)); + configResult=initFlashLogger(FLASH_LOGGER_DEV_NODE,&lh_data); + } +/* //fillHeliLogDeviceInfo((logDevInfo *)&((*logConfig)->ldi)); //printHeliLogDeviceInfo((logDevInfo *)&((*logConfig)->ldi)); //fflush(stdout); //if(checkLDIconsistency((logDevInfo *)&((*logConfig)->ldi))==0) //{ // configResult=1; - configResult= initFlashLogger((logDevInfo*)&((*logConfig)->ldi)); + configResult= initFlashLogger((logDevInfo*)&((*logConfig)->ldi),FLASH_LOGGER_DEV_NODE); printf("configresult %d\n",configResult); fflush(stdout); initialized=1; - } - } - } - -// TODO: what should happen when initialized==1 -// just return ?, return with error ? +*/ +// } -// check everything is ok at this point if (configResult ==0 ) { - printf("[logReadLogConfig] flash logger init succesful.\n"); +// (*logConfig)->write_trigger_size=0.95*lh_data.ldi.max_le_size; // set the size at which writing to disk is triggered + (*logConfig)->write_trigger_size=lh_data.ldi.max_le_size-1400; // set the size at which writing to disk is triggered + printf("[logReadLogConfig] flash logger init successful.\n"); taskState->outputControlFlag[1-1] = 1; } else diff --git a/examples/common/logging/logging_rt.c b/examples/common/logging/logging_rt.c index b9ceadf5585616229427ae86be044de3cc755a79..dba01859b3ce1fe8cb0df8a71960b99caf4f85b3 100644 --- a/examples/common/logging/logging_rt.c +++ b/examples/common/logging/logging_rt.c @@ -50,7 +50,7 @@ ************************************************************************** */ extern rtshm_struct *rtshm; -extern ProfileStruct profile; +//extern ProfileStruct profile; /* ************************************************************************** @@ -72,7 +72,8 @@ void logGetLogVar(taskStateStruct *taskState, (*log)->RingBufferSize=LOG_RINGBUFFER_SIZE; (*log)->writeIndex = 0; (*log)->readIndex = 0; - (*log)->lock = 0; +// (*log)->lock = 0; + rtshm->smiStart=smiStart; t2=GETTIME; if (t2-t1>taskState->duration) @@ -184,11 +185,11 @@ rt_printf("(%d %d)",leafStates[i],taskStateFlags[i]); } */ -// rt_printf("[logSMI] telem update\n"); +// rt_printf("[writeSmiTelem] telem update\n"); (*smiTelem)->sent=0; if (header==1) { // new state log (*smiTelem)->stateIndex=0; -//rt_printf("[logSMI] n=%d\n",numberOfStates); +//rt_printf("[writeSmiTelem] n=%d\n",numberOfStates); (*smiTelem)->smiIteration=smiIteration; (*smiTelem)->numberOfStates=numberOfStates; (*smiTelem)->state=0; @@ -234,7 +235,7 @@ void readSmiTelem(smiTelemStruct **smiTelem, logStruct **log) { } if (init==0) { if ((*smiTelem)->messageNumber!=messageNumber || (*smiTelem)->stateIndex!=index) { - rt_printf("[logSMI] lost debug data !!! %d %d %d %d\n", + rt_printf("[readSmiTelem] lost debug data !!! %d %d %d %d\n", (*smiTelem)->messageNumber,messageNumber,(*smiTelem)->stateIndex,index ); messageNumber=(*smiTelem)->messageNumber; @@ -310,14 +311,18 @@ int writeSmiLog(logStruct **log, unsigned int duration, RTIME t, int logFlag) { &previousNumberOfLeafStates, previousLeafStates, previousTaskStateFlags, FLASH_LOG_FILTER); - if (numberOfLeafStates>0) { + +//rt_printf("ch=%d_%d ",change,numberOfLeafStates); //rt_printf("%d_%d_%d ",it,iteration,change); + if (change<0) { - rt_printf("[logSMI] buffer overflow\n"); + rt_printf("[writeSmiLog] buffer overflow\n"); iteration=smiIteration; ret|=2; change=0; } + + if (numberOfLeafStates>0) { smiPrint(change,smiIteration,time,numberOfLeafStates, leafStates,taskStateFlags); if (change==1 && logFlag==1 && *log!=NULL) { @@ -337,7 +342,7 @@ int writeSmiLog(logStruct **log, unsigned int duration, RTIME t, int logFlag) { } } iteration++; - } + } t2=GETTIME; //printf("i=%d dt=%lld %d\n",it,t2-t1,duration); if (t2-t1>=duration) break; @@ -350,8 +355,9 @@ int writeSmiLog(logStruct **log, unsigned int duration, RTIME t, int logFlag) { void logSMI(taskStateStruct *taskState, + smiTelemStruct **smiTelem, // Read Optional logStruct **log, // Write Optional - smiTelemStruct **smiTelem // Write Optional + smiTelemStruct **smiTelem_ // Write Optional // Input Flags: writeSmiTelem readSmiTelem // Output Flags: logOverflow smiLogOverflow // RT @@ -367,69 +373,29 @@ void logSMI(taskStateStruct *taskState, if (*log!=NULL) logging=1; else logging=0; - if (*smiTelem!=NULL) { + if (*smiTelem_!=NULL) { if (taskState->inputControlFlag[1-1]==1) { // writeSmiTelem //rt_printf("[logSMI] writeSmiTelem\n"); writeSmiTelem(smiTelem); } + } + + if (*smiTelem!=NULL) { if (taskState->inputControlFlag[2-1]==1) { // readSmiTelem //rt_printf("[logSMI] readSmiTelem\n"); readSmiTelem(smiTelem,log); } } - i=writeSmiLog(log,taskState->duration,t,logging); - if ((i&1)==1) taskState->outputControlFlag[1-1]=1; - if ((i&2)==1) taskState->outputControlFlag[2-1]=1; - +// if (logging) { + i=writeSmiLog(log,taskState->duration,t,logging); + if ((i&1)!=0) taskState->outputControlFlag[1-1]=1; + if ((i&2)!=0) taskState->outputControlFlag[2-1]=1; +// } + #if(LOGGING_PROFILE) profile_stop(taskState,&taskProfile); #endif } -/* - ************************************************************************** - * WRITELOG - ************************************************************************** - */ -int writeLog(int *count, int div, unsigned char id, int size, unsigned char *data, logStruct *log) { - - signed long n; - n=0; - if (log->lock==0) { - if (*count%div==0) { - unsigned int w=log->writeIndex; - // calculate the number of bytes available for writing - n=log->readIndex+log->RingBufferSize-w; -//printf("@%d_%d ",size,n);fflush(stdout); - if (n<=size) { -#ifndef _NRT - rt_printf("[writeLog] overflow! data not written to log buffer #n=%ld;r=%ld;w=%ld \n",n,log->readIndex,log->writeIndex); -#else - printf("[writeLog] overflow! data not written to log buffer #n=%ld;r=%ld;w=%ld \n",n,log->readIndex,log->writeIndex); -#endif - return 1; - } else { - log->logBuf[w]=id; - if (w+size+1 < log->RingBufferSize) - { - // copy in one part - memcpy((unsigned char*) &(log->logBuf[w+1]),data,size); - w += size + 1; - - } else - { - // copy in two parts - memcpy((unsigned char*) &(log->logBuf[w+1]),data,log->RingBufferSize-w-1); - memcpy((unsigned char*) &(log->logBuf[0]),data+(log->RingBufferSize-w-1),size-(log->RingBufferSize-w-1)); - w += size + 1; - w = w - log->RingBufferSize; - } - } - log->writeIndex=w; - } - *count=*count+1; - } - return n; -} diff --git a/examples/common/logging/profile.c b/examples/common/logging/profile.c index fcabd479a58891021c7a711f1ef151f6a1841015..0e08793cea191fafe4ace02346039cf79bab65d4 100644 --- a/examples/common/logging/profile.c +++ b/examples/common/logging/profile.c @@ -33,9 +33,6 @@ * DEFINES ******************************************************************************* */ -#define PROFILE_ENABLE 1 -#define PROFILE_REPORT_OVERRUN 1 -#define PROFILE_DEBUG_LEVEL 1 /* ******************************************************************************* @@ -49,210 +46,11 @@ ProfileStruct profile; * FUNCTIONS ****************************************************************************** */ -inline RTIME profile_start(taskStateStruct *taskState, TaskProfileStruct *taskProfile) -{ - - - - /* Get the start time */ - taskProfile->tStart=GETTIME; - - /* Switch the profile state (most likely first for efficiency) */ - switch(taskProfile->state) - { - - case PROFILE_STATE_START: - - /* Increment the task profile runs and set next state */ - if(taskProfile->runs>=PROFILE_MAX_RUNS_PER_TASK) { - rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] profile of task %d finished with %d runs\n",taskState->stateID,taskProfile->runs); - taskProfile->state = PROFILE_STATE_FINISHED; - } else { - taskProfile->runs++; - taskProfile->state = PROFILE_STATE_STOP; - } - - - break; - - case PROFILE_STATE_FINISHED: - break; - - case PROFILE_STATE_INIT: - - /* Check if this is the first run */ - if (taskProfile->runs > 0) { - rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] error: task %d init state with %d runs\n",taskState->stateID,taskProfile->runs); - taskProfile->state = PROFILE_STATE_ERROR; - break; - } - - /* Set the task profile runs */ - taskProfile->runs = 1; - - /* Record the (initial) state ID and duration */ - - taskProfile->stateID = taskState->stateID; - taskProfile->duration = taskState->duration; - - /* Register the profiler */ - if (profile.tasks >= PROFILE_MAX_TASKS) { - rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] error: max profile tasks reached\n"); - } else { - profile.task[profile.tasks] = taskProfile; - taskProfile->index = profile.tasks; - profile.tasks++; - } - - /* Check for zero task duration */ - if (taskProfile->duration == 0) { - rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] error: task %d duration is 0 - setting to 1\n",taskProfile->stateID); - taskProfile->duration = 1; - } - - break; - - case PROFILE_STATE_ERROR: - break; - - case PROFILE_STATE_STOP: - - rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] error: stop state encountered\n"); - taskProfile->state = PROFILE_STATE_ERROR; - - break; - - default: - - rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] error: unknown state encountered\n"); - taskProfile->state = PROFILE_STATE_ERROR; - - break; - - } - - /* Return the start time */ - return taskProfile->tStart; - -} - -inline RTIME profile_stop(taskStateStruct *taskState, TaskProfileStruct *taskProfile) -{ - - RTIME tasktime; - - /* Get the first stop time */ - taskProfile->tStop=GETTIME; - - /* Calculate the difference */ - tasktime = taskProfile->tStop - taskProfile->tStart; - - /* Switch the profile state (most likely fist for efficiency) */ - switch(taskProfile->state) - { - - case PROFILE_STATE_STOP: - - /* Incriment overruns */ - if (tasktime>taskProfile->duration) { - taskProfile->overruns++; - #if(PROFILE_REPORT_OVERRUN) - rt_printf("[profile_stop] task state %d exceeded time with %lld\n",taskState->stateID,tasktime); - #endif - } - - /* Calculate the maximum and minimum */ - if (tasktime > taskProfile->maximum) { - taskProfile->maximum = tasktime; - } else if (tasktime < taskProfile->minimum) { - taskProfile->minimum = tasktime; - } - - /* Calculate the sum and sum squared */ - taskProfile->sum += tasktime; - taskProfile->sumsq += tasktime*tasktime; - - /* Set the state to start */ - taskProfile->state = PROFILE_STATE_START; - - break; - - case PROFILE_STATE_FINISHED: - - #if(PROFILE_REPORT_OVERRUN) - if (tasktime>taskProfile->duration) { - rt_printf("[profile_stop] task state %d exceeded time with %lld\n",taskState->stateID,tasktime); - } - #endif - - break; - - case PROFILE_STATE_INIT: - - /* Check if this is the first run */ - if (taskProfile->runs > 1) { - rt_debug(PROFILE_DEBUG_LEVEL,"[profile_stop] error: task %d init state with %d runs\n",taskState->stateID,taskProfile->runs); - taskProfile->state = PROFILE_STATE_ERROR; - break; - } - - /* Incriment overruns */ - if (tasktime>taskProfile->duration) { - taskProfile->overruns = 1; - #if(PROFILE_REPORT_OVERRUN) - rt_printf("[profile_stop] task state %d exceeded time with %lld\n",taskState->stateID,tasktime); - #endif - } else { - taskProfile->overruns = 0; - } - - /* Initalise overruns, sum, sumsq, maximum and minimum */ - if (tasktime>taskProfile->duration) { - taskProfile->overruns = 1; - #if(PROFILE_REPORT_OVERRUN) - rt_printf("[profile_stop] task state %d exceeded time with %lld\n",taskState->stateID,tasktime); - #endif - } else { - taskProfile->overruns = 0; - } - taskProfile->maximum = tasktime; - taskProfile->minimum = tasktime; - taskProfile->sum = tasktime; - taskProfile->sumsq = tasktime*tasktime; - - /* Set the state to start */ - taskProfile->state = PROFILE_STATE_START; - - break; - - case PROFILE_STATE_ERROR: - break; - - case PROFILE_STATE_START: - - rt_debug(PROFILE_DEBUG_LEVEL,"[profile_stop] error: start state encountered\n"); - taskProfile->state = PROFILE_STATE_ERROR; - - break; - - default: - - rt_debug(PROFILE_DEBUG_LEVEL,"[profile_stop] error: unknown state encountered\n"); - taskProfile->state = PROFILE_STATE_ERROR; - - break; - - } - - /* Return the overtime */ - return tasktime/(taskProfile->duration); - -} void profile_copy_log(TaskProfileStruct *taskProfile, TaskProfileLogStruct *taskProfileLog) { /* Copy the logged information */ - taskProfileLog->stateID = taskProfile->stateID; + taskProfileLog->taskID = taskProfile->taskID; taskProfileLog->runs = taskProfile->runs; taskProfileLog->overruns = taskProfile->overruns; taskProfileLog->duration = taskProfile->duration; @@ -272,3 +70,5 @@ void profile_copy_log(TaskProfileStruct *taskProfile, TaskProfileLogStruct *task + + diff --git a/examples/common/logging/profile.h b/examples/common/logging/profile.h index 37cc12f186bb5b092a0e2ee1508b6648e3513819..eb49f22010e6badd72590963831f50ea9503472b 100644 --- a/examples/common/logging/profile.h +++ b/examples/common/logging/profile.h @@ -28,6 +28,10 @@ * DEFINES ******************************************************************************* */ +#define PROFILE_ENABLE 1 +#define PROFILE_REPORT_OVERRUN 1 +#define PROFILE_DEBUG_LEVEL 1 + #define PROFILE_MAX_TASKS 256 #define PROFILE_MAX_RUNS_PER_TASK 1000000 @@ -43,22 +47,19 @@ * INCLUDES ******************************************************************************* */ -//#include "smi.h" -//#include "sys_def.h" - /* ******************************************************************************* * TYPES ******************************************************************************* */ -typedef struct { +typedef volatile struct { /* Profile settings */ unsigned char index; /* Task information */ - stateIDType stateID; + taskIDType taskID; /* Number of task executions */ unsigned char state; @@ -80,10 +81,10 @@ typedef struct { } TaskProfileStruct; -typedef struct { +typedef volatile struct __attribute__((__packed__)){ /* Task information */ - stateIDType stateID; + taskIDType taskID; unsigned int runs; /* Overrun (large duration) count */ @@ -111,9 +112,201 @@ typedef struct { * FUNCTIONS ******************************************************************************* */ -inline RTIME profile_start(taskStateStruct *taskState, TaskProfileStruct *taskProfile); -inline RTIME profile_stop(taskStateStruct *taskState, TaskProfileStruct *taskProfile); + +extern ProfileStruct profile; + +static RTIME profile_start(taskStateStruct *taskState, TaskProfileStruct *taskProfile) __attribute__((always_inline)); +static RTIME profile_stop(taskStateStruct *taskState, TaskProfileStruct *taskProfile) __attribute__((always_inline)); + void profile_copy_log(TaskProfileStruct *taskProfile, TaskProfileLogStruct *taskProfileLog); +inline static RTIME profile_start(taskStateStruct *taskState, TaskProfileStruct *taskProfile) +{ + + /* Get the start time */ + taskProfile->tStart=GETTIME; + + /* Switch the profile state (most likely first for efficiency) */ + switch(taskProfile->state) + { + + case PROFILE_STATE_START: + + /* Increment the task profile runs and set next state */ + if(taskProfile->runs>=PROFILE_MAX_RUNS_PER_TASK) { + rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] profile of task %d finished with %d runs\n",taskState->taskID,taskProfile->runs); + taskProfile->state = PROFILE_STATE_FINISHED; + } else { + taskProfile->runs++; + taskProfile->state = PROFILE_STATE_STOP; + } + + + break; + + case PROFILE_STATE_FINISHED: + break; + + case PROFILE_STATE_INIT: + + /* Check if this is the first run */ + if (taskProfile->runs > 0) { + rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] error: task %d init state with %d runs\n",taskState->taskID,taskProfile->runs); + taskProfile->state = PROFILE_STATE_ERROR; + break; + } + + /* Set the task profile runs */ + taskProfile->runs = 1; + + /* Record the (initial) state ID and duration */ + + taskProfile->taskID = taskState->taskID; + taskProfile->duration = taskState->duration; + + /* Register the profiler */ + if (profile.tasks >= PROFILE_MAX_TASKS) { + rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] error: max profile tasks reached\n"); + } else { + profile.task[profile.tasks] = taskProfile; + taskProfile->index = profile.tasks; + profile.tasks++; + } + + /* Check for zero task duration */ + if (taskProfile->duration == 0) { + rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] error: task %d duration is 0 - setting to 1\n",taskProfile->taskID); + taskProfile->duration = 1; + } + + break; + + case PROFILE_STATE_ERROR: + break; + + case PROFILE_STATE_STOP: + + rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] error: stop state encountered\n"); + taskProfile->state = PROFILE_STATE_ERROR; + + break; + + default: + + rt_debug(PROFILE_DEBUG_LEVEL,"[profile_start] error: unknown state encountered\n"); + taskProfile->state = PROFILE_STATE_ERROR; + + break; + + } + + /* Return the start time */ + return taskProfile->tStart; + +} + +inline static RTIME profile_stop(taskStateStruct *taskState, TaskProfileStruct *taskProfile) +{ + + RTIME tasktime; + /* Get the first stop time */ + taskProfile->tStop=GETTIME; + + /* Calculate the difference */ + tasktime = taskProfile->tStop - taskProfile->tStart; + + /* Switch the profile state (most likely first for efficiency) */ + switch(taskProfile->state) + { + + case PROFILE_STATE_STOP: + + /* Incriment overruns */ + if (tasktime>taskProfile->duration) { + taskProfile->overruns++; + #if(PROFILE_REPORT_OVERRUN) + rt_printf("[profile_stop1] task %d exceeded time; t_used=%lld\n",taskState->taskID,tasktime); + #endif + } + + /* Calculate the maximum and minimum */ + if (tasktime > taskProfile->maximum) { + taskProfile->maximum = tasktime; + } else if (tasktime < taskProfile->minimum) { + taskProfile->minimum = tasktime; + } + + /* Calculate the sum and sum squared */ + taskProfile->sum += tasktime; + taskProfile->sumsq += tasktime*tasktime; + + /* Set the state to start */ + taskProfile->state = PROFILE_STATE_START; + + break; + + case PROFILE_STATE_FINISHED: + + #if(PROFILE_REPORT_OVERRUN) + if (tasktime>taskProfile->duration) { + rt_printf("[profile_stop2] task %d exceeded time; t_used=%lld\n",taskState->taskID,tasktime); + } + #endif + + break; + + case PROFILE_STATE_INIT: + + /* Check if this is the first run */ + if (taskProfile->runs > 1) { + rt_debug(PROFILE_DEBUG_LEVEL,"[profile_stop] error: task %d init state with %d runs\n",taskState->taskID,taskProfile->runs); + taskProfile->state = PROFILE_STATE_ERROR; + break; + } + + /* Initalise overruns, sum, sumsq, maximum and minimum */ + if (tasktime>taskProfile->duration) { + taskProfile->overruns = 1; + #if(PROFILE_REPORT_OVERRUN) + rt_printf("[profile_stop3] task %d exceeded time; t_used=%lld\n",taskState->taskID,tasktime); + #endif + } else { + taskProfile->overruns = 0; + } + taskProfile->maximum = tasktime; + taskProfile->minimum = tasktime; + taskProfile->sum = tasktime; + taskProfile->sumsq = tasktime*tasktime; + + /* Set the state to start */ + taskProfile->state = PROFILE_STATE_START; + + break; + + case PROFILE_STATE_ERROR: + break; + + case PROFILE_STATE_START: + + rt_debug(PROFILE_DEBUG_LEVEL,"[profile_stop] error: start state encountered\n"); + taskProfile->state = PROFILE_STATE_ERROR; + + break; + + default: + + rt_debug(PROFILE_DEBUG_LEVEL,"[profile_stop] error: unknown state encountered\n"); + taskProfile->state = PROFILE_STATE_ERROR; + + break; + + } + +// /* Return the overtime */ +// return tasktime/(taskProfile->duration); +return tasktime; + +} + #endif /* _PROFILE */ diff --git a/examples/common/scripts/rtaistart.sh b/examples/common/scripts/rtaistart.sh index e7e29c5dc5bb05247422ec526eeaa652d7559739..0a468abac3339ec7ac9db1a20c8188c0cc1f5beb 100755 --- a/examples/common/scripts/rtaistart.sh +++ b/examples/common/scripts/rtaistart.sh @@ -5,6 +5,11 @@ ARG2=../smi/user.tss ARG3=../smi/user.tde ARG4=../smi/user.cfg +setserial /dev/ttyS0 uart none +setserial /dev/ttyS1 uart none +setserial /dev/ttyS2 uart none +setserial /dev/ttyS3 uart none + # CHECK FOR RUNNING PROCESSES if [ "$(pidof rt)" ] then @@ -41,6 +46,7 @@ insmod rtai_lxrt.ko cd $TMP export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/realtime/lib +sync ./rt & ./nrt $ARG1 $ARG2 $ARG3 $ARG4 rmmod rtai_lxrt diff --git a/examples/common/scripts/start.sh b/examples/common/scripts/start.sh.i7 similarity index 59% rename from examples/common/scripts/start.sh rename to examples/common/scripts/start.sh.i7 index 6980083547726b20c9702f03c8e98f5868226033..8c3db861517d1fdee852961c8ca01b3ee3f6e5ac 100755 --- a/examples/common/scripts/start.sh +++ b/examples/common/scripts/start.sh.i7 @@ -6,6 +6,11 @@ ARG2=../smi/user.tss ARG3=../smi/user.tde ARG4=../smi/user.cfg +# PREPARE THE SYSTEM +setserial /dev/ttyS0 uart none +setserial /dev/ttyS1 uart none +setserial /dev/ttyS2 uart none +setserial /dev/ttyS3 uart none # CHECK FOR RUNNING PROCESSES if [ "$(pidof rt)" ] @@ -26,10 +31,13 @@ then exit fi +# RUN THE STATE MACHINE +sync +cset shield -c 3 -k on -# PREPARE THE SYSTEM +#cset shield -e ./rt >/tmp/log_rt.txt & +#./nrt $ARG1 $ARG2 $ARG3 $ARG4 >/tmp/log_nrt.txt -# RUN SMI -./rt & +cset shield -e ./rt & ./nrt $ARG1 $ARG2 $ARG3 $ARG4 diff --git a/examples/common/serial/dio.h b/examples/common/serial/dio.h deleted file mode 100644 index 3d849026913e752537e8cdec31e77f7ea3be4580..0000000000000000000000000000000000000000 --- a/examples/common/serial/dio.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - ************************************************************************** - * Header FILE - ************************************************************************** - * - * dio.h - header file for the Microstrain 3DM-GX3 - * - * CSIRO - Heli Project - * - ************************************************************************** - */ - -/** - ************************************************************************** - * \file dio.h - * \brief na - * \author na - * \version na - * \date na - ************************************************************************** - */ - -#ifndef _dio_h -#define _dio_h - -/* - ************************************************************************** - * DEFINES - ************************************************************************** - */ - -#define DIO_LED_OFF 0x00 -#define DIO_LED_ON 0x01 -#define DIO_LED_SLOW_FLASH 0x02 -#define DIO_LED_FAST_FLASH 0x03 - - -/* - ************************************************************************** - * TYPEDEFS - ************************************************************************** - */ - -typedef volatile struct { - unsigned int time; - - unsigned char hokuyoSync; - unsigned char engineKill; - unsigned char ft; - unsigned char RCLoss; - unsigned char lowFuel; - - unsigned char powerFail; - unsigned char sscLoss; - unsigned char VRCPwrCheck; - unsigned char highFuel; - - unsigned char BLOS; - unsigned char pinSwitch; - unsigned char gpsPulse; - unsigned char pwrButton; - - unsigned char pumpSignal; - -} dioInStruct; - - -typedef volatile struct { - unsigned int time; - - unsigned char pwr12v; - unsigned char pwrHokuyo; - unsigned char pwrRadar; - unsigned char pump; - unsigned char faultStrobe; - unsigned char warningStrobe; - unsigned char camera1Shutter; - unsigned char camera2Shutter; - unsigned char led; - unsigned char rs485dir; - -#if PAYLOAD_REV1 || PAYLOAD_REV2 - unsigned char pwr24v; - unsigned char pwrAlt; - unsigned char pwrCamera; -#elif PAYLOAD_REV3 - unsigned char pwr12v_aux; - unsigned char pwr3v8_aux; - unsigned char pwr5v_aux; -#endif -} dioOutStruct; - - -typedef volatile struct { - unsigned int time; - unsigned int flags; - unsigned char pump; -} dioDataStruct; - -typedef volatile struct { - int com[12]; -} ioRegionIdListStruct; - - - - -/* - ************************************************************************** - * FUNCTION DEFINITIONS - ************************************************************************** - */ - - -void dioImmediateOutput(dioOutStruct *dioOut, int comRegion); - -/*_dio*/ -#endif diff --git a/examples/common/serial/dio_rt.c b/examples/common/serial/dio_rt.c deleted file mode 100644 index c499a274f805b42b8b9c883bcbb10cb3172e61cb..0000000000000000000000000000000000000000 --- a/examples/common/serial/dio_rt.c +++ /dev/null @@ -1,599 +0,0 @@ -/* - ************************************************************************** - * SOURCE FILE - ************************************************************************** - * - * dio.c - esm task source file for real-time DIO - * - * CSIRO - Heli Project - * - ************************************************************************** - */ - -/** - ************************************************************************** - * \file dio.c - * \brief na - * \author na - * \version na - * \date na - ************************************************************************** - */ - -/* - ************************************************************************** - * INCLUDES - ************************************************************************** - */ -#include <stdlib.h> -#include <sys/io.h> - - -#include "esminterf_ext.h" -#include "profile.h" -#include "services_io.h" -#include "serial_io.h" -#include "dio.h" -#include "rtshm.h" - -/* - ************************************************************************** - * DEFINES - ************************************************************************** - */ - -#define DIO_PROFILE 1 - -#define MCR_INIT (UART_16550_DTR | UART_16550_RTS) - -#define DIO_DISABLED 0x00 -#define DIO_IN_ENABLED 0x01 -#define DIO_OUT_ENABLED 0x02 - -#define fastFlash 100 -#define slowFlash 800 - -/* - ************************************************************************** - * TYPEDEFS - ************************************************************************** - */ -typedef struct { - unsigned char dtr; // output - unsigned char rts; // output - unsigned char dsr; // input - unsigned char cts; // input - unsigned char ri; // input - unsigned char dcd; // input -} tPortIOs; - -/* - ************************************************************************** - * GLOBALS - ************************************************************************** - */ -extern rtshm_struct *rtshm; - -dioInStruct dioInVar; -dioOutStruct dioOutVar; -ioRegionIdListStruct ioRegionIdListVar; - -static int dioEnabled[LAST_REGION_INDEX] = { - DIO_IN_ENABLED | DIO_OUT_ENABLED, //COM0, - DIO_IN_ENABLED | DIO_OUT_ENABLED, //COM1, - DIO_IN_ENABLED | DIO_OUT_ENABLED, //COM2, - DIO_IN_ENABLED | DIO_OUT_ENABLED, //COM3, - DIO_IN_ENABLED | DIO_OUT_ENABLED, //COM4, - DIO_IN_ENABLED | DIO_OUT_ENABLED, //COM5, - DIO_IN_ENABLED | DIO_OUT_ENABLED, //COM6, - DIO_IN_ENABLED | DIO_OUT_ENABLED, //COM7, - DIO_OUT_ENABLED, //COM8, - DIO_DISABLED, //COM9, - DIO_DISABLED, //COM10, - DIO_DISABLED //COM11, -}; - -static tPortIOs portIOs[LAST_REGION_INDEX]; - -/* - ************************************************************************** - * TASK FUNCTIONS - ************************************************************************** - */ - - -void getDioDataVar(taskStateStruct *taskState, - dioInStruct **dioIn, // Allocation Write Mandatory - dioOutStruct **dioOut, // Allocation Write Mandatory - ioRegionIdListStruct **ioRegionIdList // Allocation Write Mandatory - // Input Flags: - // Output Flags: error - // RT - // Oneshot -){ - int index,i; - int error = 0; - - for(index = 0; index < LAST_REGION_INDEX; index++){ - if(dioEnabled[index] != DIO_DISABLED){ - if(rtshm->regionList[index] == 0){ - rt_printf("[getDioDataVar] Error: port %d is enabled for DIO but the region is not allocated", index); - error = 1; - // keep looping so any ports enabled, but without regions allocated generate an error message - } - else { - outb(0x00, regionList[index].start + UART_16550_IER); // disable all interrupts - outb(MCR_INIT,regionList[index].start+UART_16550_MCR); // set default values for DTR and RTS - - //initComPort(regionList[index].start, 115200, 0, 1, 8); - } - - portIOs[index].dtr = 0; - portIOs[index].rts = 0; - } - } - - (*dioIn) = &(dioInVar); - (*dioOut) = &(dioOutVar); - - // Set initial values - // if not set will be one, which is what the hardware will already have initialised to - (*dioOut)->pwr12v=1; // Miconia flights + Laser -// (*dioOut)->pwr12v=0; // ridge - (*dioOut)->pwrHokuyo=0; - (*dioOut)->pwrRadar=0; - - (*dioOut)->pump=0; - (*dioOut)->warningStrobe=0; - (*dioOut)->faultStrobe=0; - (*dioOut)->camera1Shutter=0; - (*dioOut)->camera2Shutter=0; - (*dioOut)->led=0;//DIO_LED_OFF; - (*dioOut)->rs485dir=0; - - -#if PAYLOAD_REV1 || PAYLOAD_REV2 - (*dioOut)->pwr24v=0; - (*dioOut)->pwrAlt=0; - (*dioOut)->pwrCamera=0; -#elif PAYLOAD_REV3 - (*dioOut)->pwr12v_aux=1; - (*dioOut)->pwr3v8_aux=0; - (*dioOut)->pwr5v_aux=0; - (*dioOut)->rs485dir=1; -#endif - - -#if PAYLOAD_REV1 - ioRegionIdListVar.com[0]=COM0; - ioRegionIdListVar.com[1]=COM1; - ioRegionIdListVar.com[2]=COM2; - ioRegionIdListVar.com[3]=COM3; - ioRegionIdListVar.com[4]=COM4; - ioRegionIdListVar.com[5]=COM5; - ioRegionIdListVar.com[6]=COM6; - ioRegionIdListVar.com[7]=COM7; - ioRegionIdListVar.com[8]=COM8; -#elif PAYLOAD_REV2 || PAYLOAD_REV3 - ioRegionIdListVar.com[0]=COM4; - ioRegionIdListVar.com[1]=COM5; - ioRegionIdListVar.com[2]=COM6; - ioRegionIdListVar.com[3]=COM7; - ioRegionIdListVar.com[4]=COM0; - ioRegionIdListVar.com[5]=COM1; - ioRegionIdListVar.com[6]=COM2; - ioRegionIdListVar.com[7]=COM3; - ioRegionIdListVar.com[8]=COM8; - ioRegionIdListVar.com[8]=COM8; -#else -#error "PAYLOAD revision not correctly defined. Check heli_def.h" -#endif - - (*ioRegionIdList) = &(ioRegionIdListVar); - - for (i=0;i<=8;i++) - if (rtshm->regionList[ioRegionIdListVar.com[i]]!=2) { // 2-> region busy, but ok as shared with rs232 driver - if (rtshm->regionList[ioRegionIdListVar.com[i]]!=1) { - rt_printf("[getDioDataVar] com[%d] region not allocated\n",i); - error=1; - } - else if (regionList[ioRegionIdListVar.com[i]].size!=8) { - rt_printf("[getDioDataVar] com[%d] region size mismatch\n",i); - error=1; - } - } - - taskState->outputControlFlag[0] = error; -} - - -void mdio(taskStateStruct *taskState, - dioOutStruct **dioOut, // Read Mandatory - ioRegionIdListStruct **ioRegionIdList, // Read Mandatory - logStruct **log, // Write Optional - dioInStruct **dioIn // Write Mandatory - // Input Flags: quit ledon ledoff slowFlash fastFlash - // Output Flags: triggerOn triggerOff pinOut - // RT -) { - if (*dioOut==NULL) { - rt_printf("NULL: %d 1\n",taskState->stateID); - return; - } - if (*ioRegionIdList==NULL) { - rt_printf("NULL: %d 2\n",taskState->stateID); - return; - } - if (checkOptionalDataPort(log)==1 && *log==NULL) { - rt_printf("NULL: %d 3\n",taskState->stateID); - return; - } - if (*dioIn==NULL) { - rt_printf("NULL: %d 4\n",taskState->stateID); - return; - } - -#if(DIO_PROFILE) - static TaskProfileStruct taskProfile; - profile_start(taskState,&taskProfile); -#endif - - unsigned int flags; - static int logCount=0; - dioDataStruct dioLog; - unsigned char d; - int index; - - // if quit flag - if (taskState->inputControlFlag[0]==1){ - // set quit values for outputs; - //(*dioOut)->pwr12v=0; // don't change the 12 volt power setting - (*dioOut)->pwrHokuyo=0; - (*dioOut)->pwrRadar=0; - - (*dioOut)->pwrHokuyo=0; - (*dioOut)->pump=0; - (*dioOut)->warningStrobe=0; - (*dioOut)->faultStrobe=0; - (*dioOut)->camera2Shutter=0; // ricohShutter - (*dioOut)->camera1Shutter=0; // ptgreyShutter - (*dioOut)->led=DIO_LED_OFF; - (*dioOut)->pwrRadar=0; - (*dioOut)->rs485dir=0; - -#if PAYLOAD_REV1 || PAYLOAD_REV2 - (*dioOut)->pwr24v=0; - (*dioOut)->pwrAlt=0; - (*dioOut)->pwrCamera=0; - -#elif PAYLOAD_REV3 - //(*dioOut)->pwr12v_aux=1; - (*dioOut)->pwr3v8_aux=0; - (*dioOut)->pwr5v_aux=0; -#endif - - } - - // copy to individual outputs to the portIOs struct -//(*dioOut)->warningStrobe=(*dioOut)->faultStrobe=0; -#if PAYLOAD_REV1 || PAYLOAD_REV2 - - if ((*dioOut)->pwr12v) portIOs[(*ioRegionIdList)->com[0]].rts=1; else portIOs[(*ioRegionIdList)->com[0]].rts=0; - if ((*dioOut)->pwr24v) portIOs[(*ioRegionIdList)->com[0]].dtr=1; else portIOs[(*ioRegionIdList)->com[0]].dtr=0; - - if ((*dioOut)->pwrHokuyo) portIOs[(*ioRegionIdList)->com[1]].rts=1; else portIOs[(*ioRegionIdList)->com[1]].rts=0; - if ((*dioOut)->pump) portIOs[(*ioRegionIdList)->com[1]].dtr=1; else portIOs[(*ioRegionIdList)->com[1]].dtr=0; - - if ((*dioOut)->warningStrobe) portIOs[(*ioRegionIdList)->com[4]].dtr=1; else portIOs[(*ioRegionIdList)->com[4]].dtr=0; - if ((*dioOut)->faultStrobe) portIOs[(*ioRegionIdList)->com[4]].rts=1; else portIOs[(*ioRegionIdList)->com[4]].rts=0; - - if ((*dioOut)->camera2Shutter) portIOs[(*ioRegionIdList)->com[5]].dtr=1; else portIOs[(*ioRegionIdList)->com[5]].dtr=0; - if ((*dioOut)->camera1Shutter) portIOs[(*ioRegionIdList)->com[5]].rts=1; else portIOs[(*ioRegionIdList)->com[5]].rts=0; - - if ((*dioOut)->led) portIOs[(*ioRegionIdList)->com[6]].rts=1; else portIOs[(*ioRegionIdList)->com[6]].rts=0; - if ((*dioOut)->pwrCamera) portIOs[(*ioRegionIdList)->com[6]].dtr=1; else portIOs[(*ioRegionIdList)->com[6]].dtr=0; - - if ((*dioOut)->pwrAlt) portIOs[(*ioRegionIdList)->com[7]].rts=1; else portIOs[(*ioRegionIdList)->com[7]].rts=0; - if ((*dioOut)->pwrRadar) portIOs[(*ioRegionIdList)->com[7]].dtr=1; else portIOs[(*ioRegionIdList)->com[7]].dtr=0; - - if ((*dioOut)->rs485dir) portIOs[(*ioRegionIdList)->com[8]].rts=1; else portIOs[(*ioRegionIdList)->com[8]].rts=0; - -#elif PAYLOAD_REV3 - if ((*dioOut)->faultStrobe) portIOs[(*ioRegionIdList)->com[4]].rts=1; else portIOs[(*ioRegionIdList)->com[4]].rts=0; - if ((*dioOut)->warningStrobe) portIOs[(*ioRegionIdList)->com[4]].dtr=1; else portIOs[(*ioRegionIdList)->com[4]].dtr=0; - - if ((*dioOut)->pwrRadar) portIOs[(*ioRegionIdList)->com[5]].rts=1; else portIOs[(*ioRegionIdList)->com[5]].rts=0; - if ((*dioOut)->led) portIOs[(*ioRegionIdList)->com[5]].dtr=1; else portIOs[(*ioRegionIdList)->com[5]].dtr=0; - - if ((*dioOut)->pwrHokuyo) portIOs[(*ioRegionIdList)->com[6]].rts=1; else portIOs[(*ioRegionIdList)->com[6]].rts=0; - if ((*dioOut)->pump) portIOs[(*ioRegionIdList)->com[6]].dtr=1; else portIOs[(*ioRegionIdList)->com[6]].dtr=0; - - if ((*dioOut)->pwr12v) portIOs[(*ioRegionIdList)->com[7]].rts=1; else portIOs[(*ioRegionIdList)->com[7]].rts=0; - if ((*dioOut)->pwr12v_aux) portIOs[(*ioRegionIdList)->com[7]].dtr=1; else portIOs[(*ioRegionIdList)->com[7]].dtr=0; - - if ((*dioOut)->pwr5v_aux) portIOs[(*ioRegionIdList)->com[0]].rts=1; else portIOs[(*ioRegionIdList)->com[0]].rts=0; - if ((*dioOut)->pwr3v8_aux) portIOs[(*ioRegionIdList)->com[0]].dtr=1; else portIOs[(*ioRegionIdList)->com[0]].dtr=0; - - if ((*dioOut)->camera1Shutter) portIOs[(*ioRegionIdList)->com[3]].rts=1; else portIOs[(*ioRegionIdList)->com[3]].rts=0; - if ((*dioOut)->camera2Shutter) portIOs[(*ioRegionIdList)->com[3]].dtr=1; else portIOs[(*ioRegionIdList)->com[3]].dtr=0; - - if ((*dioOut)->rs485dir) portIOs[(*ioRegionIdList)->com[8]].rts=1; else portIOs[(*ioRegionIdList)->com[8]].rts=0; -#endif - - // Copy the inputs and outputs from the hardware to the portIOs struct. - // Each access of harware is slow as it is ISA bus so only make one operation for inputs and one - // operation for outputs to the actual hardware (i.e. copy the hardware to portIOs) and - // then copy the individual IOs to and from portIOs. - for(index = 0; index < LAST_REGION_INDEX; index++){ - if((dioEnabled[index] & DIO_IN_ENABLED) == DIO_IN_ENABLED){ - d=inb(regionList[index].start+UART_16550_MSR); - if ((d & UART_MSR_CTS)==0) portIOs[index].cts=0; else portIOs[index].cts=1; - if ((d & UART_MSR_DSR)==0) portIOs[index].dsr=0; else portIOs[index].dsr=1; - if ((d & UART_MSR_RI)==0) portIOs[index].ri=0; else portIOs[index].ri=1; - if ((d & UART_MSR_DCD)==0) portIOs[index].dcd=0; else portIOs[index].dcd=1; - } - - if((dioEnabled[index] & DIO_OUT_ENABLED) == DIO_OUT_ENABLED){ - d = UART_16550_Out1 | UART_16550_Out2; - - if(portIOs[index].rts){ - d |= UART_16550_RTS; - } - - if(portIOs[index].dtr){ - d |= UART_16550_DTR; - } - outb(d,regionList[index].start+UART_16550_MCR); - } - } - - // copy individual inputs from the portIOs struct - - -#if PAYLOAD_REV1 || PAYLOAD_REV3 - if (portIOs[(*ioRegionIdList)->com[4]].dcd) (*dioIn)->engineKill=0; else (*dioIn)->engineKill=1; - if (portIOs[(*ioRegionIdList)->com[4]].dsr) (*dioIn)->ft=0; else (*dioIn)->ft=1; - if (portIOs[(*ioRegionIdList)->com[4]].cts) (*dioIn)->RCLoss=0; else (*dioIn)->RCLoss=1; - if (portIOs[(*ioRegionIdList)->com[4]].ri) (*dioIn)->lowFuel=0; else (*dioIn)->lowFuel=1; -#elif PAYLOAD_REV2 - if (portIOs[(*ioRegionIdList)->com[4]].dcd) (*dioIn)->engineKill=0; else (*dioIn)->engineKill=1; - if (portIOs[(*ioRegionIdList)->com[4]].dsr) (*dioIn)->ft=0; else (*dioIn)->ft=1; - if (portIOs[(*ioRegionIdList)->com[4]].cts) (*dioIn)->powerFail=0; else (*dioIn)->powerFail=1; - if (portIOs[(*ioRegionIdList)->com[4]].ri) (*dioIn)->sscLoss=0; else (*dioIn)->sscLoss=1; -#endif - -#if PAYLOAD_REV1 - if (portIOs[(*ioRegionIdList)->com[5]].dcd) (*dioIn)->powerFail=0; else (*dioIn)->powerFail=1; - if (portIOs[(*ioRegionIdList)->com[5]].dsr) (*dioIn)->sscLoss=0; else (*dioIn)->sscLoss=1; - if (portIOs[(*ioRegionIdList)->com[5]].cts) (*dioIn)->VRCPwrCheck=0; else (*dioIn)->VRCPwrCheck=1; - if (portIOs[(*ioRegionIdList)->com[5]].ri) (*dioIn)->highFuel=1; else (*dioIn)->highFuel=0; -#elif PAYLOAD_REV2 - if (portIOs[(*ioRegionIdList)->com[5]].dcd) (*dioIn)->RCLoss=0; else (*dioIn)->RCLoss=1; - if (portIOs[(*ioRegionIdList)->com[5]].dsr) (*dioIn)->lowFuel=0; else (*dioIn)->lowFuel=1; - if (portIOs[(*ioRegionIdList)->com[5]].cts) (*dioIn)->VRCPwrCheck=0; else (*dioIn)->VRCPwrCheck=1; - if (portIOs[(*ioRegionIdList)->com[5]].ri) (*dioIn)->highFuel=1; else (*dioIn)->highFuel=0; -#elif PAYLOAD_REV3 - if (portIOs[(*ioRegionIdList)->com[5]].dcd) (*dioIn)->powerFail=0; else (*dioIn)->powerFail=1; - if (portIOs[(*ioRegionIdList)->com[5]].dsr) (*dioIn)->sscLoss=0; else (*dioIn)->sscLoss=1; - if (portIOs[(*ioRegionIdList)->com[5]].cts) (*dioIn)->VRCPwrCheck=0; else (*dioIn)->VRCPwrCheck=1; - if (portIOs[(*ioRegionIdList)->com[5]].ri) (*dioIn)->highFuel=1; else (*dioIn)->highFuel=0; -//rt_printf("%d ",(*dioIn)->highFuel); -#endif - -#if PAYLOAD_REV1 || PAYLOAD_REV2 - if (portIOs[(*ioRegionIdList)->com[6]].dcd) (*dioIn)->pinSwitch=1; else (*dioIn)->pinSwitch=0; - if (portIOs[(*ioRegionIdList)->com[6]].dsr) (*dioIn)->pinSwitch=1; else (*dioIn)->pinSwitch=0; - if (portIOs[(*ioRegionIdList)->com[6]].cts) (*dioIn)->gpsPulse=0; else (*dioIn)->gpsPulse=1; -#elif PAYLOAD_REV3 - if (portIOs[(*ioRegionIdList)->com[6]].dcd) (*dioIn)->BLOS=0; else (*dioIn)->BLOS=1; - if (portIOs[(*ioRegionIdList)->com[6]].dsr) (*dioIn)->pinSwitch=1; else (*dioIn)->pinSwitch=0; - if (portIOs[(*ioRegionIdList)->com[6]].cts) (*dioIn)->pwrButton=0; else (*dioIn)->pwrButton=1; - if (portIOs[(*ioRegionIdList)->com[6]].ri) (*dioIn)->gpsPulse=1; else (*dioIn)->gpsPulse=0; -#endif - - -#if PAYLOAD_REV1 || PAYLOAD_REV2 - if (portIOs[(*ioRegionIdList)->com[7]].dcd) (*dioIn)->pumpSignal=0; else (*dioIn)->pumpSignal=1; -#elif PAYLOAD_REV3 - if (portIOs[(*ioRegionIdList)->com[0]].dcd) (*dioIn)->pumpSignal=0; else (*dioIn)->pumpSignal=1; - if (portIOs[(*ioRegionIdList)->com[0]].dsr) (*dioIn)->hokuyoSync=0; else (*dioIn)->hokuyoSync=1; -#endif - - (*dioIn)->time = GETTIME_MS; - (*dioOut)->time = (*dioIn)->time; - - - // set the output control flags -//rt_printf("%d ",(*dioIn)->pinSwitch); - if ((*dioIn)->pinSwitch==0) taskState->outputControlFlag[3-1]=1; - - // logging - flags=0; - if ((*dioIn)->engineKill) flags|=HELI_FT_FLAG_ENGINE_KILL; - if ((*dioIn)->ft) flags|=HELI_FT_FLAG_TERMINATION; - if ((*dioIn)->RCLoss) flags|=HELI_FT_FLAG_RC_LOSS; - if ((*dioIn)->lowFuel) flags|=HELI_FT_FLAG_LOW_FUEL; - if ((*dioIn)->powerFail) flags|=HELI_FT_FLAG_POWER_FAIL; - if ((*dioIn)->sscLoss) flags|=HELI_FT_FLAG_SSC_LOSS; - if ((*dioIn)->VRCPwrCheck) flags|=HELI_FT_FLAG_POWER_CHECK; - if ((*dioIn)->highFuel) flags|=HELI_FT_FLAG_HIGH_FUEL; - - dioLog.time=(*dioIn)->time; - dioLog.flags=flags; - dioLog.pump=(*dioOut)->pump; - - if (*log!=NULL) { - writeLog(&logCount, 1, DIO_LOGID, sizeof(dioDataStruct), (unsigned char *)&dioLog, (*log)); - } - -//exit: -#if(DIO_PROFILE) - profile_stop(taskState,&taskProfile); -#endif - ; -} - - -void dioEnablePower(taskStateStruct *taskState, - dioOutStruct **dioOut // Write Mandatory - // Input Flags: pwr12v pwr12v_aux pwrHokuyo pwr3v8_aux pwr5v_aux pwrRadar - // Output Flags: - // RT - // Oneshot -) { - if (*dioOut==NULL) { - rt_printf("NULL: %d 1\n",taskState->stateID); - return; - } - - if (taskState->inputControlFlag[0]==1){ - (*dioOut)->pwr12v=1; - rt_printf("[dioEnablePower] enable pwr12v\n"); - } - - if (taskState->inputControlFlag[2]==1){ - (*dioOut)->pwrHokuyo=1; - rt_printf("[dioEnablePower] enable pwrHokuyo\n"); - } - - if (taskState->inputControlFlag[5]==1){ - (*dioOut)->pwrRadar=1; - (*dioOut)->led=DIO_LED_ON; - rt_printf("[dioEnablePower] enable pwrRadar\n"); - } - -#if PAYLOAD_REV3 - if (taskState->inputControlFlag[1]==1){ - (*dioOut)->pwr12v_aux=1; - rt_printf("[dioEnablePower] enable pwr12v_aux\n"); - } - - if (taskState->inputControlFlag[3]==1){ - (*dioOut)->pwr3v8_aux=1; - rt_printf("[dioEnablePower] enable pwr3v8_aux\n"); - } - - if (taskState->inputControlFlag[4]==1){ - (*dioOut)->pwr5v_aux=1; - rt_printf("[dioEnablePower] enable pwr5v_aux\n"); - } -#endif -} - - -void dioDisablePower(taskStateStruct *taskState, - dioOutStruct **dioOut // Write Mandatory - // Input Flags: pwr12v pwr12v_aux pwrHokuyo pwr3v8_aux pwr5v_aux pwrRadar - // Output Flags: - // RT - // Oneshot -) { - if (*dioOut==NULL) { - rt_printf("NULL: %d 5\n",taskState->stateID); - return; - } - - if (taskState->inputControlFlag[0]==1){ - (*dioOut)->pwr12v=0; - rt_printf("[dioDisablePower] disable pwr12v\n"); - } - - if (taskState->inputControlFlag[2]==1){ - (*dioOut)->pwrHokuyo=0; - rt_printf("[dioDisablePower] disable pwrHokuyo\n"); - } - - if (taskState->inputControlFlag[5]==1){ - (*dioOut)->pwrRadar=0; - (*dioOut)->led=DIO_LED_OFF; - rt_printf("[dioDisablePower] disable pwrRadar\n"); - } - -#if PAYLOAD_REV3 - if (taskState->inputControlFlag[1]==1){ - (*dioOut)->pwr12v_aux=0; - rt_printf("[dioDisablePower] disable pwr12v_aux\n"); - } - - if (taskState->inputControlFlag[3]==1){ - (*dioOut)->pwr3v8_aux=0; - rt_printf("[dioDisablePower] disable pwr3v8_aux\n"); - } - - if (taskState->inputControlFlag[4]==1){ - (*dioOut)->pwr5v_aux=0; - rt_printf("[dioDisablePower] disable pwr5v_aux\n"); - } -#endif -} - -void dioImmediateOutput(dioOutStruct *dioOut, int comRegion) -{ - int hardwareRegion; - unsigned char d; - - if(comRegion >= LAST_REGION_INDEX){ - return; - } - // translate from the system com number to the hardware com number - hardwareRegion = ioRegionIdListVar.com[comRegion]; - - - // no easy way to tell which outputs from dioOut to copy so copy them all to portIOs - -#if PAYLOAD_REV1 || PAYLOAD_REV2 - if ((dioOut)->pwr12v) portIOs[ioRegionIdListVar.com[0]].rts=1; else portIOs[ioRegionIdListVar.com[0]].rts=0; - if ((dioOut)->pwr24v) portIOs[ioRegionIdListVar.com[0]].dtr=1; else portIOs[ioRegionIdListVar.com[0]].dtr=0; - if ((dioOut)->pwrHokuyo) portIOs[ioRegionIdListVar.com[1]].rts=1; else portIOs[ioRegionIdListVar.com[1]].rts=0; - if ((dioOut)->pump) portIOs[ioRegionIdListVar.com[1]].dtr=1; else portIOs[ioRegionIdListVar.com[1]].dtr=0; - if ((dioOut)->warningStrobe) portIOs[ioRegionIdListVar.com[4]].dtr=1; else portIOs[ioRegionIdListVar.com[4]].dtr=0; - if ((dioOut)->faultStrobe) portIOs[ioRegionIdListVar.com[4]].rts=1; else portIOs[ioRegionIdListVar.com[4]].rts=0; - if ((dioOut)->camera2Shutter) portIOs[ioRegionIdListVar.com[5]].dtr=1; else portIOs[ioRegionIdListVar.com[5]].dtr=0; - if ((dioOut)->camera1Shutter) portIOs[ioRegionIdListVar.com[5]].rts=1; else portIOs[ioRegionIdListVar.com[5]].rts=0; - if ((dioOut)->led) portIOs[ioRegionIdListVar.com[6]].rts=1; else portIOs[ioRegionIdListVar.com[6]].rts=0; - if ((dioOut)->pwrCamera) portIOs[ioRegionIdListVar.com[6]].dtr=1; else portIOs[ioRegionIdListVar.com[6]].dtr=0; - if ((dioOut)->pwrAlt) portIOs[ioRegionIdListVar.com[7]].rts=1; else portIOs[ioRegionIdListVar.com[7]].rts=0; - if ((dioOut)->pwrRadar) portIOs[ioRegionIdListVar.com[7]].dtr=1; else portIOs[ioRegionIdListVar.com[7]].dtr=0; - - if ((dioOut)->rs485dir) portIOs[ioRegionIdListVar.com[8]].rts=1; else portIOs[ioRegionIdListVar.com[8]].rts=0; - -#elif PAYLOAD_REV3 - - if ((dioOut)->faultStrobe) portIOs[ioRegionIdListVar.com[4]].rts=1; else portIOs[ioRegionIdListVar.com[4]].rts=0; - if ((dioOut)->warningStrobe) portIOs[ioRegionIdListVar.com[4]].dtr=1; else portIOs[ioRegionIdListVar.com[4]].dtr=0; - - if ((dioOut)->pwrRadar) portIOs[ioRegionIdListVar.com[5]].rts=1; else portIOs[ioRegionIdListVar.com[5]].rts=0; - if ((dioOut)->led) portIOs[ioRegionIdListVar.com[5]].dtr=1; else portIOs[ioRegionIdListVar.com[5]].dtr=0; - - if ((dioOut)->pwrHokuyo) portIOs[ioRegionIdListVar.com[6]].rts=1; else portIOs[ioRegionIdListVar.com[6]].rts=0; - if ((dioOut)->pump) portIOs[ioRegionIdListVar.com[6]].dtr=1; else portIOs[ioRegionIdListVar.com[6]].dtr=0; - - if ((dioOut)->pwr12v) portIOs[ioRegionIdListVar.com[7]].rts=1; else portIOs[ioRegionIdListVar.com[7]].rts=0; - if ((dioOut)->pwr12v_aux) portIOs[ioRegionIdListVar.com[7]].dtr=1; else portIOs[ioRegionIdListVar.com[7]].dtr=0; - - if ((dioOut)->pwr5v_aux) portIOs[ioRegionIdListVar.com[0]].rts=1; else portIOs[ioRegionIdListVar.com[0]].rts=0; - if ((dioOut)->pwr3v8_aux) portIOs[ioRegionIdListVar.com[0]].dtr=1; else portIOs[ioRegionIdListVar.com[0]].dtr=0; - - if ((dioOut)->camera1Shutter) portIOs[ioRegionIdListVar.com[3]].rts=1; else portIOs[ioRegionIdListVar.com[3]].rts=0; - if ((dioOut)->camera2Shutter) portIOs[ioRegionIdListVar.com[3]].dtr=1; else portIOs[ioRegionIdListVar.com[3]].dtr=0; - - if ((dioOut)->rs485dir) portIOs[ioRegionIdListVar.com[8]].rts=1; else portIOs[ioRegionIdListVar.com[8]].rts=0; -#endif - - // just write the desired output COM to the hardware - if((dioEnabled[hardwareRegion] & DIO_OUT_ENABLED) == DIO_OUT_ENABLED){ - - d = UART_16550_Out1 | UART_16550_Out2; - - if(portIOs[hardwareRegion].rts){ - d |= UART_16550_RTS; - } - - if(portIOs[hardwareRegion].dtr){ - d |= UART_16550_DTR; - } - outb(d,regionList[hardwareRegion].start+UART_16550_MCR); - } - -} - diff --git a/examples/common/serial/serial.c b/examples/common/serial/serial.c index c8025171f05cc4e97a23d09c6e7f98c36138ecf6..dd79050ce534146bc9075d7e0c683932fd1f0c0c 100644 --- a/examples/common/serial/serial.c +++ b/examples/common/serial/serial.c @@ -31,7 +31,8 @@ #include "smi.h" -#include "services_io.h" +#include "esminterf_ext.h" +//#include "services_io.h" #include "serial_io.h" #include "serial.h" #include "rtshm.h" @@ -41,7 +42,10 @@ * GLOBALS ************************************************************************** */ +#define IO_TIMING 1 + extern rtshm_struct *rtshm; +extern RTIME maxIoTime; int iFifoSize; @@ -74,7 +78,7 @@ void enableFifo(int iBase, char cTrigger) { /* initialize com ports */ void initComPort(unsigned int uiBase, int iBaud, unsigned int uiParity, - unsigned int uiStopbits, unsigned int uiWordlength) { + unsigned int uiStopbits, unsigned int uiWordlength, int mcr) { unsigned int uiDivider; unsigned char ucPar; @@ -105,7 +109,8 @@ void initComPort(unsigned int uiBase, int iBaud, unsigned int uiParity, outb(0x07, uiBase + UART_16550_FCR); /* set DTR, RTS, OUT1, OUT2 (OUT2 -> IRQ enable ?) */ - outb(0x0F, uiBase + UART_16550_MCR); +// if (mcr==1) outb(0x0F, uiBase + UART_16550_MCR); + if (mcr==1) outb(UART_16550_Out1 | UART_16550_Out2, uiBase + UART_16550_MCR); /* // disable sleep mode of 16C2850 (Athena II) @@ -123,6 +128,11 @@ void readCom_(int *ioRegionId, comRStruct *comRead, int numberOfBytes, RTIME t) unsigned char cSta, cData; int i; int com_irbp; +#ifndef _NRT +#if (IO_TIMING) + RTIME t1,t2; +#endif +#endif if (rtshm->regionList[*ioRegionId]!=2) return; @@ -153,9 +163,22 @@ void readCom_(int *ioRegionId, comRStruct *comRead, int numberOfBytes, RTIME t) i = 0; while ((cSta & DATA_READY) && i < numberOfBytes) { comRead->comTime[com_irbp]=t; +#ifndef _NRT +#if (IO_TIMING) +t1=GETTIME; +#endif +#endif cData = inb(regionList[*ioRegionId].start + UART_16550_RXB); +#ifndef _NRT +#if (IO_TIMING) +t2=GETTIME; +if (t2-t1>maxIoTime) maxIoTime=t2-t1; +#endif +#endif + + //debug read -//if (regionList[*ioRegionId].start==0x238) +//if (regionList[*ioRegionId].start==0x3f8) //rt_printf("r%02X ",cData); //rt_printf("r%02X_%d ",cData,GETTIME_MS); comRead->comReadBuf[com_irbp]=cData; @@ -231,6 +254,12 @@ int writeCom_(int *ioRegionId, comWStruct *comWrite, int numberOfBytes, int ctsC unsigned char ucSta, ucData, ucCts; int i; int com_iwbp; +#ifndef _NRT +#if (IO_TIMING) + RTIME t1,t2; +#endif +#endif + if (rtshm->regionList[*ioRegionId]!=2) return(0); @@ -259,11 +288,23 @@ int writeCom_(int *ioRegionId, comWStruct *comWrite, int numberOfBytes, int ctsC while ((ucCts==1) && i < numberOfBytes && (com_iwbp != comWrite->com_awbp)) { ucData = comWrite->comWriteBuf[com_iwbp]; - outb(ucData,regionList[*ioRegionId].start + UART_16550_TXB); +#ifndef _NRT +#if (IO_TIMING) +t1=GETTIME; +#endif +#endif + outb(ucData,regionList[*ioRegionId].start + UART_16550_TXB); +#ifndef _NRT +#if (IO_TIMING) +t2=GETTIME; +if (t2-t1>maxIoTime) maxIoTime=t2-t1; +#endif +#endif + // debug write -//if (regionList[*ioRegionId].start==0x238) -//rt_printf("w%02X_%d ",ucData,GETTIME_MS); +//if (regionList[*ioRegionId].start==0x220) //rt_printf("w%02X ",ucData); +//rt_printf("w%02X_%d ",ucData,GETTIME_MS); com_iwbp++; if (com_iwbp == COM_WBSIZE) com_iwbp = 0; i++; diff --git a/examples/common/serial/serial.h b/examples/common/serial/serial.h index f08f1c4b9519d576e298102e416089d835705a33..3c5a9070edc70dad962d375cb56a11a168ab1667 100644 --- a/examples/common/serial/serial.h +++ b/examples/common/serial/serial.h @@ -81,7 +81,7 @@ void enableFifo(int iBase, char cTrigger); /* initialize com ports */ void initComPort(unsigned int uiBase, int iBaud, unsigned int uiParity, - unsigned int uiStopbits, unsigned int uiWordlength); + unsigned int uiStopbits, unsigned int uiWordlength, int mcr); /* read com port */ void readCom_(int *ioRegionId, comRStruct *comRead, int numberOfBytes, RTIME t); diff --git a/examples/common/serial/serial_nrt.c b/examples/common/serial/serial_nrt.c new file mode 100644 index 0000000000000000000000000000000000000000..fc72c7610a84eba8294a3569b5913280464223ad --- /dev/null +++ b/examples/common/serial/serial_nrt.c @@ -0,0 +1,909 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * serial_nrt.c - esm task source file for real-time serial + * + * CSIRO - Heli Project + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file serial_nrt.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ +#include <stdlib.h> +#include <sys/io.h> +//#include <stdio.h> + +#include "esminterf_ext.h" +//#include "services_io.h" +#include "profile.h" +#include "serial_io.h" +#include "rtshm.h" + +/* + ************************************************************************** + * DEFINES + ************************************************************************** + */ +/* Default serial port setup */ +#define SERIAL_BAUD_DEFAULT 9600 +#define SERIAL_DATA_DEFAULT 8 +#define SERIAL_PARITY_DEFAULT UART_16550_PARITY_NONE +#define SERIAL_STOP_DEFAULT 1 + +#define SERIAL_PROFILE 1 + +/* + ************************************************************************** + * GLOBALS + ************************************************************************** + */ +extern rtshm_struct *rtshm; + +/* + ************************************************************************** + * TASK FUNCTIONS + ************************************************************************** + */ +void serialOpenComPort(taskStateStruct *taskState, + comStruct **comPar, // Read Mandatory + int **ioRegionId // Read Mandatory + // Input Flags: noMCR + // Output Flags: done requestFail notAvailable + // RT + // Oneshot +) { + int mcr=1; + + if (*comPar==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + profile_start(taskState,&taskProfile); +#endif + + if (taskState->inputControlFlag[1-1]==1) mcr=0; + + rt_printf("[serialOpenComPort] ioRegionId=%d COM%d init %d\n",**ioRegionId,(*comPar)->ID, + rtshm->regionList[**ioRegionId]); + + if (rtshm->regionList[**ioRegionId]==0) { + rt_printf("[serialOpenComPort] COM%d region not allocated\n",(*comPar)->ID); + taskState->outputControlFlag[2-1]=1; + goto exit; + } + + if (rtshm->regionList[**ioRegionId]==2) { + rt_printf("[serialOpenComPort] COM%d region busy\n",(*comPar)->ID); + taskState->outputControlFlag[2-1]=1; + goto exit; + } + + if (regionList[**ioRegionId].size!=8) { + rt_printf("[serialOpenComPort] COM%d region size mismatch\n",(*comPar)->ID); + taskState->outputControlFlag[2-1]=1; + goto exit; + } + + rtshm->regionList[**ioRegionId]=2; + + initComPort(regionList[**ioRegionId].start, 0, 0, 0, 0, mcr); // clear interrupts + + rt_printf("[serialOpenComPort] Region OK for COM%d %04x\n",(*comPar)->ID,regionList[**ioRegionId].start); + outb(0x12,regionList[**ioRegionId].start + UART_16550_SCR); +//rt_printf("%04x %02x\n",regionList[**ioRegionId].start,inb(regionList[**ioRegionId].start + UART_16550_SCR)); + if (inb(regionList[**ioRegionId].start + UART_16550_SCR) != 0x12) { + rtshm->regionList[**ioRegionId]=1; + rt_printf("[serialOpenComPort] COM%d not available\n",(*comPar)->ID); + taskState->outputControlFlag[3-1]=1; + goto exit; + } + + initComPort(regionList[**ioRegionId].start,(*comPar)->baud,(*comPar)->parity,(*comPar)->stopbits,(*comPar)->wordlength, mcr); + + taskState->outputControlFlag[1-1]=1; + + rt_printf("[serialOpenComPort] COM%d initialised\n",(*comPar)->ID); + +exit: +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +void serialCloseComPort(taskStateStruct *taskState, + int **ioRegionId // Read Optional + // Input Flags: noMCR + // Output Flags: + // RT + // Oneshot +) { +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + profile_start(taskState,&taskProfile); +#endif + + int mcr=1; + if (taskState->inputControlFlag[1-1]==1) mcr=0; + + if (*ioRegionId!=NULL) { + if (rtshm->regionList[**ioRegionId]==2) { + initComPort(regionList[**ioRegionId].start, 0, 0, 0, 0, mcr); + rtshm->regionList[**ioRegionId]=1; + rt_printf("[serialCloseComPort] %04X closed\n",regionList[**ioRegionId].start); + } + } + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + + +/* + ************************************************************************** + * READ COM TASK FUNCTIONS + ************************************************************************** + */ + +/* read com port */ +void serialReadCom6B(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comRStruct **comRead // Write Mandatory + // Input Flags: + // Output Flags: + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comRead==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + RTIME t1 = profile_start(taskState,&taskProfile); +#else + RTIME t1 = GETTIME; +#endif + + readCom_(*ioRegionId,*comRead,6,t1); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +/* read com port */ +void serialReadCom12B(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comRStruct **comRead // Write Mandatory + // Input Flags: + // Output Flags: + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comRead==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + RTIME t1 = profile_start(taskState,&taskProfile); +#else + RTIME t1 = GETTIME; +#endif + + readCom_(*ioRegionId,*comRead,12,t1); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +/* + ************************************************************************** + * WRITE COM TASK FUNCTIONS + ************************************************************************** + */ + +/* write data from buffer to com port */ +void serialWriteCom5B(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comWStruct **comWrite // Write Mandatory + // Input Flags: + // Output Flags: overrun + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comWrite==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + profile_start(taskState,&taskProfile); +#endif + + taskState->outputControlFlag[1-1]=writeCom_(*ioRegionId,*comWrite,5,0); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +/* write data from buffer to com port */ +void serialWriteCom5BCts(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comWStruct **comWrite // Write Mandatory + // Input Flags: + // Output Flags: overrun + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comWrite==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + profile_start(taskState,&taskProfile); +#endif + + taskState->outputControlFlag[1-1]=writeCom_(*ioRegionId,*comWrite,5,1); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + + +/* write data from buffer to com port */ +void serialWriteCom10B(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comWStruct **comWrite // Write Mandatory + // Input Flags: + // Output Flags: overrun + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comWrite==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + profile_start(taskState,&taskProfile); +#endif + taskState->outputControlFlag[1-1]=writeCom_(*ioRegionId,*comWrite,10,0); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +/* + ************************************************************************** + * READ/WRITE COM TASK FUNCTIONS + ************************************************************************** + */ +/* read and write data from buffer to com port */ +void serialReadWriteCom12B10B(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comRStruct **comRead, // Write Mandatory + comWStruct **comWrite // Write Mandatory + // Input Flags: check + // Output Flags: overrun + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comRead==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + if (*comWrite==NULL) { + rt_printf("NULL: %d 3\n",taskState->stateID); + return; + } + + static RTIME tlast=0; +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + RTIME t1 = profile_start(taskState,&taskProfile); +#else + RTIME t1 = GETTIME; +#endif + + if (taskState->inputControlFlag[1-1]) { + if (t1-tlast>1100000 && tlast!=0) +rt_printf("[serial_rt.c] timing error %dus\n",(t1-tlast)/1000); + tlast=t1; + } + + readCom_(*ioRegionId,*comRead,12,t1); + taskState->outputControlFlag[1-1]=writeCom_(*ioRegionId,*comWrite,10,0); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +/* read and write data from buffer to com port */ +void serialReadWriteCom12B5B(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comRStruct **comRead, // Write Mandatory + comWStruct **comWrite // Write Mandatory + // Input Flags: + // Output Flags: overrun + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comRead==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + if (*comWrite==NULL) { + rt_printf("NULL: %d 3\n",taskState->stateID); + return; + } + + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + RTIME t1 = profile_start(taskState,&taskProfile); +#else + RTIME t1 = GETTIME; +#endif + + readCom_(*ioRegionId,*comRead,12,t1); + taskState->outputControlFlag[1-1]=writeCom_(*ioRegionId,*comWrite,5,0); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +/* read and write data from buffer to com port */ +void serialReadWriteCom13B5B(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comRStruct **comRead, // Write Mandatory + comWStruct **comWrite // Write Mandatory + // Input Flags: + // Output Flags: overrun + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comRead==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + if (*comWrite==NULL) { + rt_printf("NULL: %d 3\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + RTIME t1 = profile_start(taskState,&taskProfile); +#else + RTIME t1 = GETTIME; +#endif + + readCom_(*ioRegionId,*comRead,13,t1); + taskState->outputControlFlag[1-1]=writeCom_(*ioRegionId,*comWrite,5,0); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + + +/* read and write data from buffer to com port */ +void serialReadWriteCom6B10B(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comRStruct **comRead, // Write Mandatory + comWStruct **comWrite // Write Mandatory + // Input Flags: + // Output Flags: overrun + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comRead==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + if (*comWrite==NULL) { + rt_printf("NULL: %d 3\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + RTIME t1 = profile_start(taskState,&taskProfile); +#else + RTIME t1 = GETTIME; +#endif + + readCom_(*ioRegionId,*comRead,6,t1); + taskState->outputControlFlag[1-1]=writeCom_(*ioRegionId,*comWrite,10,0); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +/* read and write data from buffer to com port */ +void serialReadWriteCom6B5B(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comRStruct **comRead, // Write Mandatory + comWStruct **comWrite // Write Mandatory + // Input Flags: + // Output Flags: overrun + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comRead==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + if (*comWrite==NULL) { + rt_printf("NULL: %d 3\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + RTIME t1 = profile_start(taskState,&taskProfile); +#else + RTIME t1 = GETTIME; +#endif + + readCom_(*ioRegionId,*comRead,6,t1); + taskState->outputControlFlag[1-1]=writeCom_(*ioRegionId,*comWrite,5,0); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +/* read and write data from buffer to com port */ +void serialReadWriteCom22B11B(taskStateStruct *taskState, + int **ioRegionId, // Read Mandatory + comRStruct **comRead, // Write Mandatory + comWStruct **comWrite // Write Mandatory + // Input Flags: + // Output Flags: overrun + // RT +) { + if (*ioRegionId==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + if (*comRead==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + return; + } + if (*comWrite==NULL) { + rt_printf("NULL: %d 3\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + RTIME t1 = profile_start(taskState,&taskProfile); +#else + RTIME t1 = GETTIME; +#endif + + readCom_(*ioRegionId,*comRead,22,t1); + taskState->outputControlFlag[1-1]=writeCom_(*ioRegionId,*comWrite,11,0); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + + +/* + ************************************************************************** + * FIFO TASK FUNCTIONS + ************************************************************************** + */ + +/* clear UART fifo buffer */ +void serialClearReadFifo(taskStateStruct *taskState, + comRStruct **comRead // Write Mandatory + // Input Flags: + // Output Flags: cleared + // RT +) { + if (*comRead==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + profile_start(taskState,&taskProfile); +#endif + if ((*comRead)->clearFifo==0 && taskState->outputControlFlag[1-1]==0) { + //printf("set fifo\n"); + (*comRead)->clearFifo=1; + } + else if ((*comRead)->clearFifo==2) { + (*comRead)->clearFifo=0; + taskState->outputControlFlag[1-1]=1; +//rt_printf("fifo cleared %ld\n",GETTIME); + } + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +/* clear UART fifo buffer */ +void serialClearWriteFifo(taskStateStruct *taskState, + comWStruct **comWrite // Write Mandatory + // Input Flags: + // Output Flags: cleared + // RT +) { + if (*comWrite==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + profile_start(taskState,&taskProfile); +#endif + if ((*comWrite)->clearFifo==0 && taskState->outputControlFlag[1-1]==0) { + (*comWrite)->clearFifo=1; + } + else if ((*comWrite)->clearFifo==2) { + (*comWrite)->clearFifo=0; + taskState->outputControlFlag[1-1]=1; + } + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +/* + ************************************************************************** + * CONFIG FUNCTIONS + ************************************************************************** + */ + +void serialGetComPar(taskStateStruct *taskState, + comStruct **comPar, // Allocation Write Mandatory + int **ioRegionId, // Allocation Write Mandatory + comRStruct **comRead, // Allocation Mandatory + comWStruct **comWrite // Allocation Mandatory + // Input Flags: bit0 bit1 bit2 bit3 bit4 bit5 bit6 bit7 + // Output Flags: error + // RT + // Oneshot +) { + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + profile_start(taskState,&taskProfile); +#endif + + static SerialStruct serial[MAX_NUMBER_OF_COM_PORTS]; + + int b; + int i; + unsigned char *rb; + + /* Get the serial com port number */ + b=0; + if (taskState->inputControlFlag[1-1]==1) b|=1; + if (taskState->inputControlFlag[2-1]==1) b|=2; + if (taskState->inputControlFlag[3-1]==1) b|=4; + if (taskState->inputControlFlag[4-1]==1) b|=8; + if (taskState->inputControlFlag[5-1]==1) b|=16; + if (taskState->inputControlFlag[6-1]==1) b|=32; + if (taskState->inputControlFlag[7-1]==1) b|=64; + if (taskState->inputControlFlag[8-1]==1) b|=128; + + /* Check for valid range */ + if (b>=MAX_NUMBER_OF_COM_PORTS) { + taskState->outputControlFlag[1-1]=1; + goto exit; + } + + /* Initalise serial port to default values */ + if (b==0) { + serial[b].ioRegionId=COM0; + serial[b].par.ID=0; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==1) { + serial[b].ioRegionId=COM1; + serial[b].par.ID=1; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==2) { + serial[b].ioRegionId=COM2; + serial[b].par.ID=2; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==3) { + serial[b].ioRegionId=COM3; + serial[b].par.ID=3; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==4) { + serial[b].ioRegionId=COM4; + serial[b].par.ID=4; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==5) { + serial[b].ioRegionId=COM5; + serial[b].par.ID=5; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==6) { + serial[b].ioRegionId=COM6; + serial[b].par.ID=6; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==7) { + serial[b].ioRegionId=COM7; + serial[b].par.ID=7; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==8) { + serial[b].ioRegionId=COM8; + serial[b].par.ID=8; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==9) { + serial[b].ioRegionId=COM9; + serial[b].par.ID=9; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==10) { + serial[b].ioRegionId=COM10; + serial[b].par.ID=10; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + if (b==11) { + serial[b].ioRegionId=COM11; + serial[b].par.ID=11; + serial[b].par.baud=SERIAL_BAUD_DEFAULT; + serial[b].par.parity=SERIAL_PARITY_DEFAULT; + serial[b].par.stopbits=SERIAL_STOP_DEFAULT; + serial[b].par.wordlength=SERIAL_DATA_DEFAULT; + } else + + + { + taskState->outputControlFlag[1-1]=1; + goto exit; + } + + /* Initalise the data container pointers */ + *comPar=&(serial[b].par); + *ioRegionId=&(serial[b].ioRegionId); + *comRead=&(serial[b].read); + *comWrite=&(serial[b].write); + + /* Initalise the comRead and comWrite containers */ + (*comRead)->comStat=0; + (*comRead)->clearFifo=0; + (*comWrite)->com_iwbp=0; + (*comWrite)->com_awbp=0; + (*comWrite)->clearFifo=0; + (*comRead)->com_irbp=0; + (*comRead)->com_arbp=0; + + rb=(*comRead)->comReadBuf; + for (i = 0; i < COM_RBSIZE; i++) + rb[i]=0; + + rt_printf("[serialGetComPar] ID=%d Region=%d\n",(*comPar)->ID,**ioRegionId); + //rt_printf("[serialGetComPar] buffer addresses: %p %p\n",*comRead,*comWrite); + +exit: +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} + +void serialSetComPar(taskStateStruct *taskState, + comStruct **comPar // Write Mandatory + // Input Flags: b0 b1 b2 b3 d0 p0 p1 s0 + // Output Flags: error + // RT + // Oneshot +) { + if (*comPar==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + return; + } + + int b; + int baud, data, parity, stop; + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + profile_start(taskState,&taskProfile); +#endif + + /* Get the baud */ + b = 0; + if (taskState->inputControlFlag[1-1]==1) b|=1; + if (taskState->inputControlFlag[2-1]==1) b|=2; + if (taskState->inputControlFlag[3-1]==1) b|=4; + if (taskState->inputControlFlag[4-1]==1) b|=8; + + switch (b) { + case 0: baud = 50; break; + case 1: baud = 300; break; + case 2: baud = 1200; break; + case 3: baud = 2400; break; + case 4: baud = 4800; break; + case 5: baud = 9600; break; + case 6: baud = 19200; break; + case 7: baud = 38400; break; + case 8: baud = 57600; break; + case 9: baud = 115200; break; + default: baud = 9600; break; + } + + /* Get the data bits */ + b = 0; + if (taskState->inputControlFlag[5-1]==1) b|=1; + + switch (b) { + case 0: data = 8; break; + case 1: data = 7; break; + default: data = 8; break; + } + + /* Get the parity */ + b = 0; + if (taskState->inputControlFlag[6-1]==1) b|=1; + if (taskState->inputControlFlag[7-1]==1) b|=2; + + + switch (b) { + case 0: parity = UART_16550_PARITY_NONE; break; + case 1: parity = UART_16550_PARITY_ODD; break; + case 2: parity = UART_16550_PARITY_EVEN; break; + default: parity = UART_16550_PARITY_NONE; break; + } + + /* Get the stop bits */ + b = 0; + if (taskState->inputControlFlag[8-1]==1) b|=1; + + switch (b) { + case 0: stop = 1; break; + case 1: stop = 2; break; + default: stop = 1; break; + } + + /* Set the com parameters */ + (*comPar)->baud = baud; + (*comPar)->wordlength = data; + (*comPar)->parity = parity; + (*comPar)->stopbits = stop; + + rt_printf("[serialSetComPar] ID=%d baud=%d data=%d parity=%d stop=%d\n", + (*comPar)->ID, (*comPar)->baud, (*comPar)->wordlength, (*comPar)->parity, (*comPar)->stopbits); + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; +} diff --git a/examples/common/serial/serial_rt.c b/examples/common/serial/serial_rt.c index 96043a18dcfcf062d388198c9e208fe53f8a9970..59ea1721de5c97173474982fb1c9b9ca6c1cd0a5 100644 --- a/examples/common/serial/serial_rt.c +++ b/examples/common/serial/serial_rt.c @@ -30,8 +30,8 @@ //#include <stdio.h> #include "esminterf_ext.h" +//#include "services_io.h" #include "profile.h" -#include "services_io.h" #include "serial_io.h" #include "rtshm.h" @@ -63,11 +63,13 @@ extern rtshm_struct *rtshm; void serialOpenComPort(taskStateStruct *taskState, comStruct **comPar, // Read Mandatory int **ioRegionId // Read Mandatory - // Input Flags: + // Input Flags: noMCR // Output Flags: done requestFail notAvailable // RT // Oneshot ) { + int mcr=1; + if (*comPar==NULL) { rt_printf("NULL: %d 1\n",taskState->stateID); return; @@ -82,6 +84,7 @@ void serialOpenComPort(taskStateStruct *taskState, profile_start(taskState,&taskProfile); #endif + if (taskState->inputControlFlag[1-1]==1) mcr=0; rt_printf("[serialOpenComPort] ioRegionId=%d COM%d init %d\n",**ioRegionId,(*comPar)->ID, rtshm->regionList[**ioRegionId]); @@ -106,7 +109,7 @@ void serialOpenComPort(taskStateStruct *taskState, rtshm->regionList[**ioRegionId]=2; - initComPort(regionList[**ioRegionId].start, 0, 0, 0, 0); // clear interrupts + initComPort(regionList[**ioRegionId].start, 0, 0, 0, 0, mcr); // clear interrupts rt_printf("[serialOpenComPort] Region OK for COM%d %04x\n",(*comPar)->ID,regionList[**ioRegionId].start); outb(0x12,regionList[**ioRegionId].start + UART_16550_SCR); @@ -118,7 +121,7 @@ void serialOpenComPort(taskStateStruct *taskState, goto exit; } - initComPort(regionList[**ioRegionId].start,(*comPar)->baud,(*comPar)->parity,(*comPar)->stopbits,(*comPar)->wordlength); + initComPort(regionList[**ioRegionId].start,(*comPar)->baud,(*comPar)->parity,(*comPar)->stopbits,(*comPar)->wordlength, mcr); taskState->outputControlFlag[1-1]=1; @@ -133,7 +136,7 @@ exit: void serialCloseComPort(taskStateStruct *taskState, int **ioRegionId // Read Optional - // Input Flags: + // Input Flags: noMCR // Output Flags: // RT // Oneshot @@ -143,9 +146,12 @@ void serialCloseComPort(taskStateStruct *taskState, profile_start(taskState,&taskProfile); #endif + int mcr=1; + if (taskState->inputControlFlag[1-1]==1) mcr=0; + if (*ioRegionId!=NULL) { if (rtshm->regionList[**ioRegionId]==2) { - initComPort(regionList[**ioRegionId].start, 0, 0, 0, 0); + initComPort(regionList[**ioRegionId].start, 0, 0, 0, 0, mcr); rtshm->regionList[**ioRegionId]=1; rt_printf("[serialCloseComPort] %04X closed\n",regionList[**ioRegionId].start); } @@ -157,6 +163,7 @@ void serialCloseComPort(taskStateStruct *taskState, ; } + /* ************************************************************************** * READ COM TASK FUNCTIONS @@ -334,7 +341,7 @@ void serialReadWriteCom12B10B(taskStateStruct *taskState, comRStruct **comRead, // Write Mandatory comWStruct **comWrite // Write Mandatory // Input Flags: check - // Output Flags: + // Output Flags: overrun // RT ) { if (*ioRegionId==NULL) { @@ -360,7 +367,7 @@ void serialReadWriteCom12B10B(taskStateStruct *taskState, if (taskState->inputControlFlag[1-1]) { if (t1-tlast>1100000 && tlast!=0) -rt_printf("-----> timing error %dus\n",(t1-tlast)/1000); +rt_printf("[serial_rt.c] timing error %dus\n",(t1-tlast)/1000); tlast=t1; } @@ -379,7 +386,7 @@ void serialReadWriteCom12B5B(taskStateStruct *taskState, comRStruct **comRead, // Write Mandatory comWStruct **comWrite // Write Mandatory // Input Flags: - // Output Flags: + // Output Flags: overrun // RT ) { if (*ioRegionId==NULL) { @@ -418,7 +425,7 @@ void serialReadWriteCom13B5B(taskStateStruct *taskState, comRStruct **comRead, // Write Mandatory comWStruct **comWrite // Write Mandatory // Input Flags: - // Output Flags: + // Output Flags: overrun // RT ) { if (*ioRegionId==NULL) { @@ -457,7 +464,7 @@ void serialReadWriteCom6B10B(taskStateStruct *taskState, comRStruct **comRead, // Write Mandatory comWStruct **comWrite // Write Mandatory // Input Flags: - // Output Flags: + // Output Flags: overrun // RT ) { if (*ioRegionId==NULL) { @@ -495,7 +502,7 @@ void serialReadWriteCom6B5B(taskStateStruct *taskState, comRStruct **comRead, // Write Mandatory comWStruct **comWrite // Write Mandatory // Input Flags: - // Output Flags: + // Output Flags: overrun // RT ) { if (*ioRegionId==NULL) { @@ -533,7 +540,7 @@ void serialReadWriteCom22B11B(taskStateStruct *taskState, comRStruct **comRead, // Write Mandatory comWStruct **comWrite // Write Mandatory // Input Flags: - // Output Flags: + // Output Flags: overrun // RT ) { if (*ioRegionId==NULL) { diff --git a/examples/common/services/services_io_nrt.c b/examples/common/services/services_io_nrt.c index e329a32e42cba9ef0d3032fb2e35531cd3310bd5..3aa4edc4a3bd7696fbb944323e6454ce72a34b49 100644 --- a/examples/common/services/services_io_nrt.c +++ b/examples/common/services/services_io_nrt.c @@ -93,6 +93,7 @@ void releaseIoPorts(taskStateStruct *taskState // Output Flags: TASK_OF1 TASK_OF2 TASK_OF3 TASK_OF4 TASK_OF5 TASK_OF6 TASK_OF7 TASK_OF8 // NRT ) { +// usleep(1000*1000); if (system("rmmod services_io") == -1) { printf("[allocIoPorts] error\n"); } diff --git a/examples/common/smiplay/smiplay.c b/examples/common/smiplay/smiplay.c index be08d5d966fc059d3ea5f155d64fbd95e1d65348..23b87b80c6867f7ee7b1175fc9813069aef99055 100644 --- a/examples/common/smiplay/smiplay.c +++ b/examples/common/smiplay/smiplay.c @@ -3,8 +3,15 @@ #include <string.h> +#define _NRT #include "smi.h" + +void execTask(taskStateStruct *taskState, + taskStateSysVarStruct *taskStateSysVar, + taskIDType taskID) {} + + int main(int argc, char *argv[]) { char fileName[BUFSIZ]; char hostname[BUFSIZ]; diff --git a/examples/common/xml/xml.c b/examples/common/xml/xml.c deleted file mode 100644 index 6367c06bcf87f2cafa0e344ac03b94aa5888b0b4..0000000000000000000000000000000000000000 --- a/examples/common/xml/xml.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - ************************************************************************** - * SOURCE FILE - ************************************************************************** - * - * ublox.c - source for the ublox gps reciever - * - * CSIRO - Heli Project - * - ************************************************************************** - */ - -/** - ************************************************************************** - * \file ublox.c - * \brief na - * \author na - * \version na - * \date na - ************************************************************************** - */ - -/* - ************************************************************************** - * INCLUDES - ************************************************************************** - */ -#include <math.h> -#include "xml.h" - - diff --git a/examples/pingpong/CMakeLists.txt b/examples/pingpong/CMakeLists.txt index 60f8d2e2d0147ceaf0dfac489c711a68c8c55831..b551542660a2e04c1c8ead6a25250dc45e404a25 100644 --- a/examples/pingpong/CMakeLists.txt +++ b/examples/pingpong/CMakeLists.txt @@ -1,27 +1,37 @@ cmake_minimum_required (VERSION 2.6) project (pingpong C) -link_directories($ENV{SMI_LIB_DIR}) SET(COMMON_DIR "../common") +SET(SMI_LIB_DIR $ENV{SMI_LIB_DIR}) +SET(SMI_INC_DIR $ENV{SMI_LIB_DIR}) + +link_directories(${SMI_LIB_DIR}) + +if("$ENV{MACHTYPE}" STREQUAL "x86_64") +SET(MACHFLAGS "-D_64") +else () +SET(MACHFLAGS "-m32") +endif() + +SET(NRTCFLAGS "-D_NRT -O2 -Wall") -# RTAI if($ENV{RTAI}) -SET(RTCFLAGS "$(shell rtai-config --lxrt-cflags) -D_RTAI -Wall -std=gnu90") +# RTAI +SET(RTAI_LDFLAGS "-L/usr/realtime/lib -llxrt -lpthread") +SET(RTCFLAGS "-D_TWARN $(shell rtai-config --lxrt-cflags) -D_RTAI -Wall") SET(RTLIB rtsmirtai) SET(NRTLIB nrtsmirtai) else() # PREEMPT_RT -SET(RTCFLAGS "-O2 -Wall -fno-stack-protector -std=gnu90") +SET(RTCFLAGS "-O2 -Wall -fno-stack-protector") SET(RTLIB rtsmi) SET(NRTLIB nrtsmi) endif() -SET(NRTCFLAGS "-D_NRT -O2 -Wall -std=gnu90") - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin) include_directories( -$ENV{SMI_LIB_DIR} +${SMI_INC_DIR} src smi /usr/include/libxml2 @@ -51,26 +61,43 @@ ${COMMON_DIR}/services/services_io_nrt.c add_library(rttasklib STATIC ${RTSOURCES}) add_library(nrttasklib STATIC ${NRTSOURCES}) +add_library(${RTLIB} STATIC IMPORTED) +set_property(TARGET ${RTLIB} PROPERTY IMPORTED_LOCATION ${SMI_LIB_DIR}/lib${RTLIB}.a) + +add_library(${NRTLIB} STATIC IMPORTED) +set_property(TARGET ${NRTLIB} PROPERTY IMPORTED_LOCATION ${SMI_LIB_DIR}/lib${NRTLIB}.a) + add_executable(rt src/rt.c) add_executable(nrt src/nrt.c) add_executable(nrt_task src/nrt_task.c) add_executable(decode src/decode.c) add_executable(smiplay ${COMMON_DIR}/smiplay/smiplay.c) -target_link_libraries(rt ${RTLIB} rttasklib 'rt' m) -target_link_libraries(nrt ${NRTLIB} nrttasklib xml2 'rt' m) -target_link_libraries(nrt_task ${NRTLIB} nrttasklib xml2 'rt' m) -target_link_libraries(smiplay ${NRTLIB} m) +target_link_libraries(rt ${RTLIB} rttasklib m 'rt') +target_link_libraries(nrt ${NRTLIB} nrttasklib xml2 m 'rt') +target_link_libraries(nrt_task ${NRTLIB} nrttasklib xml2 m 'rt') +target_link_libraries(smiplay ${NRTLIB} m 'rt') + +SET_TARGET_PROPERTIES(rt PROPERTIES COMPILE_FLAGS "${RTCFLAGS} ${MACHFLAGS}") +SET_TARGET_PROPERTIES(rttasklib PROPERTIES COMPILE_FLAGS "${RTCFLAGS} ${MACHFLAGS}") +SET_TARGET_PROPERTIES(nrt PROPERTIES COMPILE_FLAGS "${NRTCFLAGS} ${MACHFLAGS}") +SET_TARGET_PROPERTIES(nrt_task PROPERTIES COMPILE_FLAGS "${NRTCFLAGS} ${MACHFLAGS}") +SET_TARGET_PROPERTIES(nrttasklib PROPERTIES COMPILE_FLAGS "${NRTCFLAGS} ${MACHFLAGS}") + +if($ENV{RTAI}) +set_property(TARGET rt APPEND_STRING PROPERTY LINK_FLAGS ${RTAI_LDFLAGS}) +endif() -SET_TARGET_PROPERTIES(rt PROPERTIES COMPILE_FLAGS ${RTCFLAGS}) -SET_TARGET_PROPERTIES(rttasklib PROPERTIES COMPILE_FLAGS ${RTCFLAGS}) -SET_TARGET_PROPERTIES(nrt PROPERTIES COMPILE_FLAGS ${NRTCFLAGS}) -SET_TARGET_PROPERTIES(nrt_task PROPERTIES COMPILE_FLAGS ${NRTCFLAGS}) -SET_TARGET_PROPERTIES(nrttasklib PROPERTIES COMPILE_FLAGS ${NRTCFLAGS}) +add_custom_target( + services_io.ko + COMMAND make + WORKING_DIRECTORY ../mod +) +add_dependencies(rt services_io.ko) add_custom_target( smi_symbols.h - COMMAND ln -f -s $ENV{SMI_LIB_DIR}/smi_symbols.h ../smi + COMMAND ln -f -s ${SMI_INC_DIR}/smi_symbols.h ../smi ) add_dependencies(rt smi_symbols.h) @@ -81,3 +108,4 @@ add_custom_target( ) add_dependencies(rt rtaicheck.sh) endif() + diff --git a/examples/pingpong/bin/start.sh b/examples/pingpong/bin/start.sh index f9af1af92c7b2f9a63f961b1434e6b5607f490b4..eee70456097a0add3280f4b6ef1e5f1f9a9e78c3 120000 --- a/examples/pingpong/bin/start.sh +++ b/examples/pingpong/bin/start.sh @@ -1 +1 @@ -../../common/scripts/start.sh \ No newline at end of file +../../common/scripts/start.sh.i7 \ No newline at end of file diff --git a/examples/pingpong/esm/Makefile b/examples/pingpong/esm/Makefile index 476bb63b763f10d94d23cf6c8eee5b4f62fb24d4..499fbd29ab2561895692cbf51b3cd8e054595cb2 100644 --- a/examples/pingpong/esm/Makefile +++ b/examples/pingpong/esm/Makefile @@ -4,7 +4,7 @@ SLOTMAP=slotmap.xml PROCESSMAP=processmap.xml BASICPROCESS=basicprocess.xml BASICSLOT=basicslot.xml -REMOTE_SMI=aslab@test-ph:/tmp/smi +REMOTE_SMI=root@192.168.0.105:/code/smr/system_test/smi ESMTOSMI=esmtosmi ESMSCHED=esmscheduler @@ -30,9 +30,11 @@ smi: clone expand sched: $(ESMSCHED) $(BASICSLOT) > $(SCHEDULING) + @echo run \"make smi\" to update scheduling files check: expand env ESMLIBDIR=$(ESMLIBD) $(ESMCHECK) root.esm $(TASKSPECEXPANDED) + @echo \(results based on outputs of \"make\" or \"make smi\"\) install: cp user.smi ../smi @@ -43,16 +45,18 @@ install: install_smi: cp user.smi ../smi + cp smisched.tss ../smi/user.tss + cp smitasks.tde ../smi/user.tde remote_install: - scp user.smi $(REMOTE_SMI) - scp smisched.tss $(REMOTE_SMI)/user.tss - scp smitasks.tde $(REMOTE_SMI)/user.tde - scp esminterf.h $(REMOTE_SMI) - scp esminterf.c $(REMOTE_SMI) + ln -sf smisched.tss user.tss + ln -sf smitasks.tde user.tde + scp user.smi esminterf.h esminterf.c user.tss user.tde $(REMOTE_SMI) remote_smi_install: - scp user.smi $(REMOTE_SMI) + ln -sf smisched.tss user.tss + ln -sf smitasks.tde user.tde + scp user.smi user.tss user.tde $(REMOTE_SMI) edit: expand env ESMLIBDIR=$(ESMLIBD) $(EDITOR) root.esm $(TASKSPECEXPANDED) @@ -69,10 +73,9 @@ cl: $(MAKE) -f /tmp/Makefile.libclones clean: - -rm -f *.esm-* - -rm -f $(SCHEDULING) user.smi - -rm -f esminterf.c esminterf.h - -rm -f modelinfo.xml smisched.tss smitasks.tde - -rm -f taskspec-expanded.xml - -rm -f *~ - \ No newline at end of file + rm -f *.esm-* + rm -f $(SCHEDULING) user.smi + rm -f esminterf.c esminterf.h + rm -f modelinfo.xml smisched.tss smitasks.tde + rm -f taskspec-expanded.xml + rm -f *~ diff --git a/examples/pingpong/esm/basicprocess.xml b/examples/pingpong/esm/basicprocess.xml index eb4a83654f341764725ab25067e93248b866cf6c..e0e64aabb7e1a4b97cca8d4e5bc2912d18c67c4b 100644 --- a/examples/pingpong/esm/basicprocess.xml +++ b/examples/pingpong/esm/basicprocess.xml @@ -2,5 +2,7 @@ <!-- Unit is nano seconds --> <basic-processes> <process id="0" name="systemProcess"/> - <process id="1" name="logProcess"/> + <process id="1" name="process1"/> + <process id="2" name="process2"/> + <process id="3" name="process3"/> </basic-processes> diff --git a/examples/pingpong/esm/basicslot.xml b/examples/pingpong/esm/basicslot.xml index fdf2b36230b3fd1d2245c601549a218ca397bc63..1f733d4c7fc592c2e402b7420145a3bd2e6e4a67 100644 --- a/examples/pingpong/esm/basicslot.xml +++ b/examples/pingpong/esm/basicslot.xml @@ -1,9 +1,9 @@ <?xml version="1.0"?> <!-- Unit is nano seconds --> <basic-slots period="1000000" > - <slot id="smiSlot" multiplier="2" duration="250000" /> - <slot id="logSlot" multiplier="2" duration="100000" /> - <slot id="suspendSlot" multiplier="5" duration="250000" /> - <slot id="userSlot" multiplier="10" duration="100000" /> - <slot id="initSlot" multiplier="10" duration="100000" /> + <slot id="userSlot" multiplier="1" duration="110000" /> + <slot id="suspendSlot" multiplier="1" duration="250000" /> + <slot id="smiSlot" multiplier="5" duration="250000" /> + <slot id="logSlot" multiplier="5" duration="280000" /> + <slot id="initSlot" multiplier="50" duration="200000" /> </basic-slots> diff --git a/examples/pingpong/esm/esminterf.xml b/examples/pingpong/esm/esminterf.xml index a4282b27bfb32a91687d105e22fb591d6080b830..631d24087bcadba5f64beef6c85b8321a2ad4225 100644 --- a/examples/pingpong/esm/esminterf.xml +++ b/examples/pingpong/esm/esminterf.xml @@ -9,4 +9,15 @@ <task name="pong" duration="10000" oneshot="no" non-realtime="no" realtime="yes"> </task> + <task name="rtSuspend" duration="70000" oneshot="no" non-realtime="no" realtime="yes"> + <input-flags> + </input-flags> + <output-flags> + </output-flags> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + </task> + </task-declarations> diff --git a/examples/pingpong/esm/main.esm b/examples/pingpong/esm/main.esm index d457475fca2eeeb1ceb09cc81cef6323fff4219b..fe12a9ea71f75f77ac7e6fc4fe89e8dbb955dc25 100644 --- a/examples/pingpong/esm/main.esm +++ b/examples/pingpong/esm/main.esm @@ -1,264 +1,215 @@ <?xml version="1.0"?> -<esmcontainer uuid="{8a3144c1-2beb-4ddc-9123-b8538d71b91e}" name="main" cloned-from="main.esm" comment="" scene-width="0" scene-height="0"> +<esmcontainer uuid="{c558deeb-f09d-4b63-a657-b82f716d8c42}" name="" cloned-from="../../system_test/esm/main.esm" comment="" scene-width="5000" scene-height="5000"> <data-storage-list> - <data-storage uuid="{eb12661c-b850-4a04-be4d-13f4fb20f550}" name="GX3" comment=""/> - <data-storage uuid="{f716c9f2-40e1-496a-9bd0-5928e3a6c171}" name="OEMStar" comment=""/> - <data-storage uuid="{d8d42307-b97d-48c7-8964-50df3cf5cef1}" name="athenaIoData" comment=""/> - <data-storage uuid="{8021db07-eedc-4007-92da-5f0eb4053269}" name="gravity" comment=""/> - <data-storage uuid="{21020257-a57a-4170-8fa1-e3b44eb58e44}" name="heliData" comment=""/> - <data-storage uuid="{445c1303-8ca2-4379-9716-882d52cb0b2f}" name="keyboard" comment=""/> - <data-storage uuid="{43eebfc1-3346-4d66-ab66-d47a07f8e301}" name="log" comment=""/> - <data-storage uuid="{0fb3fa7d-93bd-4027-aa9c-3ff5c4e81aa7}" name="mdlData" comment=""/> - <data-storage uuid="{9eab478c-aaff-4071-8ddc-74f996544b3a}" name="navsol" comment=""/> - <data-storage uuid="{049f0b9e-a542-4261-b9cb-5c4b9c9eb095}" name="pressureAlt" comment=""/> - <data-storage uuid="{20d2c2aa-8bb1-4146-a2d5-0403aefe0e1c}" name="setpoints" comment=""/> - <data-storage uuid="{3e957278-0179-4e8e-af3f-6db0d069180e}" name="smiTelem" comment=""/> - <data-storage uuid="{2287add3-45df-441d-b099-445a60526056}" name="sscDataIn" comment=""/> - <data-storage uuid="{e1c61c88-1372-4270-b7b4-ad19f890f65e}" name="sscDataOut" comment=""/> - <data-storage uuid="{05277af6-6a83-413e-8a5f-096bd3dc8643}" name="syncGX3" comment=""/> - <data-storage uuid="{7a6ef5a1-3994-4dd4-ab6e-a3132ca8cdb4}" name="wpList" comment=""/> + <data-storage uuid="{d5e073a5-afb4-4d74-9018-e042bcdcff8e}" name="keyboard" comment=""/> + <data-storage uuid="{4557b912-3eed-4e86-9833-121c59a2c485}" name="log" comment=""/> + <data-storage uuid="{789cfdd1-5de5-43d1-8404-1fed89ad8e28}" name="smiTelem" comment=""/> </data-storage-list> <input-ports> </input-ports> <output-ports> </output-ports> <input-flags> + <flag uuid="{0cfd0f99-c4f8-4b98-a31d-d5329e5d5204}" name="loggerOff" comment="" type="user_defined"/> </input-flags> <output-flags> </output-flags> <container-events> - <event uuid="{b049fe4c-67e5-4409-a073-2c5edfb5ffcc}" name="AltReady" comment=""/> - <event uuid="{5d0cef49-23ca-43da-a762-a1c4f130c4f7}" name="AltReqReady" comment=""/> - <event uuid="{562ec87b-f904-4a83-be1f-c30c9f8fb6d9}" name="BLOS" comment=""/> - <event uuid="{756eb583-7596-4d2b-b433-a361b52565cc}" name="GX3Ready" comment=""/> - <event uuid="{baa61f82-1e65-4066-a805-4e39234657a2}" name="GX3ReqReady" comment=""/> - <event uuid="{c5fd5844-31ba-4229-ab49-c33246d1fb39}" name="LOS" comment=""/> - <event uuid="{005ac23f-44b9-471a-a8f9-c9690ccb5f5c}" name="arrived" comment=""/> - <event uuid="{8d2f1013-1263-4a76-8289-a9cb5a22adeb}" name="athenaReady" comment=""/> - <event uuid="{8146c9d3-67d3-4c0c-a6d3-b4c359b0bdfb}" name="athenaReqReady" comment=""/> - <event uuid="{a4df5781-39b2-4640-ad2d-d29d64c47170}" name="autoRet" comment=""/> - <event uuid="{a36fdc60-a4f5-43e0-93cf-5bb3385e8353}" name="cameraOff" comment=""/> - <event uuid="{b568b56c-5537-44c9-8001-f72b46e1bdef}" name="cameraOn" comment=""/> - <event uuid="{a1273cd6-c64a-4019-9222-3b89def3da05}" name="clearWpList" comment=""/> - <event uuid="{ada12e3a-354a-47b8-97d2-4063d18d3223}" name="devicesDone" comment=""/> - <event uuid="{7243f290-9ed7-4721-b6f9-c77a1934ac71}" name="gpsReady" comment=""/> - <event uuid="{c2f60713-c351-4376-afa8-2e7119abc268}" name="gpsReqReady" comment=""/> - <event uuid="{e3b14d06-43c0-4460-a9b1-6021cfc1a405}" name="gsHeliBrake" comment=""/> - <event uuid="{1243a496-6ba5-4fd9-a241-4efb34cf90ee}" name="gsHeliEscape" comment=""/> - <event uuid="{5c7536a9-3496-4b8c-9fa7-b18a794b69e1}" name="gsHeliHover" comment=""/> - <event uuid="{6d9e8632-16f4-4967-b684-1b21e1118dcc}" name="heliAuto" comment=""/> - <event uuid="{79781e36-9046-4920-9379-0b35023f05f0}" name="heliBrake" comment=""/> - <event uuid="{2fceae0d-c9e6-4805-8517-ca2557933599}" name="heliClimb" comment=""/> - <event uuid="{3962e2ea-88b4-4586-a0dc-727842e54548}" name="heliControl" comment=""/> - <event uuid="{ef1faf81-7569-47c2-b1cc-7e8af301e90f}" name="heliControlOff" comment=""/> - <event uuid="{bc165078-00d0-4929-9fc8-9ac082d84c7d}" name="heliControlTest" comment=""/> - <event uuid="{4b5f8aed-dc55-4f48-aa38-02a3d8cba8c5}" name="heliCruise" comment=""/> - <event uuid="{ced13c30-9036-4c9c-8d9e-11d2c92d6ef9}" name="heliDataAlloc" comment=""/> - <event uuid="{17149693-b42c-4ad5-963a-8bcdd07dad5c}" name="heliDataCopied" comment=""/> - <event uuid="{00b51cbc-0f95-4deb-a098-df8f1e9060a1}" name="heliDataReady" comment=""/> - <event uuid="{b90fdd2a-b7af-4acb-9245-d5254cdc62bc}" name="heliEscape" comment=""/> - <event uuid="{b96707d8-17e7-4662-bdf0-c135e8c91ebf}" name="heliGovern" comment=""/> - <event uuid="{51dab2f9-cff5-4845-aa22-24d72d3e5671}" name="heliGroundTest" comment=""/> - <event uuid="{646e3816-d074-4b1f-bada-e1e5348d66e3}" name="heliHover" comment=""/> - <event uuid="{9e52859c-e18d-48e1-b970-91c6d5c7cc02}" name="heliManual" comment=""/> - <event uuid="{97f09158-2986-4b00-a48f-3d0e4d3a6d29}" name="heliProcessUp" comment=""/> - <event uuid="{e40ba982-e4a3-4b5d-a427-7de043af9f61}" name="heliReqFlightMode" comment=""/> - <event uuid="{71c349a6-4f62-454a-8f92-21e7fb8d8656}" name="heliSimulate" comment=""/> - <event uuid="{5d2c638d-9c16-46ef-9172-e72c0696e8d6}" name="heliTerminate" comment=""/> - <event uuid="{6623e095-502a-43d5-886e-be7dc29a7307}" name="heliYaw" comment=""/> - <event uuid="{7fb0710f-bb14-475b-b7c5-52d87fc67d88}" name="init" comment=""/> - <event uuid="{b53351bd-b092-453a-86da-3b4f8c6ab670}" name="ioPortsAllocated" comment=""/> - <event uuid="{f86e725e-7b21-43c8-b46f-daa895690204}" name="ioReqPortsAllocated" comment=""/> - <event uuid="{e7d44a63-7781-431e-a173-07d3774baa78}" name="keyboardQuit" comment=""/> - <event uuid="{eea5f61c-1be0-4f4f-ab2c-53ff0bb7eede}" name="landing" comment=""/> - <event uuid="{b36a8ba2-165c-453f-b0b8-726e45e97858}" name="logProcessUp" comment=""/> - <event uuid="{d8362e10-e52d-4da4-b166-c4af12a70a3f}" name="logReady" comment=""/> - <event uuid="{ea206f3c-573f-4531-97d6-0b281855aa4c}" name="logReqReady" comment=""/> - <event uuid="{5f05a9c5-b2f1-4761-a8e1-9380d60ef596}" name="loggingStopped" comment=""/> - <event uuid="{da8dbd8b-daad-49ce-8241-9374bab8835e}" name="masterDone" comment=""/> - <event uuid="{5c0ef8f5-5a3a-4a4c-a331-0e1281763fae}" name="navfilterReady" comment=""/> - <event uuid="{443b707a-0c4d-45c1-8b13-2ace81df9261}" name="navfilterReqReady" comment=""/> - <event uuid="{dff4a758-bc34-4815-9487-5b6fb52d08f5}" name="navigationDone" comment=""/> - <event uuid="{274c6302-d068-4229-a107-c2cdb4f3f72f}" name="process2Up" comment=""/> - <event uuid="{d197950c-58aa-4834-917e-f50c211b4ce9}" name="reqHeliData" comment=""/> - <event uuid="{797ed2ea-9b0f-4a32-9cd1-66b36d78aad3}" name="reqProcessUp" comment=""/> - <event uuid="{6e395630-9d01-4e9e-91a0-ffa4c826fcb3}" name="reqStableHover" comment=""/> - <event uuid="{f7b0838c-8287-48b8-8609-cd423c538920}" name="restartProcess2" comment=""/> - <event uuid="{7cca4fae-247f-45fe-85d2-06aca943329e}" name="sbgReady" comment=""/> - <event uuid="{a6c48dd0-c2a9-4f59-8da9-8c0110f13e2a}" name="sbgReqReady" comment=""/> - <event uuid="{6b7451a5-c43b-47e9-b2e1-9d0ca25b7b37}" name="servicesDone" comment=""/> - <event uuid="{1b64b4ac-930b-4b5a-bf57-4278c67cdfa4}" name="shutter" comment=""/> - <event uuid="{0e96c056-af2c-4a80-8c17-21a1dff91360}" name="smiEventQueueOverflow" comment=""/> - <event uuid="{5a3e1c67-f4ab-459c-9b63-5928f219df32}" name="smiReady" comment=""/> - <event uuid="{3026c347-bc60-45cb-8944-ce10b2d20a26}" name="smiReqReady" comment=""/> - <event uuid="{5dd04753-0a51-4507-b4f5-4acba563bab6}" name="spInvalid" comment=""/> - <event uuid="{bcdbabfa-f511-484f-9d44-9137b78bda7d}" name="sscCmdS0" comment=""/> - <event uuid="{d16a546e-e625-4140-9a8e-ab93c01ce71f}" name="sscCmdS1" comment=""/> - <event uuid="{10615253-cb4a-4b16-9854-683a6382a903}" name="sscCmdS2" comment=""/> - <event uuid="{91924f25-ce60-4f19-9644-f886f9aa1cde}" name="sscCmdS3" comment=""/> - <event uuid="{46e849d6-bc38-495d-a5fe-e84f5fc040f9}" name="sscReady" comment=""/> - <event uuid="{671ec96b-b1e0-47dd-86fa-52032c68750d}" name="sscReqReady" comment=""/> - <event uuid="{82d281f5-e20b-4d95-9966-b4f0beedf870}" name="sscReqS0" comment=""/> - <event uuid="{7176927e-49f1-4e83-9bdb-2ec5d440604e}" name="sscReqS1" comment=""/> - <event uuid="{72ff0758-d320-434e-bff1-9e1118e4bc36}" name="sscReqS2" comment=""/> - <event uuid="{2f0f0c7b-8d6b-4180-8975-867ed3bfede7}" name="sscReqS3" comment=""/> - <event uuid="{db1a5c42-8e12-420d-ad0d-8ff39d1eec32}" name="stableHover" comment=""/> - <event uuid="{124b548e-6fe9-44b0-9c14-2598ffc6db1b}" name="telemFcReady" comment=""/> - <event uuid="{16816fd9-37f7-4c19-8ae1-178ee2ceaa72}" name="toggleCameraMode" comment=""/> - <event uuid="{06349ea2-e127-4221-b2cf-f46e81d7f792}" name="userDone" comment=""/> - <event uuid="{54f0c958-ea94-42c2-b9c1-3edb651b6a7d}" name="visionDone" comment=""/> - <event uuid="{5b052fdc-166c-410c-bd6e-efd7c3b7f62f}" name="wpListCleared" comment=""/> - <event uuid="{975c050a-31b7-4302-a7ac-049e042ab1b6}" name="wpListReceived" comment=""/> - <event uuid="{89de204e-c48b-4bd3-80ec-656c09efdea0}" name="quit" comment=""/> + <event uuid="{0efd8bbc-c932-4337-bead-a2882ea81e59}" name="buzzerOn" comment=""/> + <event uuid="{d26748f5-c6fb-4781-8539-0800edd69704}" name="init" comment=""/> + <event uuid="{ede5c3af-509c-47f6-8cb2-80d8748df481}" name="ioPortsAllocated" comment=""/> + <event uuid="{98b8b1d6-8f31-42a2-93bf-61c66ceb4700}" name="ioPortsError" comment=""/> + <event uuid="{f521dc0d-8223-41e5-8d08-68134e6710c6}" name="keyboardQuit" comment=""/> + <event uuid="{38a94cbf-c270-4a02-a79a-45cd840b3b0d}" name="keyboardReady" comment=""/> + <event uuid="{b454594b-0648-45fe-83eb-7ae5c929c20b}" name="logProcessUp" comment=""/> + <event uuid="{c85774d8-4167-4919-ab09-c100d892e4d3}" name="logReady" comment=""/> + <event uuid="{e7ce1524-119f-41cc-bb61-fcd5c856da40}" name="loggingOff" comment=""/> + <event uuid="{b3f7ee89-3e41-4567-9810-635296cd3819}" name="loggingStopped" comment=""/> + <event uuid="{cae65763-9670-478d-9a06-be2e13bae3b3}" name="pingpongDone" comment=""/> + <event uuid="{0c229741-d96d-4ddb-882c-52ddf75cc8b6}" name="quadCore" comment=""/> + <event uuid="{1dce5d9c-4906-4878-944f-f41160ffd133}" name="reqConfig" comment=""/> + <event uuid="{c9f41045-c0a5-495e-a499-3937ef958cea}" name="reqIoPortsState" comment=""/> + <event uuid="{77705484-96e3-447e-93f4-7cfc1543e164}" name="reqLogState" comment=""/> + <event uuid="{fcbbc007-2d47-4a94-be1e-2b24857eab07}" name="servicesDone" comment=""/> + <event uuid="{4da0b0e4-f1b9-43a8-8e1c-5fc529793a04}" name="shutdownLogger" comment=""/> + <event uuid="{f4387611-7b86-427d-86e1-adf38ebd5848}" name="singleCore" comment=""/> + <event uuid="{df26da57-2017-4e01-add5-105309034dad}" name="smiEventQueueOverflow" comment=""/> + <event uuid="{d6f0c8ba-55cf-42e1-ba75-346f4f1b12df}" name="smiReady" comment=""/> + <event uuid="{cab04043-b2e1-4897-9d23-4eb0d5780f11}" name="smiReqReady" comment=""/> </container-events> <input-events> - <event-ref uuid="{7fb0710f-bb14-475b-b7c5-52d87fc67d88}" name="init"/> + <event-ref uuid="{d26748f5-c6fb-4781-8539-0800edd69704}" name="init"/> + <event-ref uuid="{f4387611-7b86-427d-86e1-adf38ebd5848}" name="singleCore"/> + <event-ref uuid="{0c229741-d96d-4ddb-882c-52ddf75cc8b6}" name="quadCore"/> </input-events> <output-events> + <event-ref uuid="{1dce5d9c-4906-4878-944f-f41160ffd133}" name="reqConfig"/> </output-events> <global-events> - <event uuid="{1964cda7-523c-491d-a369-a1bb6771e67e}" name="PULSEEVENT" type="pulseevent" comment=""/> + <event uuid="{22955316-624e-477a-a545-5abd1ad531c5}" name="PULSEEVENT" type="pulseevent" comment=""/> </global-events> <regions> - <region uuid="{498f0512-443f-4782-b6b6-bebaf1c6218d}" name="Region0" comment="" number="0"> + <region uuid="{435f1551-147e-4584-ab61-fefd179a1de9}" name="" comment="" number="0"> <states> - <initial-state uuid="{72845cb1-346d-49a1-b51d-25ef2fffbd56}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{183c1d5d-b329-4069-b4bb-258c6c7ffbe4}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <super-state uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" cloned-from-uuid="{e5bc9969-b9a4-43e3-8360-cdcf4f2f05e7}" name="smi" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="smi.esm" path-string=""> + <super-state uuid="{b5fc1c67-da4a-4b05-a5e2-17d0c9346a82}" cloned-from-uuid="{6b902459-e185-4d16-b2a8-f10d5d072d61}" name="smi" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="smi.esm" path-string=""> <input-ports> </input-ports> <output-ports> </output-ports> <input-flags> - <flag uuid="{3fc1440f-ffe9-432c-8f8a-42d14daa7c5d}" name="quit" comment="" type="user_defined"/> - <flag uuid="{593f4773-2f54-4e98-941c-65b6243066b9}" name="shutdown" comment="" type="user_defined"/> + <flag uuid="{9b4cf577-3e6f-4dfa-9c7b-500dd30252c0}" name="quit" comment="" type="user_defined"/> + <flag uuid="{be932cc7-b085-482d-b54d-f855ebddba8a}" name="shutdown" comment="" type="user_defined"/> </input-flags> <system-flags> - <flag uuid="{541bc951-1424-4b2f-a1bd-436a43d3042a}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{517dd798-af06-4e08-960d-f271b8037909}" name="Exit" comment="" type="exit"/> + <flag uuid="{d7953cdb-955d-4222-9a41-463282125fa9}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{e1ce3cd1-b472-4353-be65-8b7afb73369e}" name="Exit" comment="" type="exit"/> </system-flags> <output-flags> </output-flags> <input-events> - <event-ref uuid="{7fb0710f-bb14-475b-b7c5-52d87fc67d88}" name="init"/> - <event-ref uuid="{3026c347-bc60-45cb-8944-ce10b2d20a26}" name="smiReqReady"/> + <event-ref uuid="{d26748f5-c6fb-4781-8539-0800edd69704}" name="init"/> + <event-ref uuid="{cab04043-b2e1-4897-9d23-4eb0d5780f11}" name="smiReqReady"/> </input-events> <output-events> - <event-ref uuid="{0e96c056-af2c-4a80-8c17-21a1dff91360}" name="smiEventQueueOverflow"/> - <event-ref uuid="{5a3e1c67-f4ab-459c-9b63-5928f219df32}" name="smiReady"/> + <event-ref uuid="{df26da57-2017-4e01-add5-105309034dad}" name="smiEventQueueOverflow"/> + <event-ref uuid="{d6f0c8ba-55cf-42e1-ba75-346f4f1b12df}" name="smiReady"/> </output-events> </super-state> - <final-state uuid="{81010855-4fc4-4847-b3a8-8a0a3744ae6e}" name="[exit]" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> + <initial-state uuid="{635183f1-5886-4244-a3c7-38ec92ebb7b5}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{6a3a2a6a-1bf2-4c87-addd-14a1dcc44be2}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <final-state uuid="{014ac1c4-6f9c-4dfe-950a-cea5941efa45}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> </states> <transitions> - <transition uuid="{80c971bb-ba50-4d90-929a-801a2cf1ca2f}" comment="" from-state-uuid="{72845cb1-346d-49a1-b51d-25ef2fffbd56}" to-state-uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" event-uuid="{7fb0710f-bb14-475b-b7c5-52d87fc67d88}"> + <transition uuid="{ddd50f92-768e-41a2-b5a2-fd708317b4b6}" comment="" from-state-uuid="{635183f1-5886-4244-a3c7-38ec92ebb7b5}" to-state-uuid="{b5fc1c67-da4a-4b05-a5e2-17d0c9346a82}" event-uuid="{d26748f5-c6fb-4781-8539-0800edd69704}"> <actions> - <send-event-action uuid="{0ac1d6fa-aac3-4b28-aedf-329f16f13f30}" name="" comment="" event-uuid="{7fb0710f-bb14-475b-b7c5-52d87fc67d88}"/> + <send-event-action uuid="{126f6988-0b06-4e53-8460-5c1fb46198fa}" name="" comment="" event-uuid="{d26748f5-c6fb-4781-8539-0800edd69704}"/> </actions> </transition> - <transition uuid="{ac2e98b1-9ae9-4a99-a302-80b49320194f}" comment="" from-state-uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" to-state-uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" event-uuid="{6b7451a5-c43b-47e9-b2e1-9d0ca25b7b37}"> + <transition uuid="{999a88a9-de15-4635-9293-52e0a9252b10}" comment="" from-state-uuid="{b5fc1c67-da4a-4b05-a5e2-17d0c9346a82}" to-state-uuid="{014ac1c4-6f9c-4dfe-950a-cea5941efa45}" event-uuid="{22955316-624e-477a-a545-5abd1ad531c5}"> <actions> - <set-flag-action uuid="{e86cc868-b919-4d63-9985-59fbcee11eb1}" name="set flag quit" comment="" flag-uuid="{3fc1440f-ffe9-432c-8f8a-42d14daa7c5d}" flag-value="0"/> </actions> -<guard operator="negation" flag-uuid="{517dd798-af06-4e08-960d-f271b8037909}"/> +<guard operator="none" flag-uuid="{e1ce3cd1-b472-4353-be65-8b7afb73369e}"/> </transition> - <transition uuid="{d3099ec9-f6fa-4701-9446-be720af96064}" comment="" from-state-uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" to-state-uuid="{81010855-4fc4-4847-b3a8-8a0a3744ae6e}" event-uuid="{1964cda7-523c-491d-a369-a1bb6771e67e}"> + <transition uuid="{a824445b-670e-4110-9a0d-b1957695e092}" comment="" from-state-uuid="{b5fc1c67-da4a-4b05-a5e2-17d0c9346a82}" to-state-uuid="{b5fc1c67-da4a-4b05-a5e2-17d0c9346a82}" event-uuid="{fcbbc007-2d47-4a94-be1e-2b24857eab07}"> <actions> + <set-flag-action uuid="{8601c824-8ec1-4d92-8847-36a4ba69deaf}" name="" comment="" flag-uuid="{9b4cf577-3e6f-4dfa-9c7b-500dd30252c0}" flag-value="0"/> </actions> -<guard operator="none" flag-uuid="{517dd798-af06-4e08-960d-f271b8037909}"/> +<guard operator="negation" flag-uuid="{e1ce3cd1-b472-4353-be65-8b7afb73369e}"/> </transition> </transitions> </region> - <region uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" name="Region2" comment="" number="1"> + <region uuid="{19e42c96-fcfa-4708-ac63-47be8c717f6c}" name="" comment="" number="1"> <states> - <super-state uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" cloned-from-uuid="{f0bf40cc-7827-4b3b-b794-04db2bebc805}" name="services" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="services.esm" path-string=""> + <initial-state uuid="{d74a0a86-74de-4582-b61b-112ebd0b9214}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{49d4b7c6-ff06-4513-8487-9926b3ccfee4}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <basic-state uuid="{2db5ae1f-7e0e-47bc-9ac5-23a99ed5d9b2}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{b73885f8-4f5b-4a7e-8c11-968be5abf650}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + <super-state uuid="{f1ccc2f5-dbfb-47b6-b0cc-d0a2af45150a}" cloned-from-uuid="" name="services" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="services_no_flash.esm" path-string=""> <input-ports> - <port uuid="{f9228566-ce46-4432-820f-9fa5aab28ea6}" name="smiTelemIn" comment="" data-storage-uuid="{3e957278-0179-4e8e-af3f-6db0d069180e}" optional="1" allocation="0" release="0" read="1" write="0"/> + <port uuid="{6e3913f6-edd8-4c78-b975-afcc2189e0d3}" name="smiTelem" comment="" data-storage-uuid="{789cfdd1-5de5-43d1-8404-1fed89ad8e28}" optional="1" allocation="0" release="1" read="1" write="0"/> </input-ports> <output-ports> - <port uuid="{207788b9-c047-4ab0-8f2f-beb0ceea23cb}" name="log" comment="" data-storage-uuid="{43eebfc1-3346-4d66-ab66-d47a07f8e301}" optional="1" allocation="1" release="0" read="0" write="1"/> - <port uuid="{756e3de0-f0fa-4179-a0ec-6baa8099bcac}" name="keyboard" comment="" data-storage-uuid="{445c1303-8ca2-4379-9716-882d52cb0b2f}" optional="0" allocation="1" release="0" read="0" write="1"/> - <port uuid="{f00752a6-81ae-487b-bde2-3c8d4a9cf3d4}" name="smiTelem" comment="" data-storage-uuid="{3e957278-0179-4e8e-af3f-6db0d069180e}" optional="1" allocation="1" release="0" read="0" write="1"/> + <port uuid="{38b528ce-a18b-4acd-a418-eaa8d1c2917a}" name="log" comment="" data-storage-uuid="{4557b912-3eed-4e86-9833-121c59a2c485}" optional="1" allocation="1" release="0" read="0" write="1"/> + <port uuid="{ab41ea0d-7fe1-496b-b3e8-853347de1fb5}" name="keyboard" comment="" data-storage-uuid="{d5e073a5-afb4-4d74-9018-e042bcdcff8e}" optional="0" allocation="1" release="0" read="0" write="1"/> + <port uuid="{ba415a4e-94bb-43ae-a178-f388e7d5ee40}" name="smiTelem" comment="" data-storage-uuid="{789cfdd1-5de5-43d1-8404-1fed89ad8e28}" optional="1" allocation="1" release="0" read="0" write="1"/> </output-ports> <input-flags> - <flag uuid="{9c9ee8be-bf25-4c3a-a6ac-00ebb8aa5ffc}" name="quit" comment="" type="user_defined"/> - <flag uuid="{dca8be80-e136-4243-a404-72702a97fd11}" name="stopLogging" comment="" type="user_defined"/> - <flag uuid="{b3970b06-64ea-40e9-81e1-fb26fba3fb9f}" name="flashLogging" comment="" type="user_defined"/> - <flag uuid="{a10e54a4-79a2-4e38-830e-d465026401fe}" name="readSmiLogging" comment="" type="user_defined"/> - <flag uuid="{1dfdc4db-49e0-4c96-b04c-daaa3eaffde2}" name="fsLogging" comment="" type="user_defined"/> + <flag uuid="{a357f07e-f8c7-40bf-a6bd-dfff930b3f63}" name="quit" comment="" type="user_defined"/> + <flag uuid="{9efb052f-cdcb-4ad4-a5f8-918e5a2e52ff}" name="stopLogging" comment="" type="user_defined"/> + <flag uuid="{9b6cb97b-07d1-45c7-850b-5267a581857b}" name="flashLogging" comment="" type="user_defined"/> + <flag uuid="{9e31dd21-7969-4455-8286-a05c02d7b2e6}" name="readSmiTelem" comment="" type="user_defined"/> + <flag uuid="{d5f7f40b-5400-43f3-b5a0-ca9b6153bf98}" name="fsLogging" comment="" type="user_defined"/> + <flag uuid="{02b586f6-3222-4c57-a85a-1b64fd8ece27}" name="quitChar" comment="" type="user_defined"/> </input-flags> <system-flags> - <flag uuid="{49906817-a443-4cf4-8169-6460457e196f}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{10aff027-4524-459b-a519-0c782a465dbd}" name="Exit" comment="" type="exit"/> + <flag uuid="{df2afa61-e74b-4ac7-8582-8e771d1b5e41}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{34ce8563-9097-4a7f-b81a-26b8ed0a3fe3}" name="Exit" comment="" type="exit"/> </system-flags> <output-flags> - <flag uuid="{637be3ae-3df9-43e5-b356-edccccbf2c27}" name="servicesDone" comment="" type="user_defined"/> + <flag uuid="{8528e822-dca0-42a2-ae81-6a35de7bdfd1}" name="servicesDone" comment="" type="user_defined"/> </output-flags> <input-events> - <event-ref uuid="{f86e725e-7b21-43c8-b46f-daa895690204}" name="ioReqPortsAllocated"/> + <event-ref uuid="{c9f41045-c0a5-495e-a499-3937ef958cea}" name="reqIoPortsState"/> + <event-ref uuid="{77705484-96e3-447e-93f4-7cfc1543e164}" name="reqLogState"/> + <event-ref uuid="{f4387611-7b86-427d-86e1-adf38ebd5848}" name="singleCore"/> + <event-ref uuid="{0c229741-d96d-4ddb-882c-52ddf75cc8b6}" name="quadCore"/> </input-events> <output-events> - <event-ref uuid="{e7d44a63-7781-431e-a173-07d3774baa78}" name="keyboardQuit"/> - <event-ref uuid="{b53351bd-b092-453a-86da-3b4f8c6ab670}" name="ioPortsAllocated"/> - <event-ref uuid="{6b7451a5-c43b-47e9-b2e1-9d0ca25b7b37}" name="servicesDone"/> - <event-ref uuid="{5f05a9c5-b2f1-4761-a8e1-9380d60ef596}" name="loggingStopped"/> - <event-ref uuid="{d8362e10-e52d-4da4-b166-c4af12a70a3f}" name="logReady"/> - <event-ref uuid="{b36a8ba2-165c-453f-b0b8-726e45e97858}" name="logProcessUp"/> + <event-ref uuid="{f521dc0d-8223-41e5-8d08-68134e6710c6}" name="keyboardQuit"/> + <event-ref uuid="{ede5c3af-509c-47f6-8cb2-80d8748df481}" name="ioPortsAllocated"/> + <event-ref uuid="{fcbbc007-2d47-4a94-be1e-2b24857eab07}" name="servicesDone"/> + <event-ref uuid="{b3f7ee89-3e41-4567-9810-635296cd3819}" name="loggingStopped"/> + <event-ref uuid="{c85774d8-4167-4919-ab09-c100d892e4d3}" name="logReady"/> + <event-ref uuid="{b454594b-0648-45fe-83eb-7ae5c929c20b}" name="logProcessUp"/> + <event-ref uuid="{98b8b1d6-8f31-42a2-93bf-61c66ceb4700}" name="ioPortsError"/> + <event-ref uuid="{38a94cbf-c270-4a02-a79a-45cd840b3b0d}" name="keyboardReady"/> + <event-ref uuid="{1dce5d9c-4906-4878-944f-f41160ffd133}" name="reqConfig"/> + <event-ref uuid="{0efd8bbc-c932-4337-bead-a2882ea81e59}" name="buzzerOn"/> + <event-ref uuid="{e7ce1524-119f-41cc-bb61-fcd5c856da40}" name="loggingOff"/> </output-events> </super-state> - <initial-state uuid="{fc20be2e-4642-4952-a5be-c4efd33baf3c}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{3a389add-c9f1-421a-badb-8f48df54fb45}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <basic-state uuid="{074a2dc8-ca87-4ad0-9716-e2b763d7a02f}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{70ec0f40-892f-48ae-b492-c90a7ae71ca4}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> </states> <transitions> - <transition uuid="{0835c4a6-6e9f-45ea-8b90-80136627c9bb}" comment="" from-state-uuid="{fc20be2e-4642-4952-a5be-c4efd33baf3c}" to-state-uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" event-uuid="{5a3e1c67-f4ab-459c-9b63-5928f219df32}"> + <transition uuid="{b605faeb-f7e1-4ff4-a1bc-21d897717134}" comment="" from-state-uuid="{d74a0a86-74de-4582-b61b-112ebd0b9214}" to-state-uuid="{f1ccc2f5-dbfb-47b6-b0cc-d0a2af45150a}" event-uuid="{d6f0c8ba-55cf-42e1-ba75-346f4f1b12df}"> + <actions> + <set-flag-action uuid="{bbe16642-a9ee-431e-8e43-905b06ca7f3e}" name="" comment="" flag-uuid="{d5f7f40b-5400-43f3-b5a0-ca9b6153bf98}" flag-value="0"/> + </actions> +<guard operator="negation" flag-uuid="{0cfd0f99-c4f8-4b98-a31d-d5329e5d5204}"/> + </transition> + <transition uuid="{7b13eed6-0262-444d-b89a-619247615340}" comment="" from-state-uuid="{f1ccc2f5-dbfb-47b6-b0cc-d0a2af45150a}" to-state-uuid="{2db5ae1f-7e0e-47bc-9ac5-23a99ed5d9b2}" event-uuid="{22955316-624e-477a-a545-5abd1ad531c5}"> <actions> </actions> +<guard operator="none" flag-uuid="{34ce8563-9097-4a7f-b81a-26b8ed0a3fe3}"/> </transition> - <transition uuid="{29bdc9c8-df14-4233-9469-5121b335e9e8}" comment="" from-state-uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" to-state-uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" event-uuid="{06349ea2-e127-4221-b2cf-f46e81d7f792}"> + <transition uuid="{0cf29a60-cb45-45c7-aebb-f224a4ea6601}" comment="" from-state-uuid="{f1ccc2f5-dbfb-47b6-b0cc-d0a2af45150a}" to-state-uuid="{f1ccc2f5-dbfb-47b6-b0cc-d0a2af45150a}" event-uuid="{cae65763-9670-478d-9a06-be2e13bae3b3}"> <actions> - <set-flag-action uuid="{5249fd6d-932f-480d-9a8f-b41235e9e8ab}" name="set flag quit" comment="" flag-uuid="{9c9ee8be-bf25-4c3a-a6ac-00ebb8aa5ffc}" flag-value="0"/> + <set-flag-action uuid="{e567c051-a545-4ec1-b6c5-344e1e374b52}" name="" comment="" flag-uuid="{a357f07e-f8c7-40bf-a6bd-dfff930b3f63}" flag-value="0"/> </actions> -<guard operator="negation" flag-uuid="{10aff027-4524-459b-a519-0c782a465dbd}"/> +<guard operator="negation" flag-uuid="{34ce8563-9097-4a7f-b81a-26b8ed0a3fe3}"/> </transition> - <transition uuid="{646c5edc-3d7c-442b-8dfd-4447444e54ac}" comment="" from-state-uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" to-state-uuid="{074a2dc8-ca87-4ad0-9716-e2b763d7a02f}" event-uuid="{1964cda7-523c-491d-a369-a1bb6771e67e}"> + <transition uuid="{2aa491de-8104-486f-ad6e-82e5a736587d}" comment="" from-state-uuid="{f1ccc2f5-dbfb-47b6-b0cc-d0a2af45150a}" to-state-uuid="{f1ccc2f5-dbfb-47b6-b0cc-d0a2af45150a}" event-uuid="{4da0b0e4-f1b9-43a8-8e1c-5fc529793a04}"> <actions> + <set-flag-action uuid="{c7ecfbba-3905-4552-9239-07320cde5b8b}" name="" comment="" flag-uuid="{9efb052f-cdcb-4ad4-a5f8-918e5a2e52ff}" flag-value="0"/> </actions> -<guard operator="none" flag-uuid="{10aff027-4524-459b-a519-0c782a465dbd}"/> +<guard operator="negation" flag-uuid="{34ce8563-9097-4a7f-b81a-26b8ed0a3fe3}"/> + </transition> + <transition uuid="{8c745776-d578-4b2c-aa13-e56e0eefff56}" comment="" from-state-uuid="{d74a0a86-74de-4582-b61b-112ebd0b9214}" to-state-uuid="{f1ccc2f5-dbfb-47b6-b0cc-d0a2af45150a}" event-uuid="{d6f0c8ba-55cf-42e1-ba75-346f4f1b12df}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{0cfd0f99-c4f8-4b98-a31d-d5329e5d5204}"/> </transition> </transitions> </region> - <region uuid="{1583b4e5-b6fb-4665-a556-b884e8a25d5e}" name="" comment="" number="2"> + <region uuid="{7607a266-1c2f-4d64-8a2f-e281c7f64f3f}" name="" comment="" number="2"> <states> - <initial-state uuid="{5c01dd72-0d66-4b33-b64e-514a1067f1aa}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <initial-state uuid="{c0cf1bf8-6af4-453c-8789-c2e66fa0bee1}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{289a0ef7-6501-40b5-9780-22f7b82d8c21}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{f6035a71-7478-4b46-ba66-12761b6bca4d}" name="Timeout" comment="" type="timeout"/> </system-flags> </initial-state> - <basic-state uuid="{3f0ce185-a8cb-4018-846e-c194523cb8fc}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{a4a6be03-0133-4e7c-b5f4-c808f9b5c49a}" name="Timeout" comment="" type="timeout"/> + <basic-state uuid="{33496957-0819-416b-895c-e6e838d9cda0}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{2b038bbe-c442-4f0a-a7ed-9b9beb14187a}" name="Timeout" comment="" type="timeout"/> </system-flags> </basic-state> - <super-state uuid="{44ea77ba-8786-427b-a02b-bbc9d97da4f6}" cloned-from-uuid="" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="pingpong.esm" path-string=""> + <super-state uuid="{52210cee-41a3-4bb9-8bc2-ea528e6d91d3}" cloned-from-uuid="" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="pingpong.esm" path-string=""> <input-ports> </input-ports> <output-ports> </output-ports> <input-flags> - <flag uuid="{8cf26baf-c9e2-4007-9a4d-756ce6ce4b65}" name="quit" comment="" type="user_defined"/> + <flag uuid="{12206154-3cf8-4730-9497-ddb33181d1ad}" name="quit" comment="" type="user_defined"/> </input-flags> <system-flags> - <flag uuid="{21205cea-0b8e-43ae-8922-6d960a0781e0}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{a0c82088-db92-49c3-9c15-e3d378381933}" name="Exit" comment="" type="exit"/> + <flag uuid="{526a4818-8317-4561-954e-8a68fc23ddf1}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{67eb0ab0-b013-4c7f-a6f1-2d6806cf3045}" name="Exit" comment="" type="exit"/> </system-flags> <output-flags> </output-flags> @@ -269,92 +220,99 @@ </super-state> </states> <transitions> - <transition uuid="{1693ce62-9b02-4bd7-9890-730d59058826}" comment="" from-state-uuid="{5c01dd72-0d66-4b33-b64e-514a1067f1aa}" to-state-uuid="{44ea77ba-8786-427b-a02b-bbc9d97da4f6}" event-uuid="{5a3e1c67-f4ab-459c-9b63-5928f219df32}"> + <transition uuid="{fd05351d-2d01-48c4-9b81-053e2f520691}" comment="" from-state-uuid="{c0cf1bf8-6af4-453c-8789-c2e66fa0bee1}" to-state-uuid="{52210cee-41a3-4bb9-8bc2-ea528e6d91d3}" event-uuid="{d6f0c8ba-55cf-42e1-ba75-346f4f1b12df}"> <actions> </actions> </transition> - <transition uuid="{2b81b706-fc89-4e5c-a26e-c9c7183868ca}" comment="" from-state-uuid="{44ea77ba-8786-427b-a02b-bbc9d97da4f6}" to-state-uuid="{3f0ce185-a8cb-4018-846e-c194523cb8fc}" event-uuid="{1964cda7-523c-491d-a369-a1bb6771e67e}"> + <transition uuid="{c4a907e8-4ee7-4bd8-a856-e710e5f46d7b}" comment="" from-state-uuid="{52210cee-41a3-4bb9-8bc2-ea528e6d91d3}" to-state-uuid="{33496957-0819-416b-895c-e6e838d9cda0}" event-uuid="{22955316-624e-477a-a545-5abd1ad531c5}"> <actions> - <send-event-action uuid="{65af22c2-f739-4e8a-9f48-6dd37059a22a}" name="" comment="" event-uuid="{06349ea2-e127-4221-b2cf-f46e81d7f792}"/> + <send-event-action uuid="{51ab2751-7e20-49bd-b2af-1fe70a56fa21}" name="" comment="" event-uuid="{cae65763-9670-478d-9a06-be2e13bae3b3}"/> </actions> -<guard operator="none" flag-uuid="{a0c82088-db92-49c3-9c15-e3d378381933}"/> +<guard operator="none" flag-uuid="{67eb0ab0-b013-4c7f-a6f1-2d6806cf3045}"/> </transition> - <transition uuid="{5c0ed7b7-248e-4e8b-8df6-909d0a5bda9a}" comment="" from-state-uuid="{44ea77ba-8786-427b-a02b-bbc9d97da4f6}" to-state-uuid="{44ea77ba-8786-427b-a02b-bbc9d97da4f6}" event-uuid="{e7d44a63-7781-431e-a173-07d3774baa78}"> + <transition uuid="{b5c6d3c2-8c8c-4554-a886-622b626b5f01}" comment="" from-state-uuid="{52210cee-41a3-4bb9-8bc2-ea528e6d91d3}" to-state-uuid="{52210cee-41a3-4bb9-8bc2-ea528e6d91d3}" event-uuid="{f521dc0d-8223-41e5-8d08-68134e6710c6}"> <actions> - <set-flag-action uuid="{e471a49a-15cc-4a03-b050-ee6845de8719}" name="" comment="" flag-uuid="{8cf26baf-c9e2-4007-9a4d-756ce6ce4b65}" flag-value="0"/> + <set-flag-action uuid="{7d6d4b64-977e-44a3-bd08-e25e122f92bb}" name="" comment="" flag-uuid="{12206154-3cf8-4730-9497-ddb33181d1ad}" flag-value="0"/> </actions> +<guard operator="negation" flag-uuid="{67eb0ab0-b013-4c7f-a6f1-2d6806cf3045}"/> </transition> </transitions> </region> </regions> <diagrams> - <diagram uuid="{71b4b459-9646-40fa-86c7-ec7cc273f11f}" name="" comment=""> - <box-item uuid="{45c39065-4b28-4aa0-bb22-b4fa7f63bab5}" comment="" model-uuid="{498f0512-443f-4782-b6b6-bebaf1c6218d}" x="2220" y="2430" width="360" height="300" type="standard_box"/> - <box-item uuid="{1b299f14-2b8a-4a50-8b0d-90d49f490008}" comment="" model-uuid="{72845cb1-346d-49a1-b51d-25ef2fffbd56}" x="-85" y="-119" width="10" height="10" type="standard_box"/> - <box-item uuid="{0b7e8645-e5df-4ecc-9f81-50144e9affba}" comment="" model-uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" x="-8" y="-12" width="100" height="50" type="standard_box"/> - <box-item uuid="{ac3120fe-7009-424a-bcac-715eab357b4f}" comment="" model-uuid="{81010855-4fc4-4847-b3a8-8a0a3744ae6e}" x="89" y="103" width="20" height="20" type="standard_box"/> - <box-item uuid="{193ce618-6f36-4cc6-aa07-7324f44637f5}" comment="" model-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" x="2610" y="2430" width="360" height="300" type="standard_box"/> - <box-item uuid="{8e9672f7-6928-4f11-a26b-34a0de1e487f}" comment="" model-uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" x="-8" y="-5" width="100" height="50" type="standard_box"/> - <box-item uuid="{a4e17242-0af0-4560-8526-f42512b4485c}" comment="" model-uuid="{207788b9-c047-4ab0-8f2f-beb0ceea23cb}" x="50" y="-9" width="20" height="20" type="standard_box"/> - <box-item uuid="{23f14433-cd30-40a5-8580-6c7919bc154a}" comment="" model-uuid="{756e3de0-f0fa-4179-a0ec-6baa8099bcac}" x="50" y="9" width="20" height="20" type="standard_box"/> - <box-item uuid="{9f71a8f5-c514-4f1d-b564-b15a82359121}" comment="" model-uuid="{f00752a6-81ae-487b-bde2-3c8d4a9cf3d4}" x="25" y="-25" width="20" height="20" type="standard_box"/> - <box-item uuid="{4686de14-1a35-4662-b479-003c731253e3}" comment="" model-uuid="{fc20be2e-4642-4952-a5be-c4efd33baf3c}" x="-78" y="-111" width="10" height="10" type="standard_box"/> - <box-item uuid="{860493fb-cc16-4dd5-8aee-e928f98ee7f1}" comment="" model-uuid="" x="2235" y="2220" width="390" height="60" type="input_events_box"/> - <box-item uuid="{669ccb16-e28b-41d3-a4e6-e705b02c0d0d}" comment="" model-uuid="" x="2235" y="2640" width="390" height="60" type="output_events_box"/> - <box-item uuid="{5e656915-c2ab-41f9-b0be-c3cd5730473a}" comment="" model-uuid="" x="2640" y="2220" width="390" height="60" type="input_ports_box"/> - <box-item uuid="{3575136c-694f-4bbb-a679-2c49e358f671}" comment="" model-uuid="" x="2640" y="2640" width="390" height="60" type="output_ports_box"/> - <box-item uuid="{cb69c125-6dd3-4c43-8959-ec49aee005c2}" comment="" model-uuid="" x="3045" y="2220" width="390" height="60" type="input_flags_box"/> - <box-item uuid="{4e7b05cb-0e8d-469a-bb52-6237c0437e53}" comment="" model-uuid="" x="3060" y="2640" width="390" height="60" type="output_flags_box"/> - <box-item uuid="{0f06ea2a-2f64-424b-9b27-1f9186c34ba1}" comment="" model-uuid="" x="2970" y="2430" width="1950" height="570" type="container_box"/> - <box-item uuid="{ef08e87f-e0cf-4552-929f-b09a9eb0b750}" comment="" model-uuid="{1583b4e5-b6fb-4665-a556-b884e8a25d5e}" x="3030" y="2430" width="420" height="300" type="standard_box"/> - <box-item uuid="{06a2f696-16db-4883-9607-d78418d232d3}" comment="" model-uuid="{5c01dd72-0d66-4b33-b64e-514a1067f1aa}" x="-148" y="-130" width="12" height="12" type="standard_box"/> - <box-item uuid="{538ebb7a-3a4f-4334-b180-567397e905ab}" comment="" model-uuid="{074a2dc8-ca87-4ad0-9716-e2b763d7a02f}" x="101" y="114" width="50" height="34" type="standard_box"/> - <box-item uuid="{ba3c5d3e-e123-410c-a446-1a2b4e4f81b1}" comment="" model-uuid="{3f0ce185-a8cb-4018-846e-c194523cb8fc}" x="19.5" y="102" width="47" height="36" type="standard_box"/> - <box-item uuid="{d6ad5843-86a2-47ff-b2b8-d9970b93f3d4}" comment="" model-uuid="{f9228566-ce46-4432-820f-9fa5aab28ea6}" x="36" y="-25" width="10" height="10" type="standard_box"/> - <box-item uuid="{0e5287f3-fcd7-423b-9894-cdfded09fe53}" comment="" model-uuid="{44ea77ba-8786-427b-a02b-bbc9d97da4f6}" x="-22" y="4" width="100" height="50" type="standard_box"/> - <data-storage-item uuid="{3de734ab-8175-4b14-86f6-157c52857329}" description="" comment="" model-uuid="{43eebfc1-3346-4d66-ab66-d47a07f8e301}" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" x="115" y="-5" width="32" height="30"/> - <data-storage-item uuid="{2c140dc3-71ea-4f6d-8bc3-7227612e144e}" description="" comment="" model-uuid="{445c1303-8ca2-4379-9716-882d52cb0b2f}" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" x="133" y="32" width="68" height="30"/> - <data-storage-item uuid="{aa239548-8529-467d-a92e-2d720635ecce}" description="" comment="" model-uuid="{3e957278-0179-4e8e-af3f-6db0d069180e}" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" x="132" y="-47" width="72" height="30"/> - <transition-item uuid="{18132395-ccb3-4a35-a790-4086a1f571d5}" comment="" model-uuid="{80c971bb-ba50-4d90-929a-801a2cf1ca2f}" start-anchor-pos-x="4" start-anchor-pos-y="1" end-anchor-pos-x="1" end-anchor-pos-y="-25"> - <control-point x="-23" y="-96"/> + <diagram uuid="{137d05c0-8794-41a0-a906-a868c5fa84fa}" name="" comment=""> + <box-item uuid="{04671226-3c3d-4ac8-a385-1c143e99023c}" comment="" model-uuid="" x="2295" y="2355" width="390" height="60" type="input_events_box"/> + <box-item uuid="{d8f3b786-91f7-41a5-9baf-c028ce2b33e2}" comment="" model-uuid="" x="2295" y="2415" width="390" height="60" type="output_events_box"/> + <box-item uuid="{7f3fc9b8-8a8e-4d06-9253-2c8385d96f92}" comment="" model-uuid="" x="2295" y="2475" width="390" height="60" type="input_ports_box"/> + <box-item uuid="{a7ac3fc1-e898-44d3-a0b8-7dd1e290d017}" comment="" model-uuid="" x="2295" y="2535" width="390" height="60" type="output_ports_box"/> + <box-item uuid="{3dec9f36-2f1d-4399-a7c9-8d9e2ef477e8}" comment="" model-uuid="" x="2295" y="2595" width="390" height="60" type="input_flags_box"/> + <box-item uuid="{a2424ecb-6a8c-4362-9251-a879576e3e42}" comment="" model-uuid="" x="2295" y="2655" width="390" height="60" type="output_flags_box"/> + <box-item uuid="{b3464e4b-6cb5-4ad6-baca-30a97f37f9d8}" comment="" model-uuid="" x="2295" y="2715" width="390" height="60" type="container_box"/> + <box-item uuid="{79bb94a6-bb5b-4c99-9d15-1787446f7121}" comment="" model-uuid="{435f1551-147e-4584-ab61-fefd179a1de9}" x="2790" y="2550" width="480" height="480" type="standard_box"/> + <box-item uuid="{ac25c872-89ac-466a-937f-b968f6b0cb9c}" comment="" model-uuid="{b5fc1c67-da4a-4b05-a5e2-17d0c9346a82}" x="-10" y="-3" width="100" height="50" type="standard_box"/> + <box-item uuid="{d6fb34b8-8303-41d7-90e2-4c124716f968}" comment="" model-uuid="{19e42c96-fcfa-4708-ac63-47be8c717f6c}" x="3300" y="2550" width="480" height="480" type="standard_box"/> + <box-item uuid="{7cce349c-b252-44eb-b5c3-44e973327736}" comment="" model-uuid="{7607a266-1c2f-4d64-8a2f-e281c7f64f3f}" x="3810" y="2550" width="480" height="480" type="standard_box"/> + <box-item uuid="{33f82983-7310-4294-bfe8-88490fd6cdf0}" comment="" model-uuid="{635183f1-5886-4244-a3c7-38ec92ebb7b5}" x="-110" y="-117" width="12" height="12" type="standard_box"/> + <box-item uuid="{e092ff46-9412-4aab-922c-452263be3d3b}" comment="" model-uuid="{014ac1c4-6f9c-4dfe-950a-cea5941efa45}" x="75" y="126" width="20" height="20" type="standard_box"/> + <box-item uuid="{2c016ea4-6ce6-4557-a017-1818280a263b}" comment="" model-uuid="{d74a0a86-74de-4582-b61b-112ebd0b9214}" x="-149" y="-196" width="12" height="12" type="standard_box"/> + <box-item uuid="{bb757f9c-d275-4ab5-b6af-09f34b483046}" comment="" model-uuid="{2db5ae1f-7e0e-47bc-9ac5-23a99ed5d9b2}" x="95" y="113" width="100" height="50" type="standard_box"/> + <box-item uuid="{9a747177-52e3-44fb-a4b4-efeda6e31048}" comment="" model-uuid="{c0cf1bf8-6af4-453c-8789-c2e66fa0bee1}" x="-162" y="-134" width="12" height="12" type="standard_box"/> + <box-item uuid="{fc6c34cf-9749-4fba-a219-c5916350ead5}" comment="" model-uuid="{33496957-0819-416b-895c-e6e838d9cda0}" x="-46" y="156" width="100" height="50" type="standard_box"/> + <box-item uuid="{c176828b-77bc-4ee1-85e7-7d5bab2ba5ef}" comment="" model-uuid="{f1ccc2f5-dbfb-47b6-b0cc-d0a2af45150a}" x="-88" y="-12" width="140" height="50" type="standard_box"/> + <box-item uuid="{953a2f24-7e7a-49ef-8f9f-4698262a39b2}" comment="" model-uuid="{6e3913f6-edd8-4c78-b975-afcc2189e0d3}" x="70" y="-17" width="10" height="10" type="standard_box"/> + <box-item uuid="{c2501d9d-a78b-40a0-8eda-ffe13faa1ca3}" comment="" model-uuid="{38b528ce-a18b-4acd-a418-eaa8d1c2917a}" x="70" y="3" width="10" height="10" type="standard_box"/> + <box-item uuid="{87bb30eb-31c4-43c6-953d-cdcc02010fa8}" comment="" model-uuid="{ab41ea0d-7fe1-496b-b3e8-853347de1fb5}" x="70" y="17" width="10" height="10" type="standard_box"/> + <box-item uuid="{524a4cb0-f227-4eb4-9789-337296f60016}" comment="" model-uuid="{ba415a4e-94bb-43ae-a178-f388e7d5ee40}" x="70" y="-15" width="10" height="10" type="standard_box"/> + <box-item uuid="{c5fa4944-c14d-44d0-b23e-865cdb77003c}" comment="" model-uuid="{52210cee-41a3-4bb9-8bc2-ea528e6d91d3}" x="-49" y="20" width="100" height="50" type="standard_box"/> + <data-storage-item uuid="{c19ad64e-3dd8-4d8b-a395-df723cd08e81}" description="" comment="" model-uuid="{789cfdd1-5de5-43d1-8404-1fed89ad8e28}" region-uuid="{19e42c96-fcfa-4708-ac63-47be8c717f6c}" x="120" y="-107" width="100" height="50"/> + <data-storage-item uuid="{ec6c5c6d-2323-4e3c-ae3c-f585725d1763}" description="" comment="" model-uuid="{4557b912-3eed-4e86-9833-121c59a2c485}" region-uuid="{19e42c96-fcfa-4708-ac63-47be8c717f6c}" x="121" y="-46" width="100" height="50"/> + <data-storage-item uuid="{6d9d496d-be37-4690-b915-c4b82d32fc61}" description="" comment="" model-uuid="{d5e073a5-afb4-4d74-9018-e042bcdcff8e}" region-uuid="{19e42c96-fcfa-4708-ac63-47be8c717f6c}" x="119" y="21" width="100" height="50"/> + <transition-item uuid="{55fbcc44-caef-4075-b787-1953029c8977}" comment="" model-uuid="{ddd50f92-768e-41a2-b5a2-fd708317b4b6}" start-anchor-pos-x="6" start-anchor-pos-y="0" end-anchor-pos-x="-6" end-anchor-pos-y="-25"> + <control-point x="-45.5" y="-103"/> + </transition-item> + <transition-item uuid="{eea21a55-e8f0-44c2-8e7c-eedf2b68e503}" comment="" model-uuid="{999a88a9-de15-4635-9293-52e0a9252b10}" start-anchor-pos-x="14" start-anchor-pos-y="25" end-anchor-pos-x="-10" end-anchor-pos-y="3"> + <control-point x="9.5" y="84"/> </transition-item> - <transition-item uuid="{1f728138-5e51-4b1c-bb39-2770796546c5}" comment="" model-uuid="{ac2e98b1-9ae9-4a99-a302-80b49320194f}" start-anchor-pos-x="-40" start-anchor-pos-y="24" end-anchor-pos-x="-5" end-anchor-pos-y="24"> - <control-point x="-29" y="47"/> + <transition-item uuid="{5aa7dbef-f1f0-45ac-8f14-e89fae144185}" comment="" model-uuid="{a824445b-670e-4110-9a0d-b1957695e092}" start-anchor-pos-x="-37" start-anchor-pos-y="25" end-anchor-pos-x="-4" end-anchor-pos-y="25"> + <control-point x="-37.5" y="56.5"/> </transition-item> - <transition-item uuid="{b9fc9cba-280a-4253-8637-e984d92636ff}" comment="" model-uuid="{d3099ec9-f6fa-4701-9446-be720af96064}" start-anchor-pos-x="29" start-anchor-pos-y="24" end-anchor-pos-x="-10" end-anchor-pos-y="-1"> - <control-point x="37" y="75"/> + <transition-item uuid="{59dee59f-1c1e-4c2c-bd92-5f28fd0d0018}" comment="" model-uuid="{b605faeb-f7e1-4ff4-a1bc-21d897717134}" start-anchor-pos-x="2" start-anchor-pos-y="6" end-anchor-pos-x="25" end-anchor-pos-y="-25"> + <control-point x="-73.5" y="-157.5"/> </transition-item> - <transition-item uuid="{83298df4-f007-4a5d-ba62-c8bcd0321400}" comment="" model-uuid="{0835c4a6-6e9f-45ea-8b90-80136627c9bb}" start-anchor-pos-x="4" start-anchor-pos-y="1" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> - <control-point x="-29" y="-78"/> + <transition-item uuid="{1ba948b6-7e79-410f-9a4c-d28e34e28b08}" comment="" model-uuid="{7b13eed6-0262-444d-b89a-619247615340}" start-anchor-pos-x="37" start-anchor-pos-y="25" end-anchor-pos-x="-50" end-anchor-pos-y="1"> + <control-point x="0" y="92"/> </transition-item> - <transition-item uuid="{dae09095-303f-46e6-863f-5c1a25783c15}" comment="" model-uuid="{29bdc9c8-df14-4233-9469-5121b335e9e8}" start-anchor-pos-x="-43" start-anchor-pos-y="24" end-anchor-pos-x="-3" end-anchor-pos-y="24"> - <control-point x="-30" y="52"/> + <transition-item uuid="{d0c596f2-7c6f-48a9-8408-3321510facf8}" comment="" model-uuid="{0cf29a60-cb45-45c7-aebb-f224a4ea6601}" start-anchor-pos-x="4" start-anchor-pos-y="25" end-anchor-pos-x="24" end-anchor-pos-y="25"> + <control-point x="-63.5" y="67.5"/> </transition-item> - <transition-item uuid="{17cb19ec-98b9-4be6-84a1-c361e85edbd2}" comment="" model-uuid="{646c5edc-3d7c-442b-8dfd-4447444e54ac}" start-anchor-pos-x="21" start-anchor-pos-y="24" end-anchor-pos-x="-25" end-anchor-pos-y="2"> - <control-point x="27" y="87"/> + <comment-item uuid="{a268b762-74c2-4e27-9c79-a47409308d27}" region-uuid="{19e42c96-fcfa-4708-ac63-47be8c717f6c}" comment="flags: fsLogging quitChar" x="130.5" y="-206.5" width="169" height="33"/> + <transition-item uuid="{957866f0-349c-46c3-a949-bb82c0661bcb}" comment="" model-uuid="{2aa491de-8104-486f-ad6e-82e5a736587d}" start-anchor-pos-x="-48" start-anchor-pos-y="25" end-anchor-pos-x="-29" end-anchor-pos-y="25"> + <control-point x="-150" y="47.5"/> </transition-item> - <connection-item uuid="{133797a1-2d88-4158-88f4-20bbeb474ff6}" comment="" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" item0-uuid="{3de734ab-8175-4b14-86f6-157c52857329}" item1-uuid="{a4e17242-0af0-4560-8526-f42512b4485c}" start-anchor-pos-x="-16" start-anchor-pos-y="0" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="66" y="-15"/> + <transition-item uuid="{b0ceeb31-4baa-40b8-be06-4ac1aca893ea}" comment="" model-uuid="{8c745776-d578-4b2c-aa13-e56e0eefff56}" start-anchor-pos-x="-3" start-anchor-pos-y="6" end-anchor-pos-x="-14" end-anchor-pos-y="-25"> + <control-point x="-145.5" y="-107.5"/> + </transition-item> + <transition-item uuid="{932751a1-b68c-436f-8775-e802a965df09}" comment="" model-uuid="{fd05351d-2d01-48c4-9b81-053e2f520691}" start-anchor-pos-x="3" start-anchor-pos-y="-6" end-anchor-pos-x="-14" end-anchor-pos-y="-25"> + <control-point x="-132.5" y="-75"/> + </transition-item> + <transition-item uuid="{958a2197-d9b2-4760-9570-0a987b11e9fa}" comment="" model-uuid="{c4a907e8-4ee7-4bd8-a856-e710e5f46d7b}" start-anchor-pos-x="3" start-anchor-pos-y="25" end-anchor-pos-x="-4" end-anchor-pos-y="-25"> + <control-point x="-28.5" y="86"/> + </transition-item> + <transition-item uuid="{fa9ec046-178a-46b9-a1a9-4150accda2d7}" comment="" model-uuid="{b5c6d3c2-8c8c-4554-a886-622b626b5f01}" start-anchor-pos-x="50" start-anchor-pos-y="-9" end-anchor-pos-x="50" end-anchor-pos-y="15"> + <control-point x="50.5" y="20"/> + </transition-item> + <connection-item uuid="{190f7c5a-d437-48e6-85a8-655eb7956d66}" comment="" region-uuid="{19e42c96-fcfa-4708-ac63-47be8c717f6c}" item0-uuid="{c19ad64e-3dd8-4d8b-a395-df723cd08e81}" item1-uuid="{953a2f24-7e7a-49ef-8f9f-4698262a39b2}" start-anchor-pos-x="-50" start-anchor-pos-y="-3" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="32.5" y="-90.5"/> </connection-item> - <connection-item uuid="{ad0b28f7-d516-4e9a-9ea5-5899074cf97d}" comment="" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" item0-uuid="{2c140dc3-71ea-4f6d-8bc3-7227612e144e}" item1-uuid="{23f14433-cd30-40a5-8580-6c7919bc154a}" start-anchor-pos-x="-34" start-anchor-pos-y="1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="62" y="6"/> + <connection-item uuid="{6710c510-a613-49a7-9d4c-5d3748563999}" comment="" region-uuid="{19e42c96-fcfa-4708-ac63-47be8c717f6c}" item0-uuid="{c19ad64e-3dd8-4d8b-a395-df723cd08e81}" item1-uuid="{524a4cb0-f227-4eb4-9789-337296f60016}" start-anchor-pos-x="-50" start-anchor-pos-y="7" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="49" y="-78"/> </connection-item> - <connection-item uuid="{14a5b44e-2911-4d92-be5b-be030bce9353}" comment="" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" item0-uuid="{aa239548-8529-467d-a92e-2d720635ecce}" item1-uuid="{9f71a8f5-c514-4f1d-b564-b15a82359121}" start-anchor-pos-x="-36" start-anchor-pos-y="-1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="64" y="-49"/> + <connection-item uuid="{d5fed9f4-c21a-4863-b506-3fe7a7a18f4f}" comment="" region-uuid="{19e42c96-fcfa-4708-ac63-47be8c717f6c}" item0-uuid="{ec6c5c6d-2323-4e3c-ae3c-f585725d1763}" item1-uuid="{c2501d9d-a78b-40a0-8eda-ffe13faa1ca3}" start-anchor-pos-x="-50" start-anchor-pos-y="1" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="50" y="-24.5"/> </connection-item> - <transition-item uuid="{a137cef9-5be3-41ff-bdc4-b4da82065b24}" comment="" model-uuid="{1693ce62-9b02-4bd7-9890-730d59058826}" start-anchor-pos-x="0" start-anchor-pos-y="6" end-anchor-pos-x="1" end-anchor-pos-y="-25"> - <control-point x="-55" y="-97"/> - </transition-item> - <transition-item uuid="{1e3d9b42-ec4c-4cdb-9814-402b99d6a142}" comment="" model-uuid="{2b81b706-fc89-4e5c-a26e-c9c7183868ca}" start-anchor-pos-x="4" start-anchor-pos-y="25" end-anchor-pos-x="3.5" end-anchor-pos-y="-18"> - <control-point x="-5" y="56"/> - </transition-item> - <connection-item uuid="{ee5851d2-c1ba-41ed-ba83-d052fdb24b1a}" comment="" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" item0-uuid="{aa239548-8529-467d-a92e-2d720635ecce}" item1-uuid="{d6ad5843-86a2-47ff-b2b8-d9970b93f3d4}" start-anchor-pos-x="-36" start-anchor-pos-y="6" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="62.5" y="-43"/> + <connection-item uuid="{ba3d40e9-a30a-440d-a19e-d9d3fd9a74a8}" comment="" region-uuid="{19e42c96-fcfa-4708-ac63-47be8c717f6c}" item0-uuid="{6d9d496d-be37-4690-b915-c4b82d32fc61}" item1-uuid="{87bb30eb-31c4-43c6-953d-cdcc02010fa8}" start-anchor-pos-x="-50" start-anchor-pos-y="1" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="42" y="22"/> </connection-item> - <comment-item uuid="{0c530290-b3e5-424f-b13c-ef3015ccf8a5}" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" comment="input flags: fsLogging" x="52" y="-113" width="100" height="50"/> - <transition-item uuid="{695a9512-c560-4255-9f9c-9f9e596e5ca8}" comment="" model-uuid="{5c0ed7b7-248e-4e8b-8df6-909d0a5bda9a}" start-anchor-pos-x="50" start-anchor-pos-y="-13" end-anchor-pos-x="50" end-anchor-pos-y="6"> - <control-point x="54.5" y="-13"/> - </transition-item> </diagram> </diagrams> </esmcontainer> diff --git a/examples/pingpong/esm/processmap.xml b/examples/pingpong/esm/processmap.xml index 4b3eb3720636f12ca52056cedd1555c7f27dcab9..4fc4e8b7a0965a91407a516d0db4e8fabc0fca66 100644 --- a/examples/pingpong/esm/processmap.xml +++ b/examples/pingpong/esm/processmap.xml @@ -1,5 +1,6 @@ <?xml version="1.0"?> <process-map> <map from="system" to="systemProcess" /> - <map from="logging" to="logProcess" /> + <map from="logging" to="process1" /> + <map from="debug" to="process2" /> </process-map> diff --git a/examples/pingpong/esm/root.esm b/examples/pingpong/esm/root.esm index 41580fece4358dc191f506b42381c527daaf4f37..b672ec292b6ba6a57e1cc2fbeba2e1a63d775f53 100644 --- a/examples/pingpong/esm/root.esm +++ b/examples/pingpong/esm/root.esm @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<esmcontainer uuid="{56a0946f-52cd-4eda-9cc2-2de72f5ba4ea}" name="[root]" cloned-from="" comment="" scene-width="0" scene-height="0"> +<esmcontainer uuid="{2dfd64db-c39e-46f2-9ab9-ea977e28c03d}" name="[root]" cloned-from="../../system_test/esm/root.esm" comment="" scene-width="0" scene-height="0"> <data-storage-list> </data-storage-list> <input-ports> @@ -11,60 +11,77 @@ <output-flags> </output-flags> <container-events> - <event uuid="{e0e193a1-3bb1-4d37-a7d4-84b48647b386}" name="init" comment=""/> + <event uuid="{4e517831-5ede-42c9-80ac-43932d9729c0}" name="init" comment=""/> + <event uuid="{6a95d98c-2f94-4ed2-9ebc-0335efbf8a23}" name="reqConfig" comment=""/> + <event uuid="{8f42d104-4219-4567-bcc8-0f82b5120a5e}" name="singleCore" comment=""/> + <event uuid="{c759e503-867c-49a8-9da4-6b3d31753f94}" name="quadCore" comment=""/> </container-events> <input-events> </input-events> <output-events> </output-events> <global-events> - <event uuid="{25e13b65-b320-4c04-900e-4039500a6131}" name="PULSEEVENT" type="pulseevent" comment=""/> + <event uuid="{4a755c45-fa07-4990-ac9c-971956f42d0d}" name="PULSEEVENT" type="pulseevent" comment=""/> </global-events> <regions> - <region uuid="{5a5bb134-cbb1-4762-ad49-863b12fa74c5}" name="Region1" comment="" number="0"> + <region uuid="{c4452038-bb43-4f15-b8d0-08c867f02fad}" name="Region1" comment="" number="0"> <states> - <super-state uuid="{04c6a0fc-664a-478c-987a-23dea513b6ec}" cloned-from-uuid="" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="main.esm" path-string=""> + <super-state uuid="{3a2c09d8-2c20-4c74-94a3-5a2607a2e4a6}" cloned-from-uuid="{9212873e-0d2b-4d7f-aa70-376bc575bc19}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="main.esm" path-string=""> <input-ports> </input-ports> <output-ports> </output-ports> <input-flags> + <flag uuid="{dbafcb71-4c5a-4ec5-8535-f9052db7815d}" name="loggerOff" comment="" type="user_defined"/> </input-flags> <system-flags> - <flag uuid="{a65ea5a3-6fc5-42a7-98d0-4e613e785f05}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{0d7fc2f4-1dac-4bd8-bbb1-23049ffa028d}" name="Exit" comment="" type="exit"/> + <flag uuid="{b30e6de4-0ae0-4794-a3a4-6aa1fa1051ab}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{f8d19e59-fd68-4109-8a34-22c28afcfdbb}" name="Exit" comment="" type="exit"/> </system-flags> <output-flags> </output-flags> <input-events> - <event-ref uuid="{e0e193a1-3bb1-4d37-a7d4-84b48647b386}" name="init"/> + <event-ref uuid="{4e517831-5ede-42c9-80ac-43932d9729c0}" name="init"/> + <event-ref uuid="{8f42d104-4219-4567-bcc8-0f82b5120a5e}" name="singleCore"/> + <event-ref uuid="{c759e503-867c-49a8-9da4-6b3d31753f94}" name="quadCore"/> </input-events> <output-events> + <event-ref uuid="{6a95d98c-2f94-4ed2-9ebc-0335efbf8a23}" name="reqConfig"/> </output-events> </super-state> - <initial-state uuid="{be57db43-c692-45b9-921a-58fe486b7cff}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <initial-state uuid="{2f407f07-19e0-4aa1-b1bd-63b870f5b218}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{48c73299-6a32-4f0e-8f57-1275ead07815}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{74fc0cac-30f1-4c9b-8a15-38af1c4d22ca}" name="Timeout" comment="" type="timeout"/> </system-flags> </initial-state> </states> <transitions> - <transition uuid="{e2d74b12-ac8f-4e9a-af52-9ee6873af880}" comment="" from-state-uuid="{be57db43-c692-45b9-921a-58fe486b7cff}" to-state-uuid="{04c6a0fc-664a-478c-987a-23dea513b6ec}" event-uuid="{25e13b65-b320-4c04-900e-4039500a6131}"> + <transition uuid="{ecc85126-327e-4a3e-86b0-a557b7c5ce39}" comment="" from-state-uuid="{2f407f07-19e0-4aa1-b1bd-63b870f5b218}" to-state-uuid="{3a2c09d8-2c20-4c74-94a3-5a2607a2e4a6}" event-uuid="{4a755c45-fa07-4990-ac9c-971956f42d0d}"> <actions> - <send-event-action uuid="{a456ac86-1ab0-4011-8e23-09bec5decebc}" name="" comment="" event-uuid="{e0e193a1-3bb1-4d37-a7d4-84b48647b386}"/> + <send-event-action uuid="{a456ac86-1ab0-4011-8e23-09bec5decebc}" name="" comment="" event-uuid="{4e517831-5ede-42c9-80ac-43932d9729c0}"/> + </actions> + </transition> + <transition uuid="{8a5c4753-4b08-44d7-b416-87b21a463ca2}" comment="" from-state-uuid="{3a2c09d8-2c20-4c74-94a3-5a2607a2e4a6}" to-state-uuid="{3a2c09d8-2c20-4c74-94a3-5a2607a2e4a6}" event-uuid="{6a95d98c-2f94-4ed2-9ebc-0335efbf8a23}"> + <actions> + <send-event-action uuid="{3f5318c0-7cf7-492d-802a-112d424f6a6d}" name="" comment="" event-uuid="{c759e503-867c-49a8-9da4-6b3d31753f94}"/> </actions> </transition> </transitions> </region> </regions> <diagrams> - <diagram uuid="{f95d8b29-0d85-4cf4-ab72-4c609c746df2}" name="" comment=""> - <box-item uuid="{cd126235-3b6a-4178-9b10-54255a04c17a}" comment="" model-uuid="{5a5bb134-cbb1-4762-ad49-863b12fa74c5}" x="2430" y="2520" width="240" height="240" type="standard_box"/> - <box-item uuid="{6cb270e0-ede8-4990-b946-1d210f1e8e5f}" comment="" model-uuid="{04c6a0fc-664a-478c-987a-23dea513b6ec}" x="7" y="32" width="100" height="50" type="standard_box"/> - <box-item uuid="{1576e698-ade7-4a53-b74f-1438810b5a55}" comment="" model-uuid="{be57db43-c692-45b9-921a-58fe486b7cff}" x="-78" y="-63" width="12" height="12" type="standard_box"/> - <transition-item uuid="{8e50e478-6e33-4837-9354-323ca1c51a60}" comment="" model-uuid="{e2d74b12-ac8f-4e9a-af52-9ee6873af880}" start-anchor-pos-x="1" start-anchor-pos-y="-6" end-anchor-pos-x="1" end-anchor-pos-y="-25"> - <control-point x="-19" y="-51"/> + <diagram uuid="{ae2e391b-0f8d-45fd-9701-d51d910cf98b}" name="" comment=""> + <box-item uuid="{f9dc5707-51f1-4759-9bae-797b29f68048}" comment="" model-uuid="{c4452038-bb43-4f15-b8d0-08c867f02fad}" x="2550" y="2520" width="480" height="240" type="standard_box"/> + <box-item uuid="{fe8b4ddc-fb44-4b80-8b4d-df6e55880b6d}" comment="" model-uuid="{3a2c09d8-2c20-4c74-94a3-5a2607a2e4a6}" x="-52" y="30" width="100" height="50" type="standard_box"/> + <box-item uuid="{5fda1141-bc96-4a14-81d1-731c3d508e81}" comment="" model-uuid="{2f407f07-19e0-4aa1-b1bd-63b870f5b218}" x="-137" y="-65" width="12" height="12" type="standard_box"/> + <transition-item uuid="{6a85322b-756b-4620-a7d6-30c2bcefe4b0}" comment="" model-uuid="{ecc85126-327e-4a3e-86b0-a557b7c5ce39}" start-anchor-pos-x="1" start-anchor-pos-y="-6" end-anchor-pos-x="1" end-anchor-pos-y="-25"> + <control-point x="-77" y="-54"/> + </transition-item> + <comment-item uuid="{77ef1266-ef1d-49e0-8d30-787fcc6cb5ea}" region-uuid="{c4452038-bb43-4f15-b8d0-08c867f02fad}" comment="flags: loggerOff quadCore singleCore" x="109" y="-48" width="100" height="82"/> + <transition-item uuid="{4fa827e3-e169-427f-84ea-7df6ecfb7e55}" comment="" model-uuid="{8a5c4753-4b08-44d7-b416-87b21a463ca2}" start-anchor-pos-x="27" start-anchor-pos-y="25" end-anchor-pos-x="50" end-anchor-pos-y="2"> + <control-point x="11.5" y="75.5"/> </transition-item> + <comment-item uuid="{702ce40d-6bb2-495e-a1cf-f8ba14620407}" region-uuid="{c4452038-bb43-4f15-b8d0-08c867f02fad}" comment="for vortex send singleCore event" x="110.5" y="34.5" width="129" height="51"/> </diagram> </diagrams> </esmcontainer> diff --git a/examples/pingpong/esm/slotmap.xml b/examples/pingpong/esm/slotmap.xml index 87f15f6310d8342f9e6cb2b596445b48936ce4f2..fe5b57513a1584d6ac1b5a16d18abb2620097af7 100644 --- a/examples/pingpong/esm/slotmap.xml +++ b/examples/pingpong/esm/slotmap.xml @@ -1,6 +1,9 @@ <?xml version="1.0"?> <slot-map> + <map from="smi" to="smiSlot" /> <map from="init" to="initSlot" /> - <map from="pingpong" to="userSlot" /> <map from="log" to="logSlot" /> + <map from="pingpong" to="userSlot" /> + <map from="rtclock" to="userSlot" /> + <map from="suspend" to="suspendSlot" /> </slot-map> diff --git a/examples/pingpong/smi/user.cfg b/examples/pingpong/smi/user.cfg deleted file mode 100755 index f09281d7953b97856d8d2dfed47917fd8f6dd254..0000000000000000000000000000000000000000 --- a/examples/pingpong/smi/user.cfg +++ /dev/null @@ -1,9 +0,0 @@ -60000 RTSLEEP_TOLERANCE -20000 TASK_SLOT_TIME_TOLERANCE -1 DELAY_CORRECTION -0 PRINT_STATES -4 19 -5 -10 -5 NUMBER_OF_PROCESSES PRIORITIES -localhost ESM_GUI -nil ESM_GUI TELEM -1 FREE_CPU - diff --git a/examples/pingpong/smi/user.cfg b/examples/pingpong/smi/user.cfg new file mode 120000 index 0000000000000000000000000000000000000000..5b2d159039e0c7eb569542365597a570f1ad7d1f --- /dev/null +++ b/examples/pingpong/smi/user.cfg @@ -0,0 +1 @@ +../../common/config/user.cfg.i7 \ No newline at end of file diff --git a/examples/pingpong/smi/user.cfg~ b/examples/pingpong/smi/user.cfg~ new file mode 100644 index 0000000000000000000000000000000000000000..df1582e5e6958cd03476b9c46810d8de34dfba8b --- /dev/null +++ b/examples/pingpong/smi/user.cfg~ @@ -0,0 +1,9 @@ +150000 RTSLEEP_TOLERANCE +120000 TASK_SLOT_TIME_TOLERANCE +1 DELAY_CORRECTION +0 PRINT_STATES +15 1 0 0 0 0 0 0 0 0 0 0 0 -10 0 0 NUMBER_OF_PROCESSES PRIORITIES -20..19 +140.253.32.56 140.253.33.106 140.253.32.56 192.168.2.3 ESM_GUI +nil ESM_GUI TELEM +1 FREE_CPU +5000 NANOSLEEP_UNIT diff --git a/examples/pingpong/src/decode.c b/examples/pingpong/src/decode.c index 379b14987c3b7c39635c244b7f16c22d98fbb287..10232b28df195355c8749708439860d6eb947560 100644 --- a/examples/pingpong/src/decode.c +++ b/examples/pingpong/src/decode.c @@ -3,9 +3,7 @@ * SOURCE FILE ************************************************************************** * - * decode.c - - * - * CSIRO - Heli Project + * decode.c - creates log text files from binary log * ************************************************************************** */ @@ -158,7 +156,7 @@ int main(int argc, char *argv[]){ size=sizeof(TaskProfileLogStruct); n=fread((void *)&taskProfile,1,size,fp); fprintf(fpTaskProfile,"%d %d %d %lld %lld %lld %lld %lld\n", - taskProfile.stateID, + taskProfile.taskID, taskProfile.runs, taskProfile.overruns, taskProfile.duration, diff --git a/examples/pingpong/src/decode.c~ b/examples/pingpong/src/decode.c~ new file mode 100644 index 0000000000000000000000000000000000000000..466ccf0c86366990eb1aec01da61a3083ecb6c84 --- /dev/null +++ b/examples/pingpong/src/decode.c~ @@ -0,0 +1,184 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * decode.c - + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file decode.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#include "smi.h" +#include "profile.h" +#include "logging.h" + +/* + ************************************************************************** + * DEFINES + ************************************************************************** + */ +#define DECODE_SMI 1 +#define DECODE_PROFILE 1 + +/* + ************************************************************************** + * MAIN + ************************************************************************** + */ +int main(int argc, char *argv[]){ + + FILE *fp; + char fileName[BUFSIZ]; + unsigned char id; + int size,n,count; + +#if(DECODE_SMI) + unsigned char initSmi = 0; + int smiLogStateIndex=0; + smiLogEntryStruct smiLogEntry; + logSmi1Struct smi1; + logSmi2Struct smi2; + FILE *fpSmi=NULL; +#endif + + +#if(DECODE_PROFILE) + unsigned char initTaskProfile = 0; + TaskProfileLogStruct taskProfile; + FILE *fpTaskProfile=NULL; +#endif + + /* Check the input arguments */ + if (argc != 2) + { + printf("\nInvalid args\nUsage: decode <log filename> \n\n"); + return -1; + } + strcpy(fileName,argv[1]); + + count=0; + fp=fopen(fileName,"rb"); + if (fp==NULL) { + printf("[decode] error opening log file %s \n", fileName); + return EXIT_FAILURE; + } else { + printf("[decode] reading log file %s\n", fileName); + } + + do { + n=fread((void *)&id,1,1,fp); // read struct identifier + if (n==1) { + + switch (id) { + +#if(DECODE_SMI) + case SMI1_LOGID: + if (initSmi == 0) { + printf("[decode] opening SMI.log\n"); + fpSmi=fopen("SMI.log","w"); + if (fpSmi==NULL) { + printf("[decode] error opening SMI.log \n"); + return EXIT_FAILURE; + } + initSmi = 1; + } + if (initSmi==2) { + printf("[decode] error smi1 before end of smi2"); + return EXIT_FAILURE; + } + smiLogStateIndex=0; +// printf("[decode] reading smi1 %d\n",count); + size=sizeof(logSmi1Struct); + n=fread((void *)&smi1,1,size,fp); + initSmi=2; + break; + case SMI2_LOGID: + if (initSmi==0) { + printf("[decode] error smi2 before smi1\n"); + return EXIT_FAILURE; + + } +// printf("[decode] reading smi2 %d\n",count); + size=sizeof(logSmi2Struct); + n=fread((void *)&smi2,1,size,fp); + smiLogEntry.smiFlagsLogBuf[smiLogStateIndex]=smi2.flags; + smiLogEntry.smiStateLogBuf[smiLogStateIndex]=smi2.state; + smiLogStateIndex++; + if (smiLogStateIndex>=MAX_NUMBER_OF_CONCURRENT_STATES) { + printf("[decode] smiLogStateIndex out of range\n"); + return EXIT_FAILURE; + } + if (smiLogStateIndex==smi1.numberOfStates) { + int i; + fprintf(fpSmi,"%d %d %d ", smi1.time,smi1.numberOfStates,smi1.smiIteration); + for (i=0;i<smiLogStateIndex;i++) { + fprintf(fpSmi,"%d %d ",smiLogEntry.smiStateLogBuf[i],smiLogEntry.smiFlagsLogBuf[i]); + } + fprintf(fpSmi,"\n"); + initSmi=1; + } + break; +#endif + +#if(DECODE_PROFILE) + case PROFILE_LOGID: + if (initTaskProfile == 0) { + printf("[decode] opening TaskProfile.log\n"); + fpTaskProfile=fopen("TaskProfile.log","w"); + if (fpTaskProfile==NULL) { + printf("[decode] error opening TaskProfile.log \n"); + return EXIT_FAILURE; + } + initTaskProfile = 1; + } + #if(DECODE_PRINT_OUTPUT) + printf("[decode] reading TaskProfile %d\n",count); + #endif + size=sizeof(TaskProfileLogStruct); + n=fread((void *)&taskProfile,1,size,fp); + fprintf(fpTaskProfile,"%d %d %d %lld %lld %lld %lld %lld\n", + taskProfile.taskID, + taskProfile.runs, + taskProfile.overruns, + taskProfile.duration, + taskProfile.mean, + taskProfile.variance, + taskProfile.maximum, + taskProfile.minimum); + break; + +#endif + + default: + printf("[decode] error: unknown LOGID=%d\n", id); + fclose(fp); + return EXIT_FAILURE; + } + + count++; + + } + } while (n>0); + + fclose(fp); + return EXIT_SUCCESS; +} diff --git a/examples/pingpong/src/esminterf_def.h b/examples/pingpong/src/esminterf_def.h index bbf1116d5d36fe784393fcca79ebfc112b732c5b..3912aba76d0788280427871d5b5d2b373fe9cfe2 100644 --- a/examples/pingpong/src/esminterf_def.h +++ b/examples/pingpong/src/esminterf_def.h @@ -5,8 +5,6 @@ * * esminter_def.h - header for external type definitions required by esminterf.h * - * CSIRO - Heli Project - * ******************************************************************************** */ diff --git a/examples/pingpong/src/esminterf_ext.h b/examples/pingpong/src/esminterf_ext.h index 589d42ad300cf4863bead9a293162dc14d9a8b08..04004bc6e399fd7a4695536cbe58e66b6ff58013 100644 --- a/examples/pingpong/src/esminterf_ext.h +++ b/examples/pingpong/src/esminterf_ext.h @@ -5,8 +5,6 @@ * * esminter_ext.h - header for external type definitions required by esminterf.c * - * CSIRO - Heli Project - * ******************************************************************************** */ diff --git a/examples/pingpong/src/nrt.c b/examples/pingpong/src/nrt.c index 226557208f2b6080948149d0e7da7d68d9cec774..2501dbf9f6b5e0b0584f312efc73b45c49467ae4 100644 --- a/examples/pingpong/src/nrt.c +++ b/examples/pingpong/src/nrt.c @@ -3,9 +3,7 @@ * SOURCE FILE ************************************************************************** * - * nrt.c - real-time - * - * CSIRO - Heli Project + * nrt.c - non-real-time system process * ************************************************************************** */ @@ -56,19 +54,19 @@ int main(int argc,char *argv[]){ cfgFile=argv[4]; } else { esmFile=tssFile=tdeFile=cfgFile=NULL; - printf("[nrt] esm tss tde cfg required\n"); + printf("[nrt.c: main] esm tss tde cfg required\n"); } - printf("[nrt] allocating RT shared memory\n"); + printf("[nrt.c: main] allocating %ldkB RT shared memory\n",(long int)sizeof(rtshm_struct)/1024); if (initShm(&rtshm_fd,sizeof(rtshm_struct),(void *) &rtshm,RTSHM_FILE)!=0) { return EXIT_FAILURE; } - + i=nrtSmi(esmFile,tssFile,tdeFile,cfgFile); - printf("[nrt] releasing RT shared memory\n"); + printf("[nrt.c: main] releasing RT shared memory\n"); closeShm(rtshm_fd,RTSHM_FILE); - + if (i==0) return EXIT_SUCCESS; else return EXIT_FAILURE; } diff --git a/examples/timing_test/src/nrt.c b/examples/pingpong/src/nrt.c.ok similarity index 97% rename from examples/timing_test/src/nrt.c rename to examples/pingpong/src/nrt.c.ok index 226557208f2b6080948149d0e7da7d68d9cec774..b8c8acb125c6552060ddcbbc342b19a2c7055b13 100644 --- a/examples/timing_test/src/nrt.c +++ b/examples/pingpong/src/nrt.c.ok @@ -3,9 +3,7 @@ * SOURCE FILE ************************************************************************** * - * nrt.c - real-time - * - * CSIRO - Heli Project + * nrt.c - non-real-time system process * ************************************************************************** */ diff --git a/examples/pingpong/src/nrt.c~ b/examples/pingpong/src/nrt.c~ new file mode 100644 index 0000000000000000000000000000000000000000..71747c0cb1f66660c664ff36ceda847acc96da99 --- /dev/null +++ b/examples/pingpong/src/nrt.c~ @@ -0,0 +1,86 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * nrt.c - non-real-time system process + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file nrt.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ +#include <stdlib.h> +#include <stdio.h> + +#include "smi.h" + +#include "rtshm.h" +#include "ushm.h" + +/* + ************************************************************************** + * GLOBALS + ************************************************************************** + */ +rtshm_struct *rtshm; +int rtshm_fd; + +ushm_struct *ushm; +int ushm_fd; + + +/* + ************************************************************************** + * NRT MAIN + ************************************************************************** + */ +int main(int argc,char *argv[]){ + char *esmFile,*tssFile,*tdeFile,*cfgFile; + int i; + + if (argc==5) { + esmFile=argv[1]; + tssFile=argv[2]; + tdeFile=argv[3]; + cfgFile=argv[4]; + } else { + esmFile=tssFile=tdeFile=cfgFile=NULL; + printf("[nrt.c: main] esm tss tde cfg required\n"); + } + + printf("[nrt.c: main] allocating %ldkB RT shared memory\n",(long int)sizeof(rtshm_struct)/1024); + if (initShm(&rtshm_fd,sizeof(rtshm_struct),(void *) &rtshm,RTSHM_FILE)!=0) { + return EXIT_FAILURE; + } + + printf("[nrt.c: main] allocating ushm shared memory\n"); + if (initShm(&ushm_fd,sizeof(ushm_struct),(void *) &ushm,USHM_FILE)!=0) { + return EXIT_FAILURE; + } + + i=nrtSmi(esmFile,tssFile,tdeFile,cfgFile); + + printf("[nrt.c: main] releasing RT shared memory\n"); + closeShm(rtshm_fd,RTSHM_FILE); + + printf("[nrt.c: main] releasing ushm shared memory\n"); + closeShm(ushm_fd,USHM_FILE); + + if (i==0) return EXIT_SUCCESS; + else return EXIT_FAILURE; +} + diff --git a/examples/pingpong/src/nrt_task.c b/examples/pingpong/src/nrt_task.c index ae4d9fcccc33e435599711ab6ea3271b90358eb1..01f221cb4149bb1c54fe88ca125ec8d37f66d623 100644 --- a/examples/pingpong/src/nrt_task.c +++ b/examples/pingpong/src/nrt_task.c @@ -1,3 +1,30 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * nrt_task.c - non-real-time user task dispatcher + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file nrt.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ + + #include <stdlib.h> #include <stdio.h> @@ -5,9 +32,20 @@ #include "rtshm.h" +/* + ************************************************************************** + * GLOBALS + ************************************************************************** + */ rtshm_struct *rtshm; int rtshm_fd; +/* + ************************************************************************** + * NRT TASK MAIN + ************************************************************************** + */ + int main(int argc,char *argv[]){ int nrtProcessID; diff --git a/examples/pingpong/src/nrt_task.c~ b/examples/pingpong/src/nrt_task.c~ new file mode 100644 index 0000000000000000000000000000000000000000..80fb596462f017a1e22d0a692d95846316c48a65 --- /dev/null +++ b/examples/pingpong/src/nrt_task.c~ @@ -0,0 +1,71 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * nrt_task.c - non-real-time user processes + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file nrt.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ + + +#include <stdlib.h> +#include <stdio.h> + +#include "smi.h" + +#include "rtshm.h" + +/* + ************************************************************************** + * GLOBALS + ************************************************************************** + */ +rtshm_struct *rtshm; +int rtshm_fd; + +/* + ************************************************************************** + * NRT TASK MAIN + ************************************************************************** + */ + +int main(int argc,char *argv[]){ + int nrtProcessID; + + if (argc==2) { + nrtProcessID=atof(argv[1]); + printf("[nrt_task.c:main] nrtProcessID=%d\n",nrtProcessID); + } else { + printf("[nrt_task.c:main] nrtProcessID missing\n"); + return EXIT_FAILURE; + } + + printf("[nrt_task.c:main] allocating RT shared memory\n"); + if (initShm(&rtshm_fd,sizeof(rtshm_struct),(void *) &rtshm,RTSHM_FILE)!=0) { + return EXIT_FAILURE; + } + + nrtTask(nrtProcessID); + + printf("[nrt_task.c:main] releasing RT shared memory\n"); + closeShm(rtshm_fd,RTSHM_FILE); + + return EXIT_SUCCESS; +} diff --git a/examples/pingpong/src/rt.c b/examples/pingpong/src/rt.c index e7b21b6a298b61475f0a7a0c02d0d6968c1e6ced..79d25d451c3b8319c8911ccd92932ab9ac18ea20 100644 --- a/examples/pingpong/src/rt.c +++ b/examples/pingpong/src/rt.c @@ -3,9 +3,7 @@ * SOURCE FILE ************************************************************************** * - * rt.c - real-time - * - * CSIRO - Heli Project + * rt.c - real-time system process * ************************************************************************** */ @@ -40,6 +38,8 @@ rtshm_struct *rtshm; int rtshm_fd; + RTIME maxIoTime=0; + /* ************************************************************************** * RT MAIN @@ -47,20 +47,25 @@ int rtshm_fd; */ int main(int argc,char *argv[]){ int i; - - printf("[rt] allocating RT shared memory\n"); + + printf("[rt.c: main] allocating RT shared memory\n"); if (initShm(&rtshm_fd,sizeof(rtshm_struct),(void *) &rtshm,RTSHM_FILE)!=0) { return EXIT_FAILURE; } - + + rtshm->ustime.lock=ATOMIC_UNLOCKED0; + rtshm->ustime.time=0; + rtshm->ustime.localtime[0]='\0'; + rtshm->keyboard.status=KEYBOARD_STATUS_ERROR; + for (i=0;i<MAX_NUMBER_OF_IO_REGIONS;i++) rtshm->regionList[i]=0; - + rtSmi(); - printf("[rt] releasing RT shared memory\n"); + printf("[rt.c: main] releasing RT shared memory\n"); closeShm(rtshm_fd,RTSHM_FILE); + if (maxIoTime>0) printf("[rt.c: main] max IO time: %d\n",(int)maxIoTime); + return EXIT_SUCCESS; } - - diff --git a/examples/timing_test/src/rt.c b/examples/pingpong/src/rt.c.ok similarity index 96% rename from examples/timing_test/src/rt.c rename to examples/pingpong/src/rt.c.ok index e7b21b6a298b61475f0a7a0c02d0d6968c1e6ced..c4651f5d8a11dcd339439f54867a489886045218 100644 --- a/examples/timing_test/src/rt.c +++ b/examples/pingpong/src/rt.c.ok @@ -3,9 +3,7 @@ * SOURCE FILE ************************************************************************** * - * rt.c - real-time - * - * CSIRO - Heli Project + * rt.c - real-time system process * ************************************************************************** */ diff --git a/examples/pingpong/src/rt.c~ b/examples/pingpong/src/rt.c~ new file mode 100644 index 0000000000000000000000000000000000000000..2a308dd70d305ef5f154914b7d2d6f35907f99e9 --- /dev/null +++ b/examples/pingpong/src/rt.c~ @@ -0,0 +1,72 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * rt.c - real-time system process + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file rt.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ +#include <stdlib.h> +#include <stdio.h> + +#include "smi.h" + +#include "rtshm.h" + +/* + ************************************************************************** + * GLOBALS + ************************************************************************** + */ +rtshm_struct *rtshm; +int rtshm_fd; + + RTIME maxIoTime=0; + +/* + ************************************************************************** + * RT MAIN + ************************************************************************** + */ +int main(int argc,char *argv[]){ + int i; + + printf("[rt.c: main] allocating RT shared memory\n"); + if (initShm(&rtshm_fd,sizeof(rtshm_struct),(void *) &rtshm,RTSHM_FILE)!=0) { + return EXIT_FAILURE; + } + + rtshm->ustime.lock=ATOMIC_UNLOCKED0; + rtshm->ustime.time=0; + rtshm->ustime.localtime[0]='\0'; + rtshm->gnssTime=0; + rtshm->keyboard.status=KEYBOARD_STATUS_ERROR; + + for (i=0;i<MAX_NUMBER_OF_IO_REGIONS;i++) rtshm->regionList[i]=0; + + rtSmi(); + + printf("[rt.c: main] releasing RT shared memory\n"); + closeShm(rtshm_fd,RTSHM_FILE); + + if (maxIoTime>0) printf("[rt.c: main] max IO time: %d\n",(int)maxIoTime); + + return EXIT_SUCCESS; +} diff --git a/examples/pingpong/src/rtshm.h b/examples/pingpong/src/rtshm.h index 099c15da4e0d4c966f42ea50511d2f83e6a3115b..c50c5cc742c3fd55c9445e2bf0bbea1921bf5efe 100644 --- a/examples/pingpong/src/rtshm.h +++ b/examples/pingpong/src/rtshm.h @@ -4,9 +4,7 @@ ******************************************************************************** * * rtshm.h - header for real-time shared memory - * - * CSIRO - Heli Project - * + * ******************************************************************************** */ @@ -32,6 +30,13 @@ /////////////////////////////////////// +typedef struct { + unsigned int lock; + RTIME time; + unsigned int time_ms; + char localtime[32]; + unsigned int TOW; +} ustimeStruct; typedef volatile struct _rtshm_struct { @@ -40,7 +45,8 @@ typedef volatile struct _rtshm_struct { logStruct log; KeyboardStruct keyboard; - unsigned int ustime; + ustimeStruct ustime; + RTIME smiStart; } rtshm_struct; #endif /* _RTSHM */ diff --git a/examples/pingpong/src/user_rt.c b/examples/pingpong/src/user_rt.c index d27a0b4e56b6c141b63045bd6ca850261ffbe7a9..930b2c8c9371d3bd155aec67428808a063d5da95 100644 --- a/examples/pingpong/src/user_rt.c +++ b/examples/pingpong/src/user_rt.c @@ -5,8 +5,6 @@ * * user_rt.c - esm task source file for user rt * - * CSIRO - Heli Project - * ************************************************************************** */ diff --git a/examples/timing_test/src/user_nrt.c b/examples/pingpong/src/user_rt.c~ similarity index 56% rename from examples/timing_test/src/user_nrt.c rename to examples/pingpong/src/user_rt.c~ index 825b18f6f76c892af157580479ff9fa734816f80..d27a0b4e56b6c141b63045bd6ca850261ffbe7a9 100644 --- a/examples/timing_test/src/user_nrt.c +++ b/examples/pingpong/src/user_rt.c~ @@ -3,7 +3,7 @@ * SOURCE FILE ************************************************************************** * - * user_nrt.c - esm task source file for user nrt + * user_rt.c - esm task source file for user rt * * CSIRO - Heli Project * @@ -12,7 +12,7 @@ /** ************************************************************************** - * \file user_nrt.c + * \file user_rt.c * \brief na * \author na * \version na @@ -25,27 +25,25 @@ * INCLUDES ************************************************************************** */ -#include <stdlib.h> #include <stdio.h> -#include <string.h> -#include <unistd.h> +#include <stdlib.h> #include <sys/mman.h> #include <sys/stat.h> #include <signal.h> #include <errno.h> #include <fcntl.h> +#include <string.h> +#include <unistd.h> + +#include <sys/io.h> #include "smi.h" +#include "profile.h" #include "rtshm.h" -#include "ushm.h" -#include "user.h" -/* - ************************************************************************** - * DEFINES - ************************************************************************** - */ +#define USER_CHECKTASKTIME 1 +#define USER_CHECKNULLPOINTERS 1 /* @@ -53,32 +51,26 @@ * GLOBALS ************************************************************************** */ -extern rtshm_struct *rtshm; -int ushm_fd; -ushm_struct *ushm; /* ************************************************************************** - * USHM FUNCTIONS + * RT TASKS ************************************************************************** */ -void ushmInitUserShm(taskStateStruct *taskState - // Input Flags: NA NA NA NA NA NA NA NA - // Output Flags: Error NA NA NA NA NA NA NA - // NRT + +void ping(taskStateStruct *taskState + // Input Flags: + // Output Flags: + // RT ) { - int ret; - printf("[initUserShm] allocating user shared memory\n"); - ret=initShm(&ushm_fd,sizeof(ushm_struct),(void *) &ushm,USHM_FILE); - if (ret!=0) taskState->outputControlFlag[1-1]=1; +// rt_printf("ping %d\n",GETTIME_MS); } -void ushmCloseUserShm(taskStateStruct *taskState - // Input Flags: NA NA NA NA NA NA NA NA - // Output Flags: NA NA NA NA NA NA NA NA - // NRT +void pong(taskStateStruct *taskState + // Input Flags: + // Output Flags: + // RT ) { - printf("[closeUserShm] releasing user shared memory\n"); - closeShm(ushm_fd,USHM_FILE); +// rt_printf("pong %d\n",GETTIME_MS); } diff --git a/examples/system_test/CMakeLists.txt b/examples/system_test/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..b34e06c51961f7688221074a43eef275f7446d6f --- /dev/null +++ b/examples/system_test/CMakeLists.txt @@ -0,0 +1,119 @@ +cmake_minimum_required (VERSION 2.6) +project (system_test C) + +SET(COMMON_DIR "../common") +#SET(SMI_LIB_DIR "/code/smr_sc/smi/build") +#SET(SMI_INC_DIR "/code/smr_sc/smi/src") +SET(SMI_LIB_DIR $ENV{SMI_LIB_DIR}) +SET(SMI_INC_DIR $ENV{SMI_LIB_DIR}) + +link_directories(${SMI_LIB_DIR}) + +if("$ENV{MACHTYPE}" STREQUAL "x86_64") +SET(MACHFLAGS "-D_64") +else () +SET(MACHFLAGS "-m32") +endif() + +SET(NRTCFLAGS "-D_NRT -O2 -Wall") + +if($ENV{RTAI}) +# RTAI +SET(RTAI_LDFLAGS "-L/usr/realtime/lib -llxrt -lpthread") +SET(RTCFLAGS "-D_TWARN $(shell rtai-config --lxrt-cflags) -D_RTAI -Wall") +SET(RTLIB rtsmirtai) +SET(NRTLIB nrtsmirtai) +else() +# PREEMPT_RT +SET(RTCFLAGS "-O2 -Wall -fno-stack-protector") +SET(RTLIB rtsmi) +SET(NRTLIB nrtsmi) +endif() + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin) + +include_directories( +${SMI_INC_DIR} +src +smi +/usr/include/libxml2 +${COMMON_DIR}/input +${COMMON_DIR}/logging +${COMMON_DIR}/serial +mod +) + +set(RTSOURCES +smi/esminterf.c +${COMMON_DIR}/logging/profile.c +${COMMON_DIR}/logging/logging_rt.c +${COMMON_DIR}/logging/logging.c +${COMMON_DIR}/input/input_rt.c +${COMMON_DIR}/serial/serial_rt.c +#${COMMON_DIR}/math/common.c +${COMMON_DIR}/serial/serial.c +src/user_rt.c +) + +set(NRTSOURCES +smi/esminterf.c +${COMMON_DIR}/logging/logging.c +${COMMON_DIR}/serial/serial.c +${COMMON_DIR}/input/input_nrt.c +${COMMON_DIR}/logging/logging_nrt.c +${COMMON_DIR}/logging/flash_logger_dist.c +${COMMON_DIR}/services/services_io_nrt.c +#src/user_nrt.c +) + +add_library(rttasklib STATIC ${RTSOURCES}) +add_library(nrttasklib STATIC ${NRTSOURCES}) + +add_library(${RTLIB} STATIC IMPORTED) +set_property(TARGET ${RTLIB} PROPERTY IMPORTED_LOCATION ${SMI_LIB_DIR}/lib${RTLIB}.a) + +add_library(${NRTLIB} STATIC IMPORTED) +set_property(TARGET ${NRTLIB} PROPERTY IMPORTED_LOCATION ${SMI_LIB_DIR}/lib${NRTLIB}.a) + +add_executable(rt src/rt.c) +add_executable(nrt src/nrt.c) +add_executable(nrt_task src/nrt_task.c) +add_executable(decode src/decode.c) +add_executable(smiplay ${COMMON_DIR}/smiplay/smiplay.c) + +target_link_libraries(rt ${RTLIB} rttasklib m 'rt') +#add_dependencies(rt ${RTLIB}) +target_link_libraries(nrt ${NRTLIB} nrttasklib xml2 m 'rt') +target_link_libraries(nrt_task ${NRTLIB} nrttasklib xml2 m 'rt') +target_link_libraries(smiplay ${NRTLIB} m 'rt') + +SET_TARGET_PROPERTIES(rt PROPERTIES COMPILE_FLAGS "${RTCFLAGS} ${MACHFLAGS}") +SET_TARGET_PROPERTIES(rttasklib PROPERTIES COMPILE_FLAGS "${RTCFLAGS} ${MACHFLAGS}") +SET_TARGET_PROPERTIES(nrt PROPERTIES COMPILE_FLAGS "${NRTCFLAGS} ${MACHFLAGS}") +SET_TARGET_PROPERTIES(nrt_task PROPERTIES COMPILE_FLAGS "${NRTCFLAGS} ${MACHFLAGS}") +SET_TARGET_PROPERTIES(nrttasklib PROPERTIES COMPILE_FLAGS "${NRTCFLAGS} ${MACHFLAGS}") + +if($ENV{RTAI}) +set_property(TARGET rt APPEND_STRING PROPERTY LINK_FLAGS ${RTAI_LDFLAGS}) +endif() + +add_custom_target( + services_io.ko + COMMAND make + WORKING_DIRECTORY ../mod +) +add_dependencies(rt services_io.ko) + +add_custom_target( + smi_symbols.h + COMMAND ln -f -s ${SMI_INC_DIR}/smi_symbols.h ../smi +) +add_dependencies(rt smi_symbols.h) + +if($ENV{RTAI}) +add_custom_target( + rtaicheck.sh + COMMAND ../bin/rtaicheck.sh +) +add_dependencies(rt rtaicheck.sh) +endif() diff --git a/examples/timing_test/bin/Makefile b/examples/system_test/bin/Makefile similarity index 91% rename from examples/timing_test/bin/Makefile rename to examples/system_test/bin/Makefile index f300d71cc71a9cf14ff84c57673fb45bc00d9049..fa36a07b0880cfa3c76722eefe9d44fcc58ed525 100644 --- a/examples/timing_test/bin/Makefile +++ b/examples/system_test/bin/Makefile @@ -12,6 +12,7 @@ config: createbuild rtaiconfig: createbuild cd ../build; env RTAI=1 cmake .. $(MAKE) -s clean + @echo !!! check IO_TIMING flag in serial.c !!! clean: -$(MAKE) -s clean -C ../build diff --git a/examples/timing_test/bin/cleanup.sh b/examples/system_test/bin/cleanup.sh similarity index 100% rename from examples/timing_test/bin/cleanup.sh rename to examples/system_test/bin/cleanup.sh diff --git a/examples/system_test/bin/dumplog b/examples/system_test/bin/dumplog new file mode 100755 index 0000000000000000000000000000000000000000..bba49e08163862f4695db37f95f7262f4b8a6ded Binary files /dev/null and b/examples/system_test/bin/dumplog differ diff --git a/examples/system_test/bin/formatld b/examples/system_test/bin/formatld new file mode 100755 index 0000000000000000000000000000000000000000..330399f440c8abb4ddfe0f45b2603e9d4d42cc57 Binary files /dev/null and b/examples/system_test/bin/formatld differ diff --git a/examples/system_test/bin/logbook b/examples/system_test/bin/logbook new file mode 100755 index 0000000000000000000000000000000000000000..28dfdbf5db03db6f1c30ac7121bf0b4b4cd70b34 Binary files /dev/null and b/examples/system_test/bin/logbook differ diff --git a/examples/timing_test/bin/rtaicheck.sh b/examples/system_test/bin/rtaicheck.sh similarity index 100% rename from examples/timing_test/bin/rtaicheck.sh rename to examples/system_test/bin/rtaicheck.sh diff --git a/examples/timing_test/bin/rtaicleanup.sh b/examples/system_test/bin/rtaicleanup.sh similarity index 100% rename from examples/timing_test/bin/rtaicleanup.sh rename to examples/system_test/bin/rtaicleanup.sh diff --git a/examples/system_test/bin/rtaistart.sh b/examples/system_test/bin/rtaistart.sh new file mode 120000 index 0000000000000000000000000000000000000000..1bb26ffa09b76f0c6f58d59f6a27f3051c129607 --- /dev/null +++ b/examples/system_test/bin/rtaistart.sh @@ -0,0 +1 @@ +../../common/scripts/rtaistart.sh \ No newline at end of file diff --git a/examples/system_test/bin/start.sh b/examples/system_test/bin/start.sh new file mode 120000 index 0000000000000000000000000000000000000000..eee70456097a0add3280f4b6ef1e5f1f9a9e78c3 --- /dev/null +++ b/examples/system_test/bin/start.sh @@ -0,0 +1 @@ +../../common/scripts/start.sh.i7 \ No newline at end of file diff --git a/examples/timing_test/esm/Makefile b/examples/system_test/esm/Makefile similarity index 60% rename from examples/timing_test/esm/Makefile rename to examples/system_test/esm/Makefile index b2c067b5e1eff9b246459b6f593c9cdf27839f18..9e3317e1f118d43d9f15a8893e36fd51d4f47476 100644 --- a/examples/timing_test/esm/Makefile +++ b/examples/system_test/esm/Makefile @@ -4,10 +4,13 @@ SLOTMAP=slotmap.xml PROCESSMAP=processmap.xml BASICPROCESS=basicprocess.xml BASICSLOT=basicslot.xml -REMOTE_SMI=root@helisim-ph:/root/s1resqu/cuas/example2/smi -#REMOTE_SMI=aslab@helisim-ph:/code/cuas/example2/smi -#REMOTE_SMI=root@140.253.35.244:/test/example2/smi -#REMOTE_SMI=root@140.253.35.242:/code/cuas/example2/smi +#REMOTE_SMI=aslab@140.253.34.81:/code/smr/system_test/smi +#REMOTE_SMI=aslab@140.253.32.210:/code/smr/system_test/smi +#REMOTE_SMI=aslab@140.253.35.232:/code/smr/system_test/smi +#REMOTE_SMI=aslab@140.253.35.216:/code/smr/system_test/smi +#REMOTE_SMI=aslab@140.253.23.125:/home/aslab/smr/system_test/smi +#REMOTE_SMI=root@192.168.0.105:/code/smr/system_test/smi +REMOTE_SMI=root@140.253.35.216:/code/smr/system_test/smi ESMTOSMI=esmtosmi ESMSCHED=esmscheduler @@ -33,9 +36,11 @@ smi: clone expand sched: $(ESMSCHED) $(BASICSLOT) > $(SCHEDULING) + @echo run \"make smi\" to update scheduling files check: expand env ESMLIBDIR=$(ESMLIBD) $(ESMCHECK) root.esm $(TASKSPECEXPANDED) + @echo \(results based on outputs of \"make\" or \"make smi\"\) install: cp user.smi ../smi @@ -46,16 +51,18 @@ install: install_smi: cp user.smi ../smi + cp smisched.tss ../smi/user.tss + cp smitasks.tde ../smi/user.tde remote_install: - scp user.smi $(REMOTE_SMI) - scp smisched.tss $(REMOTE_SMI)/user.tss - scp smitasks.tde $(REMOTE_SMI)/user.tde - scp esminterf.h $(REMOTE_SMI) - scp esminterf.c $(REMOTE_SMI) + ln -sf smisched.tss user.tss + ln -sf smitasks.tde user.tde + scp user.smi esminterf.h esminterf.c user.tss user.tde $(REMOTE_SMI) remote_smi_install: - scp user.smi $(REMOTE_SMI) + ln -sf smisched.tss user.tss + ln -sf smitasks.tde user.tde + scp user.smi user.tss user.tde $(REMOTE_SMI) edit: expand env ESMLIBDIR=$(ESMLIBD) $(EDITOR) root.esm $(TASKSPECEXPANDED) @@ -72,10 +79,9 @@ cl: $(MAKE) -f /tmp/Makefile.libclones clean: - -rm -f *.esm-* - -rm -f $(SCHEDULING) user.smi - -rm -f esminterf.c esminterf.h - -rm -f modelinfo.xml smisched.tss smitasks.tde - -rm -f taskspec-expanded.xml - -rm -f *~ - \ No newline at end of file + rm -f *.esm-* + rm -f $(SCHEDULING) user.smi + rm -f esminterf.c esminterf.h + rm -f modelinfo.xml smisched.tss smitasks.tde + rm -f taskspec-expanded.xml + rm -f *~ diff --git a/examples/timing_test/esm/basicprocess.xml b/examples/system_test/esm/basicprocess.xml similarity index 52% rename from examples/timing_test/esm/basicprocess.xml rename to examples/system_test/esm/basicprocess.xml index eb4a83654f341764725ab25067e93248b866cf6c..e0e64aabb7e1a4b97cca8d4e5bc2912d18c67c4b 100644 --- a/examples/timing_test/esm/basicprocess.xml +++ b/examples/system_test/esm/basicprocess.xml @@ -2,5 +2,7 @@ <!-- Unit is nano seconds --> <basic-processes> <process id="0" name="systemProcess"/> - <process id="1" name="logProcess"/> + <process id="1" name="process1"/> + <process id="2" name="process2"/> + <process id="3" name="process3"/> </basic-processes> diff --git a/examples/system_test/esm/basicslot.xml b/examples/system_test/esm/basicslot.xml new file mode 100644 index 0000000000000000000000000000000000000000..b4a546f44390841a6198223121528d032c6246bb --- /dev/null +++ b/examples/system_test/esm/basicslot.xml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<!-- Unit is nano seconds --> +<basic-slots period="1000000" > + <slot id="timingTestSlot" multiplier="1" duration="25000" /> + <slot id="comSlot" multiplier="1" duration="150000" /> + <slot id="userSlot" multiplier="1" duration="110000" /> + <slot id="suspendSlot" multiplier="1" duration="250000" /> + <slot id="smiSlot" multiplier="5" duration="250000" /> + <slot id="logSlot" multiplier="5" duration="280000" /> + <slot id="initSlot" multiplier="50" duration="200000" /> +</basic-slots> diff --git a/examples/timing_test/esm/com.esm b/examples/system_test/esm/com.esm similarity index 99% rename from examples/timing_test/esm/com.esm rename to examples/system_test/esm/com.esm index 026a99a9ce74b05cce9c64a83b62a33a7a9052f5..6c572abbb95cf7bd0dcd78ce3987ec6fb7af4cba 100644 --- a/examples/timing_test/esm/com.esm +++ b/examples/system_test/esm/com.esm @@ -18,14 +18,14 @@ <container-events> <event uuid="{a2a6cde8-e883-4bb9-9813-b27ab5c44b23}" name="comOpen" comment=""/> <event uuid="{4bf3b1c9-9d86-475a-8081-9b6778cc1079}" name="ioPortsAllocated" comment=""/> - <event uuid="{c5b1a029-b93d-4fc7-8b29-1de1ad202efd}" name="ioReqPortsAllocated" comment=""/> <event uuid="{91c50acd-208c-41e1-b64f-e16d52b70cfa}" name="quitCom" comment=""/> + <event uuid="{c5b1a029-b93d-4fc7-8b29-1de1ad202efd}" name="reqIoPortsState" comment=""/> </container-events> <input-events> <event-ref uuid="{4bf3b1c9-9d86-475a-8081-9b6778cc1079}" name="ioPortsAllocated"/> </input-events> <output-events> - <event-ref uuid="{c5b1a029-b93d-4fc7-8b29-1de1ad202efd}" name="ioReqPortsAllocated"/> + <event-ref uuid="{c5b1a029-b93d-4fc7-8b29-1de1ad202efd}" name="reqIoPortsState"/> </output-events> <global-events> <event uuid="{f2e4d4b3-d3b8-4912-b300-98a7fb8a2935}" name="PULSEEVENT" type="pulseevent" comment=""/> @@ -297,7 +297,7 @@ <flag uuid="{55ec268f-f60b-4add-a227-a39c9ea173d9}" name="Timeout" comment="" type="timeout"/> </system-flags> </initial-state> - <task-state uuid="{95d8cd13-dac0-4a93-a109-82f7b5a05be6}" name="stage1" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="initSerialSensor" task-slot-name="user" process-name="" real-time="1"> + <task-state uuid="{95d8cd13-dac0-4a93-a109-82f7b5a05be6}" name="stage1" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="testSerial" task-slot-name="user" process-name="" real-time="1"> <input-ports> <port uuid="{2b924b68-30ec-49b8-8c3d-b7edabc0b361}" name="comRead" comment="" data-storage-uuid="{f59b3c19-54a5-40fe-a89d-435a761017bc}" optional="0" allocation="0" release="0" read="1" write="0"/> </input-ports> @@ -319,7 +319,7 @@ <flag uuid="{21fcf3f7-2814-4008-8bec-f1fb2ab5a387}" name="Busy" comment="" type="busy"/> </system-flags> </task-state> - <task-state uuid="{fd194f95-7b90-4987-ad45-c8200f0ec71c}" name="stage2" comment="" timeout="1000" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="initSerialSensor" task-slot-name="user" process-name="" real-time="1"> + <task-state uuid="{fd194f95-7b90-4987-ad45-c8200f0ec71c}" name="stage2" comment="" timeout="1000" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="testSerial" task-slot-name="user" process-name="" real-time="1"> <input-ports> <port uuid="{3e11d60e-4cb8-48c0-b6b4-779fa5694b0f}" name="comRead" comment="" data-storage-uuid="{f59b3c19-54a5-40fe-a89d-435a761017bc}" optional="0" allocation="0" release="0" read="1" write="0"/> </input-ports> diff --git a/examples/timing_test/esm/esminterf.xml b/examples/system_test/esm/esminterf.xml similarity index 73% rename from examples/timing_test/esm/esminterf.xml rename to examples/system_test/esm/esminterf.xml index 13670db2478f4390781654576eebbacedd6879ff..6f146b7e614fc24211dc1826d456913db9b91928 100644 --- a/examples/timing_test/esm/esminterf.xml +++ b/examples/system_test/esm/esminterf.xml @@ -2,7 +2,7 @@ <!-- duration unit: nano seconds --> <task-declarations> - <task name="initSerialSensor" duration="80000" oneshot="no" non-realtime="no" realtime="yes"> + <task name="testSerial" duration="80000" oneshot="no" non-realtime="no" realtime="yes"> <input-flags> <flag name="stage1" /> <flag name="stage2" /> @@ -30,4 +30,14 @@ <output-ports> </output-ports> </task> + <task name="rtSuspend" duration="70000" oneshot="no" non-realtime="no" realtime="yes"> + <input-flags> + </input-flags> + <output-flags> + </output-flags> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + </task> </task-declarations> diff --git a/examples/system_test/esm/main.esm b/examples/system_test/esm/main.esm new file mode 100644 index 0000000000000000000000000000000000000000..e616cdea7147865675b5095ea6572dc1f14f3b7f --- /dev/null +++ b/examples/system_test/esm/main.esm @@ -0,0 +1,362 @@ +<?xml version="1.0"?> +<esmcontainer uuid="{4b0db93f-4550-46e9-8ee0-7d1a430dec13}" name="" cloned-from="../../pingpong/esm/main.esm" comment="" scene-width="5000" scene-height="5000"> + <data-storage-list> + <data-storage uuid="{de904071-819b-432e-948e-d1542b613489}" name="keyboard" comment=""/> + <data-storage uuid="{6b9a985f-3c5d-4ba9-af1a-6d30e0069161}" name="log" comment=""/> + <data-storage uuid="{27cac569-8492-417c-9bee-665eb3bcee84}" name="smiTelem" comment=""/> + </data-storage-list> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + <flag uuid="{17060884-03d3-43bb-8b0f-f5ebfc499a1f}" name="loggerOff" comment="" type="user_defined"/> + </input-flags> + <output-flags> + </output-flags> + <container-events> + <event uuid="{8279b755-6810-4d0e-9d78-6a2062ef35e3}" name="buzzerOn" comment=""/> + <event uuid="{1aebe80b-584a-4360-853a-8283d2906222}" name="init" comment=""/> + <event uuid="{a56d0600-965a-4157-a18a-5573e533e666}" name="ioPortsAllocated" comment=""/> + <event uuid="{bf5153cb-7b3b-41eb-b4bf-7fc3c1a746a0}" name="ioPortsError" comment=""/> + <event uuid="{f53e827f-6a6c-49f1-87f2-2ffa232c1f95}" name="keyboardQuit" comment=""/> + <event uuid="{41233ad4-3b56-4cdf-844c-ecd1a58de190}" name="keyboardReady" comment=""/> + <event uuid="{8345aac0-6643-407d-8ca6-9034c850440a}" name="logProcessUp" comment=""/> + <event uuid="{4b5fb424-5bac-4bd1-ad89-d7e239c03043}" name="logReady" comment=""/> + <event uuid="{c83187fe-a9fa-4d54-a747-8bd80eadda03}" name="loggingOff" comment=""/> + <event uuid="{8ef8f08d-c66f-4735-affd-51817d4364d2}" name="loggingStopped" comment=""/> + <event uuid="{7f324b81-9f24-426e-b282-6cba52f996ff}" name="quadCore" comment=""/> + <event uuid="{c5b71aed-0154-4a9c-b955-616fbe5ba165}" name="reqConfig" comment=""/> + <event uuid="{f6cbecbc-fcc4-4ce0-90e3-278086dfa347}" name="reqIoPortsState" comment=""/> + <event uuid="{9502e0db-c1cd-4fd8-b54c-2512759b0c21}" name="reqLogState" comment=""/> + <event uuid="{029ba90e-80ac-4d1f-9dc6-632f96396989}" name="servicesDone" comment=""/> + <event uuid="{e36a9b72-5614-4348-8de2-2d28916eab95}" name="shutdownLogger" comment=""/> + <event uuid="{210e87ac-0e9f-43d4-949d-0a3d9da537f6}" name="singleCore" comment=""/> + <event uuid="{7e993b09-94c7-4a92-ba12-590660b8e114}" name="smiEventQueueOverflow" comment=""/> + <event uuid="{a210f483-004b-4f71-95ef-c5aab91d89f2}" name="smiReady" comment=""/> + <event uuid="{eeff88f7-1263-41a6-8b74-270e5a2f524f}" name="smiReqReady" comment=""/> + <event uuid="{487dc206-1d78-4212-b027-174273d7c91b}" name="userDone" comment=""/> + </container-events> + <input-events> + <event-ref uuid="{1aebe80b-584a-4360-853a-8283d2906222}" name="init"/> + <event-ref uuid="{210e87ac-0e9f-43d4-949d-0a3d9da537f6}" name="singleCore"/> + <event-ref uuid="{7f324b81-9f24-426e-b282-6cba52f996ff}" name="quadCore"/> + </input-events> + <output-events> + <event-ref uuid="{c5b71aed-0154-4a9c-b955-616fbe5ba165}" name="reqConfig"/> + </output-events> + <global-events> + <event uuid="{aa550044-45ee-471d-8ca4-daf00b626049}" name="PULSEEVENT" type="pulseevent" comment=""/> + </global-events> + <regions> + <region uuid="{b35b7738-f77b-4a23-a67e-42e3d49621ee}" name="" comment="" number="0"> + <states> + <super-state uuid="{95a24983-706b-4a24-8fbf-51acd84f1b5e}" cloned-from-uuid="{b5fc1c67-da4a-4b05-a5e2-17d0c9346a82}" name="smi" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="smi.esm" path-string=""> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + <flag uuid="{d188501e-29c0-4eaa-8cfb-6aed4dbee81b}" name="quit" comment="" type="user_defined"/> + <flag uuid="{e9a6ba03-1514-4a2a-acb7-f3cc3a8bdffe}" name="shutdown" comment="" type="user_defined"/> + </input-flags> + <system-flags> + <flag uuid="{26fbb50c-fb14-4529-9bc7-e7835e1c6eaa}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{c440a75b-ac16-4c34-9062-0b7e73d9f5ff}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + </output-flags> + <input-events> + <event-ref uuid="{1aebe80b-584a-4360-853a-8283d2906222}" name="init"/> + <event-ref uuid="{eeff88f7-1263-41a6-8b74-270e5a2f524f}" name="smiReqReady"/> + </input-events> + <output-events> + <event-ref uuid="{7e993b09-94c7-4a92-ba12-590660b8e114}" name="smiEventQueueOverflow"/> + <event-ref uuid="{a210f483-004b-4f71-95ef-c5aab91d89f2}" name="smiReady"/> + </output-events> + </super-state> + <initial-state uuid="{38b9f3c8-d1bf-4baa-8a23-447ccb8dc9a6}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{767f1b14-7127-45cc-90cf-aa863df4a931}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <final-state uuid="{d44c57fb-c2c9-4e93-a843-284f8f010e7a}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> + </states> + <transitions> + <transition uuid="{84d62232-dd65-452b-bd80-ea893baaf404}" comment="" from-state-uuid="{38b9f3c8-d1bf-4baa-8a23-447ccb8dc9a6}" to-state-uuid="{95a24983-706b-4a24-8fbf-51acd84f1b5e}" event-uuid="{1aebe80b-584a-4360-853a-8283d2906222}"> + <actions> + <send-event-action uuid="{126f6988-0b06-4e53-8460-5c1fb46198fa}" name="" comment="" event-uuid="{1aebe80b-584a-4360-853a-8283d2906222}"/> + </actions> + </transition> + <transition uuid="{78bb189c-ace1-47d6-a0ab-8b9966cf0e4b}" comment="" from-state-uuid="{95a24983-706b-4a24-8fbf-51acd84f1b5e}" to-state-uuid="{d44c57fb-c2c9-4e93-a843-284f8f010e7a}" event-uuid="{aa550044-45ee-471d-8ca4-daf00b626049}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{c440a75b-ac16-4c34-9062-0b7e73d9f5ff}"/> + </transition> + <transition uuid="{309aa6d7-e857-4173-8bca-6093f98959e9}" comment="" from-state-uuid="{95a24983-706b-4a24-8fbf-51acd84f1b5e}" to-state-uuid="{95a24983-706b-4a24-8fbf-51acd84f1b5e}" event-uuid="{029ba90e-80ac-4d1f-9dc6-632f96396989}"> + <actions> + <set-flag-action uuid="{8601c824-8ec1-4d92-8847-36a4ba69deaf}" name="" comment="" flag-uuid="{d188501e-29c0-4eaa-8cfb-6aed4dbee81b}" flag-value="0"/> + </actions> +<guard operator="negation" flag-uuid="{c440a75b-ac16-4c34-9062-0b7e73d9f5ff}"/> + </transition> + </transitions> + </region> + <region uuid="{4f756089-d929-4668-a8b8-923e0ac4fe02}" name="" comment="" number="1"> + <states> + <initial-state uuid="{c84dd4b1-8f33-4ac7-91c0-84ec6ce2d46b}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{e0ed65b7-a9a8-4870-b7ca-f9f356586e1a}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <basic-state uuid="{f3c5b5de-4dc2-4881-ad50-2162f9126aa9}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{e15db4fa-9f8c-4bc1-b559-fe0014f9afb1}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + <super-state uuid="{4af6ccfe-6b93-43aa-b555-b5ff447c2313}" cloned-from-uuid="{f1ccc2f5-dbfb-47b6-b0cc-d0a2af45150a}" name="services" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="services_no_flash.esm" path-string=""> + <input-ports> + <port uuid="{354c2fb5-073c-4d2f-bf40-6f28328207d0}" name="smiTelem" comment="" data-storage-uuid="{27cac569-8492-417c-9bee-665eb3bcee84}" optional="1" allocation="0" release="1" read="1" write="0"/> + </input-ports> + <output-ports> + <port uuid="{b84a56a3-c713-4801-8d76-dd0b2445c2bc}" name="log" comment="" data-storage-uuid="{6b9a985f-3c5d-4ba9-af1a-6d30e0069161}" optional="1" allocation="1" release="0" read="0" write="1"/> + <port uuid="{8bfa3315-8428-40d2-8e8e-b0153685020c}" name="keyboard" comment="" data-storage-uuid="{de904071-819b-432e-948e-d1542b613489}" optional="0" allocation="1" release="0" read="0" write="1"/> + <port uuid="{7fde0db9-3db6-47b9-bb9c-5e72542eea42}" name="smiTelem" comment="" data-storage-uuid="{27cac569-8492-417c-9bee-665eb3bcee84}" optional="1" allocation="1" release="0" read="0" write="1"/> + </output-ports> + <input-flags> + <flag uuid="{8953f9bf-3a54-4fb4-b738-0eda552804c4}" name="quit" comment="" type="user_defined"/> + <flag uuid="{864e6e0e-13d5-4e6f-80ba-dee793eade1b}" name="stopLogging" comment="" type="user_defined"/> + <flag uuid="{3701786e-83e6-4153-bf46-473147aa44fe}" name="flashLogging" comment="" type="user_defined"/> + <flag uuid="{9f99600b-34b8-4ae3-ac10-c4b4e388f522}" name="readSmiTelem" comment="" type="user_defined"/> + <flag uuid="{e9447834-623f-4177-9381-018ad4d1781a}" name="fsLogging" comment="" type="user_defined"/> + <flag uuid="{fe7f2d28-22b6-443b-a281-5a473dd63c49}" name="quitChar" comment="" type="user_defined"/> + </input-flags> + <system-flags> + <flag uuid="{3e681e58-b98f-40be-8b68-5f78c24e9345}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{8a51105e-f215-4c8a-b793-804e72556b5b}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + <flag uuid="{086b8fe6-569b-4fe9-a6f0-72e691812edd}" name="servicesDone" comment="" type="user_defined"/> + </output-flags> + <input-events> + <event-ref uuid="{f6cbecbc-fcc4-4ce0-90e3-278086dfa347}" name="reqIoPortsState"/> + <event-ref uuid="{9502e0db-c1cd-4fd8-b54c-2512759b0c21}" name="reqLogState"/> + <event-ref uuid="{210e87ac-0e9f-43d4-949d-0a3d9da537f6}" name="singleCore"/> + <event-ref uuid="{7f324b81-9f24-426e-b282-6cba52f996ff}" name="quadCore"/> + </input-events> + <output-events> + <event-ref uuid="{f53e827f-6a6c-49f1-87f2-2ffa232c1f95}" name="keyboardQuit"/> + <event-ref uuid="{a56d0600-965a-4157-a18a-5573e533e666}" name="ioPortsAllocated"/> + <event-ref uuid="{029ba90e-80ac-4d1f-9dc6-632f96396989}" name="servicesDone"/> + <event-ref uuid="{8ef8f08d-c66f-4735-affd-51817d4364d2}" name="loggingStopped"/> + <event-ref uuid="{4b5fb424-5bac-4bd1-ad89-d7e239c03043}" name="logReady"/> + <event-ref uuid="{8345aac0-6643-407d-8ca6-9034c850440a}" name="logProcessUp"/> + <event-ref uuid="{bf5153cb-7b3b-41eb-b4bf-7fc3c1a746a0}" name="ioPortsError"/> + <event-ref uuid="{41233ad4-3b56-4cdf-844c-ecd1a58de190}" name="keyboardReady"/> + <event-ref uuid="{c5b71aed-0154-4a9c-b955-616fbe5ba165}" name="reqConfig"/> + <event-ref uuid="{8279b755-6810-4d0e-9d78-6a2062ef35e3}" name="buzzerOn"/> + <event-ref uuid="{c83187fe-a9fa-4d54-a747-8bd80eadda03}" name="loggingOff"/> + </output-events> + </super-state> + </states> + <transitions> + <transition uuid="{f782a2e1-ed31-4210-b4c0-7f517829d238}" comment="" from-state-uuid="{c84dd4b1-8f33-4ac7-91c0-84ec6ce2d46b}" to-state-uuid="{4af6ccfe-6b93-43aa-b555-b5ff447c2313}" event-uuid="{a210f483-004b-4f71-95ef-c5aab91d89f2}"> + <actions> + <set-flag-action uuid="{bbe16642-a9ee-431e-8e43-905b06ca7f3e}" name="" comment="" flag-uuid="{e9447834-623f-4177-9381-018ad4d1781a}" flag-value="0"/> + </actions> +<guard operator="negation" flag-uuid="{17060884-03d3-43bb-8b0f-f5ebfc499a1f}"/> + </transition> + <transition uuid="{0065857e-2cf1-4873-96d8-18672eb378f8}" comment="" from-state-uuid="{4af6ccfe-6b93-43aa-b555-b5ff447c2313}" to-state-uuid="{f3c5b5de-4dc2-4881-ad50-2162f9126aa9}" event-uuid="{aa550044-45ee-471d-8ca4-daf00b626049}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{8a51105e-f215-4c8a-b793-804e72556b5b}"/> + </transition> + <transition uuid="{c3eb48b5-b193-43d2-a4f0-183a8f31801f}" comment="" from-state-uuid="{4af6ccfe-6b93-43aa-b555-b5ff447c2313}" to-state-uuid="{4af6ccfe-6b93-43aa-b555-b5ff447c2313}" event-uuid="{487dc206-1d78-4212-b027-174273d7c91b}"> + <actions> + <set-flag-action uuid="{e567c051-a545-4ec1-b6c5-344e1e374b52}" name="" comment="" flag-uuid="{8953f9bf-3a54-4fb4-b738-0eda552804c4}" flag-value="0"/> + </actions> +<guard operator="negation" flag-uuid="{8a51105e-f215-4c8a-b793-804e72556b5b}"/> + </transition> + <transition uuid="{5dce3cda-8f6f-467b-8b7c-fd17933599c0}" comment="" from-state-uuid="{4af6ccfe-6b93-43aa-b555-b5ff447c2313}" to-state-uuid="{4af6ccfe-6b93-43aa-b555-b5ff447c2313}" event-uuid="{e36a9b72-5614-4348-8de2-2d28916eab95}"> + <actions> + <set-flag-action uuid="{c7ecfbba-3905-4552-9239-07320cde5b8b}" name="" comment="" flag-uuid="{864e6e0e-13d5-4e6f-80ba-dee793eade1b}" flag-value="0"/> + </actions> +<guard operator="negation" flag-uuid="{8a51105e-f215-4c8a-b793-804e72556b5b}"/> + </transition> + <transition uuid="{ac58d168-4fbc-448e-a195-43bc215f2ada}" comment="" from-state-uuid="{c84dd4b1-8f33-4ac7-91c0-84ec6ce2d46b}" to-state-uuid="{4af6ccfe-6b93-43aa-b555-b5ff447c2313}" event-uuid="{a210f483-004b-4f71-95ef-c5aab91d89f2}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{17060884-03d3-43bb-8b0f-f5ebfc499a1f}"/> + </transition> + </transitions> + </region> + <region uuid="{403edcd0-b27f-4825-a29b-1cfe97c1cc4b}" name="" comment="" number="2"> + <states> + <initial-state uuid="{9165f9d6-83f8-4f17-bc92-a772fee40ac5}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{d8830bde-b67f-4b7e-b204-b6856f90aa05}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <basic-state uuid="{c4e29b29-824a-4fae-a18d-565b229e0526}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> + <flag uuid="{173a9a8a-5ad4-4969-9240-a52ff7b8d666}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </basic-state> + <super-state uuid="{9d5e1509-1b37-47c9-af90-f1a20f91ede6}" cloned-from-uuid="" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="user.esm" path-string=""> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + <flag uuid="{1aab33d1-5269-48be-b1b0-d48c266b7423}" name="quit" comment="" type="user_defined"/> + <flag uuid="{b94afec0-d21b-4315-8fac-9e2bf035f31a}" name="com" comment="" type="user_defined"/> + <flag uuid="{828cf298-847c-45f6-90e5-b86f42b24ca1}" name="timing_test" comment="" type="user_defined"/> + <flag uuid="{73c2eeba-d69f-4db3-b479-d060c635d6fd}" name="stress_test" comment="" type="user_defined"/> + </input-flags> + <system-flags> + <flag uuid="{cd5cb050-6fc5-4e19-9329-e3e646bf872d}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{68970f1e-0fbe-4d72-b62f-98f2ffd00b81}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + </output-flags> + <input-events> + <event-ref uuid="{a56d0600-965a-4157-a18a-5573e533e666}" name="ioPortsAllocated"/> + </input-events> + <output-events> + <event-ref uuid="{f6cbecbc-fcc4-4ce0-90e3-278086dfa347}" name="reqIoPortsState"/> + </output-events> + </super-state> + <task-state uuid="{b2644eb8-a1d2-4e08-8503-5c2168e33a04}" name="testEndianess" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="testEndianess" task-slot-name="init" process-name="" real-time="1"> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + <flag uuid="{29dfe7ff-4239-47f1-9961-d55e3f717a5f}" name="littleEndian" comment="" type="user_defined"/> + </output-flags> + <system-flags> + <flag uuid="{7cb7419d-89a8-4bf9-b8b9-400016784f41}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{1145e76b-ac83-40f0-8373-ce1613128f93}" name="Exit" comment="" type="exit"/> + <flag uuid="{7fa68681-4947-41b4-a15b-159abb2c8cd3}" name="Busy" comment="" type="busy"/> + </system-flags> + </task-state> + </states> + <transitions> + <transition uuid="{f6362662-818e-4fb5-a00d-e804d9b461b8}" comment="" from-state-uuid="{9165f9d6-83f8-4f17-bc92-a772fee40ac5}" to-state-uuid="{b2644eb8-a1d2-4e08-8503-5c2168e33a04}" event-uuid="{a210f483-004b-4f71-95ef-c5aab91d89f2}"> + <actions> + </actions> + </transition> + <transition uuid="{fa174b92-f682-4c07-af41-d079d6d42f7f}" comment="" from-state-uuid="{9d5e1509-1b37-47c9-af90-f1a20f91ede6}" to-state-uuid="{c4e29b29-824a-4fae-a18d-565b229e0526}" event-uuid="{aa550044-45ee-471d-8ca4-daf00b626049}"> + <actions> + <send-event-action uuid="{51ab2751-7e20-49bd-b2af-1fe70a56fa21}" name="" comment="" event-uuid="{487dc206-1d78-4212-b027-174273d7c91b}"/> + </actions> +<guard operator="none" flag-uuid="{68970f1e-0fbe-4d72-b62f-98f2ffd00b81}"/> + </transition> + <transition uuid="{6e830148-cf04-42be-933b-b62e516ef524}" comment="" from-state-uuid="{9d5e1509-1b37-47c9-af90-f1a20f91ede6}" to-state-uuid="{9d5e1509-1b37-47c9-af90-f1a20f91ede6}" event-uuid="{f53e827f-6a6c-49f1-87f2-2ffa232c1f95}"> + <actions> + <set-flag-action uuid="{7d6d4b64-977e-44a3-bd08-e25e122f92bb}" name="" comment="" flag-uuid="{1aab33d1-5269-48be-b1b0-d48c266b7423}" flag-value="0"/> + </actions> +<guard operator="negation" flag-uuid="{68970f1e-0fbe-4d72-b62f-98f2ffd00b81}"/> + </transition> + <transition uuid="{9e1d9645-f428-4565-aae8-5595bd09adcc}" comment="" from-state-uuid="{b2644eb8-a1d2-4e08-8503-5c2168e33a04}" to-state-uuid="{9d5e1509-1b37-47c9-af90-f1a20f91ede6}" event-uuid="{aa550044-45ee-471d-8ca4-daf00b626049}"> + <actions> + <set-flag-action uuid="{bc0fefa8-b764-40af-b1bb-f07d2de4559a}" name="" comment="" flag-uuid="{b94afec0-d21b-4315-8fac-9e2bf035f31a}" flag-value="0"/> + </actions> +<guard operator="none" flag-uuid="{29dfe7ff-4239-47f1-9961-d55e3f717a5f}"/> + </transition> + <transition uuid="{74045138-3ef5-433c-8476-05766a44811c}" comment="" from-state-uuid="{b2644eb8-a1d2-4e08-8503-5c2168e33a04}" to-state-uuid="{c4e29b29-824a-4fae-a18d-565b229e0526}" event-uuid="{aa550044-45ee-471d-8ca4-daf00b626049}"> + <actions> + <send-event-action uuid="{6d3063c1-c564-4f10-9d5b-4ad8b9a72d2c}" name="" comment="" event-uuid="{487dc206-1d78-4212-b027-174273d7c91b}"/> + </actions> +<guard operator="and" flag-uuid=""> +<guard operator="none" flag-uuid="{1145e76b-ac83-40f0-8373-ce1613128f93}"/> +<guard operator="negation" flag-uuid="{29dfe7ff-4239-47f1-9961-d55e3f717a5f}"/> +</guard> + </transition> + </transitions> + </region> + </regions> + <diagrams> + <diagram uuid="{9d6de6ae-d189-4f45-95f7-a988176e003a}" name="" comment=""> + <box-item uuid="{5a5e8328-e0ae-4add-9507-e88180fc5ac4}" comment="" model-uuid="" x="2295" y="2355" width="390" height="60" type="input_events_box"/> + <box-item uuid="{c83f1185-dfdc-4081-9d9d-83783bff91c3}" comment="" model-uuid="" x="2295" y="2415" width="390" height="60" type="output_events_box"/> + <box-item uuid="{ffec7404-a048-43df-bfef-b62c7477580b}" comment="" model-uuid="" x="2295" y="2475" width="390" height="60" type="input_ports_box"/> + <box-item uuid="{31cbf12e-5b74-40a6-a8be-4630fd974f32}" comment="" model-uuid="" x="2295" y="2535" width="390" height="60" type="output_ports_box"/> + <box-item uuid="{47a3bf66-eef0-4462-97f3-698f6c5788f4}" comment="" model-uuid="" x="2295" y="2595" width="390" height="60" type="input_flags_box"/> + <box-item uuid="{ad7acddf-41fd-462e-a496-9c2974b73cb3}" comment="" model-uuid="" x="2295" y="2655" width="390" height="60" type="output_flags_box"/> + <box-item uuid="{56c821dc-a32e-43a1-986a-eca3f301fb95}" comment="" model-uuid="" x="2295" y="2715" width="390" height="60" type="container_box"/> + <box-item uuid="{cc84a536-d82b-4917-a508-ceaed40b8a74}" comment="" model-uuid="{b35b7738-f77b-4a23-a67e-42e3d49621ee}" x="2790" y="2550" width="480" height="480" type="standard_box"/> + <box-item uuid="{387918d9-b4ae-40e7-ae4e-efb82878214e}" comment="" model-uuid="{95a24983-706b-4a24-8fbf-51acd84f1b5e}" x="-10" y="-3" width="100" height="50" type="standard_box"/> + <box-item uuid="{6d351a52-2479-4279-8544-663a7f17ebb7}" comment="" model-uuid="{4f756089-d929-4668-a8b8-923e0ac4fe02}" x="3300" y="2550" width="480" height="480" type="standard_box"/> + <box-item uuid="{c0969058-bab4-45c4-b273-03623925a89b}" comment="" model-uuid="{403edcd0-b27f-4825-a29b-1cfe97c1cc4b}" x="3810" y="2550" width="480" height="480" type="standard_box"/> + <box-item uuid="{c015952d-bafd-494e-b1a1-59d48c728da2}" comment="" model-uuid="{38b9f3c8-d1bf-4baa-8a23-447ccb8dc9a6}" x="-110" y="-117" width="12" height="12" type="standard_box"/> + <box-item uuid="{ddbb934b-3d1a-4421-9511-95483d6152cf}" comment="" model-uuid="{d44c57fb-c2c9-4e93-a843-284f8f010e7a}" x="75" y="126" width="20" height="20" type="standard_box"/> + <box-item uuid="{f1c04436-4889-4da4-bb73-ed18dcec178a}" comment="" model-uuid="{c84dd4b1-8f33-4ac7-91c0-84ec6ce2d46b}" x="-149" y="-196" width="12" height="12" type="standard_box"/> + <box-item uuid="{dc8e1c6f-12ba-4f0f-aff2-f0c7d859122f}" comment="" model-uuid="{f3c5b5de-4dc2-4881-ad50-2162f9126aa9}" x="95" y="113" width="100" height="50" type="standard_box"/> + <box-item uuid="{ba9c46f8-9ca4-4c7a-b1b4-51188f885a01}" comment="" model-uuid="{9165f9d6-83f8-4f17-bc92-a772fee40ac5}" x="-177" y="-201" width="12" height="12" type="standard_box"/> + <box-item uuid="{f92b1f3a-b01a-431d-80ba-e2f0688b6545}" comment="" model-uuid="{c4e29b29-824a-4fae-a18d-565b229e0526}" x="-46" y="156" width="100" height="50" type="standard_box"/> + <box-item uuid="{363378ca-4c9b-4990-9d11-0b642e75cb4d}" comment="" model-uuid="{4af6ccfe-6b93-43aa-b555-b5ff447c2313}" x="-88" y="-12" width="140" height="50" type="standard_box"/> + <box-item uuid="{3c7549ae-d9f4-4813-9e86-5dcc2d15352d}" comment="" model-uuid="{354c2fb5-073c-4d2f-bf40-6f28328207d0}" x="70" y="-17" width="10" height="10" type="standard_box"/> + <box-item uuid="{cb98b96b-5cb9-4b72-a833-74fc1ebfd792}" comment="" model-uuid="{b84a56a3-c713-4801-8d76-dd0b2445c2bc}" x="70" y="3" width="10" height="10" type="standard_box"/> + <box-item uuid="{16da6c38-48d5-4640-8cd3-fc4508eb9bc7}" comment="" model-uuid="{8bfa3315-8428-40d2-8e8e-b0153685020c}" x="70" y="17" width="10" height="10" type="standard_box"/> + <box-item uuid="{df2cd696-a66a-4867-895c-f46c5cc8a4ce}" comment="" model-uuid="{7fde0db9-3db6-47b9-bb9c-5e72542eea42}" x="70" y="-15" width="10" height="10" type="standard_box"/> + <box-item uuid="{3b8eed8e-0a31-45ff-a42e-8c15611ee5b2}" comment="" model-uuid="{9d5e1509-1b37-47c9-af90-f1a20f91ede6}" x="-40" y="23" width="100" height="50" type="standard_box"/> + <box-item uuid="{1b12861a-e7d4-4350-8e89-c126063a1893}" comment="" model-uuid="{b2644eb8-a1d2-4e08-8503-5c2168e33a04}" x="-44" y="-99" width="100" height="50" type="standard_box"/> + <data-storage-item uuid="{1c8a0d2a-843a-4416-9b81-f9f8fc3e4789}" description="" comment="" model-uuid="{27cac569-8492-417c-9bee-665eb3bcee84}" region-uuid="{4f756089-d929-4668-a8b8-923e0ac4fe02}" x="120" y="-107" width="100" height="50"/> + <data-storage-item uuid="{1eb43854-0097-4da9-bf1a-4d67c92c47b2}" description="" comment="" model-uuid="{6b9a985f-3c5d-4ba9-af1a-6d30e0069161}" region-uuid="{4f756089-d929-4668-a8b8-923e0ac4fe02}" x="121" y="-46" width="100" height="50"/> + <data-storage-item uuid="{5176d655-dd20-4ac0-be61-654012080a49}" description="" comment="" model-uuid="{de904071-819b-432e-948e-d1542b613489}" region-uuid="{4f756089-d929-4668-a8b8-923e0ac4fe02}" x="119" y="21" width="100" height="50"/> + <transition-item uuid="{ad35fb6a-8c15-44b7-8604-40541fbb4e29}" comment="" model-uuid="{84d62232-dd65-452b-bd80-ea893baaf404}" start-anchor-pos-x="6" start-anchor-pos-y="0" end-anchor-pos-x="-6" end-anchor-pos-y="-25"> + <control-point x="-45.5" y="-103"/> + </transition-item> + <transition-item uuid="{10108af7-b7f1-4897-bf7c-9d5a725ada5e}" comment="" model-uuid="{78bb189c-ace1-47d6-a0ab-8b9966cf0e4b}" start-anchor-pos-x="14" start-anchor-pos-y="25" end-anchor-pos-x="-10" end-anchor-pos-y="3"> + <control-point x="9.5" y="84"/> + </transition-item> + <transition-item uuid="{5ea6619d-67c7-48f2-a239-51c6d275b52c}" comment="" model-uuid="{309aa6d7-e857-4173-8bca-6093f98959e9}" start-anchor-pos-x="-37" start-anchor-pos-y="25" end-anchor-pos-x="-4" end-anchor-pos-y="25"> + <control-point x="-37.5" y="56.5"/> + </transition-item> + <transition-item uuid="{e8478a99-4c46-42f8-90a1-5323c5eb3682}" comment="" model-uuid="{f782a2e1-ed31-4210-b4c0-7f517829d238}" start-anchor-pos-x="2" start-anchor-pos-y="6" end-anchor-pos-x="25" end-anchor-pos-y="-25"> + <control-point x="-73.5" y="-157.5"/> + </transition-item> + <transition-item uuid="{694cefd0-b968-4d15-b9bf-4a084f13eaeb}" comment="" model-uuid="{0065857e-2cf1-4873-96d8-18672eb378f8}" start-anchor-pos-x="37" start-anchor-pos-y="25" end-anchor-pos-x="-50" end-anchor-pos-y="1"> + <control-point x="0" y="92"/> + </transition-item> + <transition-item uuid="{ae09a8af-b4c2-4ebf-8a04-40042fa77f3e}" comment="" model-uuid="{c3eb48b5-b193-43d2-a4f0-183a8f31801f}" start-anchor-pos-x="4" start-anchor-pos-y="25" end-anchor-pos-x="24" end-anchor-pos-y="25"> + <control-point x="-63.5" y="67.5"/> + </transition-item> + <comment-item uuid="{ee74b587-c854-45a3-8227-4f8bd7154331}" region-uuid="{4f756089-d929-4668-a8b8-923e0ac4fe02}" comment="flags: fsLogging quitChar" x="130.5" y="-206.5" width="169" height="33"/> + <transition-item uuid="{67631326-0416-49ff-ac94-714e2b692f7c}" comment="" model-uuid="{5dce3cda-8f6f-467b-8b7c-fd17933599c0}" start-anchor-pos-x="-48" start-anchor-pos-y="25" end-anchor-pos-x="-29" end-anchor-pos-y="25"> + <control-point x="-150" y="47.5"/> + </transition-item> + <transition-item uuid="{25ca3fb9-3a12-4eec-9c70-6a0c37126aba}" comment="" model-uuid="{ac58d168-4fbc-448e-a195-43bc215f2ada}" start-anchor-pos-x="-3" start-anchor-pos-y="6" end-anchor-pos-x="-14" end-anchor-pos-y="-25"> + <control-point x="-145.5" y="-107.5"/> + </transition-item> + <transition-item uuid="{1bcfc993-e965-4c2d-b695-a5630e4cf229}" comment="" model-uuid="{f6362662-818e-4fb5-a00d-e804d9b461b8}" start-anchor-pos-x="3" start-anchor-pos-y="-6" end-anchor-pos-x="-7" end-anchor-pos-y="-25"> + <control-point x="-80.5" y="-192"/> + </transition-item> + <transition-item uuid="{a51bc0ba-73a5-4b02-9280-b249d1e774ce}" comment="" model-uuid="{fa174b92-f682-4c07-af41-d079d6d42f7f}" start-anchor-pos-x="1" start-anchor-pos-y="25" end-anchor-pos-x="-4" end-anchor-pos-y="-25"> + <control-point x="-28.5" y="86"/> + </transition-item> + <transition-item uuid="{ae40640d-9437-4795-b8a8-d8536693cf71}" comment="" model-uuid="{6e830148-cf04-42be-933b-b62e516ef524}" start-anchor-pos-x="50" start-anchor-pos-y="-13" end-anchor-pos-x="50" end-anchor-pos-y="13"> + <control-point x="50.5" y="20"/> + </transition-item> + <connection-item uuid="{bdb39024-4962-4924-b4bb-81291e6e3559}" comment="" region-uuid="{4f756089-d929-4668-a8b8-923e0ac4fe02}" item0-uuid="{1c8a0d2a-843a-4416-9b81-f9f8fc3e4789}" item1-uuid="{3c7549ae-d9f4-4813-9e86-5dcc2d15352d}" start-anchor-pos-x="-50" start-anchor-pos-y="-3" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="32.5" y="-90.5"/> + </connection-item> + <connection-item uuid="{0de56469-bd69-4b24-b2c1-ede6bf327cdf}" comment="" region-uuid="{4f756089-d929-4668-a8b8-923e0ac4fe02}" item0-uuid="{1c8a0d2a-843a-4416-9b81-f9f8fc3e4789}" item1-uuid="{df2cd696-a66a-4867-895c-f46c5cc8a4ce}" start-anchor-pos-x="-50" start-anchor-pos-y="7" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="49" y="-78"/> + </connection-item> + <connection-item uuid="{822893f5-b4f7-410a-88d3-3d076d5c2a5f}" comment="" region-uuid="{4f756089-d929-4668-a8b8-923e0ac4fe02}" item0-uuid="{1eb43854-0097-4da9-bf1a-4d67c92c47b2}" item1-uuid="{cb98b96b-5cb9-4b72-a833-74fc1ebfd792}" start-anchor-pos-x="-50" start-anchor-pos-y="1" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="50" y="-24.5"/> + </connection-item> + <connection-item uuid="{e5ff56a6-32ab-4fa1-984f-cd57c70dd138}" comment="" region-uuid="{4f756089-d929-4668-a8b8-923e0ac4fe02}" item0-uuid="{5176d655-dd20-4ac0-be61-654012080a49}" item1-uuid="{16da6c38-48d5-4640-8cd3-fc4508eb9bc7}" start-anchor-pos-x="-50" start-anchor-pos-y="1" end-anchor-pos-x="0" end-anchor-pos-y="0"> + <control-point x="42" y="22"/> + </connection-item> + <transition-item uuid="{6b5068fe-6b26-40e4-ba5e-f5065876ad44}" comment="" model-uuid="{9e1d9645-f428-4565-aae8-5595bd09adcc}" start-anchor-pos-x="28" start-anchor-pos-y="25" end-anchor-pos-x="22" end-anchor-pos-y="-25"> + <control-point x="7" y="-45.5"/> + </transition-item> + <comment-item uuid="{84ed47ce-2fe5-4f8d-bbf6-114e8e7dd39f}" region-uuid="{403edcd0-b27f-4825-a29b-1cfe97c1cc4b}" comment="flags: com timing_test stress_test" x="106" y="-113.5" width="100" height="61"/> + <transition-item uuid="{58119ae3-ab14-4f4e-9291-9676f5c15c3a}" comment="" model-uuid="{74045138-3ef5-433c-8476-05766a44811c}" start-anchor-pos-x="-50" start-anchor-pos-y="-1" end-anchor-pos-x="-50" end-anchor-pos-y="4"> + <control-point x="-210" y="-35.5"/> + </transition-item> + </diagram> + </diagrams> +</esmcontainer> diff --git a/examples/timing_test/esm/processmap.xml b/examples/system_test/esm/processmap.xml similarity index 55% rename from examples/timing_test/esm/processmap.xml rename to examples/system_test/esm/processmap.xml index 4b3eb3720636f12ca52056cedd1555c7f27dcab9..4fc4e8b7a0965a91407a516d0db4e8fabc0fca66 100644 --- a/examples/timing_test/esm/processmap.xml +++ b/examples/system_test/esm/processmap.xml @@ -1,5 +1,6 @@ <?xml version="1.0"?> <process-map> <map from="system" to="systemProcess" /> - <map from="logging" to="logProcess" /> + <map from="logging" to="process1" /> + <map from="debug" to="process2" /> </process-map> diff --git a/examples/system_test/esm/root.esm b/examples/system_test/esm/root.esm new file mode 100644 index 0000000000000000000000000000000000000000..1a4a862cca15d785bd35c13e9bd2aba1d69fd0f8 --- /dev/null +++ b/examples/system_test/esm/root.esm @@ -0,0 +1,87 @@ +<?xml version="1.0"?> +<esmcontainer uuid="{72f830e6-f49b-4856-a333-ddac10bc54bf}" name="[root]" cloned-from="../../comterm/esm/root.esm" comment="" scene-width="0" scene-height="0"> + <data-storage-list> + </data-storage-list> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + </input-flags> + <output-flags> + </output-flags> + <container-events> + <event uuid="{d11686f8-3840-4321-a2e8-008647b4d713}" name="init" comment=""/> + <event uuid="{21496ff7-2157-4bd3-8098-eb90f989eac5}" name="reqConfig" comment=""/> + <event uuid="{2db0451a-8305-4e87-8d62-fb8b11652930}" name="singleCore" comment=""/> + <event uuid="{7b9c3b80-128d-4d51-a573-8bdd10c8e586}" name="quadCore" comment=""/> + </container-events> + <input-events> + </input-events> + <output-events> + </output-events> + <global-events> + <event uuid="{e9163b86-d636-4aee-88d3-4a85cb030f4c}" name="PULSEEVENT" type="pulseevent" comment=""/> + </global-events> + <regions> + <region uuid="{417f2c3a-2006-4f38-868d-916ae51fcd8f}" name="Region1" comment="" number="0"> + <states> + <super-state uuid="{9212873e-0d2b-4d7f-aa70-376bc575bc19}" cloned-from-uuid="{66f64366-e569-4b67-a727-b330f6924194}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="main.esm" path-string=""> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + <flag uuid="{8d64ee57-b64b-4501-a5b2-73833b89a022}" name="loggerOff" comment="" type="user_defined"/> + </input-flags> + <system-flags> + <flag uuid="{b12e7a98-40c4-4158-b0e5-7143cd949036}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{c139341b-93f2-4683-9206-91ed909bdf1b}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + </output-flags> + <input-events> + <event-ref uuid="{d11686f8-3840-4321-a2e8-008647b4d713}" name="init"/> + <event-ref uuid="{2db0451a-8305-4e87-8d62-fb8b11652930}" name="singleCore"/> + <event-ref uuid="{7b9c3b80-128d-4d51-a573-8bdd10c8e586}" name="quadCore"/> + </input-events> + <output-events> + <event-ref uuid="{21496ff7-2157-4bd3-8098-eb90f989eac5}" name="reqConfig"/> + </output-events> + </super-state> + <initial-state uuid="{27f415cc-80a9-438e-b776-c276d87511b6}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{fc9c8745-299f-4fe1-9728-205bd97f554c}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + </states> + <transitions> + <transition uuid="{38be773a-50b4-4863-b733-f13942daa55c}" comment="" from-state-uuid="{27f415cc-80a9-438e-b776-c276d87511b6}" to-state-uuid="{9212873e-0d2b-4d7f-aa70-376bc575bc19}" event-uuid="{e9163b86-d636-4aee-88d3-4a85cb030f4c}"> + <actions> + <send-event-action uuid="{a456ac86-1ab0-4011-8e23-09bec5decebc}" name="" comment="" event-uuid="{d11686f8-3840-4321-a2e8-008647b4d713}"/> + </actions> + </transition> + <transition uuid="{28da8865-67db-43e8-bc8b-2d051bc8f740}" comment="" from-state-uuid="{9212873e-0d2b-4d7f-aa70-376bc575bc19}" to-state-uuid="{9212873e-0d2b-4d7f-aa70-376bc575bc19}" event-uuid="{21496ff7-2157-4bd3-8098-eb90f989eac5}"> + <actions> + <send-event-action uuid="{3f5318c0-7cf7-492d-802a-112d424f6a6d}" name="" comment="" event-uuid="{7b9c3b80-128d-4d51-a573-8bdd10c8e586}"/> + </actions> + </transition> + </transitions> + </region> + </regions> + <diagrams> + <diagram uuid="{34dd57a2-2ee9-4b41-82a9-b4e4da9eefff}" name="" comment=""> + <box-item uuid="{34761fcc-9013-4218-8eb2-2eef666e17bd}" comment="" model-uuid="{417f2c3a-2006-4f38-868d-916ae51fcd8f}" x="2550" y="2520" width="480" height="240" type="standard_box"/> + <box-item uuid="{4c70470d-92f2-43e8-829f-934584beb3f3}" comment="" model-uuid="{9212873e-0d2b-4d7f-aa70-376bc575bc19}" x="-52" y="30" width="100" height="50" type="standard_box"/> + <box-item uuid="{cd0de559-b454-4560-b2fb-93b3efe53a95}" comment="" model-uuid="{27f415cc-80a9-438e-b776-c276d87511b6}" x="-137" y="-65" width="12" height="12" type="standard_box"/> + <transition-item uuid="{9a48bc08-41e9-437a-a736-728ba736d996}" comment="" model-uuid="{38be773a-50b4-4863-b733-f13942daa55c}" start-anchor-pos-x="1" start-anchor-pos-y="-6" end-anchor-pos-x="1" end-anchor-pos-y="-25"> + <control-point x="-77" y="-54"/> + </transition-item> + <comment-item uuid="{31da7a4a-c712-4aed-9ed6-a4465ea2fd8b}" region-uuid="{417f2c3a-2006-4f38-868d-916ae51fcd8f}" comment="flags: loggerOff quadCore singleCore" x="109" y="-48" width="100" height="82"/> + <transition-item uuid="{5a8915c4-ec5d-4f07-be80-3a2101d013d5}" comment="" model-uuid="{28da8865-67db-43e8-bc8b-2d051bc8f740}" start-anchor-pos-x="27" start-anchor-pos-y="25" end-anchor-pos-x="50" end-anchor-pos-y="2"> + <control-point x="11.5" y="75.5"/> + </transition-item> + <comment-item uuid="{3517ac22-9a1e-4b0c-871d-91afb8558a67}" region-uuid="{417f2c3a-2006-4f38-868d-916ae51fcd8f}" comment="for vortex send singleCore event" x="110.5" y="34.5" width="129" height="51"/> + </diagram> + </diagrams> +</esmcontainer> diff --git a/examples/timing_test/esm/slotmap.xml b/examples/system_test/esm/slotmap.xml similarity index 60% rename from examples/timing_test/esm/slotmap.xml rename to examples/system_test/esm/slotmap.xml index ac5632a7c98729c434dd265ad793eaf8da4d5cd5..fbfd1b0ee366e425400b12e66d197c015c1e9e72 100644 --- a/examples/timing_test/esm/slotmap.xml +++ b/examples/system_test/esm/slotmap.xml @@ -1,8 +1,10 @@ <?xml version="1.0"?> <slot-map> + <map from="smi" to="smiSlot" /> <map from="init" to="initSlot" /> <map from="log" to="logSlot" /> <map from="com" to="comSlot" /> - <map from="timingTest" to="timingSlot" /> <map from="user" to="userSlot" /> + <map from="rtclock" to="userSlot" /> + <map from="suspend" to="suspendSlot" /> </slot-map> diff --git a/examples/timing_test/esm/stress_test.esm b/examples/system_test/esm/stress_test.esm similarity index 100% rename from examples/timing_test/esm/stress_test.esm rename to examples/system_test/esm/stress_test.esm diff --git a/examples/timing_test/esm/taskspec.xml b/examples/system_test/esm/taskspec.xml similarity index 100% rename from examples/timing_test/esm/taskspec.xml rename to examples/system_test/esm/taskspec.xml diff --git a/examples/timing_test/esm/timing_test.esm b/examples/system_test/esm/timing_test.esm similarity index 87% rename from examples/timing_test/esm/timing_test.esm rename to examples/system_test/esm/timing_test.esm index 28e7ef0112fe03ce413d42af540b167ba4ce1af1..96308a9fed8e7eb149333054c2fa3cde1af60a77 100644 --- a/examples/timing_test/esm/timing_test.esm +++ b/examples/system_test/esm/timing_test.esm @@ -27,7 +27,7 @@ <flag uuid="{4ac59c83-b346-4efc-84c0-1d8c99ff9ebb}" name="Timeout" comment="" type="timeout"/> </system-flags> </initial-state> - <task-state uuid="{3e7099cd-d4ad-4431-8fb0-c3ac66021c72}" name="testTiming" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="testTiming" task-slot-name="timingTest" process-name="" real-time="1"> + <task-state uuid="{3e7099cd-d4ad-4431-8fb0-c3ac66021c72}" name="testTiming" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="testTiming" task-slot-name="timingTestSlot" process-name="" real-time="1"> <input-ports> </input-ports> <output-ports> @@ -43,7 +43,7 @@ <flag uuid="{e7dc5541-0079-4fe6-9aac-3ec8cc1a6d11}" name="Busy" comment="" type="busy"/> </system-flags> </task-state> - <task-state uuid="{d0f34e82-56ee-4f37-93da-759a96656803}" name="error" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="testTiming" task-slot-name="timingTest" process-name="" real-time="1"> + <task-state uuid="{d0f34e82-56ee-4f37-93da-759a96656803}" name="error" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="testTiming" task-slot-name="timingTestSlot" process-name="" real-time="1"> <input-ports> </input-ports> <output-ports> @@ -78,6 +78,11 @@ <guard operator="negation" flag-uuid="{6ee7ff53-f33c-4f1e-af42-668c4d480e3c}"/> </guard> </transition> + <transition uuid="{02b69b2c-db33-4e48-a37e-c5db5d206f79}" comment="" from-state-uuid="{d0f34e82-56ee-4f37-93da-759a96656803}" to-state-uuid="{d0f34e82-56ee-4f37-93da-759a96656803}" event-uuid="{03f23b4b-f21b-4c0b-ba5d-41a9f6301814}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{6ee7ff53-f33c-4f1e-af42-668c4d480e3c}"/> + </transition> </transitions> </region> </regions> @@ -92,17 +97,20 @@ <box-item uuid="{5b8ec551-f496-4f3b-8fe8-da88b1af5b99}" comment="" model-uuid="" x="2295" y="2715" width="390" height="60" type="container_box"/> <box-item uuid="{5e4cf741-48bc-4a53-8b97-f1db9521e935}" comment="" model-uuid="{bd8ad2af-e444-4a6a-b20d-8c27b92df1bf}" x="2760" y="2550" width="480" height="480" type="standard_box"/> <box-item uuid="{84725fd2-8ea0-4309-aefc-4554cac09bfb}" comment="" model-uuid="{a8490a42-fa42-420f-b78d-60a4fbb8a2b6}" x="-193" y="-189" width="12" height="12" type="standard_box"/> - <box-item uuid="{617c6bd9-805d-4f74-bf63-6aa1412dbdca}" comment="" model-uuid="{3e7099cd-d4ad-4431-8fb0-c3ac66021c72}" x="-68" y="-108" width="100" height="50" type="standard_box"/> - <box-item uuid="{cecf17c2-3981-4c7e-85b8-73231f32ab2c}" comment="" model-uuid="{d0f34e82-56ee-4f37-93da-759a96656803}" x="-68" y="7" width="100" height="50" type="standard_box"/> + <box-item uuid="{617c6bd9-805d-4f74-bf63-6aa1412dbdca}" comment="" model-uuid="{3e7099cd-d4ad-4431-8fb0-c3ac66021c72}" x="-73" y="-109" width="100" height="50" type="standard_box"/> + <box-item uuid="{cecf17c2-3981-4c7e-85b8-73231f32ab2c}" comment="" model-uuid="{d0f34e82-56ee-4f37-93da-759a96656803}" x="-64" y="16" width="100" height="50" type="standard_box"/> <transition-item uuid="{f8684635-59dd-4dad-b885-3741cf1f19a6}" comment="" model-uuid="{68c61e3d-a630-4c9f-9a20-1ba330728f76}" start-anchor-pos-x="6" start-anchor-pos-y="1" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> <control-point x="-111" y="-182"/> </transition-item> - <transition-item uuid="{dd7b0c9a-60ea-4c1a-8975-8b892f669a6c}" comment="" model-uuid="{757e92a3-32a8-427c-80cc-2312236a057a}" start-anchor-pos-x="-34" start-anchor-pos-y="25" end-anchor-pos-x="-32" end-anchor-pos-y="-25"> + <transition-item uuid="{dd7b0c9a-60ea-4c1a-8975-8b892f669a6c}" comment="" model-uuid="{757e92a3-32a8-427c-80cc-2312236a057a}" start-anchor-pos-x="-23" start-anchor-pos-y="25" end-anchor-pos-x="-32" end-anchor-pos-y="-25"> <control-point x="-121" y="-49.5"/> </transition-item> <transition-item uuid="{3a36a92f-1aac-4c5d-95ca-21b642ff4d50}" comment="" model-uuid="{2c4227f3-7bd6-47f9-b466-712ca10d0196}" start-anchor-pos-x="34" start-anchor-pos-y="-25" end-anchor-pos-x="31" end-anchor-pos-y="25"> <control-point x="-28.5" y="-49.5"/> </transition-item> + <transition-item uuid="{cda1c790-251a-47cc-b960-67d266410d2e}" comment="" model-uuid="{02b69b2c-db33-4e48-a37e-c5db5d206f79}" start-anchor-pos-x="-16" start-anchor-pos-y="25" end-anchor-pos-x="13" end-anchor-pos-y="25"> + <control-point x="-74" y="74.5"/> + </transition-item> </diagram> </diagrams> </esmcontainer> diff --git a/examples/system_test/esm/user.esm b/examples/system_test/esm/user.esm new file mode 100644 index 0000000000000000000000000000000000000000..9cd17cc92e3bed9d3b7104a682ab1938f0a810a1 --- /dev/null +++ b/examples/system_test/esm/user.esm @@ -0,0 +1,186 @@ +<?xml version="1.0"?> +<esmcontainer uuid="{6f5275b7-ab5b-42f4-bbf0-d11c70b20e12}" name="" cloned-from="user2.esm" comment="" scene-width="5000" scene-height="5000"> + <data-storage-list> + </data-storage-list> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + <flag uuid="{3021e313-e427-46f4-a660-050ba10a46dc}" name="quit" comment="" type="user_defined"/> + <flag uuid="{f1339b60-5e26-46c4-8b19-718e6a3608f3}" name="com" comment="" type="user_defined"/> + <flag uuid="{8fe415bb-9af0-4141-bcd6-7ffcd2638c6d}" name="timing_test" comment="" type="user_defined"/> + <flag uuid="{00c4ade4-aada-4e5e-a67d-10cee848898f}" name="stress_test" comment="" type="user_defined"/> + </input-flags> + <output-flags> + </output-flags> + <container-events> + <event uuid="{a194cbce-e75d-4133-a0bc-668292d90192}" name="ioPortsAllocated" comment=""/> + <event uuid="{8a2c12d8-aeeb-4ba4-a6a9-480ccca5eae3}" name="reqIoPortsState" comment=""/> + </container-events> + <input-events> + <event-ref uuid="{a194cbce-e75d-4133-a0bc-668292d90192}" name="ioPortsAllocated"/> + </input-events> + <output-events> + <event-ref uuid="{8a2c12d8-aeeb-4ba4-a6a9-480ccca5eae3}" name="reqIoPortsState"/> + </output-events> + <global-events> + <event uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}" name="PULSEEVENT" type="pulseevent" comment=""/> + </global-events> + <regions> + <region uuid="{ed5307c8-bd79-4b03-a921-2896a3357331}" name="" comment="" number="0"> + <states> + <initial-state uuid="{9b2de3eb-af75-475f-b2b0-1a83234e0475}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> + <system-flags> + <flag uuid="{9a5306cb-22a1-49c7-a137-9aa89329b144}" name="Timeout" comment="" type="timeout"/> + </system-flags> + </initial-state> + <super-state uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" cloned-from-uuid="{a17224e6-3b32-4a27-9512-b852963656da}" name="com" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="com.esm" path-string=""> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + <flag uuid="{a96e3c3d-721e-4868-8f1d-4cc860ed7eb7}" name="quit" comment="" type="user_defined"/> + </input-flags> + <system-flags> + <flag uuid="{0c6aa1ee-5a86-40d0-88ad-4705f28c2aa5}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{b7822520-e050-46e6-a83c-b0d8100c955f}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + </output-flags> + <input-events> + <event-ref uuid="{a194cbce-e75d-4133-a0bc-668292d90192}" name="ioPortsAllocated"/> + </input-events> + <output-events> + <event-ref uuid="{8a2c12d8-aeeb-4ba4-a6a9-480ccca5eae3}" name="reqIoPortsState"/> + </output-events> + </super-state> + <super-state uuid="{cedaf4ad-e420-4415-a8f6-e134b7d49411}" cloned-from-uuid="" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="stress_test.esm" path-string=""> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + </input-flags> + <system-flags> + <flag uuid="{367d70af-798e-46b5-a423-d0e2462bf8e5}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{83a90c87-66c5-427c-bb4d-39b71ef61a11}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + </output-flags> + <input-events> + </input-events> + <output-events> + </output-events> + </super-state> + <super-state uuid="{4cae8397-f579-4e23-95cd-9e2b238bd4b7}" cloned-from-uuid="" name="timing_test" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="timing_test.esm" path-string=""> + <input-ports> + </input-ports> + <output-ports> + </output-ports> + <input-flags> + </input-flags> + <system-flags> + <flag uuid="{a812cb45-e4ac-4755-a14f-85c5a71a4195}" name="Timeout" comment="" type="timeout"/> + <flag uuid="{4f4a8b1b-8fa9-4e0c-a00c-c38abc89f0fc}" name="Exit" comment="" type="exit"/> + </system-flags> + <output-flags> + </output-flags> + <input-events> + </input-events> + <output-events> + </output-events> + </super-state> + <final-state uuid="{e0c8e720-fae4-4f50-93a2-b14141dbfda9}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> + </states> + <transitions> + <transition uuid="{bcbd40b6-80f1-47af-9b8b-4c63d0fe73c7}" comment="" from-state-uuid="{9b2de3eb-af75-475f-b2b0-1a83234e0475}" to-state-uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" event-uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{f1339b60-5e26-46c4-8b19-718e6a3608f3}"/> + </transition> + <transition uuid="{a5be98c2-cf19-4bf1-b06f-a12216f475fc}" comment="" from-state-uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" to-state-uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" event-uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}"> + <actions> + <set-flag-action uuid="{c07fec39-1748-4dbd-a9ce-6acdabeacbb7}" name="" comment="" flag-uuid="{a96e3c3d-721e-4868-8f1d-4cc860ed7eb7}" flag-value="0"/> + </actions> +<guard operator="and" flag-uuid=""> +<guard operator="none" flag-uuid="{3021e313-e427-46f4-a660-050ba10a46dc}"/> +<guard operator="negation" flag-uuid="{b7822520-e050-46e6-a83c-b0d8100c955f}"/> +</guard> + </transition> + <transition uuid="{4eb7e35d-e86f-436b-86c4-b2caf72d668d}" comment="" from-state-uuid="{9b2de3eb-af75-475f-b2b0-1a83234e0475}" to-state-uuid="{4cae8397-f579-4e23-95cd-9e2b238bd4b7}" event-uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{8fe415bb-9af0-4141-bcd6-7ffcd2638c6d}"/> + </transition> + <transition uuid="{acbe4832-2b6f-40e6-8580-dcc2ca31436c}" comment="" from-state-uuid="{4cae8397-f579-4e23-95cd-9e2b238bd4b7}" to-state-uuid="{e0c8e720-fae4-4f50-93a2-b14141dbfda9}" event-uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{3021e313-e427-46f4-a660-050ba10a46dc}"/> + </transition> + <transition uuid="{61508449-2379-44c0-b059-4c01bf0ab559}" comment="" from-state-uuid="{cedaf4ad-e420-4415-a8f6-e134b7d49411}" to-state-uuid="{e0c8e720-fae4-4f50-93a2-b14141dbfda9}" event-uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{3021e313-e427-46f4-a660-050ba10a46dc}"/> + </transition> + <transition uuid="{e6742adb-74a8-41f4-aadd-490a512a2ce9}" comment="" from-state-uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" to-state-uuid="{e0c8e720-fae4-4f50-93a2-b14141dbfda9}" event-uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{b7822520-e050-46e6-a83c-b0d8100c955f}"/> + </transition> + <transition uuid="{aad21928-2ca8-4f1f-84b0-4283afa34312}" comment="" from-state-uuid="{9b2de3eb-af75-475f-b2b0-1a83234e0475}" to-state-uuid="{cedaf4ad-e420-4415-a8f6-e134b7d49411}" event-uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{00c4ade4-aada-4e5e-a67d-10cee848898f}"/> + </transition> + <transition uuid="{0af6c3b9-fed2-4157-9457-d4564e25bc47}" comment="" from-state-uuid="{9b2de3eb-af75-475f-b2b0-1a83234e0475}" to-state-uuid="{e0c8e720-fae4-4f50-93a2-b14141dbfda9}" event-uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}"> + <actions> + </actions> +<guard operator="none" flag-uuid="{3021e313-e427-46f4-a660-050ba10a46dc}"/> + </transition> + </transitions> + </region> + </regions> + <diagrams> + <diagram uuid="{0e659abb-c97b-4e91-9073-d1e905a1b607}" name="" comment=""> + <box-item uuid="{c0023907-a486-4f80-8fc1-b837a978d6f1}" comment="" model-uuid="" x="2295" y="2355" width="390" height="60" type="input_events_box"/> + <box-item uuid="{07278ef4-2c5d-4e11-aed6-e36c2a4b3777}" comment="" model-uuid="" x="2295" y="2415" width="390" height="60" type="output_events_box"/> + <box-item uuid="{c8c45757-ad4d-4ddb-b2fc-b6a92a5cb14d}" comment="" model-uuid="" x="2295" y="2475" width="390" height="60" type="input_ports_box"/> + <box-item uuid="{a9064d61-4319-4fff-b7db-adb2203a2513}" comment="" model-uuid="" x="2295" y="2535" width="390" height="60" type="output_ports_box"/> + <box-item uuid="{3d09ef12-ec73-4ea6-bf3a-b625445cdc5a}" comment="" model-uuid="" x="2295" y="2595" width="390" height="60" type="input_flags_box"/> + <box-item uuid="{bac5b745-8352-4bc0-ac23-15b40e9cef9e}" comment="" model-uuid="" x="2295" y="2655" width="390" height="60" type="output_flags_box"/> + <box-item uuid="{d11d176f-e296-404c-90a2-4694f114a584}" comment="" model-uuid="" x="2295" y="2715" width="390" height="60" type="container_box"/> + <box-item uuid="{b6496776-6338-4fbc-8849-8354705a1ab2}" comment="" model-uuid="{ed5307c8-bd79-4b03-a921-2896a3357331}" x="2790" y="2580" width="480" height="480" type="standard_box"/> + <box-item uuid="{12527813-47e4-4d82-a94b-76db1e998a5c}" comment="" model-uuid="{9b2de3eb-af75-475f-b2b0-1a83234e0475}" x="-191" y="-135" width="12" height="12" type="standard_box"/> + <box-item uuid="{ec54443e-1f9b-4235-9728-1583d466b283}" comment="" model-uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" x="-39" y="76" width="100" height="50" type="standard_box"/> + <box-item uuid="{ddff5679-334c-4e17-8470-64df6a65ded5}" comment="" model-uuid="{cedaf4ad-e420-4415-a8f6-e134b7d49411}" x="-152" y="114" width="100" height="50" type="standard_box"/> + <box-item uuid="{ab36b5c4-e64b-4b2f-959b-9b0ab6778fbe}" comment="" model-uuid="{4cae8397-f579-4e23-95cd-9e2b238bd4b7}" x="117" y="118" width="100" height="50" type="standard_box"/> + <box-item uuid="{63339349-ef00-4212-92e0-751767636958}" comment="" model-uuid="{e0c8e720-fae4-4f50-93a2-b14141dbfda9}" x="-21" y="189" width="20" height="20" type="standard_box"/> + <transition-item uuid="{64c6d117-84e6-4819-a7e6-4b4b2cf4f50f}" comment="" model-uuid="{bcbd40b6-80f1-47af-9b8b-4c63d0fe73c7}" start-anchor-pos-x="0" start-anchor-pos-y="-6" end-anchor-pos-x="-3" end-anchor-pos-y="-25"> + <control-point x="-65" y="-119"/> + </transition-item> + <transition-item uuid="{d9898035-6146-4f23-b8a0-c09463bc6c68}" comment="" model-uuid="{a5be98c2-cf19-4bf1-b06f-a12216f475fc}" start-anchor-pos-x="22" start-anchor-pos-y="-25" end-anchor-pos-x="30" end-anchor-pos-y="-25"> + <control-point x="-21.5" y="7.5"/> + </transition-item> + <transition-item uuid="{38214321-14dc-4097-8952-77133735f733}" comment="" model-uuid="{4eb7e35d-e86f-436b-86c4-b2caf72d668d}" start-anchor-pos-x="4" start-anchor-pos-y="-6" end-anchor-pos-x="-22" end-anchor-pos-y="-25"> + <control-point x="92" y="-162"/> + </transition-item> + <transition-item uuid="{14d7780f-5b31-453c-b5aa-e126e2079161}" comment="" model-uuid="{acbe4832-2b6f-40e6-8580-dcc2ca31436c}" start-anchor-pos-x="6" start-anchor-pos-y="25" end-anchor-pos-x="10" end-anchor-pos-y="2"> + <control-point x="53" y="182.5"/> + </transition-item> + <transition-item uuid="{613226ec-adfb-4be2-85f0-52b97f4e0cb2}" comment="" model-uuid="{61508449-2379-44c0-b059-4c01bf0ab559}" start-anchor-pos-x="-5" start-anchor-pos-y="25" end-anchor-pos-x="-10" end-anchor-pos-y="2"> + <control-point x="-112.5" y="178"/> + </transition-item> + <transition-item uuid="{17abf6dc-0b55-4d2d-be66-3f61aaf7f544}" comment="" model-uuid="{e6742adb-74a8-41f4-aadd-490a512a2ce9}" start-anchor-pos-x="5" start-anchor-pos-y="25" end-anchor-pos-x="0" end-anchor-pos-y="-10"> + <control-point x="-51.5" y="131"/> + </transition-item> + <transition-item uuid="{196cb846-29ff-45a9-8b2a-0b6e4385e632}" comment="" model-uuid="{aad21928-2ca8-4f1f-84b0-4283afa34312}" start-anchor-pos-x="-2" start-anchor-pos-y="6" end-anchor-pos-x="-2" end-anchor-pos-y="-25"> + <control-point x="-159.5" y="-27.5"/> + </transition-item> + <transition-item uuid="{e90f0c95-720a-46e2-82de-96f71c52e8fe}" comment="" model-uuid="{0af6c3b9-fed2-4157-9457-d4564e25bc47}" start-anchor-pos-x="0" start-anchor-pos-y="-6" end-anchor-pos-x="-10" end-anchor-pos-y="-3"> + <control-point x="-207" y="193"/> + </transition-item> + </diagram> + </diagrams> +</esmcontainer> diff --git a/examples/timing_test/mod/Makefile b/examples/system_test/mod/Makefile similarity index 100% rename from examples/timing_test/mod/Makefile rename to examples/system_test/mod/Makefile diff --git a/examples/timing_test/mod/services_io.c b/examples/system_test/mod/services_io.c similarity index 100% rename from examples/timing_test/mod/services_io.c rename to examples/system_test/mod/services_io.c diff --git a/examples/system_test/mod/services_io.h b/examples/system_test/mod/services_io.h new file mode 100644 index 0000000000000000000000000000000000000000..d5a481dfa0a475c14879f5e96fccba16777b15cf --- /dev/null +++ b/examples/system_test/mod/services_io.h @@ -0,0 +1,8 @@ +#ifndef _services_io_h +#define _services_io_h + +#define MAX_NUMBER_OF_IO_REGIONS 32 + +#include "../src/def.h" + +#endif diff --git a/examples/system_test/smi/user.cfg b/examples/system_test/smi/user.cfg new file mode 120000 index 0000000000000000000000000000000000000000..5b2d159039e0c7eb569542365597a570f1ad7d1f --- /dev/null +++ b/examples/system_test/smi/user.cfg @@ -0,0 +1 @@ +../../common/config/user.cfg.i7 \ No newline at end of file diff --git a/examples/timing_test/src/decode.c b/examples/system_test/src/decode.c similarity index 85% rename from examples/timing_test/src/decode.c rename to examples/system_test/src/decode.c index fcd2d2ea43590a93bd25939cbc154c03c48a7cac..10232b28df195355c8749708439860d6eb947560 100644 --- a/examples/timing_test/src/decode.c +++ b/examples/system_test/src/decode.c @@ -3,9 +3,7 @@ * SOURCE FILE ************************************************************************** * - * decode.c - - * - * CSIRO - Heli Project + * decode.c - creates log text files from binary log * ************************************************************************** */ @@ -32,7 +30,6 @@ #include "smi.h" #include "profile.h" #include "logging.h" -#include "dio.h" /* ************************************************************************** @@ -41,7 +38,6 @@ */ #define DECODE_SMI 1 #define DECODE_PROFILE 1 -#define DECODE_DIO 1 /* ************************************************************************** @@ -71,13 +67,6 @@ int main(int argc, char *argv[]){ FILE *fpTaskProfile=NULL; #endif -#if(DECODE_DIO) - unsigned char initDIO =0; - dioDataStruct dio; - FILE *fpdio=NULL; -#endif - - /* Check the input arguments */ if (argc != 2) { @@ -167,7 +156,7 @@ int main(int argc, char *argv[]){ size=sizeof(TaskProfileLogStruct); n=fread((void *)&taskProfile,1,size,fp); fprintf(fpTaskProfile,"%d %d %d %lld %lld %lld %lld %lld\n", - taskProfile.stateID, + taskProfile.taskID, taskProfile.runs, taskProfile.overruns, taskProfile.duration, @@ -179,30 +168,6 @@ int main(int argc, char *argv[]){ #endif -#if(DECODE_DIO) - - /* dio LOG FILE */ - case DIO_LOGID: - if (initDIO == 0) { - printf("[decode] opening dio.log\n"); - fpdio=fopen("dio.log","w"); - if (fpdio==NULL) { - printf("[decode] error opening dio.log \n"); - return EXIT_FAILURE; - } - initDIO = 1; - } - #if(DECODE_PRINT_OUTPUT) - printf("[decode] reading dio %d\n",count); - #endif - size=sizeof(dioDataStruct); - n=fread((void *)&dio,1,size,fp); - fprintf(fpdio, "%d ", dio.time); - fprintf(fpdio, "\n"); - break; -#endif - - default: printf("[decode] error: unknown LOGID=%d\n", id); fclose(fp); diff --git a/examples/system_test/src/def.h b/examples/system_test/src/def.h new file mode 100644 index 0000000000000000000000000000000000000000..bf79ffbfc64bf6e64e3e245a56f6cebac280048a --- /dev/null +++ b/examples/system_test/src/def.h @@ -0,0 +1,11 @@ +#ifndef _DEF +#define _DEF + +typedef volatile struct { + unsigned int start; + short size; +} region_struct; + +#include "testing_def.h" + +#endif /* _DEF */ diff --git a/examples/timing_test/src/esminterf_def.h b/examples/system_test/src/esminterf_def.h similarity index 93% rename from examples/timing_test/src/esminterf_def.h rename to examples/system_test/src/esminterf_def.h index 7e1c279c034d75117362f149204d4da2b5749a05..c9562e8fa53e7129f3188b236f99dca2fbb05c1b 100644 --- a/examples/timing_test/src/esminterf_def.h +++ b/examples/system_test/src/esminterf_def.h @@ -23,15 +23,19 @@ #ifndef _NRT /* Real-time user defined Includes */ +#include "def.h" #include "user.h" #include "input.h" #include "logging.h" #include "serial.h" +#include "ushm.h" #else /* Non-Real-time user defined Includes */ +#include "def.h" #include "user.h" #include "input.h" #include "logging.h" +#include "ushm.h" #endif /* Esminterf Header */ diff --git a/examples/timing_test/src/esminterf_ext.h b/examples/system_test/src/esminterf_ext.h similarity index 96% rename from examples/timing_test/src/esminterf_ext.h rename to examples/system_test/src/esminterf_ext.h index 589d42ad300cf4863bead9a293162dc14d9a8b08..04004bc6e399fd7a4695536cbe58e66b6ff58013 100644 --- a/examples/timing_test/src/esminterf_ext.h +++ b/examples/system_test/src/esminterf_ext.h @@ -5,8 +5,6 @@ * * esminter_ext.h - header for external type definitions required by esminterf.c * - * CSIRO - Heli Project - * ******************************************************************************** */ diff --git a/examples/timing_test/src/log_def.h b/examples/system_test/src/log_def.h similarity index 88% rename from examples/timing_test/src/log_def.h rename to examples/system_test/src/log_def.h index 90cf3a1c30d0fa77415476b6d76f2e9fef0bbc1b..2ce7baddbbaf9a731f080d0ffedba02d5a03527a 100644 --- a/examples/timing_test/src/log_def.h +++ b/examples/system_test/src/log_def.h @@ -12,7 +12,4 @@ /* Profiler Logging */ #define PROFILE_LOGID 4 -/* misc */ -#define DIO_LOGID 5 - #endif // _LOG_DEF_H diff --git a/examples/system_test/src/nrt.c b/examples/system_test/src/nrt.c new file mode 100644 index 0000000000000000000000000000000000000000..aa36ad7a488eeac064102348daad1e6fdbe29020 --- /dev/null +++ b/examples/system_test/src/nrt.c @@ -0,0 +1,85 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * nrt.c - non-real-time system process + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file nrt.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ +#include <stdlib.h> +#include <stdio.h> + +#include "smi.h" + +#include "rtshm.h" +#include "ushm.h" + +/* + ************************************************************************** + * GLOBALS + ************************************************************************** + */ +rtshm_struct *rtshm; +int rtshm_fd; + +ushm_struct *ushm; +int ushm_fd; + + +/* + ************************************************************************** + * NRT MAIN + ************************************************************************** + */ +int main(int argc,char *argv[]){ + char *esmFile,*tssFile,*tdeFile,*cfgFile; + int i; + + if (argc==5) { + esmFile=argv[1]; + tssFile=argv[2]; + tdeFile=argv[3]; + cfgFile=argv[4]; + } else { + esmFile=tssFile=tdeFile=cfgFile=NULL; + printf("[nrt.c: main] esm tss tde cfg required\n"); + } + + printf("[nrt.c: main] allocating %ldkB RT shared memory\n",(long int)sizeof(rtshm_struct)/1024); + if (initShm(&rtshm_fd,sizeof(rtshm_struct),(void *) &rtshm,RTSHM_FILE)!=0) { + return EXIT_FAILURE; + } + + printf("[nrt.c: main] allocating ushm shared memory\n"); + if (initShm(&ushm_fd,sizeof(ushm_struct),(void *) &ushm,USHM_FILE)!=0) { + return EXIT_FAILURE; + } + + i=nrtSmi(esmFile,tssFile,tdeFile,cfgFile); + + printf("[nrt.c: main] releasing RT shared memory\n"); + closeShm(rtshm_fd,RTSHM_FILE); + + printf("[nrt.c: main] releasing ushm shared memory\n"); + closeShm(ushm_fd,USHM_FILE); + + if (i==0) return EXIT_SUCCESS; + else return EXIT_FAILURE; +} diff --git a/examples/system_test/src/nrt_task.c b/examples/system_test/src/nrt_task.c new file mode 100644 index 0000000000000000000000000000000000000000..01f221cb4149bb1c54fe88ca125ec8d37f66d623 --- /dev/null +++ b/examples/system_test/src/nrt_task.c @@ -0,0 +1,71 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * nrt_task.c - non-real-time user task dispatcher + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file nrt.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ + + +#include <stdlib.h> +#include <stdio.h> + +#include "smi.h" + +#include "rtshm.h" + +/* + ************************************************************************** + * GLOBALS + ************************************************************************** + */ +rtshm_struct *rtshm; +int rtshm_fd; + +/* + ************************************************************************** + * NRT TASK MAIN + ************************************************************************** + */ + +int main(int argc,char *argv[]){ + int nrtProcessID; + + if (argc==2) { + nrtProcessID=atof(argv[1]); + printf("[nrt_task.c:main] nrtProcessID=%d\n",nrtProcessID); + } else { + printf("[nrt_task.c:main] nrtProcessID missing\n"); + return EXIT_FAILURE; + } + + printf("[nrt_task.c:main] allocating RT shared memory\n"); + if (initShm(&rtshm_fd,sizeof(rtshm_struct),(void *) &rtshm,RTSHM_FILE)!=0) { + return EXIT_FAILURE; + } + + nrtTask(nrtProcessID); + + printf("[nrt_task.c:main] releasing RT shared memory\n"); + closeShm(rtshm_fd,RTSHM_FILE); + + return EXIT_SUCCESS; +} diff --git a/examples/system_test/src/rt.c b/examples/system_test/src/rt.c new file mode 100644 index 0000000000000000000000000000000000000000..b1b0cd411b1f38f772b37661e71b8ececc8c8e77 --- /dev/null +++ b/examples/system_test/src/rt.c @@ -0,0 +1,88 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * rt.c - real-time system process + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file rt.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ +#include <stdlib.h> +#include <stdio.h> + +#include "smi.h" + +#include "rtshm.h" +#include "ushm.h" + + +/* + ************************************************************************** + * GLOBALS + ************************************************************************** + */ +rtshm_struct *rtshm; +int rtshm_fd; + + +ushm_struct *ushm; +int ushm_fd; + + RTIME maxIoTime=0; + +/* + ************************************************************************** + * RT MAIN + ************************************************************************** + */ +int main(int argc,char *argv[]){ + int i; + + printf("[rt.c: main] allocating RT shared memory\n"); + if (initShm(&rtshm_fd,sizeof(rtshm_struct),(void *) &rtshm,RTSHM_FILE)!=0) { + return EXIT_FAILURE; + } + + rtshm->ustime.lock=ATOMIC_UNLOCKED0; + rtshm->ustime.time=0; + rtshm->ustime.localtime[0]='\0'; + rtshm->keyboard.status=KEYBOARD_STATUS_ERROR; + + for (i=0;i<MAX_NUMBER_OF_IO_REGIONS;i++) rtshm->regionList[i]=0; + + printf("[rt.c: main] allocating ushm shared memory\n"); + if (initShm(&ushm_fd,sizeof(ushm_struct),(void *) &ushm,USHM_FILE)!=0) { + return EXIT_FAILURE; + } + ushm->test=0; + + rtSmi(); + + printf("[rt.c: main] releasing RT shared memory\n"); + closeShm(rtshm_fd,RTSHM_FILE); + + printf("[rt.c: main] releasing ushm shared memory\n"); + closeShm(ushm_fd,USHM_FILE); + + if (maxIoTime>0) printf("[rt.c: main] max IO time: %d\n",(int)maxIoTime); + + return EXIT_SUCCESS; +} + + diff --git a/examples/timing_test/src/rtshm.h b/examples/system_test/src/rtshm.h similarity index 76% rename from examples/timing_test/src/rtshm.h rename to examples/system_test/src/rtshm.h index 7296ae0d363bcd54c5becc9afc27ae4d29b6fd5d..717b92bc26bd745665ed05fc8881f291ba637727 100644 --- a/examples/timing_test/src/rtshm.h +++ b/examples/system_test/src/rtshm.h @@ -5,8 +5,6 @@ * * rtshm.h - header for real-time shared memory * - * CSIRO - Heli Project - * ******************************************************************************** */ @@ -28,9 +26,6 @@ #define RTSHM_FILE "/rtshm" -//#define COM_RBSIZE 1024 -//#define COM_WBSIZE 1024 - #define MAX_NUMBER_OF_IO_REGIONS 32 @@ -38,13 +33,25 @@ typedef volatile struct _rtshm_struct { + unsigned int lock; - int regionList[MAX_NUMBER_OF_IO_REGIONS]; + int regionList[MAX_NUMBER_OF_IO_REGIONS]; logStruct log; KeyboardStruct keyboard; - unsigned int ustime; + + ustimeStruct ustime; +/* + int ubloxSim; + + int test; + long long test2; + atomicInt8Type test3; + atomicInt8Type test4; + int test5; +*/ + RTIME smiStart; } rtshm_struct; #endif /* _RTSHM */ diff --git a/examples/system_test/src/testing_def.h b/examples/system_test/src/testing_def.h new file mode 100644 index 0000000000000000000000000000000000000000..14285ee35f8a0c4c8502b401081fcbf748124846 --- /dev/null +++ b/examples/system_test/src/testing_def.h @@ -0,0 +1,23 @@ +#define COM1 0 +#define COM2 0 +#define COM3 0 +#define COM4 0 +#define COM5 0 +#define COM6 0 +#define COM7 0 +#define COM8 0 +#define COM9 0 +#define COM10 0 +#define COM11 0 + +enum regionIndices{ +COM0, + +LAST_REGION_INDEX +}; + +// list of region parameters ordered according to enumerated regionIndices +static region_struct regionList[]={ +{.start=0x3F8,.size=8} // CF=0x3F8 GS=0x2F8 FC=0x208 CC=0x230 +}; + diff --git a/examples/timing_test/src/user.h b/examples/system_test/src/user.h similarity index 65% rename from examples/timing_test/src/user.h rename to examples/system_test/src/user.h index 911a2178c6960258cef28819bdd42983cf2004e2..9f84e1675ea7b1a6880435283c2a72d5d9560f95 100644 --- a/examples/timing_test/src/user.h +++ b/examples/system_test/src/user.h @@ -5,8 +5,6 @@ * * user.h - header file contains all user includes * - * CSIRO - Heli Project - * ******************************************************************************** */ @@ -22,13 +20,21 @@ #ifndef _USER #define _USER +#include <signal.h> + +typedef struct { + unsigned int lock; + RTIME time; + unsigned int time_ms; + char localtime[32]; + unsigned int TOW; +} ustimeStruct; -typedef volatile struct { - unsigned int time; - unsigned char port; - unsigned char in; - unsigned char out; -} dioDataStruct; +/* + ************************************************************************** + * FUNCTION DECLARATIONS + ************************************************************************** + */ #endif /* _USER */ diff --git a/examples/system_test/src/user_rt.c b/examples/system_test/src/user_rt.c new file mode 100644 index 0000000000000000000000000000000000000000..7b286b97a55d06405b07f27c685bc98b5b012161 --- /dev/null +++ b/examples/system_test/src/user_rt.c @@ -0,0 +1,162 @@ +/* + ************************************************************************** + * SOURCE FILE + ************************************************************************** + * + * user_rt.c - esm task source file for user rt + * + * CSIRO - Heli Project + * + ************************************************************************** + */ + +/** + ************************************************************************** + * \file user_rt.c + * \brief na + * \author na + * \version na + * \date na + ************************************************************************** + */ + +/* + ************************************************************************** + * INCLUDES + ************************************************************************** + */ +#include <stdio.h> +#include <stdlib.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <signal.h> +#include <errno.h> +#include <fcntl.h> +#include <string.h> +#include <unistd.h> + +#include <sys/io.h> + +#include "serial_io.h" + +#include "smi.h" +#include "profile.h" + +#include "rtshm.h" +#include "esminterf_def.h" + +#define TESTSERIAL_PROFILE 1 + +/* + ************************************************************************** + * GLOBALS + ************************************************************************** + */ + +extern rtshm_struct *rtshm; + +/* + ************************************************************************** + * RT TASKS + ************************************************************************** + */ + +void testTiming(taskStateStruct *taskState + // Input Flags: + // Output Flags: error + // RT +) { +#define TASK_PERIOD 1000000 +#define TASK_PERIOD_TOLERANCE 30000 + static RTIME lastTime=0; + RTIME t; + + t=GETTIME; + + if (t-lastTime>TASK_PERIOD+TASK_PERIOD_TOLERANCE && lastTime>0) { + rt_printf("--------------------> timing error dt=%dus %dms\n",(int)((t-lastTime-TASK_PERIOD)/1000),GETTIME_MS); + taskState->outputControlFlag[1-1]=1; + } + lastTime=t; +} + +void testSerial(taskStateStruct *taskState, + comRStruct **comRead, + comWStruct **comWrite + // Input Flags: stage1 stage2 NA NA NA NA NA NA + // Output Flags: stage1done stage2done readComError NA NA NA NA NA +) +{ + unsigned char buf[16]={0xAA,0x44,0x11}; + int ptr; + unsigned char d1,d2,d3; + int n; + RTIME t; + +#if(SERIAL_PROFILE) + static TaskProfileStruct taskProfile; + profile_start(taskState,&taskProfile); +#endif + + if (*comRead==NULL) { + rt_printf("NULL: %d 1\n",taskState->stateID); + goto exit; + } + if (*comWrite==NULL) { + rt_printf("NULL: %d 2\n",taskState->stateID); + goto exit; + } + + if (taskState->inputControlFlag[1-1]==1) { + if (writeComBuf(buf,3, + (int*)&(*comWrite)->com_awbp, + (*comWrite)->com_iwbp, + (*comWrite)->comWriteBuf + )!=3) { + rt_printf("[testSerial] com buffer overflow\n"); + } else { + taskState->outputControlFlag[1-1]=1; + rt_printf("[testSerial] buffer addresses: %p %p\n",*comRead,*comWrite); + rt_printf("[testSerial] data written to com buffer\n"); + rt_printf("[testSerial] stage 1 done\n"); + } + taskState->inputControlFlag[1-1]=0; + + } else + if (taskState->inputControlFlag[2-1]==1) { + if ((*comRead)->comStat!=0) { + rt_printf("[testSerial] com error %02x\n",(*comRead)->comStat); + taskState->outputControlFlag[3-1]=1; + } else { + n = (*comRead)->com_irbp - (*comRead)->com_arbp; // number of bytes not read + if (n < 0) n = COM_RBSIZE + n; + ptr = (*comRead)->com_arbp; + if (n>=3) { + t=((*comRead)->comTime[ptr%COM_RBSIZE]-smiStart)/1000; + d1 = (*comRead)->comReadBuf[ptr%COM_RBSIZE]; + ptr++; + d2 = (*comRead)->comReadBuf[ptr%COM_RBSIZE]; + ptr++; + d3 = (*comRead)->comReadBuf[ptr%COM_RBSIZE]; + if (d1==0xAA && d2==0x44 && d3==0x11) { + rt_printf("[testSerial] buffer addresses: %p %p\n",*comRead,*comWrite); + rt_printf("[testSerial] com received correct data\n"); + rt_printf("[testSerial] com time stamp=%lldus (since smiStart)\n",t); + rt_printf("[testSerial] stage 2 done\n"); + (*comRead)->com_arbp = (ptr + 1) % COM_RBSIZE; + taskState->outputControlFlag[2-1]=1; + } else (*comRead)->com_arbp = ((*comRead)->com_arbp + 1) % COM_RBSIZE; + } + + } + } +exit: + +#if(SERIAL_PROFILE) + profile_stop(taskState,&taskProfile); +#endif + ; + +} + + diff --git a/examples/timing_test/src/ushm.h b/examples/system_test/src/ushm.h similarity index 93% rename from examples/timing_test/src/ushm.h rename to examples/system_test/src/ushm.h index 6faac2b1fb527322c51a20891dbdd1f1ffe676b6..37cc9c808d53fee5e47d4446607d0aff55a54df4 100644 --- a/examples/timing_test/src/ushm.h +++ b/examples/system_test/src/ushm.h @@ -5,8 +5,6 @@ * * ushm.h - header for smi user shared memory * - * CSIRO - Heli Project - * ******************************************************************** */ @@ -22,11 +20,12 @@ #ifndef _USHM #define _USHM +#include <signal.h> + #define USHM_FILE "/ushm" typedef volatile struct { - int flags; + int test; } ushm_struct; #endif /*_NRTSHM */ - diff --git a/examples/timing_test/CMakeLists.txt b/examples/timing_test/CMakeLists.txt deleted file mode 100644 index db0f757ee7a278f174f6e80f351387b948ea129d..0000000000000000000000000000000000000000 --- a/examples/timing_test/CMakeLists.txt +++ /dev/null @@ -1,95 +0,0 @@ -cmake_minimum_required (VERSION 2.6) -project (timing_test C) - -link_directories($ENV{SMI_LIB_DIR}) -SET(COMMON_DIR "../common") - -# RTAI -if($ENV{RTAI}) -SET(RTCFLAGS "$(shell rtai-config --lxrt-cflags) -D_RTAI -m32 -Wall") -SET(RTLIB rtsmirtai) -SET(NRTLIB nrtsmirtai) -else() -# PREEMPT_RT -SET(RTCFLAGS "-O2 -m32 -Wall -fno-stack-protector") -SET(RTLIB rtsmi) -SET(NRTLIB nrtsmi) -endif() - -SET(NRTCFLAGS "-D_NRT -O2 -m32 -Wall") - -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin) - -include_directories( -$ENV{SMI_LIB_DIR} -src -smi -/usr/include/libxml2 -${COMMON_DIR}/input -${COMMON_DIR}/logging -${COMMON_DIR}/serial -mod -) - -set(RTSOURCES -smi/esminterf.c -${COMMON_DIR}/logging/profile.c -${COMMON_DIR}/logging/logging_rt.c -${COMMON_DIR}/logging/logging.c -${COMMON_DIR}/input/input_rt.c -${COMMON_DIR}/serial/serial_rt.c -${COMMON_DIR}/serial/serial.c -src/user_rt.c -) - -set(NRTSOURCES -smi/esminterf.c -${COMMON_DIR}/logging/logging.c -${COMMON_DIR}/serial/serial.c -${COMMON_DIR}/input/input_nrt.c -${COMMON_DIR}/logging/logging_nrt.c -${COMMON_DIR}/logging/flash_logger_dist.c -${COMMON_DIR}/services/services_io_nrt.c -src/user_nrt.c -) - -add_library(rttasklib STATIC ${RTSOURCES}) -add_library(nrttasklib STATIC ${NRTSOURCES}) - -add_executable(rt src/rt.c) -add_executable(nrt src/nrt.c) -add_executable(nrt_task src/nrt_task.c) -add_executable(decode src/decode.c) -add_executable(smiplay ${COMMON_DIR}/smiplay/smiplay.c) - -target_link_libraries(rt ${RTLIB} rttasklib 'rt' m) -target_link_libraries(nrt ${NRTLIB} nrttasklib xml2 'rt' m) -target_link_libraries(nrt_task ${NRTLIB} nrttasklib xml2 'rt' m) -target_link_libraries(smiplay ${NRTLIB} m) - -SET_TARGET_PROPERTIES(rt PROPERTIES COMPILE_FLAGS ${RTCFLAGS}) -SET_TARGET_PROPERTIES(rttasklib PROPERTIES COMPILE_FLAGS ${RTCFLAGS}) -SET_TARGET_PROPERTIES(nrt PROPERTIES COMPILE_FLAGS ${NRTCFLAGS}) -SET_TARGET_PROPERTIES(nrt_task PROPERTIES COMPILE_FLAGS ${NRTCFLAGS}) -SET_TARGET_PROPERTIES(nrttasklib PROPERTIES COMPILE_FLAGS ${NRTCFLAGS}) - -add_custom_target( - services_io.ko - COMMAND make - WORKING_DIRECTORY ../mod -) -add_dependencies(rt services_io.ko) - -add_custom_target( - smi_symbols.h - COMMAND ln -f -s $ENV{SMI_LIB_DIR}/smi_symbols.h ../smi -) -add_dependencies(rt smi_symbols.h) - -if($ENV{RTAI}) -add_custom_target( - rtaicheck.sh - COMMAND ../bin/rtaicheck.sh -) -add_dependencies(rt rtaicheck.sh) -endif() diff --git a/examples/timing_test/bin/rtaistart.sh b/examples/timing_test/bin/rtaistart.sh deleted file mode 100755 index a03f55687964a383a67f0afc0837e989518a4161..0000000000000000000000000000000000000000 --- a/examples/timing_test/bin/rtaistart.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -setserial /dev/ttyS0 uart none -../../common/scripts/rtaistart.sh diff --git a/examples/timing_test/bin/start.sh b/examples/timing_test/bin/start.sh deleted file mode 100755 index 94200ddfe2a0ebb52bc84a41064991d2f7b3ac8c..0000000000000000000000000000000000000000 --- a/examples/timing_test/bin/start.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -setserial /dev/ttyS0 uart none -../../common/scripts/start.sh diff --git a/examples/timing_test/esm/basicslot.xml b/examples/timing_test/esm/basicslot.xml deleted file mode 100644 index 447ef85be2b6155550030d5dedb1fb56bec8a853..0000000000000000000000000000000000000000 --- a/examples/timing_test/esm/basicslot.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- Unit is nano seconds --> -<basic-slots period="1000000" > - <slot id="smiSlot" multiplier="2" duration="250000" /> - <slot id="logSlot" multiplier="2" duration="100000" /> - <slot id="comSlot" multiplier="2" duration="150000" /> - <slot id="timingSlot" multiplier="2" duration="50000" /> - <slot id="suspendSlot" multiplier="5" duration="250000" /> - <slot id="suspend2Slot" multiplier="5" duration="250000" /> - <slot id="userSlot" multiplier="10" duration="100000" /> - <slot id="initSlot" multiplier="50" duration="200000" /> -</basic-slots> diff --git a/examples/timing_test/esm/dio.esm b/examples/timing_test/esm/dio.esm deleted file mode 100644 index 81b939edd6a11b6327da234d10f9d402d55ce543..0000000000000000000000000000000000000000 --- a/examples/timing_test/esm/dio.esm +++ /dev/null @@ -1,542 +0,0 @@ -<?xml version="1.0"?> -<esmcontainer uuid="{7c0a307e-0ddd-4439-b588-12f71e4831e8}" name="dio" cloned-from="comio.esm" comment="" scene-width="0" scene-height="0"> - <data-storage-list> - <data-storage uuid="{29effb5d-a357-45fc-aa57-0493538a1876}" name="comPar" comment=""/> - <data-storage uuid="{ff44b7d2-7083-4b08-be00-b2263233c50b}" name="comRead" comment=""/> - <data-storage uuid="{d17fc55d-5cd5-44e0-acd4-e860812558a8}" name="comWrite" comment=""/> - <data-storage uuid="{5d501bfc-b273-4651-a899-a80c26d690f5}" name="ioRegionId" comment=""/> - <data-storage uuid="{31a8442a-eede-41c6-9fd7-c3b224e822b9}" name="log" comment=""/> - </data-storage-list> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{16d08d61-b973-4169-baba-c1011a3368fc}" name="log" comment="" data-storage-uuid="{31a8442a-eede-41c6-9fd7-c3b224e822b9}" optional="1" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{f6f8f493-f9e9-4f54-9f24-f0b5c1b562b4}" name="quit" comment="" type="user_defined"/> - </input-flags> - <output-flags> - </output-flags> - <container-events> - <event uuid="{45fb1ab0-aed5-4d26-b0a4-658171a4fee9}" name="comOpen" comment=""/> - <event uuid="{699c5b24-1c28-4c62-8a7e-c3739c6bc4e1}" name="ioPortsAllocated" comment=""/> - <event uuid="{a12fbe55-b1b0-4641-87a0-c76251962ac4}" name="ioReqPortsAllocated" comment=""/> - <event uuid="{edd7fc29-0593-43d9-bcaf-9e51baf037c5}" name="ledoff" comment=""/> - <event uuid="{7a99827e-e6d7-45b6-bcf1-45d99f6ac5cc}" name="ledon" comment=""/> - <event uuid="{041c63b0-53dd-4c67-9370-ad10e129701e}" name="quitCom" comment=""/> - <event uuid="{40ae6517-70e1-4025-8cdb-39f400819b01}" name="triggerOff" comment=""/> - <event uuid="{c8950586-a67c-48ed-ac8c-46ce95f952e9}" name="triggerOn" comment=""/> - </container-events> - <input-events> - <event-ref uuid="{699c5b24-1c28-4c62-8a7e-c3739c6bc4e1}" name="ioPortsAllocated"/> - </input-events> - <output-events> - <event-ref uuid="{a12fbe55-b1b0-4641-87a0-c76251962ac4}" name="ioReqPortsAllocated"/> - </output-events> - <global-events> - <event uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}" name="PULSEEVENT" type="pulseevent" comment=""/> - </global-events> - <regions> - <region uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" name="Region0" comment="" number="0"> - <states> - <final-state uuid="{f3b87138-aaa5-483f-a3c8-db831c44a9dd}" name="[exit]" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> - <task-state uuid="{59b82a13-fb4d-4513-96e9-89067bf73e6f}" name="setComPar" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="serialSetComPar" task-slot-name="com" process-name="" real-time="1"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{91c0ff06-845f-45ed-81cf-a89c47579a97}" name="comPar" comment="" data-storage-uuid="{29effb5d-a357-45fc-aa57-0493538a1876}" optional="0" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{6ae0af24-4128-4664-a2af-c80776e7d2cd}" name="b0" comment="" type="user_defined"/> - <flag uuid="{898a8da3-d6c4-4cb4-a0bd-6b12666d6597}" name="b1" comment="" type="user_defined"/> - <flag uuid="{b3b98b37-22ac-4eed-a3de-da1492fd56e5}" name="b2" comment="" type="user_defined"/> - <flag uuid="{b9625090-2d34-4aae-8b98-275d11c286bc}" name="b3" comment="" type="user_defined"/> - <flag uuid="{dc4538da-3c0e-4d6e-b639-0e971521905d}" name="d0" comment="" type="user_defined"/> - <flag uuid="{b7c04c3d-b4c5-4c7a-bfa8-27346dafcc6c}" name="p0" comment="" type="user_defined"/> - <flag uuid="{2901465b-3b42-4cca-ba8a-bb530333461a}" name="p1" comment="" type="user_defined"/> - <flag uuid="{36f788d4-904b-4b0e-b92b-c2aa5fa1f8c9}" name="s0" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{7a4631c5-bbfe-43c6-8a8e-266c221a54bb}" name="error" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{85560644-e05a-4b20-b662-58b08cf5deb1}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{cc4780e6-67b7-453c-830c-ae5df6ba871c}" name="Exit" comment="" type="exit"/> - <flag uuid="{8d14c839-cf4a-4dab-b39b-1690581747be}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <basic-state uuid="{b763b54b-dda2-4ff6-83c8-8b01c5f3a1d5}" name="error" comment="" timeout="10000" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{d497d221-792d-4f5c-ad0c-7471ea670bc5}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <task-state uuid="{6fe45440-c2b3-4ec4-a788-240d93ac863a}" name="serialGetComPar" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="serialGetComPar" task-slot-name="com" process-name="" real-time="1"> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{7e2e2b28-07da-48f3-a208-a3572642f9d7}" name="comPar" comment="" data-storage-uuid="{29effb5d-a357-45fc-aa57-0493538a1876}" optional="0" allocation="1" release="0" read="0" write="1"/> - <port uuid="{461de6d4-bda1-4877-8b11-b81126cbfc5a}" name="ioRegionId" comment="" data-storage-uuid="{5d501bfc-b273-4651-a899-a80c26d690f5}" optional="0" allocation="1" release="0" read="0" write="1"/> - <port uuid="{c821d63b-9ae5-4f72-8dce-f021b11ad144}" name="comRead" comment="" data-storage-uuid="{ff44b7d2-7083-4b08-be00-b2263233c50b}" optional="0" allocation="1" release="0" read="0" write="0"/> - <port uuid="{265fe9d2-76de-4fe4-8d21-a1fc0233ce82}" name="comWrite" comment="" data-storage-uuid="{d17fc55d-5cd5-44e0-acd4-e860812558a8}" optional="0" allocation="1" release="0" read="0" write="0"/> - </output-ports> - <input-flags> - <flag uuid="{0cc7d208-5ba3-4381-ad9a-d58bf0479695}" name="bit0" comment="" type="user_defined"/> - <flag uuid="{18f4e5c8-84a2-43d2-8a7d-35176dc1c739}" name="bit1" comment="" type="user_defined"/> - <flag uuid="{c26028fb-6529-4208-beba-74ac0832df0f}" name="bit2" comment="" type="user_defined"/> - <flag uuid="{42325b03-9ae0-4f2c-9eec-c5866b61d9c3}" name="bit3" comment="" type="user_defined"/> - <flag uuid="{fb55dd41-e44d-43c3-bc6e-3c77de4295b5}" name="bit4" comment="" type="user_defined"/> - <flag uuid="{6278d190-4f4e-4880-a736-9e4cc2f7a520}" name="bit5" comment="" type="user_defined"/> - <flag uuid="{65eef4c8-ffa2-4d92-a6f8-65bb16d68444}" name="bit6" comment="" type="user_defined"/> - <flag uuid="{55e3c93c-4d61-42fe-8114-e545f662230c}" name="bit7" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{cc6c713c-cf80-4047-b8a2-45a417517db6}" name="error" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{1509c594-3a4e-4d1a-8a55-3c2c4d8b1afe}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{952a540b-81f9-48a7-b0aa-3a39051f4141}" name="Exit" comment="" type="exit"/> - <flag uuid="{340c51e4-b909-41da-9fb7-a014cb5247aa}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{c27fa661-32e3-4f7a-8953-8fddc598c5d6}" name="serialOpenComPort" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="serialOpenComPort" task-slot-name="com" process-name="" real-time="1"> - <input-ports> - <port uuid="{6337e93b-6a48-47f9-9cff-a970359d8800}" name="comPar" comment="" data-storage-uuid="{29effb5d-a357-45fc-aa57-0493538a1876}" optional="0" allocation="0" release="0" read="1" write="0"/> - <port uuid="{72ae692b-0fd4-49ab-81e4-88d0fb2cc324}" name="ioRegionId" comment="" data-storage-uuid="{5d501bfc-b273-4651-a899-a80c26d690f5}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - <flag uuid="{6ef41a64-f480-4252-9ff2-6a0d1150a0ac}" name="done" comment="" type="user_defined"/> - <flag uuid="{e003a116-3020-47e8-96a8-772d0e380515}" name="notAllocated" comment="" type="user_defined"/> - <flag uuid="{bf935fed-ffe5-4fb6-8452-5114a44e7396}" name="busy" comment="" type="user_defined"/> - <flag uuid="{e0f75290-c0dc-4712-83d8-b66b22245a4d}" name="sizeMismatch" comment="" type="user_defined"/> - <flag uuid="{d9533823-266e-4ae8-a9e3-c58af27dc9e1}" name="notAvailable" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{e7ac81c6-e8de-400e-87bc-9cde1b4da3af}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{dc8c3913-13ce-4acc-ab6b-ec51c1bc7d6e}" name="Exit" comment="" type="exit"/> - <flag uuid="{027132a3-c4b9-4783-9e99-5ab5a02095d9}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <basic-state uuid="{8581d88a-657a-421b-a6ad-23a795fb3dd8}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{5bbe64d6-7ec4-4e5b-85b3-5c7b15fa2625}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <initial-state uuid="{2c92a414-c6a9-4fb1-b86d-c523b30cfbf6}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{39a823cb-3314-4163-b94d-ea979e4603a8}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <basic-state uuid="{46181900-d84e-4e6d-bd70-163d21e078de}" name="open" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{7ebd6eb0-0b7c-496b-b7a9-55ce225d17b4}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <task-state uuid="{e246b859-411f-44f1-9379-7644a45f8e5e}" name="serialCloseComPort" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="serialCloseComPort" task-slot-name="com" process-name="" real-time="1"> - <input-ports> - <port uuid="{29284871-2b93-4b36-bc0d-fcbd45ae13d7}" name="ioRegionId" comment="" data-storage-uuid="{5d501bfc-b273-4651-a899-a80c26d690f5}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{ad8e12ed-a190-4630-974c-2067c05ef582}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{d34dbbbc-b4ac-47aa-86c1-05e26b98eb5a}" name="Exit" comment="" type="exit"/> - <flag uuid="{70189d49-9fd8-4103-a5af-692ebaca9a93}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - </states> - <transitions> - <transition uuid="{336dc6fd-cddf-4b81-9003-e691bb834545}" comment="" from-state-uuid="{8581d88a-657a-421b-a6ad-23a795fb3dd8}" to-state-uuid="{6fe45440-c2b3-4ec4-a788-240d93ac863a}" event-uuid="{699c5b24-1c28-4c62-8a7e-c3739c6bc4e1}"> - <actions> - </actions> - </transition> - <transition uuid="{0e5be7ba-dbea-4024-9b61-b37f98863e94}" comment="" from-state-uuid="{6fe45440-c2b3-4ec4-a788-240d93ac863a}" to-state-uuid="{59b82a13-fb4d-4513-96e9-89067bf73e6f}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - <set-flag-action uuid="{9493612b-9133-4bb0-bd91-26ec39b49dc7}" name="set flag b0" comment="" flag-uuid="{6ae0af24-4128-4664-a2af-c80776e7d2cd}" flag-value="1"/> - <set-flag-action uuid="{be3f57c8-c56f-45ed-8e0a-611f1cb7af75}" name="set flag b3" comment="" flag-uuid="{b9625090-2d34-4aae-8b98-275d11c286bc}" flag-value="1"/> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{952a540b-81f9-48a7-b0aa-3a39051f4141}"/> -<guard operator="negation" flag-uuid="{cc6c713c-cf80-4047-b8a2-45a417517db6}"/> -</guard> - </transition> - <transition uuid="{1bd36c61-97fe-4fa7-991a-eb0018ca1a58}" comment="" from-state-uuid="{59b82a13-fb4d-4513-96e9-89067bf73e6f}" to-state-uuid="{c27fa661-32e3-4f7a-8953-8fddc598c5d6}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{cc4780e6-67b7-453c-830c-ae5df6ba871c}"/> -<guard operator="negation" flag-uuid="{7a4631c5-bbfe-43c6-8a8e-266c221a54bb}"/> -</guard> - </transition> - <transition uuid="{88886e4d-ff7c-4a71-962a-399c1e73a344}" comment="" from-state-uuid="{6fe45440-c2b3-4ec4-a788-240d93ac863a}" to-state-uuid="{b763b54b-dda2-4ff6-83c8-8b01c5f3a1d5}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{952a540b-81f9-48a7-b0aa-3a39051f4141}"/> -<guard operator="none" flag-uuid="{cc6c713c-cf80-4047-b8a2-45a417517db6}"/> -</guard> - </transition> - <transition uuid="{7ae4b5d5-399f-48db-9c45-4ebe29db2791}" comment="" from-state-uuid="{59b82a13-fb4d-4513-96e9-89067bf73e6f}" to-state-uuid="{b763b54b-dda2-4ff6-83c8-8b01c5f3a1d5}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - </actions> -<guard operator="and" flag-uuid=""> -<guard operator="none" flag-uuid="{cc4780e6-67b7-453c-830c-ae5df6ba871c}"/> -<guard operator="none" flag-uuid="{7a4631c5-bbfe-43c6-8a8e-266c221a54bb}"/> -</guard> - </transition> - <transition uuid="{7b09b8ce-aa02-42bb-b2cf-5121d27acfa0}" comment="" from-state-uuid="{c27fa661-32e3-4f7a-8953-8fddc598c5d6}" to-state-uuid="{b763b54b-dda2-4ff6-83c8-8b01c5f3a1d5}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{e003a116-3020-47e8-96a8-772d0e380515}"/> - </transition> - <transition uuid="{dae2a507-d718-47de-98d2-633551104caa}" comment="" from-state-uuid="{c27fa661-32e3-4f7a-8953-8fddc598c5d6}" to-state-uuid="{46181900-d84e-4e6d-bd70-163d21e078de}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - <send-event-action uuid="{b8c341d4-7810-42d8-9458-d54d1cb3f913}" name="comOpen" comment="" event-uuid="{45fb1ab0-aed5-4d26-b0a4-658171a4fee9}"/> - </actions> -<guard operator="none" flag-uuid="{6ef41a64-f480-4252-9ff2-6a0d1150a0ac}"/> - </transition> - <transition uuid="{9e164ecc-7cb2-47b5-8d12-5f08f97d4be0}" comment="" from-state-uuid="{b763b54b-dda2-4ff6-83c8-8b01c5f3a1d5}" to-state-uuid="{f3b87138-aaa5-483f-a3c8-db831c44a9dd}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{f6f8f493-f9e9-4f54-9f24-f0b5c1b562b4}"/> - </transition> - <transition uuid="{62293f63-927d-4997-89ff-9a2db7d43919}" comment="" from-state-uuid="{8581d88a-657a-421b-a6ad-23a795fb3dd8}" to-state-uuid="{f3b87138-aaa5-483f-a3c8-db831c44a9dd}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{f6f8f493-f9e9-4f54-9f24-f0b5c1b562b4}"/> - </transition> - <transition uuid="{c61fab92-2681-4456-83b6-8d26976213f7}" comment="" from-state-uuid="{c27fa661-32e3-4f7a-8953-8fddc598c5d6}" to-state-uuid="{b763b54b-dda2-4ff6-83c8-8b01c5f3a1d5}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{bf935fed-ffe5-4fb6-8452-5114a44e7396}"/> - </transition> - <transition uuid="{d2ef8217-8fa4-46cd-ac0a-2eca3e8dc68f}" comment="" from-state-uuid="{c27fa661-32e3-4f7a-8953-8fddc598c5d6}" to-state-uuid="{b763b54b-dda2-4ff6-83c8-8b01c5f3a1d5}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{e0f75290-c0dc-4712-83d8-b66b22245a4d}"/> - </transition> - <transition uuid="{e342562e-4424-4f57-b27f-35ad7104e614}" comment="" from-state-uuid="{c27fa661-32e3-4f7a-8953-8fddc598c5d6}" to-state-uuid="{b763b54b-dda2-4ff6-83c8-8b01c5f3a1d5}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{d9533823-266e-4ae8-a9e3-c58af27dc9e1}"/> - </transition> - <transition uuid="{8b97760f-f020-444b-be43-520a8d9cdafb}" comment="" from-state-uuid="{2c92a414-c6a9-4fb1-b86d-c523b30cfbf6}" to-state-uuid="{8581d88a-657a-421b-a6ad-23a795fb3dd8}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - <send-event-action uuid="{3e374912-812d-43a8-bc65-f107860d9f12}" name="" comment="" event-uuid="{a12fbe55-b1b0-4641-87a0-c76251962ac4}"/> - </actions> - </transition> - <transition uuid="{8205d56d-7810-4b85-b734-c9a90d55a5a5}" comment="" from-state-uuid="{e246b859-411f-44f1-9379-7644a45f8e5e}" to-state-uuid="{f3b87138-aaa5-483f-a3c8-db831c44a9dd}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{d34dbbbc-b4ac-47aa-86c1-05e26b98eb5a}"/> - </transition> - <transition uuid="{867e23f8-e348-42e0-bde6-874907633187}" comment="" from-state-uuid="{46181900-d84e-4e6d-bd70-163d21e078de}" to-state-uuid="{e246b859-411f-44f1-9379-7644a45f8e5e}" event-uuid="{041c63b0-53dd-4c67-9370-ad10e129701e}"> - <actions> - </actions> - </transition> - </transitions> - </region> - <region uuid="{ca9cafdc-6e79-47c0-ae96-6605af2f1651}" name="Region2" comment="" number="1"> - <states> - <basic-state uuid="{d9db8440-8230-4f7d-a439-0abfd34aa917}" name="quit" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{815463c8-bd55-4eda-b56d-96055d7500fb}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <initial-state uuid="{3802a713-f3ad-42b5-b183-1f7ed4af034f}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{8685733d-1459-479a-a875-7c4bdb144f43}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <task-state uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" name="dio" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="dio" task-slot-name="com" process-name="" real-time="1"> - <input-ports> - <port uuid="{d683640a-14f9-44c7-a57c-67d4afeabf05}" name="ioRegionId" comment="" data-storage-uuid="{5d501bfc-b273-4651-a899-a80c26d690f5}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - <port uuid="{6a0133cf-da7b-4cc9-b3ff-62f2cd91c465}" name="log" comment="" data-storage-uuid="{31a8442a-eede-41c6-9fd7-c3b224e822b9}" optional="1" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{899cc3ba-626b-453d-8942-c1f91dd903da}" name="quit" comment="" type="user_defined"/> - <flag uuid="{ae85a0d2-9e36-413c-a1b9-249a4ed7cc34}" name="ledon" comment="" type="user_defined"/> - <flag uuid="{540b0b9b-a1a4-43bb-b085-de702bc82e94}" name="ledoff" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{5f0dde95-bd5a-4799-a87a-d0f01a2beb89}" name="triggerOn" comment="" type="user_defined"/> - <flag uuid="{8632bcba-7159-4723-b813-efca9d9dc7c3}" name="triggerOff" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{b9f3ec03-6b7d-44c4-8781-a355d4f50fb3}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{0c736be4-7dfe-4259-bdaa-5d75f938d8b4}" name="Exit" comment="" type="exit"/> - <flag uuid="{999cd3cc-bdf2-4992-bb15-f683e299fe39}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - <task-state uuid="{6f0789a6-65c9-43f5-9d0d-50b9837f1def}" name="dio quit" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="dio" task-slot-name="com" process-name="" real-time="1"> - <input-ports> - <port uuid="{7428905a-e3d0-42cd-bf79-1b136a7f7d64}" name="ioRegionId" comment="" data-storage-uuid="{5d501bfc-b273-4651-a899-a80c26d690f5}" optional="0" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - <port uuid="{d234a64c-ccaf-46f1-b503-57bc41545736}" name="log" comment="" data-storage-uuid="{31a8442a-eede-41c6-9fd7-c3b224e822b9}" optional="1" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{dc122bdc-f9eb-4941-91f5-41f64f0066b4}" name="quit" comment="" type="user_defined"/> - <flag uuid="{f66b3de5-5865-422c-a14f-aefff7a3688a}" name="ledon" comment="" type="user_defined"/> - <flag uuid="{7fafa43e-26d8-41ce-afc6-e2fc378894e7}" name="ledoff" comment="" type="user_defined"/> - </input-flags> - <output-flags> - <flag uuid="{37e6dc3c-b05f-4835-bfb4-7ce02b411727}" name="triggerOn" comment="" type="user_defined"/> - <flag uuid="{29120b2e-8eed-4d24-9433-42d2887cc877}" name="triggerOff" comment="" type="user_defined"/> - </output-flags> - <system-flags> - <flag uuid="{0efe00df-71d3-4811-acfa-339821203c84}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{3ed55218-503e-484a-bf82-bffd653cd49a}" name="Exit" comment="" type="exit"/> - <flag uuid="{8fe2331b-47b6-4c96-84e1-103cdf1ea355}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - </states> - <transitions> - <transition uuid="{c3108a29-9aa0-4bd7-acf0-7462b4308dc2}" comment="" from-state-uuid="{3802a713-f3ad-42b5-b183-1f7ed4af034f}" to-state-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" event-uuid="{45fb1ab0-aed5-4d26-b0a4-658171a4fee9}"> - <actions> - </actions> - </transition> - <transition uuid="{eb1ff1fd-cebc-4c7d-a432-9b3d291d1b8b}" comment="" from-state-uuid="{6f0789a6-65c9-43f5-9d0d-50b9837f1def}" to-state-uuid="{d9db8440-8230-4f7d-a439-0abfd34aa917}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - <send-event-action uuid="{369a0527-77e1-4473-bbeb-fc77ff4064e6}" name="quitCom" comment="" event-uuid="{041c63b0-53dd-4c67-9370-ad10e129701e}"/> - </actions> -<guard operator="none" flag-uuid="{3ed55218-503e-484a-bf82-bffd653cd49a}"/> - </transition> - <transition uuid="{5445b04f-8ba8-4ca7-98cf-e7bf1ab8bb9c}" comment="" from-state-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" to-state-uuid="{6f0789a6-65c9-43f5-9d0d-50b9837f1def}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - <set-flag-action uuid="{2611395a-7c7e-432e-8f76-93c55790b12e}" name="" comment="" flag-uuid="{dc122bdc-f9eb-4941-91f5-41f64f0066b4}" flag-value="0"/> - </actions> -<guard operator="none" flag-uuid="{f6f8f493-f9e9-4f54-9f24-f0b5c1b562b4}"/> - </transition> - <transition uuid="{ecdec452-ad5c-4a84-abaa-d5e9840876d0}" comment="" from-state-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" to-state-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" event-uuid="{7a99827e-e6d7-45b6-bcf1-45d99f6ac5cc}"> - <actions> - <set-flag-action uuid="{d637f984-648f-405a-b717-aac87cb175d0}" name="" comment="" flag-uuid="{ae85a0d2-9e36-413c-a1b9-249a4ed7cc34}" flag-value="0"/> - </actions> - </transition> - <transition uuid="{2ca1d136-46ac-4ba8-8051-5831fd3e2b93}" comment="" from-state-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" to-state-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" event-uuid="{edd7fc29-0593-43d9-bcaf-9e51baf037c5}"> - <actions> - <set-flag-action uuid="{8bba0ec1-bca1-4885-88c1-07ecb5d8dd6a}" name="" comment="" flag-uuid="{540b0b9b-a1a4-43bb-b085-de702bc82e94}" flag-value="0"/> - </actions> - </transition> - <transition uuid="{7d612ca7-8bc9-459a-b40e-3e6a36bc780d}" comment="" from-state-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" to-state-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - <send-event-action uuid="{9a085348-c1d1-4fbb-98cd-c6c68660b94d}" name="" comment="" event-uuid="{c8950586-a67c-48ed-ac8c-46ce95f952e9}"/> - </actions> -<guard operator="none" flag-uuid="{5f0dde95-bd5a-4799-a87a-d0f01a2beb89}"/> - </transition> - <transition uuid="{227ce94b-ecbf-459a-a1c9-112e801fbacb}" comment="" from-state-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" to-state-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" event-uuid="{b7071fe0-f142-4724-b36c-cc318f0c3e0e}"> - <actions> - <send-event-action uuid="{9da5368b-8b29-4271-9dff-2b9243286bc2}" name="" comment="" event-uuid="{40ae6517-70e1-4025-8cdb-39f400819b01}"/> - </actions> -<guard operator="none" flag-uuid="{8632bcba-7159-4723-b813-efca9d9dc7c3}"/> - </transition> - </transitions> - </region> - <region uuid="{2114b548-0bf8-4882-9c27-1dc444210b66}" name="" comment="" number="2"> - <states> - <initial-state uuid="{a829fcbc-a8b8-4333-b876-6a8989bd39a8}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{7841d843-cda0-4a10-81b6-b658721ae839}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <basic-state uuid="{4be71375-9f2b-4969-8297-a372bd867e46}" name="trigger on" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{3f3c2366-7634-4d2f-807f-79654588eda4}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - <basic-state uuid="{b82d2d24-ea6e-4906-bd74-297581d62f80}" name="trigger off" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{4e420c3c-acea-4079-b542-8f030355dcfe}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - </states> - <transitions> - <transition uuid="{b3105135-b695-4ec8-a457-23f8fa1548eb}" comment="" from-state-uuid="{a829fcbc-a8b8-4333-b876-6a8989bd39a8}" to-state-uuid="{4be71375-9f2b-4969-8297-a372bd867e46}" event-uuid="{c8950586-a67c-48ed-ac8c-46ce95f952e9}"> - <actions> - </actions> - </transition> - <transition uuid="{19bd2813-16b7-4ede-becb-5c28b15c885b}" comment="" from-state-uuid="{a829fcbc-a8b8-4333-b876-6a8989bd39a8}" to-state-uuid="{b82d2d24-ea6e-4906-bd74-297581d62f80}" event-uuid="{40ae6517-70e1-4025-8cdb-39f400819b01}"> - <actions> - </actions> - </transition> - <transition uuid="{9f2f82d5-2174-437f-b67a-033f0ea48459}" comment="" from-state-uuid="{b82d2d24-ea6e-4906-bd74-297581d62f80}" to-state-uuid="{4be71375-9f2b-4969-8297-a372bd867e46}" event-uuid="{c8950586-a67c-48ed-ac8c-46ce95f952e9}"> - <actions> - </actions> - </transition> - <transition uuid="{31e1f3f7-564f-4f2e-b8da-2125138dd80a}" comment="" from-state-uuid="{4be71375-9f2b-4969-8297-a372bd867e46}" to-state-uuid="{b82d2d24-ea6e-4906-bd74-297581d62f80}" event-uuid="{40ae6517-70e1-4025-8cdb-39f400819b01}"> - <actions> - </actions> - </transition> - </transitions> - </region> - </regions> - <diagrams> - <diagram uuid="{fa84c4f1-5aa3-4c0d-af20-17e960edc558}" name="" comment=""> - <box-item uuid="{431fecb7-0828-442f-bf36-49a7aec57698}" comment="" model-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" x="2310" y="2730" width="600" height="900" type="standard_box"/> - <box-item uuid="{5f951a37-7b74-4939-8b9a-a6715648cfb2}" comment="" model-uuid="{f3b87138-aaa5-483f-a3c8-db831c44a9dd}" x="2" y="338" width="20" height="20" type="standard_box"/> - <box-item uuid="{15a1a2de-de77-4ca7-b19a-08b8c8e75f4c}" comment="" model-uuid="{59b82a13-fb4d-4513-96e9-89067bf73e6f}" x="-37" y="-140" width="100" height="50" type="standard_box"/> - <box-item uuid="{04b08d14-a6fe-47cc-8922-05b01529676d}" comment="" model-uuid="{91c0ff06-845f-45ed-81cf-a89c47579a97}" x="50" y="-15" width="20" height="20" type="standard_box"/> - <box-item uuid="{0dec92bb-7130-4383-aad6-c03c66da332a}" comment="" model-uuid="{b763b54b-dda2-4ff6-83c8-8b01c5f3a1d5}" x="-172" y="-41" width="100" height="50" type="standard_box"/> - <box-item uuid="{3c121bb3-0a14-40a3-a6ff-70d782e9764a}" comment="" model-uuid="{6fe45440-c2b3-4ec4-a788-240d93ac863a}" x="-22" y="-257" width="122" height="50" type="standard_box"/> - <box-item uuid="{2c013c59-6a0a-4f8f-88a7-cdf64c7ed5f1}" comment="" model-uuid="{7e2e2b28-07da-48f3-a208-a3572642f9d7}" x="61" y="15" width="20" height="20" type="standard_box"/> - <box-item uuid="{742fc803-c34d-488b-9d77-53f742edbac7}" comment="" model-uuid="{461de6d4-bda1-4877-8b11-b81126cbfc5a}" x="-61" y="-14" width="20" height="20" type="standard_box"/> - <box-item uuid="{0c8b3386-6878-438c-a8cf-5503ffb92a9f}" comment="" model-uuid="{c821d63b-9ae5-4f72-8dce-f021b11ad144}" x="61" y="9" width="20" height="20" type="standard_box"/> - <box-item uuid="{b71a9fb1-f2fe-4048-acc5-e07aba99021f}" comment="" model-uuid="{265fe9d2-76de-4fe4-8d21-a1fc0233ce82}" x="61" y="-12" width="20" height="20" type="standard_box"/> - <box-item uuid="{e780ebcf-15b0-4e3e-a616-db5bc571ec69}" comment="" model-uuid="{c27fa661-32e3-4f7a-8953-8fddc598c5d6}" x="147" y="-37" width="140" height="50" type="standard_box"/> - <box-item uuid="{ab4e9828-c33a-44bf-9037-98a90f563046}" comment="" model-uuid="{6337e93b-6a48-47f9-9cff-a970359d8800}" x="-13" y="-25" width="20" height="20" type="standard_box"/> - <box-item uuid="{9173e881-14a6-4a9b-a041-7a55a28fe6c5}" comment="" model-uuid="{72ae692b-0fd4-49ab-81e4-88d0fb2cc324}" x="-55" y="25" width="20" height="20" type="standard_box"/> - <box-item uuid="{9312c698-57d8-4e98-8709-9426268709ef}" comment="" model-uuid="{ca9cafdc-6e79-47c0-ae96-6605af2f1651}" x="2970" y="2520" width="660" height="480" type="standard_box"/> - <box-item uuid="{7aa0bca8-0a10-4f4d-b312-aba15ceb0763}" comment="" model-uuid="{d9db8440-8230-4f7d-a439-0abfd34aa917}" x="11" y="201" width="100" height="50" type="standard_box"/> - <box-item uuid="{4cb923eb-d26c-42dd-8d87-4971a48b4607}" comment="" model-uuid="{3802a713-f3ad-42b5-b183-1f7ed4af034f}" x="-80" y="-154" width="12" height="12" type="standard_box"/> - <box-item uuid="{2f5ee713-9063-4f30-bb49-a0cd786ef2ac}" comment="" model-uuid="" x="2220" y="2220" width="420" height="60" type="input_events_box"/> - <box-item uuid="{528eb0d0-564b-422e-9ef0-e864eec7e238}" comment="" model-uuid="" x="2220" y="3240" width="420" height="60" type="output_events_box"/> - <box-item uuid="{57e0e24d-5bd4-4925-95b5-c7c239fc9acb}" comment="" model-uuid="" x="2655" y="2220" width="420" height="60" type="input_ports_box"/> - <box-item uuid="{3adb79b3-088b-497b-b98b-dd3829a28ce9}" comment="" model-uuid="" x="2670" y="3240" width="420" height="60" type="output_ports_box"/> - <box-item uuid="{b89438a5-0658-47fe-a00e-6a46a779c922}" comment="" model-uuid="" x="3090" y="2220" width="420" height="60" type="input_flags_box"/> - <box-item uuid="{b80282c1-13ff-4178-9a97-7d803a7e253b}" comment="" model-uuid="" x="3105" y="3240" width="420" height="60" type="output_flags_box"/> - <box-item uuid="{31c17026-33a3-4260-b720-cbf985cd48d2}" comment="" model-uuid="" x="2820" y="2730" width="1680" height="1140" type="container_box"/> - <box-item uuid="{1841cbe8-8d3e-4f0c-be5e-ea2ac6c1710b}" comment="" model-uuid="{8581d88a-657a-421b-a6ad-23a795fb3dd8}" x="-119" y="-386" width="32" height="26" type="standard_box"/> - <box-item uuid="{3fbc0a9e-892b-4b44-b7ac-395a58d8d635}" comment="" model-uuid="{2c92a414-c6a9-4fb1-b86d-c523b30cfbf6}" x="-195" y="-431" width="12" height="12" type="standard_box"/> - <box-item uuid="{c5f258d5-a69d-42f2-a31f-a08332cc58f4}" comment="" model-uuid="{6f41885e-5854-4191-a200-2976b1fb248b}" x="5" y="-50" width="100" height="50" type="standard_box"/> - <box-item uuid="{fab28d99-aa24-4176-be76-0fc1667c64e5}" comment="" model-uuid="{d683640a-14f9-44c7-a57c-67d4afeabf05}" x="-50" y="-2" width="10" height="10" type="standard_box"/> - <box-item uuid="{476830f3-7c2f-4a17-8423-e631a306854b}" comment="" model-uuid="{6f0789a6-65c9-43f5-9d0d-50b9837f1def}" x="12" y="98" width="100" height="50" type="standard_box"/> - <box-item uuid="{973e7a66-3f85-4fb5-a942-9163b3a5b534}" comment="" model-uuid="{7428905a-e3d0-42cd-bf79-1b136a7f7d64}" x="-50" y="-10" width="10" height="10" type="standard_box"/> - <box-item uuid="{bef25771-3bcb-4d2b-9fa5-0e39fdd3e322}" comment="" model-uuid="{2114b548-0bf8-4882-9c27-1dc444210b66}" x="3450" y="2460" width="240" height="360" type="standard_box"/> - <box-item uuid="{65545611-e401-4cd1-94d3-1ed3052e9133}" comment="" model-uuid="{a829fcbc-a8b8-4333-b876-6a8989bd39a8}" x="-101" y="-155" width="12" height="12" type="standard_box"/> - <box-item uuid="{6adacb3c-f905-4110-b2f4-5678e79045c8}" comment="" model-uuid="{4be71375-9f2b-4969-8297-a372bd867e46}" x="-17" y="-92" width="100" height="50" type="standard_box"/> - <box-item uuid="{d183a566-440e-4bb1-9ded-f2fce000e1ad}" comment="" model-uuid="{b82d2d24-ea6e-4906-bd74-297581d62f80}" x="-30" y="17" width="100" height="50" type="standard_box"/> - <box-item uuid="{256692ff-e132-469e-b851-172bc5af6d45}" comment="" model-uuid="{6a0133cf-da7b-4cc9-b3ff-62f2cd91c465}" x="-36" y="-25" width="10" height="10" type="standard_box"/> - <box-item uuid="{6416ecf3-05e1-4b1b-a158-73aa8aff51ab}" comment="" model-uuid="{d234a64c-ccaf-46f1-b503-57bc41545736}" x="-50" y="10" width="10" height="10" type="standard_box"/> - <box-item uuid="{e4f5b529-1f67-4a8e-b0fd-a2e8bc841260}" comment="" model-uuid="{46181900-d84e-4e6d-bd70-163d21e078de}" x="158" y="70" width="100" height="50" type="standard_box"/> - <box-item uuid="{c143ad05-c16e-45d9-bcd5-f0800709c4ef}" comment="" model-uuid="{e246b859-411f-44f1-9379-7644a45f8e5e}" x="98" y="175" width="138" height="50" type="standard_box"/> - <box-item uuid="{3bd33be7-c87a-45ba-9638-5824b17d4d9a}" comment="" model-uuid="{29284871-2b93-4b36-bc0d-fcbd45ae13d7}" x="-69" y="2" width="10" height="10" type="standard_box"/> - <data-storage-item uuid="{296a6da9-246b-42bb-8c2b-b7811c0a1afb}" description="" comment="" model-uuid="{d17fc55d-5cd5-44e0-acd4-e860812558a8}" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" x="145" y="-283" width="70" height="30"/> - <data-storage-item uuid="{d8551924-0afe-4cf4-a751-70ad49feaa31}" description="" comment="" model-uuid="{29effb5d-a357-45fc-aa57-0493538a1876}" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" x="110" y="-152" width="56" height="30"/> - <data-storage-item uuid="{f8d6b2ac-d24d-448f-ad16-fd0950e10909}" description="" comment="" model-uuid="{5d501bfc-b273-4651-a899-a80c26d690f5}" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" x="-156" y="-265" width="78" height="30"/> - <data-storage-item uuid="{84cc6290-0b4a-411c-a084-4fafe86b0aa0}" description="" comment="" model-uuid="{ff44b7d2-7083-4b08-be00-b2263233c50b}" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" x="145" y="-251" width="68" height="30"/> - <data-storage-item uuid="{27eeff9b-6848-4a2b-bd62-3453e5765c11}" description="" comment="" model-uuid="{5d501bfc-b273-4651-a899-a80c26d690f5}" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" x="-37" y="87" width="78" height="30"/> - <data-storage-item uuid="{27851195-e773-4ee7-be19-35b1b5215e9b}" description="" comment="" model-uuid="{5d501bfc-b273-4651-a899-a80c26d690f5}" region-uuid="{ca9cafdc-6e79-47c0-ae96-6605af2f1651}" x="-127.5" y="-55" width="79" height="34"/> - <data-storage-item uuid="{cad4d7c2-9553-4e44-99ce-9972e2a8fdc7}" description="" comment="" model-uuid="{31a8442a-eede-41c6-9fd7-c3b224e822b9}" region-uuid="{ca9cafdc-6e79-47c0-ae96-6605af2f1651}" x="-211.5" y="-96.5" width="49" height="31"/> - <connection-item uuid="{c2c62f62-c74c-4f2f-be52-6b9694883b95}" comment="" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" item0-uuid="{296a6da9-246b-42bb-8c2b-b7811c0a1afb}" item1-uuid="{b71a9fb1-f2fe-4048-acc5-e07aba99021f}" start-anchor-pos-x="-35" start-anchor-pos-y="-1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="71" y="-282"/> - </connection-item> - <transition-item uuid="{11f4ba30-f221-47e4-9d20-85590c63ac1c}" comment="" model-uuid="{336dc6fd-cddf-4b81-9003-e691bb834545}" start-anchor-pos-x="-3" start-anchor-pos-y="13" end-anchor-pos-x="2" end-anchor-pos-y="-25"> - <control-point x="-87" y="-337"/> - </transition-item> - <transition-item uuid="{f4e1bce3-c86c-46be-9e73-579e2a07abbb}" comment="" model-uuid="{0e5be7ba-dbea-4024-9b61-b37f98863e94}" start-anchor-pos-x="0" start-anchor-pos-y="25" end-anchor-pos-x="-2" end-anchor-pos-y="-25"> - <control-point x="-38" y="-206"/> - </transition-item> - <transition-item uuid="{c9a631b0-2927-49a9-a71c-3955e7823abb}" comment="" model-uuid="{1bd36c61-97fe-4fa7-991a-eb0018ca1a58}" start-anchor-pos-x="1" start-anchor-pos-y="24" end-anchor-pos-x="-51" end-anchor-pos-y="-25"> - <control-point x="8" y="-98"/> - </transition-item> - <connection-item uuid="{f834c2c6-1a27-4673-99bd-3964db015878}" comment="" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" item0-uuid="{d8551924-0afe-4cf4-a751-70ad49feaa31}" item1-uuid="{2c013c59-6a0a-4f8f-88a7-cdf64c7ed5f1}" start-anchor-pos-x="2" start-anchor-pos-y="-15" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="108" y="-211"/> - </connection-item> - <connection-item uuid="{5a2bc0d0-da9c-4270-9388-138fb9eb8c0b}" comment="" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" item0-uuid="{d8551924-0afe-4cf4-a751-70ad49feaa31}" item1-uuid="{04b08d14-a6fe-47cc-8922-05b01529676d}" start-anchor-pos-x="-28" start-anchor-pos-y="-3" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="50" y="-154"/> - </connection-item> - <connection-item uuid="{23073d77-d992-4b1d-ae7b-6ddfced610f1}" comment="" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" item0-uuid="{d8551924-0afe-4cf4-a751-70ad49feaa31}" item1-uuid="{ab4e9828-c33a-44bf-9037-98a90f563046}" start-anchor-pos-x="3" start-anchor-pos-y="14" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="114" y="-110"/> - </connection-item> - <connection-item uuid="{c7d2eddd-ac73-4d2e-bf29-7d8c86864b31}" comment="" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" item0-uuid="{f8d6b2ac-d24d-448f-ad16-fd0950e10909}" item1-uuid="{742fc803-c34d-488b-9d77-53f742edbac7}" start-anchor-pos-x="38" start-anchor-pos-y="0" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-104" y="-265"/> - </connection-item> - <transition-item uuid="{67ac3923-2983-4d73-99e8-3863e7edd687}" comment="" model-uuid="{88886e4d-ff7c-4a71-962a-399c1e73a344}" start-anchor-pos-x="-61" start-anchor-pos-y="10" end-anchor-pos-x="-34" end-anchor-pos-y="-25"> - <control-point x="-158" y="-216"/> - </transition-item> - <transition-item uuid="{b3043ae4-4662-4078-88bf-89ae1332518c}" comment="" model-uuid="{7ae4b5d5-399f-48db-9c45-4ebe29db2791}" start-anchor-pos-x="-50" start-anchor-pos-y="-1" end-anchor-pos-x="24" end-anchor-pos-y="-25"> - <control-point x="-141" y="-99"/> - </transition-item> - <transition-item uuid="{5461b5b7-328d-425a-9651-fd1ecaa84e5a}" comment="" model-uuid="{7b09b8ce-aa02-42bb-b2cf-5121d27acfa0}" start-anchor-pos-x="-70" start-anchor-pos-y="-13" end-anchor-pos-x="50" end-anchor-pos-y="-12"> - <control-point x="-83" y="-64"/> - </transition-item> - <transition-item uuid="{57f325b1-49de-4f36-8a0f-b8b2e6da9bb8}" comment="" model-uuid="{dae2a507-d718-47de-98d2-633551104caa}" start-anchor-pos-x="-2" start-anchor-pos-y="25" end-anchor-pos-x="0" end-anchor-pos-y="-25"> - <control-point x="155" y="10"/> - </transition-item> - <transition-item uuid="{1390b6e1-1707-4aad-a4fb-e61dde723fc2}" comment="" model-uuid="{9e164ecc-7cb2-47b5-8d12-5f08f97d4be0}" start-anchor-pos-x="-3" start-anchor-pos-y="25" end-anchor-pos-x="-2" end-anchor-pos-y="-10"> - <control-point x="-142" y="151"/> - </transition-item> - <connection-item uuid="{0efe3bd3-561b-4834-a3d9-41b2445bcc8d}" comment="" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" item0-uuid="{27eeff9b-6848-4a2b-bd62-3453e5765c11}" item1-uuid="{9173e881-14a6-4a9b-a041-7a55a28fe6c5}" start-anchor-pos-x="-3" start-anchor-pos-y="-15" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-34" y="47"/> - </connection-item> - <transition-item uuid="{eb8d3c0e-f706-4328-bf1d-6d4747a583d5}" comment="" model-uuid="{62293f63-927d-4997-89ff-9a2db7d43919}" start-anchor-pos-x="-16" start-anchor-pos-y="1" end-anchor-pos-x="-10" end-anchor-pos-y="1"> - <control-point x="-237" y="-325"/> - <control-point x="-234" y="213"/> - </transition-item> - <connection-item uuid="{cc6efa95-140f-4651-afe5-8b22319ba69f}" comment="" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" item0-uuid="{84cc6290-0b4a-411c-a084-4fafe86b0aa0}" item1-uuid="{0c8b3386-6878-438c-a8cf-5503ffb92a9f}" start-anchor-pos-x="-34" start-anchor-pos-y="0" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="71" y="-254"/> - </connection-item> - <transition-item uuid="{be86546a-fc5d-449d-a507-c25ee9ae0866}" comment="" model-uuid="{c3108a29-9aa0-4bd7-acf0-7462b4308dc2}" start-anchor-pos-x="6" start-anchor-pos-y="1" end-anchor-pos-x="-5.5" end-anchor-pos-y="-25"> - <control-point x="-23" y="-119"/> - </transition-item> - <transition-item uuid="{a089eb06-2a6f-405e-8dfe-d5d4728021be}" comment="" model-uuid="{eb1ff1fd-cebc-4c7d-a432-9b3d291d1b8b}" start-anchor-pos-x="-1" start-anchor-pos-y="25" end-anchor-pos-x="-8" end-anchor-pos-y="-25"> - <control-point x="-2" y="147"/> - </transition-item> - <comment-item uuid="{8ae5fee2-46a3-43df-91f8-42836be87e01}" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" comment="set bits for com port" x="107.5" y="-376" width="109" height="48"/> - <comment-item uuid="{37be8df1-35b0-4910-97db-6a768dee0675}" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" comment="set bits for configuration" x="194" y="-202" width="112" height="50"/> - <transition-item uuid="{6ae13a23-ff2b-41b2-8134-483030bcb971}" comment="" model-uuid="{c61fab92-2681-4456-83b6-8d26976213f7}" start-anchor-pos-x="-70" start-anchor-pos-y="-5" end-anchor-pos-x="50" end-anchor-pos-y="0"> - <control-point x="-82" y="-47.5"/> - </transition-item> - <transition-item uuid="{5a3767e4-dc06-4f4e-ad48-a090c7c6130c}" comment="" model-uuid="{d2ef8217-8fa4-46cd-ac0a-2eca3e8dc68f}" start-anchor-pos-x="-70" start-anchor-pos-y="6" end-anchor-pos-x="50" end-anchor-pos-y="8"> - <control-point x="-82" y="-31.5"/> - </transition-item> - <transition-item uuid="{94f8109b-410d-4b02-b306-153d5f928f3c}" comment="" model-uuid="{e342562e-4424-4f57-b27f-35ad7104e614}" start-anchor-pos-x="-70" start-anchor-pos-y="16" end-anchor-pos-x="50" end-anchor-pos-y="15"> - <control-point x="-81" y="-14.5"/> - </transition-item> - <transition-item uuid="{ec69f92c-c567-4de4-a908-e70824ec2787}" comment="" model-uuid="{5445b04f-8ba8-4ca7-98cf-e7bf1ab8bb9c}" start-anchor-pos-x="0" start-anchor-pos-y="25" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> - <control-point x="-3" y="44.5"/> - </transition-item> - <transition-item uuid="{db558476-391b-4899-a2a5-07dddcc4d923}" comment="" model-uuid="{8b97760f-f020-444b-be43-520a8d9cdafb}" start-anchor-pos-x="0" start-anchor-pos-y="6" end-anchor-pos-x="1" end-anchor-pos-y="-13"> - <control-point x="-144" y="-425"/> - </transition-item> - <connection-item uuid="{ee86cdd5-9788-4b9f-abde-5aa069471626}" comment="" region-uuid="{ca9cafdc-6e79-47c0-ae96-6605af2f1651}" item0-uuid="{27851195-e773-4ee7-be19-35b1b5215e9b}" item1-uuid="{fab28d99-aa24-4176-be76-0fc1667c64e5}" start-anchor-pos-x="39.5" start-anchor-pos-y="-1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-61.5" y="-51"/> - </connection-item> - <transition-item uuid="{ac5f9ba2-05eb-4f37-8d62-591f4bc34425}" comment="" model-uuid="{ecdec452-ad5c-4a84-abaa-d5e9840876d0}" start-anchor-pos-x="50" start-anchor-pos-y="-17" end-anchor-pos-x="50" end-anchor-pos-y="-4"> - <control-point x="99" y="-61"/> - </transition-item> - <transition-item uuid="{fcf965ae-e9de-4b4f-8e8f-62f41cbb94e4}" comment="" model-uuid="{2ca1d136-46ac-4ba8-8051-5831fd3e2b93}" start-anchor-pos-x="50" start-anchor-pos-y="8" end-anchor-pos-x="50" end-anchor-pos-y="16"> - <control-point x="96.5" y="-36"/> - </transition-item> - <transition-item uuid="{124757ca-cfd3-4fad-b075-7e6f13e7dffa}" comment="" model-uuid="{7d612ca7-8bc9-459a-b40e-3e6a36bc780d}" start-anchor-pos-x="-50" start-anchor-pos-y="13" end-anchor-pos-x="-41" end-anchor-pos-y="25"> - <control-point x="-112.5" y="20"/> - </transition-item> - <connection-item uuid="{cff84042-6d9d-4bc9-b0dd-5ffe812b9c7a}" comment="" region-uuid="{ca9cafdc-6e79-47c0-ae96-6605af2f1651}" item0-uuid="{27851195-e773-4ee7-be19-35b1b5215e9b}" item1-uuid="{973e7a66-3f85-4fb5-a942-9163b3a5b534}" start-anchor-pos-x="-22.5" start-anchor-pos-y="17" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-147.5" y="42"/> - </connection-item> - <transition-item uuid="{3378ba5e-b4e7-46d2-882f-8614579b3d1a}" comment="" model-uuid="{b3105135-b695-4ec8-a457-23f8fa1548eb}" start-anchor-pos-x="1" start-anchor-pos-y="-6" end-anchor-pos-x="1" end-anchor-pos-y="-25"> - <control-point x="-51" y="-151.5"/> - </transition-item> - <transition-item uuid="{3be4ece0-c1bb-47c2-ad8f-7f139e7ac85b}" comment="" model-uuid="{19bd2813-16b7-4ede-becb-5c28b15c885b}" start-anchor-pos-x="-3" start-anchor-pos-y="6" end-anchor-pos-x="-27" end-anchor-pos-y="-25"> - <control-point x="-78.5" y="-40.5"/> - </transition-item> - <transition-item uuid="{d23ac888-e0fd-4d7d-92c9-0ab2fe3c33b5}" comment="" model-uuid="{9f2f82d5-2174-437f-b67a-033f0ea48459}" start-anchor-pos-x="40" start-anchor-pos-y="-25" end-anchor-pos-x="50" end-anchor-pos-y="-2"> - <control-point x="43.5" y="-26"/> - </transition-item> - <transition-item uuid="{310be693-8aed-4635-a363-1965388818b8}" comment="" model-uuid="{31e1f3f7-564f-4f2e-b8da-2125138dd80a}" start-anchor-pos-x="21" start-anchor-pos-y="25" end-anchor-pos-x="22" end-anchor-pos-y="-25"> - <control-point x="-5" y="-49"/> - </transition-item> - <transition-item uuid="{4ccf8b37-71a8-486a-8b8b-21c7ab36b9b9}" comment="" model-uuid="{227ce94b-ecbf-459a-a1c9-112e801fbacb}" start-anchor-pos-x="32" start-anchor-pos-y="25" end-anchor-pos-x="11" end-anchor-pos-y="25"> - <control-point x="99.5" y="9"/> - </transition-item> - <connection-item uuid="{3bb4b029-6fa7-49ee-af21-9000d3454efb}" comment="" region-uuid="{ca9cafdc-6e79-47c0-ae96-6605af2f1651}" item0-uuid="{cad4d7c2-9553-4e44-99ce-9972e2a8fdc7}" item1-uuid="{256692ff-e132-469e-b851-172bc5af6d45}" start-anchor-pos-x="24.5" start-anchor-pos-y="-0.5" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-86.5" y="-98.5"/> - </connection-item> - <connection-item uuid="{9d940317-8e3f-4876-b0bb-4a2fc5e88ad1}" comment="" region-uuid="{ca9cafdc-6e79-47c0-ae96-6605af2f1651}" item0-uuid="{cad4d7c2-9553-4e44-99ce-9972e2a8fdc7}" item1-uuid="{6416ecf3-05e1-4b1b-a158-73aa8aff51ab}" start-anchor-pos-x="-13.5" start-anchor-pos-y="15.5" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-213" y="67"/> - </connection-item> - <connection-item uuid="{0431d42f-081f-419d-ad93-21cfb48a2ecd}" comment="" region-uuid="{7dbf6fcd-7823-467f-b49f-e71ed9467c9c}" item0-uuid="{27eeff9b-6848-4a2b-bd62-3453e5765c11}" item1-uuid="{3bd33be7-c87a-45ba-9638-5824b17d4d9a}" start-anchor-pos-x="-10" start-anchor-pos-y="15" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="-29.5" y="146.5"/> - </connection-item> - <transition-item uuid="{dae03096-57d6-4a73-bf99-b1216fb966e2}" comment="" model-uuid="{8205d56d-7810-4b85-b734-c9a90d55a5a5}" start-anchor-pos-x="-2" start-anchor-pos-y="25" end-anchor-pos-x="10" end-anchor-pos-y="0"> - <control-point x="83" y="281"/> - </transition-item> - <transition-item uuid="{4ed0d0f1-0a4a-4814-bb71-3616e13f8191}" comment="" model-uuid="{867e23f8-e348-42e0-bde6-874907633187}" start-anchor-pos-x="-4" start-anchor-pos-y="25" end-anchor-pos-x="-2" end-anchor-pos-y="-25"> - <control-point x="120" y="119.5"/> - </transition-item> - </diagram> - </diagrams> -</esmcontainer> diff --git a/examples/timing_test/esm/main.esm b/examples/timing_test/esm/main.esm deleted file mode 100644 index e436678e0471d7ca22f8037fc043377c4cc8d388..0000000000000000000000000000000000000000 --- a/examples/timing_test/esm/main.esm +++ /dev/null @@ -1,480 +0,0 @@ -<?xml version="1.0"?> -<esmcontainer uuid="{8a3144c1-2beb-4ddc-9123-b8538d71b91e}" name="main" cloned-from="main.esm" comment="" scene-width="0" scene-height="0"> - <data-storage-list> - <data-storage uuid="{eb12661c-b850-4a04-be4d-13f4fb20f550}" name="GX3" comment=""/> - <data-storage uuid="{f716c9f2-40e1-496a-9bd0-5928e3a6c171}" name="OEMStar" comment=""/> - <data-storage uuid="{d8d42307-b97d-48c7-8964-50df3cf5cef1}" name="athenaIoData" comment=""/> - <data-storage uuid="{8021db07-eedc-4007-92da-5f0eb4053269}" name="gravity" comment=""/> - <data-storage uuid="{21020257-a57a-4170-8fa1-e3b44eb58e44}" name="heliData" comment=""/> - <data-storage uuid="{445c1303-8ca2-4379-9716-882d52cb0b2f}" name="keyboard" comment=""/> - <data-storage uuid="{43eebfc1-3346-4d66-ab66-d47a07f8e301}" name="log" comment=""/> - <data-storage uuid="{0fb3fa7d-93bd-4027-aa9c-3ff5c4e81aa7}" name="mdlData" comment=""/> - <data-storage uuid="{9eab478c-aaff-4071-8ddc-74f996544b3a}" name="navsol" comment=""/> - <data-storage uuid="{049f0b9e-a542-4261-b9cb-5c4b9c9eb095}" name="pressureAlt" comment=""/> - <data-storage uuid="{20d2c2aa-8bb1-4146-a2d5-0403aefe0e1c}" name="setpoints" comment=""/> - <data-storage uuid="{3e957278-0179-4e8e-af3f-6db0d069180e}" name="smiTelem" comment=""/> - <data-storage uuid="{2287add3-45df-441d-b099-445a60526056}" name="sscDataIn" comment=""/> - <data-storage uuid="{e1c61c88-1372-4270-b7b4-ad19f890f65e}" name="sscDataOut" comment=""/> - <data-storage uuid="{05277af6-6a83-413e-8a5f-096bd3dc8643}" name="syncGX3" comment=""/> - <data-storage uuid="{7a6ef5a1-3994-4dd4-ab6e-a3132ca8cdb4}" name="wpList" comment=""/> - </data-storage-list> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <container-events> - <event uuid="{b049fe4c-67e5-4409-a073-2c5edfb5ffcc}" name="AltReady" comment=""/> - <event uuid="{5d0cef49-23ca-43da-a762-a1c4f130c4f7}" name="AltReqReady" comment=""/> - <event uuid="{562ec87b-f904-4a83-be1f-c30c9f8fb6d9}" name="BLOS" comment=""/> - <event uuid="{756eb583-7596-4d2b-b433-a361b52565cc}" name="GX3Ready" comment=""/> - <event uuid="{baa61f82-1e65-4066-a805-4e39234657a2}" name="GX3ReqReady" comment=""/> - <event uuid="{c5fd5844-31ba-4229-ab49-c33246d1fb39}" name="LOS" comment=""/> - <event uuid="{005ac23f-44b9-471a-a8f9-c9690ccb5f5c}" name="arrived" comment=""/> - <event uuid="{8d2f1013-1263-4a76-8289-a9cb5a22adeb}" name="athenaReady" comment=""/> - <event uuid="{8146c9d3-67d3-4c0c-a6d3-b4c359b0bdfb}" name="athenaReqReady" comment=""/> - <event uuid="{a4df5781-39b2-4640-ad2d-d29d64c47170}" name="autoRet" comment=""/> - <event uuid="{a36fdc60-a4f5-43e0-93cf-5bb3385e8353}" name="cameraOff" comment=""/> - <event uuid="{b568b56c-5537-44c9-8001-f72b46e1bdef}" name="cameraOn" comment=""/> - <event uuid="{a1273cd6-c64a-4019-9222-3b89def3da05}" name="clearWpList" comment=""/> - <event uuid="{ada12e3a-354a-47b8-97d2-4063d18d3223}" name="devicesDone" comment=""/> - <event uuid="{7243f290-9ed7-4721-b6f9-c77a1934ac71}" name="gpsReady" comment=""/> - <event uuid="{c2f60713-c351-4376-afa8-2e7119abc268}" name="gpsReqReady" comment=""/> - <event uuid="{e3b14d06-43c0-4460-a9b1-6021cfc1a405}" name="gsHeliBrake" comment=""/> - <event uuid="{1243a496-6ba5-4fd9-a241-4efb34cf90ee}" name="gsHeliEscape" comment=""/> - <event uuid="{5c7536a9-3496-4b8c-9fa7-b18a794b69e1}" name="gsHeliHover" comment=""/> - <event uuid="{6d9e8632-16f4-4967-b684-1b21e1118dcc}" name="heliAuto" comment=""/> - <event uuid="{79781e36-9046-4920-9379-0b35023f05f0}" name="heliBrake" comment=""/> - <event uuid="{2fceae0d-c9e6-4805-8517-ca2557933599}" name="heliClimb" comment=""/> - <event uuid="{3962e2ea-88b4-4586-a0dc-727842e54548}" name="heliControl" comment=""/> - <event uuid="{ef1faf81-7569-47c2-b1cc-7e8af301e90f}" name="heliControlOff" comment=""/> - <event uuid="{bc165078-00d0-4929-9fc8-9ac082d84c7d}" name="heliControlTest" comment=""/> - <event uuid="{4b5f8aed-dc55-4f48-aa38-02a3d8cba8c5}" name="heliCruise" comment=""/> - <event uuid="{ced13c30-9036-4c9c-8d9e-11d2c92d6ef9}" name="heliDataAlloc" comment=""/> - <event uuid="{17149693-b42c-4ad5-963a-8bcdd07dad5c}" name="heliDataCopied" comment=""/> - <event uuid="{00b51cbc-0f95-4deb-a098-df8f1e9060a1}" name="heliDataReady" comment=""/> - <event uuid="{b90fdd2a-b7af-4acb-9245-d5254cdc62bc}" name="heliEscape" comment=""/> - <event uuid="{b96707d8-17e7-4662-bdf0-c135e8c91ebf}" name="heliGovern" comment=""/> - <event uuid="{51dab2f9-cff5-4845-aa22-24d72d3e5671}" name="heliGroundTest" comment=""/> - <event uuid="{646e3816-d074-4b1f-bada-e1e5348d66e3}" name="heliHover" comment=""/> - <event uuid="{9e52859c-e18d-48e1-b970-91c6d5c7cc02}" name="heliManual" comment=""/> - <event uuid="{97f09158-2986-4b00-a48f-3d0e4d3a6d29}" name="heliProcessUp" comment=""/> - <event uuid="{e40ba982-e4a3-4b5d-a427-7de043af9f61}" name="heliReqFlightMode" comment=""/> - <event uuid="{71c349a6-4f62-454a-8f92-21e7fb8d8656}" name="heliSimulate" comment=""/> - <event uuid="{5d2c638d-9c16-46ef-9172-e72c0696e8d6}" name="heliTerminate" comment=""/> - <event uuid="{6623e095-502a-43d5-886e-be7dc29a7307}" name="heliYaw" comment=""/> - <event uuid="{7fb0710f-bb14-475b-b7c5-52d87fc67d88}" name="init" comment=""/> - <event uuid="{b53351bd-b092-453a-86da-3b4f8c6ab670}" name="ioPortsAllocated" comment=""/> - <event uuid="{f86e725e-7b21-43c8-b46f-daa895690204}" name="ioReqPortsAllocated" comment=""/> - <event uuid="{e7d44a63-7781-431e-a173-07d3774baa78}" name="keyboardQuit" comment=""/> - <event uuid="{eea5f61c-1be0-4f4f-ab2c-53ff0bb7eede}" name="landing" comment=""/> - <event uuid="{b36a8ba2-165c-453f-b0b8-726e45e97858}" name="logProcessUp" comment=""/> - <event uuid="{d8362e10-e52d-4da4-b166-c4af12a70a3f}" name="logReady" comment=""/> - <event uuid="{ea206f3c-573f-4531-97d6-0b281855aa4c}" name="logReqReady" comment=""/> - <event uuid="{5f05a9c5-b2f1-4761-a8e1-9380d60ef596}" name="loggingStopped" comment=""/> - <event uuid="{da8dbd8b-daad-49ce-8241-9374bab8835e}" name="masterDone" comment=""/> - <event uuid="{5c0ef8f5-5a3a-4a4c-a331-0e1281763fae}" name="navfilterReady" comment=""/> - <event uuid="{443b707a-0c4d-45c1-8b13-2ace81df9261}" name="navfilterReqReady" comment=""/> - <event uuid="{dff4a758-bc34-4815-9487-5b6fb52d08f5}" name="navigationDone" comment=""/> - <event uuid="{274c6302-d068-4229-a107-c2cdb4f3f72f}" name="process2Up" comment=""/> - <event uuid="{d197950c-58aa-4834-917e-f50c211b4ce9}" name="reqHeliData" comment=""/> - <event uuid="{797ed2ea-9b0f-4a32-9cd1-66b36d78aad3}" name="reqProcessUp" comment=""/> - <event uuid="{6e395630-9d01-4e9e-91a0-ffa4c826fcb3}" name="reqStableHover" comment=""/> - <event uuid="{f7b0838c-8287-48b8-8609-cd423c538920}" name="restartProcess2" comment=""/> - <event uuid="{7cca4fae-247f-45fe-85d2-06aca943329e}" name="sbgReady" comment=""/> - <event uuid="{a6c48dd0-c2a9-4f59-8da9-8c0110f13e2a}" name="sbgReqReady" comment=""/> - <event uuid="{6b7451a5-c43b-47e9-b2e1-9d0ca25b7b37}" name="servicesDone" comment=""/> - <event uuid="{1b64b4ac-930b-4b5a-bf57-4278c67cdfa4}" name="shutter" comment=""/> - <event uuid="{0e96c056-af2c-4a80-8c17-21a1dff91360}" name="smiEventQueueOverflow" comment=""/> - <event uuid="{5a3e1c67-f4ab-459c-9b63-5928f219df32}" name="smiReady" comment=""/> - <event uuid="{3026c347-bc60-45cb-8944-ce10b2d20a26}" name="smiReqReady" comment=""/> - <event uuid="{5dd04753-0a51-4507-b4f5-4acba563bab6}" name="spInvalid" comment=""/> - <event uuid="{bcdbabfa-f511-484f-9d44-9137b78bda7d}" name="sscCmdS0" comment=""/> - <event uuid="{d16a546e-e625-4140-9a8e-ab93c01ce71f}" name="sscCmdS1" comment=""/> - <event uuid="{10615253-cb4a-4b16-9854-683a6382a903}" name="sscCmdS2" comment=""/> - <event uuid="{91924f25-ce60-4f19-9644-f886f9aa1cde}" name="sscCmdS3" comment=""/> - <event uuid="{46e849d6-bc38-495d-a5fe-e84f5fc040f9}" name="sscReady" comment=""/> - <event uuid="{671ec96b-b1e0-47dd-86fa-52032c68750d}" name="sscReqReady" comment=""/> - <event uuid="{82d281f5-e20b-4d95-9966-b4f0beedf870}" name="sscReqS0" comment=""/> - <event uuid="{7176927e-49f1-4e83-9bdb-2ec5d440604e}" name="sscReqS1" comment=""/> - <event uuid="{72ff0758-d320-434e-bff1-9e1118e4bc36}" name="sscReqS2" comment=""/> - <event uuid="{2f0f0c7b-8d6b-4180-8975-867ed3bfede7}" name="sscReqS3" comment=""/> - <event uuid="{db1a5c42-8e12-420d-ad0d-8ff39d1eec32}" name="stableHover" comment=""/> - <event uuid="{124b548e-6fe9-44b0-9c14-2598ffc6db1b}" name="telemFcReady" comment=""/> - <event uuid="{16816fd9-37f7-4c19-8ae1-178ee2ceaa72}" name="toggleCameraMode" comment=""/> - <event uuid="{06349ea2-e127-4221-b2cf-f46e81d7f792}" name="userDone" comment=""/> - <event uuid="{54f0c958-ea94-42c2-b9c1-3edb651b6a7d}" name="visionDone" comment=""/> - <event uuid="{5b052fdc-166c-410c-bd6e-efd7c3b7f62f}" name="wpListCleared" comment=""/> - <event uuid="{975c050a-31b7-4302-a7ac-049e042ab1b6}" name="wpListReceived" comment=""/> - </container-events> - <input-events> - <event-ref uuid="{7fb0710f-bb14-475b-b7c5-52d87fc67d88}" name="init"/> - </input-events> - <output-events> - </output-events> - <global-events> - <event uuid="{1964cda7-523c-491d-a369-a1bb6771e67e}" name="PULSEEVENT" type="pulseevent" comment=""/> - </global-events> - <regions> - <region uuid="{498f0512-443f-4782-b6b6-bebaf1c6218d}" name="Region0" comment="" number="0"> - <states> - <initial-state uuid="{72845cb1-346d-49a1-b51d-25ef2fffbd56}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{183c1d5d-b329-4069-b4bb-258c6c7ffbe4}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <super-state uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" cloned-from-uuid="{e5bc9969-b9a4-43e3-8360-cdcf4f2f05e7}" name="smi" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="smi.esm" path-string=""> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - <flag uuid="{3fc1440f-ffe9-432c-8f8a-42d14daa7c5d}" name="quit" comment="" type="user_defined"/> - <flag uuid="{593f4773-2f54-4e98-941c-65b6243066b9}" name="shutdown" comment="" type="user_defined"/> - </input-flags> - <system-flags> - <flag uuid="{541bc951-1424-4b2f-a1bd-436a43d3042a}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{517dd798-af06-4e08-960d-f271b8037909}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - </output-flags> - <input-events> - <event-ref uuid="{7fb0710f-bb14-475b-b7c5-52d87fc67d88}" name="init"/> - <event-ref uuid="{3026c347-bc60-45cb-8944-ce10b2d20a26}" name="smiReqReady"/> - </input-events> - <output-events> - <event-ref uuid="{0e96c056-af2c-4a80-8c17-21a1dff91360}" name="smiEventQueueOverflow"/> - <event-ref uuid="{5a3e1c67-f4ab-459c-9b63-5928f219df32}" name="smiReady"/> - </output-events> - </super-state> - <final-state uuid="{81010855-4fc4-4847-b3a8-8a0a3744ae6e}" name="[exit]" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> - </states> - <transitions> - <transition uuid="{80c971bb-ba50-4d90-929a-801a2cf1ca2f}" comment="" from-state-uuid="{72845cb1-346d-49a1-b51d-25ef2fffbd56}" to-state-uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" event-uuid="{7fb0710f-bb14-475b-b7c5-52d87fc67d88}"> - <actions> - <send-event-action uuid="{0ac1d6fa-aac3-4b28-aedf-329f16f13f30}" name="" comment="" event-uuid="{7fb0710f-bb14-475b-b7c5-52d87fc67d88}"/> - </actions> - </transition> - <transition uuid="{ac2e98b1-9ae9-4a99-a302-80b49320194f}" comment="" from-state-uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" to-state-uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" event-uuid="{6b7451a5-c43b-47e9-b2e1-9d0ca25b7b37}"> - <actions> - <set-flag-action uuid="{e86cc868-b919-4d63-9985-59fbcee11eb1}" name="set flag quit" comment="" flag-uuid="{3fc1440f-ffe9-432c-8f8a-42d14daa7c5d}" flag-value="0"/> - </actions> -<guard operator="negation" flag-uuid="{517dd798-af06-4e08-960d-f271b8037909}"/> - </transition> - <transition uuid="{d3099ec9-f6fa-4701-9446-be720af96064}" comment="" from-state-uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" to-state-uuid="{81010855-4fc4-4847-b3a8-8a0a3744ae6e}" event-uuid="{1964cda7-523c-491d-a369-a1bb6771e67e}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{517dd798-af06-4e08-960d-f271b8037909}"/> - </transition> - </transitions> - </region> - <region uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" name="Region2" comment="" number="1"> - <states> - <super-state uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" cloned-from-uuid="{f0bf40cc-7827-4b3b-b794-04db2bebc805}" name="services" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="services.esm" path-string=""> - <input-ports> - <port uuid="{f9228566-ce46-4432-820f-9fa5aab28ea6}" name="smiTelemIn" comment="" data-storage-uuid="{3e957278-0179-4e8e-af3f-6db0d069180e}" optional="1" allocation="0" release="0" read="1" write="0"/> - </input-ports> - <output-ports> - <port uuid="{207788b9-c047-4ab0-8f2f-beb0ceea23cb}" name="log" comment="" data-storage-uuid="{43eebfc1-3346-4d66-ab66-d47a07f8e301}" optional="1" allocation="1" release="0" read="0" write="1"/> - <port uuid="{756e3de0-f0fa-4179-a0ec-6baa8099bcac}" name="keyboard" comment="" data-storage-uuid="{445c1303-8ca2-4379-9716-882d52cb0b2f}" optional="0" allocation="1" release="0" read="0" write="1"/> - <port uuid="{f00752a6-81ae-487b-bde2-3c8d4a9cf3d4}" name="smiTelem" comment="" data-storage-uuid="{3e957278-0179-4e8e-af3f-6db0d069180e}" optional="1" allocation="1" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{9c9ee8be-bf25-4c3a-a6ac-00ebb8aa5ffc}" name="quit" comment="" type="user_defined"/> - <flag uuid="{dca8be80-e136-4243-a404-72702a97fd11}" name="stopLogging" comment="" type="user_defined"/> - <flag uuid="{b3970b06-64ea-40e9-81e1-fb26fba3fb9f}" name="flashLogging" comment="" type="user_defined"/> - <flag uuid="{a10e54a4-79a2-4e38-830e-d465026401fe}" name="readSmiLogging" comment="" type="user_defined"/> - <flag uuid="{1dfdc4db-49e0-4c96-b04c-daaa3eaffde2}" name="fsLogging" comment="" type="user_defined"/> - </input-flags> - <system-flags> - <flag uuid="{49906817-a443-4cf4-8169-6460457e196f}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{10aff027-4524-459b-a519-0c782a465dbd}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - <flag uuid="{637be3ae-3df9-43e5-b356-edccccbf2c27}" name="servicesDone" comment="" type="user_defined"/> - </output-flags> - <input-events> - <event-ref uuid="{f86e725e-7b21-43c8-b46f-daa895690204}" name="ioReqPortsAllocated"/> - </input-events> - <output-events> - <event-ref uuid="{e7d44a63-7781-431e-a173-07d3774baa78}" name="keyboardQuit"/> - <event-ref uuid="{b53351bd-b092-453a-86da-3b4f8c6ab670}" name="ioPortsAllocated"/> - <event-ref uuid="{6b7451a5-c43b-47e9-b2e1-9d0ca25b7b37}" name="servicesDone"/> - <event-ref uuid="{5f05a9c5-b2f1-4761-a8e1-9380d60ef596}" name="loggingStopped"/> - <event-ref uuid="{d8362e10-e52d-4da4-b166-c4af12a70a3f}" name="logReady"/> - <event-ref uuid="{b36a8ba2-165c-453f-b0b8-726e45e97858}" name="logProcessUp"/> - </output-events> - </super-state> - <initial-state uuid="{fc20be2e-4642-4952-a5be-c4efd33baf3c}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{3a389add-c9f1-421a-badb-8f48df54fb45}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <basic-state uuid="{074a2dc8-ca87-4ad0-9716-e2b763d7a02f}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{70ec0f40-892f-48ae-b492-c90a7ae71ca4}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - </states> - <transitions> - <transition uuid="{0835c4a6-6e9f-45ea-8b90-80136627c9bb}" comment="" from-state-uuid="{fc20be2e-4642-4952-a5be-c4efd33baf3c}" to-state-uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" event-uuid="{5a3e1c67-f4ab-459c-9b63-5928f219df32}"> - <actions> - </actions> - </transition> - <transition uuid="{29bdc9c8-df14-4233-9469-5121b335e9e8}" comment="" from-state-uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" to-state-uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" event-uuid="{06349ea2-e127-4221-b2cf-f46e81d7f792}"> - <actions> - <set-flag-action uuid="{5249fd6d-932f-480d-9a8f-b41235e9e8ab}" name="set flag quit" comment="" flag-uuid="{9c9ee8be-bf25-4c3a-a6ac-00ebb8aa5ffc}" flag-value="0"/> - </actions> -<guard operator="negation" flag-uuid="{10aff027-4524-459b-a519-0c782a465dbd}"/> - </transition> - <transition uuid="{646c5edc-3d7c-442b-8dfd-4447444e54ac}" comment="" from-state-uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" to-state-uuid="{074a2dc8-ca87-4ad0-9716-e2b763d7a02f}" event-uuid="{1964cda7-523c-491d-a369-a1bb6771e67e}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{10aff027-4524-459b-a519-0c782a465dbd}"/> - </transition> - </transitions> - </region> - <region uuid="{1583b4e5-b6fb-4665-a556-b884e8a25d5e}" name="" comment="" number="2"> - <states> - <initial-state uuid="{5c01dd72-0d66-4b33-b64e-514a1067f1aa}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{289a0ef7-6501-40b5-9780-22f7b82d8c21}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <super-state uuid="{b80ce6aa-1794-4fcb-96a7-f4d120ae29c5}" cloned-from-uuid="{094e29da-720b-48bf-85c1-5fcd2db868fd}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="user.esm" path-string=""> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{071dc6e6-b881-4ec6-9f7f-bc6502b902aa}" name="log" comment="" data-storage-uuid="{43eebfc1-3346-4d66-ab66-d47a07f8e301}" optional="1" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{19113e7a-6c06-40b7-84ae-62303bc4873f}" name="com" comment="" type="user_defined"/> - </input-flags> - <system-flags> - <flag uuid="{e231bdb4-81ce-462b-b584-b485480a752e}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{d8c15299-b551-41c3-a2e7-af0138b54809}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - </output-flags> - <input-events> - <event-ref uuid="{b53351bd-b092-453a-86da-3b4f8c6ab670}" name="ioPortsAllocated"/> - <event-ref uuid="{e7d44a63-7781-431e-a173-07d3774baa78}" name="keyboardQuit"/> - <event-ref uuid="{b36a8ba2-165c-453f-b0b8-726e45e97858}" name="logProcessUp"/> - </input-events> - <output-events> - <event-ref uuid="{f86e725e-7b21-43c8-b46f-daa895690204}" name="ioReqPortsAllocated"/> - </output-events> - </super-state> - <basic-state uuid="{3f0ce185-a8cb-4018-846e-c194523cb8fc}" name="done" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{a4a6be03-0133-4e7c-b5f4-c808f9b5c49a}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - </states> - <transitions> - <transition uuid="{1693ce62-9b02-4bd7-9890-730d59058826}" comment="" from-state-uuid="{5c01dd72-0d66-4b33-b64e-514a1067f1aa}" to-state-uuid="{b80ce6aa-1794-4fcb-96a7-f4d120ae29c5}" event-uuid="{5a3e1c67-f4ab-459c-9b63-5928f219df32}"> - <actions> - <set-flag-action uuid="{ca9d7772-fc81-4a16-8e39-8df87651fe25}" name="" comment="" flag-uuid="{19113e7a-6c06-40b7-84ae-62303bc4873f}" flag-value="0"/> - </actions> - </transition> - <transition uuid="{2b81b706-fc89-4e5c-a26e-c9c7183868ca}" comment="" from-state-uuid="{b80ce6aa-1794-4fcb-96a7-f4d120ae29c5}" to-state-uuid="{3f0ce185-a8cb-4018-846e-c194523cb8fc}" event-uuid="{1964cda7-523c-491d-a369-a1bb6771e67e}"> - <actions> - <send-event-action uuid="{65af22c2-f739-4e8a-9f48-6dd37059a22a}" name="" comment="" event-uuid="{06349ea2-e127-4221-b2cf-f46e81d7f792}"/> - </actions> -<guard operator="none" flag-uuid="{d8c15299-b551-41c3-a2e7-af0138b54809}"/> - </transition> - </transitions> - </region> - <region uuid="{816c1665-27d9-406a-8128-238d5e763e88}" name="" comment="" number="3"> - <states> - <initial-state uuid="{2cc88546-78e9-4fae-b95b-a5721e3179bc}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{e920c827-5604-4611-8779-f2e9f8875341}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <task-state uuid="{e2498860-917e-44ba-8631-b65cc2f9af7e}" name="rtSuspend2" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" task-function="rtSuspend2" task-slot-name="suspend2Slot" process-name="" real-time="1"> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <system-flags> - <flag uuid="{f493d2d5-3687-403f-952f-25ea3413b714}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{821c84ad-e896-4836-8bfe-75b32b2ba781}" name="Exit" comment="" type="exit"/> - <flag uuid="{302ac8b0-e0a1-45a0-b0ad-86e13029dff1}" name="Busy" comment="" type="busy"/> - </system-flags> - </task-state> - </states> - <transitions> - <transition uuid="{5fd09c1e-0cb8-4a3d-bba4-93e409848c5d}" comment="" from-state-uuid="{2cc88546-78e9-4fae-b95b-a5721e3179bc}" to-state-uuid="{e2498860-917e-44ba-8631-b65cc2f9af7e}" event-uuid="{5a3e1c67-f4ab-459c-9b63-5928f219df32}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{e920c827-5604-4611-8779-f2e9f8875341}"/> - </transition> - </transitions> - </region> - <region uuid="{0f945257-f4c0-4722-9c67-3e94fde513c5}" name="" comment="" number="4"> - <states> - <initial-state uuid="{c124eb25-4ed7-469e-aa45-d3e4ef3f20d5}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{943b7412-cc74-467f-bbf6-7961d92403c7}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <super-state uuid="{38b852af-726f-4487-b6f6-0df0be883d97}" cloned-from-uuid="" name="" comment="" timeout="10000" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="stress_test.esm" path-string=""> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <system-flags> - <flag uuid="{9917afed-506a-4597-9d4e-c28329be7f28}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{63f4bec8-b563-47f4-b839-69cd8af2894a}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - </output-flags> - <input-events> - </input-events> - <output-events> - </output-events> - </super-state> - <super-state uuid="{30e9f32f-8464-44fd-b11f-b0b44373504f}" cloned-from-uuid="" name="timing_test" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="timing_test.esm" path-string=""> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <system-flags> - <flag uuid="{e0911662-fabe-4e50-97ce-8e70625f509a}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{ea48356a-1646-4c6b-9e80-c6489ba59ed4}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - </output-flags> - <input-events> - </input-events> - <output-events> - </output-events> - </super-state> - <final-state uuid="{769ba3d6-7852-4e9f-a987-1080fcba2719}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> - <basic-state uuid="{51bedfb1-94ed-4950-b698-1de91815a5cf}" name="" comment="" timeout="3000" flash-logging="1" gui-logging="1" telemetry-logging="1"> <system-flags> - <flag uuid="{25d8ddfd-5281-4a23-a477-345437e5d368}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </basic-state> - </states> - <transitions> - <transition uuid="{4a17aab2-1533-4142-8ea4-2394f473eb12}" comment="" from-state-uuid="{c124eb25-4ed7-469e-aa45-d3e4ef3f20d5}" to-state-uuid="{30e9f32f-8464-44fd-b11f-b0b44373504f}" event-uuid="{5a3e1c67-f4ab-459c-9b63-5928f219df32}"> - <actions> - </actions> - </transition> - <transition uuid="{a4b02827-658f-4060-be96-c96d04898a81}" comment="" from-state-uuid="{38b852af-726f-4487-b6f6-0df0be883d97}" to-state-uuid="{769ba3d6-7852-4e9f-a987-1080fcba2719}" event-uuid="{e7d44a63-7781-431e-a173-07d3774baa78}"> - <actions> - </actions> - </transition> - <transition uuid="{c444c1f1-bd9c-455e-8a43-874c0eb615d6}" comment="" from-state-uuid="{51bedfb1-94ed-4950-b698-1de91815a5cf}" to-state-uuid="{38b852af-726f-4487-b6f6-0df0be883d97}" event-uuid="{1964cda7-523c-491d-a369-a1bb6771e67e}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{25d8ddfd-5281-4a23-a477-345437e5d368}"/> - </transition> - </transitions> - </region> - </regions> - <diagrams> - <diagram uuid="{71b4b459-9646-40fa-86c7-ec7cc273f11f}" name="" comment=""> - <box-item uuid="{45c39065-4b28-4aa0-bb22-b4fa7f63bab5}" comment="" model-uuid="{498f0512-443f-4782-b6b6-bebaf1c6218d}" x="2220" y="2430" width="360" height="300" type="standard_box"/> - <box-item uuid="{1b299f14-2b8a-4a50-8b0d-90d49f490008}" comment="" model-uuid="{72845cb1-346d-49a1-b51d-25ef2fffbd56}" x="-85" y="-119" width="10" height="10" type="standard_box"/> - <box-item uuid="{0b7e8645-e5df-4ecc-9f81-50144e9affba}" comment="" model-uuid="{92aa49dd-07cf-4a8b-913f-e12a36648111}" x="-8" y="-12" width="100" height="50" type="standard_box"/> - <box-item uuid="{ac3120fe-7009-424a-bcac-715eab357b4f}" comment="" model-uuid="{81010855-4fc4-4847-b3a8-8a0a3744ae6e}" x="89" y="103" width="20" height="20" type="standard_box"/> - <box-item uuid="{193ce618-6f36-4cc6-aa07-7324f44637f5}" comment="" model-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" x="2610" y="2430" width="360" height="300" type="standard_box"/> - <box-item uuid="{8e9672f7-6928-4f11-a26b-34a0de1e487f}" comment="" model-uuid="{31c8c9f7-994b-4e57-a051-78be576b4300}" x="-8" y="-5" width="100" height="50" type="standard_box"/> - <box-item uuid="{a4e17242-0af0-4560-8526-f42512b4485c}" comment="" model-uuid="{207788b9-c047-4ab0-8f2f-beb0ceea23cb}" x="50" y="-9" width="20" height="20" type="standard_box"/> - <box-item uuid="{23f14433-cd30-40a5-8580-6c7919bc154a}" comment="" model-uuid="{756e3de0-f0fa-4179-a0ec-6baa8099bcac}" x="50" y="9" width="20" height="20" type="standard_box"/> - <box-item uuid="{9f71a8f5-c514-4f1d-b564-b15a82359121}" comment="" model-uuid="{f00752a6-81ae-487b-bde2-3c8d4a9cf3d4}" x="25" y="-25" width="20" height="20" type="standard_box"/> - <box-item uuid="{4686de14-1a35-4662-b479-003c731253e3}" comment="" model-uuid="{fc20be2e-4642-4952-a5be-c4efd33baf3c}" x="-78" y="-111" width="10" height="10" type="standard_box"/> - <box-item uuid="{860493fb-cc16-4dd5-8aee-e928f98ee7f1}" comment="" model-uuid="" x="2235" y="2220" width="390" height="60" type="input_events_box"/> - <box-item uuid="{669ccb16-e28b-41d3-a4e6-e705b02c0d0d}" comment="" model-uuid="" x="2235" y="2640" width="390" height="60" type="output_events_box"/> - <box-item uuid="{5e656915-c2ab-41f9-b0be-c3cd5730473a}" comment="" model-uuid="" x="2640" y="2220" width="390" height="60" type="input_ports_box"/> - <box-item uuid="{3575136c-694f-4bbb-a679-2c49e358f671}" comment="" model-uuid="" x="2640" y="2640" width="390" height="60" type="output_ports_box"/> - <box-item uuid="{cb69c125-6dd3-4c43-8959-ec49aee005c2}" comment="" model-uuid="" x="3045" y="2220" width="390" height="60" type="input_flags_box"/> - <box-item uuid="{4e7b05cb-0e8d-469a-bb52-6237c0437e53}" comment="" model-uuid="" x="3060" y="2640" width="390" height="60" type="output_flags_box"/> - <box-item uuid="{0f06ea2a-2f64-424b-9b27-1f9186c34ba1}" comment="" model-uuid="" x="2970" y="2430" width="1950" height="570" type="container_box"/> - <box-item uuid="{ef08e87f-e0cf-4552-929f-b09a9eb0b750}" comment="" model-uuid="{1583b4e5-b6fb-4665-a556-b884e8a25d5e}" x="3000" y="2430" width="360" height="300" type="standard_box"/> - <box-item uuid="{06a2f696-16db-4883-9607-d78418d232d3}" comment="" model-uuid="{5c01dd72-0d66-4b33-b64e-514a1067f1aa}" x="-148" y="-130" width="12" height="12" type="standard_box"/> - <box-item uuid="{bcccaa72-b1b3-4007-b495-bf47f0c0a586}" comment="" model-uuid="{b80ce6aa-1794-4fcb-96a7-f4d120ae29c5}" x="-7" y="-2" width="100" height="50" type="standard_box"/> - <box-item uuid="{538ebb7a-3a4f-4334-b180-567397e905ab}" comment="" model-uuid="{074a2dc8-ca87-4ad0-9716-e2b763d7a02f}" x="101" y="114" width="50" height="34" type="standard_box"/> - <box-item uuid="{ba3c5d3e-e123-410c-a446-1a2b4e4f81b1}" comment="" model-uuid="{3f0ce185-a8cb-4018-846e-c194523cb8fc}" x="19.5" y="102" width="47" height="36" type="standard_box"/> - <box-item uuid="{052d38c0-b54c-44b6-9052-14a2ee49edf3}" comment="" model-uuid="{071dc6e6-b881-4ec6-9f7f-bc6502b902aa}" x="50" y="-3" width="10" height="10" type="standard_box"/> - <box-item uuid="{d6ad5843-86a2-47ff-b2b8-d9970b93f3d4}" comment="" model-uuid="{f9228566-ce46-4432-820f-9fa5aab28ea6}" x="36" y="-25" width="10" height="10" type="standard_box"/> - <box-item uuid="{81a47806-92d2-4aed-a92e-c763b0c8625a}" comment="" model-uuid="{816c1665-27d9-406a-8128-238d5e763e88}" x="3330" y="2430" width="240" height="300" type="standard_box"/> - <box-item uuid="{9e2c2b4f-e644-4f62-a26c-9d2a492750f7}" comment="" model-uuid="{2cc88546-78e9-4fae-b95b-a5721e3179bc}" x="-78" y="-113" width="12" height="12" type="standard_box"/> - <box-item uuid="{535a4d60-41a8-434b-862a-914d93fe2346}" comment="" model-uuid="{e2498860-917e-44ba-8631-b65cc2f9af7e}" x="-3.5" y="-2" width="119" height="50" type="standard_box"/> - <box-item uuid="{f87eaee7-f470-4ea0-bb66-db960d1af5ba}" comment="" model-uuid="{0f945257-f4c0-4722-9c67-3e94fde513c5}" x="3660" y="2430" width="360" height="300" type="standard_box"/> - <box-item uuid="{8754bb54-a0df-4cd7-b09f-d31e3841d1ac}" comment="" model-uuid="{c124eb25-4ed7-469e-aa45-d3e4ef3f20d5}" x="-142" y="-123" width="12" height="12" type="standard_box"/> - <box-item uuid="{1f683083-6acc-45fc-9f2c-c845c77d8ac3}" comment="" model-uuid="{38b852af-726f-4487-b6f6-0df0be883d97}" x="-69" y="-14" width="100" height="50" type="standard_box"/> - <box-item uuid="{83e722dc-e345-4457-9668-67c94dfcd2b6}" comment="" model-uuid="{30e9f32f-8464-44fd-b11f-b0b44373504f}" x="59" y="-21" width="100" height="50" type="standard_box"/> - <box-item uuid="{0e39c7ef-093b-434c-9c3f-0fffe9f21cfb}" comment="" model-uuid="{769ba3d6-7852-4e9f-a987-1080fcba2719}" x="-95" y="96" width="20" height="20" type="standard_box"/> - <box-item uuid="{5c30f3c1-109a-4368-888e-b4693bd41b10}" comment="" model-uuid="{51bedfb1-94ed-4950-b698-1de91815a5cf}" x="-13" y="-119" width="100" height="50" type="standard_box"/> - <data-storage-item uuid="{3de734ab-8175-4b14-86f6-157c52857329}" description="" comment="" model-uuid="{43eebfc1-3346-4d66-ab66-d47a07f8e301}" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" x="115" y="-5" width="32" height="30"/> - <data-storage-item uuid="{2c140dc3-71ea-4f6d-8bc3-7227612e144e}" description="" comment="" model-uuid="{445c1303-8ca2-4379-9716-882d52cb0b2f}" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" x="133" y="32" width="68" height="30"/> - <data-storage-item uuid="{aa239548-8529-467d-a92e-2d720635ecce}" description="" comment="" model-uuid="{3e957278-0179-4e8e-af3f-6db0d069180e}" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" x="132" y="-47" width="72" height="30"/> - <data-storage-item uuid="{d7fe598a-1244-4101-a3d6-ae39bc1059b5}" description="" comment="" model-uuid="{43eebfc1-3346-4d66-ab66-d47a07f8e301}" region-uuid="{1583b4e5-b6fb-4665-a556-b884e8a25d5e}" x="105.5" y="-7.5" width="49" height="37"/> - <transition-item uuid="{18132395-ccb3-4a35-a790-4086a1f571d5}" comment="" model-uuid="{80c971bb-ba50-4d90-929a-801a2cf1ca2f}" start-anchor-pos-x="4" start-anchor-pos-y="1" end-anchor-pos-x="1" end-anchor-pos-y="-25"> - <control-point x="-23" y="-96"/> - </transition-item> - <transition-item uuid="{1f728138-5e51-4b1c-bb39-2770796546c5}" comment="" model-uuid="{ac2e98b1-9ae9-4a99-a302-80b49320194f}" start-anchor-pos-x="-40" start-anchor-pos-y="24" end-anchor-pos-x="-5" end-anchor-pos-y="24"> - <control-point x="-29" y="47"/> - </transition-item> - <transition-item uuid="{b9fc9cba-280a-4253-8637-e984d92636ff}" comment="" model-uuid="{d3099ec9-f6fa-4701-9446-be720af96064}" start-anchor-pos-x="29" start-anchor-pos-y="24" end-anchor-pos-x="-10" end-anchor-pos-y="-1"> - <control-point x="37" y="75"/> - </transition-item> - <transition-item uuid="{83298df4-f007-4a5d-ba62-c8bcd0321400}" comment="" model-uuid="{0835c4a6-6e9f-45ea-8b90-80136627c9bb}" start-anchor-pos-x="4" start-anchor-pos-y="1" end-anchor-pos-x="-1" end-anchor-pos-y="-25"> - <control-point x="-29" y="-78"/> - </transition-item> - <transition-item uuid="{dae09095-303f-46e6-863f-5c1a25783c15}" comment="" model-uuid="{29bdc9c8-df14-4233-9469-5121b335e9e8}" start-anchor-pos-x="-43" start-anchor-pos-y="24" end-anchor-pos-x="-3" end-anchor-pos-y="24"> - <control-point x="-30" y="52"/> - </transition-item> - <transition-item uuid="{17cb19ec-98b9-4be6-84a1-c361e85edbd2}" comment="" model-uuid="{646c5edc-3d7c-442b-8dfd-4447444e54ac}" start-anchor-pos-x="21" start-anchor-pos-y="24" end-anchor-pos-x="-25" end-anchor-pos-y="2"> - <control-point x="27" y="87"/> - </transition-item> - <connection-item uuid="{133797a1-2d88-4158-88f4-20bbeb474ff6}" comment="" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" item0-uuid="{3de734ab-8175-4b14-86f6-157c52857329}" item1-uuid="{a4e17242-0af0-4560-8526-f42512b4485c}" start-anchor-pos-x="-16" start-anchor-pos-y="0" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="66" y="-15"/> - </connection-item> - <connection-item uuid="{ad0b28f7-d516-4e9a-9ea5-5899074cf97d}" comment="" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" item0-uuid="{2c140dc3-71ea-4f6d-8bc3-7227612e144e}" item1-uuid="{23f14433-cd30-40a5-8580-6c7919bc154a}" start-anchor-pos-x="-34" start-anchor-pos-y="1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="62" y="6"/> - </connection-item> - <connection-item uuid="{14a5b44e-2911-4d92-be5b-be030bce9353}" comment="" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" item0-uuid="{aa239548-8529-467d-a92e-2d720635ecce}" item1-uuid="{9f71a8f5-c514-4f1d-b564-b15a82359121}" start-anchor-pos-x="-36" start-anchor-pos-y="-1" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="64" y="-49"/> - </connection-item> - <transition-item uuid="{a137cef9-5be3-41ff-bdc4-b4da82065b24}" comment="" model-uuid="{1693ce62-9b02-4bd7-9890-730d59058826}" start-anchor-pos-x="0" start-anchor-pos-y="6" end-anchor-pos-x="1" end-anchor-pos-y="-25"> - <control-point x="-55" y="-97"/> - </transition-item> - <transition-item uuid="{1e3d9b42-ec4c-4cdb-9814-402b99d6a142}" comment="" model-uuid="{2b81b706-fc89-4e5c-a26e-c9c7183868ca}" start-anchor-pos-x="2" start-anchor-pos-y="25" end-anchor-pos-x="3.5" end-anchor-pos-y="-18"> - <control-point x="-5" y="56"/> - </transition-item> - <connection-item uuid="{f63b09ce-9715-4a66-b919-00ff6e59e23a}" comment="" region-uuid="{1583b4e5-b6fb-4665-a556-b884e8a25d5e}" item0-uuid="{d7fe598a-1244-4101-a3d6-ae39bc1059b5}" item1-uuid="{052d38c0-b54c-44b6-9052-14a2ee49edf3}" start-anchor-pos-x="-24.5" start-anchor-pos-y="5.5" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="61.5" y="-2.5"/> - </connection-item> - <connection-item uuid="{ee5851d2-c1ba-41ed-ba83-d052fdb24b1a}" comment="" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" item0-uuid="{aa239548-8529-467d-a92e-2d720635ecce}" item1-uuid="{d6ad5843-86a2-47ff-b2b8-d9970b93f3d4}" start-anchor-pos-x="-36" start-anchor-pos-y="6" end-anchor-pos-x="0" end-anchor-pos-y="0"> - <control-point x="62.5" y="-43"/> - </connection-item> - <comment-item uuid="{954a126e-9a63-4f21-9060-fe22a0bff581}" region-uuid="{1583b4e5-b6fb-4665-a556-b884e8a25d5e}" comment="input flags: com" x="68" y="-57" width="120" height="48"/> - <transition-item uuid="{0695e3b8-c142-4783-80c7-a1002357e172}" comment="" model-uuid="{5fd09c1e-0cb8-4a3d-bba4-93e409848c5d}" start-anchor-pos-x="1" start-anchor-pos-y="-6" end-anchor-pos-x="-14" end-anchor-pos-y="-25"> - <control-point x="-21.5" y="-78.5"/> - </transition-item> - <comment-item uuid="{0c530290-b3e5-424f-b13c-ef3015ccf8a5}" region-uuid="{1b29d244-e11e-47cc-9ad4-b4771774eec9}" comment="input flags: fsLogging" x="52" y="-113" width="100" height="50"/> - <transition-item uuid="{e87dce09-c7e7-44b1-a2d8-b27fd63b163d}" comment="" model-uuid="{4a17aab2-1533-4142-8ea4-2394f473eb12}" start-anchor-pos-x="1" start-anchor-pos-y="-6" end-anchor-pos-x="-6" end-anchor-pos-y="-25"> - <control-point x="-105.5" y="-82.5"/> - </transition-item> - <transition-item uuid="{8eec9f78-e5c6-4d31-9d0a-874873c51dba}" comment="" model-uuid="{a4b02827-658f-4060-be96-c96d04898a81}" start-anchor-pos-x="13" start-anchor-pos-y="25" end-anchor-pos-x="0" end-anchor-pos-y="-10"> - <control-point x="-71" y="32.5"/> - </transition-item> - <transition-item uuid="{8b6b07eb-9a55-471a-8c6e-2f05d0c00e6e}" comment="" model-uuid="{c444c1f1-bd9c-455e-8a43-874c0eb615d6}" start-anchor-pos-x="4" start-anchor-pos-y="25" end-anchor-pos-x="11" end-anchor-pos-y="-25"> - <control-point x="-33.5" y="-59.5"/> - </transition-item> - </diagram> - </diagrams> -</esmcontainer> diff --git a/examples/timing_test/esm/root.esm b/examples/timing_test/esm/root.esm deleted file mode 100644 index 41580fece4358dc191f506b42381c527daaf4f37..0000000000000000000000000000000000000000 --- a/examples/timing_test/esm/root.esm +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0"?> -<esmcontainer uuid="{56a0946f-52cd-4eda-9cc2-2de72f5ba4ea}" name="[root]" cloned-from="" comment="" scene-width="0" scene-height="0"> - <data-storage-list> - </data-storage-list> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <output-flags> - </output-flags> - <container-events> - <event uuid="{e0e193a1-3bb1-4d37-a7d4-84b48647b386}" name="init" comment=""/> - </container-events> - <input-events> - </input-events> - <output-events> - </output-events> - <global-events> - <event uuid="{25e13b65-b320-4c04-900e-4039500a6131}" name="PULSEEVENT" type="pulseevent" comment=""/> - </global-events> - <regions> - <region uuid="{5a5bb134-cbb1-4762-ad49-863b12fa74c5}" name="Region1" comment="" number="0"> - <states> - <super-state uuid="{04c6a0fc-664a-478c-987a-23dea513b6ec}" cloned-from-uuid="" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="main.esm" path-string=""> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - </input-flags> - <system-flags> - <flag uuid="{a65ea5a3-6fc5-42a7-98d0-4e613e785f05}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{0d7fc2f4-1dac-4bd8-bbb1-23049ffa028d}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - </output-flags> - <input-events> - <event-ref uuid="{e0e193a1-3bb1-4d37-a7d4-84b48647b386}" name="init"/> - </input-events> - <output-events> - </output-events> - </super-state> - <initial-state uuid="{be57db43-c692-45b9-921a-58fe486b7cff}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{48c73299-6a32-4f0e-8f57-1275ead07815}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - </states> - <transitions> - <transition uuid="{e2d74b12-ac8f-4e9a-af52-9ee6873af880}" comment="" from-state-uuid="{be57db43-c692-45b9-921a-58fe486b7cff}" to-state-uuid="{04c6a0fc-664a-478c-987a-23dea513b6ec}" event-uuid="{25e13b65-b320-4c04-900e-4039500a6131}"> - <actions> - <send-event-action uuid="{a456ac86-1ab0-4011-8e23-09bec5decebc}" name="" comment="" event-uuid="{e0e193a1-3bb1-4d37-a7d4-84b48647b386}"/> - </actions> - </transition> - </transitions> - </region> - </regions> - <diagrams> - <diagram uuid="{f95d8b29-0d85-4cf4-ab72-4c609c746df2}" name="" comment=""> - <box-item uuid="{cd126235-3b6a-4178-9b10-54255a04c17a}" comment="" model-uuid="{5a5bb134-cbb1-4762-ad49-863b12fa74c5}" x="2430" y="2520" width="240" height="240" type="standard_box"/> - <box-item uuid="{6cb270e0-ede8-4990-b946-1d210f1e8e5f}" comment="" model-uuid="{04c6a0fc-664a-478c-987a-23dea513b6ec}" x="7" y="32" width="100" height="50" type="standard_box"/> - <box-item uuid="{1576e698-ade7-4a53-b74f-1438810b5a55}" comment="" model-uuid="{be57db43-c692-45b9-921a-58fe486b7cff}" x="-78" y="-63" width="12" height="12" type="standard_box"/> - <transition-item uuid="{8e50e478-6e33-4837-9354-323ca1c51a60}" comment="" model-uuid="{e2d74b12-ac8f-4e9a-af52-9ee6873af880}" start-anchor-pos-x="1" start-anchor-pos-y="-6" end-anchor-pos-x="1" end-anchor-pos-y="-25"> - <control-point x="-19" y="-51"/> - </transition-item> - </diagram> - </diagrams> -</esmcontainer> diff --git a/examples/timing_test/esm/user.esm b/examples/timing_test/esm/user.esm deleted file mode 100644 index ece98f99650c80a85849842000260684bed7d6f9..0000000000000000000000000000000000000000 --- a/examples/timing_test/esm/user.esm +++ /dev/null @@ -1,115 +0,0 @@ -<?xml version="1.0"?> -<esmcontainer uuid="{6f5275b7-ab5b-42f4-bbf0-d11c70b20e12}" name="" cloned-from="user2.esm" comment="" scene-width="5000" scene-height="5000"> - <data-storage-list> - <data-storage uuid="{8178a858-ed66-4cb5-9df1-77487fd41a45}" name="log" comment=""/> - </data-storage-list> - <input-ports> - </input-ports> - <output-ports> - <port uuid="{07c99bbb-4acc-4b87-b18a-28552b4f5bcb}" name="log" comment="" data-storage-uuid="{8178a858-ed66-4cb5-9df1-77487fd41a45}" optional="1" allocation="0" release="0" read="0" write="1"/> - </output-ports> - <input-flags> - <flag uuid="{3021e313-e427-46f4-a660-050ba10a46dc}" name="com" comment="" type="user_defined"/> - </input-flags> - <output-flags> - </output-flags> - <container-events> - <event uuid="{a194cbce-e75d-4133-a0bc-668292d90192}" name="ioPortsAllocated" comment=""/> - <event uuid="{8a2c12d8-aeeb-4ba4-a6a9-480ccca5eae3}" name="ioReqPortsAllocated" comment=""/> - <event uuid="{3b4708f1-ae0b-4943-84e6-01fbb38417cd}" name="keyboardQuit" comment=""/> - <event uuid="{e7c2bcec-b56f-4d03-9b29-d48e639dae79}" name="logProcessUp" comment=""/> - </container-events> - <input-events> - <event-ref uuid="{a194cbce-e75d-4133-a0bc-668292d90192}" name="ioPortsAllocated"/> - <event-ref uuid="{3b4708f1-ae0b-4943-84e6-01fbb38417cd}" name="keyboardQuit"/> - <event-ref uuid="{e7c2bcec-b56f-4d03-9b29-d48e639dae79}" name="logProcessUp"/> - </input-events> - <output-events> - <event-ref uuid="{8a2c12d8-aeeb-4ba4-a6a9-480ccca5eae3}" name="ioReqPortsAllocated"/> - </output-events> - <global-events> - <event uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}" name="PULSEEVENT" type="pulseevent" comment=""/> - </global-events> - <regions> - <region uuid="{ed5307c8-bd79-4b03-a921-2896a3357331}" name="" comment="" number="0"> - <states> - <initial-state uuid="{9b2de3eb-af75-475f-b2b0-1a83234e0475}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"> - <system-flags> - <flag uuid="{9a5306cb-22a1-49c7-a137-9aa89329b144}" name="Timeout" comment="" type="timeout"/> - </system-flags> - </initial-state> - <final-state uuid="{90b54724-59bc-4758-9a90-5ded213449e3}" name="" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1"/> - <super-state uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" cloned-from-uuid="{a17224e6-3b32-4a27-9512-b852963656da}" name="com" comment="" timeout="0" flash-logging="1" gui-logging="1" telemetry-logging="1" container-filename="com.esm" path-string=""> - <input-ports> - </input-ports> - <output-ports> - </output-ports> - <input-flags> - <flag uuid="{a96e3c3d-721e-4868-8f1d-4cc860ed7eb7}" name="quit" comment="" type="user_defined"/> - </input-flags> - <system-flags> - <flag uuid="{0c6aa1ee-5a86-40d0-88ad-4705f28c2aa5}" name="Timeout" comment="" type="timeout"/> - <flag uuid="{b7822520-e050-46e6-a83c-b0d8100c955f}" name="Exit" comment="" type="exit"/> - </system-flags> - <output-flags> - </output-flags> - <input-events> - <event-ref uuid="{a194cbce-e75d-4133-a0bc-668292d90192}" name="ioPortsAllocated"/> - </input-events> - <output-events> - <event-ref uuid="{8a2c12d8-aeeb-4ba4-a6a9-480ccca5eae3}" name="ioReqPortsAllocated"/> - </output-events> - </super-state> - </states> - <transitions> - <transition uuid="{94ee704e-652f-48d0-ab92-1c580f808304}" comment="" from-state-uuid="{9b2de3eb-af75-475f-b2b0-1a83234e0475}" to-state-uuid="{90b54724-59bc-4758-9a90-5ded213449e3}" event-uuid="{3b4708f1-ae0b-4943-84e6-01fbb38417cd}"> - <actions> - </actions> -<guard operator="negation" flag-uuid="{3021e313-e427-46f4-a660-050ba10a46dc}"/> - </transition> - <transition uuid="{bcbd40b6-80f1-47af-9b8b-4c63d0fe73c7}" comment="" from-state-uuid="{9b2de3eb-af75-475f-b2b0-1a83234e0475}" to-state-uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" event-uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{3021e313-e427-46f4-a660-050ba10a46dc}"/> - </transition> - <transition uuid="{a5be98c2-cf19-4bf1-b06f-a12216f475fc}" comment="" from-state-uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" to-state-uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" event-uuid="{3b4708f1-ae0b-4943-84e6-01fbb38417cd}"> - <actions> - <set-flag-action uuid="{c07fec39-1748-4dbd-a9ce-6acdabeacbb7}" name="" comment="" flag-uuid="{a96e3c3d-721e-4868-8f1d-4cc860ed7eb7}" flag-value="0"/> - </actions> - </transition> - <transition uuid="{ebd5bf06-eb62-47d8-9db9-49c89d1e32bd}" comment="" from-state-uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" to-state-uuid="{90b54724-59bc-4758-9a90-5ded213449e3}" event-uuid="{9ff4e37e-774c-4fbd-9656-0115062328d9}"> - <actions> - </actions> -<guard operator="none" flag-uuid="{b7822520-e050-46e6-a83c-b0d8100c955f}"/> - </transition> - </transitions> - </region> - </regions> - <diagrams> - <diagram uuid="{0e659abb-c97b-4e91-9073-d1e905a1b607}" name="" comment=""> - <box-item uuid="{c0023907-a486-4f80-8fc1-b837a978d6f1}" comment="" model-uuid="" x="2295" y="2355" width="390" height="60" type="input_events_box"/> - <box-item uuid="{07278ef4-2c5d-4e11-aed6-e36c2a4b3777}" comment="" model-uuid="" x="2295" y="2415" width="390" height="60" type="output_events_box"/> - <box-item uuid="{c8c45757-ad4d-4ddb-b2fc-b6a92a5cb14d}" comment="" model-uuid="" x="2295" y="2475" width="390" height="60" type="input_ports_box"/> - <box-item uuid="{a9064d61-4319-4fff-b7db-adb2203a2513}" comment="" model-uuid="" x="2295" y="2535" width="390" height="60" type="output_ports_box"/> - <box-item uuid="{3d09ef12-ec73-4ea6-bf3a-b625445cdc5a}" comment="" model-uuid="" x="2295" y="2595" width="390" height="60" type="input_flags_box"/> - <box-item uuid="{bac5b745-8352-4bc0-ac23-15b40e9cef9e}" comment="" model-uuid="" x="2295" y="2655" width="390" height="60" type="output_flags_box"/> - <box-item uuid="{d11d176f-e296-404c-90a2-4694f114a584}" comment="" model-uuid="" x="2295" y="2715" width="390" height="60" type="container_box"/> - <box-item uuid="{b6496776-6338-4fbc-8849-8354705a1ab2}" comment="" model-uuid="{ed5307c8-bd79-4b03-a921-2896a3357331}" x="2760" y="2520" width="480" height="480" type="standard_box"/> - <box-item uuid="{12527813-47e4-4d82-a94b-76db1e998a5c}" comment="" model-uuid="{9b2de3eb-af75-475f-b2b0-1a83234e0475}" x="-191" y="-135" width="12" height="12" type="standard_box"/> - <box-item uuid="{0c777363-c270-4565-bdba-d59ff7ad6f5f}" comment="" model-uuid="{90b54724-59bc-4758-9a90-5ded213449e3}" x="-140" y="-65" width="20" height="20" type="standard_box"/> - <box-item uuid="{ec54443e-1f9b-4235-9728-1583d466b283}" comment="" model-uuid="{688a6674-dca0-4a48-a77b-7de1ecfc3151}" x="-48" y="23" width="100" height="50" type="standard_box"/> - <transition-item uuid="{513da80a-7fd4-4545-8411-a35623ab3cdd}" comment="" model-uuid="{94ee704e-652f-48d0-ab92-1c580f808304}" start-anchor-pos-x="6" start-anchor-pos-y="0" end-anchor-pos-x="0" end-anchor-pos-y="-10"> - <control-point x="-168" y="-101"/> - </transition-item> - <transition-item uuid="{64c6d117-84e6-4819-a7e6-4b4b2cf4f50f}" comment="" model-uuid="{bcbd40b6-80f1-47af-9b8b-4c63d0fe73c7}" start-anchor-pos-x="0" start-anchor-pos-y="-6" end-anchor-pos-x="-3" end-anchor-pos-y="-25"> - <control-point x="-65" y="-119"/> - </transition-item> - <transition-item uuid="{d9898035-6146-4f23-b8a0-c09463bc6c68}" comment="" model-uuid="{a5be98c2-cf19-4bf1-b06f-a12216f475fc}" start-anchor-pos-x="50" start-anchor-pos-y="-12" end-anchor-pos-x="50" end-anchor-pos-y="14"> - <control-point x="79.5" y="23.5"/> - </transition-item> - <transition-item uuid="{616dd032-d285-4acb-b623-0b42fbd89c73}" comment="" model-uuid="{ebd5bf06-eb62-47d8-9db9-49c89d1e32bd}" start-anchor-pos-x="-50" start-anchor-pos-y="5" end-anchor-pos-x="-10" end-anchor-pos-y="-1"> - <control-point x="-143.5" y="3.5"/> - </transition-item> - </diagram> - </diagrams> -</esmcontainer> diff --git a/examples/timing_test/mod/services_io.h b/examples/timing_test/mod/services_io.h deleted file mode 100644 index 3d4047790ee833c9d122bb4f1b276ac7453a415f..0000000000000000000000000000000000000000 --- a/examples/timing_test/mod/services_io.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _services_io_h -#define _services_io_h - -#define MAX_NUMBER_OF_IO_REGIONS 32 - -typedef volatile struct { - unsigned int start; - short size; -// short id; -} region_struct; - -enum regionIndices{ -COM0, -COM1, -COM2, -COM3, -COM4, -COM5, -COM6, -COM7, - -LAST_REGION_INDEX -}; - -#define COM8 0 -#define COM9 0 -#define COM10 0 -#define COM11 0 - -// list of region parameters ordered according to enumerated regionIndices -static region_struct regionList[]={ -{.start=0x3F8,.size=8}, -{.start=0x208,.size=8}, -{.start=0x3E8,.size=8}, -{.start=0x218,.size=8}, -{.start=0x220,.size=8}, -{.start=0x228,.size=8}, -{.start=0x230,.size=8}, -{.start=0x238,.size=8} -}; - -#endif diff --git a/examples/timing_test/smi/user.cfg b/examples/timing_test/smi/user.cfg deleted file mode 100755 index 5f2d69a8820d83cd6194a7d4485ad0d0447e1136..0000000000000000000000000000000000000000 --- a/examples/timing_test/smi/user.cfg +++ /dev/null @@ -1,9 +0,0 @@ -70000 RTSLEEP_TOLERANCE -20000 TASK_SLOT_TIME_TOLERANCE -1 DELAY_CORRECTION -0 PRINT_STATES -4 19 -5 -10 -5 NUMBER_OF_PROCESSES PRIORITIES -localhost ESM_GUI -nil ESM_GUI TELEM -1 FREE_CPU - diff --git a/examples/timing_test/src/nrt_task.c b/examples/timing_test/src/nrt_task.c deleted file mode 100644 index ae4d9fcccc33e435599711ab6ea3271b90358eb1..0000000000000000000000000000000000000000 --- a/examples/timing_test/src/nrt_task.c +++ /dev/null @@ -1,33 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> - -#include "smi.h" - -#include "rtshm.h" - -rtshm_struct *rtshm; -int rtshm_fd; - -int main(int argc,char *argv[]){ - int nrtProcessID; - - if (argc==2) { - nrtProcessID=atof(argv[1]); - printf("[nrt_task.c:main] nrtProcessID=%d\n",nrtProcessID); - } else { - printf("[nrt_task.c:main] nrtProcessID missing\n"); - return EXIT_FAILURE; - } - - printf("[nrt_task.c:main] allocating RT shared memory\n"); - if (initShm(&rtshm_fd,sizeof(rtshm_struct),(void *) &rtshm,RTSHM_FILE)!=0) { - return EXIT_FAILURE; - } - - nrtTask(nrtProcessID); - - printf("[nrt_task.c:main] releasing RT shared memory\n"); - closeShm(rtshm_fd,RTSHM_FILE); - - return EXIT_SUCCESS; -} diff --git a/examples/timing_test/src/user_nrt.o b/examples/timing_test/src/user_nrt.o deleted file mode 100644 index ce15b4e4ba8ddbc70489764c9773d3b90d71a065..0000000000000000000000000000000000000000 Binary files a/examples/timing_test/src/user_nrt.o and /dev/null differ diff --git a/examples/timing_test/src/user_rt.c b/examples/timing_test/src/user_rt.c deleted file mode 100644 index 6ab5bc9526a20f089710f9c7527fecf7fef6f639..0000000000000000000000000000000000000000 --- a/examples/timing_test/src/user_rt.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - ************************************************************************** - * SOURCE FILE - ************************************************************************** - * - * user_rt.c - esm task source file for user rt - * - * CSIRO - Heli Project - * - ************************************************************************** - */ - -/** - ************************************************************************** - * \file user_rt.c - * \brief na - * \author na - * \version na - * \date na - ************************************************************************** - */ - -/* - ************************************************************************** - * INCLUDES - ************************************************************************** - */ -#include <stdio.h> -#include <stdlib.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <signal.h> -#include <errno.h> -#include <fcntl.h> -#include <string.h> -#include <unistd.h> - -#include <sys/io.h> - -#include "smi.h" -#include "profile.h" - -#include "rtshm.h" -#include "user.h" - -#include "services_io.h" -#include "serial_io.h" -#include "serial.h" - -#define USER_CHECKTASKTIME 1 -#define USER_CHECKNULLPOINTERS 1 - -#define DIO_PROFILE 1 -#define DIO_CHECKNULLPOINTERS 1 - - -/* - ************************************************************************** - * GLOBALS - ************************************************************************** - */ - -extern rtshm_struct *rtshm; - -/* - ************************************************************************** - * RT TASKS - ************************************************************************** - */ - -void rtclock(taskStateStruct *taskState - // Input Flags: NA NA NA NA NA NA NA NA - // Output Flags: NA NA NA NA NA NA NA NA -) -{ - rtshm->ustime=(unsigned int)(GETTIME/1000); -} - -void initSerialSensor(taskStateStruct *taskState, - comRStruct **comRead, - comWStruct **comWrite - // Input Flags: stage1 stage2 NA NA NA NA NA NA - // Output Flags: stage1done stage2done readComError NA NA NA NA NA -) -{ - unsigned char buf[16]={0xAA,0x44,0x11}; - int ptr; - unsigned char d1,d2,d3; - int n; - RTIME t; - RTIME t1,t2; - - t1=GETTIME; - - - if (*comRead==NULL || *comWrite==NULL) { - rt_printf("[initSerialSensor] missing data\n"); *run=0; - goto exit; - } - - if (taskState->inputControlFlag[1-1]==1) { - if (writeComBuf(buf,3, - (int*)&(*comWrite)->com_awbp, - (*comWrite)->com_iwbp, - (*comWrite)->comWriteBuf - )!=3) { - rt_printf("[initSerialSensor] com buffer overflow\n"); - } else { - taskState->outputControlFlag[1-1]=1; - rt_printf("[initSerialSensor] buffer addresses: %p %p\n",*comRead,*comWrite); - rt_printf("[initSerialSensor] data written to com buffer\n"); - rt_printf("[initSerialSensor] initSerialSensor stage 1 done\n"); - } - taskState->inputControlFlag[1-1]=0; - - } else - if (taskState->inputControlFlag[2-1]==1) { - if ((*comRead)->comStat!=0) { - rt_printf("[initSerialSensor] com error %02x\n",(*comRead)->comStat); - taskState->outputControlFlag[3-1]=1; - } else { - n = (*comRead)->com_irbp - (*comRead)->com_arbp; // number of bytes not read - if (n < 0) n = COM_RBSIZE + n; - ptr = (*comRead)->com_arbp; - if (n>=3) { - t=((*comRead)->comTime[ptr%COM_RBSIZE]-smiStart)/1000; - d1 = (*comRead)->comReadBuf[ptr%COM_RBSIZE]; - ptr++; - d2 = (*comRead)->comReadBuf[ptr%COM_RBSIZE]; - ptr++; - d3 = (*comRead)->comReadBuf[ptr%COM_RBSIZE]; - if (d1==0xAA && d2==0x44 && d3==0x11) { - rt_printf("[initSerialSensor] buffer addresses: %p %p\n",*comRead,*comWrite); - rt_printf("[initSerialSensor] com received correct data\n"); - rt_printf("[initSerialSensor] com time stamp=%lldus (since smiStart)\n",t); - rt_printf("[initSerialSensor] initSerialSensor stage 2 done\n"); - (*comRead)->com_arbp = (ptr + 1) % COM_RBSIZE; - taskState->outputControlFlag[2-1]=1; - } else (*comRead)->com_arbp = ((*comRead)->com_arbp + 1) % COM_RBSIZE; - } - - } - } -exit: - t2=GETTIME; - if (t2-t1>taskState->duration) - rt_printf("task state %d exceeded time: %lld\n",taskState->stateID,t2-t1); -// rt_printf("task state %d duration: %ld\n",taskState->stateID,t2-t1); - return; -} - - - -void dio(taskStateStruct *taskState, - int **ioRegionId, // Read Mandatory - logStruct **log // Write Optional - // Input Flags: quit ledon ledoff - // Output Flags: triggerOn triggerOff - // RT -) { -#if(DIO_PROFILE) - static TaskProfileStruct taskProfile; - profile_start(taskState,&taskProfile); -#endif -#if(DIO_CHECKNULLPOINTERS) - if (*ioRegionId==NULL) { - rt_printf("[dio] missing data\n"); // *run=0; - goto exit; - } -#endif - - unsigned char cts,dsr,d; - static unsigned char dtr=1; - static unsigned char rts=1; - static int lastSmiIteration=0; - static int lastCts=0; - static int logCount=0; - dioDataStruct dioLog; - -// rts=1 green LED off -// dtr=1 red LED off -// cts=0 button pressed -// dsr=0 kill switch on - - if (taskState->inputControlFlag[1-1]==1) { // quit - rts=0; - dtr=0; - } - - if (taskState->inputControlFlag[2-1]==1) { // led on - rts=1; - taskState->inputControlFlag[2-1]=0; - } - - if (taskState->inputControlFlag[3-1]==1) { // led off - rts=0; - taskState->inputControlFlag[3-1]=0; - } - - dtr=0; - - if (rts==0 && dtr==0) d=0; - if (rts==0 && dtr==1) d=1; - if (rts==1 && dtr==0) d=2; - if (rts==1 && dtr==1) d=3; - - d=d+12; - - dioLog.time=GETTIME_MS; - dioLog.port=regionList[**ioRegionId].start; - dioLog.out=d; - outb(d,regionList[**ioRegionId].start+UART_16550_MCR); - - d=inb(regionList[**ioRegionId].start+UART_16550_MSR); - dioLog.in=d; - - if ((d&0x10)==0) cts=0; else cts=1; - if ((d&0x20)==0) dsr=0; else dsr=1; -rt_printf("%d_%d ",cts,dsr); - - if (cts!=lastCts) { - if (cts==0) { -//rt_printf("B "); - taskState->outputControlFlag[1-1]=1; - taskState->outputControlFlag[2-1]=0; - } else { - taskState->outputControlFlag[1-1]=0; - taskState->outputControlFlag[2-1]=1; - } - lastSmiIteration=*smiIterations; - } - if (*smiIterations!=lastSmiIteration) { - taskState->outputControlFlag[1-1]=0; - taskState->outputControlFlag[2-1]=0; - } - - if (*log!=NULL) { - writeLog(&logCount, 1, DIO_LOGID, sizeof(dioDataStruct), - (unsigned char *)&dioLog, (*log)); - } - -exit: -#if(DIO_PROFILE) - profile_stop(taskState,&taskProfile); -#endif - ; -} - -void testTiming(taskStateStruct *taskState - // Input Flags: - // Output Flags: error - // RT -) { -#define TASK_PERIOD 2000000 -#define TASK_PERIOD_TOLERANCE 20000 - static RTIME lastTime=0; - RTIME t; - - t=GETTIME; - if (t-lastTime>TASK_PERIOD+TASK_PERIOD_TOLERANCE && lastTime>0) { - rt_printf("--------------------> timing error dt=%dus %dms\n",(int)((t-lastTime-TASK_PERIOD)/1000),GETTIME_MS); - taskState->outputControlFlag[1-1]=1; - } - lastTime=t; -} diff --git a/examples/timing_test/src/user_rt.o b/examples/timing_test/src/user_rt.o deleted file mode 100644 index f6c91905c08dccf3b859a92ca091349bd868bbfa..0000000000000000000000000000000000000000 Binary files a/examples/timing_test/src/user_rt.o and /dev/null differ diff --git a/smi/CMakeLists.txt b/smi/CMakeLists.txt index 1e37cca124201d8a357c029f50863775ec4ed6b8..f79f24600083e82366e74988313402e3d03a1ca7 100644 --- a/smi/CMakeLists.txt +++ b/smi/CMakeLists.txt @@ -1,48 +1,33 @@ cmake_minimum_required (VERSION 2.6) project (smi C) -if("$ENV{MACHTYPE}" STREQUAL "x86_64") -SET(NRTCFLAGS "-D_NRT -O2 -Wall -std=gnu90") -if($ENV{RTAI}) -# RTAI -SET(RTCFLAGS "$(shell rtai-config --lxrt-cflags) -D_RTAI -Wall -std=gnu90") -SET(RTLIB rtsmirtai) -SET(NRTLIB nrtsmirtai) -else() -# PREEMPT_RT -SET(RTCFLAGS "-O2 -Wall -fno-stack-protector -std=gnu90") -SET(RTLIB rtsmi) -SET(NRTLIB nrtsmi) +if($ENV{DEBUG}) +SET(DEBUGFLAGS "-D_DEBUG") endif() + +if("$ENV{MACHTYPE}" STREQUAL "x86_64") +SET(MACHFLAGS "-D_64") else () -if($ENV{GNU90}) -SET(NRTCFLAGS "-D_NRT -O2 -m32 -Wall -std=gnu90") -if($ENV{RTAI}) -# RTAI -SET(RTCFLAGS "$(shell rtai-config --lxrt-cflags) -D_RTAI -m32 -Wall -std=gnu90") -SET(RTLIB rtsmirtai) -SET(NRTLIB nrtsmirtai) -else() -# PREEMPT_RT -SET(RTCFLAGS "-O2 -m32 -Wall -fno-stack-protector -std=gnu90") -SET(RTLIB rtsmi) -SET(NRTLIB nrtsmi) +SET(MACHFLAGS "-m32") endif() -else() -SET(NRTCFLAGS "-D_NRT -O2 -m32 -Wall") + +if($ENV{TWARN}) +SET(TWARNFLAGS "-D_TWARN") +endif() + +SET(NRTCFLAGS "-D_NRT -O2 -Wall") + if($ENV{RTAI}) # RTAI -SET(RTCFLAGS "$(shell rtai-config --lxrt-cflags) -D_RTAI -m32 -Wall") +SET(RTCFLAGS "-D_TWARN $(shell rtai-config --lxrt-cflags) -D_RTAI -Wall") SET(RTLIB rtsmirtai) SET(NRTLIB nrtsmirtai) else() # PREEMPT_RT -SET(RTCFLAGS "-O2 -m32 -Wall -fno-stack-protector") +SET(RTCFLAGS "-O2 -Wall -fno-stack-protector") SET(RTLIB rtsmi) SET(NRTLIB nrtsmi) endif() -endif() -endif() set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin) @@ -66,13 +51,13 @@ src/taskdisp_nrt.c if($ENV{RTAI}) add_library(rtsmirtai STATIC ${RTSOURCES}) add_library(nrtsmirtai STATIC ${NRTSOURCES}) -SET_TARGET_PROPERTIES(rtsmirtai PROPERTIES COMPILE_FLAGS "${RTCFLAGS} ${DEBUGFLAGS}") -SET_TARGET_PROPERTIES(nrtsmirtai PROPERTIES COMPILE_FLAGS "${NRTCFLAGS} ${DEBUGFLAGS}") +SET_TARGET_PROPERTIES(rtsmirtai PROPERTIES COMPILE_FLAGS "${RTCFLAGS} ${DEBUGFLAGS} ${MACHFLAGS} ${TWARNFLAGS}") +SET_TARGET_PROPERTIES(nrtsmirtai PROPERTIES COMPILE_FLAGS "${NRTCFLAGS} ${DEBUGFLAGS} ${MACHFLAGS}") else() add_library(rtsmi STATIC ${RTSOURCES}) add_library(nrtsmi STATIC ${NRTSOURCES}) -SET_TARGET_PROPERTIES(rtsmi PROPERTIES COMPILE_FLAGS "${RTCFLAGS} ${DEBUGFLAGS}") -SET_TARGET_PROPERTIES(nrtsmi PROPERTIES COMPILE_FLAGS "${NRTCFLAGS} ${DEBUGFLAGS}") +SET_TARGET_PROPERTIES(rtsmi PROPERTIES COMPILE_FLAGS "${RTCFLAGS} ${DEBUGFLAGS} ${MACHFLAGS} ${TWARNFLAGS}") +SET_TARGET_PROPERTIES(nrtsmi PROPERTIES COMPILE_FLAGS "${NRTCFLAGS} ${DEBUGFLAGS} ${MACHFLAGS}") endif() if($ENV{RTAI}) diff --git a/smi/README b/smi/README index d1709ef570565d94386e375a132f8216a89b2f13..54f057b3c29e085bfce6775478c8c9c8a793c8c3 100644 --- a/smi/README +++ b/smi/README @@ -13,7 +13,7 @@ For most applications there is no need for the user to change any files in this directory or the library directory SMI_LIB_DIR. Examples are provided in the esm/examples directory. -tested kernel versions: see TESTED +tested operating systems and hardware: see TESTED intepreter files created by ESM tools: *.smi @@ -26,13 +26,12 @@ SMI configuration file: *.cfg build SMI library: -- set env variable SMI_LIB_DIR to target directory (e.g. /usr/smi_lib) -- create symbolic link for CMakeLists.txt in smi directory for required - architecture (e.g "ln -s CMakeLists.txt.old CMakeLists.txt") + +- check env. variable MACHTYPE set to x86_64 for amd64 - execute inside esm/smi/bin: "make config" or "make rtaiconfig" "make" -"make install" +"sudo make smi_lib_dir_install" build and run examples: - follow instructions in README in smi/examples diff --git a/smi/TESTED b/smi/TESTED index a2efef51ac09433e04a5a01e889514678e4b1029..9de2ce36967176d3aca13e2f76b08216d7793cc2 100644 --- a/smi/TESTED +++ b/smi/TESTED @@ -1,10 +1,7 @@ -1) vanilla 2.6.38.8 RTAI 3.9 with X-Linux 5.7 on ICOP Vortex86DX boards -2) Ubuntu tainted 2.6.31.12 PREEMPT_RT 2.6.31.12-rt21 with Ubuntu 10.04 32 bit -on Advantech PCM-3362Z board and Advantech ARK-2150L-S6A1E -3) vanilla 3.18.24 PREEMPT_RT 3.18.24-rt22 with Ubuntu 14.04 32 bit (higher -latency compared to 2.6.31.12) -4) vanilla 4.2.0.35 PREEMPT_RT 4.1.20-rt23 with Ubuntu 14.04 32 bit (higher -latency compared to 2.6.31.12) - - - +1) Debian buster with linux-image-rt-amd64 package (4.19 kernel) on +- WinSystems PPM-C407-3845-4-1 +- Versalogic BayCat VL-EPM-31ECP +- Hystou P12B-i7-10510u, iBase IB919AF-8665 +- Advantech ARK-2150L-S6A1E +2) [needs to be tested with latest version] X-Linux 5.7 with +vanilla 2.6.38.8 RTAI 3.9 on ICOP Vortex86DX boards diff --git a/smi/bin/Makefile b/smi/bin/Makefile index 0bfa951de7355ec2d949a35d14a8047412737bec..d4e634b8ec5d740babee9425b254aa1a06b288fe 100644 --- a/smi/bin/Makefile +++ b/smi/bin/Makefile @@ -6,38 +6,52 @@ createbuild: mkdir ../build config: createbuild + cd ../build; env DEBUG=0 RTAI=0 TWARN=1 cmake .. + $(MAKE) -s clean + +config_no_twarn: createbuild cd ../build; env DEBUG=0 RTAI=0 cmake .. $(MAKE) -s clean rtaiconfig: createbuild - cd ../build; env DEBUG=0 RTAI=1 cmake .. + cd ../build; env DEBUG=0 RTAI=1 TWARN=1 cmake .. $(MAKE) -s clean + @echo !!! check RT_PRINTK_TIMING flag in rt_system.c !!! debug_config: createbuild - cd ../build; env DEBUG=1 RTAI=0 cmake .. + cd ../build; env DEBUG=1 RTAI=0 TWARN=1 cmake .. $(MAKE) -s clean debug_rtaiconfig: createbuild - cd ../build; env DEBUG=1 RTAI=1 cmake .. + echo check RT_PRINTK_TIMING flag in rt_system.c! + cd ../build; env DEBUG=1 RTAI=1 TWARN=1 cmake .. $(MAKE) -s clean + @echo !!! check RT_PRINTK_TIMING flag in rt_system.c !!! smi_lib_dir_install: export SMI_LIB_DIR=/usr/smi_lib && $(MAKE) _install +smi_lib_dir_code_install: + export SMI_LIB_DIR=/code/smi_lib && $(MAKE) _install + smi_lib_dir_fsprotect_install: export SMI_LIB_DIR=/fsprotect/system/usr/smi_lib && $(MAKE) _install -install: - export SMI_LIB_DIR=$$SMI_LIB_DIR && $(MAKE) _install +smi_lib_dir_overlay_install: + export SMI_LIB_DIR=/overlay/lower/usr/smi_lib && $(MAKE) _install + +#install: +# export SMI_LIB_DIR=$$SMI_LIB_DIR && $(MAKE) _install _install: - sudo mkdir -p $(SMI_LIB_DIR) - sudo cp ../build/*.a $(SMI_LIB_DIR) - sudo cp ../src/smi_def.h $(SMI_LIB_DIR) - sudo cp ../src/sys_def.h $(SMI_LIB_DIR) - sudo cp ../src/smi_user.h $(SMI_LIB_DIR) - sudo cp ../src/smi.h $(SMI_LIB_DIR) - sudo cp ../src/smi_symbols.h $(SMI_LIB_DIR) + mkdir -p $(SMI_LIB_DIR) + cp ../build/*.a $(SMI_LIB_DIR) + cp ../src/smi_def.h $(SMI_LIB_DIR) + cp ../src/sys_def.h $(SMI_LIB_DIR) + cp ../src/rt_def.h $(SMI_LIB_DIR) + cp ../src/smi_user.h $(SMI_LIB_DIR) + cp ../src/smi.h $(SMI_LIB_DIR) + cp ../src/smi_symbols.h $(SMI_LIB_DIR) clean: -$(MAKE) clean -s -C ../build diff --git a/smi/src/nrt_system.c b/smi/src/nrt_system.c index 1d11dc46da2a0fa607a2aff14f6937814b9bc7c0..ca8dabc0ae8f1ec9882be274ca958a213a78eb66 100644 --- a/smi/src/nrt_system.c +++ b/smi/src/nrt_system.c @@ -58,14 +58,16 @@ int printBuffers_(void) { printf("[printBuffers] tmp print buffer overflow\n"); shm->tmpPrintBufferOverflow=0; } - n=shm->strWriteIndex-shm->strReadIndex; + n=__sync_fetch_and_add(&shm->strWriteIndex,0)-shm->strReadIndex; if (n<0) n+=sizeof(shm->str); for (i=0;i<n;i++) { char c; c=shm->str[shm->strReadIndex]; if ((c<32 || c>126) && (c!=0x0d) && (c!=0x0a)) c=32; // don't print invisible characters (observed crashes!) printf("%c",c); - shm->strReadIndex=(shm->strReadIndex+1)%sizeof(shm->str); +// shm->strReadIndex=(shm->strReadIndex+1)%sizeof(shm->str); + __sync_fetch_and_add(&shm->strReadIndex, + (shm->strReadIndex+1)%sizeof(shm->str)-shm->strReadIndex); } fflush(stdout); @@ -77,14 +79,16 @@ int printBuffers_(void) { fprintf(stderr,"[printBuffers] error tmp print buffer overflow\n"); shm->errorTmpPrintBufferOverflow=0; } - n=shm->errorStrWriteIndex-shm->errorStrReadIndex; + n=__sync_fetch_and_add(&shm->errorStrWriteIndex,0)-shm->errorStrReadIndex; if (n<0) n+=sizeof(shm->errorStr); for (i=0;i<n;i++) { char c; c=shm->errorStr[shm->errorStrReadIndex]; if ((c<32 || c>126) && (c!=0x0d) && (c!=0x0a)) c=32; // don't print invisible characters (observed crashes!) fprintf(stderr,"%c",c); - shm->errorStrReadIndex=(shm->errorStrReadIndex+1)%sizeof(shm->errorStr); +// shm->errorStrReadIndex=(shm->errorStrReadIndex+1)%sizeof(shm->errorStr); + __sync_fetch_and_add(&shm->errorStrReadIndex, + (shm->errorStrReadIndex+1)%sizeof(shm->errorStr)-shm->errorStrReadIndex); } fflush(stderr); return n; @@ -95,7 +99,9 @@ void printBuffers(taskStateStruct *taskState // Output Flags: TASK_OF1 TASK_OF2 TASK_OF3 TASK_OF4 TASK_OF5 TASK_OF6 TASK_OF7 TASK_OF8 // NRT ) { +//printf("in ");fflush(stdout); printBuffers_(); +//printf("out ");fflush(stdout); } @@ -129,18 +135,21 @@ void sendSMILog(taskStateStruct *taskState int status; unsigned int count=0; static unsigned int absCount=0; + int self=0; + static int pf=0; int change; - static int iteration=0; - unsigned int smiIteration,time,numberOfLeafStates; + static unsigned int iteration=0; + unsigned int smiIteration; + unsigned int time,numberOfLeafStates; stateIDType leafStates[MAX_NUMBER_OF_CONCURRENT_STATES]; flagsIDType taskStateFlags[MAX_NUMBER_OF_CONCURRENT_STATES]; static stateIDType previousLeafStates[MAX_NUMBER_OF_CONCURRENT_STATES]; static flagsIDType previousTaskStateFlags[MAX_NUMBER_OF_CONCURRENT_STATES]; static unsigned int previousNumberOfLeafStates=0; -#ifdef DEBUG -// fprintf(stderr, "[sendSMILog] \n"); +#ifdef _DEBUG + fprintf(stderr, "[sendSMILog] -------------------------------\n"); #endif // static RTIME t1,t2; @@ -156,11 +165,13 @@ void sendSMILog(taskStateStruct *taskState taskState->outputControlFlag[1-1]=1; return; } - +/* if (taskState->inputControlFlag[2-1]==1) { printf("[sendSMILog] last debug message\n"); - usleep(1000*100); // otherwise last message gets lost + fflush(stdout); + usleep(1000*1000); // wait for last message to be sent } +*/ do { @@ -170,16 +181,23 @@ do { &previousNumberOfLeafStates, previousLeafStates, previousTaskStateFlags, GUI_LOG_FILTER ); - iteration=smiIteration; + +//printf("%d_%d_%d_%d\n",shm->smiIteration,iteration,smiIteration,change); + if (change<0) { - printf("[sendSMILog] buffer overflow\n"); - change=0; + printf("[sendSMILog] 1: buffer overflow %d %d\n",iteration,smiIteration); + change=0; + iteration=shm->smiIteration; + goto exit; } + + iteration=smiIteration; + //if (change==1) printf("@%d ",smiIteration);fflush(stdout); if (numberOfLeafStates>0) { if (iteration!=smiIteration) { - printf("[sendSMILog] buffer overflow\n"); + printf("[sendSMILog] 2: buffer overflow\n"); taskState->outputControlFlag[1-1]=1; } @@ -197,6 +215,7 @@ do { printf("[sendSMILog] %d iter. (stateID flags): ",smiIteration); #endif for (i=0;i<numberOfLeafStates;i++) { + if (leafStates[i]==taskState->stateID) self=1; #ifdef PRINT_STATES printf("(%d %d)",leafStates[i],taskStateFlags[i]); #endif @@ -209,7 +228,7 @@ do { printf("\n"); #endif -usleep(1*1000); +usleep(STD_SLEEP); status = sendto(iGUIUDPSocket,(const char *) &rgcData,iMemShift,0, (struct sockaddr *)&addrGUIUDP,sizeof(addrGUIUDP)); //for (i=0;i<iMemShift;i++) printf("%d ",rgcData[i]); @@ -219,10 +238,16 @@ usleep(1*1000); // printf("[sendSMILog] sent: %d (%d) %d %d %d %d\n", iMemShift+iSize,numberOfLeafStates,rgcData[0],rgcData[1],rgcData[2],rgcData[3]); #endif if ( status < 0 ) { - perror("sendSMILog: sendto "); + if (pf==0) { + fflush(stdout); + perror("[sendSMILog] sendto "); + printf("[sendSMILog] sendto perror %d\n",status); + pf=1; + } taskState->outputControlFlag[1-1]=1; - return; - } + iteration=shm->smiIteration; + goto exit; + } else pf=0; } iteration++; } @@ -231,8 +256,13 @@ usleep(1*1000); if (count==MAX_SEND_SMI_LOG_ITER) { printf("[sendSMILog] max. iterations exceeded\n"); } - if (taskState->inputControlFlag[2-1]==1) { - taskState->outputControlFlag[2-1]=1; + +exit: + if (taskState->inputControlFlag[2-1]==1 && self) { + printf("[sendSMILog] last debug message\n"); + fflush(stdout); +// usleep(1000*1000); // wait for last message to be sent + taskState->outputControlFlag[2-1]=1; } } @@ -251,8 +281,9 @@ void sendSMILogTelem(taskStateStruct *taskState static unsigned int absCount=0; int change; - static int iteration=0; - unsigned int smiIteration,numberOfLeafStates; + static unsigned int iteration=0; + unsigned int smiIteration; + unsigned int numberOfLeafStates; stateIDType leafStates[MAX_NUMBER_OF_CONCURRENT_STATES]; flagsIDType taskStateFlags[MAX_NUMBER_OF_CONCURRENT_STATES]; static int previousIteration=-1; @@ -329,7 +360,7 @@ usleep(1*1000); if ( status < 0 ) { perror("sendSMILogTelem: sendto "); taskState->outputControlFlag[1-1]=1; - return; + goto exit; } } iteration++; @@ -339,6 +370,7 @@ usleep(1*1000); if (count==MAX_SEND_SMI_LOG_ITER) { printf("[sendSMILogTelem] max. iterations exceeded\n"); } +exit: if (taskState->inputControlFlag[2-1]==1) { taskState->outputControlFlag[2-1]=1; } @@ -360,23 +392,17 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) { int c; int ret; - printf("[nrtSmi] RAM: smi=%dkB shm=%dkB\n",sizeof(mem_check_struct)/1024, - sizeof(shm_struct)/1024); + printf("[nrtSmi] ------------------ SMI v%d.%d ------------------ \n",VERSION_MAJOR,VERSION_MINOR); + printf("[nrtSmi] RAM: smi=%dkB shm=%dkB\n",(int)sizeof(mem_check_struct)/1024, + (int)sizeof(shm_struct)/1024); if (esmFile==NULL || tssFile==NULL || tdeFile==NULL || cfgFile==NULL) { goto exit; } - /* check size of int type */ - if (sizeof(int)*CHAR_BIT<4*8) - { - error=4; - printf("[nrtSmi] int size too small\n"); - goto exit; - } - /* check lock constant */ +/* int lock; __sync_fetch_and_nand(&lock,0); if (lock!=ATOMIC_UNLOCKED) { @@ -384,27 +410,56 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) { printf("[nrtSmi] NAND_LOCK mismatch\n"); goto exit; } - +*/ + if (SMI_LOCKED!=0) { + error=4; + printf("[nrtSmi] error: SMI_LOCKED not set to zero\n"); + goto exit; + } + + /* checking number of bits in a byte */ +printf("[nrtSmi] CHAR_BIT=%d\n",CHAR_BIT); + if (CHAR_BIT!=8) + { + error=4; + printf("[nrtSmi] error: number of bits in a byte must be eight\n"); + goto exit; + } + + /* check size of data types */ +//printf("%d %d %d %d %d %d %d\n",CHAR_S,SHORT_S,INT_S,LONG_S,RTIME_S,FLOAT_S,DOUBLE_S); +//printf("%ld %ld %ld %ld %ld %ld %ld\n",sizeof(char),sizeof(short),sizeof(int), +//sizeof(long),sizeof(RTIME),sizeof(float),sizeof(double)); +#ifndef _64 if (sizeof(char)!=CHAR_S || sizeof(short)!=SHORT_S || sizeof(int)!=INT_S || sizeof(long)!=LONG_S || sizeof(RTIME)!=RTIME_S || sizeof(float)!=FLOAT_S || sizeof(double)!=DOUBLE_S) { error=4; - printf("[nrtSmi] data type mismatch\n"); -//printf("CHAR_BIT=%d\n",CHAR_BIT); -//printf("%d %d %d %d %d\n",CHAR_S,SHORT_S,INT_S,LONG_S,RTIME_S); -//printf("%ld %ld %ld %ld %ld\n",sizeof(char),sizeof(short),sizeof(int), -//sizeof(long),sizeof(RTIME)); + printf("[nrtSmi] error: 32-bit version data type mismatch\n"); + goto exit; + } +#endif +#ifdef _64 + if (sizeof(char)!=CHAR_S || sizeof(short)!=SHORT_S || + sizeof(int)!=INT_S || sizeof(long)!=LONG64_S || + sizeof(RTIME)!=RTIME_S || sizeof(float)!=FLOAT_S || + sizeof(double)!=DOUBLE_S) + { + error=4; + printf("[nrtSmi] error: 64-bit version data type mismatch\n"); goto exit; } +#endif printf("[nrtSmi] allocating system shared memory\n"); - if (initShm(&shm_fd,sizeof(shm_struct),(void *) &shm,SHM_FILE)!=0) { + if (initShm(&shm_fd,sizeof(shm_struct),(void **) &shm,SHM_FILE)!=0) { error=2; goto exit; } + smiLogBuf=&(shm->smiLogBuf); smiTelemBuf=&(shm->smiTelemBuf); @@ -418,6 +473,8 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) { goto exit; } + int val; + i=fscanf(fpt,"%d",&shm->rtSleepTolerance); if (i==1) { printf("[nrtSmi] rtSleepTolerance=%d\n",shm->rtSleepTolerance); @@ -430,19 +487,22 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) { } else error=6; newLine(fpt); - i=fscanf(fpt,"%d",&shm->delayCorrection); + i=fscanf(fpt,"%d",&val); + shm->delayCorrection=val; if (i==1) { printf("[nrtSmi] delayCorrection=%d\n",shm->delayCorrection); } else error=6; newLine(fpt); - i=fscanf(fpt,"%d",&shm->printStates); + i=fscanf(fpt,"%d",&val); + shm->printStates=val; if (i==1) { printf("[nrtSmi] printStates=%d\n",shm->printStates); } else error=6; newLine(fpt); - i=fscanf(fpt,"%d",&shm->numberOfProcesses); + i=fscanf(fpt,"%d",&val); + shm->numberOfProcesses=val; if (i==1) { printf("[nrtSmi] numberOfProcesses=%d\n",shm->numberOfProcesses); if (shm->numberOfProcesses<1) { @@ -456,12 +516,13 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) { error=6; } for (j=0;j<shm->numberOfProcesses;j++) { - i=fscanf(fpt,"%d",&shm->processPriorities[j]); + i=fscanf(fpt,"%d",&val); + shm->processPriorities[j]=val; if (i!=1) break; else printf("[nrtSmi] processPriority[%d]=%d\n",j,shm->processPriorities[j]); } if (i!=1) { - printf("[nrtSmi] error parsing process Priorities\n"); + printf("[nrtSmi] error parsing process priorities\n"); error=6; } } else { @@ -493,19 +554,28 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) { printf("[nrtSmi] telem GUI hostname \"%s\" \n",shm->hostnameTelem); if (c!=EOF && c!='\n') newLine(fpt); - i=fscanf(fpt,"%d",&shm->freeCPU); + i=fscanf(fpt,"%d",&val); + shm->freeCPU=val; if (i==1) { printf("[nrtSmi] freeCPU=%d\n",shm->freeCPU); + } else error=6; + if (c!=EOF && c!='\n') newLine(fpt); + + i=fscanf(fpt,"%d",&val); + shm->nanosleepUnit=val; + if (i==1) { + printf("[nrtSmi] nanosleepUnit=%d\n",shm->nanosleepUnit); } else { - printf("[nrtSmi] assuming old configuration file format, setting freeCPU=1\n"); - shm->freeCPU=1; + shm->nanosleepUnit=0; + printf("[nrtSmi] assuming old configuration file format, setting nanosleepUnit=%d\n", + shm->nanosleepUnit); } newLine(fpt); fclose(fpt); if (error!=0) goto exit2; - printf("[nrtSmi] setting system process priority to %d\n",shm->processPriorities[0]); + printf("[nrtSmi] setting system process niceness to %d\n",shm->processPriorities[0]); setpriority(PRIO_PROCESS,0,shm->processPriorities[0]); ret=system("stty cbreak"); @@ -524,7 +594,7 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) { for (i = 0; i < BUF4_SIZE; i++) shm->buf4[i] = i; - shm->rtCmd=0; +// shm->rtCmd=0; run=(int*)&(shm->run); /* initialise smi variables */ @@ -539,8 +609,11 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) { /* wait for RT task */ printf("[nrtSmi] waiting for rt\n"); shm->nrtSync = NRT_INIT; + __sync_synchronize(); while (shm->nrtSync == NRT_INIT) { + __sync_synchronize(); shm->rtSync = RT_START; + __sync_synchronize(); usleep(STD_SLEEP); } @@ -592,6 +665,7 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) { // nrtGetKey(NULL); //if (shm->intTest!=0) {printf("%d ",shm->intTest);fflush(stdout);} } while (cMainLoopFlag==1); +//printf("[nrtSmi] \"while\" loop exited\n"); error=0; exitNrtTaskDispatcher(); @@ -607,6 +681,7 @@ exit2: } */ shm->nrtSync=NRT_STOP; + __sync_synchronize(); while (shm->rtSync!=RT_STOP) { usleep(STD_SLEEP); } @@ -622,15 +697,18 @@ usleep(STD_SLEEP); int nrtTask(int nrtProcessID) { int i; - - printf("[nrt_task] allocating system shared memory\n"); - if (initShm(&shm_fd,sizeof(shm_struct),(void *) &shm,SHM_FILE)!=0) + + printf("[nrtTask] allocating system shared memory; nrtProcessID=%d\n",nrtProcessID); + if (initShm(&shm_fd,sizeof(shm_struct),(void **) &shm,SHM_FILE)!=0) return(1); + printf("[nrtTask] setting process niceness to %d; nrtProcessID=%d\n",shm->processPriorities[nrtProcessID],nrtProcessID); + setpriority(PRIO_PROCESS,0,shm->processPriorities[nrtProcessID]); + run=(int*)&(shm->run); shm->pid[nrtProcessID]=getpid(); -printf("[nrt_task] process %lld up nrtProcessID=%d\n",(long long int)shm->pid[nrtProcessID],nrtProcessID); +printf("[nrtTask] process %lld up; nrtProcessID=%d\n",(long long int)shm->pid[nrtProcessID],nrtProcessID); shm->processStatus[nrtProcessID]=PROCESS_UP; for (i=0;i<MAX_NUMBER_OF_DATA_PATHS;i++) { @@ -649,7 +727,7 @@ printf("[nrt_task] process %lld up nrtProcessID=%d\n",(long long int)shm->pid[nr shm->processStatus[nrtProcessID]=0; if (shm->processLock[nrtProcessID]==0) { - printf("[nrt_task] releasing system shared memory\n"); + printf("[nrtTask] releasing system shared memory; nrtProcessID=%d\n",nrtProcessID); closeShm(shm_fd,SHM_FILE); return 0; } else while (1) usleep(STD_SLEEP); diff --git a/smi/src/rt_def.h b/smi/src/rt_def.h index 0005fa1d207df5b457df3f404e7d64866d907e45..31dfedb537fc91a9fbcd918ac8c1e1c1a9321d38 100644 --- a/smi/src/rt_def.h +++ b/smi/src/rt_def.h @@ -9,6 +9,7 @@ #define SMI_TIME_BUF_SIZE 1024 #define SLEEP_BUF_SIZE 1024 +#define LATENCY_BUF_SIZE 1024 #define GETTIME_BUF_SIZE 1024 //#define NRT_SMI @@ -21,7 +22,7 @@ #define SHORT_S 2 #define INT_S 4 #ifdef _64 -#define LONG_S 8 +#define LONG64_S 8 #else #define LONG_S 4 #endif @@ -52,12 +53,14 @@ #define NRT_START 5 #define NRT_STOP 7 -#define STD_SLEEP 1000 + /* shared memory variables used in main and module */ typedef volatile struct { - int nrtSync; - int rtSync; +char test; +//taskStateSysVarStruct taskStateSysVar[MAX_NUMBER_OF_TASK_STATES]; + atomicInt8Type nrtSync; + atomicInt8Type rtSync; short buf1[BUF1_SIZE]; short buf2[BUF2_SIZE]; @@ -65,17 +68,17 @@ typedef volatile struct { unsigned char buf4[BUF4_SIZE]; // unsigned int reftime; - int rtCmd; +// int rtCmd; // still used? - int newState; - int newTransition; - int esmLoaded; - int tssLoaded; - int newSlot; - int tdeLoaded; - int newTask; + atomicInt8Type newState; + atomicInt8Type newTransition; + atomicInt8Type esmLoaded; + atomicInt8Type tssLoaded; + atomicInt8Type newSlot; + atomicInt8Type tdeLoaded; + atomicInt8Type newTask; - RTIME slotNumber; +// RTIME slotNumber; RTIME slotStartTime; RTIME slotDuration; RTIME slotPeriod; @@ -83,7 +86,7 @@ typedef volatile struct { taskIDType taskID; unsigned int duration; - int oneShot; + atomicInt8Type oneShot; stateStruct esmStateTransfer; superstateDataStruct superstateDataTransfer; @@ -95,21 +98,21 @@ typedef volatile struct { unsigned int numberOfSuperstates; unsigned int numberOfCurrentLeafStates; int stateChange,flagChange; - unsigned int numberOfSMIIterations; + unsigned int smiIteration; + unsigned int smiIterationLock; taskStateStruct taskState[MAX_NUMBER_OF_TASK_STATES]; taskStateSysVarStruct taskStateSysVar[MAX_NUMBER_OF_TASK_STATES]; controlFlagsStruct controlFlags[MAX_NUMBER_OF_TASK_STATES]; - unsigned int smiLock; - int intTest; +// int intTest; // still used? RTIME t1,t2,t3; - int run; + atomicInt8Type run; smiLogBufStruct smiLogBuf; smiLogBufStruct smiTelemBuf; - int smiTelemFlag; // 0=write, 1=written + atomicInt8Type smiTelemFlag; // 0=write, 1=written unsigned int smiTelemIteration; unsigned short smiTelemNumberOfStates; stateIDType smiTelemStateLogBuf[MAX_NUMBER_OF_CONCURRENT_STATES]; @@ -119,8 +122,8 @@ typedef volatile struct { char str[PRINT_BUFFER_SIZE]; int strWriteIndex; int strReadIndex; - int printBufferOverflow; - int tmpPrintBufferOverflow; + atomicInt8Type printBufferOverflow; + atomicInt8Type tmpPrintBufferOverflow; char errorStr[EPRINT_BUFFER_SIZE]; int errorStrWriteIndex; @@ -130,24 +133,26 @@ typedef volatile struct { int rtSleepTolerance; int taskSlotTimeTolerance; - int delayCorrection; - int freeCPU; - int printStates; + int nanosleepUnit; + + atomicInt8Type delayCorrection; + atomicInt8Type freeCPU; + atomicInt8Type printStates; char hostname[HOSTNAME_SIZE+1]; char hostnameTelem[HOSTNAME_SIZE+1]; - int numberOfProcesses; + atomicInt8Type numberOfProcesses; // list of process priorities (nice values) // [-20..19] smaller -> higher priority - int processPriorities[MAX_NUMBER_OF_PROCESSES]; + atomicInt8Type processPriorities[MAX_NUMBER_OF_PROCESSES]; pid_t pid[MAX_NUMBER_OF_PROCESSES]; #define PROCESS_STARTED 0x01 #define PROCESS_UP 0x02 #define PROCESS_IDLE 0x04 #define PROCESS_TEST 0x08 - int processStatus[MAX_NUMBER_OF_PROCESSES]; - int processLock[MAX_NUMBER_OF_PROCESSES]; + atomicInt8Type processStatus[MAX_NUMBER_OF_PROCESSES]; + atomicInt8Type processLock[MAX_NUMBER_OF_PROCESSES]; } shm_struct; #endif diff --git a/smi/src/rt_system.c b/smi/src/rt_system.c index 5b11e06d8414c14545796f80852617b49e3572ce..22d5775f81bab500b79f55cd2c702e31e2bc4850 100644 --- a/smi/src/rt_system.c +++ b/smi/src/rt_system.c @@ -12,6 +12,8 @@ #include <errno.h> #include <math.h> +#define RT_PRINTF_TIMING 1 + //#define __USE_XOPEN2K 1 #include <time.h> @@ -30,28 +32,40 @@ int shm_fd; shm_struct *shm; -RTIME tick_period,smiStart; +RTIME tsc2,tsc3; + +RTIME tick_period; +RTIME smiStart; RTIME tickPeriod; -RTIME maxSleep=0,maxTimeSMI=0,maxGettime=0; +RTIME maxSleep=0,maxTimeSMI=0,maxGettime=0,maxLatency=0,maxPrintTime=0; +RTIME tLastSuspension=0,maxTimeBetweenSleep=0; unsigned int maxNumberOfEvents=0,maxNumberOfConcurrentStates=0; RTIME taskSchedulerDelay; RTIME clockOffset; int sleepBuf[SLEEP_BUF_SIZE]; int fullSleepBuf=0; +int indexSleepBuf=0; + +int latencyBuf[LATENCY_BUF_SIZE]; +int fullLatencyBuf=0; +int indexLatencyBuf=0; int timeBufSMI[SMI_TIME_BUF_SIZE]; int fullTimeBufSMI=0; int gettimeBuf[GETTIME_BUF_SIZE]; +int indexGettimeBuf=0; int fullGettimeBuf=0; shm_struct *shm; int *run; -unsigned int *smiIterations; +int nanosleepUnit=0; +unsigned int *smiIterationRT; smiLogBufStruct *smiLogBuf; +/* #ifndef _RTAI inline RTIME getTime(void) { struct timespec ts; @@ -70,25 +84,38 @@ inline unsigned int getTime_ms(void) { return((unsigned int)((ts.tv_nsec+1000000000*(long long)ts.tv_sec-smiStart)/1000000+0.5)); #endif } - +*/ int rt_printf(const char *str, ...) { char str2[255+1]; int n,i; va_list args; +#if (RT_PRINTF_TIMING) + RTIME t1,t2; + t1=GETTIME; +#endif va_start(args, str); n=vsnprintf(str2,sizeof(str2),str,args); + va_end(args); + if (n==sizeof(str2)) { shm->tmpPrintBufferOverflow=1; } for (i=0;i<n;i++) { shm->str[shm->strWriteIndex]=str2[i]; - shm->strWriteIndex=(shm->strWriteIndex+1)%sizeof(shm->str); - if (shm->strWriteIndex==shm->strReadIndex) { +// shm->strWriteIndex=(shm->strWriteIndex+1)%sizeof(shm->str); + __sync_fetch_and_add(&shm->strWriteIndex, + (shm->strWriteIndex+1)%sizeof(shm->str)-shm->strWriteIndex); + if (shm->strWriteIndex== + __sync_fetch_and_add(&shm->strReadIndex,0)) { shm->printBufferOverflow=1; } } +#if (RT_PRINTF_TIMING) + t2=GETTIME; + if (t2-t1>maxPrintTime) maxPrintTime=t2-t1; +#endif return n; } @@ -99,13 +126,18 @@ int rt_eprintf(const char *str, ...) { va_start(args, str); n=vsnprintf(str2,sizeof(str2),str,args); + va_end(args); + if (n==sizeof(str2)) { shm->errorTmpPrintBufferOverflow=1; } for (i=0;i<n;i++) { shm->errorStr[shm->errorStrWriteIndex]=str2[i]; - shm->errorStrWriteIndex=(shm->errorStrWriteIndex+1)%sizeof(shm->errorStr); - if (shm->errorStrWriteIndex==shm->errorStrReadIndex) { +// shm->errorStrWriteIndex=(shm->errorStrWriteIndex+1)%sizeof(shm->errorStr); + __sync_fetch_and_add(&shm->errorStrWriteIndex, + (shm->errorStrWriteIndex+1)%sizeof(shm->errorStr)-shm->errorStrWriteIndex); + if (shm->errorStrWriteIndex== + __sync_fetch_and_add(&shm->errorStrReadIndex,0)) { shm->errorPrintBufferOverflow=1; } } @@ -124,7 +156,7 @@ void getClockVar(taskStateStruct *taskState, // *reftime=(unsigned int*)&(shm->reftime); t2=GETTIME; if (t2-t1>taskState->duration) - rt_eprintf("task state %d exceeded time: %lld\n",taskState->stateID,t2-t1); + rt_printf("task state %d exceeded time: %lld\n",taskState->stateID,t2-t1); } @@ -140,7 +172,7 @@ void quit(taskStateStruct *taskState shm->run=0; t2=GETTIME; if (t2-t1>taskState->duration) - rt_eprintf("task state %d exceeded time: %lld\n",taskState->stateID,t2-t1); + rt_printf("task state %d exceeded time: %lld\n",taskState->stateID,t2-t1); } #if 0 @@ -159,7 +191,6 @@ t2=t1; **reftime = (GETTIME - smiStart) / 1000000.0 + 0.5; } - void readClock_(taskStateStruct *taskState, unsigned int **reftime // PASS_OUTPUT // Input Flags: NA NA NA NA NA NA NA NA @@ -173,13 +204,13 @@ void readClock_(taskStateStruct *taskState, void suspend(int time) { RTIME t2,t1; // static int firstDuration=0; - static int indexSleepBuf=0; + #ifndef _RTAI - struct timespec ts; +// struct timespec ts; #endif int suspendTime; - static int indexGettimeBuf=0; + t1=GETTIME; t2=GETTIME; @@ -196,18 +227,22 @@ void suspend(int time) { suspendTime=time-shm->rtSleepTolerance; if (suspendTime<0) suspendTime=0; else { +//rt_printf("%lld \n",suspendTime/1000); + t1=GETTIME; #ifndef _RTAI - ts.tv_sec=0; - ts.tv_nsec=suspendTime; - clock_nanosleep(CLOCK_MONOTONIC,0,&ts,NULL); +/* + struct timespec ts; + ts.tv_sec=0; + ts.tv_nsec=suspendTime; + clock_nanosleep(CLOCK_MONOTONIC,0,&ts,NULL); +*/ + nanoSuspend(time, shm->rtSleepTolerance); #endif #ifdef _RTAI rt_sleep(nano2count(suspendTime)); #endif - } t2=GETTIME; - if (suspendTime>0) { /* if (firstDuration==0) { firstDuration=suspendTime; @@ -226,19 +261,63 @@ void suspend(int time) { } if (t2-t1-suspendTime>maxSleep) maxSleep=t2-t1-suspendTime; } - } - if (t2-t1>time) rt_eprintf("[suspend] suspend task exceeded time: %lld\n",t2-t1); + if (t2-t1>time) { +#ifdef _TWARN +rt_printf("[suspend] suspend task exceeded time: commanded=%d latency=%lld buffer=%d\n", + suspendTime,t2-t1-time,shm->rtSleepTolerance); +#endif + } + } } - +/* void rtSuspend(taskStateStruct *taskState) { suspend(taskState->duration); } +*/ +void rtSuspend(taskStateStruct *taskState) { +#ifndef _RTAI + RTIME t1,t2,dt; + int tol=shm->rtSleepTolerance; + t1=GETTIME; + t2=GETTIME; + if (indexGettimeBuf>=GETTIME_BUF_SIZE) { + indexGettimeBuf=0; + fullGettimeBuf=1; + } else { + gettimeBuf[indexGettimeBuf]=(int)(t2-t1); + indexGettimeBuf++; + } + if (t2-t1>maxGettime) maxGettime=t2-t1; -void rtSuspend2(taskStateStruct *taskState) { - suspend(taskState->duration); + nanoSuspend(nanosleepUnit,0); + t2=GETTIME; + + dt=t2-t1-nanosleepUnit; + + if (indexSleepBuf>=SLEEP_BUF_SIZE) { + indexSleepBuf=0; + fullSleepBuf=1; + } else { + sleepBuf[indexSleepBuf]=(int)dt; + indexSleepBuf++; + } + + if (dt>maxSleep) maxSleep=dt; + if (dt>tol) { +//tsc3=GETTIME; +#ifdef _TWARN +//rt_printf("[rtSuspend2] latency=%d tolerance=%d t1=%lld t2=%lld\n",(int)dt,shm->rtSleepTolerance,t1/1000,t2/1000); +//rt_printf("[rtSuspend2] latency=%lld tolerance=%d\n",dt,tol); +#endif +//tsc2=GETTIME; +//rt_printf("x:%lld ",tsc2-tsc3); + } +#else + suspend(nanosleepUnit); +#endif } void smiTelemCopy(unsigned int smiIteration, unsigned int numberOfStates, @@ -311,7 +390,7 @@ indexGettimeBuf++; if (t2-t1>maxGettime) maxGettime=t2-t1; } - if (t2-t1>taskState->duration) rt_eprintf("[suspendPXA] suspend task exceeded time: %lld\n",t2-t1); + if (t2-t1>taskState->duration) rt_printf("[suspendPXA] suspend task exceeded time: %lld\n",t2-t1); } */ @@ -322,7 +401,7 @@ void main_task(void) { // int i; #ifndef _RTAI - struct timespec ts; +// struct timespec ts; #endif @@ -330,16 +409,22 @@ void main_task(void) { rt_printf("[main_task] waiting for nrt\n"); shm->rtSync=RT_INIT; + __sync_synchronize(); do { #ifndef _RTAI - ts.tv_sec=0; - ts.tv_nsec=STD_SLEEP*1000; - clock_nanosleep(CLOCK_MONOTONIC,0,&ts,NULL); +/* + struct timespec ts; + ts.tv_sec=0; + ts.tv_nsec=STD_SLEEP*1000; + clock_nanosleep(CLOCK_MONOTONIC,0,&ts,NULL); +*/ + nanoSuspend(STD_SLEEP*1000,0); #endif #ifdef _RTAI rt_sleep(nano2count(STD_SLEEP*1000)); #endif } while (shm->rtSync != RT_START); // wait for nrt + __sync_synchronize(); shm->nrtSync=NRT_START; //rt_printf("--->%d\n",sizeof(taskData)); @@ -395,26 +480,31 @@ void main_task(void) { tstop=GETTIME; rt_printf("[main_task] readClock time: %lld\n",tstop-tstart-toff); */ + nanosleepUnit=shm->nanosleepUnit; shm->run=1; run=(int*)&(shm->run); - smiIterations=(unsigned int*)&(shm->numberOfSMIIterations); + smiIterationRT=(unsigned int*)&(shm->smiIteration); smiLogBuf=&(shm->smiLogBuf); smiLogBuf->index=0; smiLogBuf->numberOfEntries=0; - rt_printf("[main_task] rtai module ready\n"); + rt_printf("[main_task] loading state machine data\n"); //while(1) rt_sleep(nano2count(10*1000*1000)); do { loadSMI(); loadTaskSlotSchedule(); loadTaskDeclaration(); #ifndef _RTAI - ts.tv_sec=0; - ts.tv_nsec=STD_SLEEP*1000; // possibly longer sleep time required - clock_nanosleep(CLOCK_MONOTONIC,0,&ts,NULL); +/* + struct timespec ts; + ts.tv_sec=0; + ts.tv_nsec=STD_SLEEP*1000; // possibly longer sleep time required + clock_nanosleep(CLOCK_MONOTONIC,0,&ts,NULL); +*/ + nanoSuspend(STD_SLEEP*1000,0); #endif #ifdef _RTAI rt_sleep(nano2count(STD_SLEEP*1000)); @@ -463,23 +553,46 @@ void displayDebug(void){ printf("[displayDebug] sig. GETTIME time: %d\n",(int)sqrt(v2)); } - printf("[displayDebug] max. sleep time error: %lld\n",maxSleep); + printf("[displayDebug] max. sleep latency: %lld\n",maxSleep); if (fullSleepBuf==1) { v1=0; for (i=0;i<SLEEP_BUF_SIZE;i++) { v1+=sleepBuf[i]; } v1=v1/SLEEP_BUF_SIZE; - printf("[displayDebug] avg. sleep time error: %d\n",(int)v1); + printf("[displayDebug] avg. sleep latency: %d\n",(int)v1); v2=0; for (i=0;i<SLEEP_BUF_SIZE;i++) { v2+=(sleepBuf[i]-v1)*(sleepBuf[i]-v1); } v2=v2/SLEEP_BUF_SIZE; // printf("[displayDebug] var. sleep time: %d\n",(int)v2); - printf("[displayDebug] sig. sleep time error: %d\n",(int)sqrt(v2)); + printf("[displayDebug] sig. sleep latency: %d\n",(int)sqrt(v2)); } + printf("[displayDebug] max. slot latency: %lld\n",maxLatency); + if (fullLatencyBuf==1) { + v1=0; + for (i=0;i<LATENCY_BUF_SIZE;i++) { + v1+=latencyBuf[i]; + } + v1=v1/LATENCY_BUF_SIZE; + printf("[displayDebug] avg. slot latency: %d\n",(int)v1); + v2=0; + for (i=0;i<LATENCY_BUF_SIZE;i++) { + v2+=(latencyBuf[i]-v1)*(latencyBuf[i]-v1); + } + v2=v2/LATENCY_BUF_SIZE; + printf("[displayDebug] sig. slot latency: %d\n",(int)sqrt(v2)); + } + +// if (shm->freeCPU==2 || shm->freeCPU==3) +#ifndef _RTAI + printf("[displayDebug] max. time RT process not suspended: %lld\n",maxTimeBetweenSleep); +#endif + if (maxPrintTime>0) + printf("[displayDebug] max. RT print time: %lld\n",maxPrintTime); + printf("[displayDebug] max. number of concurrent states: %d\n",maxNumberOfConcurrentStates); printf("[displayDebug] max. number of events: %d\n",maxNumberOfEvents); printf("[displayDebug] max. SMI time: %lld\n",maxTimeSMI); @@ -519,7 +632,7 @@ void displayDebug(void){ int initMain(void) { printf("[initMain] allocating system shared memory\n"); - if (initShm(&shm_fd,sizeof(shm_struct),(void *) &shm, SHM_FILE)!=0) { + if (initShm(&shm_fd,sizeof(shm_struct),(void **) &shm, SHM_FILE)!=0) { return 1; } @@ -550,10 +663,13 @@ int rtSmi(void) if (initMain()==1) return 0; clock_getres(CLOCK_MONOTONIC,&ts); - printf("[rtSmi] timer resolution [ns]: %ld\n",ts.tv_nsec); + printf("[rtSmi] CLOCK_MONOTONIC resolution [ns]: %ld\n",ts.tv_nsec); + clock_getres(RT_CLOCK,&ts); + printf("[rtSmi] RT_CLOCK resolution [ns]: %ld\n",ts.tv_nsec); memset(&sp,0,sizeof(sp)); - sp.sched_priority=sched_get_priority_max(SCHED_FIFO); + sp.sched_priority=sched_get_priority_max(SCHED_FIFO)-1; + sp.sched_priority=sched_get_priority_max(SCHED_FIFO); // 99 printf("[rtSmi] scheduling priority=%d\n",sp.sched_priority); sched_setscheduler(0,SCHED_FIFO,&sp); mlockall(MCL_FUTURE|MCL_CURRENT); @@ -570,6 +686,7 @@ int rtSmi(void) displayDebug(); shm->rtSync=RT_STOP; + __sync_synchronize(); while (shm->nrtSync!=NRT_STOP) { usleep(STD_SLEEP); } @@ -592,6 +709,7 @@ int rtSmi(void) if (initMain()==1) return 0; task=rt_task_init(nam2num("main"),0,0,0); +// task=rt_task_init_schmod(nam2num("main"),0,0,0, SCHED_FIFO, 2); // run on second core if (task==NULL) { printf("[rtSmi] rt_task_init failed\n"); @@ -631,6 +749,7 @@ int rtSmi(void) */ shm->rtSync=RT_STOP; + __sync_synchronize(); while (shm->nrtSync!=NRT_STOP) { usleep(STD_SLEEP); } diff --git a/smi/src/shm.c b/smi/src/shm.c index d0df68b85df668e4575f1574d848aca2f95cf17c..5442aa7b5ecc7cdbb1848afb8881127ea0257658 100644 --- a/smi/src/shm.c +++ b/smi/src/shm.c @@ -82,7 +82,6 @@ int closeShm(int shm_fd, char *name) { } - int smiLogRead(int iteration, unsigned char filter, unsigned int *smiIteration, unsigned int *time, @@ -97,14 +96,26 @@ int smiLogRead(int iteration, unsigned char filter, int i,index,n,numberOfEntries; unsigned int smiIterationTmp; stateIDLogType state; + int ret; *numberOfLeafStates=0; // index=smiLogBuf->index; index=__sync_fetch_and_add(&(smiLogBuf->index),0); numberOfEntries=__sync_fetch_and_add(&(smiLogBuf->numberOfEntries),0); + +//if (iteration<0) printf("aaaaaaaaaaaaaaaaaaaaaaa: %d ",index); - if (index==0 && numberOfEntries!=SMI_LOG_BUF_SIZE) return(0); // no log data +static int printOnce=0; + if (index==0 && numberOfEntries!=SMI_LOG_BUF_SIZE) { +// __sync_fetch_and_and(&(smiLogBuf->numberOfEntries),0); +if (printOnce==0) +printf("[smiLogRead] log buffer empty\n"); +printOnce=1; +*smiIteration=0; +*numberOfLeafStates=0; + return(0); // no log data + } else printOnce=0; n=numberOfEntries; smiIterationTmp=0; @@ -112,15 +123,25 @@ int smiLogRead(int iteration, unsigned char filter, index--; if (index<0) index+=SMI_LOG_BUF_SIZE; smiIterationTmp=smiLogBuf->smiLogEntry[index].smiIteration; - if (iteration<0) { - break; - } - if (iteration>smiIterationTmp) return(0); + if (iteration<0) break; + if (iteration>smiIterationTmp) break; if (iteration==smiIterationTmp) break; } - if (i==n && iteration<smiIterationTmp) return(-1); // not found (overflow) - - *smiIteration=smiIterationTmp; + + if (i==n && iteration<smiIterationTmp && iteration>=0) { + return(-1); // not found (overflow) + } else + if (iteration<0) { + ret=0; // newest + } else + if (iteration>smiIterationTmp) { + *smiIteration=iteration; + return(0); + } else { + ret=0; + } + + *smiIteration=smiIterationTmp; *time=smiLogBuf->smiLogEntry[index].time; *numberOfLeafStates=smiLogBuf->smiLogEntry[index].numberOfStates; @@ -146,13 +167,18 @@ int smiLogRead(int iteration, unsigned char filter, *numberOfLeafStates*sizeof(flagsIDType)); */ - if (smiIterationTmp!=smiLogBuf->smiLogEntry[index].smiIteration) return(-1); // entry overwritten during execution - else return(0); + if (smiIterationTmp!=smiLogBuf->smiLogEntry[index].smiIteration) { +// __sync_fetch_and_and(&(smiLogBuf->numberOfEntries),0); + return(-1); // entry overwritten during execution + } else { +// __sync_fetch_and_add(&(smiLogBuf->numberOfEntries),-1); + return(ret); + } } -int getSMIEntry(int iteration, +int getSMIEntry(unsigned int iteration, unsigned int *smiIteration, unsigned int *time, unsigned int *numberOfLeafStates, stateIDType *leafStates, flagsIDType *taskStateFlags, unsigned int *previousNumberOfLeafStates, @@ -176,6 +202,7 @@ int getSMIEntry(int iteration, leafStates, taskStateFlags); +//printf("[getSMIEntry] %d %d\n",i,*smiIteration); if (i<0) { i=smiLogRead(-1, filter, smiIteration, @@ -226,8 +253,9 @@ int getSMIEntry(int iteration, } if (overflow==0) return(change); - else return(-1); - + else { + return(-1); + } } diff --git a/smi/src/smi.c b/smi/src/smi.c index b5e8e641ff0263e31b716040cfc43964aa9ad769..a98038e9e5c8c473542f4a873ee42976fadd9f67 100644 --- a/smi/src/smi.c +++ b/smi/src/smi.c @@ -26,19 +26,21 @@ unsigned int lastNumberOfEvents; void loadSMI(void) { if (shm->newState==1) { //rt_printf("new state added\n"); - memcpy((unsigned char*)&esmState[shm->stateID], - (unsigned char*)&(shm->esmStateTransfer), - sizeof(stateStruct)); - memcpy((unsigned char*)&superstateData[esmState[shm->stateID].stateVar], - (unsigned char*)&(shm->superstateDataTransfer), - sizeof(superstateDataStruct)); + memcpy((unsigned char*)&esmState[shm->stateID], + (unsigned char*)&(shm->esmStateTransfer), + sizeof(stateStruct)); + memcpy((unsigned char*)&superstateData[esmState[shm->stateID].stateVar], + (unsigned char*)&(shm->superstateDataTransfer), + sizeof(superstateDataStruct)); + __sync_synchronize(); shm->newState=0; } if (shm->newTransition==1) { //rt_printf("new transition added\n"); - memcpy((unsigned char*)&transitionData[shm->transitionID], - (unsigned char*)&(shm->transitionDataTransfer), - sizeof(transitionStruct)); + memcpy((unsigned char*)&transitionData[shm->transitionID], + (unsigned char*)&(shm->transitionDataTransfer), + sizeof(transitionStruct)); + __sync_synchronize(); shm->newTransition=0; } } @@ -51,6 +53,7 @@ void loadTaskSlotSchedule(void) { slotStart[slot]=shm->slotStartTime; slotDuration[slot]=shm->slotDuration; slotPeriod[slot]=shm->slotPeriod; + __sync_synchronize(); shm->newSlot=0; } } @@ -62,11 +65,12 @@ void loadTaskDeclaration(void) { //rt_printf("new task added\n"); taskID=shm->taskID; for (i=0;i<MAX_NUMBER_OF_DATA_PORTS_PER_STATE;i++) - taskData[taskID].dataPortType[i]=NA; +// taskData[taskID].dataPortType[i]=NA; // taskData[taskID].exclusive=0; - taskData[taskID].precise=0; +// taskData[taskID].precise=0; taskData[taskID].duration=shm->duration; taskData[taskID].oneShot=shm->oneShot; + __sync_synchronize(); shm->newTask=0; } } @@ -80,7 +84,7 @@ void smi(taskStateStruct *taskState static int indexTimeBufSMI=0; // static int firstCall=1; -#ifdef DEBUG +#ifdef _DEBUG fprintf (stderr, "Entering smi:\n"); #endif @@ -112,7 +116,7 @@ if (firstCall) { if (t2-t1>maxTimeSMI) maxTimeSMI=t2-t1; if (taskState!=NULL) if (t2-t1>taskState->duration) - rt_eprintf("[smi] task exceeded time: %lld s=%d e=%d i=%d\n",t2-t1,shm->numberOfCurrentLeafStates,lastNumberOfEvents,shm->numberOfSMIIterations); + rt_printf("[smi] task exceeded time: %lld s=%d e=%d i=%d\n",t2-t1,shm->numberOfCurrentLeafStates,lastNumberOfEvents,shm->smiIteration); // rt_printf("task state %d exceeded time: %ld\n",taskState->stateID,t2-t1); //rt_printf("smi: %ld\n",t2-t1); } @@ -138,8 +142,8 @@ for (i=0;i<guard->numberOfGuardFlags;i++) { } else if (flag==EXIT_F) { v=atomicStateVariables[stateVar].exit; - if ((shm->taskStateSysVar[atomicStateVariables[stateVar].taskStateVar].flags&TASK_EXIT)!=0) - v=1; +// if ((shm->taskStateSysVar[atomicStateVariables[stateVar].taskStateVar].flags&TASK_EXIT)!=0) +// v=1; } else if (flag==BUSY_F) { if ((shm->taskStateSysVar[atomicStateVariables[stateVar].taskStateVar].flags&TASK_BUSY)!=0) @@ -212,7 +216,7 @@ void initSMI(unsigned int currentTime) { } shm->numberOfCurrentLeafStates=i; } - shm->numberOfSMIIterations=0; + shm->smiIteration=0; } void executeStateMachine(unsigned int currentTime) { @@ -222,6 +226,11 @@ void executeStateMachine(unsigned int currentTime) { int keep; int index; unsigned int timeoutTime; + + __sync_fetch_and_and(&(shm->smiIterationLock),SMI_LOCKED); + __sync_synchronize(); + + // RTIME t; // smiLogBufStruct *smiLogBuf; @@ -245,7 +254,7 @@ indexGettimeBuf++; if (t2-t1>maxGettime) maxGettime=t2-t1; } */ - __sync_fetch_and_and(&(shm->smiLock),0); +// __sync_fetch_and_and(&(shm->smiLock),0); //rt_printf("in=%d ", __sync_fetch_and_add(&(shm->smiLock),0)); /* t1=GETTIME; @@ -262,7 +271,8 @@ t1=GETTIME; } t2=GETTIME; rt_printf("%lld ",(t2-t1)/1000); */ - shm->numberOfCurrentLeafStates=0; + + shm->numberOfCurrentLeafStates=0; // why in shm? for (i=0;i<2*MAX_NUMBER_OF_CONCURRENT_STATES;i++) { @@ -296,7 +306,7 @@ if (t2-t1>maxGettime) maxGettime=t2-t1; */ logFilter[shm->numberOfCurrentLeafStates]=esmState[atomicStateVariables[i].stateID].filter; -#ifdef DEBUG +#ifdef _DEBUG fprintf (stderr, "LEAF STATE: %d\n", atomicStateVariables[i].stateID); #endif currentTaskStateFlags[shm->numberOfCurrentLeafStates]=0; @@ -308,40 +318,58 @@ if (t2-t1>maxGettime) maxGettime=t2-t1; currentTaskStateFlags[shm->numberOfCurrentLeafStates]|=TASK_TIMEOUT; if ((shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].flags&TASK_BUSY)!=0) currentTaskStateFlags[shm->numberOfCurrentLeafStates]|=TASK_BUSY; - if (__sync_fetch_and_and(&(shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].exit),0)==ATOMIC_UNLOCKED) { -//rt_printf("bbbb->%d ",__sync_fetch_and_add(&(shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].exit),0)); - shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].flags|=TASK_EXIT; + +// if (__sync_fetch_and_and(&(shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].exit),0)==ATOMIC_UNLOCKED) { +/* +printf("_%d_%d_%p_%p ",atomicStateVariables[i].taskStateVar, +shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].nrtExit, +&(shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].nrtExit), +&shm); +*/ + if (shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].nrtExit==1) { +// shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].flags|=TASK_EXIT; +/* for (j=0;j<MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE;j++) { shm->taskState[atomicStateVariables[i].taskStateVar].outputControlFlag[j] =shm->controlFlags[atomicStateVariables[i].taskStateVar].outputControlFlag[j]; shm->taskState[atomicStateVariables[i].taskStateVar].inputControlFlag[j] =shm->controlFlags[atomicStateVariables[i].taskStateVar].inputControlFlag[j]; } +*/ + atomicStateVariables[i].exit=1; + shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].nrtExit=0; } - if ((shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].flags&TASK_EXIT)!=0) - currentTaskStateFlags[shm->numberOfCurrentLeafStates]|=TASK_EXIT; - else + +// if ((shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].flags&TASK_EXIT)!=0) +// currentTaskStateFlags[shm->numberOfCurrentLeafStates]|=TASK_EXIT; +// else + if (atomicStateVariables[i].exit==1) currentTaskStateFlags[shm->numberOfCurrentLeafStates]|=TASK_EXIT; -if (shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].nrt==0 || -__sync_fetch_and_and(&(shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].exit),1)==ATOMIC_UNLOCKED) + +//if (shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].nrt==0 || +//__sync_fetch_and_and(&(shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].exit),1)==ATOMIC_UNLOCKED) for (j=0;j<MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE;j++) { if (shm->taskState[atomicStateVariables[i].taskStateVar].outputControlFlag[j]==1) { currentTaskStateFlags[shm->numberOfCurrentLeafStates]|=(1<<(j+8)); } } + } shm->numberOfCurrentLeafStates=shm->numberOfCurrentLeafStates+1; } } - + /* new log */ int numberOfEntries; numberOfEntries=__sync_fetch_and_add(&(smiLogBuf->numberOfEntries),0); + + __sync_synchronize(); // index=smiLogBuf->index; index=__sync_fetch_and_add(&(smiLogBuf->index),0); +//rt_printf("%d_%d ",numberOfEntries,index); if (SMI_LOG_BUF_SIZE>0) { - smiLogBuf->smiLogEntry[index].smiIteration=shm->numberOfSMIIterations; + smiLogBuf->smiLogEntry[index].smiIteration=shm->smiIteration; smiLogBuf->smiLogEntry[index].time=GETTIME_MS; smiLogBuf->smiLogEntry[index].numberOfStates=shm->numberOfCurrentLeafStates; memcpy((unsigned char*)smiLogBuf->smiLogEntry[index].smiStateLogBuf, @@ -361,6 +389,7 @@ __sync_fetch_and_and(&(shm->taskStateSysVar[atomicStateVariables[i].taskStateVar // smiLogBuf->index=index; __sync_fetch_and_add(&(smiLogBuf->index), index-__sync_fetch_and_add(&(smiLogBuf->index),0)); + __sync_synchronize(); if (numberOfEntries<SMI_LOG_BUF_SIZE) { // smiLogBuf->numberOfEntries+=1; __sync_fetch_and_add(&(smiLogBuf->numberOfEntries),1); @@ -403,7 +432,6 @@ if (atomicStateVariables[i].stateID==15) { if (keep==0) { shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].flags&=~(TASK_EXEC); //if (atomicStateVariables[i].stateID==46) -//printf("aaaaaaaaaaaaaaaaaaaaaaa r=%d\n",atomicStateVariables[i].stateID); } } } @@ -428,12 +456,11 @@ if (atomicStateVariables[i].stateID==15) { } if (shm->numberOfCurrentLeafStates>maxNumberOfConcurrentStates) maxNumberOfConcurrentStates=shm->numberOfCurrentLeafStates; -// shm->numberOfSMIIterations=shm->numberOfSMIIterations+1; - __sync_fetch_and_add(&(shm->numberOfSMIIterations),1); - __sync_fetch_and_add(&(shm->smiLock), - __sync_fetch_and_add(&(shm->numberOfSMIIterations),0) - -__sync_fetch_and_add(&(shm->smiLock),0)); -//rt_printf("out=%d ", __sync_fetch_and_add(&(shm->smiLock),0)); + + __sync_synchronize(); + __sync_fetch_and_add(&(shm->smiIteration),1); + __sync_synchronize(); + __sync_fetch_and_add(&(shm->smiIterationLock),shm->smiIteration); } void visitStates(stateIDType superstate) { @@ -529,7 +556,10 @@ printf("transition\n"); atomicStateVariables[i].slot=esmState[nextLocalState].slot; // shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].flags|=TASK_SMI; atomicStateVariables[i].exec=1; - shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].flags|=TASK_EXEC; + if ((shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].flags&TASK_EXEC)==0) { + shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].nrtExit=0; + shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].flags|=TASK_EXEC; + } //if (atomicStateVariables[i].stateID==217) {abc=i; printf("@\n");} //if (atomicStateVariables[i].stateID==204) {def=i; printf("got ya %d\n",atomicStateVariables[abc].status);} atomicStateVariables[i].exit=0; @@ -538,12 +568,6 @@ printf("transition\n"); // taskData[atomicStateVariables[i].taskID].exclusive; // shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].oneShot= // taskData[atomicStateVariables[i].taskID].oneShot; - shm->taskState[atomicStateVariables[i].taskStateVar].duration= - taskData[atomicStateVariables[i].taskID].duration; -// shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].oneShot= -// taskData[atomicStateVariables[i].taskID].oneShot; - shm->taskState[atomicStateVariables[i].taskStateVar].stateID= - nextLocalState; atomicStateVariables[i].overrun=0; atomicStateVariables[i].timeout=0; if ((currentLocalState!=nextLocalState)|| @@ -552,6 +576,11 @@ printf("transition\n"); } if (currentLocalState!=nextLocalState) { // shm->taskState[atomicStateVariables[i].taskStateVar].init=1; +// shm->taskStateSysVar[atomicStateVariables[i].taskStateVar].nrtExit=0; + shm->taskState[atomicStateVariables[i].taskStateVar].duration= + taskData[atomicStateVariables[i].taskID].duration; + shm->taskState[atomicStateVariables[i].taskStateVar].stateID= + nextLocalState; for (j=0;j<MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE;j++) { shm->taskState[atomicStateVariables[i].taskStateVar].inputControlFlag[j]=0; } diff --git a/smi/src/smi_def.h b/smi/src/smi_def.h index f5b67912ab6dd71113bd4b6b7d4c794402f2a600..1c79e15747ef31772bbe4b8d9b84a9a25b6a20a6 100644 --- a/smi/src/smi_def.h +++ b/smi/src/smi_def.h @@ -1,15 +1,21 @@ #ifndef SMIDEF_H #define SMIDEF_H -#define ATOMIC_UNLOCKED -1 +#define VERSION_MAJOR 2 +#define VERSION_MINOR 19 + +#define ATOMIC_UNLOCKED -1 +#define ATOMIC_UNLOCKED0 0 +#define SMI_LOCKED 0 #define NIL 0 #define AVAILABLE 0 #define REQUESTED 1 #define BUSY 2 -#define SMI_LOG_BUF_SIZE (1*1024) +#define SMI_LOG_BUF_SIZE (2*1024) +#define MAX_NUMBER_OF_ESM_STATES (4096) #define MAX_NUMBER_OF_CONCURRENT_STATES 100 #define MAX_NUMBER_OF_REGIONS_PER_SUPERSTATE 32 #define MAX_NUMBER_OF_TRANSITIONS_PER_STATE 16 //8 @@ -17,7 +23,6 @@ #define MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE 8 #define MAX_NUMBER_OF_CONTROL_FLAGS_PER_ACTION 8 #define MAX_NUMBER_OF_EVENTS_PER_ACTION 8 -#define MAX_NUMBER_OF_ESM_STATES (2048+1024) #define MAX_NUMBER_OF_GUARD_FLAGS 8 #define MAX_NUMBER_OF_DATA_PORTS_PER_STATE 16 #define MAX_NUMBER_OF_SUPERSTATES 256 @@ -27,6 +32,9 @@ #define MAX_NUMBER_OF_TASKS 512 #define MAX_NUMBER_OF_PROCESSES 16 +#include <stdint.h> +typedef volatile signed char atomicInt8Type; // assumption: memory access of type character always atomic + typedef unsigned short stateVarIndexType; typedef unsigned short taskIDType; typedef unsigned short slotType; @@ -44,22 +52,24 @@ typedef unsigned short flagsIDType; typedef volatile struct { unsigned int duration; - signed char oneShot; - signed char precise; - signed char dataPortType[MAX_NUMBER_OF_DATA_PORTS_PER_STATE]; + atomicInt8Type oneShot; +// atomicInt8Type precise; +// atomicInt8Type dataPortType[MAX_NUMBER_OF_DATA_PORTS_PER_STATE]; } taskDataStruct; typedef volatile struct { stateIDType stateID; + taskIDType taskID; unsigned int duration; unsigned int period; - int inputControlFlag[MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE]; - int outputControlFlag[MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE]; + atomicInt8Type inputControlFlag[MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE]; + atomicInt8Type outputControlFlag[MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE]; + unsigned int index; } taskStateStruct; typedef volatile struct { - signed char inputControlFlag[MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE]; - signed char outputControlFlag[MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE]; + atomicInt8Type inputControlFlag[MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE]; + atomicInt8Type outputControlFlag[MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE]; } controlFlagsStruct; @@ -70,13 +80,11 @@ typedef volatile struct { #define TASK_ACTIVE 0x04 #define TASK_BUSY 0x08 #define TASK_SMI 0x20 - int exit; -// signed char outputControlFlagTmp[MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE]; - int flags; + atomicInt8Type flags; taskIDType taskID; processType process; - signed char nrt; -// signed char oneShot; + atomicInt8Type nrt; + atomicInt8Type nrtExit; unsigned char numberOfDataPorts; dataPathIDType dataPort[MAX_NUMBER_OF_DATA_PORTS_PER_STATE]; } taskStateSysVarStruct; @@ -151,8 +159,8 @@ typedef volatile struct { } eventStruct; -typedef volatile struct { - unsigned int smiIteration; +typedef volatile struct __attribute__((__packed__)) { + unsigned int smiIteration; // ? was signed int unsigned int time; unsigned short numberOfStates; flagsIDType smiFlagsLogBuf[MAX_NUMBER_OF_CONCURRENT_STATES]; @@ -164,19 +172,19 @@ typedef volatile struct { } smiLogEntryStruct; -typedef volatile struct { +typedef volatile struct __attribute__((__packed__)){ int index; int numberOfEntries; smiLogEntryStruct smiLogEntry[SMI_LOG_BUF_SIZE]; } smiLogBufStruct; -typedef volatile struct { +typedef volatile struct __attribute__((__packed__)){ unsigned char sent; unsigned char received; unsigned char messageNumber; unsigned char stateIndex; unsigned short numberOfStates; - unsigned int smiIteration; + unsigned int smiIteration; // ? was signed int stateIDType state; flagsIDType flags; } smiTelemStruct; diff --git a/smi/src/smi_nrt.c b/smi/src/smi_nrt.c index b8728f5d4cd9d2fa0756a181204ce6f28525890f..d128359c247d89f8ae42db1282af267a3767cbf9 100644 --- a/smi/src/smi_nrt.c +++ b/smi/src/smi_nrt.c @@ -2,6 +2,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <unistd.h> #include "smi_def.h" #include "sys_def.h" @@ -195,7 +196,7 @@ printf("new format\n"); } else shm->taskStateSysVar[shm->esmStateTransfer.taskStateVar].dataPort[i]=NA; } shm->taskStateSysVar[shm->esmStateTransfer.taskStateVar].flags=0; - shm->taskStateSysVar[shm->esmStateTransfer.taskStateVar].exit=0; + shm->taskStateSysVar[shm->esmStateTransfer.taskStateVar].nrtExit=0; if (index+1>=numberBufferSize) { error=12; @@ -349,8 +350,9 @@ printf("[parseESM] stateID=%d ",shm->stateID); ret=1; } // add state to esmState shm->newState=1; + __sync_synchronize(); while (shm->newState==1) { - i++; + usleep(STD_SLEEP); } } if (section==2) { @@ -359,8 +361,9 @@ printf("[parseESM] transitionID=%d ",shm->transitionID); ret=1; } // add transition to transitionData shm->newTransition=1; + __sync_synchronize(); while (shm->newTransition==1) { - i++; + usleep(STD_SLEEP); } } if (ret==1) { @@ -387,7 +390,6 @@ int parseTaskSlotSchedule(shm_struct *shm, char *tssFile) { char *token; int number; int tokenCounter; - int i; shm->numberOfSlots=0; @@ -437,8 +439,9 @@ printf("[parseTaskSlotSchedule] tss file successfully parsed\n"); } else { shm->slotPeriod=number; shm->newSlot=1; + __sync_synchronize(); while (shm->newSlot==1) { - i++; + usleep(STD_SLEEP); } ret=0; } @@ -469,7 +472,6 @@ int parseTaskDeclaration(shm_struct *shm, char *tdeFile) { char *token; int number; int tokenCounter; - int i; printf("[parseTaskDeclaration] parsing task declaration file\n"); fpt=fopen(tdeFile,"rt"); @@ -509,8 +511,9 @@ printf("[parseTaskDeclaration] tde file successfully parsed\n"); if (ret==1 && tokenCounter==3) { shm->oneShot=number; shm->newTask=1; + __sync_synchronize(); while (shm->newTask==1) { - i++; + usleep(STD_SLEEP); } ret=0; } else if (ret!=1 && tokenCounter<=3) { diff --git a/smi/src/smi_user.h b/smi/src/smi_user.h index f770a1488ac09d4f8219151c92488534e9310f8a..ef8f16ccc82fb6ae4baabe3c41636bf40ecc4a32 100644 --- a/smi/src/smi_user.h +++ b/smi/src/smi_user.h @@ -1,13 +1,18 @@ +#ifndef SMIUSER_H +#define SMIUSER_H + #ifdef _NRT int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile); int nrtTask(int nrtProcessID); int smiplay(char *hostname, char *fileName); + +extern unsigned int *smiIterationNRT; #endif #ifndef _NRT int rtSmi(void); int rt_printf(const char *str, ...); int rt_eprintf(const char *str, ...); -RTIME smiStart; +extern RTIME smiStart; void smiPrint(int change, unsigned int smiIteration, unsigned int time, @@ -17,6 +22,15 @@ void smiPrint(int change, ); void smiTelemCopy(unsigned int smiIteration, unsigned int numberOfStates, stateIDType *leafStates, flagsIDType *taskStateFlags); + +extern RTIME clockOffset; +//extern int *run; +extern unsigned int *smiIterationRT; + +extern smiLogBufStruct *smiTelemBuf; +extern RTIME smiStart; +//RTIME smiStart; + #ifndef RT_DEBUG_VERBOSE_LEVEL #define rt_debug(lvl, fmt, args...) #elif(RT_DEBUG_VERBOSE_LEVEL>0) @@ -31,7 +45,7 @@ int smiLogRead(int iteration, unsigned char filter, unsigned int *numberOfLeafStates, stateIDType *leafStates, flagsIDType *taskStateFlags); -int getSMIEntry(int iteration, +int getSMIEntry(unsigned int iteration, unsigned int *smiIteration, unsigned int *time, unsigned int *numberOfLeafStates, stateIDType *leafStates, flagsIDType *taskStateFlags, unsigned int *previousNumberOfLeafStates, @@ -47,9 +61,6 @@ void suspend(int time); int checkOptionalDataPort(void* port); -extern RTIME clockOffset; -extern int *run; -extern unsigned int *smiIterations; extern smiLogBufStruct *smiLogBuf; -extern smiLogBufStruct *smiTelemBuf; -extern RTIME smiStart; + +#endif diff --git a/smi/src/smiplay_nrt.c b/smi/src/smiplay_nrt.c index 7d472a032c52a0d1c3b2b05ac538984301b19c8b..94c7028768a4389d9496eb559f9b188125b1d105 100644 --- a/smi/src/smiplay_nrt.c +++ b/smi/src/smiplay_nrt.c @@ -13,9 +13,9 @@ int printOnce=0; // UDP socket related -unsigned short usiGUIUDPPort, usiLocalUDPPort; -int iGUIUDPSocket; -struct sockaddr_in addrGUIUDP; +extern unsigned short usiGUIUDPPort, usiLocalUDPPort; +extern int iGUIUDPSocket; +extern struct sockaddr_in addrGUIUDP; int initUDPSocket(int *UDP_socket, struct sockaddr_in *UDPRemote_addr, unsigned short *usiUDPRemote_port, char rgcHostName[], char rgcName[]); int initIPC(char *rgcHostName); @@ -29,7 +29,7 @@ int initUDPSocket(int *UDP_socket, struct sockaddr_in *UDPRemote_addr, unsigned UDPRemote_addr->sin_port = htons( (u_short) *usiUDPRemote_port ); if ((he=gethostbyname(rgcHostName))==0){ -if (printOnce&1==0) { +if ((printOnce&1)==0) { printf("\n[initUDPSocket] Couldn't resolve \"%s\" host name\n",rgcHostName); fflush(stdout); printOnce|=1; @@ -66,7 +66,7 @@ int initIPC(char *rgcHostName){ usiGUIUDPPort = 7070; sprintf(rgcGUIHostName,"%s",rgcHostName); -if (printOnce&2==0) { +if ((printOnce&2)==0) { printf("[initIPC] %s\n",rgcGUIHostName); printOnce|=2; } @@ -121,7 +121,7 @@ int smiplay(char *hostname, char *fileName) { } if (n!=3) { - printf("[smiplay] format error\n"); + printf("[smiplay] format error 1 %d\n",n); fclose(fp); return EXIT_FAILURE; @@ -141,7 +141,7 @@ int smiplay(char *hostname, char *fileName) { for (i=0;i<numberOfStates;i++) { n=fscanf(fp,"%d %d ",&state,&flags); if (n!=2) { - printf("[smiplay] format error\n"); + printf("[smiplay] format error 2 %d\n",n); fclose(fp); return EXIT_FAILURE; diff --git a/smi/src/sys_def.h b/smi/src/sys_def.h index fb9f49798c05c1478a79f885d5e6d8e1f1e66d61..aac0e72604593a953a0d088658221b0d85bf3cd5 100644 --- a/smi/src/sys_def.h +++ b/smi/src/sys_def.h @@ -1,4 +1,26 @@ -/* real-time timer macros */ +#ifndef SYSDEF_H +#define SYSDEF_H + +/* real-time timer types, variables, macros and inline functions */ + +#include <time.h> + +extern int nanosleepUnit; + +#define MAX_LOCK_TIME 10 // ms +#define MAX_LOCK_ITER (MAX_LOCK_TIME/(STD_SLEEP/1000)) // =10ms +#define STD_SLEEP 1000 // us +#define STD_RT_SLEEP 10000 // ns +//#define NANO_SUSPEND_UNIT 20000 // 20000 // set to zero for single sleep operation +//#define RT_CLOCK CLOCK_MONOTONIC_RAW +#define RT_CLOCK CLOCK_MONOTONIC + + +#ifndef _RTAI +#define RTIME long long int +#endif + +#ifndef _NRT #ifdef _RTAI #include <rtai_lxrt.h> @@ -6,8 +28,120 @@ #endif #ifndef _RTAI -#define RTIME long long int #define GETTIME getTime() #endif #define GETTIME_MS getTime_ms() + +#ifndef _RTAI +static void nanoSuspend(RTIME nsec, int rtSleepTolerance) __attribute__((always_inline)); +static RTIME getTime(void) __attribute__((always_inline)); +#endif +static unsigned int getTime_ms(void) __attribute__((always_inline)); + +extern RTIME smiStart; + +extern RTIME maxTimeBetweenSleep,tLastSuspension; + +#ifndef _RTAI +#include <stdio.h> + +inline static void nanoSuspend2(RTIME nsec) { + struct timespec ts; + ts.tv_sec=0; + ts.tv_nsec=nsec; + clock_nanosleep(CLOCK_MONOTONIC,0,&ts,NULL); +} + +inline static void nanoSuspend(RTIME nsec, int rtSleepTolerance) { + struct timespec ts1,ts2; + RTIME t1,t2; + clock_gettime(RT_CLOCK,&ts1); + t1=ts1.tv_nsec+1000000000*(RTIME)ts1.tv_sec; + ts1.tv_sec=0; + + +//if (nsec>300000) printf("nanoSuspend: %lld\n",nsec); + t2=t1; + while (t2-t1<nsec-rtSleepTolerance) { +//printf("%ld ",ts1.tv_nsec/1000); +//tlast=t2-t1; + if (nanosleepUnit<=0 || nsec-(t2-t1)-rtSleepTolerance<nanosleepUnit) ts1.tv_nsec=nsec-(t2-t1)-rtSleepTolerance; + else ts1.tv_nsec=nanosleepUnit; + + if (ts1.tv_nsec>0) { + clock_nanosleep(CLOCK_MONOTONIC,0,&ts1,NULL); + } + clock_gettime(RT_CLOCK,&ts2); + t2=ts2.tv_nsec+1000000000*(RTIME)ts2.tv_sec; + + if (ts1.tv_nsec>0) { +//printf("%d_%d_%d ",(int)(t2-tLastSuspension)/1000,(int)t2/1000,(int)tLastSuspension/1000); + if (t2-tLastSuspension>maxTimeBetweenSleep && tLastSuspension>0) { + maxTimeBetweenSleep=t2-tLastSuspension; + } + tLastSuspension=t2; + } + } +} + +#if 0 +inline static void nanoSuspend(RTIME nsec, int rtSleepTolerance) { + struct timespec ts1,ts2; + RTIME t1,t2; +// RTIME tlast; + clock_gettime(RT_CLOCK,&ts1); + t1=ts1.tv_nsec+1000000000*(RTIME)ts1.tv_sec; + ts1.tv_sec=0; +/* + if (nanosleepUnit<=0) ts1.tv_nsec=nsec-rtSleepTolerance; + else { + ts1.tv_nsec=nanosleepUnit; + if (nsec<nanosleepUnit) ts1.tv_nsec=nsec; + } + t2=t1+ts1.tv_nsec; +//printf("new%lld_%ld ",nsec,ts1.tv_nsec); +tlast=0; +*/ + t2=t1; + while (t2-t1<=nsec-rtSleepTolerance) { +//printf("%ld ",ts1.tv_nsec/1000); +//tlast=t2-t1; + if (nanosleepUnit<=0 || nsec-(t2-t1)<nanosleepUnit) ts1.tv_nsec=nsec-(t2-t1)-rtSleepTolerance; + else ts1.tv_nsec=nanosleepUnit-rtSleepTolerance; + + if (ts1.tv_nsec>0) { + clock_nanosleep(CLOCK_MONOTONIC,0,&ts1,NULL); + } + clock_gettime(RT_CLOCK,&ts2); + t2=ts2.tv_nsec+1000000000*(RTIME)ts2.tv_sec; +//if (/*t2-t1-30000>nsec &&*/ nsec!=1000000) +// printf("%lld_%lld_%ld_%lld ",t1/1000000,nsec,ts1.tv_nsec,t2-t1); +// if (t2-t1+nanosleepUnit+30000>=nsec) ts1.tv_nsec=nsec-(t2-t1)-30000; +// if (t2-t1+nanosleepUnit>=nsec) ts1.tv_nsec=nsec-(t2-t1); +//if (t2-t1-nsec>70000) printf("%lld_%lld ",t2-t1-nsec,tlast-nsec); + } +} +#endif + +inline static RTIME getTime(void) { + struct timespec ts; + clock_gettime(RT_CLOCK,&ts); + return(ts.tv_nsec+1000000000*(RTIME)ts.tv_sec); +} +#endif + +inline static unsigned int getTime_ms(void) { +#ifdef _RTAI + return((unsigned int)((rt_get_cpu_time_ns()-smiStart)/1000000+0.5)); +#endif +#ifndef _RTAI + struct timespec ts; + clock_gettime(RT_CLOCK,&ts); + return((unsigned int)((ts.tv_nsec+1000000000*(long long)ts.tv_sec-smiStart)/1000000+0.5)); +#endif +} + +#endif + +#endif diff --git a/smi/src/taskdisp.c b/smi/src/taskdisp.c index 059d8899ee053b84405484dbb802cd41f844a6e1..89622338ad24061f9b341083da19140ec06d4100 100644 --- a/smi/src/taskdisp.c +++ b/smi/src/taskdisp.c @@ -6,9 +6,11 @@ #include <rtai_lxrt.h> #endif -#ifdef DEBUG + +#ifdef _DEBUG #include <stdio.h> #endif + //int count; //#define FREE_CPU 1 @@ -23,28 +25,46 @@ #include "smi_symbols.h" -extern void execTask(taskStateStruct *taskState,taskStateSysVarStruct *taskStateSysVar,taskIDType taskID); +//extern +void execTask(taskStateStruct *taskState,taskStateSysVarStruct *taskStateSysVar,taskIDType taskID); + +extern RTIME maxLatency; +extern int latencyBuf[LATENCY_BUF_SIZE]; +extern int fullLatencyBuf; +extern int indexLatencyBuf; +extern RTIME maxSleep; +extern int sleepBuf[SLEEP_BUF_SIZE]; +extern int fullSleepBuf; +extern int indexSleepBuf; +extern RTIME maxTimeBetweenSleep; void *pointerToAllocatedMemory[MAX_NUMBER_OF_DATA_PATHS]; void *dataPathPointer[MAX_NUMBER_OF_DATA_PATHS]; +//extern RTIME tsc2,tsc3; void taskDispatcher(void) { int i,taskVarIndex,slot,slotMax,lastSlot; - RTIME t,dt,tMax,tTmp,period; + RTIME t,dt,tMax,tTmp,period,tLat; RTIME slotStartAbs[MAX_NUMBER_OF_SLOTS+1]; RTIME slotEndAbs[MAX_NUMBER_OF_SLOTS+1]; // RTIME lastSuspend=0; int numberOfSlots; int corrections=0; - int periodFlag=0; +// int periodFlag=0; + RTIME tStart, tEnd, tsl=0; + int sf=0; +//static RTIME tx=0; +// RTIME tOverLast=0,tOver=0; +// int overSlotLast=0; + #ifndef _RTAI - struct timespec ts; +// struct timespec ts; #endif // initTasks(); //int *run2; //run2=run; -#ifdef DEBUG +#ifdef _DEBUG fprintf (stderr, "Entering taskDispatcher\n"); #endif @@ -67,7 +87,6 @@ void taskDispatcher(void) { rt_printf("[taskDispatcher] scheduler period [ns]: %d\n",(int)period); taskSchedulerDelay=0; - clockOffset=0; shm->run=1; slot=1; @@ -77,31 +96,100 @@ void taskDispatcher(void) { slotMax=0; tMax=0; lastSlot=0; - + +#ifndef _RTAI + nanoSuspend(nanosleepUnit,0); +#endif + + maxTimeBetweenSleep=0; + t=GETTIME; for (i=1;i<=numberOfSlots;i++) { slotStartAbs[i]+=t; slotEndAbs[i]+=t; } -//printf("@@@@qqqqqqqqqqq@@@@@@@@@@@@@@@@@@@@ run var address = %p %d\n",run,*run); //count=0; while (shm->run==1) { +/* +if (shm->freeCPU==2) { +#ifndef _RTAI +static RTIME tx=0; +t=GETTIME; +if (t-tx>500000) { +//rt_printf(". "); +//rt_printf("%lld ",t-tx); +tx=t; +nanoSuspend(STD_RT_SLEEP,0); +} +#endif +} +*/ +/* + nanoSuspend(nanosleepUnit,0); t=GETTIME; +*/ + + +t=GETTIME; + + +//rt_printf("%lld ",(t/1000-tx)); +//rt_printf("."); for (i=1;i<=numberOfSlots;i++) { - tTmp=t-(slotStartAbs[i]+(taskSchedulerDelay+clockOffset)); + tTmp=t-(slotStartAbs[i]+(taskSchedulerDelay)); if (tTmp>=tMax || i==1) { tMax=tTmp; slotMax=i; } } +dt=GETTIME-tsl; +if ((-tMax>nanosleepUnit && sf==0) +//||(dt>300000 && tsl!=0) +) +//) +{ +if (shm->freeCPU==2 || shm->freeCPU==3) { +#ifndef _RTAI +//if (dt>350000) rt_printf("aaaaaaaaaaaaaaaaa_%d\n",dt/1000); + t=GETTIME; + nanoSuspend(nanosleepUnit,0); + tLat=GETTIME; +//rt_printf("%d ",(int)(t-tsl)/1000); +tsl=t; + sf=1; + dt=tLat-t-nanosleepUnit; + + if (indexSleepBuf>=SLEEP_BUF_SIZE) { + indexSleepBuf=0; + fullSleepBuf=1; + } else { + sleepBuf[indexSleepBuf]=(int)dt; + indexSleepBuf++; + } + + if (dt>maxSleep) maxSleep=dt; +//rt_printf("%ld_%ld ",dt,maxSleep); + if (dt>shm->rtSleepTolerance) { +#ifdef _TWARN +rt_printf("sleep: latency=%d tolerance=%d\n",(int)dt,shm->rtSleepTolerance); +#endif + } + t=tLat; +#else + t=GETTIME; +#endif +} +} + if (tMax>=0) { + sf=0; +//rt_printf("%d ",tMax); slot=slotMax; - //rt_printf("%d ",slot); /* if (corrections>0) { @@ -112,14 +200,30 @@ rt_printf("%d ",(int)((slotStartAbs[slot]+(taskSchedulerDelay+clockOffset)-smiSt //rt_printf("s%d ",slot); } */ - dt=t-(slotStartAbs[slot]+(taskSchedulerDelay+clockOffset)); + dt=t-(slotStartAbs[slot]+(taskSchedulerDelay)); + + if (indexLatencyBuf>=LATENCY_BUF_SIZE) { + indexLatencyBuf=0; + fullLatencyBuf=1; + } else { + latencyBuf[indexLatencyBuf]=(int)(dt); + indexLatencyBuf++; + } + if (dt>maxLatency) maxLatency=dt; + if (dt>shm->taskSlotTimeTolerance) { corrections++; -rt_eprintf("Slot %d delayed %d\n",slot,dt); -rt_eprintf("last slot %d pF=%d\n",lastSlot,periodFlag); +#if _TWARN +//rt_printf("s%d_%d_%d ",t/1000,slotStartAbs[slot]/1000,taskSchedulerDelay/1000); +rt_printf("Slot %d delayed; latency=%lld tolerance=%d maxLatency=%lld ",slot,dt,shm->taskSlotTimeTolerance,maxLatency); +rt_printf("prev. slot=%d\n",lastSlot); +//shm->run=0; +#endif +lastSlot=lastSlot; // eliminate compiler warning //rt_printf("tSD %d\n",(int)taskSchedulerDelay); if (shm->delayCorrection) { taskSchedulerDelay+=dt; +//rt_printf("tsd=%lld\n",taskSchedulerDelay/1000); // if (corrections>10) shm->run=0; } else { shm->run=0; @@ -127,51 +231,72 @@ rt_eprintf("last slot %d pF=%d\n",lastSlot,periodFlag); } } - +// tStart=tEnd=t; + tStart=tEnd=GETTIME; for (i=0;i<numberOfTasksInSlot[slot];i++) { +//if (slot==4 && i==0) rt_printf("%lld\n",GETTIME); taskVarIndex=tasksInSlot[slot].taskVarIndex[i]; if (atomicStateVariables[taskVarIndex].exec==1 && (atomicStateVariables[taskVarIndex].exit==0 || taskData[atomicStateVariables[taskVarIndex].taskID].oneShot==0)) { if ((t+taskData[atomicStateVariables[taskVarIndex].taskID].duration) > - (slotEndAbs[slot]+(taskSchedulerDelay+clockOffset)+shm->taskSlotTimeTolerance)) { +// (slotEndAbs[slot]+(taskSchedulerDelay+clockOffset)+shm->taskSlotTimeTolerance) + (tStart+slotDuration[slot]) + ) { shm->taskStateSysVar[atomicStateVariables[taskVarIndex].taskStateVar].flags|=TASK_BUSY; // atomicStateVariables[taskVarIndex].exec=0; -rt_eprintf("%d %d ",i,(int)(t-(taskSchedulerDelay+clockOffset)-slotStartAbs[slot])); -if (i!=0) rt_eprintf("prev=%d ",atomicStateVariables[tasksInSlot[slot].taskVarIndex[0]].stateID); - rt_eprintf("busy stateID=%d slot=%d %d\n",atomicStateVariables[taskVarIndex].stateID, - atomicStateVariables[taskVarIndex].slot, - (int)(slotEndAbs[slot]+(taskSchedulerDelay+clockOffset)+shm->taskSlotTimeTolerance-t) - ); + +#ifdef _TWARN +rt_printf("busy: stateID=%d slot=%d i_slot=%d t_needed=%d t_rem=%d ", +atomicStateVariables[taskVarIndex].stateID, +atomicStateVariables[taskVarIndex].slot,i, +//(int)(slotEndAbs[slot]+(taskSchedulerDelay+clockOffset)+shm->taskSlotTimeTolerance-t) +taskData[atomicStateVariables[taskVarIndex].taskID].duration, +(int)(tStart+slotDuration[slot]-t) +); +//rt_printf("t_used=%d ",(int)(t-(taskSchedulerDelay+clockOffset)-slotStartAbs[slot])); +rt_printf("t_used=%d ",(int)(t-tStart)); +if (i!=0) rt_printf("prev. stateID=%d\n",atomicStateVariables[tasksInSlot[slot].taskVarIndex[0]].stateID); +else rt_printf("\n"); +#endif + // rt_printf("debug:%d %d ",numberOfTasksInSlot[slot],atomicStateVariables[tasksInSlot[slot].taskVarIndex[0]].stateID); //shm->run=0; } else - shm->taskStateSysVar[atomicStateVariables[taskVarIndex].taskStateVar].flags&=~(TASK_BUSY); + shm->taskStateSysVar[atomicStateVariables[taskVarIndex].taskStateVar].flags&=~(TASK_BUSY); // execute task even if busy { // if (atomicStateVariables[taskVarIndex].exit==0) atomicStateVariables[taskVarIndex].startTime=t; // dataPathPointer[0]=NULL; if (shm->run==1) { +//printf("%d ",atomicStateVariables[taskVarIndex].taskID);fflush(stdout); //rt_printf("t%ds%d ",atomicStateVariables[taskVarIndex].taskID,slot); /*if (count==564) { printf("one before\n"); } printf("%d ",atomicStateVariables[taskVarIndex].taskID); -if (run!=run2) {printf("@@@@qqqqqqqqqqq@@@@@@@@@@@@@@@@@@@@ run var address = %p count=%d\n",run,count); shm->run=0; } count++; */ /* if (atomicStateVariables[taskVarIndex].taskID==41) { -rt_printf("@@@@@@@@@@@@@@@@@@@@@@@@ run var address = %p\n",run); } */ // shm->taskStateSysVar[atomicStateVariables[taskVarIndex].taskStateVar].flags&=~(TASK_BUSY); shm->taskState[atomicStateVariables[taskVarIndex].taskStateVar].period=slotPeriod[slot]; +//if (slot==4 && i==0) rt_printf("2: %d %lld\n",shm->taskState[atomicStateVariables[taskVarIndex].taskStateVar].stateID,GETTIME); + shm->taskState[atomicStateVariables[taskVarIndex].taskStateVar].taskID=atomicStateVariables[taskVarIndex].taskID; + shm->taskState[atomicStateVariables[taskVarIndex].taskStateVar].index=atomicStateVariables[taskVarIndex].taskStateVar; execTask(&shm->taskState[atomicStateVariables[taskVarIndex].taskStateVar], &shm->taskStateSysVar[atomicStateVariables[taskVarIndex].taskStateVar], atomicStateVariables[taskVarIndex].taskID); +//printf("d ");fflush(stdout); +/* + ts.tv_sec=0; + ts.tv_nsec=STD_RT_SLEEP; + clock_nanosleep(CLOCK_MONOTONIC,0,&ts,NULL); +*/ atomicStateVariables[taskVarIndex].exit=1; // shm->taskState[atomicStateVariables[taskVarIndex].taskStateVar].init=0; } @@ -189,43 +314,113 @@ rt_printf(":%d ",atomicStateVariables[taskVarIndex].startTime); } } if (shm->run==0) break; +/* +if (shm->freeCPU==2) { +#ifndef _RTAI +//t=GETTIME; +//if (t-tx>STD_RT_SLEEP0) { +//printf("%lld ",t-tx); +// tx=t; +// nanoSuspend(1,0); +//} +#endif +} +*/ t=GETTIME; +//tsc1=t; } +tEnd=t; +//rt_printf("%lld_%lld ",tEnd-tStart,slotDuration[slot]); +//if (tEnd-tStart>slotDuration[slot]) +if (tEnd-tStart>slotDuration[slot]) +{ +#ifdef _TWARN +// rt_printf("slot overrun: slot=%d t_over=%lld t1=%lld t2=%lld\n",slot,tEnd-tStart-slotDuration[slot],tStart/1000,tEnd/1000); + rt_printf("slot overrun: slot=%d t_over=%lld n_tasks=%d\n",slot,tEnd-tStart-slotDuration[slot],numberOfTasksInSlot[slot]); +#endif +//rt_printf("%lld_%lld_%lld_%lld\n",tsc3/1000,tsc2/1000,tsc1/1000,GETTIME/1000); +} +//tOverLast=tEnd-tStart-slotDuration[slot]; +//overSlotLast=slot; +//tOver=GETTIME; +//rt_printf("slot=%d t_over=%lld\n",slot,tEnd-tStart-slotDuration[slot]); slotStartAbs[slot]+=slotPeriod[slot]; slotEndAbs[slot]+=slotPeriod[slot]; lastSlot=slot; +/* +if (shm->freeCPU==2 || shm->freeCPU==3) { +#ifndef _RTAI + +//t=GETTIME; +//if (t-tx>500000) { +//rt_printf(". "); +//rt_printf("%lld ",(t-tx)/1000); +//tx=t; +nanoSuspend(STD_RT_SLEEP,0); +//} +#endif +} +*/ + } else { - periodFlag=0; +// periodFlag=0; /* suspend RT task until next slot is due */ dt=-tMax; //#if !(FREE_CPU) - if (shm->freeCPU==0) { - dt=0; + if (shm->freeCPU==0 || shm->freeCPU==2) { +/* +if (shm->freeCPU==2 && dt>shm->rtSleepTolerance) { +#ifndef _RTAI +//nanoSuspend(STD_RT_SLEEP,0); +//static RTIME tx=0; +//t=GETTIME; +//if (t-tx>500000) { +//rt_printf(". "); +//rt_printf("%lld ",(t-tx)/1000); +//tx=t; +nanoSuspend(STD_RT_SLEEP,0); +//} +#endif +} +*/ //if (t-lastSuspend>200000) { //dt=shm->rtSleepTolerance+10000; //lastSuspend=t; //} - } else { -//#endif -//#if (FREE_CPU) -//lastSuspend=lastSuspend; // eliminate compiler warning -//#endif - } - - if (dt>shm->rtSleepTolerance) { + } else if (dt>shm->rtSleepTolerance) { // t=GETTIME; // rt_sleep(nano2count(dt-RTSLEEP_TOLERANCE)); #ifndef _RTAI +/* + struct timespec ts; ts.tv_sec=0; ts.tv_nsec=dt-shm->rtSleepTolerance; clock_nanosleep(CLOCK_MONOTONIC,0,&ts,NULL); +*/ + nanoSuspend(dt, shm->rtSleepTolerance); #endif #ifdef _RTAI rt_sleep(nano2count(dt-shm->rtSleepTolerance)); #endif // if (GETTIME-t>dt) rt_printf("rt: sleep=%d extra=%d\n",(int)(dt-RTSLEEP_TOLERANCE),(int)(GETTIME-t-(dt-RTSLEEP_TOLERANCE))); -// if (GETTIME-t>dt) rt_eprintf("extra=%d %d\n",(int)(GETTIME-t-dt),(int)(dt-(RTIME)shm->rtSleepTolerance)); - if (GETTIME-t>dt) rt_eprintf("sleep: latency=%d available=%d commanded=%d buffer=%d\n",(int)(GETTIME-t-dt),(int)dt,(int)(dt-(RTIME)shm->rtSleepTolerance),shm->rtSleepTolerance); +// if (GETTIME-t>dt) rt_printf("extra=%d %d\n",(int)(GETTIME-t-dt),(int)(dt-(RTIME)shm->rtSleepTolerance)); + tLat=GETTIME; + + if (indexSleepBuf>=SLEEP_BUF_SIZE) { + indexSleepBuf=0; + fullSleepBuf=1; + } else { + sleepBuf[indexSleepBuf]=(int)(tLat-t-(dt-shm->rtSleepTolerance)); + indexSleepBuf++; + } + if (tLat-t-(dt-shm->rtSleepTolerance)>maxSleep) maxSleep=tLat-t-(dt-shm->rtSleepTolerance); + + if (tLat-t>dt) { +#ifdef _TWARN +rt_printf("sleep: latency=%d available=%d commanded=%d buffer=%d\n", +(int)(tLat-t-dt),(int)dt,(int)(dt-(RTIME)shm->rtSleepTolerance),shm->rtSleepTolerance); +#endif +} } } //shm->run=0; diff --git a/smi/src/taskdisp_nrt.c b/smi/src/taskdisp_nrt.c index 96ad2f9a0fe5710e50b37fc6cff2107958c37944..c604c5a13f89e59ba06e4017c6f2096eb2393635 100644 --- a/smi/src/taskdisp_nrt.c +++ b/smi/src/taskdisp_nrt.c @@ -9,15 +9,19 @@ #include "rt_def.h" #include "nrt_ext.h" +#include "smi_user.h" + +unsigned int *smiIterationNRT; void *pointerToAllocatedMemory[MAX_NUMBER_OF_DATA_PATHS]; void *dataPathPointer[MAX_NUMBER_OF_DATA_PATHS]; -extern void execTask(taskStateStruct *taskState,taskStateSysVarStruct *taskStateSysVar,taskIDType taskID); +//extern +void execTask(taskStateStruct *taskState,taskStateSysVarStruct *taskStateSysVar,taskIDType taskID); void createProcess(taskStateStruct *taskState, processType **nrtProcessID // "Consumer" "None" - // Input Flags: debug core02 TASK_IF3 TASK_IF4 TASK_IF5 TASK_IF6 TASK_IF7 TASK_IF8 + // Input Flags: debug core02 core0 core1 core2 core3 TASK_IF7 TASK_IF8 // Output Flags: error TASK_OF2 TASK_OF3 TASK_OF4 TASK_OF5 TASK_OF6 TASK_OF7 TASK_OF8 // NRT ) @@ -25,6 +29,12 @@ void createProcess(taskStateStruct *taskState, char str[256]; int ret; int core02; + int core=-1; + + if (*nrtProcessID==NULL) { + printf("NULL: %d 1\n",taskState->stateID); + return; + } printf("[createProcess] creating processs nrtProcessID=%d\n",**nrtProcessID); @@ -36,18 +46,36 @@ void createProcess(taskStateStruct *taskState, if (shm->processStatus[**nrtProcessID]==0) { shm->processStatus[**nrtProcessID]=PROCESS_STARTED; if (taskState->inputControlFlag[2-1]==1) core02=1; else core02=0; + if (taskState->inputControlFlag[3-1]==1) core=0; + if (taskState->inputControlFlag[4-1]==1) core=1; + if (taskState->inputControlFlag[5-1]==1) core=2; + if (taskState->inputControlFlag[6-1]==1) core=3; if (taskState->inputControlFlag[1-1]==1) { + + printf("[createProcess] >>>>>>>>>>>>>>>>>> start gdb with \"gdb ./nrt_task\" and continue with \"r %d\" \n",**nrtProcessID); + ret=system("xterm &"); +/* printf("[createProcess] >>>>>>>>>>>>>>>>>> starting gdb - continue with \"r %d\" \n",**nrtProcessID); sprintf(str,"gdb ./nrt_task\n"); - if (core02) sprintf(str,"taskset -c 0-2 gdb ./nrt_task\n"); +// if (core02) sprintf(str,"taskset -c 0-2 gdb ./nrt_task\n"); +// if (core0) sprintf(str,"taskset -c 0 gdb ./nrt_task\n"); ret=system(str); ret=ret; // eliminate compiler warning printf("[createProcess] exited\n"); shm->processStatus[**nrtProcessID]=0; taskState->outputControlFlag[1-1]=1; +*/ } else { - sprintf(str,"/usr/bin/nice -n %d ./nrt_task %d &\n",shm->processPriorities[**nrtProcessID]-shm->processPriorities[0],**nrtProcessID); - if (core02) sprintf(str,"taskset -c 0-2 /usr/bin/nice -n %d ./nrt_task %d &\n",shm->processPriorities[**nrtProcessID]-shm->processPriorities[0],**nrtProcessID); +// sprintf(str,"/usr/bin/nice -n %d ./nrt_task %d &\n",shm->processPriorities[**nrtProcessID],**nrtProcessID); +// if (core02) sprintf(str,"taskset -c 0-2 /usr/bin/nice -n %d ./nrt_task %d &\n",shm->processPriorities[**nrtProcessID],**nrtProcessID); +// if (core0) sprintf(str,"taskset -c 0 /usr/bin/nice -n %d ./nrt_task %d &\n",shm->processPriorities[**nrtProcessID],**nrtProcessID); + if (core02) + sprintf(str,"taskset -c 0-2 ./nrt_task %d &\n",**nrtProcessID); + else if (core<0) + sprintf(str,"./nrt_task %d &\n",**nrtProcessID); + else + sprintf(str,"taskset -c %d ./nrt_task %d &\n",core,**nrtProcessID); + ret=system(str); ret=ret; // eliminate compiler warning printf("[createProcess] %s",str); @@ -69,7 +97,10 @@ void killProcess_(processType nrtProcessID) //printf("kill process %d %d\n",nrtProcessID,shm->processStatus[nrtProcessID]); shm->processLock[nrtProcessID]=1; - if ((shm->processStatus[nrtProcessID]&PROCESS_UP)!=0) { + __sync_synchronize(); + if ((shm->processStatus[nrtProcessID]&PROCESS_UP)!=0 || + (shm->processStatus[nrtProcessID]&PROCESS_STARTED)!=0 + ) { printf("[killProcess_] killing process %lld nrtProcessID=%d\n", (long long int)shm->pid[nrtProcessID],nrtProcessID); sprintf(str,"kill -9 %lld\n",(long long int)shm->pid[nrtProcessID]); @@ -86,11 +117,12 @@ void killProcess_(processType nrtProcessID) } shm->processStatus[nrtProcessID]=0; } + __sync_synchronize(); shm->processLock[nrtProcessID]=0; } void killProcess(taskStateStruct *taskState, - processType **nrtProcessID // Release Read Mandatory + processType **nrtProcessID // Release Read Optional // Input Flags: // Output Flags: // NRT @@ -110,11 +142,11 @@ void createProcessID(taskStateStruct *taskState, ) { int i; - static processType _nrtProcessID[8]; + static processType _nrtProcessID[MAX_NUMBER_OF_PROCESSES]; for (i=1;i<=8;i++) { if (taskState->inputControlFlag[i-1]==1) { - (*nrtProcessID)=&(_nrtProcessID[i]); + (*nrtProcessID)=&(_nrtProcessID[i]); **nrtProcessID=i; printf("[createProcessID] process ID %d created\n",**nrtProcessID); break; @@ -122,6 +154,26 @@ printf("[createProcessID] process ID %d created\n",**nrtProcessID); } } +void createProcessId(taskStateStruct *taskState, + processType **nrtProcessID // Allocation Write Mandatory + // Input Flags: bit0 bit1 bit2 bit3 + // Output Flags: + // NRT +) +{ + static processType _nrtProcessID[MAX_NUMBER_OF_PROCESSES]; + int i; + + i = 0; + if (taskState->inputControlFlag[1-1]==1) i|=1; + if (taskState->inputControlFlag[2-1]==1) i|=2; + if (taskState->inputControlFlag[3-1]==1) i|=4; + if (taskState->inputControlFlag[4-1]==1) i|=8; + (*nrtProcessID)=&(_nrtProcessID[i]); + **nrtProcessID=i; +printf("[createProcessId] process ID %d created\n",**nrtProcessID); +} + void testProcess2(taskStateStruct *taskState, processType **nrtProcessID // PASS_INPUT // Input Flags: NA NA NA NA NA NA NA NA @@ -131,6 +183,11 @@ void testProcess2(taskStateStruct *taskState, { int ret; + if (*nrtProcessID==NULL) { + printf("NULL: %d 1\n",taskState->stateID); + return; + } + printf("[testProcess2] testing process nrtProcessID=%d\n",**nrtProcessID); if ((shm->processStatus[**nrtProcessID]&PROCESS_TEST)!=0) ret=1; else ret=0; shm->processStatus[**nrtProcessID]&=~(PROCESS_TEST); @@ -168,21 +225,26 @@ void exitNrtTaskDispatcher(void) { shm->run=0; for (i=1;i<=shm->numberOfProcesses;i++) { //printf("[exitNrtTaskDispatcher] %d\n",i); - while ((shm->processStatus[i]&PROCESS_STARTED)!=0) usleep(STD_SLEEP); -//printf("[exitNrtTaskDispatcher] exit \n"); - killProcess_(i); + while ((shm->processStatus[i]&PROCESS_STARTED)!=0) { + usleep(STD_SLEEP); + killProcess_(i); + } +//printf("[exitNrtTaskDispatcher] exit \n"); } // shm->rtCmd=2; } void nrtTaskDispatcher(int nrtProcessID) { - int i,j; + int i; +// int j; int n; // static unsigned int numberOfSMIIterations=0; - unsigned int numberOfSMIIterations; - taskStateStruct taskStateTmp; + unsigned int smiIterationLock; + unsigned int smiIteration; +// taskStateStruct taskStateTmp; taskStateSysVarStruct taskStateSysVarTmp; - + + smiIterationNRT=(unsigned int*)&(shm->smiIteration); /* for (i=0;i<shm->numberOfTaskStates;i++) { printf("%d_%d_%d_%d_%d ",i,shm->taskStateSysVar[i].flags,shm->taskStateSysVar[i].taskID,shm->taskStateSysVar[i].process,shm->taskStateSysVar[i].nrt);fflush(stdout); @@ -197,101 +259,73 @@ usleep(10000); //{printf("%d_%d ",shm->taskStateSysVar[i].flags,shm->taskStateSysVar[i].taskID);fflush(stdout);usleep(10000);} n=shm->taskStateSysVar[i].process; if (n==nrtProcessID) { - - unsigned int smiLock; - smiLock=0; - while (smiLock==0) + if ((shm->taskStateSysVar[i].flags&TASK_EXEC)!=0) { - smiLock=__sync_fetch_and_add(&(shm->smiLock),0); - if (smiLock!=0) { + + __sync_synchronize(); + unsigned int lockIter=0; + do { + usleep(STD_SLEEP); + if (lockIter++>MAX_LOCK_ITER) { + printf("[nrtTaskDispatcher] locking problem\n"); + lockIter=0; + } + smiIterationLock=__sync_fetch_and_add(&(shm->smiIterationLock),0); +/* memcpy((unsigned char*)&taskStateTmp, (unsigned char*)&(shm->taskState[i]), sizeof(taskStateStruct)); +*/ memcpy((unsigned char*)&taskStateSysVarTmp, (unsigned char*)&(shm->taskStateSysVar[i]), - sizeof(taskStateSysVarStruct)); - } - if (smiLock==0 || smiLock!=__sync_fetch_and_add(&(shm->smiLock),0)) { - usleep(STD_SLEEP); - } else smiLock=1; - } - -// if ((shm->taskStateSysVar[i].flags&TASK_EXEC)!=0) - if ((taskStateSysVarTmp.flags&TASK_EXEC)!=0) - { -// execTask(&shm->taskState[i],&shm->taskStateSysVar[i],shm->taskStateSysVar[i].taskID); - execTask(&taskStateTmp,&taskStateSysVarTmp,taskStateSysVarTmp.taskID); + sizeof(taskStateSysVarStruct)); /* - memcpy((unsigned char*)&(shm->taskState[i]), - (unsigned char*)&taskStateTmp, - sizeof(taskStateStruct)); -*/ - for (j=0;j<MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE;j++) { - shm->controlFlags[i].outputControlFlag[j]=taskStateTmp.outputControlFlag[j]; - shm->controlFlags[i].inputControlFlag[j]=taskStateTmp.inputControlFlag[j]; - } - -// shm->taskStateSysVar[i].flags|=TASK_EXIT; -// __sync_fetch_and_and(&(shm->taskStateSysVar[i].flags),TASK_EXIT); - __sync_fetch_and_nand(&(shm->taskStateSysVar[i].exit),0); -//printf("aaaaaa->%d",__sync_fetch_and_add(&(shm->taskStateSysVar[i].exit),0)); - - numberOfSMIIterations=__sync_fetch_and_add(&(shm->numberOfSMIIterations),0); - while ( - __sync_fetch_and_add(&(shm->taskStateSysVar[i].exit),0)==ATOMIC_UNLOCKED - && - numberOfSMIIterations+2>__sync_fetch_and_add(&(shm->numberOfSMIIterations),0) && shm->run!=0) - { - usleep(STD_SLEEP); - } - __sync_fetch_and_and(&(shm->taskStateSysVar[i].exit),0); - } + for (j=0;j<MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE;j++) { + if (shm->taskState[i].inputControlFlag[j]!= + taskStateTmp.inputControlFlag[j]) break; + } + } +*/ + } while (smiIterationLock==SMI_LOCKED && + smiIterationLock!=__sync_fetch_and_add(&(shm->smiIterationLock),0) && + (taskStateSysVarTmp.flags&TASK_EXEC)!=0 +// && j!=MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE + ); + shm->taskStateSysVar[i].nrtExit=0; + __sync_synchronize(); -if (0) { - if ((taskStateSysVarTmp.flags&TASK_EXEC)!=0 -/* && ((shm->taskStateSysVar[i].oneShot==0 - || (shm->taskStateSysVar[i].flags&TASK_EXIT)==0 - ) - ) */ - ) { -// shm->taskStateSysVar[i].flags|=TASK_ACTIVE; -// shm->taskStateSysVar[i].flags&=~(TASK_BUSY); -// dataPathPointer[0]=NULL; -/*printf("nrt: execTask stateID=%d taskID=%d nrtProcessID=%d dt=%d\n", - shm->taskState[i].stateID, - shm->taskStateSysVar[i].taskID, - n, - shm->reftime-(unsigned int)shm->t1); -*/ -//printf("%d\n",shm->taskStateSysVar[i].taskID); -//if (nrtProcessID==1) {printf("!");fflush(stdout);usleep(100000);} - execTask(&taskStateTmp,&taskStateSysVarTmp,taskStateSysVarTmp.taskID); -//if (n==0 && shm->taskStateSysVar[i].taskID==27 && shm->taskState[i].stateID==72) printf("-----------------\n"); -// shm->taskStateSysVar[i].flags&=~(TASK_ACTIVE); -// shm->taskStateSysVar[i].flags&=~(TASK_EXEC); + if ((taskStateSysVarTmp.flags&TASK_EXEC)!=0) + { + shm->taskState[i].taskID=taskStateSysVarTmp.taskID; + shm->taskState[i].index=i; +//printf("task=%d state=%d entered i=%d\n",taskStateSysVarTmp.taskID,shm->taskState[i].stateID,i); + execTask(&shm->taskState[i],&taskStateSysVarTmp,taskStateSysVarTmp.taskID); +//printf("task=%d state=%d exited i=%d\n",taskStateSysVarTmp.taskID,shm->taskState[i].stateID,i); /* - for (j=0;j<MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE;j++) { - shm->taskStateSysVar[i].outputControlFlagTmp[j]= - taskStateTmp.outputControlFlag[j]; - } + for (j=0;j<MAX_NUMBER_OF_CONTROL_FLAGS_PER_STATE;j++) { + shm->controlFlags[i].outputControlFlag[j]=taskStateTmp.outputControlFlag[j]; + shm->controlFlags[i].inputControlFlag[j]=taskStateTmp.inputControlFlag[j]; + } */ -// __sync_fetch_and_nand(&(shm->taskStateSysVar[i].copy),0); - -// shm->taskStateSysVar[i].flags|=TASK_EXIT; -// shm->t3=shm->reftime; -// shm->taskStateSysVar[i].flags&=~(TASK_SMI); -// numberOfSMIIterations=shm->numberOfSMIIterations; - numberOfSMIIterations=__sync_fetch_and_add(&(shm->numberOfSMIIterations),0); -// while ((shm->taskStateSysVar[i].flags&TASK_SMI)==0 && shm->run!=0) -// while (numberOfSMIIterations==shm->numberOfSMIIterations && shm->run!=0) - while (numberOfSMIIterations==__sync_fetch_and_add(&(shm->numberOfSMIIterations),0) && shm->run!=0) - { -//if (nrtProcessID==0) {printf("%d ",shm->taskStateSysVar[i].flags);fflush(stdout);} + __sync_synchronize(); +// __sync_fetch_and_nand(&(shm->taskStateSysVar[i].exit),0); + shm->taskStateSysVar[i].nrtExit=1; +//printf("NRT: nrtExit=%d i=%d %p_%p\n",shm->taskStateSysVar[i].nrtExit,i, +//&(shm->taskStateSysVar[i].nrtExit),&shm); + smiIteration=__sync_fetch_and_add(&(shm->smiIteration),0)+1; + __sync_synchronize(); + while ( + __sync_fetch_and_add(&(shm->smiIterationLock),0)<=smiIteration + && shm->run!=0) + { +//printf("%d_%d_%d\n",shm->taskState[i].stateID,shm->taskStateSysVar[i].nrtExit, +//__sync_fetch_and_add(&(shm->smiIterationLock),0)); usleep(STD_SLEEP); - } + } + } + } -} } } if (shm->run==0) break;