//cleanSharesTask :: Int MTaskDevice -> Task [MTaskShare]
//Clean out shares when a device has been removed
-updateShare :: MTaskDevice Int BCValue -> Task [MTaskShare]
+updateShareFromPublish :: MTaskDevice Int BCValue -> Task [MTaskShare]
//updateShare :: Int BCValue -> Task [MTaskShare]
getRealShare :: MTaskDevice BCShare -> Shared BCValue
,value=value
}
-updateShare :: MTaskDevice Int BCValue -> Task [MTaskShare]
-updateShare dev ident val = updateShares dev $ map $ up ident val
+updateShareFromPublish :: MTaskDevice Int BCValue -> Task [MTaskShare]
+updateShareFromPublish dev ident val = updateShares dev $ map $ up ident val
where
up :: Int BCValue MTaskShare -> MTaskShare
up i v s = if (s.identifier == i) {MTaskShare | s & value=val} s
proc [m:ms] = traceValue (toString m) >>| (case m of
// MTSDSAck i = traceValue (toString m) @! ()
// MTSDSDelAck i = traceValue (toString m) @! ()
- MTPub i val = updateShare device i val @! ()
+ MTPub i val = updateShareFromPublish device i val @! ()
MTTaskAck i mem = deviceTaskAcked device i mem
MTTaskDelAck i = deviceTaskDeleteAcked device i @! ()
MTDevSpec s = deviceAddSpec device s @! ()