X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=Shares%2FmTaskShare.dcl;h=686a372772e7d36d9cd353685c63655981776e91;hb=d99f9bb5fdcf3a58381281b5927a65f82b44b494;hp=6b39448a33571156f6df1fd3779301a8b49c0b8b;hpb=28f4e19f893889e6d19d8c0653a643ae1580fd6d;p=mTask.git diff --git a/Shares/mTaskShare.dcl b/Shares/mTaskShare.dcl index 6b39448..686a372 100644 --- a/Shares/mTaskShare.dcl +++ b/Shares/mTaskShare.dcl @@ -1,14 +1,40 @@ definition module Shares.mTaskShare import iTasks +import iTasks._Framework.Serialization +import mTask +import Devices.mTaskDevice -:: MTaskShare = { - withTask :: String, - identifier :: Int, - initVal :: String, - realShare :: String - } +derive class iTask MTaskShare +derive gPrint BCState -instance zero MTaskShare +:: MTaskShare = + {withTask :: [String] + ,identifier:: Int + ,value :: BCValue + ,humanName :: String + } -manageShares :: [MTaskShare] -> Task () +instance == MTaskShare + +//Constructor +makeShare :: String String Int BCValue -> MTaskShare + +//General viewing task +manageShares :: Task [MTaskDevice] +//manageShares :: [MTaskShare] -> Task MTaskShare + +updateShares :: MTaskDevice ([MTaskShare] -> [MTaskShare]) -> Task [MTaskShare] + +//Clean out shares when a task has been removed +cleanSharesTask :: Int MTaskDevice -> Task [MTaskShare] +//cleanSharesTask :: Int MTaskDevice -> Task [MTaskShare] +//Clean out shares when a device has been removed + +updateShareFromPublish :: MTaskDevice Int BCValue -> Task BCValue +//updateShare :: Int BCValue -> Task [MTaskShare] + +shareShare :: MTaskDevice MTaskShare -> Shared BCValue +//shareShare :: MTaskDevice BCShare -> Shared BCValue + +//updateShare :: Int BCValue -> Task ()