-Start world = startEngine (mTaskManager
- >>* [OnAction (Action "Shutdown") (always $ shutDown)]) world
-
-mTaskMap :: Map String (Main (ByteCode () Stmt))
-mTaskMap = 'DM'.fromList [("count", bc), ("ledon", bc2 LED1), ("ledoff", bc3 LED3)]
-
-bc :: Main (ByteCode () Stmt)
-bc = sds \x=1 In sds \pinnetje=1 In {main =
- IF (digitalRead D3) (
- x =. x +. lit 1 :.
- pub x
- ) (
- noOp
- ) :.
- IF (pinnetje ==. lit 1) (
- ledOn LED1
- ) (
- IF (pinnetje ==. lit 2) (
- ledOn LED2
- ) (
- ledOn LED3
- )
- )}
-
-bc2 :: UserLED -> Main (ByteCode () Stmt)
-bc2 d = {main = ledOn d}
-
-bc3 :: UserLED -> Main (ByteCode () Stmt)
-bc3 d = {main = ledOff d}
+Start world = startEngine (viewInformation "" [] md) world
+ where
+ md =
+ { deviceTask = Just $ TaskId 0 0
+ , deviceError = Just ""
+ , deviceChannels = "abc"
+ , deviceName = "hoi"
+ , deviceTasks = []
+ , deviceData = TCPDevice {TCPSettings
+ |host="localhost",
+ port=8888
+ }
+ , deviceSpec = Just {MTaskDeviceSpec
+ |haveLed = True
+ ,haveAio = True
+ ,haveDio = True
+ ,maxTask = 42
+ ,maxSDS = 5
+ }
+ }
+
+
+
+//Start world = startEngine (mTaskManager
+// >>* [OnAction (Action "Shutdown") (always $ shutDown)]) world