] world
demo :: Task ()
-demo = viewSharedInformation "Devices" [] deviceStoreNP
+demo = set 5 (sharedDynamicStore "Hoi" 5)
+ >>| viewSharedInformation "Devices" [] deviceStoreNP
>>* [OnValue $ ifValue pred (cont o hd)]
where
pred [] = False
cont :: MTaskDevice -> Task ()
cont dev
- # rs = getRealShare dev (hd dev.deviceShares)
+ # rs = shareShare dev (hd dev.deviceShares)
= get rs >>= \oldvalue->
- forever (updateSharedInformation "Blinkyblink" [] (getRealShare dev (hd dev.deviceShares))
+ forever (updateSharedInformation "Blinkyblink" [] (shareShare dev (hd dev.deviceShares))
>>* [OnAction ActionContinue (const $ Just $ treturn ())])
-|| (wait "bigger than 10" (\x->x == oldvalue) rs
>>= viewInformation "Bigger:)" [])
>>= \bc->(enterChoice "Choose Device" [ChooseFromDropdown \t->t.deviceName] d
-&&- enterInformation "Timeout" []
) >>* [OnAction (Action "Send") (withValue $ Just o sendTaskToDevice task bc)]
+ >>| treturn []
]
process :: MTaskDevice (Shared Channels) -> Task ()