mTaskTask :: (Shared ([MTaskMSGRecv],Bool,[MTaskMSGSend],Bool)) -> Task ()
mTaskTask ch =
- (enterInformation "Choose" [] >>= \st->case st of
- Serial = deviceSelectorSerial >>= \(s,set)->syncSerialChannel s set decode encode ch
- TCP = deviceSelectorNetwork >>= \(p,h)->syncNetworkChannel h p "\n" decode encode ch
- ) ||-
- sendMsg msgs ch ||-
- (
+// (enterInformation "Choose" [] >>= \st->case st of
+// Serial = deviceSelectorSerial >>= \(s,set)->syncSerialChannel s set decode encode ch
+// TCP = deviceSelectorNetwork >>= \(p,h)->syncNetworkChannel h p "\n" decode encode ch
+// ) ||-
+ deviceSelectorNetwork >>= \(p,h)->syncNetworkChannel h p "\n" decode encode ch ||-
+// deviceSelectorSerial >>= \(s,set)->syncSerialChannel s set decode encode ch ||-
+ (sendMsg msgs ch >>= \_-> (
(
consumeNetworkStream (processSDSs sdsShares messageShare) ch ||-
viewSharedInformation "channels" [ViewWith lens] ch ||-
viewSharedInformation "messages" [] messageShare ||-
viewSh sdsShares ch
) >>* [OnAction ActionFinish (always shutDown)]
- )
+ ))
where
messageShare :: Shared [String]
messageShare = sharedStore "mTaskMessagesRecv" []
makeBytecode :: Int (Main (ByteCode () Stmt)) -> ([MTaskMSGSend], [(Int, Shared Int)])
makeBytecode timeout bc
# (msgs, st) = toMessages timeout (toRealByteCode (unMain bc))
-# shares = map (\(i,d)->(i, sdsFocus (s i) (memoryStore (s i) (Just (dd d))))) st.sdss
+# shares = map (\(i,d)->(i, sharedStore (s i) (dd d))) st.sdss
= (msgs, shares)
where
s i = "mTaskSDS-" +++ toString i