Commit 8678ad11 authored by Mart Lubbers's avatar Mart Lubbers
Browse files

restructure for nitrile

parent fa308984
Pipeline #60476 passed with stage
in 1 minute and 28 seconds
definition module MQTT.Client
definition module iTasks.Extensions.MQTT.Client
import iTasks
import MQTT
import iTasks.Extensions.MQTT
mqttConnect :: MQTTConnectionSettings ((SimpleSDSLens MQTTClient) -> Task a) -> Task a | iTask a
\ No newline at end of file
mqttConnect :: MQTTConnectionSettings ((SimpleSDSLens MQTTClient) -> Task a) -> Task a | iTask a
implementation module MQTT.Client
implementation module iTasks.Extensions.MQTT.Client
import code from "libWrapper."
......@@ -6,7 +6,7 @@ import code from "libwolfmqtt_la-mqtt_client."
import code from "libwolfmqtt_la-mqtt_packet."
import code from "libwolfmqtt_la-mqtt_socket."
import _MQTT
import iTasks.Extensions._MQTT
import qualified Data.Map as DM
import Data.Functor
......@@ -34,8 +34,8 @@ import System._Pointer
import _SystemArray
import StdMisc
import MQTT.Errors
import MQTT
import iTasks.Extensions.MQTT.Errors
import iTasks.Extensions.MQTT
import StdDebug
......
definition module iTasks.Extensions.MQTT.Errors
errorCodeToString :: Int -> String
implementation module MQTT.Errors
implementation module iTasks.Extensions.MQTT.Errors
import iTasks
......@@ -9,4 +9,4 @@ errorCodeToString -8 = "Network error"
errorCodeToString -700 = "Incorrect protocol version"
errorCodeToString -701 = "Connection refuced"
errorCodeToString -702 = "Authentication failed"
errorCodeToString erno = "Error code: " +++ (toString erno)
\ No newline at end of file
errorCodeToString erno = "Error code: " +++ (toString erno)
definition module MQTT.Util
definition module iTasks.Extensions.MQTT.Util
import iTasks
import MQTT
import iTasks.Extensions.MQTT
createReceiveLens :: (SimpleSDSLens MQTTClient) -> (SimpleSDSLens [MQTTMsg])
mqttSend :: MQTTMsg (SimpleSDSLens MQTTClient) -> Task ()
mqttSubscribe :: MQTTSubscribe (SimpleSDSLens MQTTClient) -> Task ()
mqttUnsubscribe :: MQTTTopicFilter (SimpleSDSLens MQTTClient) -> Task ()
mqttDisconnect :: (SimpleSDSLens MQTTClient) -> Task ()
\ No newline at end of file
mqttDisconnect :: (SimpleSDSLens MQTTClient) -> Task ()
implementation module MQTT.Util
implementation module iTasks.Extensions.MQTT.Util
import iTasks
import MQTT
import iTasks.Extensions.MQTT
createReceiveLens :: (SimpleSDSLens MQTTClient) -> (SimpleSDSLens [MQTTMsg])
createReceiveLens sds = mapReadWrite (read, write) ?None sds
......@@ -19,4 +19,4 @@ mqttUnsubscribe sub sds = upd (\c. { c & unsubscribe = c.unsubscribe ++ [sub] })
mqttDisconnect :: (SimpleSDSLens MQTTClient) -> Task ()
mqttDisconnect sds = upd (\c. { c & disconnect = True }) sds @! ()
\ No newline at end of file
definition module iTasks.Extensions._MQTT
implementation module iTasks.Extensions._MQTT
definition module iTasks.Extensions._MQTT
implementation module _MQTT
implementation module iTasks.Extensions._MQTT
import code from "_chkstk_ms."
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment