Просмотр исходного кода

chore: add some simple gateway examples

firest 2 лет назад
Родитель
Сommit
8b3c751a07

+ 19 - 0
examples/gateway.coap.conf.example

@@ -0,0 +1,19 @@
+##--------------------------------------------------------------------
+## Gateway CoAP
+##
+## Add a CoAP gateway
+##--------------------------------------------------------------------
+## Note: This is an example of how to configure this feature
+##       you should copy and paste the below data into the emqx.conf for working
+
+gateway.coap {
+    enable = true
+    connection_required = false
+    enable_stats = true
+    heartbeat = 30s
+    idle_timeout = 30s
+    mountpoint = "coap2/"
+    notify_type = qos
+    publish_qos = coap
+    subscribe_qos = coap
+}

+ 19 - 0
examples/gateway.exproto.conf.example

@@ -0,0 +1,19 @@
+##--------------------------------------------------------------------
+## Gateway Exproto
+##
+## Add an Exproto gateway
+##--------------------------------------------------------------------
+## Note: This is an example of how to configure this feature
+##       you should copy and paste the below data into the emqx.conf for working
+
+gateway.exproto {
+    enable = true
+    enable_stats = true
+    frame {
+       max_body_length = 655350
+       max_headers = 100
+       max_headers_length = 10240
+    }
+    idle_timeout = 30s
+    mountpoint = "stomp2/"
+}

+ 37 - 0
examples/gateway.lwm2m.conf.example

@@ -0,0 +1,37 @@
+##--------------------------------------------------------------------
+## Gateway LwM2M
+##
+## Add a LwM2M gateway
+##--------------------------------------------------------------------
+## Note: This is an example of how to configure this feature
+##       you should copy and paste the below data into the emqx.conf for working
+
+gateway.lwm2m {
+    auto_observe = false
+    enable = true
+    enable_stats = true
+    idle_timeout = 30s
+    lifetime_max = 86400s
+    lifetime_min = 1s
+    mountpoint = "lwm2m2/"
+    qmode_time_window = 22s
+    translators {
+      command {
+        topic = "dn/#"
+      }
+      notify {
+        topic = "up/notify"
+      }
+      register {
+        topic = "up/resp"
+      },
+      response {
+        topic = "up/resp"
+      },
+      update {
+        topic = "up/resp"
+      }
+    }
+    update_msg_publish_condition = always
+    xml_dir = "/etc/emqx/lwm2m_xml"
+}

+ 23 - 0
examples/gateway.mqttsn.conf.example

@@ -0,0 +1,23 @@
+##--------------------------------------------------------------------
+## Gateway MQTT-SN
+##
+## Add a MQTT-SN gateway
+##--------------------------------------------------------------------
+## Note: This is an example of how to configure this feature
+##       you should copy and paste the below data into the emqx.conf for working
+
+gateway.mqttsn {
+    broadcast = true
+    enable = true
+    enable_qos3 = false
+    enable_stats = true
+    gateway_id = 1
+    idle_timeout = 30s
+    mountpoint = "mqttsn2/"
+    predefined = [
+      {
+        id = 1003
+        topic = "pred/1003"
+      }
+    ]
+}

+ 19 - 0
examples/gateway.stomp.conf.example

@@ -0,0 +1,19 @@
+##--------------------------------------------------------------------
+## Gateway STOMP
+##
+## Add STOMP CoAP gateway
+##--------------------------------------------------------------------
+## Note: This is an example of how to configure this feature
+##       you should copy and paste the below data into the emqx.conf for working
+
+gateway.stomp {
+    enable: true
+    enable_stats: true
+    frame: {
+        max_body_length: 655350
+        max_headers: 100
+        max_headers_length: 10240
+    }
+    idle_timeout: 30s
+    mountpoint: "stomp2/"
+}