X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=Shares%2FmTaskShare.dcl;h=57855c13bb93ee1a36f925cd88b919d3ba9544eb;hb=848595d1288804d6de43625f9e6f1cf76295c285;hp=e3fdd426df0dbc9b9332bdcec3005d8c05fd1918;hpb=b3d2bd33a99a2dbdc4907b6876a965c16c37314c;p=mTask.git diff --git a/Shares/mTaskShare.dcl b/Shares/mTaskShare.dcl index e3fdd42..57855c1 100644 --- a/Shares/mTaskShare.dcl +++ b/Shares/mTaskShare.dcl @@ -1,8 +1,38 @@ definition module Shares.mTaskShare -:: MTaskShare = { - initValue :: Int, - withTask :: String, - identifier :: Int, - realShare :: String - } +import iTasks +import iTasks._Framework.Serialization +import mTask +import Devices.mTaskDevice + +derive class iTask MTaskShare + +:: MTaskShare = + {withTask :: [String] + ,identifier :: Int + ,value :: BCValue + } + +instance == MTaskShare + +//Constructor +makeShare :: 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] + +getRealShare :: MTaskDevice MTaskShare -> Shared BCValue +//getRealShare :: MTaskDevice BCShare -> Shared BCValue + +//updateShare :: Int BCValue -> Task ()