负载控件
Events
喊话器-音频播放进度通知
Topic: thing/product/{gateway_sn}/events
Direction: up
Method: speaker_audio_play_start_progress
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int | 0是成功,非0为异常,异常详细情况:见错误码 | |
| output | 输出 | struct | ||
| »psdk_index | psdk 负载设备索引 | int | {"min":0} | |
| »status | 当前所处阶段 | enum_string | {"in_progress":"处理中","ok":"播放成功"} | |
| »md5 | 文件内容的md5校验和, 用作机场唯一标识 | text | ||
| »progress | 进度 | struct | ||
| »»percent | 进度百分比 | int | {"max":"100","min":"0","step":"1","unit_name":"百分比 / %"} | |
| »»step_key | 当前步骤 | enum_string | {"change_work_mode":"切换工作模式","download":"从云端下载音频文件到机场","encoding":"编码pcm为opus","play":"开始播放","upload":"机场上传音频到psdk"} |
喊话器-tts播放进度通知
Topic: thing/product/{gateway_sn}/services
Direction: up
Method: speaker_tts_play_start_progress
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int | 0是成功,非0为异常,异常详细情况:见错误码 | |
| output | 输出 | struct | ||
| »psdk_index | psdk 负载设备索引 | int | {"min":0} | |
| »status | 当前所处阶段 | enum_string | {"in_progress":"处理中","ok":"播放成功"} | |
| »md5 | 文件内容的md5校验和, 用作机场唯一标识 | text | ||
| »progress | 进度 | struct | ||
| »»percent | 进度百分比 | int | {"max":"100","min":"0","step":"1","unit_name":"百分比 / %"} | |
| »»step_key | 当前步骤 | enum_string | {"change_work_mode":"切换工作模式","download":"从云端下载音频文件到机场","encoding":"编码pcm为opus","play":"开始播放","upload":"机场上传音频到psdk"} |
services
设置控件值
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: psdk_widget_value_set
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | ||
| index | 控件编号 | int | ||
| value | 控件值 | int |
设置控件值
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: psdk_widget_value_set
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
喊话器-开始播放音频
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: speaker_audio_play_start
Data
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"min":0} | |
| file | 音频文件 | struct | ||
| »name | 文件名 | text | ||
| »url | 文件下载链接 | text | ||
| »md5 | 音频文件的md5校验和, 用作机场唯一标识 | text | ||
| »format | 喊话器输入文件格式 | enum_string | {"pcm":"pcm 格式"} |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: speaker_audio_play_start
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
喊话器-开始播放TTS文本
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: speaker_tts_play_start
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"min":0} | |
| tts | tts 文本 | struct | ||
| »name | 文件名 | text | ||
| »text | 文本内容 | text | ||
| »md5 | 文件内容的md5校验和, 用作机场唯一标识 | text |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: speaker_tts_play_start
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
喊话器-停止播放
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: speaker_play_stop
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"min":0} |
Example:
{"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","data": {"psdk_index": 2},"method": "speaker_play_stop","tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","timestamp": 1689748815503}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: speaker_play_stop
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
Example:
{"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx","data": {"result": 0},"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx","timestamp": 1654070968655,"method": "speaker_play_stop"}
喊话器-设置播放模式
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: speaker_play_mode_set
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"max":3,"min":0,"step":1} | |
| play_mode | 喊话器播放模式 | enum_int | {"0":"单次播放","1":"循环播放(单曲)"} |
Example:
{"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","data": {"play_mode": 1,"psdk_index": 2},"method": "speaker_play_mode_set","tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","timestamp": 1689842974113}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: speaker_play_mode_set
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
Example:
{"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx","data": {"result": 0},"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx","timestamp": 1654070968655,"method": "speaker_play_mode_set"}
喊话器-设置音量
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: speaker_play_volume_set
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"max":3,"min":0,"step":1} | |
| play_volume | 喊话器音量 | int | {"max":100,"min":0,"step":1} |
Example:
{"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","data": {"play_volume": 13,"psdk_index": 2},"method": "speaker_play_volume_set","tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","timestamp": 1689842989237}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: speaker_play_volume_set
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
Example:
{"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx","data": {"result": 0},"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx","timestamp": 1654070968655,"method": "speaker_play_volume_set"}
探照灯-打开
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: psdk_light_open
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"min":0} |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: psdk_light_open
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
探照灯-关闭
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: psdk_light_close
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"min":0} |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: psdk_light_close
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
探照灯-曝闪模式设置
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: psdk_set_flash_mode
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"min":0} | |
| light_flash_mode | 曝闪模式 | enum_int | {"0":关,"1":灯光曝闪,"2":警示灯曝闪} |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: psdk_set_flash_mode
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
探照灯-设置亮度
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: psdk_light_set_brightness
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"min":0} | |
| light_brightness | 灯光亮度 | enum_int | {"1":一档 33,"2":2档66,"3":三档 99} |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: psdk_light_set_brightness
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
探照灯-设置俯仰角
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: psdk_light_set_pitch_angle
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"min":0} | |
| light_pitch_angle | 俯仰角 | int | {"max":30,"min":-90,"step":1} |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: psdk_light_set_pitch_angle
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
探照灯-打开云台联动
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: psdk_open_light_ptz_linkage
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"min":0} |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: psdk_open_light_ptz_linkage
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |
探照灯-关闭云台联动
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: psdk_close_light_ptz_linkage
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| psdk_index | psdk 负载设备索引 | int | {"min":0} |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: psdk_close_light_ptz_linkage
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 结果返回码 | int |