sendToDevice :: String (Main (ByteCode () Stmt)) (MTaskDevice, MTaskInterval) -> Task ()
sendToDevice wta mTask (device, timeout) =
- get bcStateStore
- @ (\st->toMessages timeout (toRealByteCode (unMain mTask) {st & sdss=[]}))
+ get bcStateStore @ toMessages timeout o toRealByteCode (unMain mTask)
>>= \(msgs, st1)->set st1 bcStateStore @ toSDSRecords
- >>= \sdss->upd ((++)sdss) sdsStore//MTaskShareaddToSDSShare
+ >>= \sdss->set sdss sdsStore//MTaskShareaddToSDSShare
>>| makeShares sdss
>>| sendMessage device msgs
>>| makeTask wta -1