Skip to content

Commit 879059d

Browse files
authored
Merge pull request #95 from Tanc009/master
publish jdcloud-sdk-python 1.6.61
2 parents a79abe5 + e8c171a commit 879059d

41 files changed

Lines changed: 1624 additions & 6 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

jdcloud_sdk/services/iotcore/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ API版本:1.1.15
33

44
|发布时间|版本号|更新|说明|
55
|---|---|---|---|
6+
|2020-05-14 |1.1.18 |增加朗锐接口 | *朗瑞查询接口加参数
67
|2020-05-14 |1.1.15 |增加朗锐接口 | *增加朗锐的设备接口和电梯运行状态接口
78
|2020-04-20 |1.1.5 |增加iotcore融合 | *增加实例列表、实例详情和实例删除接口
89
|2020-01-10 |1.1.4 |增加Edge日志上报通知接口 | *增加Edge日志上报通知接口,增加自定义物模型模板接口,增加自定义topic功能

jdcloud_sdk/services/iotcore/apis/AddLooDeviceRequest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ def __init__(self, parameters, header=None, version="v2"):
3232

3333
class AddLooDeviceParameters(object):
3434

35-
def __init__(self, instanceId, regionId, preOrderId, userPinParam, ):
35+
def __init__(self, instanceId, regionId, preOrderId, userPinParam, deviceType):
3636
"""
3737
:param instanceId: 设备归属的实例ID
3838
:param regionId: 设备归属的实例所在区域
3939
:param preOrderId: 申请单编号
4040
:param userPinParam: 用户Pin
41+
:param deviceType: 设备类型
4142
"""
4243

4344
self.instanceId = instanceId
@@ -50,6 +51,7 @@ def __init__(self, instanceId, regionId, preOrderId, userPinParam, ):
5051
self.manufacturer = None
5152
self.identifier = None
5253
self.description = None
54+
self.deviceType = deviceType
5355

5456
def setDeviceName(self, deviceName):
5557
"""
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CollectorReadMessageRequest(JDCloudRequest):
23+
"""
24+
获取协议信息
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(CollectorReadMessageRequest, self).__init__(
29+
'/regions/{regionId}/loongrayinstances/{instanceId}/readCollectorProperty', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CollectorReadMessageParameters(object):
34+
35+
def __init__(self, instanceId, regionId, identifier, protocol):
36+
"""
37+
:param instanceId: Hub实例Id
38+
:param regionId: 区域Id
39+
:param identifier: 当前的链接码
40+
:param protocol: 当前的协议类型:
41+
语音播报控制器-输入端子,0X00000~X0007:inputTerminal
42+
语音播报控制器-播放信息,0X00024~X0027:playInfo
43+
LR001-516-5B边缘数据采集器-传感器管理:sensor
44+
LR001-516-5B边缘数据采集器-采集器属性:collectorProperty
45+
LR001-516-5B边缘数据采集器-电梯属性:elevatorProperty
46+
47+
"""
48+
49+
self.instanceId = instanceId
50+
self.regionId = regionId
51+
self.identifier = identifier
52+
self.protocol = protocol
53+
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CollectorWriteMessageRequest(JDCloudRequest):
23+
"""
24+
写入采集器数据
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(CollectorWriteMessageRequest, self).__init__(
29+
'/regions/{regionId}/loongrayinstances/{instanceId}/writeCollectorProperty', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CollectorWriteMessageParameters(object):
34+
35+
def __init__(self, instanceId, regionId, identifier, data):
36+
"""
37+
:param instanceId: Hub实例Id
38+
:param regionId: 区域Id
39+
:param identifier: 当前的链接码
40+
:param data: 当前待写入的数据
41+
如指定播放设备,寄存地址:13对应16进制0x0D,寄存器值:2
42+
{
43+
"13":2
44+
}
45+
如播放控制,寄存地址:14对应16进制0x0E,寄存器值:1
46+
{
47+
"14": 1
48+
}
49+
如音量设置,寄存地址:15对应16进制0x0F,寄存器值:10,取值范围0~30
50+
{
51+
"15": 10
52+
}
53+
如指定文件夹和文件播放,寄存地址:16对应16进制0x10,寄存器值:1
54+
寄存器值为两字节,第一个字节为文件夹,第二个字节为文件名
55+
如0x01文件夹,0x03文件名,0x0103换算为10进制为259
56+
{
57+
"16": 259
58+
}
59+
如组合播放,寄存器地址:17、18和19,寄存器值:257、258和259,寄存器值的算法和指定文件夹和文件播放是一致的,如259可换算为0x01文件夹,0x03文件名
60+
{
61+
"17": 257,
62+
"18": 258,
63+
"19": 259
64+
}
65+
如播放广告,寄存地址:32对应16进制0x20,寄存器值:259,寄存器值的算法和指定文件夹和文件播放是一致的,如259可换算为0x01文件夹,0x03文件名
66+
{
67+
"32": 259
68+
}
69+
如指定文件夹循环播放,寄存地址:33对应16进制0x21,寄存器值:256,寄存器值的算法,如256可换算为0x0100文件夹
70+
{
71+
"33": 256
72+
}
73+
如指定文件夹随机播放,寄存地址:34对应16进制0x22,寄存器值:256,寄存器值的算法,如256可换算为0x0100文件夹
74+
{
75+
"34": 256
76+
}
77+
如指定曲目播放,寄存地址:35对应16进制0x23,寄存器值:13,歌曲选择范围为0~3000
78+
{
79+
"35": 13
80+
}
81+
82+
"""
83+
84+
self.instanceId = instanceId
85+
self.regionId = regionId
86+
self.identifier = identifier
87+
self.protocol = None
88+
self.data = data
89+
90+
def setProtocol(self, protocol):
91+
"""
92+
:param protocol: (Optional) 当前的协议类型,非必填项
93+
94+
"""
95+
self.protocol = protocol
96+
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class CreateAdminProductRequest(JDCloudRequest):
23+
"""
24+
新建产品
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(CreateAdminProductRequest, self).__init__(
29+
'/regions/{regionId}/loongrayinstances/{instanceId}/productsAdmin', 'POST', header, version)
30+
self.parameters = parameters
31+
32+
33+
class CreateAdminProductParameters(object):
34+
35+
def __init__(self, regionId, instanceId, productName, productType, ):
36+
"""
37+
:param regionId: 地域ID
38+
:param instanceId: IoT Engine实例ID信息
39+
:param productName: 产品名称,名称不可为空,3-30个字符,只支持汉字、英文字母、数字、下划线“_”及中划线“-”,必须以汉字、英文字母及数字开头结尾
40+
:param productType: 节点类型,取值:
41+
0:设备。设备不能挂载子设备。可以直连物联网平台,也可以作为网关的子设备连接物联网平台
42+
1:网关。网关可以挂载子设备,具有子设备管理模块,维持子设备的拓扑关系,和将拓扑关系同步到物联网平台
43+
44+
"""
45+
46+
self.regionId = regionId
47+
self.instanceId = instanceId
48+
self.productName = productName
49+
self.productType = productType
50+
self.productDescription = None
51+
self.templateId = None
52+
self.internalTags = None
53+
54+
def setProductDescription(self, productDescription):
55+
"""
56+
:param productDescription: (Optional) 产品描述,80字符以内
57+
"""
58+
self.productDescription = productDescription
59+
60+
def setTemplateId(self, templateId):
61+
"""
62+
:param templateId: (Optional) 物模型模板ID,内部参数,用户不可见,默认为自定义
63+
"""
64+
self.templateId = templateId
65+
66+
def setInternalTags(self, internalTags):
67+
"""
68+
:param internalTags: (Optional) 内部标签,内部参数,用户不可见,隐藏标签:hidden:true
69+
"""
70+
self.internalTags = internalTags
71+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DeleteDeviceRequest(JDCloudRequest):
23+
"""
24+
设备删除接口
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(DeleteDeviceRequest, self).__init__(
29+
'/regions/{regionId}/coreinstances/{instanceId}/device:delete', 'DELETE', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DeleteDeviceParameters(object):
34+
35+
def __init__(self, regionId, instanceId, deviceId):
36+
"""
37+
:param regionId: 区域id
38+
:param instanceId: 实例Id
39+
:param deviceId: 设备ID
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.deviceId = deviceId
45+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DeleteProductWithAdminRequest(JDCloudRequest):
23+
"""
24+
删除产品
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(DeleteProductWithAdminRequest, self).__init__(
29+
'/regions/{regionId}/loongrayinstances/{instanceId}/products/{productKey}/admin', 'DELETE', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DeleteProductWithAdminParameters(object):
34+
35+
def __init__(self, regionId, instanceId, productKey, ):
36+
"""
37+
:param regionId: 地域ID
38+
:param instanceId: IoT Engine实例ID信息
39+
:param productKey: 产品Key
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.productKey = productKey
45+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# coding=utf8
2+
3+
# Copyright 2018 JDCLOUD.COM
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# NOTE: This class is auto generated by the jdcloud code generator program.
18+
19+
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest
20+
21+
22+
class DescribeProductWithAdminRequest(JDCloudRequest):
23+
"""
24+
查看产品
25+
"""
26+
27+
def __init__(self, parameters, header=None, version="v2"):
28+
super(DescribeProductWithAdminRequest, self).__init__(
29+
'/regions/{regionId}/loongrayinstances/{instanceId}/products/{productKey}/admin', 'GET', header, version)
30+
self.parameters = parameters
31+
32+
33+
class DescribeProductWithAdminParameters(object):
34+
35+
def __init__(self, regionId, instanceId, productKey, ):
36+
"""
37+
:param regionId: 地域ID
38+
:param instanceId: IoT Engine实例ID信息
39+
:param productKey: 产品Key
40+
"""
41+
42+
self.regionId = regionId
43+
self.instanceId = instanceId
44+
self.productKey = productKey
45+

0 commit comments

Comments
 (0)