Change timeout to ADT and start supporting interrupts
[mTask.git] / mTaskInterpret.dcl
index 8c8e422..2701fcf 100644 (file)
@@ -15,10 +15,17 @@ import mTask
        | MTEmpty
 
 :: MTaskMSGSend
-       = MTTask Int String
+       = MTTask MTaskInterval String
+       | MTTaskDel Int
        | MTSds Int String
        | MTUpd Int String
 
+:: MTaskInterval
+       = OneShot
+       | OnInterval Int
+       | OnInterrupt Int
+
+instance toString MTaskInterval
 instance toString MTaskMSGRecv
 instance toString MTaskMSGSend
 encode :: MTaskMSGSend -> String
@@ -88,6 +95,7 @@ instance toByteCode String
 instance toByteCode Long
 instance toByteCode Button
 instance toByteCode UserLED
+//instance toByteCode MTaskInterval
 
 instance toChar Pin
 instance arith ByteCode
@@ -107,9 +115,7 @@ instance assign ByteCode
 instance seq ByteCode
 instance serial ByteCode
 
-//pub :: (ByteCode a b) -> ByteCode a b
-
-toMessages :: Int (String, BCState) -> ([MTaskMSGSend], BCState)
+toMessages :: MTaskInterval (String, BCState) -> ([MTaskMSGSend], BCState)
 toSDSUpdate :: Int Int -> [MTaskMSGSend]
 
 toByteVal :: BC -> [Char]