- Subproject commit 8a5d42279e8067d9dee26d5fae466deea27c6805
-Subproject commit bfa6a41e5ecfb2e11e9e389b6bb6720fda7f1ebb
++Subproject commit ef6413393c66231637cc89c252c28e866a46f14b
class MTaskDuplex a where
synFun :: a (Shared Channels) -> Task ()
+ startupDevices :: Task [MTaskDevice]
+ connectDevice :: (MTaskDevice (Shared Channels) -> Task ()) MTaskDevice -> Task ()
manageDevices :: (MTaskDevice (Shared Channels) -> Task ()) [MTaskDevice] -> Task ()
sendToDevice :: String (Main (ByteCode () Stmt)) (MTaskDevice, MTaskInterval) -> Task ()
+sendMessages :: [MTaskMSGSend] -> (MTaskDevice -> Task Channels)
deviceTaskDelete :: MTaskDevice MTaskTask -> Task ()
deviceTaskAcked :: MTaskDevice Int -> Task ()
instance == MTaskDevice where
(==) a b = a.deviceChannels == b.deviceChannels
-channels :: MTaskDevice -> Shared Channels
-channels d = memoryShare d.deviceChannels ([], [], False)
-
+ startupDevices :: Task [MTaskDevice]
+ startupDevices = upd (map reset) deviceStore
+ where reset d = {d & deviceTask=Nothing, deviceTasks=[], deviceError=Nothing}
+
makeDevice :: String MTaskResource -> Task MTaskDevice
makeDevice name res = get randomInt @ \rand->{MTaskDevice
|deviceChannels=name +++ toString rand