Skip to content

Commit

Permalink
issues #84 update mqtt client info
Browse files Browse the repository at this point in the history
  • Loading branch information
e154 committed Feb 9, 2020
1 parent a9fa197 commit d778e57
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 2 deletions.
6 changes: 6 additions & 0 deletions doc/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ Languages:
- title: "IC.Map()"
url: "#ic_map"

- title: "IC.Mqtt()"
url: "#ic_mqtt"

- title: "IC.Log"
url: "#ic_log"

Expand Down Expand Up @@ -289,6 +292,9 @@ Languages:
- title: "IC.Map()"
url: "#ic_map"

- title: "IC.Mqtt()"
url: "#ic_mqtt"

- title: "IC.Log"
url: "#ic_log"

Expand Down
6 changes: 5 additions & 1 deletion doc/content/javascript/_message.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ value = message.direction
value = message.mqtt
topic = message.getVar('mqtt_topic')
payload = JSON.parse(message.getVar('mqtt_payload'))
qos = message.getVar('mqtt_qos')
duplicate = message.getVar('mqtt_duplicate')
```

**На выходе**
Expand All @@ -148,5 +150,7 @@ payload = JSON.parse(message.getVar('mqtt_payload'))
-------------|--------------
`value` | type: bool
`topic` | type: string
`payload` | type: Object
`payload` | type: Object
`qos` | type: byte
`duplicate`| type: bool

6 changes: 5 additions & 1 deletion doc/content/javascript/_message.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ value = message.direction
value = message.mqtt
topic = message.getVar('mqtt_topic')
payload = JSON.parse(message.getVar('mqtt_payload'))
qos = message.getVar('mqtt_qos')
duplicate = message.getVar('mqtt_duplicate')
```

**На выходе**
Expand All @@ -148,5 +150,7 @@ payload = JSON.parse(message.getVar('mqtt_payload'))
-------------|--------------
`value` | type: bool
`topic` | type: string
`payload` | type: Object
`payload` | type: Object
`qos` | type: byte
`duplicate`| type: bool

44 changes: 44 additions & 0 deletions doc/content/javascript/_mqtt.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
weight: 30
title: mqtt
groups:
- javascript
---

## IC.Mqtt() {#ic_mqtt}

Объект mqtt клиента

```coffeescript
mqtt = IC.Mqtt()
return if !mqtt
```

**На выходе**

**Значение** | **Описание**
-------------|--------------
`mqtt` | type: Object, ссылка на экземпляр *Mqtt

Доступные методы приведены далее:

### .publish(topic, payload, qos, retain) {#ic_mqtt_publish}

Отправить сообщение в канал

```coffeescript
mqtt = IC.Mqtt()
if mqtt
mqtt.publish(topic, payload, qos, retain)
```

**На выходе**

**Значение** | **Описание**
-------------|--------------
`topic` | type: string
`payload` | type: []byte
`qos` | type: uint8
`retain` | type: bool


44 changes: 44 additions & 0 deletions doc/content/javascript/_mqtt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
weight: 30
title: mqtt
groups:
- javascript
---

## IC.Mqtt() {#ic_mqtt}

Объект mqtt клиента

```coffeescript
mqtt = IC.Mqtt()
return if !mqtt
```

**На выходе**

**Значение** | **Описание**
-------------|--------------
`mqtt` | type: Object, ссылка на экземпляр *Mqtt

Доступные методы приведены далее:

### .publish(topic, payload, qos, retain) {#ic_mqtt_publish}

Отправить сообщение в канал

```coffeescript
mqtt = IC.Mqtt()
if mqtt
mqtt.publish(topic, payload, qos, retain)
```

**На выходе**

**Значение** | **Описание**
-------------|--------------
`topic` | type: string
`payload` | type: []byte
`qos` | type: uint8
`retain` | type: bool


0 comments on commit d778e57

Please sign in to comment.