X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=Devices%2FmTaskDevice.dcl;h=f254a22f2f16b20552580d40019b004b93397f2c;hb=a2b8b2a0de173f92092bf6cbbed23551e674ca3c;hp=6a717f068eb0f8aaacebcf9e73e230e1e969da2f;hpb=acd239b3f29e215ade0b63d5b26b6cf8e8ae0d63;p=mTask.git diff --git a/Devices/mTaskDevice.dcl b/Devices/mTaskDevice.dcl index 6a717f0..f254a22 100644 --- a/Devices/mTaskDevice.dcl +++ b/Devices/mTaskDevice.dcl @@ -4,6 +4,7 @@ from Data.Maybe import :: Maybe import iTasks import Devices.mTaskSerial import Devices.mTaskTCP +import Utils.SDS import Tasks.mTaskTask import mTaskInterpret import Generics.gCons @@ -13,8 +14,8 @@ derive class iTask MTaskDevice, MTaskResource, MTaskMSGRecv, MTaskMSGSend derive conses MTaskResource, TCPSettings derive consName MTaskResource, TCPSettings -channels :: MTaskDevice -> Shared Channels +channels :: MTaskDevice -> Shared Channels :: Channels :== ([MTaskMSGRecv], [MTaskMSGSend], Bool) :: MTaskResource @@ -23,6 +24,7 @@ channels :: MTaskDevice -> Shared Channels :: MTaskDevice = { deviceTask :: Maybe TaskId + ,deviceError :: Maybe String ,deviceChannels :: String ,deviceName :: String ,deviceTasks :: [MTaskTask] @@ -34,6 +36,8 @@ instance == MTaskDevice class MTaskDuplex a where synFun :: a (Shared Channels) -> Task () +startupDevices :: Task [MTaskDevice] +connectDevice :: (MTaskDevice (Shared Channels) -> Task ()) MTaskDevice -> Task () manageDevices :: (MTaskDevice (Shared Channels) -> Task ()) [MTaskDevice] -> Task () sendToDevice :: String (Main (ByteCode () Stmt)) (MTaskDevice, MTaskInterval) -> Task ()