-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* issues #69 API Notifications, SMS, telegram, slack, email * issues #84 update documentation * issues #64 technical debt * swagger * issues #64 technical debt * issues #84 update documentation * issues #84 update documentation
- Loading branch information
Showing
34 changed files
with
2,929 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
weight: 50 | ||
title: device | ||
groups: | ||
- javascript | ||
--- | ||
|
||
## Device{} {#device} | ||
|
||
Получить текущее устройство. Может вырнуть *null* если скрипт запускается | ||
вне контекста [Workflow](#ic_workflow) | ||
|
||
Доступные методы приведены далее: | ||
|
||
### .getName() {#deice_get_name} | ||
|
||
Получить наименование устройства. | ||
|
||
```coffeescript | ||
name = dev.getName() | ||
``` | ||
|
||
**На выходе** | ||
|
||
**Значение** | **Описание** | ||
-------------|-------------- | ||
`name` | type: string | ||
|
||
|
||
### .getDescription() {#deice_get_description} | ||
|
||
Получить описание устройства. | ||
|
||
```coffeescript | ||
description = dev.getDescription() | ||
``` | ||
|
||
**На выходе** | ||
|
||
**Значение** | **Описание** | ||
----------------|-------------- | ||
`description` | type: string | ||
|
||
### .runCommand(name, args) {#deice_run_command} | ||
|
||
Выполнить комманду на устройстве. | ||
|
||
```coffeescript | ||
description = dev.runCommand(name, ['foo','bar']) | ||
``` | ||
|
||
**На выходе** | ||
|
||
**Значение** | **Описание** | ||
----------------|-------------- | ||
`name` | type: string | ||
`args` | type: array | ||
|
||
### .modBus(func, address, count, command) {#deice_mod_bus} | ||
|
||
Выполнить комманду на modbus устройстве. | ||
|
||
```coffeescript | ||
COMMAND = [] | ||
FUNC = 'ReadHoldingRegisters' | ||
ADDRESS = 0 | ||
COUNT = 16 | ||
res = device.modBus(FUNC, ADDRESS, COUNT, COMMAND) | ||
if res.error | ||
print 'error: ', res.error | ||
``` | ||
|
||
**На выходе** | ||
|
||
**Значение** | **Описание** | ||
----------------|-------------- | ||
`func` | type: string, вызываемая функция | ||
`address` | type: int, адрес устройства | ||
`count` | type: int | ||
`command` | type: array(int) | ||
|
||
|
||
### .smartBus(command) {#deice_smart_bus} | ||
|
||
Выполнить комманду на smartbus устройстве. | ||
|
||
```coffeescript | ||
COMMAND = [] | ||
res = device.smartBus(COMMAND) | ||
if res.error | ||
print 'error: ', res.error | ||
``` | ||
|
||
**На выходе** | ||
|
||
**Значение** | **Описание** | ||
----------------|-------------- | ||
`command` | type: array(int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
weight: 50 | ||
title: device | ||
groups: | ||
- javascript | ||
--- | ||
|
||
## Device{} {#device} | ||
|
||
Получить текущее устройство. Может вырнуть *null* если скрипт запускается | ||
вне контекста [Workflow](#ic_workflow) | ||
|
||
Доступные методы приведены далее: | ||
|
||
### .getName() {#deice_get_name} | ||
|
||
Получить наименование устройства. | ||
|
||
```coffeescript | ||
name = dev.getName() | ||
``` | ||
|
||
**На выходе** | ||
|
||
**Значение** | **Описание** | ||
-------------|-------------- | ||
`name` | type: string | ||
|
||
|
||
### .getDescription() {#deice_get_description} | ||
|
||
Получить описание устройства. | ||
|
||
```coffeescript | ||
description = dev.getDescription() | ||
``` | ||
|
||
**На выходе** | ||
|
||
**Значение** | **Описание** | ||
----------------|-------------- | ||
`description` | type: string | ||
|
||
### .runCommand(name, args) {#deice_run_command} | ||
|
||
Выполнить комманду на устройстве. | ||
|
||
```coffeescript | ||
description = dev.runCommand(name, ['foo','bar']) | ||
``` | ||
|
||
**На выходе** | ||
|
||
**Значение** | **Описание** | ||
----------------|-------------- | ||
`name` | type: string | ||
`args` | type: array | ||
|
||
### .modBus(func, address, count, command) {#deice_mod_bus} | ||
|
||
Выполнить комманду на modbus устройстве. | ||
|
||
```coffeescript | ||
COMMAND = [] | ||
FUNC = 'ReadHoldingRegisters' | ||
ADDRESS = 0 | ||
COUNT = 16 | ||
res = device.modBus(FUNC, ADDRESS, COUNT, COMMAND) | ||
if res.error | ||
print 'error: ', res.error | ||
``` | ||
|
||
**На выходе** | ||
|
||
**Значение** | **Описание** | ||
----------------|-------------- | ||
`func` | type: string, вызываемая функция | ||
`address` | type: int, адрес устройства | ||
`count` | type: int | ||
`command` | type: array(int) | ||
|
||
|
||
### .smartBus(command) {#deice_smart_bus} | ||
|
||
Выполнить комманду на smartbus устройстве. | ||
|
||
```coffeescript | ||
COMMAND = [] | ||
res = device.smartBus(COMMAND) | ||
if res.error | ||
print 'error: ', res.error | ||
``` | ||
|
||
**На выходе** | ||
|
||
**Значение** | **Описание** | ||
----------------|-------------- | ||
`command` | type: array(int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
weight: 39 | ||
weight: 35 | ||
title: log | ||
groups: | ||
- javascript | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
weight: 39 | ||
weight: 35 | ||
title: log | ||
groups: | ||
- javascript | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.