modularize more
[mTask.git] / Utils / SDS.icl
1 implementation module Utils.SDS
2
3 import iTasks
4 import iTasks._Framework.Store
5 import Devices.mTaskDevice
6 import Shares.mTaskShare
7 from Data.Func import $
8
9 derive class iTask MTaskShare, BCState
10
11 memoryShare :: String a -> Shared a | iTask a
12 memoryShare s d = sdsFocus s $ memoryStore "" $ Just d
13
14 deviceStore :: Shared [MTaskDevice]
15 deviceStore = sharedStore "mTaskDevices" []
16
17 sdsStore :: Shared [MTaskShare]
18 sdsStore = memoryShare "mTaskShares" []
19
20 bcStateStore :: Shared BCState
21 bcStateStore = memoryShare "mTaskBCState" zero
22
23 mTaskTaskStore :: Shared [String]
24 mTaskTaskStore = memoryShare "mTaskTasks" ["count", "ledon", "ledoff"]