+// ,realShare=MTaskWithShare $ "mTaskSDS-" +++ toString identifier
+ }
+
+updateShare :: Int BCValue -> Task [MTaskShare]
+updateShare ident val = upd (map $ up ident val) sdsStore
+ where
+ up :: Int BCValue MTaskShare -> MTaskShare
+ up i v s = if (s.identifier == i) {MTaskShare | s & value=val} s
+
+import GenPrint, StdMisc, StdDebug, TTY
+derive gPrint MTaskDevice, MTaskShare, Maybe, MTaskResource, MTaskTask, TaskId, TTYSettings, TCPSettings, DateTime
+derive gPrint Parity, BaudRate, ByteSize
+
+cleanSharesTask :: Int MTaskDevice -> Task [MTaskShare]
+cleanSharesTask taskid d
+| not (trace_tn $ printToString taskid) = undef
+| not (trace_tn $ printToString d.deviceTasks) = undef
+| not (trace_tn $ printToString $ getNames taskid d) = undef
+= upd (map $ up $ getNames taskid d) sdsStore
+ where
+ getNames :: Int MTaskDevice -> [String]
+ getNames i d = [t.MTaskTask.name\\t<-d.deviceTasks|t.ident==i]
+
+ up :: [String] MTaskShare -> MTaskShare
+ up ns s = {MTaskShare | s & withTask=[t\\t<-s.withTask|not (isMember t ns)]}