| 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
instance Semigroup (ByteCode a p)
instance Monoid (ByteCode a p)
+:: BCShare = {
+ sdsi :: Int,
+ sdspub :: Bool,
+ sdsval :: [Char]
+ }
+
:: BCState = {
freshl :: [Int],
freshs :: [Int],
- sdss :: [(Int, [Char])]
+ sdss :: [BCShare]
}
instance zero BCState
instance toByteCode Long
instance toByteCode Button
instance toByteCode UserLED
+//instance toByteCode MTaskInterval
instance toChar Pin
instance arith 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]
toReadableByteCode :: (ByteCode a b) -> (String, BCState)
-toRealByteCode :: (ByteCode a b) -> (String, BCState)
+toRealByteCode :: (ByteCode a b) BCState -> (String, BCState)