definition module Tasks.mTaskTask
+import mTask
import iTasks
-derive class iTask MTaskTask
+derive class iTask MTaskTask, Main, ByteCode, Stmt, Expr, BC, BCState
:: MTaskTask = {
name :: String,
implementation module Tasks.mTaskTask
+import mTask
import iTasks
-derive class iTask MTaskTask
+import iTasks._Framework.Serialization
+
+derive class iTask MTaskTask, Main, ByteCode, Stmt, Expr, BC, BCState
makeTask :: String Int -> Task MTaskTask
makeTask name ident = get currentDateTime
import Devices.mTaskDevice
import iTasks
-derive class iTask MTaskShare, BCState
+derive class iTask MTaskShare
memoryShare :: String a -> Shared a | iTask a
import qualified Data.Map as DM
from Data.Func import $
-derive class iTask MTaskShare, BCState
+derive class iTask MTaskShare
memoryShare :: String a -> Shared a | iTask a
memoryShare s d = sdsFocus s $ memoryStore "" $ Just d
, arrangeSplit Vertical True
]
- viewmTasks = listmTasks
+ viewmTasks :: Task String
+ viewmTasks = enterChoiceWithShared "Available mTasks" [ChooseFromList id] mTaskTaskStore
>&^ \sh->whileUnchanged sh $ \mi->forever (case mi of
Nothing = viewInformation "No task selected" [] ()
Just mTaskTask = get deviceStore
>>= \devices->case devices of
[] = viewInformation "No devices yet" [] ()
- ds = sendmTask mTaskTask ds @! ())
- where
- listmTasks :: Task String
- listmTasks = enterChoiceWithShared "Available mTasks" [ChooseFromList id] mTaskTaskStore
-
- sendmTask mTaskId ds = fromJust ('DM'.get mTaskId allmTasks)
-// >>= \bc->(enterChoice "Choose Device" [ChooseFromDropdown \t->t.deviceName] ds
-// -&&- enterInformation "Timeout, 0 for one-shot" [])
-// >>* [OnAction (Action "Send") (withValue $ Just o sendToDevice bc)]
+ ds = fromJust ('DM'.get mTaskTask allmTasks)
+ >>= \bc->(enterChoice "Choose Device" [ChooseFromDropdown \t->t.deviceName] ds
+ -&&- enterInformation "Timeout, 0 for one-shot" []
+ ) >>* [OnAction (Action "Send") (withValue $ Just o sendToDevice mTaskTask bc)]
+ )
process :: MTaskDevice (Shared Channels) -> Task ()
process device ch = forever (watch ch >>* [OnValue (