Description
- Description of the gauge widget
Interface version
Version number |
Writer |
Date |
Description |
1.0 |
Qin Zhitian |
June 29, 2021 |
initial release |
IP address
http:
API list
Name |
Description |
set |
set attributes |
get |
get attributes |
1. set
Description of request parameters
Parameter Name |
Type |
Description |
attr |
string |
attribute |
attr.action |
string |
action:VALUE-‘set the scale of a gauge’; |
attr.scale_angle |
int |
parameter:the angle of a gauge(0-360) |
attr.scale_line_cnt |
int |
parameter:the number of scale lines |
attr.scale_t_label_cnt |
int |
parameter:the label number |
Call example
{
"wid": "s1",
"cmd" : "set",
"attr": {
"action": "VALUE",
"scale_angle": 180,
"scale_line_cnt": 18,
"scale_t_label_cnt": 6,
}
}
Note: set the angle of a gauge to 180, the number of scale lines to 18 and the number of labels to 6;
Return example
{
"code": 0
}
Description of return parameters
Parameter Name |
Type |
Description |
result |
string |
result information |
result.code |
int |
error code |
Error Code
##2、get
Description of request parameters
Parameter Name |
Type |
Description |
Call example
{
"wid": "s1",
"cmd" : "get"
}
Return example
{
"label_count": 6,
"code": 0
}
Description of return parameters
Parameter Name |
Type |
Description |
result |
string |
result information |
result.code |
int |
error code |
result.label_count |
int |
the label number of a gauge |
Error Code
文档更新时间: 2021-08-18 22:15 作者:plj