blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 281 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 6 116 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 313
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 18.2k 668M ⌀ | star_events_count int64 0 102k | fork_events_count int64 0 38.2k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 107
values | src_encoding stringclasses 20
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.02M | extension stringclasses 78
values | content stringlengths 2 6.02M | authors listlengths 1 1 | author stringlengths 0 175 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4c1cf4302d6b4fb1b43812ae6f5705d8cca0f085 | bf399a9a5fa201dbc3373c0459160b68abc2439a | /hackerphone/solution.py | f88363419bb49078817554109359c931d9f7dea9 | [] | no_license | altoid/hackerrank | 5efc4bc64d748b2091a9771cfbdc5991325bb680 | 665bd7dada6115dfde67b90a52e6a18c918fa40b | refs/heads/master | 2022-11-05T17:17:24.962311 | 2022-10-01T07:04:24 | 2022-10-01T07:04:24 | 115,870,698 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 661 | py | #!/usr/bin/env python
from __future__ import division
import fileinput
from pprint import pprint, pformat
def solve(balls):
# idea: if N = 2 ** (len(balls)), then each value in balls can appear half that many times. sum N/2 * b[i] then
# compute the mean
n = 2 ** (len(balls))
arr = map(lambda x: x * (n / 2), balls)
s = reduce(lambda x, y: x + y, arr)
# print n
# print arr
return s / n
if __name__ == '__main__':
fi = fileinput.FileInput()
balls = []
count = int(fi.readline().strip())
for _ in xrange(count):
balls.append(int(fi.readline().strip()))
result = solve(balls)
print result
| [
"dtomm@radiumone.com"
] | dtomm@radiumone.com |
34c43b5bd6d5d29cd64b0ff72bcd60a6ca2e020f | 0f6ce7c24aa3c6aa27fe9558930589052985d57c | /rpc/sms.py | c9c51bd188779a771dd98f3a84040762dbe77980 | [] | no_license | feitianyiren/GuaikNet | bf12e3493d668aa1b8d63d25a0667589c796a532 | 7f6ce8c2cbfe5717a48b1724c87d9676de9eb1ef | refs/heads/master | 2020-04-07T05:15:38.248300 | 2018-10-26T18:36:54 | 2018-10-26T18:36:54 | 158,089,531 | 1 | 0 | null | 2018-11-18T14:00:17 | 2018-11-18T14:00:17 | null | UTF-8 | Python | false | false | 1,162 | py | import logging
import requests
import json
from server.application import gm
rpc = gm.get("rpc")
api_key = "your_api_key"
api_secret = "your_secret"
brand = "Guaik"
@rpc.route()
def send_verify_code(number):
request_id = None
try:
data = {"api_key":api_key,"api_secret":api_secret,"number":number,"brand":brand}
headers = {'Content-Type': 'application/json'}
r = requests.post("https://api.nexmo.com/verify/json",headers = headers, data = json.dumps(data))
data = json.loads(r.text)
if data["status"] == "0":
request_id = data["request_id"]
except Exception as e: logging.error(e)
return request_id
@rpc.route()
def check_code(request_id,code):
result = False
try:
data = {"api_key":api_key,"api_secret":api_secret,"request_id":request_id,"code":code}
headers = {'Content-Type': 'application/json'}
r = requests.post("https://api.nexmo.com/verify/check/json",headers = headers, data = json.dumps(data))
data = json.loads(r.text)
if data["status"] == "0":
result = True
except Exception as e: logging.error(e)
return result
| [
"luting.gu@gmail.com"
] | luting.gu@gmail.com |
195c739c836f560393c77e011e10200c8a5d8c12 | 27960fad21a3893ee1ea5fb47ec70ff2ead08746 | /hackerrank/Python/manipulateArray/manipulate_array.py | 1ea31c9fa4ad37d09adf66bb41f5a1cf0fb43ad5 | [] | no_license | hamc17/codingProblemSolutions | 1f482592c628b83d0e56438641026e80bc3d27a2 | f2ee6668caebd53e254346636dab6a85c398da76 | refs/heads/master | 2020-03-25T00:53:09.011799 | 2018-12-10T16:53:19 | 2018-12-10T16:53:19 | 143,210,595 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,117 | py | """
Problem:
"Starting with a 1-indexed array of zeros and a list of operations,
for each operation add the given value to each of the array elements
between the two given indices, inclusive.
Once all operations have been performed, return the maximum value in your
array."
"""
def manipulate_array(item_count, op_count, op_array):
"""Performs the addition operations specified in
op_array on an array of size item_count
Arguments:
item_count {integer} -- The number of items in the array.
op_count {integer} -- The number of operations to perform.
op_array {list} -- The array of operations.
Returns:
integer -- The maximum value after all operations have been
perormed.
"""
max_val = 0
value_array = [0] * (item_count + 1)
total = 0
for op in op_array:
first, last, incr = map(int, op.strip().split(" "))
value_array[first-1] += incr
value_array[last] -= incr
for val in value_array:
total += val
max_val = (total if total > max_val else max_val)
return max_val
| [
"hamc17@gmail.com"
] | hamc17@gmail.com |
f42d4964a3eb8c95d635d79ef4aa1b2ba7600bce | cde7e790103d94b6f5fb263196923f25ee50b57d | /matflow_formable/__init__.py | eb51aa93f65a5a9fecc1fb86a48e59eadbd749f9 | [
"MIT"
] | permissive | LightForm-group/matflow-formable | b651ee192195c26335016f54c3575f1d26771468 | 1b13a9addd7f232ef2f101a35aeccfe3eea1f7a4 | refs/heads/master | 2023-04-06T16:26:56.066710 | 2022-08-08T11:25:04 | 2022-08-08T11:25:04 | 262,661,868 | 4 | 3 | MIT | 2022-02-15T15:41:12 | 2020-05-09T21:26:57 | Python | UTF-8 | Python | false | false | 812 | py | '`matflow_formable.__init__.py`'
from functools import partial
from matflow_formable._version import __version__
from matflow.extensions import (
input_mapper,
output_mapper,
cli_format_mapper,
register_output_file,
sources_mapper,
software_versions
)
SOFTWARE = 'formable'
input_mapper = partial(input_mapper, software=SOFTWARE)
output_mapper = partial(output_mapper, software=SOFTWARE)
cli_format_mapper = partial(cli_format_mapper, software=SOFTWARE)
register_output_file = partial(register_output_file, software=SOFTWARE)
sources_mapper = partial(sources_mapper, software=SOFTWARE)
software_versions = partial(software_versions, software=SOFTWARE)
# This import must come after assigning the partial functions:
from matflow_formable import main
from matflow_formable import load | [
"adam.jp@live.co.uk"
] | adam.jp@live.co.uk |
b4a975bf4387dd947398d44bea9e1f7bbb00028d | e9c06318d1fdb4e97959da01ef12bb52d4ff8daa | /Coding-Practice/3.17.py | 9eb89f911763952fe543116ba4413e2b7673d977 | [] | no_license | AIFFEL-SSAC-CodingMaster3/YJ.PAP | 7dd716e539a7109afe34bd03050ef559941614dc | 55eb6a6bd194e39c24cd426cd70ece54a1667ab3 | refs/heads/master | 2023-05-09T03:30:48.386736 | 2021-06-03T02:24:39 | 2021-06-03T02:24:39 | 329,225,148 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py | class Solution:
def mergeTrees(self, root1: TreeNode, root2: TreeNode) -> TreeNode:
if root1 == None:
return root2
if root2 == None:
return root1
if not root1 and not root2:
return None
root1.val += root2.val
root1.left = self.mergeTrees(root1.left, root2.left)
root1.right = self.mergeTrees(root1.right, root2.right)
return root1
| [
"austinm@naver.com"
] | austinm@naver.com |
41b9e07b0f50c84b875fe7ebec63fa52d0d3f16a | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Pdf_docx_pptx_xlsx_epub_png/source/reportlab/graphics/charts/doughnut.py | f1228d0ce2b235500bc67db072a493cfe263dcd1 | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 15,376 | py | #Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/charts/doughnut.py
# doughnut chart
__version__='3.3.0'
__doc__="""Doughnut chart
Produces a circular chart like the doughnut charts produced by Excel.
Can handle multiple series (which produce concentric 'rings' in the chart).
"""
import copy
from math import sin, cos, pi
from reportlab.lib import colors
from reportlab.lib.validators import isColor, isNumber, isListOfNumbersOrNone,\
isListOfNumbers, isColorOrNone, isString,\
isListOfStringsOrNone, OneOf, SequenceOf,\
isBoolean, isListOfColors,\
isNoneOrListOfNoneOrStrings,\
isNoneOrListOfNoneOrNumbers,\
isNumberOrNone
from reportlab.lib.attrmap import *
from reportlab.pdfgen.canvas import Canvas
from reportlab.graphics.shapes import Group, Drawing, Line, Rect, Polygon, Ellipse, \
Wedge, String, SolidShape, UserNode, STATE_DEFAULTS
from reportlab.graphics.widgetbase import Widget, TypedPropertyCollection, PropHolder
from reportlab.graphics.charts.piecharts import AbstractPieChart, WedgeProperties, _addWedgeLabel, fixLabelOverlaps
from reportlab.graphics.charts.textlabels import Label
from reportlab.graphics.widgets.markers import Marker
from functools import reduce
class SectorProperties(WedgeProperties):
"""This holds descriptive information about the sectors in a doughnut chart.
It is not to be confused with the 'sector itself'; this just holds
a recipe for how to format one, and does not allow you to hack the
angles. It can format a genuine Sector object for you with its
format method.
"""
_attrMap = AttrMap(BASE=WedgeProperties,
)
class Doughnut(AbstractPieChart):
_attrMap = AttrMap(
x = AttrMapValue(isNumber, desc='X position of the chart within its container.'),
y = AttrMapValue(isNumber, desc='Y position of the chart within its container.'),
width = AttrMapValue(isNumber, desc='width of doughnut bounding box. Need not be same as width.'),
height = AttrMapValue(isNumber, desc='height of doughnut bounding box. Need not be same as height.'),
data = AttrMapValue(None, desc='list of numbers defining sector sizes; need not sum to 1'),
labels = AttrMapValue(isListOfStringsOrNone, desc="optional list of labels to use for each data point"),
startAngle = AttrMapValue(isNumber, desc="angle of first slice; like the compass, 0 is due North"),
direction = AttrMapValue(OneOf('clockwise', 'anticlockwise'), desc="'clockwise' or 'anticlockwise'"),
slices = AttrMapValue(None, desc="collection of sector descriptor objects"),
simpleLabels = AttrMapValue(isBoolean, desc="If true(default) use String not super duper WedgeLabel"),
# advanced usage
checkLabelOverlap = AttrMapValue(isBoolean, desc="If true check and attempt to fix\n standard label overlaps(default off)",advancedUsage=1),
sideLabels = AttrMapValue(isBoolean, desc="If true attempt to make chart with labels along side and pointers", advancedUsage=1)
)
def __init__(self):
self.x = 0
self.y = 0
self.width = 100
self.height = 100
self.data = [1,1]
self.labels = None # or list of strings
self.startAngle = 90
self.direction = "clockwise"
self.simpleLabels = 1
self.checkLabelOverlap = 0
self.sideLabels = 0
self.slices = TypedPropertyCollection(SectorProperties)
self.slices[0].fillColor = colors.darkcyan
self.slices[1].fillColor = colors.blueviolet
self.slices[2].fillColor = colors.blue
self.slices[3].fillColor = colors.cyan
self.slices[4].fillColor = colors.pink
self.slices[5].fillColor = colors.magenta
self.slices[6].fillColor = colors.yellow
def demo(self):
d = Drawing(200, 100)
dn = Doughnut()
dn.x = 50
dn.y = 10
dn.width = 100
dn.height = 80
dn.data = [10,20,30,40,50,60]
dn.labels = ['a','b','c','d','e','f']
dn.slices.strokeWidth=0.5
dn.slices[3].popout = 10
dn.slices[3].strokeWidth = 2
dn.slices[3].strokeDashArray = [2,2]
dn.slices[3].labelRadius = 1.75
dn.slices[3].fontColor = colors.red
dn.slices[0].fillColor = colors.darkcyan
dn.slices[1].fillColor = colors.blueviolet
dn.slices[2].fillColor = colors.blue
dn.slices[3].fillColor = colors.cyan
dn.slices[4].fillColor = colors.aquamarine
dn.slices[5].fillColor = colors.cadetblue
dn.slices[6].fillColor = colors.lightcoral
d.add(dn)
return d
def normalizeData(self, data=None):
from operator import add
sum = float(reduce(add,data,0))
return abs(sum)>=1e-8 and list(map(lambda x,f=360./sum: f*x, data)) or len(data)*[0]
def makeSectors(self):
# normalize slice data
if isinstance(self.data,(list,tuple)) and isinstance(self.data[0],(list,tuple)):
#it's a nested list, more than one sequence
normData = []
n = []
for l in self.data:
t = self.normalizeData(l)
normData.append(t)
n.append(len(t))
self._seriesCount = max(n)
else:
normData = self.normalizeData(self.data)
n = len(normData)
self._seriesCount = n
#labels
checkLabelOverlap = self.checkLabelOverlap
L = []
L_add = L.append
if self.labels is None:
labels = []
if not isinstance(n,(list,tuple)):
labels = [''] * n
else:
for m in n:
labels = list(labels) + [''] * m
else:
labels = self.labels
#there's no point in raising errors for less than enough labels if
#we silently create all for the extreme case of no labels.
if not isinstance(n,(list,tuple)):
i = n-len(labels)
if i>0:
labels = list(labels) + [''] * i
else:
tlab = 0
for m in n:
tlab += m
i = tlab-len(labels)
if i>0:
labels = list(labels) + [''] * i
xradius = self.width/2.0
yradius = self.height/2.0
centerx = self.x + xradius
centery = self.y + yradius
if self.direction == "anticlockwise":
whichWay = 1
else:
whichWay = -1
g = Group()
startAngle = self.startAngle #% 360
styleCount = len(self.slices)
if isinstance(self.data[0],(list,tuple)):
#multi-series doughnut
ndata = len(self.data)
yir = (yradius/2.5)/ndata
xir = (xradius/2.5)/ndata
ydr = (yradius-yir)/ndata
xdr = (xradius-xir)/ndata
for sn,series in enumerate(normData):
for i,angle in enumerate(series):
endAngle = (startAngle + (angle * whichWay)) #% 360
if abs(startAngle-endAngle)<1e-5:
startAngle = endAngle
continue
if startAngle < endAngle:
a1 = startAngle
a2 = endAngle
else:
a1 = endAngle
a2 = startAngle
startAngle = endAngle
#if we didn't use %stylecount here we'd end up with the later sectors
#all having the default style
sectorStyle = self.slices[i%styleCount]
# is it a popout?
cx, cy = centerx, centery
if sectorStyle.popout != 0:
# pop out the sector
averageAngle = (a1+a2)/2.0
aveAngleRadians = averageAngle * pi/180.0
popdistance = sectorStyle.popout
cx = centerx + popdistance * cos(aveAngleRadians)
cy = centery + popdistance * sin(aveAngleRadians)
yr1 = yir+sn*ydr
yr = yr1 + ydr
xr1 = xir+sn*xdr
xr = xr1 + xdr
if isinstance(n,(list,tuple)):
theSector = Wedge(cx, cy, xr, a1, a2, yradius=yr, radius1=xr1, yradius1=yr1)
else:
theSector = Wedge(cx, cy, xr, a1, a2, yradius=yr, radius1=xr1, yradius1=yr1, annular=True)
theSector.fillColor = sectorStyle.fillColor
theSector.strokeColor = sectorStyle.strokeColor
theSector.strokeWidth = sectorStyle.strokeWidth
theSector.strokeDashArray = sectorStyle.strokeDashArray
g.add(theSector)
if sn == 0:
text = self.getSeriesName(i,'')
if text:
averageAngle = (a1+a2)/2.0
aveAngleRadians = averageAngle*pi/180.0
labelRadius = sectorStyle.labelRadius
rx = xradius*labelRadius
ry = yradius*labelRadius
labelX = centerx + (0.5 * self.width * cos(aveAngleRadians) * labelRadius)
labelY = centery + (0.5 * self.height * sin(aveAngleRadians) * labelRadius)
l = _addWedgeLabel(self,text,averageAngle,labelX,labelY,sectorStyle)
if checkLabelOverlap:
l._origdata = { 'x': labelX, 'y':labelY, 'angle': averageAngle,
'rx': rx, 'ry':ry, 'cx':cx, 'cy':cy,
'bounds': l.getBounds(),
}
L_add(l)
else:
#single series doughnut
yir = yradius/2.5
xir = xradius/2.5
for i,angle in enumerate(normData):
endAngle = (startAngle + (angle * whichWay)) #% 360
if abs(startAngle-endAngle)<1e-5:
startAngle = endAngle
continue
if startAngle < endAngle:
a1 = startAngle
a2 = endAngle
else:
a1 = endAngle
a2 = startAngle
startAngle = endAngle
#if we didn't use %stylecount here we'd end up with the later sectors
#all having the default style
sectorStyle = self.slices[i%styleCount]
# is it a popout?
cx, cy = centerx, centery
if sectorStyle.popout != 0:
# pop out the sector
averageAngle = (a1+a2)/2.0
aveAngleRadians = averageAngle * pi/180.0
popdistance = sectorStyle.popout
cx = centerx + popdistance * cos(aveAngleRadians)
cy = centery + popdistance * sin(aveAngleRadians)
if n > 1:
theSector = Wedge(cx, cy, xradius, a1, a2, yradius=yradius, radius1=xir, yradius1=yir)
elif n==1:
theSector = Wedge(cx, cy, xradius, a1, a2, yradius=yradius, radius1=xir, yradius1=yir, annular=True)
theSector.fillColor = sectorStyle.fillColor
theSector.strokeColor = sectorStyle.strokeColor
theSector.strokeWidth = sectorStyle.strokeWidth
theSector.strokeDashArray = sectorStyle.strokeDashArray
g.add(theSector)
# now draw a label
if labels[i] != "":
averageAngle = (a1+a2)/2.0
aveAngleRadians = averageAngle*pi/180.0
labelRadius = sectorStyle.labelRadius
labelX = centerx + (0.5 * self.width * cos(aveAngleRadians) * labelRadius)
labelY = centery + (0.5 * self.height * sin(aveAngleRadians) * labelRadius)
rx = xradius*labelRadius
ry = yradius*labelRadius
l = _addWedgeLabel(self,labels[i],averageAngle,labelX,labelY,sectorStyle)
if checkLabelOverlap:
l._origdata = { 'x': labelX, 'y':labelY, 'angle': averageAngle,
'rx': rx, 'ry':ry, 'cx':cx, 'cy':cy,
'bounds': l.getBounds(),
}
L_add(l)
if checkLabelOverlap and L:
fixLabelOverlaps(L)
for l in L: g.add(l)
return g
def draw(self):
g = Group()
g.add(self.makeSectors())
return g
def sample1():
"Make up something from the individual Sectors"
d = Drawing(400, 400)
g = Group()
s1 = Wedge(centerx=200, centery=200, radius=150, startangledegrees=0, endangledegrees=120, radius1=100)
s1.fillColor=colors.red
s1.strokeColor=None
d.add(s1)
s2 = Wedge(centerx=200, centery=200, radius=150, startangledegrees=120, endangledegrees=240, radius1=100)
s2.fillColor=colors.green
s2.strokeColor=None
d.add(s2)
s3 = Wedge(centerx=200, centery=200, radius=150, startangledegrees=240, endangledegrees=260, radius1=100)
s3.fillColor=colors.blue
s3.strokeColor=None
d.add(s3)
s4 = Wedge(centerx=200, centery=200, radius=150, startangledegrees=260, endangledegrees=360, radius1=100)
s4.fillColor=colors.gray
s4.strokeColor=None
d.add(s4)
return d
def sample2():
"Make a simple demo"
d = Drawing(400, 400)
dn = Doughnut()
dn.x = 50
dn.y = 50
dn.width = 300
dn.height = 300
dn.data = [10,20,30,40,50,60]
d.add(dn)
return d
def sample3():
"Make a more complex demo"
d = Drawing(400, 400)
dn = Doughnut()
dn.x = 50
dn.y = 50
dn.width = 300
dn.height = 300
dn.data = [[10,20,30,40,50,60], [10,20,30,40]]
dn.labels = ['a','b','c','d','e','f']
d.add(dn)
return d
def sample4():
"Make a more complex demo with Label Overlap fixing"
d = Drawing(400, 400)
dn = Doughnut()
dn.x = 50
dn.y = 50
dn.width = 300
dn.height = 300
dn.data = [[10,20,30,40,50,60], [10,20,30,40]]
dn.labels = ['a','b','c','d','e','f']
dn.checkLabelOverlap = True
d.add(dn)
return d
if __name__=='__main__':
from reportlab.graphics.renderPDF import drawToFile
d = sample1()
drawToFile(d, 'doughnut1.pdf')
d = sample2()
drawToFile(d, 'doughnut2.pdf')
d = sample3()
drawToFile(d, 'doughnut3.pdf')
| [
"ryfeus@gmail.com"
] | ryfeus@gmail.com |
25cd32fcfa59a1dd6d38c88daf0e48f1bd5f8283 | 32a81b96a631fa5f7cd3e1da79499b36f1cbbf86 | /src/artifice/scraper/config/settings.py | aa602920a6b6d62fb2e9637ebe0dae41b8846510 | [] | no_license | minelminel/celery-rabbitmq-example | f4e696f24d924395d09934a33fba9ea9ca065603 | 4eccabf46aec855cfa4738a06a992f71232d6364 | refs/heads/master | 2020-07-01T11:44:43.656850 | 2019-08-30T04:08:13 | 2019-08-30T04:08:13 | 201,165,312 | 0 | 0 | null | 2019-08-30T04:08:13 | 2019-08-08T02:48:51 | Python | UTF-8 | Python | false | false | 3,758 | py | try:
import configparser
except ImportError:
configparser = None
import os
import logging
log = logging.getLogger(__name__)
loc = os.path.dirname(os.path.abspath(__file__))
class Settings(object):
"""
The settings can be changed by setting up a config file.
For an example of a config file, see
`scraper.cfg` in the main-directory.
"""
def __init__(self):
"""
Sets the default values for the project
"""
# BASE_DIR:///artifice/scraper/
self.BASE_DIR = os.path.dirname(loc)
# prototypes
self._eth0 = '0.0.0.0'
self._exposed_port = 8080
self._db_name = 'site.db'
self._redis_pword = 'password'
self._redis_host = 'localhost'
self._redis_port = 6379
self._celery_broker_uname = 'michael'
self._celery_broker_pword = 'michael123'
self._celery_broker_host = 'localhost'
self._celery_broker_virtual_host = 'michael_vhost'
# flask
self.TESTING = False
self.URL_PREFIX = ''
self.FLASK_PORT = self._exposed_port
self.FLASK_HOST = '0.0.0.0'
self.FLASK_DEBUG = False
self.FLASK_USE_RELOADER = False
self.FLASK_THREADED = True
# logging
self.LOG_FILE = 'flask.log'
self.LOG_LEVEL = 'INFO'
self.CELERY_LOG_LEVEL = 'ERROR'
self.CELERY_LOG_FILE = 'celery.log'
self.STDOUT = True
# database
self.DROP_TABLES = True
self.SQLALCHEMY_TRACK_MODIFICATIONS = False
self.SQLALCHEMY_DATABASE_URI = 'sqlite:///{}'.format(
os.path.join(self.BASE_DIR, self._db_name))
# redis
self.REDIS_URL = 'redis://{}:@{}:{}/0'.format(
self._redis_pword,
self._redis_host,
self._redis_port)
self.REDIS_HIT_COUNTER = 'HIT_COUNTER'
# defaults
self.ARGS_DEFAULT_LIMIT = 10
self.ARGS_DEFAULT_STATUS = ['READY', 'TASKED', 'DONE']
self.SUPERVISOR_ENABLED = True
self.SUPERVISOR_DEBUG = False
self.SUPERVISOR_POLITE = 1
# celery
self.CELERY_WORKERS = 8
self.CELERY_MODULE = 'background'
self.CELERY_BROKER = 'amqp://{}:{}@{}/{}'.format(
self._celery_broker_uname,
self._celery_broker_pword,
self._celery_broker_host,
self._celery_broker_virtual_host)
self.CELERY_BACKEND = 'rpc://'
self.CELERY_INCLUDE = ['artifice.scraper.background.tasks']
# endpoints
self.URL_FOR_STATUS = 'http://{}:{}/status'.format(self._eth0, self._exposed_port)
self.URL_FOR_QUEUE = 'http://{}:{}/queue'.format(self._eth0, self._exposed_port)
self.URL_FOR_CONTENT = 'http://{}:{}/content'.format(self._eth0, self._exposed_port)
def init_from(self, file=None, envvar=None, log_verbose=False):
if envvar:
file = os.getenv(envvar)
if log_verbose:
log.info("Running with config from: " + (str(file)))
if not file:
return
try:
parser = configparser.RawConfigParser()
parser.read(file)
# parse prototypes
# parse flask
# parse logging
# parse database
# parse redis
# parse defaults
# parse celery
# parse endpoints
except AttributeError:
log.info("Cannot use configparser in Python2.7")
raise
| [
"ctrlcmdspace@gmail.com"
] | ctrlcmdspace@gmail.com |
800f9873449fc974ce76834a2141007fee2ff5f6 | 072456f4295208330af93f8bd428b52b172b0b3e | /Nested Logic.py | e8ff44d625c7e8ff07ca740999acdc2eb0aa89b0 | [] | no_license | Sandmir/hackerrank | 56e16449ab2e5d8f2be2bff9fc182a95e2d4099a | 92abb1951e56a4fe5c82ae9406d420fe8c71ba84 | refs/heads/master | 2021-01-05T08:59:08.625531 | 2017-11-06T17:51:04 | 2017-11-06T17:51:04 | 99,515,337 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 752 | py | __author__ = 'Senyutina'
import datetime
actualDay,actualMonth,actualYear = input().strip().split(' ')
actualDay,actualMonth,actualYear = [int(actualDay),int(actualMonth),int(actualYear)]
expectedDay,expectedMonth,expectedYear = input().strip().split(' ')
expectedDay,expectedMonth,expectedYear = [int(expectedDay),int(expectedMonth),int(expectedYear)]
fine = 0
d_a = datetime.date(actualYear,actualMonth,actualDay)
d_e = datetime.date(expectedYear,expectedMonth,expectedDay)
if d_a > d_e:
if (actualYear - expectedYear) > 0:
fine = 10000
elif actualMonth - expectedMonth > 0:
fine = (actualMonth - expectedMonth)*500
elif actualDay - expectedDay >0:
fine = (actualDay - expectedDay)*15
print(fine) | [
"sandmir2010@gmail.com"
] | sandmir2010@gmail.com |
53e57c810578fe9bfb63bc0c3c4a5616ac1b4306 | 70d39e4ee19154a62e8c82467ef75b601e584738 | /docker/mac-robber.py | 2503134682dfb5d51eb85125c86ad0210ea31582 | [] | no_license | babywyrm/sysadmin | 6f2724be13ae7e5b9372278856a8c072073beffb | 2a5f3d29c7529bc917d4ff9be03af30ec23948a5 | refs/heads/master | 2023-08-16T03:50:38.717442 | 2023-08-16T03:05:55 | 2023-08-16T03:05:55 | 210,228,940 | 10 | 5 | null | 2023-05-01T23:15:31 | 2019-09-22T23:42:50 | PowerShell | UTF-8 | Python | false | false | 5,827 | py | #!/usr/bin/env python
#
# Author: Jim Clausing
# Date: 2017-09-01
# Version: 1.2.0
#
# Desc: rewrite of the sleithkit mac-robber in Python
# Unlinke the TSK version, this one can actually includes the MD5 & inode number
# though I still return a 0 in the MD5 column for non-regular files, but calculating
# hashes likely will modify atime, so it is turned off by default
#
# Note: in Python 2.7.x, st_ino, st_dev, st_nlink, st_uid, and st_gid are dummy variables
# on Windows systems. This is apparently fixed in current Python 3 versions.
# On *ALL* systems, os.stat does not return btime, so we put 0 there. :-(
#
# A useful way to use this on a live Linux system is with read-only --bind mounts
#
# # mount --bind / /mnt
# # mount -o ro,remount,bind /mnt
# # ./mac-robber.py -5 -x /mnt/tmp -r /mnt -m system-foo:/ /mnt
#
# This gets us hashes, but because the bind mount is read-only doesn't update atimes
#
# Copyright (c) 2017 AT&T Open Source. All rights reserved.
#
import os
import sys
import argparse
import hashlib
from stat import *
__version_info__ = (1,2,3)
__version__ = ".".join(map(str, __version_info__))
def mode_to_string(mode):
lookup = ['---','--x','-w-','-wx','r--','r-x','rw-','rwx']
if S_ISDIR(mode):
mode_str = 'd'
elif S_ISCHR(mode):
mode_str = 'c'
elif S_ISBLK(mode):
mode_str = 'b'
elif S_ISREG(mode):
mode_str = '-'
elif S_ISFIFO(mode):
mode_str = 'p'
elif S_ISLNK(mode):
mode_str = 'l'
elif S_ISSOCK:
mode_str = 's'
own_mode = lookup[(mode & 0700)>>6]
if mode & 04000:
if mode & 0100:
own_mode = own_mode.replace('x','s')
else:
own_mode = own_mode[:1] + 'S'
mode_str = mode_str + own_mode
grp_mode = lookup[(mode & 070)>>3]
if mode & 02000:
if mode & 010:
grp_mode = grp_mode.replace('x','s')
else:
grp_mode = grp_mode[:1] + 'S'
mode_str = mode_str + own_mode
oth_mode = lookup[(mode & 07)]
if mode & 01000:
if mode & 01:
oth_mode = oth_mode.replace('x','t')
else:
oth_mode = oth_mode[:1] + 'T'
mode_str = mode_str + oth_mode
return mode_str
def process_item(dirpath,item):
md5 = hashlib.md5()
fname = os.path.join(dirpath,item)
if args.exclude and (fname in args.exclude or dirpath in args.exclude):
return
try:
if os.path.islink(fname):
status = os.lstat(fname)
else:
status = os.stat(fname)
except IOError:
return
except OSError:
return
if args.hashes and S_ISREG(status.st_mode):
try:
if not (fname.find('/proc/') != -1 and fname.endswith('/kcore')) and status.st_size > 0:
with open(fname, "rb") as f:
for block in iter(lambda: f.read(65536), b""):
md5.update(block)
md5str = md5.hexdigest()
elif status.st_size == 0:
md5str = "d41d8cd98f00b204e9800998ecf8427e"
else:
md5str = "0"
except IOError:
md5str = "0"
else:
md5str = "0"
mode = mode_to_string(status.st_mode)
if os.path.islink(fname) and status.st_size > 0:
mode = mode + ' -> ' + os.readlink(fname)
if sys.version_info<(2,7,0):
mtime = '%20.9f' % (status.st_mtime)
atime = '%20.9f' % (status.st_atime)
ctime = '%20.9f' % (status.st_mtime)
else:
mtime = '{:20.9f}'.format(status.st_mtime)
atime = '{:20.9f}'.format(status.st_atime)
ctime = '{:20.9f}'.format(status.st_mtime)
btime = 0
size = status.st_size
uid = status.st_uid
gid = status.st_gid
inode = status.st_ino
if args.rmprefix:
if fname.startswith(args.rmprefix):
fname = fname[len(args.rmprefix):]
if args.prefix:
if fname.find('/') == 0:
fname = args.prefix + fname
else:
fname = args.prefix + '/' + fname
return md5str+'|'+fname+'|'+str(inode)+'|'+mode+'|'+str(uid)+'|'+str(gid)+'|'+str(size)+'|'+atime+'|'+mtime+'|'+ctime+'|'+str(btime)
if sys.version_info<(2,6,0):
sys.stderr.write("Not tested on versions earlier than 2.6\n")
exit(1)
parser = argparse.ArgumentParser(description='collect data on files')
parser.add_argument('directories', metavar='DIR', nargs='+', help='directories to traverse')
parser.add_argument('-m','--prefix', metavar='PREFIX', help='prefix string')
parser.add_argument('-5','--hashes', action='store_true', help='do MD5 calculation (disabled by default)', default=False)
parser.add_argument('-x','--exclude', metavar='EXCLUDE', action='append', help='directory trees or files to exclude, does not handle file extensions or regex', default=[])
parser.add_argument('-r','--rmprefix', metavar='RMPREFIX', help='prefix to remove, useful when using read-only --bind mount to prevent atime updates')
parser.add_argument('-V','--version', action='version', help='print version number',
version='%(prog)s v{version}'.format(version= __version__))
args = parser.parse_args()
for directory in args.directories:
for dirpath,dirs,files in os.walk(directory):
dirs[:] = [d for d in dirs if d not in args.exclude]
for directory in dirs:
outstr = process_item(dirpath,directory)
if outstr is not None:
print outstr
sys.stdout.flush()
for filename in files:
if filename in args.exclude:
continue
outstr = process_item(dirpath,filename)
if outstr is not None:
print outstr
sys.stdout.flush()
#########################################
| [
"noreply@github.com"
] | noreply@github.com |
066effad0c61eaeb45141cc368bcbcdf21c38db2 | 394e518672de29d5e238ed96ce1fb9aadbe9d52c | /model_query/swagger_server/models/search_prediction_get_body.py | 00a62bba43d5a5454fbd2d6ae1d6bf46ef4f2287 | [] | no_license | adheer-araokar/domino_onboarding_project_3 | 8be1c81e58d77c757cd1335c85c1e89160df4c29 | 3b8d5c0f106598f4b56d318481a5b02f827f1917 | refs/heads/master | 2022-12-13T23:42:11.519208 | 2020-01-30T11:56:16 | 2020-01-30T11:56:16 | 237,140,544 | 0 | 0 | null | 2022-12-08T03:31:40 | 2020-01-30T04:44:37 | Python | UTF-8 | Python | false | false | 1,939 | py | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class SearchPredictionGetBody(Model):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self, prediction_id: str=None): # noqa: E501
"""SearchPredictionGetBody - a model defined in Swagger
:param prediction_id: The prediction_id of this SearchPredictionGetBody. # noqa: E501
:type prediction_id: str
"""
self.swagger_types = {
'prediction_id': str
}
self.attribute_map = {
'prediction_id': 'prediction_id'
}
self._prediction_id = prediction_id
@classmethod
def from_dict(cls, dikt) -> 'SearchPredictionGetBody':
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The searchPredictionGetBody of this SearchPredictionGetBody. # noqa: E501
:rtype: SearchPredictionGetBody
"""
return util.deserialize_model(dikt, cls)
@property
def prediction_id(self) -> str:
"""Gets the prediction_id of this SearchPredictionGetBody.
:return: The prediction_id of this SearchPredictionGetBody.
:rtype: str
"""
return self._prediction_id
@prediction_id.setter
def prediction_id(self, prediction_id: str):
"""Sets the prediction_id of this SearchPredictionGetBody.
:param prediction_id: The prediction_id of this SearchPredictionGetBody.
:type prediction_id: str
"""
if prediction_id is None:
raise ValueError("Invalid value for `prediction_id`, must not be `None`") # noqa: E501
self._prediction_id = prediction_id
| [
"adheer@Adheers-MacBook-Pro.local"
] | adheer@Adheers-MacBook-Pro.local |
5ca96192f23a53c978c927462388217f3e5724cd | 943afdad323c439260c0a374100e6687bb2aa279 | /Crawler.py | 2f46944f7fd3796eb56d27f2d88afdedebe829af | [] | no_license | Serena-Tang/Crawler | 7a51d6490da5b099c55fc9c8bf14b4d4d27aca98 | 9423c62d85a9c5bb93052f1b7ea7deeaf1d2b265 | refs/heads/main | 2023-08-15T22:54:03.487754 | 2021-10-13T20:28:27 | 2021-10-13T20:28:27 | 416,887,265 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,321 | py | import requests
from bs4 import BeautifulSoup
import re, json
from urllib import parse
import threadpool
"""
https://search.jd.com/Search?keyword=T%E6%81%A4%E7%94%B7&enc=utf-8&qrst=1&rt=1&stop=1&vt=2&wq=T%E6%81%A4%E7%94%B7&page=1&s=1&click=0
https://search.jd.com/Search?keyword=T%E6%81%A4%E7%94%B7&enc=utf-8&qrst=1&rt=1&stop=1&vt=2&wq=T%E6%81%A4%E7%94%B7&page=3&s=52&click=0
https://search.jd.com/Search?keyword=T%E6%81%A4%E7%94%B7&enc=utf-8&qrst=1&rt=1&stop=1&vt=2&wq=T%E6%81%A4%E7%94%B7&page=5&s=101&click=0
https://search.jd.com/Search?keyword=T%E6%81%A4%E7%94%B7&enc=utf-8&qrst=1&rt=1&stop=1&vt=2&wq=T%E6%81%A4%E7%94%B7&page=7&s=152&click=0
https://search.jd.com/Search?keyword=T%E6%81%A4%E7%94%B7&enc=utf-8&qrst=1&rt=1&stop=1&vt=2&wq=T%E6%81%A4%E7%94%B7&page=9&s=222&click=0
"""
headers = {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36'}
base = 'https://item.jd.com'
def write_csv(row):
with open('shop.txt',"a+",encoding='utf8')as f:
f.write(row)
def get_id(url):
id = re.compile('\d+')
res = id.findall(url)
return res[0]
def get_comm(url,comm_num):
# Store the results
good_comments=[]
# Obtain the comments
item_id = get_id(url)
pages=comm_num//10
# Define the number of failed requests
error_num=0
for page in range(pages):
if error_num>2:
return good_comments
comment_url = 'https://sclub.jd.com/comment/productPageComments.action?callback=fetchJSON_comment98vv113&productId={}&score=0&sortType=5&page={}&pageSize=10&isShadowSku=0&fold=1'.format(
item_id,page)
headers['Referer'] = url
comment = requests.get(comment_url, headers=headers).text
start = comment.find('{"productAttr"')
end = comment.find('"afterDays":0}]}') + len('"afterDays":0}]}')
try:
content = json.loads(comment[start:end])
comments = content['comments']
for c in comments:
comm=c['content']
good_comments.append(comm)
except:
error_num+=1
continue
return good_comments
def get_comm_num(url):
# Obtain the number of comments
item_id=get_id(url)
comm_url='https://club.jd.com/comment/productCommentSummaries.action?referenceIds={}&callback=jQuery7016680'.format(item_id)
comment = requests.get(comm_url, headers=headers).text
start=comment.find('{"CommentsCount"')
end=comment.find('"PoorRateStyle":0}]}')+len('"PoorRateStyle":0}]}')
try:
content=json.loads(comment[start:end])['CommentsCount']
except:
content=None
return 0
comm_num=content[0]['CommentCount']
return comm_num
def get_shop_info(url):
shop_data={}
html=requests.get(url,headers=headers)
soup=BeautifulSoup(html.text,'lxml')
shop_name=soup.select(".popbox-inner .mt h3 a")[0].text
shop_score=soup.select(".score-part span.score-detail em")
try:
shop_evaluation=shop_score[0].text
logistics=shop_score[1].text
sale_server=shop_score[2].text
except:
shop_evaluation=None
logistics=None
sale_server=None
shop_info=soup.select("div.p-parameter ul")
shop_brand=shop_info[0].select("ul li a")[0].text
try:
shop_other=shop_info[1].select('li')
for s in shop_other:
data=s.text.split(':')
key=data[0]
value=data[1]
shop_data[key]=value
except:
shop_other=None
shop_data['shop_name']=shop_name
shop_data['shop_evaluation']=shop_evaluation
shop_data['logistics']=logistics
shop_data['sale_server']=sale_server
shop_data['shop_brand']=shop_brand
return shop_data
def get_index(page, s):
# Intiate Thread Object
#index_thread=ThreadPoolExecutor()
# Initial Request Page
url = 'https://search.jd.com/Search?keyword=T%E6%81%A4%E7%94%B7&enc=utf-8&qrst=1&rt=1&stop=1&vt=2&wq=T%E6%81%A4%E7%94%B7&' \
'page={}&s={}&click=0'.format(page, s)
html = requests.get(url, headers=headers)
soup = BeautifulSoup(html.text, 'lxml')
items = soup.select('li.gl-item')
for item in items:
#index_thread.submit(get_index_thread,item=item,filename=filename)
inner_url = item.select('.gl-i-wrap div.p-img a')[0].get('href')
inner_url = parse.urljoin(base, inner_url)
# Price
price = item.select("div.p-price strong i")[0].text
# Number of comments
comm_num=get_comm_num(inner_url)
# Store Information
shop_info_data=get_shop_info(inner_url)
# Obtain comments
comments=None
if comm_num>0:
comments=get_comm(inner_url,comm_num)
shop_info_data['comments']=comments
shop_info_data['price']=price
shop_info_data['comm_num']=comm_num
print(shop_info_data)
shop_info_data=str(shop_info_data)+'\n'
write_csv(shop_info_data)
if __name__ == '__main__':
vars=[]
pool=threadpool.ThreadPool(10)
s = 1
for i in range(1, 200, 2):
vars.append(([i,s],None))
s = s + 51
print(vars)
reque=threadpool.makeRequests(get_index,vars)
for r in reque:
pool.putRequest(r)
pool.wait()
| [
"noreply@github.com"
] | noreply@github.com |
62e9919f8fe5745cb117876ae51196d4b4bc314f | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_029/ch178_2020_08_14_14_38_35_094615.py | bfc04d96c2b6f66c5cb150cd9294fc1f83977d91 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | def junta_nomes(a,b,c):
lis = []
for i in a:
if len(a) != 0:
for d in c:
lis.append(i+''+d)
for e in b:
if len(b) != 0:
for f in c:
lis.append(i+''+f)
return lis | [
"you@example.com"
] | you@example.com |
3758d9bb2fa07b6f534cb0733e1c6c968793be0d | e4f000d5ab81cad0fb24509f0f7a004abbdba747 | /.emacs.d/.python-environments/default/lib/python2.7/sre.py | af0d4dacffb0e1a726024b1606ffc4cd5e819c7c | [] | no_license | goyala1/configFiles | b5a37f92b8e7615d966be45e0a8b6dcb6f363209 | b82dd81f3a9f650667a2fb9e7728af0ef3d57b24 | refs/heads/master | 2021-04-27T18:49:56.517825 | 2018-02-22T01:59:59 | 2018-02-22T01:59:59 | 122,347,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 46 | py | /Users/abhigoyal/anaconda/lib/python2.7/sre.py | [
"ag3417@columbia.edu"
] | ag3417@columbia.edu |
8ea877918ccecfd454148c91681d14422b661d56 | bfbe08da83dc354e63e34d3ea698374222880fb2 | /age.py | d759f09048fb4669859c7bde9f618b0a4e146378 | [] | no_license | wuyenching0306/age | 1f48cc06dd6220c8257884b13674257100bc6ccf | 365531960bd1f67bd41579f596da810093053b1d | refs/heads/master | 2022-11-28T15:08:40.149588 | 2020-08-07T06:46:58 | 2020-08-07T06:46:58 | 285,758,183 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 370 | py | drive = input('請問您有開過車嗎? ')
age = input('請問您的年齡? ')
age = int(age)
if drive == '有':
if age >= 18:
print('請務必注意安全喔!')
else:
print('請不要無照駕駛!')
elif drive == '沒有' or drive == '無':
if age >= 18:
print('可以嘗試去考取駕照喔!')
else:
print('你需要年滿18歲才可以考取駕照喔!') | [
"a80233810@gmail.com"
] | a80233810@gmail.com |
f17fd9f2d917793ba4512aa37f689ece8ed71944 | 48832d27da16256ee62c364add45f21b968ee669 | /res/scripts/client/gui/scaleform/genconsts/quests_season_awards_types.py | 556871ca4a30e5a322e6482ad59791a4ee691bce | [] | no_license | webiumsk/WOT-0.9.15.1 | 0752d5bbd7c6fafdd7f714af939ae7bcf654faf7 | 17ca3550fef25e430534d079876a14fbbcccb9b4 | refs/heads/master | 2021-01-20T18:24:10.349144 | 2016-08-04T18:08:34 | 2016-08-04T18:08:34 | 64,955,694 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 496 | py | # 2016.08.04 19:52:02 Střední Evropa (letní čas)
# Embedded file name: scripts/client/gui/Scaleform/genConsts/QUESTS_SEASON_AWARDS_TYPES.py
class QUESTS_SEASON_AWARDS_TYPES(object):
VEHICLE = 1
FEMALE_TANKMAN = 2
COMMENDATION_LISTS = 3
# okay decompyling c:\Users\PC\wotsources\files\originals\res\scripts\client\gui\scaleform\genconsts\quests_season_awards_types.pyc
# decompiled 1 files: 1 okay, 0 failed, 0 verify failed
# 2016.08.04 19:52:02 Střední Evropa (letní čas)
| [
"info@webium.sk"
] | info@webium.sk |
d121bf079e21bb3572451d80d62d4a0be0a819dd | cb15cbc38c7db92b0211057ed12cdbf7e35e1e1e | /RFE_1030_MultiClass.py | 33e34a37252c3327084be2ce4e2470cee9831d6b | [] | no_license | LiuyangJLU/Dementia | 175cdd22a98fa533dda8b4ff2aa65626778455bb | 749ab1e427748ad2358a0309e9374927fa030452 | refs/heads/master | 2020-03-07T00:14:59.357159 | 2018-03-28T14:53:55 | 2018-03-28T14:53:55 | 127,152,872 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,634 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 29 08:52:43 2017
Python3
Required Packages
--pandas
--numpy
--sklearn
--scipy
Info
-name :"liuyang"
-email :'1410455465@qq.com'
-date :2017-10-29
-Description
Q_AD_DLB_VD_after_normalizion_0_to_三分类问题
利用递归特征消除法,
@author: ly
"""
import numpy as np
import pandas as pd
import os
from scipy import stats#导入统计的包T_test检验
from sklearn.model_selection import KFold
from sklearn import cross_validation
from sklearn.svm import SVC
from sklearn.naive_bayes import MultinomialNB
from sklearn import neighbors
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import AdaBoostClassifier
from sklearn.neural_network import MLPClassifier
from sklearn.feature_selection import SelectKBest
from sklearn.feature_selection import RFE
from sklearn.linear_model import LogisticRegression
filepath=r"E:\workspace\Dementia\Q_AD_DLB_VD_after_normalizion_0_to_1.csv"
#filepath="~/Dementia/Apr_1th_AD_VD_DLB/Q_AD_DLB_VD_after_normalizion_0_to_1.csv"
dataset=pd.read_csv(filepath)
temp=dataset.copy()
##加载类标签,并对每个类别进行计数
VD_count=0
AD_count=0
DLB_count=0
for i in range(len(temp)):
if temp.loc[i,'Diagnosis'] =='DLB' :
temp.loc[i,'Diagnosis']=0
DLB_count+=1
elif temp.loc[i,'Diagnosis'] =='AD' :
temp.loc[i,'Diagnosis']=1
AD_count+=1
else :
temp.loc[i,'Diagnosis']=2
VD_count+=1
##原始数据,除掉类标的列
raw_data = temp.drop('Diagnosis',1)
#类标所在的列
raw_label=list(temp.loc[:,'Diagnosis'])
#raw_newdata=RFE(estimator=LogisticRegression(), n_features_to_select=10).fit_transform(raw_data, raw_label)
def kFoldTest(estimator,raw_data,raw_label):
predict=[]
kf=KFold(n_splits=10)
#for循环主要是把数据索引
for train_index,test_index in kf.split(raw_data):
X_train,X_test = raw_data[train_index],raw_data[test_index]#将数据分为验证集和测试集
#将标签分为验证集和测试集,这里对类别的总数是从索引0到最后一个元素(index[-1]+1)的和加起来。
#Y_test这个标签没用,只是做对称
Y_train, Y_test = raw_label[:test_index[0]]+raw_label[test_index[-1]+1:], raw_label[test_index[0]:test_index[-1]+1]
estimator.fit(X_train, Y_train)#
test_target_temp=estimator.predict(X_test)
predict.append(test_target_temp)
test_target = [i for temp in predict for i in temp]#将10次测试集展平
return test_target
#函数功能:统计正确率,以及每个类的正确数
def statistics(raw,test):
DLB_true=0
AD_true=0
VD_true=0
for i in range(len(raw)):
if raw[i]==0 and test[i]==0:
DLB_true+=1
if raw[i]==1 and test[i]==1:
AD_true+=1
if raw[i]==2 and test[i]==2:
VD_true+=1
ACC=(DLB_true+AD_true+VD_true)/len(raw)
return ACC,DLB_true,AD_true,VD_true
def RFE_Acc(featurenum,raw_data,raw_label):
#writer = pd.ExcelWriter(r"E:\workspace\Dementia\test_acc\ACC.xlsx")
writer = pd.ExcelWriter(r"E:\workspace\result\ACC.xlsx")
df=pd.DataFrame(index=['ACC','DLB_ACC','AD_ACC','VD_ACC'])
for num in featurenum:
#递归特征消除
#selector = RFE(estimator, 3000, step=200)#每次迭代删除200个特征,保留3000个特征
##使用逻辑斯特回归分类器,具有coef_属性,在训练一个评估器后,coef_相当于每个特征的权重,RFE在每一次迭代中得到一个新的coef_
#并删除权重低的特征,直到剩下的特征达到指定的数量
#n_features_to_select选择的特征个数
raw_newdata=RFE(estimator=LogisticRegression(), n_features_to_select=num).fit_transform(raw_data, raw_label)
#利用各个分类器去测试准确性
#用SVM
estimator = SVC(kernel='linear', C=1)
ACC,DLB,VD,AD=statistics(raw_label,kFoldTest(estimator,raw_newdata,raw_label))
df['SVM']=[ACC,DLB/DLB_count,VD/VD_count,AD/AD_count]
#用KNN
estimator=neighbors.KNeighborsClassifier(n_neighbors=10)
ACC,DLB,VD,AD=statistics(raw_label,kFoldTest(estimator,raw_newdata,raw_label))
df['KNN']=[ACC,DLB/DLB_count,VD/VD_count,AD/AD_count]#返回的每一列的值
##随机森林
estimator=RandomForestClassifier(n_estimators=1000)
ACC,DLB,VD,AD=statistics(raw_label,kFoldTest(estimator,raw_newdata,raw_label))
df['RF']=[ACC,DLB/DLB_count,VD/VD_count,AD/AD_count]#返回的每一列的值
#AdaBoostClassifier
estimator=AdaBoostClassifier(n_estimators=1000)
ACC,DLB,VD,AD=statistics(raw_label,kFoldTest(estimator,raw_newdata,raw_label))
df['AdaBoost']=[ACC,DLB/DLB_count,VD/VD_count,AD/AD_count]#返回的每一列的值
#朴素贝叶斯
estimator=MultinomialNB(alpha=0.01)
ACC,DLB,VD,AD=statistics(raw_label,kFoldTest(estimator,raw_newdata,raw_label))
df['NB']=[ACC,DLB/DLB_count,VD/VD_count,AD/AD_count]#返回的每一列的值
#神经网络
estimator=MLPClassifier(alpha=1)
ACC,DLB,VD,AD=statistics(raw_label,kFoldTest(estimator,raw_newdata,raw_label))
df['MLP']=[ACC,DLB/DLB_count,VD/VD_count,AD/AD_count]#返回的每一列的值
df.to_excel(writer,sheet_name=str(num)+'个特征',index=True)
writer.save()
RFE_Acc([5,6,7,8,9,10],raw_data,raw_label)
| [
"31733596+LiuyangJLU@users.noreply.github.com"
] | 31733596+LiuyangJLU@users.noreply.github.com |
8b18c91e4730428e4c3500f9d82b92bb78de13ee | c82e130f8ae7144ad5b5e445149d8254dc3a054a | /helloworld.py~ | 887c64d42b6d858a9fa67071c4bc7f993f4420c9 | [] | no_license | craigdubyah/lens_device | 1570d1e31c8b6500187dfe52fa3f167a40fff3b9 | a7c8af9a90c6030f082ea8db510f085e4e9ab890 | refs/heads/master | 2021-01-10T13:17:38.585394 | 2016-03-20T20:53:02 | 2016-03-20T20:53:02 | 54,164,583 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,059 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygtk
pygtk.require('2.0')
import gtk
class HelloWorld:
# This is a callback function. The data arguments are ignored
# in this example. More on callbacks below.
def hello(self, widget, data=None):
print "Hello World"
def delete_event(self, widget, event, data=None):
# If you return FALSE in the "delete_event" signal handler,
# GTK will emit the "destroy" signal. Returning TRUE means
# you don't want the window to be destroyed.
# This is useful for popping up 'are you sure you want to quit?'
# type dialogs.
print("delete event occurred")
# Change FALSE to TRUE and the main window will not be destroyed
# with a "delete_event".
return False
def destroy(self, widget, data=None):
print "destroy signal occurred"
gtk.main_quit()
def __init__(self):
# create a new window
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
# When the window is given the "delete_event" signal (this is given
# by the window manager, usually by the "close" option, or on the
# titlebar), we ask it to call the delete_event () function
# as defined above. The data passed to the callback
# function is NULL and is ignored in the callback function.
self.window.connect("delete_event", self.delete_event)
# Here we connect the "destroy" event to a signal handler.
# This event occurs when we call gtk_widget_destroy() on the window,
# or if we return FALSE in the "delete_event" callback.
self.window.connect("destroy", self.destroy)
# Sets the border width of the window.
self.window.set_border_width(10)
# Creates a new button with the label "Hello World".
self.button = gtk.Button("Hello World")
# When the button receives the "clicked" signal, it will call the
# function hello() passing it None as its argument. The hello()
# function is defined above.
self.button.connect("clicked", self.hello, None)
# This will cause the window to be destroyed by calling
# gtk_widget_destroy(window) when "clicked". Again, the destroy
# signal could come from here, or the window manager.
self.button.connect_object("clicked", gtk.Widget.destroy, self.window)
# This packs the button into the window (a GTK container).
self.window.add(self.button)
# The final step is to display this newly created widget.
self.button.show()
# and the window
self.window.show()
def main(self):
# All PyGTK applications must have a gtk.main(). Control ends here
# and waits for an event to occur (like a key press or mouse event).
gtk.main()
# If the program is run directly or passed as an argument to the python
# interpreter then create a HelloWorld instance and show it
if __name__ == "__main__":
hello = HelloWorld()
hello.main()
| [
"craig.see@gmail.com"
] | craig.see@gmail.com | |
0cf039b68da9cd0e85e1cf0254a0e89c9453a8ae | 5057db862b6a0754e867469469622f4957440437 | /pyassign1/planets.py | 48a266a1c50850196795536ac8bdbd5d2cf1f767 | [] | no_license | CCMEDJH/ichw | 8a97687cf14f3e3e9e18bf2f5175e15857d6eab6 | 815d3f04151fbb2e2af05be8e2ac820425dca1b0 | refs/heads/master | 2020-03-31T07:31:27.121945 | 2018-12-31T06:06:45 | 2018-12-31T06:06:45 | 152,024,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 832 | py | import turtle
import math
wn = turtle.Screen()
wn.bgcolor("black")
Sun = turtle.Turtle()
Sun.pensize(50)
Sun.color("yellow")
Sun.goto(0,0)
Sun.stamp()
Plants = ["Mercury","Venus","Earth","Mars","Jupiter","Saturn"]
Colors = ["white","orange","lightblue","purple","pink","lightgreen"]
PlantsRadius = [1,1,2,2,3,3]
Radius_a = [2,4.5,8,10,13,20]
Radius_b = [3,4,7,12,15,19]
Speed = [7,5.5,4,3,1.5,1]
for x in range(6):
Plants[x] = turtle.Turtle()
Plants[x].color(Colors[x])
Plants[x].shape("circle")
Plants[x].speed(0)
Plants[x].shapesize(PlantsRadius[x])
Plants[x].penup()
Plants[x].goto(Radius_a[x] * 15,0)
Plants[x].pendown()
for i in range(3600):
for x in range(6):
Plants[x].goto(15 * Radius_a[x] * math.cos(Speed[x] * i / (360)), 15 * Radius_b[x] * math.sin(Speed[x] * i / (360)))
| [
"noreply@github.com"
] | noreply@github.com |
fe65d3c37aaddf2a65dd606f8793933918d36b7a | bc9f66258575dd5c8f36f5ad3d9dfdcb3670897d | /lib/googlecloudsdk/command_lib/util/concepts/presentation_specs.py | 5ce3f81bfe836ac2d6f02210bc819c33c953c394 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | google-cloud-sdk-unofficial/google-cloud-sdk | 05fbb473d629195f25887fc5bfaa712f2cbc0a24 | 392abf004b16203030e6efd2f0af24db7c8d669e | refs/heads/master | 2023-08-31T05:40:41.317697 | 2023-08-23T18:23:16 | 2023-08-23T18:23:16 | 335,182,594 | 9 | 2 | NOASSERTION | 2022-10-29T20:49:13 | 2021-02-02T05:47:30 | Python | UTF-8 | Python | false | false | 12,018 | py | # -*- coding: utf-8 -*- #
# Copyright 2018 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Classes to define how concept args are added to argparse.
A PresentationSpec is used to define how a concept spec is presented in an
individual command, such as its help text. ResourcePresentationSpecs are
used for resource specs.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope.concepts import util
from googlecloudsdk.command_lib.util.concepts import info_holders
class PresentationSpec(object):
"""Class that defines how concept arguments are presented in a command.
Attributes:
name: str, the name of the main arg for the concept. Can be positional or
flag style (UPPER_SNAKE_CASE or --lower-train-case).
concept_spec: googlecloudsdk.calliope.concepts.ConceptSpec, The spec that
specifies the concept.
group_help: str, the help text for the entire arg group.
prefixes: bool, whether to use prefixes before the attribute flags, such as
`--myresource-project`.
required: bool, whether the anchor argument should be required. If True, the
command will fail at argparse time if the anchor argument isn't given.
plural: bool, True if the resource will be parsed as a list, False
otherwise.
group: the parser or subparser for a Calliope command that the resource
arguments should be added to. If not provided, will be added to the main
parser.
attribute_to_args_map: {str: str}, dict of attribute names to names of
associated arguments.
hidden: bool, True if the arguments should be hidden.
"""
def __init__(self,
name,
concept_spec,
group_help,
prefixes=False,
required=False,
flag_name_overrides=None,
plural=False,
group=None,
hidden=False):
"""Initializes a ResourcePresentationSpec.
Args:
name: str, the name of the main arg for the concept.
concept_spec: googlecloudsdk.calliope.concepts.ConceptSpec, The spec that
specifies the concept.
group_help: str, the help text for the entire arg group.
prefixes: bool, whether to use prefixes before the attribute flags, such
as `--myresource-project`. This will match the "name" (in flag format).
required: bool, whether the anchor argument should be required.
flag_name_overrides: {str: str}, dict of attribute names to the desired
flag name. To remove a flag altogether, use '' as its rename value.
plural: bool, True if the resource will be parsed as a list, False
otherwise.
group: the parser or subparser for a Calliope command that the resource
arguments should be added to. If not provided, will be added to the main
parser.
hidden: bool, True if the arguments should be hidden.
"""
self.name = name
self._concept_spec = concept_spec
self.group_help = group_help
self.prefixes = prefixes
self.required = required
self.plural = plural
self.group = group
self._attribute_to_args_map = self._GetAttributeToArgsMap(
flag_name_overrides)
self.hidden = hidden
@property
def concept_spec(self):
"""The ConceptSpec associated with the PresentationSpec.
Returns:
(googlecloudsdk.calliope.concepts.ConceptSpec) the concept spec.
"""
return self._concept_spec
@property
def attribute_to_args_map(self):
"""The map of attribute names to associated args.
Returns:
{str: str}, the map.
"""
return self._attribute_to_args_map
def _GenerateInfo(self, fallthroughs_map):
"""Generate a ConceptInfo object for the ConceptParser.
Must be overridden in subclasses.
Args:
fallthroughs_map: {str: [googlecloudsdk.calliope.concepts.deps.
_FallthroughBase]}, dict keyed by attribute name to lists of
fallthroughs.
Returns:
info_holders.ConceptInfo, the ConceptInfo object.
"""
raise NotImplementedError
def _GetAttributeToArgsMap(self, flag_name_overrides):
"""Generate a map of attributes to primary arg names.
Must be overridden in subclasses.
Args:
flag_name_overrides: {str: str}, the dict of flags to overridden names.
Returns:
{str: str}, dict from attribute names to arg names.
"""
raise NotImplementedError
class ResourcePresentationSpec(PresentationSpec):
"""Class that specifies how resource arguments are presented in a command."""
def _ValidateFlagNameOverrides(self, flag_name_overrides):
if not flag_name_overrides:
return
for attribute_name in flag_name_overrides.keys():
for attribute in self.concept_spec.attributes:
if attribute.name == attribute_name:
break
else:
raise ValueError(
'Attempting to override the name for an attribute not present in '
'the concept: [{}]. Available attributes: [{}]'.format(
attribute_name,
', '.join([attribute.name
for attribute in self.concept_spec.attributes])))
def _GetAttributeToArgsMap(self, flag_name_overrides):
self._ValidateFlagNameOverrides(flag_name_overrides)
# Create a rename map for the attributes to their flags.
attribute_to_args_map = {}
for i, attribute in enumerate(self._concept_spec.attributes):
is_anchor = i == len(self._concept_spec.attributes) - 1
name = self.GetFlagName(
attribute.name, self.name, flag_name_overrides, self.prefixes,
is_anchor=is_anchor)
if name:
attribute_to_args_map[attribute.name] = name
return attribute_to_args_map
@staticmethod
def GetFlagName(attribute_name, presentation_name, flag_name_overrides=None,
prefixes=False, is_anchor=False):
"""Gets the flag name for a given attribute name.
Returns a flag name for an attribute, adding prefixes as necessary or using
overrides if an override map is provided.
Args:
attribute_name: str, the name of the attribute to base the flag name on.
presentation_name: str, the anchor argument name of the resource the
attribute belongs to (e.g. '--foo').
flag_name_overrides: {str: str}, a dict of attribute names to exact string
of the flag name to use for the attribute. None if no overrides.
prefixes: bool, whether to use the resource name as a prefix for the flag.
is_anchor: bool, True if this it he anchor flag, False otherwise.
Returns:
(str) the name of the flag.
"""
flag_name_overrides = flag_name_overrides or {}
if attribute_name in flag_name_overrides:
return flag_name_overrides.get(attribute_name)
if attribute_name == 'project':
return ''
if is_anchor:
return presentation_name
prefix = util.PREFIX
if prefixes:
if presentation_name.startswith(util.PREFIX):
prefix += presentation_name[len(util.PREFIX):] + '-'
else:
prefix += presentation_name.lower().replace('_', '-') + '-'
return prefix + attribute_name
def _GenerateInfo(self, fallthroughs_map):
"""Gets the ResourceInfo object for the ConceptParser.
Args:
fallthroughs_map: {str: [googlecloudsdk.calliope.concepts.deps.
_FallthroughBase]}, dict keyed by attribute name to lists of
fallthroughs.
Returns:
info_holders.ResourceInfo, the ResourceInfo object.
"""
return info_holders.ResourceInfo(
self.name,
self.concept_spec,
self.group_help,
self.attribute_to_args_map,
fallthroughs_map,
required=self.required,
plural=self.plural,
group=self.group,
hidden=self.hidden)
def __eq__(self, other):
if not isinstance(other, type(self)):
return False
return (self.name == other.name and
self.concept_spec == other.concept_spec and
self.group_help == other.group_help and
self.prefixes == other.prefixes and self.plural == other.plural and
self.required == other.required and self.group == other.group and
self.hidden == other.hidden)
# Currently no other type of multitype concepts have been implemented.
class MultitypeResourcePresentationSpec(PresentationSpec):
"""A resource-specific presentation spec."""
def _GetAttributeToArgsMap(self, flag_name_overrides):
# Create a rename map for the attributes to their flags.
attribute_to_args_map = {}
leaf_anchors = [a for a in self._concept_spec.attributes
if self._concept_spec.IsLeafAnchor(a)]
for attribute in self._concept_spec.attributes:
is_anchor = [attribute] == leaf_anchors
name = self.GetFlagName(
attribute.name, self.name, flag_name_overrides=flag_name_overrides,
prefixes=self.prefixes, is_anchor=is_anchor)
if name:
attribute_to_args_map[attribute.name] = name
return attribute_to_args_map
@staticmethod
def GetFlagName(attribute_name, presentation_name, flag_name_overrides=None,
prefixes=False, is_anchor=False):
"""Gets the flag name for a given attribute name.
Returns a flag name for an attribute, adding prefixes as necessary or using
overrides if an override map is provided.
Args:
attribute_name: str, the name of the attribute to base the flag name on.
presentation_name: str, the anchor argument name of the resource the
attribute belongs to (e.g. '--foo').
flag_name_overrides: {str: str}, a dict of attribute names to exact string
of the flag name to use for the attribute. None if no overrides.
prefixes: bool, whether to use the resource name as a prefix for the flag.
is_anchor: bool, True if this is the anchor flag, False otherwise.
Returns:
(str) the name of the flag.
"""
flag_name_overrides = flag_name_overrides or {}
if attribute_name in flag_name_overrides:
return flag_name_overrides.get(attribute_name)
if is_anchor:
return presentation_name
if attribute_name == 'project':
return ''
if prefixes:
return util.FlagNameFormat('-'.join([presentation_name, attribute_name]))
return util.FlagNameFormat(attribute_name)
def _GenerateInfo(self, fallthroughs_map):
"""Gets the MultitypeResourceInfo object for the ConceptParser.
Args:
fallthroughs_map: {str: [googlecloudsdk.calliope.concepts.deps.
_FallthroughBase]}, dict keyed by attribute name to lists of
fallthroughs.
Returns:
info_holders.MultitypeResourceInfo, the ResourceInfo object.
"""
return info_holders.MultitypeResourceInfo(
self.name,
self.concept_spec,
self.group_help,
self.attribute_to_args_map,
fallthroughs_map,
required=self.required,
plural=self.plural,
group=self.group)
def __eq__(self, other):
if not isinstance(other, type(self)):
return False
return (self.name == other.name and
self.concept_spec == other.concept_spec and
self.group_help == other.group_help and
self.prefixes == other.prefixes and self.plural == other.plural and
self.required == other.required and self.group == other.group and
self.hidden == other.hidden)
| [
"cloudsdk.mirror@gmail.com"
] | cloudsdk.mirror@gmail.com |
3a444aba68f2b7bfacedbf9111f3cfd16db90fcc | b1513c224b2832f30dd5c34edd58b48dc78b9a12 | /mysite/settings.py | 6c29eb816e1077a6b82c4b17abea67de54a7b41a | [] | no_license | cintyaAguirre/-my-first-blog | 2f296190f55a8e9b2c0ede933c7fb40a7e42a875 | c4da5b89e4cf453fdef5f2a4c40effa924eecc46 | refs/heads/master | 2016-08-11T16:38:28.203414 | 2016-03-27T19:57:11 | 2016-03-27T19:57:11 | 54,832,316 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,709 | py | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '#k1*)xosb6+a7-==q&73!gr1!z5izmn#%h)vs+5j&vp42*l&6d'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
ROOT_URLCONF = 'mysite.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'mysite.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'America/Guayaquil'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
| [
"cintya.aguirre@gmail.com"
] | cintya.aguirre@gmail.com |
f355b0f96a8d88e8aad867f986f3cfa6975d11e8 | e7af5a3e76e674be0a85628067fa494348d45123 | /Python-for-Finance-Second-Edition-master/Chapter01/c1_04_def_pv_funtion.py | 0b20696756b3ed519e37d740043058e85838ece9 | [
"MIT"
] | permissive | SeyedShobeiri/Work | 8321ead6f11de8297fa18d70a450602f700f26fb | f758e758106fbd53236a7fadae42e4ec6a4e8244 | refs/heads/master | 2022-07-25T02:33:25.852521 | 2020-05-17T16:11:27 | 2020-05-17T16:11:27 | 264,706,380 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 330 | py | # -*- coding: utf-8 -*-
"""
Name : c1_04_def_pv_function.py
Book : Python for Finance (2nd ed.)
Publisher: Packt Publishing Ltd.
Author : Yuxing Yan
Date : 6/6/2017
email : yany@canisius.edu
paulyxy@hotmail.com
"""
def pv_f(pv,r,n):
return pv/(1+r)**n
#
pv=pv_f(100,0.1,2)
print(pv) | [
"shobeiri@math.uh.edu"
] | shobeiri@math.uh.edu |
12a359c57fcf20125cb61c25a552e8da0df77680 | c7369f20eca8b13ea20b85b0b5e0aafd27712015 | /booking/migrations/0004_seat_status.py | 870468492329d9a13d174cf836e0c6f007d89ee2 | [] | no_license | prathap79/Box-office | 001f9c860473f828de4bbd5b4be73cab7d24f88e | fcc0c552d7fe3286eb381de6fae81a95b6611c79 | refs/heads/master | 2021-05-06T13:38:29.491457 | 2017-12-06T05:48:25 | 2017-12-06T05:48:25 | 113,270,634 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 585 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2017-12-05 19:51
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('booking', '0003_auto_20160731_1525'),
]
operations = [
migrations.AddField(
model_name='seat',
name='status',
field=models.CharField(choices=[(b'', b'Select'), (b'Processing', b'Processing'), (b'Available', b'Available'), (b'Ocupied', b'Occupied')], default=b'Available', max_length=10),
),
]
| [
"prathap.bolla79@gmail.com"
] | prathap.bolla79@gmail.com |
437200de4b921f13167c274196f5aad47104816c | e7f74d5683701e9552f3d476dc8f57775128f90f | /hackerrank.com/gen_test_find-median.py | 7e0c3edb0bf463cf29726802cdbbd44e294d4574 | [
"MIT"
] | permissive | bolatov/contests | 89463675ea3114115bd921973b54eb64620c19a2 | 39654ec36e1b7ff62052e324428141a9564fd576 | refs/heads/master | 2021-01-24T11:19:53.864281 | 2018-07-12T05:37:09 | 2018-07-12T05:37:09 | 21,923,806 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 454 | py | #!/usr/bin/python env
import random
import sys
def generate():
f = open('input.txt', 'w')
T = 15
f.write(str(T) + '\n')
N = 100
for i in range(T):
f.write(str(N) + '\n')
arr = []
for i in range(N):
arr.append(i+1)
random.shuffle(arr)
for i in arr:
f.write(str(i) + ' ')
f.write('\n')
f.close()
if __name__ == '__main__':
generate() | [
"almer.bolatov@gmail.com"
] | almer.bolatov@gmail.com |
ee4bca48e9340566c78aa996b5f2678b67677f37 | 277b0fc22d25a354947d115575f056cd136730fa | /test.py | 4c7ca0567952aee96702b81113255f28075691f7 | [] | no_license | ClosedClock/ConnectAndPlay | 2a938923fa811e996c7f8103c1f29f7528c44a7a | b59cf693bd2b3d6d85e084eef9a0eea801278976 | refs/heads/master | 2020-05-23T10:07:29.497126 | 2017-02-10T01:04:45 | 2017-02-10T01:04:45 | 80,388,780 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,744 | py | from tkinter import *
import threading
import time
class Board(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.pack()
self.length = 10
self.createWidgets()
def createWidgets(self):
# self.title = Label(self, text='This is a board')
# self.title.pack()
self.buttons = [[None for x in range(self.length)] for x in range(self.length)]
for i in range(self.length):
for j in range(self.length):
self.buttons[i][j] = Button(self, command=self.botton_func)
self.buttons[i][j].config(height=10, width=5)
self.buttons[i][j].grid(row=i, column=j)
def botton_func(self):
# subThread = threading.Thread(target=self.counting)
# subThread.start()
app = Subboard()
print('created')
# 设置窗口标题:
# app.master.title('subboard')
# 主消息循环:
app.mainloop()
def counting(self):
count = 0
while count < 20:
print(count)
count += 1
time.sleep(2)
class Subboard(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.pack()
self.createWidgets()
def createWidgets(self):
self.helloLabel = Label(self, text='Hello, world!')
self.helloLabel.pack()
self.quitButton = Button(self, text='Quit', command=self.quit)
self.quitButton.pack()
def thread_stuff():
app = Board()
# 设置窗口标题:
app.master.title('board')
# 主消息循环:
app.mainloop()
# subThread = threading.Thread(target=thread_stuff)
# subThread.start()
# subThread.join()
thread_stuff() | [
"zijinshi@mit.edu"
] | zijinshi@mit.edu |
c8391dbc66e5962bee913e4c482dcab576ba7ad1 | 7e99213c19a0daf78874f169b0008f3a8ceaf5e1 | /CarTopic/DeepMemoryNetwork_new/main.py | 117aa2eab5942bf81320296b4acf11520aebb6f9 | [
"MIT"
] | permissive | abcdddxy/kaggle | 2856a92204a9a9bdd495f08ee0034daabdfbd12d | 9e072881343ee9d0e1ec48a74c9b1ae5aa348901 | refs/heads/master | 2021-01-01T17:44:06.349801 | 2018-12-06T02:34:46 | 2018-12-06T02:34:46 | 98,139,385 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,026 | py | import pprint
import tensorflow as tf
from data import *
from model import MemN2N
pp = pprint.PrettyPrinter()
flags = tf.app.flags
flags.DEFINE_integer("edim", 300, "internal state dimension [300]")
flags.DEFINE_integer("lindim", 100, "linear part of the state [75]")
flags.DEFINE_integer("nhop", 3, "number of hops [7]")
flags.DEFINE_integer("batch_size", 1, "batch size to use during training [1]")
flags.DEFINE_integer("nepoch", 20, "number of epoch to use during training [100]")
flags.DEFINE_float("init_lr", 0.01, "initial learning rate [0.01]")
flags.DEFINE_float("init_hid", 0.1, "initial internal state value [0.1]")
flags.DEFINE_float("init_std", 0.01, "weight initialization std [0.05]")
flags.DEFINE_float("max_grad_norm", 100, "clip gradients to this norm [100]")
flags.DEFINE_string("pretrain_embeddings", "glove-common_crawl_840",
"pre-trained word embeddings [glove-wikipedia_gigaword, glove-common_crawl_48, glove-common_crawl_840]")
flags.DEFINE_string("train_data", "data/Restaurants_Train_v2.xml.seg", "train gold data set path [./data/Laptops_Train.xml.seg]")
flags.DEFINE_string("test_data", "data/Restaurants_Test_Gold.xml.seg", "test gold data set path [./data/Laptops_Test_Gold.xml.seg]")
flags.DEFINE_boolean("show", False, "print progress [False]")
FLAGS = flags.FLAGS
def get_idx2word(word2idx):
idx2word = {}
for word, idx in word2idx.items():
idx2word[idx] = word
return idx2word
def main(_):
source_word2idx, target_word2idx, word_set = {}, {}, {}
max_sent_len = -1
max_sent_len = get_dataset_resources(FLAGS.train_data, source_word2idx, target_word2idx, word_set, max_sent_len)
max_sent_len = get_dataset_resources(FLAGS.test_data, source_word2idx, target_word2idx, word_set, max_sent_len)
# embeddings = load_embedding_file(FLAGS.pretrain_embeddings, word_set)
embeddings = init_word_embeddings(FLAGS.pretrain_embeddings, word_set, FLAGS.edim)
train_data = get_dataset(FLAGS.train_data, source_word2idx, target_word2idx, embeddings)
test_data = get_dataset(FLAGS.test_data, source_word2idx, target_word2idx, embeddings)
print("train data size - ", len(train_data[0]))
print("test data size - ", len(test_data[0]))
print("max sentence length - ", max_sent_len)
FLAGS.pad_idx = source_word2idx['<pad>']
FLAGS.nwords = len(source_word2idx)
FLAGS.mem_size = max_sent_len
pp.pprint(flags.FLAGS.__flags)
print('loading pre-trained word vectors...')
print('loading pre-trained word vectors for train and test data')
FLAGS.pre_trained_context_wt, FLAGS.pre_trained_target_wt = get_embedding_matrix(embeddings, source_word2idx, target_word2idx, FLAGS.edim)
source_idx2word, target_idx2word = get_idx2word(source_word2idx), get_idx2word(target_word2idx)
with tf.Session() as sess:
model = MemN2N(FLAGS, sess, source_idx2word, target_idx2word)
model.build_model()
model.run(train_data, test_data)
if __name__ == '__main__':
tf.app.run()
| [
"kfc00m@126.com"
] | kfc00m@126.com |
174c7c665535c0a622cc4e1810871e132738fced | dba4803d19434c08e6c636daad16920ea0196d14 | /Project 1 - Scrapping Webpages/StarCityGames/scrapy_splash/scrapy_javascript/scrapy_javascript/spiders/SplashSpider.py | 46440ecc478dcc2f45a7bed5b1e2e3bb8889177e | [] | no_license | tnorth2260/North_Repo1 | d7b243c9a688ce66cf96a6ef9317c3181f22f50c | 15148d09c976676897d7f9fe2ef34a5f7438b0a3 | refs/heads/master | 2020-12-29T11:45:39.417900 | 2020-02-06T03:06:22 | 2020-02-06T03:06:22 | 238,596,889 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,361 | py | # Import from other python files and scrapy files and the needed csv file containing all URLs/proxies/ua
import csv
import scrapy
from scrapy.spiders import Spider
from scrapy_splash import SplashRequest
from ..items import DataItem
########################## SPALSHSPIDER.PY OVERVIEW #####################################################
# process the csv file so the url + ip address + useragent pairs are the same as defined in the file
# returns a list of dictionaries, example:
# [ {'url': 'http://www.starcitygames.com/catalog/category/Rivals%20of%20Ixalan',
# 'ip': 'http://204.152.114.244:8050',
# 'ua': "Mozilla/5.0 (BlackBerry; U; BlackBerry 9320; en-GB) AppleWebKit/534.11"},
# ...
# ]
# plus python file also scrapes all URLs returning needed info and goes to all apges associated with URL by clicking next button
# Function to read csv file that contains URLs that are paried with proxies and user agents
def process_csv(csv_file):
# Initialize data
data = []
# Initialize reader
reader = csv.reader(csv_file)
next(reader)
# While inside csv file and not at end of csv file
for fields in reader:
# Set URL
if fields[0] != "":
url = fields[0]
else:
continue # skip the whole row if the url column is empty
#Set proxy and pair with correct URL
if fields[1] != "":
ip = "http://" + fields[1] + ":8050" # adding http and port because this is the needed scheme
# Set user agent and pair with correct URL
if fields[2] != "":
useragent = fields[2]
# Put all three together
data.append({"url": url, "ip": ip, "ua": useragent})
# Return URL paried with ua and proxy
return data
# Spider class
class MySpider(Spider):
# Name of Spider
name = 'splash_spider'
# getting all the url + ip address + useragent pairs then request them
def start_requests(self):
# get the file path of the csv file that contains the pairs from the settings.py
with open(self.settings["PROXY_CSV_FILE"], mode="r") as csv_file:
# requests is a list of dictionaries like this -> {url: str, ua: str, ip: str}
requests = process_csv(csv_file)
for i, req in enumerate(requests):
x = len(requests) - i
# Return needed url with set delay of 3 seconds
yield SplashRequest(url=req["url"], callback=self.parse, args={"wait": 3},
# Pair with user agent specified in csv file
headers={"User-Agent": req["ua"]},
# Sets splash_url to whatever the current proxy that goes with current URL is instead of actual splash url
splash_url = req["ip"],
priority = x,
meta={'priority': x} # <- check here!!
)
# Scraping function that will scrape URLs for specified information
def parse(self, response):
# Initialize item to function GameItem located in items.py, will be called multiple times
item = DataItem()
# Initialize saved_name
saved_name = ""
# Extract card category from URL using html code from website that identifies the category. Will be outputted before rest of data
item["Category"] = response.css("span.titletext::text").get()
# For loop to loop through HTML code until all necessary data has been scraped
for data in response.css("tr[class^=deckdbbody]"):
# Initialize saved_name to the extracted card name
saved_name = data.css("a.card_popup::text").get() or saved_name
# Now call item and set equal to saved_name and strip leading '\n' from output
item["Card_Name"] = saved_name.strip()
# Check to see if output is null, in the case that there are two different conditions for one card
if item["Card_Name"] != None:
# If not null than store value in saved_name
saved_name = item["Card_Name"].strip()
# If null then set null value to previous card name since if there is a null value you should have the same card name twice
else:
item["Card_Name"] = saved_name
# Call item again in order to extract the condition, stock, and price using the corresponding html code from the website
item["Condition"] = data.css("td[class^=deckdbbody].search_results_7 a::text").get()
item["Stock"] = data.css("td[class^=deckdbbody].search_results_8::text").get()
item["Price"] = data.css("td[class^=deckdbbody].search_results_9::text").get()
if item["Price"] == None:
item["Price"] = data.css("td[class^=deckdbbody].search_results_9 span[style*='color:red']::text").get()
# Return values
yield item
# Finds next page button
priority = response.meta['priority']
next_page = response.xpath('//a[contains(., "- Next>>")]/@href').get()
# If it exists and there is a next page enter if statement
if next_page is not None:
# Go to next page
yield response.follow(next_page, self.parse, priority=priority, meta={'priority': priority})
| [
"thomas.north@uky.edu"
] | thomas.north@uky.edu |
36f4d22a2cdb38f4c2095110fdafde955ca537dd | db2ec9bb0df2f721edcbdf3199642838ef575cfa | /object-detection/FlickrSportLogos-10.py | 9ddcfbf86b5ff957516f12ab8c03f265d24c54be | [] | no_license | racheltang2333/Graviti | d15c73201bae771264cf463c6df1515f877bc743 | 8fa13d81503ef2bb81a2158de56b54f12c7d9da4 | refs/heads/main | 2023-08-14T10:17:23.356714 | 2021-09-11T14:59:28 | 2021-09-11T14:59:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,086 | py | from common.dataset_initial import initial
from tensorbay.label import LabeledBox2D, Classification
from tensorbay.dataset import Data
from common.label_acquire import acquire_label_xml
import os
from tensorbay.client import config
from common.file_read import read_csv_file
config.timeout = 40
config.max_retries = 4
root_path = "E:\\ShannonT\\dL-datasets\\FlickrSportLogos-10-master\\dataset"
dataset_name = "FlickrSportLogos-10"
files = os.listdir(os.path.join(root_path, "JPEGImages"))
classes = []
for img in files:
if img.split("_")[0] not in classes:
classes.append(img.split("_")[0])
initial = initial(root_path, dataset_name, ["CLASSIFICATION", "BOX2D"], classes)
gas, dataset = initial.generate_catalog()
for i in ["train.txt", "test.txt"]:
segment = dataset.create_segment(i.split(".")[0])
imgs = []
imgs_path = os.path.join(root_path, i)
with open(imgs_path, "r") as f:
for line in f.readlines():
l = " ".join(line.split("\t"))
imgs.append(l.strip("\n"))
for img in imgs:
path = os.path.join(os.path.join(root_path, "JPEGImages"), img + ".jpg")
label_path = os.path.join(os.path.join(root_path, "Annotations"), img + ".xml")
img_label = acquire_label_xml(label_path)
data = Data(path)
cate=img.split("_")[0]
data.label.classification = Classification(cate)
if len(img_label) != 0:
data.label.box2d = []
for i in range(len(img_label)):
xmin = img_label[i][0]
ymin = img_label[i][1]
xmax = img_label[i][2]
ymax = img_label[i][3]
data.label.box2d.append(LabeledBox2D(xmin, ymin, xmax, ymax,
category=img_label[i][4],
# attributes={"occluded": box["occluded"]}))
))
segment.append(data)
dataset_client = gas.upload_dataset(dataset, jobs=12)
dataset_client.commit("Initial commit")
| [
"wanshantian@gmail.com"
] | wanshantian@gmail.com |
a92502db8aaacc47a2fe8b3c4a6d85f43c367705 | e59c8252f44aa286f4ab115eb26ee9223c600d36 | /movieapirestcrud/wsgi.py | 66a8aefca0bdc513026118aefb305dc72a6bc74f | [] | no_license | daff-250900/movieapi-python-postgresql | a0a6353c50abde3773f84918fa06cd504804d0e7 | 05f9308df2fb8f17add1fba64ee1824f145c0ade | refs/heads/master | 2023-04-09T08:59:20.444858 | 2021-04-18T17:40:47 | 2021-04-18T17:40:47 | 359,163,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | """
WSGI config for movieapirestcrud project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'movieapirestcrud.settings')
application = get_wsgi_application()
| [
"316081287@pcpuma.acatlan.unam.mx"
] | 316081287@pcpuma.acatlan.unam.mx |
5da96b525cffe304dd7d44c7c14a4cdbaa73eb9e | 645cdf596693707d41efad7ba9bfcfbc607a559b | /tests/v_0_1_0/test_yaml_parser.py | 0555ac6556c1073d4d937338ddb0b6a6e1931b09 | [
"Apache-2.0"
] | permissive | lengmoXXL/page_query | 5ce3cad38bb230f2571a0d9318a9f5304d86817b | 90677861aa4d55251d12f5f09b5e91e25acff9c1 | refs/heads/main | 2023-08-01T05:22:45.642075 | 2021-09-12T01:12:03 | 2021-09-12T02:09:50 | 398,512,889 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 617 | py | import yaml
def test_yaml_safe_load_example():
text = '\n'.join([
'elasticsearch_url: "http://localhost:9200"',
'rules:',
' - type: manual_http_urls',
' title: www_baidu_com',
' tags: []',
' summary: the baidu website',
' http_urls: ["https://www.baidu.com"]',
])
config = yaml.safe_load(text)
assert config['elasticsearch_url'] == 'http://localhost:9200'
assert len(config['rules']) == 1
assert config['rules'][0]['type'] == 'manual_http_urls'
assert config['rules'][0]['http_urls'] == ["https://www.baidu.com"]
| [
"1075749478@qq.com"
] | 1075749478@qq.com |
368342c28973f927c10a45c03124bdec3a92c45a | ba76d0ba1dfca22bc7f28d00d58e0afd589341b1 | /synergy/system/mq_transmitter.py | 58516581c25cd8bf7afef3a7fe6042a640d307b8 | [
"BSD-3-Clause"
] | permissive | mushkevych/scheduler | 0eb27401e66e144891e8308404fc421e16764c18 | 8228cde0f027c0025852cb63a6698cdd320838f1 | refs/heads/master | 2021-07-13T23:27:48.371909 | 2020-06-13T18:10:52 | 2020-06-13T18:10:52 | 2,901,075 | 15 | 2 | BSD-3-Clause | 2021-07-10T18:07:47 | 2011-12-02T19:55:13 | JavaScript | UTF-8 | Python | false | false | 2,217 | py | __author__ = 'Bohdan Mushkevych'
from threading import Lock
from synergy.scheduler.scheduler_constants import QUEUE_UOW_STATUS, QUEUE_JOB_STATUS
from synergy.db.model.mq_transmission import MqTransmission
from synergy.mq.flopsy import PublishersPool
from synergy.system.decorator import thread_safe
class MqTransmitter(object):
""" a class hosting several Message Queue helper methods to send MqTransmission """
def __init__(self, logger):
self.logger = logger
self.lock = Lock()
self.publishers = PublishersPool(self.logger)
def __del__(self):
try:
self.logger.info('Closing Flopsy Publishers Pool...')
self.publishers.close()
except Exception as e:
self.logger.error(f'Exception caught while closing Flopsy Publishers Pool: {e}')
@thread_safe
def publish_managed_uow(self, uow):
mq_request = MqTransmission(process_name=uow.process_name, record_db_id=uow.db_id)
publisher = self.publishers.get(uow.process_name)
publisher.publish(mq_request.document)
publisher.release()
@thread_safe
def publish_freerun_uow(self, freerun_entry, uow):
mq_request = MqTransmission(process_name=freerun_entry.process_name,
entry_name=freerun_entry.entry_name,
record_db_id=uow.db_id)
publisher = self.publishers.get(freerun_entry.process_name)
publisher.publish(mq_request.document)
publisher.release()
@thread_safe
def publish_job_status(self, job_record, finished_only=True):
if finished_only and not job_record.is_finished:
return
mq_request = MqTransmission(process_name=job_record.process_name, record_db_id=job_record.db_id)
publisher = self.publishers.get(QUEUE_JOB_STATUS)
publisher.publish(mq_request.document)
publisher.release()
@thread_safe
def publish_uow_status(self, uow):
mq_request = MqTransmission(process_name=uow.process_name, record_db_id=uow.db_id)
publisher = self.publishers.get(QUEUE_UOW_STATUS)
publisher.publish(mq_request.document)
publisher.release()
| [
"mushkevych@gmail.com"
] | mushkevych@gmail.com |
23a27a2fe5665f7d1fa6b3381fe99b21991a6ead | badfee888ee1f3a72359caadb61db1d551bda7c3 | /knowledgeseeker/database.py | 18671c49bbd29bd957d9514a54b6b91284845178 | [
"Apache-2.0"
] | permissive | canwe/knowledge-seeker | 1f785231a4267ebd2b921ee3c8447f98b9325215 | 4bd8ec62e2bd3c52c7c158f2da0b490f1219bb88 | refs/heads/master | 2020-06-22T22:03:16.878344 | 2018-11-08T18:54:21 | 2018-11-08T18:54:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,923 | py | import sqlite3
from concurrent.futures import as_completed, ThreadPoolExecutor
from datetime import datetime
from functools import wraps
from pathlib import Path
import cv2
import numpy
from flask import abort, current_app, g
from knowledgeseeker.utils import strip_html
FILENAME = 'data.db'
POPULATE_WORKERS = 4
def get_db():
db = getattr(g, '_database', None)
if db is None:
path = Path(current_app.instance_path)/FILENAME
c = sqlite3.connect(str(path))
c.row_factory = sqlite3.Row
db = g._database = c
return db
def close_connection(exception):
db = getattr(g, '_database', None)
if db is not None:
db.close()
def remove():
path = Path(current_app.instance_path)/FILENAME
if path.exists():
path.unlink()
def match_season(f):
@wraps(f)
def decorator(season, **kwargs):
cur = get_db().cursor()
cur.execute('SELECT id FROM season WHERE slug=:season_slug',
{ 'season_slug': season })
res = cur.fetchone()
if res is None:
abort(404, 'season not found')
return f(season_id=res['id'], **kwargs)
return decorator
def match_episode(f):
@wraps(f)
def decorator(season, episode, **kwargs):
cur = get_db().cursor()
cur.execute('PRAGMA full_column_names = ON')
cur.execute(
'SELECT episode.id, season.id FROM '
' season '
' INNER JOIN episode ON episode.season_id = season.id '
' WHERE season.slug=:season_slug AND episode.slug=:episode_slug',
{ 'season_slug': season, 'episode_slug': episode })
res = cur.fetchone()
cur.execute('PRAGMA full_column_names = OFF')
if res is None:
abort(404, 'episode not found')
return f(season_id=res['season.id'], episode_id=res['episode.id'], **kwargs)
return decorator
def populate(library_data):
# check_same_thread needed to allow threads to access tables not created
# by themselves (I like to live dangerously).
db = sqlite3.connect(str(Path(current_app.instance_path)/FILENAME),
check_same_thread=False)
db.row_factory = sqlite3.Row
cur = db.cursor()
season_key = episode_key = 0
episodes = {}
for season in library_data:
cur.execute(
'INSERT INTO season (id, slug, icon_png, name) '
' VALUES (:id, :slug, :icon_png, :name)',
{ 'id': season_key,
'slug': season.slug,
'icon_png': season.icon,
'name': season.name })
for episode in season.episodes:
cur.execute(
'INSERT INTO episode (id, slug, name, duration, '
' video_path, subtitles_path, season_id) '
' VALUES (:id, :slug, :name, :duration, '
' :video_path, :subtitles_path, :season_id)',
{ 'id': episode_key,
'slug': episode.slug,
'name': episode.name,
'duration': 0,
'video_path': str(episode.video_path),
'subtitles_path': str(episode.subtitles_path),
'season_id': season_key })
episodes[episode_key] = episode
episode_key += 1
season_key += 1
db.commit()
config = { 'full_vres': current_app.config['JPEG_VRES'],
'tiny_vres': current_app.config['JPEG_TINY_VRES'] }
def fill(key):
cursor = db.cursor()
episode = episodes[key]
saved, frames = populate_episode(episode, key, cursor, **config)
populate_subtitles(episode, key, cursor)
return ('%s - %d/%d frames (%.1f%%) saved'
% (episode.name, saved, frames, saved/frames*100.0))
with ThreadPoolExecutor(max_workers=POPULATE_WORKERS) as executor:
for res in executor.map(fill, episodes.keys()):
print(' * %s' % res)
db.commit()
def populate_episode(episode, key, cur, full_vres=720, tiny_vres=100):
# Locate and save significant frames.
vidcap = cv2.VideoCapture(str(episode.video_path))
frames = saved = ms = 0
classifier = FrameClassifier()
success, image = vidcap.read()
while success:
ms = round(vidcap.get(cv2.CAP_PROP_POS_MSEC))
if classifier.classify(image, ms):
saved += 1
big_scale = full_vres/image.shape[0]
big_image = cv2.resize(
image,
(round(image.shape[1]*big_scale), round(image.shape[0]*big_scale)),
interpolation=cv2.INTER_AREA)
big_png = cv2.imencode('.png', big_image)[1].tostring()
cur.execute(
'INSERT INTO snapshot (episode_id, ms, png) '
' VALUES (:episode_id, :ms, :png)',
{ 'episode_id': key, 'ms': ms, 'png': sqlite3.Binary(big_png) })
tiny_scale = tiny_vres/image.shape[0]
tiny_image = cv2.resize(
image,
(round(image.shape[1]*tiny_scale), round(image.shape[0]*tiny_scale)),
interpolation=cv2.INTER_AREA)
tiny_jpg = cv2.imencode('.jpg', tiny_image)[1].tostring()
cur.execute(
'INSERT INTO snapshot_tiny (episode_id, ms, jpeg) '
' VALUES (:episode_id, :ms, :jpeg)',
{ 'episode_id': key, 'ms': ms, 'jpeg': sqlite3.Binary(tiny_jpg) })
frames += 1
success, image = vidcap.read()
# Set the episode's duration.
cur.execute('UPDATE episode SET duration=:ms WHERE id=:id',
{ 'id': key, 'ms': ms })
# Set the episode's preview frame.
cur.execute(
' SELECT ms FROM snapshot '
' WHERE episode_id=:episode_id '
'ORDER BY ABS(ms-:target) ASC LIMIT 1',
{ 'episode_id': key, 'target': round(ms/2) })
res = cur.fetchone()
if res is not None:
cur.execute(
'UPDATE episode SET snapshot_ms=:snapshot_ms WHERE id=:id',
{ 'id': key, 'snapshot_ms': res['ms'] })
return saved, frames
class FrameClassifier(object):
TRANS_THRESHOLD = 90.0
TARGET_FPS = 5.0
def __init__(self):
self._last = self._saved = None
def classify(self, image, ms):
# - Save all hard transitions (color difference > TRANS_THRESHOLD).
# - Save at least 3 images per second, but only if there isn't a long
# period of duplicate frames.
if self._last is None:
self._last = (image, ms)
save = True
else:
last_image, last_ms = self._last
saved_image, saved_ms = self._saved
last_color = numpy.average(last_image, axis=(0, 1))
this_color = numpy.average(image, axis=(0, 1))
color_diff = numpy.sum(abs(last_color - this_color))
if color_diff > FrameClassifier.TRANS_THRESHOLD:
#cv2.imwrite('classify_last.png', last_image)
#cv2.imwrite('classify_next.png', image)
#input('transition detected at %d' % ms)
save = True
elif (ms - saved_ms >= 1000/FrameClassifier.TARGET_FPS
and color_diff > 0.1):
save = True
else:
save = False
self._last = (image, ms)
if save:
self._saved = (image, ms)
return save
def populate_subtitles(episode, key, cur):
for sub in episode.subtitles:
start_ms = sub.start.total_seconds()*1000
end_ms = sub.end.total_seconds()*1000
cur.execute(
'SELECT ms FROM snapshot '
' WHERE episode_id=:episode_id '
' AND ms>=:start_ms AND ms<=:end_ms '
'ORDER BY ms',
{ 'episode_id': key, 'start_ms': start_ms, 'end_ms': end_ms })
snapshot_ms = next(map(lambda row: row['ms'], cur.fetchall()), None)
cur.execute(
'INSERT INTO subtitle (episode_id, idx, content, '
' start_ms, end_ms, snapshot_ms) '
' VALUES (:episode_id, :idx, :content, '
' :start_ms, :end_ms, :snapshot_ms)',
{ 'episode_id': key, 'content': sub.content, 'idx': sub.index,
'start_ms': start_ms, 'end_ms': end_ms, 'snapshot_ms': snapshot_ms })
if snapshot_ms is not None:
cur.execute(
'INSERT INTO subtitle_search (episode_id, snapshot_ms, content) '
' VALUES (:episode_id, :snapshot_ms, :content)',
{ 'episode_id': key, 'snapshot_ms': snapshot_ms,
'content': strip_html(sub.content) })
def init_app(app):
@app.teardown_appcontext
def close_db(*args, **kwargs):
return close_connection(*args, **kwargs)
| [
"ryan.ry.young@gmail.com"
] | ryan.ry.young@gmail.com |
6df8b629cf7171b384d1aa3d871f1ecb5b7f86cc | 38c078e7687aed64d37474abb66b34fb445fef76 | /state.py | df2f77672fe29c96e4a1f3fca8e5f0e00ca408f4 | [
"MIT"
] | permissive | DhruvPatel01/NotAeroCalc | 8c35afd34070043cc461d244e723215edf919800 | d4db34c88eaf55e198c9205eb2868bb6c2aca701 | refs/heads/main | 2023-04-15T01:22:30.859624 | 2021-05-04T13:39:31 | 2021-05-04T13:39:31 | 354,318,949 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 299 | py | """
This module will be used to store
variables and state of the running
session.
DO NOT ADD DEFAULTS HERE.
"""
from collections import defaultdict
variables = {}
expressions = set()
var2eqns = defaultdict(set)
def reset():
variables.clear()
expressions.clear()
var2eqns.clear()
| [
"dhruv.nanosoft@gmail.com"
] | dhruv.nanosoft@gmail.com |
5d051850e1e6e7d4dbff50c6b3db6dd1eec6e1ee | b2586edc6374d2bebc619b887c505f0f653ce5b6 | /core/table.py | 2ea44cd0c1907c05dc88ed308e84d4e8ca6e055e | [] | no_license | BYC30/tpdb | b355e6d600f517599b8cfd70035340c04f8e8f91 | 3ba2880ebc0a346ce299977afe4c7dc83dc72432 | refs/heads/master | 2020-05-09T17:41:00.579819 | 2019-05-03T12:36:45 | 2019-05-03T12:36:45 | 181,319,577 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,147 | py | from tpdb.core import SerializedInterface
from tpdb.core.field import Field
# 数据表对象
class Table(SerializedInterface):
def __init__(self, **options):
self.__field_names = [] # 数据表所有字段名
self.__field_objs = {} # 数据表字段名与字段对象映射
self.__rows = 0 # 数据条目数
# 获取所有字段名和字段对象为数据表初始化字段
for field_name, field_obj in options.items():
# 进行字段添加
self.add_field(field_name, field_obj)
# 添加新字段
def add_field(self, field_name, field_obj, value=None):
# 如果新添加的字段名已存在,抛出字段已存在异常
if field_name in self.__field_names:
raise Exception('Field Exists')
# 如果 field_obj 不为 Field 对象,抛出类型错误异常
if not isinstance(field_obj, Field):
raise TypeError('type error, value must be %s' % Field)
# 添加字段名
self.__field_names.append(field_name)
# 绑定字段名与字段
self.__field_objs[field_name] = field_obj
# 如果已存在其它字段,同步该新增字段的数据长度与原先字段数据长度等长,反之初始化数据长度为第一个字段的数据长度
if len(self.__field_names) > 1:
# 获取已存在字段的长度
length = self.__rows
# 获取该新增字段的长度
field_obj_length = field_obj.length()
# 如果该新增字段自身包含数据,则判断长度是否与已存在字段的长度相等
if field_obj_length != 0:
# 相等,退出函数
if field_obj_length == length:
return
# 不相等,抛出数据长度异常
raise Exception('Field data length inconformity')
# 循环初始化新增字段数据,直到新增字段的数据长度与已存在字段的数据长度相等
for index in range(0, length):
# 如果指定了初始值,则使用初始值
if value:
self.__get_field(field_name).add(value)
# 反之,用空值
else:
self.__get_field(field_name).add(None)
else:
# 初始化表格所有数据长度为第一个字段的数据长度
self.__rows = field_obj.length()
# 查询数据
def search(self, fields, sort, format_type, **conditions):
# 如果要查询的字段是“*”,那就代表返回所有字段对应的数据
if fields == '*':
fields = self.__field_names
else:
# 判断要查询的字段是否存在,如果不存在则抛出异常
for field in fields:
if field not in self.__field_names:
raise Exception('%s field not exists' % field)
# 初始化查询结果变量为一个空的 list
rows = []
# 解析条件,并返回符合条件的数据索引
match_index = self.__parse_conditions(**conditions)
# 遍历符合条件的数据索引,根据指定的返回格式返回数据
for index in match_index:
# 返回 list 类型的数据,也就是没有字段名
if format_type == 'list':
row = [self.__get_field_data(field_name, index) for field_name in fields]
# 返回 dict 类型的数据,也就是字段和值成健值对
elif format_type == 'dict':
row = {}
for field_name in fields:
row[field_name] = self.__get_field_data(field_name, index)
# 如果找不到类型,抛出格式错误异常
else:
raise Exception('format type invalid')
rows.append(row)
# 如排序方式为倒序,则倒序结果
if sort == 'DESC':
rows = rows[::-1]
# 返回查询结果
return rows
# 获取 Field 对象
def __get_field(self, field_name):
if field_name not in self.__field_names:
raise Exception('%s field not exists' % field_name)
return self.__field_objs[field_name]
# 获取字段中的数据
def __get_field_data(self, field_name, index=None):
# 获取 Field 对象
field = self.__get_field(field_name)
# 调用 Field 对象的 get_data 方法并返回其获取到的结果
return field.get_data(index)
# 解析条件
def __parse_conditions(self, **conditions):
# 如果条件为空,数据索引为所有,反之为匹配条件的索引
match_index = range(0, self.__rows)
return match_index
# 删除数据
def delete(self, **conditions):
# 解析条件,并返回符合条件的数据索引
match_index = self.__parse_conditions(**conditions)
# 遍历所有 Field 对象
for field_name in self.__field_names:
count = 0 # 当前 Field 对象执行的删除次数
match_index.sort() # 排序匹配的索引
tmp_index = match_index[0] # 当前 Field 对象所删除的第一个索引值
# 遍历所有匹配的索引
for index in match_index:
# 如果当前索引大于第一个删除的索引值,则 index 减掉 count
if index > tmp_index:
index = index - count
# 删除对应位置的数据
self.__get_field(field_name).delete(index)
# 每删除一次,次数加一
count += 1
# 重新获取数据长度
self.__rows = self.__get_field_length(self.__field_names[0])
# 获取 Field 对象长度
def __get_field_length(self, field_name):
# 获取 Field 对象
field = self.__get_field(field_name)
# 调用 Field 对象的 get_length 方法并返回其获取到的结果
return field.length()
# 获取 Field 对象长度
def __get_field_length(self, field_name):
# 获取 Field 对象
field = self.__get_field(field_name)
# 调用 Field 对象的 get_length 方法并返回其获取到的结果
return field.length()
# 插入数据
def insert(self, **data):
# 解析参数
if 'data' in data:
data = data['data']
# 获取需要初始化的对象的名字
name_tmp = self.__get_name_tmp(**data)
# 遍历插入数据字段
for field_name in self.__field_names:
value = None
# 如果存在该字段,则添加对应的值
if field_name in name_tmp:
value = data[field_name]
# 如果不存在,则添加一个空值保持该字段长度与其它字段长度相等
try:
self.__get_field(field_name).add(value)
except Exception as e:
# 如果不存在这个字段,抛出异常
raise Exception(field_name, str(e))
# 数据长度加一
self.__rows += 1
# 更新数据
def update(self, data, **conditions):
# 解析条件,并返回符合条件的数据索引
match_index = self.__parse_conditions(**conditions)
name_tmp = self.__get_name_tmp(**data)
for field_name in name_tmp:
for index in match_index:
self.__get_field(field_name).modify(index, data[field_name])
# 解析参数中包含的字段名
def __get_name_tmp(self, **options):
# 初始化参数名存放 list
name_tmp = []
params = options
for field_name in params.keys():
# 如果参数名字不在字段名字列表中,抛出字段不存在异常
if field_name not in self.__field_names:
raise Exception('%s Field Not Exists' % field_name)
# 如果存在,追加到 name_tmp 这个 list 中
name_tmp.append(field_name)
# 返回所有参数名
return name_tmp
# 序列化对象
def serialized(self):
data = {}
for field in self.__field_names:
data[field] = self.__field_objs[field].serialized()
return SerializedInterface.json.dumps(data)
# 反序列化对象
@staticmethod
def deserialized(data):
# 将数据转化为 Json 对象
json_data = SerializedInterface.json.loads(data)
# 实例化一个 Table 对象
table_obj = Table()
# 获取所有字段名
field_names = [field_name for field_name in json_data.keys()]
# 遍历所有字段对象
for field_name in field_names:
# 反序列化 Field 对象
field_obj = Field.deserialized(json_data[field_name])
# 将 Field 对象添加到 Table 对象中
table_obj.add_field(field_name, field_obj)
# 返回 Table 对象
return table_obj | [
"627080587@qq.com"
] | 627080587@qq.com |
e44fd4581b9a9336c53182b6c33809bf00bfe9fc | 15ec1abf1e5c25e4789acede74733d089ba4bdba | /测试代码/survey.py | cb9b68a504443147ddc60716ed00b4ded2d71e7d | [] | no_license | zxy-zhang/python | eab8a2e7c9cb896441d5be2ec8bab93187cd18a2 | 355f2d88999c6f98072b72ef264c12b94778b78a | refs/heads/master | 2020-03-26T01:49:41.361521 | 2018-08-11T13:04:29 | 2018-08-11T13:04:29 | 144,384,448 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | class AnonymousSurvey():
'''收集匿名调查问卷的答案案'''
def __init__(self,question):
'''存储一个问题,并为存储答案做准备'''
self.question=question
self.responses=[]
def show_question(self):
'''显示调查问卷'''
print(self.question)
def store_response(self,new_response):
'''存储单份调查问卷'''
self.responses.append(new_response)
def show_results(self):
'''显示收集到的所有答卷'''
print("Survey Result: ")
for response in self.responses:
print('_'+response) | [
"937919473@qq.com"
] | 937919473@qq.com |
a84c8d31de4dc825e18cbe3145a69c31faa63f3c | 6d6bebce1a3d819c28cf583f3c46c8235ffccfd2 | /WildlifeObservations/observations/migrations/0008_taxonomysubfamily.py | 91c79afbcb1c9ad4a2816de568ceb34033315e61 | [
"MIT"
] | permissive | jen-thomas/wildlife-observations | 7a20366164d467d73c44e8c844cc99fe26716152 | e6a6b6594e60fe080f253481720d80a38a9f7411 | refs/heads/main | 2023-05-25T17:20:15.506403 | 2023-05-16T13:03:05 | 2023-05-16T13:03:05 | 450,234,890 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 824 | py | # Generated by Django 3.2.11 on 2022-05-05 08:14
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('observations', '0007_alter_identification_confidence'),
]
operations = [
migrations.CreateModel(
name='TaxonomySubfamily',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('subfamily', models.CharField(max_length=255, unique=True)),
('family', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='observations.taxonomyfamily')),
],
options={
'verbose_name_plural': 'Taxonomy subfamilies',
},
),
]
| [
"jenny_t152@yahoo.co.uk"
] | jenny_t152@yahoo.co.uk |
9c5b678768b2717dcf0d67b786e43dcd8a46db07 | cab8f8d4dd43c0a58d2d4caf1f6c7e17200519fe | /models/common.py | d02c03b3a34c634809c977565053f8ee9d071cab | [] | no_license | wangning7149/Rotate-yolov5 | e485e4496b010a40216799436958f0279a47a1a3 | 9add8bc076554be2a1535767e21006186ffdab82 | refs/heads/main | 2023-03-26T06:15:33.254607 | 2021-03-23T11:22:19 | 2021-03-23T11:22:19 | 350,672,168 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,901 | py | # This file contains modules common to various models
import math
import numpy as np
import torch
import torch.nn as nn
from PIL import Image, ImageDraw
from utils.datasets import letterbox
from utils.general import non_max_suppression, make_divisible, scale_coords, xyxy2xywh
from utils.plots import color_list
def autopad(k, p=None): # kernel, padding
# Pad to 'same'
if p is None:
p = k // 2 if isinstance(k, int) else [x // 2 for x in k] # auto-pad
return p
def DWConv(c1, c2, k=1, s=1, act=True):
# Depthwise convolution
return Conv(c1, c2, k, s, g=math.gcd(c1, c2), act=act)
class Conv(nn.Module):
# Standard convolution
def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in, ch_out, kernel, stride, padding, groups
super(Conv, self).__init__()
self.conv = nn.Conv2d(c1, c2, k, s, autopad(k, p), groups=g, bias=False)
self.bn = nn.BatchNorm2d(c2)
self.act = nn.LeakyReLU() if act is True else (act if isinstance(act, nn.Module) else nn.Identity())
def forward(self, x):
return self.act(self.bn(self.conv(x)))
def fuseforward(self, x):
return self.act(self.conv(x))
class Bottleneck(nn.Module):
# Standard bottleneck
def __init__(self, c1, c2, shortcut=True, g=1, e=0.5): # ch_in, ch_out, shortcut, groups, expansion
super(Bottleneck, self).__init__()
c_ = int(c2 * e) # hidden channels
self.cv1 = Conv(c1, c_, 1, 1)
self.cv2 = Conv(c_, c2, 3, 1, g=g)
self.add = shortcut and c1 == c2
def forward(self, x):
return x + self.cv2(self.cv1(x)) if self.add else self.cv2(self.cv1(x))
class BottleneckCSP(nn.Module):
# CSP Bottleneck https://github.com/WongKinYiu/CrossStagePartialNetworks
def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ch_out, number, shortcut, groups, expansion
super(BottleneckCSP, self).__init__()
c_ = int(c2 * e) # hidden channels
self.cv1 = Conv(c1, c_, 1, 1)
self.cv2 = nn.Conv2d(c1, c_, 1, 1, bias=False)
self.cv3 = nn.Conv2d(c_, c_, 1, 1, bias=False)
self.cv4 = Conv(2 * c_, c2, 1, 1)
self.bn = nn.BatchNorm2d(2 * c_) # applied to cat(cv2, cv3)
self.act = nn.LeakyReLU(0.1, inplace=True)
self.m = nn.Sequential(*[Bottleneck(c_, c_, shortcut, g, e=1.0) for _ in range(n)])
def forward(self, x):
y1 = self.cv3(self.m(self.cv1(x)))
y2 = self.cv2(x)
return self.cv4(self.act(self.bn(torch.cat((y1, y2), dim=1))))
class C3(nn.Module):
# CSP Bottleneck with 3 convolutions
def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ch_out, number, shortcut, groups, expansion
super(C3, self).__init__()
c_ = int(c2 * e) # hidden channels
self.cv1 = Conv(c1, c_, 1, 1)
self.cv2 = Conv(c1, c_, 1, 1)
self.cv3 = Conv(2 * c_, c2, 1) # act=FReLU(c2)
self.m = nn.Sequential(*[Bottleneck(c_, c_, shortcut, g, e=1.0) for _ in range(n)])
# self.m = nn.Sequential(*[CrossConv(c_, c_, 3, 1, g, 1.0, shortcut) for _ in range(n)])
def forward(self, x):
return self.cv3(torch.cat((self.m(self.cv1(x)), self.cv2(x)), dim=1))
class SPP(nn.Module):
# Spatial pyramid pooling layer used in YOLOv3-SPP
def __init__(self, c1, c2, k=(5, 9, 13)):
super(SPP, self).__init__()
c_ = c1 // 2 # hidden channels
self.cv1 = Conv(c1, c_, 1, 1)
self.cv2 = Conv(c_ * (len(k) + 1), c2, 1, 1)
self.m = nn.ModuleList([nn.MaxPool2d(kernel_size=x, stride=1, padding=x // 2) for x in k])
def forward(self, x):
x = self.cv1(x)
return self.cv2(torch.cat([x] + [m(x) for m in self.m], 1))
class Focus(nn.Module):
# Focus wh information into c-space
def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in, ch_out, kernel, stride, padding, groups
super(Focus, self).__init__()
self.conv = Conv(c1 * 4, c2, k, s, p, g, act)
def forward(self, x): # x(b,c,w,h) -> y(b,4c,w/2,h/2)
return self.conv(torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1))
class Concat(nn.Module):
# Concatenate a list of tensors along dimension
def __init__(self, dimension=1):
super(Concat, self).__init__()
self.d = dimension
def forward(self, x):
return torch.cat(x, self.d)
class NMS(nn.Module):
# Non-Maximum Suppression (NMS) module
conf = 0.25 # confidence threshold
iou = 0.45 # IoU threshold
classes = None # (optional list) filter by class
def __init__(self):
super(NMS, self).__init__()
def forward(self, x):
return non_max_suppression(x[0], conf_thres=self.conf, iou_thres=self.iou, classes=self.classes)
class autoShape(nn.Module):
# input-robust model wrapper for passing cv2/np/PIL/torch inputs. Includes preprocessing, inference and NMS
img_size = 640 # inference size (pixels)
conf = 0.25 # NMS confidence threshold
iou = 0.45 # NMS IoU threshold
classes = None # (optional list) filter by class
def __init__(self, model):
super(autoShape, self).__init__()
self.model = model.eval()
def forward(self, imgs, size=640, augment=False, profile=False):
# supports inference from various sources. For height=720, width=1280, RGB images example inputs are:
# opencv: imgs = cv2.imread('image.jpg')[:,:,::-1] # HWC BGR to RGB x(720,1280,3)
# PIL: imgs = Image.open('image.jpg') # HWC x(720,1280,3)
# numpy: imgs = np.zeros((720,1280,3)) # HWC
# torch: imgs = torch.zeros(16,3,720,1280) # BCHW
# multiple: imgs = [Image.open('image1.jpg'), Image.open('image2.jpg'), ...] # list of images
p = next(self.model.parameters()) # for device and type
if isinstance(imgs, torch.Tensor): # torch
return self.model(imgs.to(p.device).type_as(p), augment, profile) # inference
# Pre-process
if not isinstance(imgs, list):
imgs = [imgs]
shape0, shape1 = [], [] # image and inference shapes
batch = range(len(imgs)) # batch size
for i in batch:
imgs[i] = np.array(imgs[i]) # to numpy
if imgs[i].shape[0] < 5: # image in CHW
imgs[i] = imgs[i].transpose((1, 2, 0)) # reverse dataloader .transpose(2, 0, 1)
imgs[i] = imgs[i][:, :, :3] if imgs[i].ndim == 3 else np.tile(imgs[i][:, :, None], 3) # enforce 3ch input
s = imgs[i].shape[:2] # HWC
shape0.append(s) # image shape
g = (size / max(s)) # gain
shape1.append([y * g for y in s])
shape1 = [make_divisible(x, int(self.stride.max())) for x in np.stack(shape1, 0).max(0)] # inference shape
x = [letterbox(imgs[i], new_shape=shape1, auto=False)[0] for i in batch] # pad
x = np.stack(x, 0) if batch[-1] else x[0][None] # stack
x = np.ascontiguousarray(x.transpose((0, 3, 1, 2))) # BHWC to BCHW
x = torch.from_numpy(x).to(p.device).type_as(p) / 255. # uint8 to fp16/32
# Inference
with torch.no_grad():
y = self.model(x, augment, profile)[0] # forward
y = non_max_suppression(y, conf_thres=self.conf, iou_thres=self.iou, classes=self.classes) # NMS
# Post-process
for i in batch:
scale_coords(shape1, y[i][:, :4], shape0[i])
return Detections(imgs, y, self.names)
class Detections:
# detections class for YOLOv5 inference results
def __init__(self, imgs, pred, names=None):
super(Detections, self).__init__()
d = pred[0].device # device
gn = [torch.tensor([*[im.shape[i] for i in [1, 0, 1, 0]], 1., 1.], device=d) for im in imgs] # normalizations
self.imgs = imgs # list of images as numpy arrays
self.pred = pred # list of tensors pred[0] = (xyxy, conf, cls)
self.names = names # class names
self.xyxy = pred # xyxy pixels
self.xywh = [xyxy2xywh(x) for x in pred] # xywh pixels
self.xyxyn = [x / g for x, g in zip(self.xyxy, gn)] # xyxy normalized
self.xywhn = [x / g for x, g in zip(self.xywh, gn)] # xywh normalized
self.n = len(self.pred)
def display(self, pprint=False, show=False, save=False):
colors = color_list()
for i, (img, pred) in enumerate(zip(self.imgs, self.pred)):
str = f'Image {i + 1}/{len(self.pred)}: {img.shape[0]}x{img.shape[1]} '
if pred is not None:
for c in pred[:, -1].unique():
n = (pred[:, -1] == c).sum() # detections per class
str += f'{n} {self.names[int(c)]}s, ' # add to string
if show or save:
img = Image.fromarray(img.astype(np.uint8)) if isinstance(img, np.ndarray) else img # from np
for *box, conf, cls in pred: # xyxy, confidence, class
# str += '%s %.2f, ' % (names[int(cls)], conf) # label
ImageDraw.Draw(img).rectangle(box, width=4, outline=colors[int(cls) % 10]) # plot
if save:
f = f'results{i}.jpg'
str += f"saved to '{f}'"
img.save(f) # save
if show:
img.show(f'Image {i}') # show
if pprint:
print(str)
def print(self):
self.display(pprint=True) # print results
def show(self):
self.display(show=True) # show results
def save(self):
self.display(save=True) # save results
def __len__(self):
return self.n
def tolist(self):
# return a list of Detections objects, i.e. 'for result in results.tolist():'
x = [Detections([self.imgs[i]], [self.pred[i]], self.names) for i in range(self.n)]
for d in x:
for k in ['imgs', 'pred', 'xyxy', 'xyxyn', 'xywh', 'xywhn']:
setattr(d, k, getattr(d, k)[0]) # pop out of list
return x
class Flatten(nn.Module):
# Use after nn.AdaptiveAvgPool2d(1) to remove last 2 dimensions
@staticmethod
def forward(x):
return x.view(x.size(0), -1)
class Classify(nn.Module):
# Classification head, i.e. x(b,c1,20,20) to x(b,c2)
def __init__(self, c1, c2, k=1, s=1, p=None, g=1): # ch_in, ch_out, kernel, stride, padding, groups
super(Classify, self).__init__()
self.aap = nn.AdaptiveAvgPool2d(1) # to x(b,c1,1,1)
self.conv = nn.Conv2d(c1, c2, k, s, autopad(k, p), groups=g) # to x(b,c2,1,1)
self.flat = Flatten()
def forward(self, x):
z = torch.cat([self.aap(y) for y in (x if isinstance(x, list) else [x])], 1) # cat if list
return self.flat(self.conv(z)) # flatten to x(b,c2)
| [
"714970851@qq.com"
] | 714970851@qq.com |
eeae70925a1c2b25ff55ff564036aab334d96b29 | 12e1fcbeb0bb0c3866e9aa863016ebf5b8cf6fa9 | /keras/pre_models.py | 067b6e76aa0c68b8b4533abdbfb7cb727390a80d | [] | no_license | Grid-Gudx/sound_classification | 0eee6c523e5c6732ce4456a297757ef20015753c | c79a83b5882c1b386254a33b2ac9ac44d0546f7b | refs/heads/main | 2023-08-18T14:51:33.181996 | 2021-09-15T07:54:53 | 2021-09-15T07:54:53 | 403,004,685 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,711 | py | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 6 12:59:13 2021
@author: gdx
"""
from tensorflow.keras.applications import ResNet50, VGG16, MobileNetV2
from tensorflow.keras.layers import *
import tensorflow.keras.backend as K
from tensorflow.keras import Model
# # resnet50 = ResNet50(weights='imagenet',include_top=False,input_shape=(40,216,3))
# vgg16 = VGG16(weights='imagenet',include_top=False,input_shape=(40,216,3))
# # mobilenetv2 = MobileNetV2(weights='imagenet',include_top=False,input_shape=(40,216,3))
# for layer in vgg16.layers[-2:]:
# layer.trainable = True
# print(layer.name)
def model_creat(input_shape=(28, 28, 3), output_dim=8):
# basemodel = VGG16(weights='imagenet',include_top=False,input_shape=input_shape,pooling='avg')
basemodel = MobileNetV2(weights='imagenet',include_top=False,input_shape=input_shape,pooling='max')
# basemodel = ResNet50(weights='imagenet',include_top=False,input_shape=input_shape,pooling='max')
for layer in basemodel.layers:
layer.trainable = False
# for layer in vgg16.layers[-3:]:
# layer.trainable = True
input_tensor = Input(shape=input_shape)
x = basemodel(input_tensor)
# x = GlobalAveragePooling2D()(x)
x = Dropout(0.2)(x)
x = Dense(128, activation='relu')(x)
x = Dropout(0.2)(x)
output_tensor = Dense(output_dim, activation = 'softmax')(x)
model = Model(inputs=[input_tensor], outputs=[output_tensor])
return model
if __name__ == '__main__':
model = model_creat(input_shape=(128, 216, 3), output_dim=50)
model.summary()
# for layer in model.layers:
# print(layer.trainable)
# model.save('./model_struct/cnn_atten.h5') | [
"56808862+Grid-Gudx@users.noreply.github.com"
] | 56808862+Grid-Gudx@users.noreply.github.com |
b1a0989f6823f7f7c01312d4b0f5dc3846b8d59a | ae63286cf2d2231d3a88fb2070ad0139f5b26765 | /[Image]ObjectDetection.py | 62d58cf74103ade5705d16d37fbee4cab1cf353e | [] | no_license | daveleefrags/tutorial | 36957b0a2f45d9b80f0ddbbf90db80684ff60f66 | 20adede71ecbd288de83553f4f77f9728a18d76c | refs/heads/master | 2020-08-04T12:56:32.613938 | 2019-10-16T20:35:27 | 2019-10-16T20:35:27 | 212,142,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,372 | py |
### Copy of pytorch tutorial
### https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html
### 윗 파이토치 튜토리얼의 한글 주석본입니다.
import os
import numpy as np
import torch
from PIL import Image
## Make dataset class
## 모델에 활용하기 위한 데이터셋 클래스입니다.
# 보통 dataset 클래스를 상속받는데 여기서는 그러지 않습니다. 객체인식이라서?...
class PennFudanDataset(object):
def __init__(self, root, transforms):
self.root = root
self.transforms = transforms
# Load all image files, sorting them to
# ensure that they are aligned
# 이미지와 mask 파일의 리스트를 불러옵니다.
# 파일을 살펴보면 image에는 말그대로 이미지가, mask에는 검은색 화면만..나옵니다?
# 잘 열리지는 않지만 구체적인 instance에 대한 정보를 담고 있는 듯 합니다.
self.imgs = list(sorted(os.path.join(root, "PNGImages")))
self.masks = list(sorted(os.path.join(root, "PedMasks")))
# 인덱스에 해당하는 인풋과 타겟 정보를 출력하기 위한 펑션
def __getitem__(self, idx):
# 해당 인덱스에 해당하는 이미지와 마스크 정보의 경로를 가져오는 부분
img_path = os.path.join(self.root, "PNGImages", self.imgs[idx])
mask_path = os.path.join(self.root, "PedMasks", self.masks[idx])
# Note that we haven't converted the mask to RGB,
# because each color corresponds to different instance
# with 0 being background
# (mask는 별도로 RGB로 컨버팅하지 않습니다. (3개의 채널로 이루어져 있지 않음) )
# 이미지는 연 뒤에 rgb로 컨버팅하고
# 마스크는 그냥 가지고 와서 np.array로 변형함
img = Image.open(img_path).convert("RGB")
mask = Image.open(img_path)
mask = np.array(mask)
# mask에 있는 유니크한 값들을 가지고 옴
# 첫번째 값은 0 - 즉 백그라운드이기 때문에 - 버리고 두번째부터 가지고 옴
obj_ids = np.unique(mask)
obj_ids = obj_ids[1:]
# Split the color-encoded coodinates for each mask of binary masks
# 각각의 숫자로 되어있는 마스크를 여러장의 binary 마스크로 바꿔줍니다.
masks = mask == obj_ids[:, None, None]
# get bounding box coordinates for each mask
num_objs = len(obj_ids)
boxes = []
for i in range(num_objs):
pos = np.where(masks[i])
xmin = np.min(pos[1])
xmax = np.max(pos[1])
ymin = np.min(pos[0])
ymax = np.max(pos[0])
boxes.append([xmin, ymin, xmax, ymax])
# convert everything into a torch.Tensor
boxes = torch.as_tensor(boxes, dtype=torch.float32)
labels = torch.ones((num_objs,), dtype=torch.int64)
masks = torch.as_tensor(masks, dtype=torch.uint8)
image_id = torch.tensor([idx])
area = (boxes[:,3] - boxes[:, 1]) * (boxes[:,2] - boxes[:,0])
iscrowded = torch.zeros((num_objs,), dtype=torch.int64)
target = {}
target['boxes'] = boxes
target['labels'] = labels
target['masks'] = masks
target['image_id'] = image_id
target['area'] = area
target['iscrowd'] = iscrowd
if self.transforms is not None:
img, target = self.transforms(img, target)
return img, target
def __len__(self):
return len(self.imgs)
# Option 1 :finetunning from a pretrained model
# pretrained된 모델을 불러와서 tunning 하는 방식입니다.
import torchvision
from torchvision.models.detection.faster_rcnn import FastRCNNPredictor
model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)
num_classes = 2 # 1 class (person) + background (사람이 있는 부분은 1, 배경은 0)
in_features = model.roi_heads.box_predictor.cls_score.in_features
model.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes)
# Option 2 : Modifying the model to add a different backbone
import torchvision
from torchvision.models.detection import FasterRCNN
from torchvision.models.detection.rpn import AnchorGenerator
# Load a pre-trained model for classification and return only the features
# imagenet데이터로 pretrained된 mobilenet_v2모형을 로딩합니다.
# 이 모형은 feature를 가공하는 부분만 있으며, 이 뒤에 classifier부분을 추가합니다.
backbone = torchvision.models.mobilenet_v2(pretrained=True).features
# FasterRCNN needs to know the number of
# output channels in a backbone. For Mobilenet_v2, It's 1280.
# so we need to add it here.
# 이 백본 모형의 최종 아웃풋 사이즈에 대한 정보를 지정해줍니다.
backbone.out_channels = 1280
# Let's make the RPN generate 5X3 anchors per spatial
# location, with 5 different sizes and 3 different aspect
# ratios. We have a Tuple because each feature
# map could potentially have different sizes and aspect ratios.
anchor_generator = AnchorGenerator(sizes = ((32, 64, 128, 256, 512),),
aspect_ratios = ((0.5, 1.0, 2.0),)
)
# Let's define what are the feature maps that will
# use to perform the region of interest cropping, as well as
# the size of the crop after rescaling.
# If your backbone returns a Tensor, feature_names is expected to
# bo [0]. More generally, the backbone should return an OrderedDict[Tensor],
# and in featuremap_names you can choose which feature maps to use.
roi_pooler = torchvision.ops.MultiScaleRoIAlign(feature_names=[0],
output_size=7,
sampling_ratio=2
)
# put the pieces together inside a FasterRCNN model
model = FasterRCNN(backbone,
num_classes=2,
rpn_anchor_generator=anchor_generator,
box_roi_pool=roi_pooler)
# In our case, we want to fine-tune from a pre-trained model,
# given that our dataset is very small, so we will be following
# approach number 1
# 이 경우, 데이터셋이 매우 작기 때문에 pretrained 모형을 활용하는
# 1번 방법으로 접근하도록 합니다.
# Here we want to also compute the instance segmentation masks,
# so we will be using Mask R-CNN
# instance segmentation mask를 활용, Mask R-CNN을 활용하도록 합니다.
import torchvision
from torchvision.models.detection.faster_rcnn import FastRCNNPredictor
from torchvision.models.detection.mask_rcnn import MaskRCNNPredictor
def get_model_instance_segmentation(num_classes):
model = torchvision.models.detection.maskrcnn_resnet50_fpn(pretrained=True)
in_features = model.roi_heads.box_predictor.cls_score.in_features
model.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes)
in_features_mask = model.roi_heads.mask_predictor.conv5_mask.in_channels
hidden_layer = 256
model.roi_heads.mask_predictor = MaskRCNNPredictor(in_features_mask,
hidden_layer,
num_classes)
return model
| [
"walkaround@naver.com"
] | walkaround@naver.com |
ad7dbf14334e1e28c5a3b8489e94948d55cebc3b | 6eb458b1340d4fa6d63dceec82ae54d0f7e6ceb5 | /run_scripts/load_data.py | 08bc255cae75f607aaf85207a35b510bdff0b878 | [
"MIT"
] | permissive | EtashGuha/conformal_bayes | 5fde59a914d14c4d3dde88138bf25ff09bb98024 | 0c6d1c1e8e2d41480b57125c52665fc8be182908 | refs/heads/main | 2023-08-21T05:27:56.477734 | 2021-10-25T00:21:27 | 2021-10-25T00:21:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,654 | py | from sklearn.datasets import load_boston,load_diabetes,load_breast_cancer
from sklearn.model_selection import train_test_split
import time
import numpy as np
from tqdm import tqdm
import pandas as pd
import scipy as sp
## Sparse Regression ##
#Well specified?
def load_traintest_sparsereg(train_frac, dataset,seed):
#Load dataset
if dataset =="diabetes":
x,y = load_diabetes(return_X_y = True)
elif dataset =="boston":
x,y = load_boston(return_X_y = True)
else:
print('Invalid dataset')
return
n = np.shape(x)[0]
d = np.shape(x)[1]
#Standardize beforehand (for validity)
x = (x - np.mean(x,axis = 0))/np.std(x,axis = 0)
y = (y - np.mean(y))/np.std(y)
#Train test split
ind_train, ind_test = train_test_split(np.arange(n), train_size = int(train_frac*n),random_state = seed)
x_train = x[ind_train]
y_train = y[ind_train]
x_test = x[ind_test]
y_test = y[ind_test]
y_plot = np.linspace(np.min(y_train) - 2, np.max(y_train) + 2,100)
return x_train,y_train,x_test,y_test,y_plot,n,d
## Sparse Classification ##
# Load data
def load_traintest_sparseclass(train_frac,dataset, seed):
#Load dataset
if dataset =="breast":
x,y = load_breast_cancer(return_X_y = True)
elif dataset == "parkinsons":
data = pd.read_csv('data/parkinsons.data')
data[data == '?']= np.nan
data.dropna(axis = 0,inplace = True)
y = data['status'].values #convert strings to integer
x = data.drop(columns = ['name','status']).values
else:
print('Invalid dataset')
return
n = np.shape(x)[0]
d = np.shape(x)[1]
#Standardize beforehand (for validity)
x = (x - np.mean(x,axis = 0))/np.std(x,axis = 0)
#Train test split
ind_train, ind_test = train_test_split(np.arange(n), train_size = int(train_frac*n),random_state = seed)
x_train = x[ind_train]
y_train = y[ind_train]
x_test = x[ind_test]
y_test = y[ind_test]
y_plot = np.array([0,1])
return x_train,y_train,x_test,y_test,y_plot,n,d
## Hierarchical Datasets ##
#Simulate data
def gen_data_hier(n,p,n_test,seed,K,misspec = False): #n and n_test is number per group
#Generate groups first
theta = np.zeros(p)
#Generate K beta_values (fixed random values)
np.random.seed(24)
beta_true = np.random.randn(K,p) + theta.reshape(1,-1)
sigma_true = np.random.exponential(size = K, scale = 1)
#Training data
np.random.seed(seed) #try new seed
x = np.zeros((n*K,p+1))
y = np.zeros(n*K)
for k in range(K):
if misspec == True:
#eps = sp.stats.skewnorm.rvs(a=5,size = n)
eps = np.random.randn(n)*sigma_true[k]
else:
eps = np.random.randn(n)
x[k*n:(k+1)*n] = np.concatenate((np.random.randn(n,p),k*np.ones((n,1))),axis = 1) #Append group index to last dimension
y[k*n:(k+1)*n] = np.dot(x[k*n:(k+1)*n,0:p],beta_true[k]) + eps
#Test data
x_test = np.zeros((n_test*(K),p+1))
y_test = np.zeros(n_test*(K))
for k in range(K):
if misspec == True:
#eps_test = sp.stats.skewnorm.rvs(a=5,size = n_test)
eps_test = np.random.randn(n_test)*sigma_true[k]
else:
eps_test = np.random.randn(n_test)
x_test[k*n_test:(k+1)*n_test] = np.concatenate((np.random.randn(n_test,p),k*np.ones((n_test,1))),axis = 1) #Append group index to last dimension
y_test[k*n_test:(k+1)*n_test] = np.dot(x_test[k*n_test:(k+1)*n_test,0:p],beta_true[k]) + eps_test
y_plot = np.linspace(-10,10,100)
return y,x,y_test,x_test,beta_true,sigma_true,y_plot
# Load Radon (Minnesota) dataset, based on https://docs.pymc.io/notebooks/multilevel_modeling.html
def load_traintest_hier(train_frac,dataset, seed):
#Load dataset
if dataset =="radon":
# Import radon data
srrs2 = pd.read_csv("./data/srrs2.dat")
srrs2.columns = srrs2.columns.map(str.strip)
srrs_mn = srrs2[srrs2.state == "MN"].copy()
srrs_mn["fips"] = srrs_mn.stfips * 1000 + srrs_mn.cntyfips
cty = pd.read_csv("./data/cty.dat")
cty_mn = cty[cty.st == "MN"].copy()
cty_mn["fips"] = 1000 * cty_mn.stfips + cty_mn.ctfips
srrs_mn = srrs_mn.merge(cty_mn[["fips", "Uppm"]], on="fips")
srrs_mn = srrs_mn.drop_duplicates(subset="idnum")
u = np.log(srrs_mn.Uppm).unique()
n = len(srrs_mn)
srrs_mn.county = srrs_mn.county.map(str.strip)
mn_counties = srrs_mn.county.unique()
counties = len(mn_counties)
county_lookup = dict(zip(mn_counties, range(counties)))
county = srrs_mn["county_code"] = srrs_mn.county.replace(county_lookup).values
radon = srrs_mn.activity
srrs_mn["log_radon"] = log_radon = np.log(radon + 0.1).values
floor = srrs_mn.floor.values
#Preprocess
x = np.zeros((n,2))
x[:,0] = floor
x[:,1]= county
x = np.array(x, dtype = 'int')
y = np.array(log_radon)
else:
print('Invalid dataset')
return
n = np.shape(x)[0]
d = np.shape(x)[1]
#Train test split
if train_frac ==1.:
ind_train = np.arange(n)
ind_test = np.array([],dtype = 'int')
else:
ind_train, ind_test = train_test_split(np.arange(n), train_size = int(train_frac*n),random_state = seed,stratify = x[:,1])
x_train = x[ind_train]
y_train = y[ind_train]
x_test = x[ind_test]
y_test = y[ind_test]
y_plot = np.linspace(-6,6,100)
return x_train,y_train,x_test,y_test,y_plot,n,d
## ## | [
"edwin.fong@wolfson.ox.ac.uk"
] | edwin.fong@wolfson.ox.ac.uk |
8f826330027835bef894a6ef947e059eb2635312 | 415d2d59a910e1fe56eff6b69726de7e5ed871f2 | /Algorithms/strings/two_strings.py | 0b8878005a800833e4ff3c449e9a8b7bc5063d59 | [] | no_license | tommady/Hackerrank | eeda7b4455ce4e90088e73af392a02627e2feefb | a9b64f13b65511068f4949b8498aa3d9746883aa | refs/heads/master | 2020-05-29T11:54:16.843398 | 2016-01-20T15:44:56 | 2016-01-20T15:44:56 | 44,440,546 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | from collections import deque
def is_substring(A, B):
found = False
while A:
if A.pop() in B:
found = True
return found
for _ in range(int(input())):
A = deque(set(input()))
B = deque(set(input()))
print("YES" if is_substring(A, B) else "NO")
| [
"emptysmile1013@gmail.com"
] | emptysmile1013@gmail.com |
a0c82a506c91a3a7c0b678adac1283adedd35094 | 6bd047eb1951601a5a7bab564eb2abba92c6c004 | /prices/api/queries.py | 0fdac2905d72924ea823efd6ca273a290b653fd8 | [] | no_license | volgoweb/DDD_sandbox | 6ab2b43d3fcad8eb2f802bd485e5dbc05eb2e10d | 700c2848d5341ab267e69326bac2487657450d22 | refs/heads/master | 2021-01-01T15:46:13.244679 | 2017-07-11T06:18:36 | 2017-07-11T06:18:36 | 97,695,978 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 659 | py | from utils.queries import IQuery
class GetProductPricingForOneProduct(IQuery):
def __init__(self, product_id: int):
self.product_id = product_id
@classmethod
def get_query_type_name(cls):
return 'prices.GetProductPricingForOneProduct'
class GetProductPricingForManyProducts(IQuery):
def __init__(self, product_id: int):
self.product_id = product_id
@classmethod
def get_query_type_name(cls):
return 'prices.GetProductPricingForManyProducts'
class GetProductPricingForAllProducts(IQuery):
@classmethod
def get_query_type_name(cls):
return 'prices.GetProductPricingForAllProducts'
| [
"volgoweb@bk.ru"
] | volgoweb@bk.ru |
aea0c877e69fd3729d376aef2e6ea5374f0287ca | 5ec06dab1409d790496ce082dacb321392b32fe9 | /clients/python-flask/generated/openapi_server/models/org_apache_sling_jcr_resource_internal_jcr_resource_resolver_factory_impl_properties.py | 65ecabe223fe97999649b8c3603c5f29dc1f1a3b | [
"Apache-2.0"
] | permissive | shinesolutions/swagger-aem-osgi | e9d2385f44bee70e5bbdc0d577e99a9f2525266f | c2f6e076971d2592c1cbd3f70695c679e807396b | refs/heads/master | 2022-10-29T13:07:40.422092 | 2021-04-09T07:46:03 | 2021-04-09T07:46:03 | 190,217,155 | 3 | 3 | Apache-2.0 | 2022-10-05T03:26:20 | 2019-06-04T14:23:28 | null | UTF-8 | Python | false | false | 38,540 | py | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from openapi_server.models.base_model_ import Model
from openapi_server.models.config_node_property_array import ConfigNodePropertyArray # noqa: F401,E501
from openapi_server.models.config_node_property_boolean import ConfigNodePropertyBoolean # noqa: F401,E501
from openapi_server.models.config_node_property_integer import ConfigNodePropertyInteger # noqa: F401,E501
from openapi_server.models.config_node_property_string import ConfigNodePropertyString # noqa: F401,E501
from openapi_server import util
class OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties(Model):
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Do not edit the class manually.
"""
def __init__(self, resource_resolver_searchpath: ConfigNodePropertyArray=None, resource_resolver_manglenamespaces: ConfigNodePropertyBoolean=None, resource_resolver_allow_direct: ConfigNodePropertyBoolean=None, resource_resolver_required_providers: ConfigNodePropertyArray=None, resource_resolver_required_providernames: ConfigNodePropertyArray=None, resource_resolver_virtual: ConfigNodePropertyArray=None, resource_resolver_mapping: ConfigNodePropertyArray=None, resource_resolver_map_location: ConfigNodePropertyString=None, resource_resolver_map_observation: ConfigNodePropertyArray=None, resource_resolver_default_vanity_redirect_status: ConfigNodePropertyInteger=None, resource_resolver_enable_vanitypath: ConfigNodePropertyBoolean=None, resource_resolver_vanitypath_max_entries: ConfigNodePropertyInteger=None, resource_resolver_vanitypath_max_entries_startup: ConfigNodePropertyBoolean=None, resource_resolver_vanitypath_bloomfilter_max_bytes: ConfigNodePropertyInteger=None, resource_resolver_optimize_alias_resolution: ConfigNodePropertyBoolean=None, resource_resolver_vanitypath_whitelist: ConfigNodePropertyArray=None, resource_resolver_vanitypath_blacklist: ConfigNodePropertyArray=None, resource_resolver_vanity_precedence: ConfigNodePropertyBoolean=None, resource_resolver_providerhandling_paranoid: ConfigNodePropertyBoolean=None, resource_resolver_log_closing: ConfigNodePropertyBoolean=None, resource_resolver_log_unclosed: ConfigNodePropertyBoolean=None): # noqa: E501
"""OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties - a model defined in OpenAPI
:param resource_resolver_searchpath: The resource_resolver_searchpath of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_searchpath: ConfigNodePropertyArray
:param resource_resolver_manglenamespaces: The resource_resolver_manglenamespaces of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_manglenamespaces: ConfigNodePropertyBoolean
:param resource_resolver_allow_direct: The resource_resolver_allow_direct of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_allow_direct: ConfigNodePropertyBoolean
:param resource_resolver_required_providers: The resource_resolver_required_providers of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_required_providers: ConfigNodePropertyArray
:param resource_resolver_required_providernames: The resource_resolver_required_providernames of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_required_providernames: ConfigNodePropertyArray
:param resource_resolver_virtual: The resource_resolver_virtual of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_virtual: ConfigNodePropertyArray
:param resource_resolver_mapping: The resource_resolver_mapping of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_mapping: ConfigNodePropertyArray
:param resource_resolver_map_location: The resource_resolver_map_location of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_map_location: ConfigNodePropertyString
:param resource_resolver_map_observation: The resource_resolver_map_observation of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_map_observation: ConfigNodePropertyArray
:param resource_resolver_default_vanity_redirect_status: The resource_resolver_default_vanity_redirect_status of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_default_vanity_redirect_status: ConfigNodePropertyInteger
:param resource_resolver_enable_vanitypath: The resource_resolver_enable_vanitypath of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_enable_vanitypath: ConfigNodePropertyBoolean
:param resource_resolver_vanitypath_max_entries: The resource_resolver_vanitypath_max_entries of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_vanitypath_max_entries: ConfigNodePropertyInteger
:param resource_resolver_vanitypath_max_entries_startup: The resource_resolver_vanitypath_max_entries_startup of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_vanitypath_max_entries_startup: ConfigNodePropertyBoolean
:param resource_resolver_vanitypath_bloomfilter_max_bytes: The resource_resolver_vanitypath_bloomfilter_max_bytes of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_vanitypath_bloomfilter_max_bytes: ConfigNodePropertyInteger
:param resource_resolver_optimize_alias_resolution: The resource_resolver_optimize_alias_resolution of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_optimize_alias_resolution: ConfigNodePropertyBoolean
:param resource_resolver_vanitypath_whitelist: The resource_resolver_vanitypath_whitelist of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_vanitypath_whitelist: ConfigNodePropertyArray
:param resource_resolver_vanitypath_blacklist: The resource_resolver_vanitypath_blacklist of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_vanitypath_blacklist: ConfigNodePropertyArray
:param resource_resolver_vanity_precedence: The resource_resolver_vanity_precedence of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_vanity_precedence: ConfigNodePropertyBoolean
:param resource_resolver_providerhandling_paranoid: The resource_resolver_providerhandling_paranoid of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_providerhandling_paranoid: ConfigNodePropertyBoolean
:param resource_resolver_log_closing: The resource_resolver_log_closing of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_log_closing: ConfigNodePropertyBoolean
:param resource_resolver_log_unclosed: The resource_resolver_log_unclosed of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:type resource_resolver_log_unclosed: ConfigNodePropertyBoolean
"""
self.openapi_types = {
'resource_resolver_searchpath': ConfigNodePropertyArray,
'resource_resolver_manglenamespaces': ConfigNodePropertyBoolean,
'resource_resolver_allow_direct': ConfigNodePropertyBoolean,
'resource_resolver_required_providers': ConfigNodePropertyArray,
'resource_resolver_required_providernames': ConfigNodePropertyArray,
'resource_resolver_virtual': ConfigNodePropertyArray,
'resource_resolver_mapping': ConfigNodePropertyArray,
'resource_resolver_map_location': ConfigNodePropertyString,
'resource_resolver_map_observation': ConfigNodePropertyArray,
'resource_resolver_default_vanity_redirect_status': ConfigNodePropertyInteger,
'resource_resolver_enable_vanitypath': ConfigNodePropertyBoolean,
'resource_resolver_vanitypath_max_entries': ConfigNodePropertyInteger,
'resource_resolver_vanitypath_max_entries_startup': ConfigNodePropertyBoolean,
'resource_resolver_vanitypath_bloomfilter_max_bytes': ConfigNodePropertyInteger,
'resource_resolver_optimize_alias_resolution': ConfigNodePropertyBoolean,
'resource_resolver_vanitypath_whitelist': ConfigNodePropertyArray,
'resource_resolver_vanitypath_blacklist': ConfigNodePropertyArray,
'resource_resolver_vanity_precedence': ConfigNodePropertyBoolean,
'resource_resolver_providerhandling_paranoid': ConfigNodePropertyBoolean,
'resource_resolver_log_closing': ConfigNodePropertyBoolean,
'resource_resolver_log_unclosed': ConfigNodePropertyBoolean
}
self.attribute_map = {
'resource_resolver_searchpath': 'resource.resolver.searchpath',
'resource_resolver_manglenamespaces': 'resource.resolver.manglenamespaces',
'resource_resolver_allow_direct': 'resource.resolver.allowDirect',
'resource_resolver_required_providers': 'resource.resolver.required.providers',
'resource_resolver_required_providernames': 'resource.resolver.required.providernames',
'resource_resolver_virtual': 'resource.resolver.virtual',
'resource_resolver_mapping': 'resource.resolver.mapping',
'resource_resolver_map_location': 'resource.resolver.map.location',
'resource_resolver_map_observation': 'resource.resolver.map.observation',
'resource_resolver_default_vanity_redirect_status': 'resource.resolver.default.vanity.redirect.status',
'resource_resolver_enable_vanitypath': 'resource.resolver.enable.vanitypath',
'resource_resolver_vanitypath_max_entries': 'resource.resolver.vanitypath.maxEntries',
'resource_resolver_vanitypath_max_entries_startup': 'resource.resolver.vanitypath.maxEntries.startup',
'resource_resolver_vanitypath_bloomfilter_max_bytes': 'resource.resolver.vanitypath.bloomfilter.maxBytes',
'resource_resolver_optimize_alias_resolution': 'resource.resolver.optimize.alias.resolution',
'resource_resolver_vanitypath_whitelist': 'resource.resolver.vanitypath.whitelist',
'resource_resolver_vanitypath_blacklist': 'resource.resolver.vanitypath.blacklist',
'resource_resolver_vanity_precedence': 'resource.resolver.vanity.precedence',
'resource_resolver_providerhandling_paranoid': 'resource.resolver.providerhandling.paranoid',
'resource_resolver_log_closing': 'resource.resolver.log.closing',
'resource_resolver_log_unclosed': 'resource.resolver.log.unclosed'
}
self._resource_resolver_searchpath = resource_resolver_searchpath
self._resource_resolver_manglenamespaces = resource_resolver_manglenamespaces
self._resource_resolver_allow_direct = resource_resolver_allow_direct
self._resource_resolver_required_providers = resource_resolver_required_providers
self._resource_resolver_required_providernames = resource_resolver_required_providernames
self._resource_resolver_virtual = resource_resolver_virtual
self._resource_resolver_mapping = resource_resolver_mapping
self._resource_resolver_map_location = resource_resolver_map_location
self._resource_resolver_map_observation = resource_resolver_map_observation
self._resource_resolver_default_vanity_redirect_status = resource_resolver_default_vanity_redirect_status
self._resource_resolver_enable_vanitypath = resource_resolver_enable_vanitypath
self._resource_resolver_vanitypath_max_entries = resource_resolver_vanitypath_max_entries
self._resource_resolver_vanitypath_max_entries_startup = resource_resolver_vanitypath_max_entries_startup
self._resource_resolver_vanitypath_bloomfilter_max_bytes = resource_resolver_vanitypath_bloomfilter_max_bytes
self._resource_resolver_optimize_alias_resolution = resource_resolver_optimize_alias_resolution
self._resource_resolver_vanitypath_whitelist = resource_resolver_vanitypath_whitelist
self._resource_resolver_vanitypath_blacklist = resource_resolver_vanitypath_blacklist
self._resource_resolver_vanity_precedence = resource_resolver_vanity_precedence
self._resource_resolver_providerhandling_paranoid = resource_resolver_providerhandling_paranoid
self._resource_resolver_log_closing = resource_resolver_log_closing
self._resource_resolver_log_unclosed = resource_resolver_log_unclosed
@classmethod
def from_dict(cls, dikt) -> 'OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties':
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The orgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties. # noqa: E501
:rtype: OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties
"""
return util.deserialize_model(dikt, cls)
@property
def resource_resolver_searchpath(self) -> ConfigNodePropertyArray:
"""Gets the resource_resolver_searchpath of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_searchpath of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyArray
"""
return self._resource_resolver_searchpath
@resource_resolver_searchpath.setter
def resource_resolver_searchpath(self, resource_resolver_searchpath: ConfigNodePropertyArray):
"""Sets the resource_resolver_searchpath of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_searchpath: The resource_resolver_searchpath of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_searchpath: ConfigNodePropertyArray
"""
self._resource_resolver_searchpath = resource_resolver_searchpath
@property
def resource_resolver_manglenamespaces(self) -> ConfigNodePropertyBoolean:
"""Gets the resource_resolver_manglenamespaces of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_manglenamespaces of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyBoolean
"""
return self._resource_resolver_manglenamespaces
@resource_resolver_manglenamespaces.setter
def resource_resolver_manglenamespaces(self, resource_resolver_manglenamespaces: ConfigNodePropertyBoolean):
"""Sets the resource_resolver_manglenamespaces of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_manglenamespaces: The resource_resolver_manglenamespaces of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_manglenamespaces: ConfigNodePropertyBoolean
"""
self._resource_resolver_manglenamespaces = resource_resolver_manglenamespaces
@property
def resource_resolver_allow_direct(self) -> ConfigNodePropertyBoolean:
"""Gets the resource_resolver_allow_direct of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_allow_direct of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyBoolean
"""
return self._resource_resolver_allow_direct
@resource_resolver_allow_direct.setter
def resource_resolver_allow_direct(self, resource_resolver_allow_direct: ConfigNodePropertyBoolean):
"""Sets the resource_resolver_allow_direct of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_allow_direct: The resource_resolver_allow_direct of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_allow_direct: ConfigNodePropertyBoolean
"""
self._resource_resolver_allow_direct = resource_resolver_allow_direct
@property
def resource_resolver_required_providers(self) -> ConfigNodePropertyArray:
"""Gets the resource_resolver_required_providers of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_required_providers of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyArray
"""
return self._resource_resolver_required_providers
@resource_resolver_required_providers.setter
def resource_resolver_required_providers(self, resource_resolver_required_providers: ConfigNodePropertyArray):
"""Sets the resource_resolver_required_providers of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_required_providers: The resource_resolver_required_providers of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_required_providers: ConfigNodePropertyArray
"""
self._resource_resolver_required_providers = resource_resolver_required_providers
@property
def resource_resolver_required_providernames(self) -> ConfigNodePropertyArray:
"""Gets the resource_resolver_required_providernames of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_required_providernames of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyArray
"""
return self._resource_resolver_required_providernames
@resource_resolver_required_providernames.setter
def resource_resolver_required_providernames(self, resource_resolver_required_providernames: ConfigNodePropertyArray):
"""Sets the resource_resolver_required_providernames of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_required_providernames: The resource_resolver_required_providernames of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_required_providernames: ConfigNodePropertyArray
"""
self._resource_resolver_required_providernames = resource_resolver_required_providernames
@property
def resource_resolver_virtual(self) -> ConfigNodePropertyArray:
"""Gets the resource_resolver_virtual of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_virtual of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyArray
"""
return self._resource_resolver_virtual
@resource_resolver_virtual.setter
def resource_resolver_virtual(self, resource_resolver_virtual: ConfigNodePropertyArray):
"""Sets the resource_resolver_virtual of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_virtual: The resource_resolver_virtual of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_virtual: ConfigNodePropertyArray
"""
self._resource_resolver_virtual = resource_resolver_virtual
@property
def resource_resolver_mapping(self) -> ConfigNodePropertyArray:
"""Gets the resource_resolver_mapping of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_mapping of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyArray
"""
return self._resource_resolver_mapping
@resource_resolver_mapping.setter
def resource_resolver_mapping(self, resource_resolver_mapping: ConfigNodePropertyArray):
"""Sets the resource_resolver_mapping of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_mapping: The resource_resolver_mapping of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_mapping: ConfigNodePropertyArray
"""
self._resource_resolver_mapping = resource_resolver_mapping
@property
def resource_resolver_map_location(self) -> ConfigNodePropertyString:
"""Gets the resource_resolver_map_location of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_map_location of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyString
"""
return self._resource_resolver_map_location
@resource_resolver_map_location.setter
def resource_resolver_map_location(self, resource_resolver_map_location: ConfigNodePropertyString):
"""Sets the resource_resolver_map_location of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_map_location: The resource_resolver_map_location of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_map_location: ConfigNodePropertyString
"""
self._resource_resolver_map_location = resource_resolver_map_location
@property
def resource_resolver_map_observation(self) -> ConfigNodePropertyArray:
"""Gets the resource_resolver_map_observation of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_map_observation of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyArray
"""
return self._resource_resolver_map_observation
@resource_resolver_map_observation.setter
def resource_resolver_map_observation(self, resource_resolver_map_observation: ConfigNodePropertyArray):
"""Sets the resource_resolver_map_observation of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_map_observation: The resource_resolver_map_observation of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_map_observation: ConfigNodePropertyArray
"""
self._resource_resolver_map_observation = resource_resolver_map_observation
@property
def resource_resolver_default_vanity_redirect_status(self) -> ConfigNodePropertyInteger:
"""Gets the resource_resolver_default_vanity_redirect_status of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_default_vanity_redirect_status of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyInteger
"""
return self._resource_resolver_default_vanity_redirect_status
@resource_resolver_default_vanity_redirect_status.setter
def resource_resolver_default_vanity_redirect_status(self, resource_resolver_default_vanity_redirect_status: ConfigNodePropertyInteger):
"""Sets the resource_resolver_default_vanity_redirect_status of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_default_vanity_redirect_status: The resource_resolver_default_vanity_redirect_status of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_default_vanity_redirect_status: ConfigNodePropertyInteger
"""
self._resource_resolver_default_vanity_redirect_status = resource_resolver_default_vanity_redirect_status
@property
def resource_resolver_enable_vanitypath(self) -> ConfigNodePropertyBoolean:
"""Gets the resource_resolver_enable_vanitypath of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_enable_vanitypath of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyBoolean
"""
return self._resource_resolver_enable_vanitypath
@resource_resolver_enable_vanitypath.setter
def resource_resolver_enable_vanitypath(self, resource_resolver_enable_vanitypath: ConfigNodePropertyBoolean):
"""Sets the resource_resolver_enable_vanitypath of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_enable_vanitypath: The resource_resolver_enable_vanitypath of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_enable_vanitypath: ConfigNodePropertyBoolean
"""
self._resource_resolver_enable_vanitypath = resource_resolver_enable_vanitypath
@property
def resource_resolver_vanitypath_max_entries(self) -> ConfigNodePropertyInteger:
"""Gets the resource_resolver_vanitypath_max_entries of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_vanitypath_max_entries of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyInteger
"""
return self._resource_resolver_vanitypath_max_entries
@resource_resolver_vanitypath_max_entries.setter
def resource_resolver_vanitypath_max_entries(self, resource_resolver_vanitypath_max_entries: ConfigNodePropertyInteger):
"""Sets the resource_resolver_vanitypath_max_entries of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_vanitypath_max_entries: The resource_resolver_vanitypath_max_entries of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_vanitypath_max_entries: ConfigNodePropertyInteger
"""
self._resource_resolver_vanitypath_max_entries = resource_resolver_vanitypath_max_entries
@property
def resource_resolver_vanitypath_max_entries_startup(self) -> ConfigNodePropertyBoolean:
"""Gets the resource_resolver_vanitypath_max_entries_startup of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_vanitypath_max_entries_startup of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyBoolean
"""
return self._resource_resolver_vanitypath_max_entries_startup
@resource_resolver_vanitypath_max_entries_startup.setter
def resource_resolver_vanitypath_max_entries_startup(self, resource_resolver_vanitypath_max_entries_startup: ConfigNodePropertyBoolean):
"""Sets the resource_resolver_vanitypath_max_entries_startup of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_vanitypath_max_entries_startup: The resource_resolver_vanitypath_max_entries_startup of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_vanitypath_max_entries_startup: ConfigNodePropertyBoolean
"""
self._resource_resolver_vanitypath_max_entries_startup = resource_resolver_vanitypath_max_entries_startup
@property
def resource_resolver_vanitypath_bloomfilter_max_bytes(self) -> ConfigNodePropertyInteger:
"""Gets the resource_resolver_vanitypath_bloomfilter_max_bytes of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_vanitypath_bloomfilter_max_bytes of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyInteger
"""
return self._resource_resolver_vanitypath_bloomfilter_max_bytes
@resource_resolver_vanitypath_bloomfilter_max_bytes.setter
def resource_resolver_vanitypath_bloomfilter_max_bytes(self, resource_resolver_vanitypath_bloomfilter_max_bytes: ConfigNodePropertyInteger):
"""Sets the resource_resolver_vanitypath_bloomfilter_max_bytes of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_vanitypath_bloomfilter_max_bytes: The resource_resolver_vanitypath_bloomfilter_max_bytes of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_vanitypath_bloomfilter_max_bytes: ConfigNodePropertyInteger
"""
self._resource_resolver_vanitypath_bloomfilter_max_bytes = resource_resolver_vanitypath_bloomfilter_max_bytes
@property
def resource_resolver_optimize_alias_resolution(self) -> ConfigNodePropertyBoolean:
"""Gets the resource_resolver_optimize_alias_resolution of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_optimize_alias_resolution of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyBoolean
"""
return self._resource_resolver_optimize_alias_resolution
@resource_resolver_optimize_alias_resolution.setter
def resource_resolver_optimize_alias_resolution(self, resource_resolver_optimize_alias_resolution: ConfigNodePropertyBoolean):
"""Sets the resource_resolver_optimize_alias_resolution of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_optimize_alias_resolution: The resource_resolver_optimize_alias_resolution of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_optimize_alias_resolution: ConfigNodePropertyBoolean
"""
self._resource_resolver_optimize_alias_resolution = resource_resolver_optimize_alias_resolution
@property
def resource_resolver_vanitypath_whitelist(self) -> ConfigNodePropertyArray:
"""Gets the resource_resolver_vanitypath_whitelist of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_vanitypath_whitelist of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyArray
"""
return self._resource_resolver_vanitypath_whitelist
@resource_resolver_vanitypath_whitelist.setter
def resource_resolver_vanitypath_whitelist(self, resource_resolver_vanitypath_whitelist: ConfigNodePropertyArray):
"""Sets the resource_resolver_vanitypath_whitelist of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_vanitypath_whitelist: The resource_resolver_vanitypath_whitelist of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_vanitypath_whitelist: ConfigNodePropertyArray
"""
self._resource_resolver_vanitypath_whitelist = resource_resolver_vanitypath_whitelist
@property
def resource_resolver_vanitypath_blacklist(self) -> ConfigNodePropertyArray:
"""Gets the resource_resolver_vanitypath_blacklist of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_vanitypath_blacklist of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyArray
"""
return self._resource_resolver_vanitypath_blacklist
@resource_resolver_vanitypath_blacklist.setter
def resource_resolver_vanitypath_blacklist(self, resource_resolver_vanitypath_blacklist: ConfigNodePropertyArray):
"""Sets the resource_resolver_vanitypath_blacklist of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_vanitypath_blacklist: The resource_resolver_vanitypath_blacklist of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_vanitypath_blacklist: ConfigNodePropertyArray
"""
self._resource_resolver_vanitypath_blacklist = resource_resolver_vanitypath_blacklist
@property
def resource_resolver_vanity_precedence(self) -> ConfigNodePropertyBoolean:
"""Gets the resource_resolver_vanity_precedence of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_vanity_precedence of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyBoolean
"""
return self._resource_resolver_vanity_precedence
@resource_resolver_vanity_precedence.setter
def resource_resolver_vanity_precedence(self, resource_resolver_vanity_precedence: ConfigNodePropertyBoolean):
"""Sets the resource_resolver_vanity_precedence of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_vanity_precedence: The resource_resolver_vanity_precedence of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_vanity_precedence: ConfigNodePropertyBoolean
"""
self._resource_resolver_vanity_precedence = resource_resolver_vanity_precedence
@property
def resource_resolver_providerhandling_paranoid(self) -> ConfigNodePropertyBoolean:
"""Gets the resource_resolver_providerhandling_paranoid of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_providerhandling_paranoid of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyBoolean
"""
return self._resource_resolver_providerhandling_paranoid
@resource_resolver_providerhandling_paranoid.setter
def resource_resolver_providerhandling_paranoid(self, resource_resolver_providerhandling_paranoid: ConfigNodePropertyBoolean):
"""Sets the resource_resolver_providerhandling_paranoid of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_providerhandling_paranoid: The resource_resolver_providerhandling_paranoid of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_providerhandling_paranoid: ConfigNodePropertyBoolean
"""
self._resource_resolver_providerhandling_paranoid = resource_resolver_providerhandling_paranoid
@property
def resource_resolver_log_closing(self) -> ConfigNodePropertyBoolean:
"""Gets the resource_resolver_log_closing of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_log_closing of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyBoolean
"""
return self._resource_resolver_log_closing
@resource_resolver_log_closing.setter
def resource_resolver_log_closing(self, resource_resolver_log_closing: ConfigNodePropertyBoolean):
"""Sets the resource_resolver_log_closing of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_log_closing: The resource_resolver_log_closing of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_log_closing: ConfigNodePropertyBoolean
"""
self._resource_resolver_log_closing = resource_resolver_log_closing
@property
def resource_resolver_log_unclosed(self) -> ConfigNodePropertyBoolean:
"""Gets the resource_resolver_log_unclosed of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:return: The resource_resolver_log_unclosed of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:rtype: ConfigNodePropertyBoolean
"""
return self._resource_resolver_log_unclosed
@resource_resolver_log_unclosed.setter
def resource_resolver_log_unclosed(self, resource_resolver_log_unclosed: ConfigNodePropertyBoolean):
"""Sets the resource_resolver_log_unclosed of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:param resource_resolver_log_unclosed: The resource_resolver_log_unclosed of this OrgApacheSlingJcrResourceInternalJcrResourceResolverFactoryImplProperties.
:type resource_resolver_log_unclosed: ConfigNodePropertyBoolean
"""
self._resource_resolver_log_unclosed = resource_resolver_log_unclosed
| [
"cliffano@gmail.com"
] | cliffano@gmail.com |
d65abfef0a21cf2b6eba2a17eea54aaeb27c62dc | cf1f1d3f7a4aaaaaee322b0101f7b294909c5a67 | /Code/Kevin/Lab10Version1.py | c8c1bb6d36d0e094285053224314851aa2c4c01f | [] | no_license | PdxCodeGuild/class_emu | 0b52cc205d01af11860a975fc55e36c065d1cc68 | 9938f384d67a4f57e25f2714efa6b63e2e41b892 | refs/heads/master | 2020-05-31T01:16:52.911660 | 2019-12-09T05:22:06 | 2019-12-09T05:22:06 | 190,046,342 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 236 | py | nums = [5, 0, 8, 3, 4, 1, 6]
average_number = 0
total_sum = 0
# loop over the indices
for i in range(len(nums)):
total_sum += nums[i]
average_number = total_sum/ len(nums)
print(f"Sum: {total_sum}\nAverage: {average_number}")
| [
"wrenJTD@gmail.com"
] | wrenJTD@gmail.com |
ca18b5c3363360b40cbbff827c4f93159c1dea58 | f11fc43cc80244bcc54ef6b1a076ff1c865cb5cc | /server/routes/browser/api.py | 8e906d4e95df89a48442c189b13a1596ab053d23 | [
"Apache-2.0"
] | permissive | shifucun/website | b2ea42951e097773b84a4e034a723be58c11f52e | eabf368af7e66d8f21de1f79389e9223e9dba764 | refs/heads/master | 2023-08-16T21:19:28.422369 | 2023-06-28T20:59:52 | 2023-06-28T20:59:52 | 272,305,727 | 0 | 0 | Apache-2.0 | 2023-04-27T20:58:15 | 2020-06-15T00:16:53 | TypeScript | UTF-8 | Python | false | false | 3,571 | py | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Graph browser related handlers."""
import json
import flask
from flask import request
from flask import Response
from server import cache
from server.lib import fetch
import server.services.datacommons as dc
bp = flask.Blueprint('api_browser', __name__, url_prefix='/api/browser')
NO_MMETHOD_KEY = 'no_mmethod'
NO_OBSPERIOD_KEY = 'no_obsPeriod'
@bp.route('/provenance')
@cache.cache.cached(timeout=cache.TIMEOUT, query_string=True)
def provenance():
"""Returns all the provenance information."""
prov_resp = fetch.property_values(['Provenance'], 'typeOf', False)
url_resp = fetch.property_values(prov_resp['Provenance'], "url", True)
result = {}
for dcid, urls in url_resp.items():
if len(urls) > 0:
result[dcid] = urls[0]
return result
def get_sparql_query(place_id, stat_var_id, date):
date_triple = "?svObservation observationDate ?obsDate ."
date_selector = " ?obsDate"
if date:
date_triple = f'?svObservation observationDate "{date}" .'
date_selector = ""
sparql_query = f"""
SELECT ?dcid ?mmethod ?obsPeriod{date_selector}
WHERE {{
?svObservation typeOf StatVarObservation .
?svObservation variableMeasured {stat_var_id} .
?svObservation observationAbout {place_id} .
?svObservation dcid ?dcid .
?svObservation measurementMethod ?mmethod .
?svObservation observationPeriod ?obsPeriod .
{date_triple}
}}
"""
return sparql_query
@cache.cache.cached(timeout=cache.TIMEOUT, query_string=True)
@bp.route('/observation-id')
def get_observation_id():
"""Returns the observation node dcid for a combination of
predicates: observedNodeLocation, statisticalVariable, date,
measurementMethod optional), observationPeriod (optional)"""
place_id = request.args.get("place")
if not place_id:
return Response(json.dumps("error: must provide a place field"),
400,
mimetype='application/json')
stat_var_id = request.args.get("statVar")
if not stat_var_id:
return Response(json.dumps("error: must provide a statVar field"),
400,
mimetype='application/json')
date = request.args.get("date", "")
if not date:
return Response(json.dumps("error: must provide a date field"),
400,
mimetype='application/json')
request_mmethod = request.args.get("measurementMethod", NO_MMETHOD_KEY)
request_obsPeriod = request.args.get("obsPeriod", NO_OBSPERIOD_KEY)
sparql_query = get_sparql_query(place_id, stat_var_id, date)
result = ""
(_, rows) = dc.query(sparql_query)
for row in rows:
cells = row.get('cells', [])
if len(cells) != 3:
continue
dcid = cells[0].get('value', '')
mmethod = cells[1].get('value', NO_MMETHOD_KEY)
obsPeriod = cells[2].get('value', NO_OBSPERIOD_KEY)
if mmethod == request_mmethod and obsPeriod == request_obsPeriod:
result = dcid
break
return Response(json.dumps(result), 200, mimetype='application/json') | [
"noreply@github.com"
] | noreply@github.com |
6909a2423cf10b74b46fb957494f6095eb62d924 | 666020d5d8b1c1c1ba60d15a66ecae80e5fb3086 | /utils/http_manage.py | 06f0ea93f15bfb5ca67bdd1f3c2455bd18df7b1e | [] | no_license | smarthaut/smart-auto | a0ffa6b13e0009f480dce2da251c8746cbb292eb | 19b4fc1060f3d03e65f0a5af0d12c436b284e1f9 | refs/heads/master | 2022-11-24T09:22:57.661659 | 2020-07-20T03:16:05 | 2020-07-20T03:16:05 | 272,387,578 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,340 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/7/2 上午9:23
# @Author : huanghe
# @Site :
# @File : http_manage.py
# @Software: PyCharm
import requests
import json
from utils.log_manage import Logger
class BaseHttp:
def __init__(self, method, host, timeout=60):
self.method = method
self.host = host
self.timeout = timeout
self.url = ""
self.headers = {}
self.params = {}
self.cookies = ""
self.data = {}
self.logger = Logger(loggername=self.__class__.__name__).get_logger()
def set_url(self, url):
self.url = self.host + url
def set_headers(self, headers):
self.headers = headers
def set_params(self, params):
self.params = params
def set_cookies(self, cookies):
self.cookies = cookies
def set_data(self,data):
self.data = data
def get_post(self,jsontype=1):
try:
response = None
if self.method in ["get","GET"]:
response = requests.get(self.url, headers=self.headers, params=self.params,
timeout=float(self.timeout), cookies=self.cookies)
elif self.method in ["post","POST"]:
if jsontype == 0:
response = requests.post(self.url, headers=self.headers,data=self.data,
timeout=float(self.timeout), cookies=self.cookies)
else:
response = requests.post(self.url, headers=self.headers, json=json.dumps(self.data),
timeout=float(self.timeout), cookies=self.cookies)
self.logger.info("请求接口为: {}".format(self.url))
self.logger.info("响应状态码为:{}".format(response.status_code))
self.logger.info("响应内容为:{}".format(response.text))
return response
except Exception as e:
print('未进行容错处理的情况:', e)
return None
if __name__ == '__main__':
basehttp = BaseHttp(method='get', host='http://172.17.2.75:5000')
basehttp.set_url("/get-cookies")
response = basehttp.get_post()
# response01 = requests.get("http://172.17.2.75:5000/get-cookies")
# print(response)
print(response)
| [
"huanghe@zuihuibao.com"
] | huanghe@zuihuibao.com |
6b098e4d345dd4448f6dba3dd56ca8f348913b8c | 0e59bee1dfba817faf3d0989f4d491e40d2168d2 | /tests/unit-tests/python/foglamp_test/services/core/api/test_statistics_history.py | 1c604cd3928433f0d096abccc7cf931f1a52f8c0 | [
"Apache-2.0"
] | permissive | m0fff/FogLAMP | 2f9fded0de1ac92a70fc719a94c8fc31fb8b7084 | f9e89b22645570989b952f0484e950a952f9c2d0 | refs/heads/master | 2021-05-06T05:51:20.439596 | 2017-12-19T17:00:37 | 2017-12-19T17:00:37 | 115,176,999 | 0 | 0 | null | 2017-12-23T06:51:37 | 2017-12-23T06:51:37 | null | UTF-8 | Python | false | false | 4,990 | py | # -*- coding: utf-8 -*-
# FOGLAMP_BEGIN
# See: http://foglamp.readthedocs.io/
# FOGLAMP_END
import asyncpg
import asyncio
from datetime import datetime, timedelta
import requests
import pytest
__author__ = "Praveen Garg"
__copyright__ = "Copyright (c) 2017 OSIsoft, LLC"
__license__ = "Apache 2.0"
__version__ = "${VERSION}"
__DB_NAME = "foglamp"
BASE_URL = 'http://localhost:8081/foglamp'
pytestmark = pytest.mark.asyncio
last_count = 0
async def set_statistics_test_data(val):
conn = await asyncpg.connect(database=__DB_NAME)
await conn.execute('''UPDATE foglamp.statistics SET value = $1, previous_value = $2''', val, 0)
await conn.close()
async def get_stats_keys_count():
conn = await asyncpg.connect(database=__DB_NAME)
res = await conn.fetchrow(''' SELECT count(*) FROM statistics ''')
await conn.close()
return res['count']
async def get_stats_collector_schedule_interval():
conn = await asyncpg.connect(database=__DB_NAME)
res = await conn.fetchrow(''' SELECT schedule_interval FROM schedules WHERE process_name= $1 LIMIT 1 ''',
'stats collector')
time_str = res['schedule_interval']
await conn.close()
return time_str.seconds
@pytest.allure.feature("api")
@pytest.allure.story("statistics-history")
class TestStatisticsHistory:
@classmethod
def setup_class(cls):
# start foglamp
pass
@classmethod
def teardown_class(cls):
# stop foglamp
pass
@pytest.mark.run(order=1)
async def test_get_statistics_history(self):
stats_collector_schedule_interval = await get_stats_collector_schedule_interval()
# Wait for 15 (as per the task schedule) seconds
# to get 1 more batch of statistics updated value in statistics_history
# FIXME: we should not wait in actual; but execute the task itself
await asyncio.sleep(stats_collector_schedule_interval)
total_batch_keys = await get_stats_keys_count()
r = requests.get(BASE_URL + '/statistics/history')
res = r.json()
assert 200 == r.status_code
assert stats_collector_schedule_interval == res['interval']
global last_count
last_count = len(res['statistics']) * total_batch_keys
# use fixtures
await set_statistics_test_data(10) # for new batch
# FIXME: we should not wait in actual; but execute the task itself
await asyncio.sleep(stats_collector_schedule_interval)
r2 = requests.get(BASE_URL + '/statistics/history')
res2 = r2.json()
updated_count = len(res2['statistics']) * total_batch_keys
assert 1 == len(res2['statistics']) - len(res['statistics'])
assert last_count + total_batch_keys == updated_count
assert 10 == res2['statistics'][-1]['BUFFERED']
assert 10 == res2['statistics'][-1]['DISCARDED']
assert 10 == res2['statistics'][-1]['UNSENT']
assert 10 == res2['statistics'][-1]['SENT_1']
assert 10 == res2['statistics'][-1]['SENT_2']
assert 10 == res2['statistics'][-1]['UNSNPURGED']
assert 10 == res2['statistics'][-1]['READINGS']
assert 10 == res2['statistics'][-1]['PURGED']
last_count = updated_count
# use fixtures
await set_statistics_test_data(0)
@pytest.mark.run(order=2)
async def test_get_statistics_history_with_limit(self):
""" Verify return <limit> set of records
"""
stats_collector_schedule_interval = await get_stats_collector_schedule_interval()
# Wait for 15 (as per the task schedule) seconds
# to get 1 more batch of statistics updated value in statistics_history
# FIXME: we should not wait in actual; but execute the task itself
await asyncio.sleep(stats_collector_schedule_interval)
r = requests.get(BASE_URL + '/statistics/history?limit=2')
res = r.json()
assert 200 == r.status_code
# verify returned record count based on limit
assert 2 == len(res['statistics'])
assert stats_collector_schedule_interval == res['interval']
previous_time = -1 # make it better
is_greater_time = False
# Verify history timestamp is in ascending order
for r in res['statistics']:
history_ts = datetime.strptime(r['history_ts'], "%Y-%m-%d %H:%M:%S")
# convert time in seconds
time = history_ts.hour*60*60 + history_ts.minute*60 + history_ts.second
# compare history timestamp
if time >= previous_time:
previous_time = time
is_greater_time = True
else:
is_greater_time = False
break
assert is_greater_time is True
async def test_get_statistics_history_limit_with_bad_data(self):
r = requests.get(BASE_URL + '/statistics/history?limit=x')
res = r.json()
assert 400 == res['error']['code']
| [
"praveen.garg@nerdapplabs.com"
] | praveen.garg@nerdapplabs.com |
54ab05db85f18373b1cd489a5310e729a167c100 | 08e039046e2b3c526b5fd2169e02d5c5bbe253c5 | /0x04-python-more_data_structures/0-main.py | f37cdb42818fedc7a8af51018ae298fef65412fb | [] | no_license | VinneyJ/alx-higher_level_programming | 22a976a22583334aff1f0c4120fb81117905e35b | 0ea8719ec5f28c76faf06bb5e67c14abb71fa3d0 | refs/heads/main | 2023-07-31T15:44:30.390103 | 2021-10-01T21:27:31 | 2021-10-01T21:27:31 | 361,816,988 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 225 | py | #!/usr/bin/python3
square_matrix_simple = __import__('0-square_matrix_simple').square_matrix_simple
matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
new_matrix = square_matrix_simple(matrix)
print(new_matrix)
print(matrix)
| [
"vincentjayden49@gmail.com"
] | vincentjayden49@gmail.com |
d85e02188fa8b464dc1bdef600a03dfa8eecb4d8 | cba23cf4cd87fe961475da6df7d94d5ae8695e76 | /project3/main.py | 56492404f3d3879cf202ae2cb6d643fe0cadcb3c | [] | no_license | KirMcR/OOP-python | e94ed8be9745e5b6ef84f8a8277b12f1fbbfd6f8 | 81e1e5b49bbbb436a18e5638c963577494460e4e | refs/heads/master | 2023-02-06T01:54:02.231985 | 2020-12-22T18:05:11 | 2020-12-22T18:05:11 | 299,915,475 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,934 | py | from abc import abstractmethod
from random import randint
class Fighter(): # Абстрактный класс-родитель для классов описывающих бойцов
def __init__(self, name, age, country, weight):
self.name = name
self.age = age
self.country = country
self.weight = weight
self.health = 100
@abstractmethod
def what_hit(self, a): #абстрактный метод, который быдет переопределён в дочерних классах - будет определять, какой тип атаки применит боец
print()
@abstractmethod
def inf0(self): #абстрактный метод, который быдет переопределён в дочерних классах - будет выводить информацию о бойце
print()
class Mixin_Hit_And_Win():# класс-миксин, который отвечает за получение урона и определение победителя
def get_hit(self): #метод получения урона
self.health -= 10
print(self.health," hp у", self.name)
def get_win(self): #метод, вызываемый при победе
print(self.name + " WON!!!")
class Boxer(Fighter, Mixin_Hit_And_Win): #дочерний класс Боксёр
def __init__(self, name, age, country, weight, title):
super().__init__(name, age, country, weight) #переопределён конструктор родительского класса
self.title = title
def what_hit(self, a):
if a == 0:
print(self.name + ": прописывает двоечку")
else:
print(self.name + ": громовым апперкотом отправляет соперника отдуохнуть на мате")
def inf0(self):
print("Боксёр(ша) |Прозвище: {0} |Возраст: {1} |Страна: {2} |Вес: {3} |Титул: {4} |".format(self.name, self.age, self.country, self.weight, self.title))
class Karateka(Fighter,Mixin_Hit_And_Win):
def __init__(self, name, age, country, weight, color):
super().__init__(name, age, country, weight)
self.color = color
def what_hit(self, a):
if a == 0:
print(self.name + ": бьёт лоукик")
else:
print(self.name + ": молниеносной вертушкой сносит соперника с ног")
def inf0(self):
print("Каратист(ка) |Прозвище: {0} |Возраст: {1} |Страна: {2} |Вес: {3} |Пояс: {4} |".format(self.name, self.age, self.country, self.weight, self.color))
class Fight(): #класс, отвечающий за описание самого поединка
def who_will_hit(self, f1, f2): #случайно определяет того, кто нанесёт урон и какой тип атаки совершит
if randint(0, 1) == 0:
if f1.health > 10:
i = 0
else:
i = 1
f2.what_hit(i)
f1.get_hit()
else:
if f2.health > 10:
i = 0
else:
i = 1
f1.what_hit(i)
f2.get_hit()
def fighting(self, b1, b2): # метод класса, который описывает сам бой, выводя информацию о каждом, нанесённом ударе
r = 0
while (b1.health and b2.health) > 0:
r += 1
print(r, " удар")
self.who_will_hit(b1, b2)
print("_____________________________________________________________________________")
if b1.health <= 0: # условие при котором определяется победитель
b2.get_win()
elif (b1.health==0 and b2.health ==0):
print("Победила дружба")
else:
b1.get_win()
class Menu(): #класс, который описывает функционал, доступный рядовому пользователю
def what_prefer(self): #метод, предоставляющий выбор поединка пользователю
i= input("Добрый день, дамы и господа!\n Рады вам предстваить 3 поединка между каратистами и боксерами на выбор(введите понравившуюся цифру):\n"
"1. Пошлый Уил Vs Вездесущий Си\n2. Геракл Vs Киоши\n3. БЫчий Дюк Vs Вертлявая Задира\n")
return i
def choose(self, i): # метод, отвечающий за проведение боя
if i == 1:
f1 = Boxer("Пошлый Уил", "43", "Омерика", "157кг", "Чемпион штата")
f2 = Karateka("Вездесущий Си", "39", "Тайвань", "89кг", "Блэк")
f1.inf0()
f2.inf0()
elif i == 2:
f1 = Boxer("Геракл", "15", "Греция", "65кг", "Чемпион школы")
f2 = Karateka("Киоши", "13", "Япония", "49кг", "Белоснежный")
f1.inf0()
f2.inf0()
else:
f1 = Boxer("Бычий Дюк", "23", "Хорватия", "111кг", "Чемпион мира")
f2 = Karateka("Вертлявая Задира", "Всегда 15", "Россия", "Спрашивать у дамы не прилично", "Подходит под сумочку")
f1.inf0()
f2.inf0()
c=Fight()
c.fighting(f1, f2)
def main():
game = Menu()
game.choose(int(game.what_prefer()))
main()
| [
"kirillmcarov@gmail.com"
] | kirillmcarov@gmail.com |
c7d8f13bd8fb9ab354250cbb8f69282bb7f5d574 | 8362a53892f45a1a7adcca7da5cd6827bd5c55fd | /tests/test_database.py | 89f622e5642f98b20ec639311a2fc9d55c641d1c | [
"MIT"
] | permissive | accent-starlette/starlette-core | 1a414969ae05ba90c96f184a206c0eb97c1d33fc | 88e94be0cc65e457e32f2586a3c8860c6c08fca9 | refs/heads/master | 2022-01-27T07:57:50.570112 | 2022-01-04T16:39:26 | 2022-01-04T16:39:26 | 185,164,201 | 13 | 7 | MIT | 2021-12-10T12:03:59 | 2019-05-06T09:19:57 | Python | UTF-8 | Python | false | false | 3,037 | py | import pytest
import sqlalchemy as sa
from starlette.exceptions import HTTPException
from starlette_core.database import Base, Session
class User(Base):
name = sa.Column(sa.String(50))
def test_database(db):
# connects ok
db.engine.connect()
# can create tables
db.create_all()
assert "user" in db.engine.table_names()
# can drop tables
db.drop_all()
assert [] == db.engine.table_names()
def test_database__truncate_of_db(db):
db.create_all()
user = User(name="bill")
user.save()
assert User.query.count() == 1
db.truncate_all(force=True)
assert User.query.count() == 0
def test_session(db):
db.create_all()
# basic session usage
user = User(name="bill")
session = Session()
session.add(user)
session.commit()
session.close()
def test_declarative_base__save(db):
db.create_all()
user = User(name="ted")
user.save()
assert User.query.get(user.id) == user
def test_declarative_base__delete(db):
db.create_all()
user = User(name="ted")
user.save()
user.delete()
assert User.query.get(user.id) is None
def test_declarative_base__refresh_from_db(db):
db.create_all()
user = User(name="ted")
user.save()
user.name = "sam"
user.refresh_from_db()
assert user.name == "ted"
def test_declarative_base__can_be_deleted(db):
class OrderA(Base):
user_id = sa.Column(sa.Integer, sa.ForeignKey(User.id))
class OrderB(Base):
user_id = sa.Column(
sa.Integer, sa.ForeignKey(User.id, ondelete="SET NULL"), nullable=True
)
class OrderC(Base):
user_id = sa.Column(sa.Integer, sa.ForeignKey(User.id, ondelete="CASCADE"))
class OrderD(Base):
user_id = sa.Column(sa.Integer, sa.ForeignKey(User.id, ondelete="RESTRICT"))
db.create_all()
user = User(name="ted")
user.save()
assert user.can_be_deleted()
# default
order = OrderA(user_id=user.id)
order.save()
assert not user.can_be_deleted()
order.delete()
assert user.can_be_deleted()
# set null
order = OrderB(user_id=user.id)
order.save()
assert user.can_be_deleted()
# cascade
order = OrderC(user_id=user.id)
order.save()
assert user.can_be_deleted()
# restrict
order = OrderD(user_id=user.id)
order.save()
assert not user.can_be_deleted()
order.delete()
assert user.can_be_deleted()
def test_declarative_base__repr(db):
db.create_all()
user = User()
assert user.__tablename__ == "user"
assert repr(user) == f"<User, id={user.id}>"
assert str(user) == f"<User, id={user.id}>"
def test_declarative_base__query(db):
db.create_all()
user = User(name="ted")
user.save()
# get_or_404
assert User.query.get_or_404(user.id) == user
# get_or_404 raises http exception when no result found
with pytest.raises(HTTPException) as e:
User.query.get_or_404(1000)
assert e.value.status_code == 404
| [
"stuart@accentdesign.co.uk"
] | stuart@accentdesign.co.uk |
1d6af3af9fa41162b76ba04790d68e5e149b3219 | 2ca07aecfa6ff25b0baae6dc9a707a284c2d1b6d | /trustzone_images/apps/bsp/build/scripts/genuses.py | 44dde7dfd37d5c023ae14fb6e8d49ccd9fafb72d | [] | no_license | zhilangtaosha/msm8996-wp-1-0_test_device | ef05af263ba7955263ff91eb81d45b2437bc492e | 6af9b44abbc4a367a9aaae26707079974c535f08 | refs/heads/master | 2023-03-19T02:42:09.581740 | 2021-02-21T01:20:19 | 2021-02-21T01:20:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,954 | py | #===============================================================================
#
# genuses
#
# GENERAL DESCRIPTION
# Generates USES_FLAGS imformation from DATA file generate from build/ms.
#
# Copyright (c) 2009-2010 by Qualcomm Technologies, Incorporated.
# All Rights Reserved.
# QUALCOMM Proprietary/GTDR
#
#-------------------------------------------------------------------------------
#
# $Header: //components/rel/apps.tz/1.0.6/bsp/build/scripts/genuses.py#1 $
# $DateTime: 2016/12/02 01:50:16 $
# $Author: pwbldsvc $
# $Change: 11897059 $
# EDIT HISTORY FOR FILE
#
# This section contains comments describing changes made to the module.
# Notice that changes are listed in reverse chronological order.
#
# when who what, where, why
# -------- --- ---------------------------------------------------------
# 04/02/10 sk Created
#
#===============================================================================
import os
import subprocess
import string
import sys
import re, string, os
from array import array
from optparse import OptionParser
from datetime import datetime
#===============================================================================
# parse_args
# parse command line arguments
#===============================================================================
def parse_args():
usage = "usage: %prog [options]"
version = "%prog 1.0"
parser = OptionParser(usage=usage, version=version)
parser.add_option("-f", "--datfile", dest="dat_filename",
help="Read preprocess data from FILE", metavar="FILE")
parser.add_option("-o", "--outfile", dest="output_filename",
help="Write output to FILE", metavar="FILE")
parser.add_option("-v", "--verbose",
action="store_true", dest="verbose", default=False,
help="print status messages to stdout")
(options, args) = parser.parse_args()
if options.dat_filename is None:
parser.error("--datfile option must be defined")
sys.exit(2)
if options.output_filename is None:
parser.error("--outfile option must be defined")
sys.exit(2)
return (options, args)
#===============================================================================
# create_file_banner
# creates a string that can be use as a banner for auto generated files
#===============================================================================
def create_file_banner(fname, description="None", start_comment="#",
end_comment="", start_block="", end_block="", style='none'):
banner_str = \
'''$SB$SCM============================================================================$ECM
$SCM Name: $ECM
$SCM $FILE_NAME $ECM
$SCM
$SCM Description: $ECM
$SCM $DESCRIPTION $ECM
$SCM $ECM
$SCM Copyright (c) $YEAR by QUALCOMM, Incorporated. All Rights Reserved. $ECM
$SCM============================================================================$ECM
$SCM $ECM
$SCM *** AUTO GENERATED FILE - DO NOT EDIT $ECM
$SCM $ECM
$SCM GENERATED: $DATE $ECM
$SCM============================================================================$ECM$EB
'''
if style == 'C':
start_comment = "#"
end_comment = ""
start_block = "/*\n"
end_block = "\n*/"
elif style == 'C++':
start_comment = "//"
end_comment = ""
start_block = ""
end_block = ""
elif style == 'asm':
start_comment = ";"
end_comment = ""
start_block = ""
end_block = ""
elif style == 'make' or style == 'shell':
start_comment = "#"
end_comment = ""
start_block = ""
end_block = ""
elif style == 'dos':
start_comment = "REM "
end_comment = ""
start_block = ""
end_block = ""
banner_str = banner_str.replace('$SCM', start_comment)
banner_str = banner_str.replace('$ECM', end_comment)
banner_str = banner_str.replace('$SB', start_block)
banner_str = banner_str.replace('$EB', end_block)
banner_str = banner_str.replace('$YEAR', str(datetime.now().strftime('%Y')))
banner_str = banner_str.replace('$DATE', str(datetime.now().ctime()))
banner_str = banner_str.replace('$FILE_NAME', fname)
banner_str = banner_str.replace('$DESCRIPTION', description)
return banner_str
def CleanLine(aLine):
aLine = aLine.replace('(','{')
aLine = aLine.replace(')','}')
aLine = aLine.replace('\n','')
aLine = aLine.replace(':=','=')
aLine = aLine.replace('?=','=')
return aLine
def CleanVarName(aVarname):
aVarname = aVarname.replace('.', '_')
aVarname = aVarname.replace('export', '')
aVarname = aVarname.replace('define', '')
aVarname = re.sub('\s', '', aVarname) #get rid of whitespaces
return aVarname
def CleanVarValue(aVarvalue):
aVarvalue = aVarvalue.strip()
return aVarvalue
def WriteData (options, file_handle, data, new_line="\n"):
file_handle.write(data + new_line)
if options.verbose:
print data
def main():
# get args from cmd line
(options, args) = parse_args()
uses = "USES"
lines = open(options.dat_filename, 'r').readlines()
total = ""
banner = create_file_banner(os.path.split(options.output_filename)[1])
out_file = open(options.output_filename, 'w')
WriteData(options, out_file, banner, new_line="")
WriteData(options, out_file, "def exists(env):")
WriteData(options, out_file, " return env.Detect('usesflags')")
WriteData(options, out_file, "")
WriteData(options, out_file, "def generate(env):")
VarNameDict = {}
#count = 0
for line in lines:
line = line.lstrip()
if line.find(uses, 0, 4)>-1:
line = CleanLine(line)
tempstr = line.split("=")
VarName = tempstr[0]
VarName = CleanVarName(VarName)
VarValue = tempstr[1]
VarValue = CleanVarValue(VarValue)
if VarValue == "yes":
vUsesFlag = True
else:
vUsesFlag = False
if vUsesFlag == True:
VarNameDict[VarName] = True
# sort keys and write file
#import pdb; pdb.set_trace()
uses_flags = sorted(VarNameDict.iterkeys())
for uflag in uses_flags:
WriteData(options, out_file, " env.Replace(%s = True)" % uflag)
WriteData(options, out_file, " env.Replace(USES_FLAGS = %s)" % str(uses_flags))
WriteData(options, out_file, " return None")
out_file.close()
#run
main() | [
"lonelyjskj@gmail.com"
] | lonelyjskj@gmail.com |
062417e25cc8f2274a2bd4eb74a493fd66b1ece8 | b59bb3bae76540ac1d2ca5f0d1b7fab5c4606d7e | /tutorial/quickstart/permission.py | 07da4a167e50c65920cab0b672ff2c7953c5ba8a | [] | no_license | Alllrox/backend | 0ad1b9c53c970434e7951db7235eb63b0c5071eb | 5868a0d6108c3118d7888dae17e6c89172dac48f | refs/heads/main | 2023-04-11T04:55:05.113563 | 2021-04-24T07:14:15 | 2021-04-24T07:14:15 | 361,079,786 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | from rest_framework import permissions
from tutorial.quickstart.models import Tweet
class IsAuthorOrReadOnly(permissions.IsAuthenticatedOrReadOnly):
def has_object_permission(self, request, view, obj: Tweet):
if request.method in permissions.SAFE_METHODS:
return True
return obj.author == request.user
| [
"rodionov.as@students.dvfu.ru"
] | rodionov.as@students.dvfu.ru |
bb3fb9eb21687447b680c05b829baec91643160f | b76ae361ab277923d0fed969b795074a1ecb400b | /project/RealDjango/venv/Scripts/django-admin.py | cfd7845dd7575e87f8a033bd3ad032b3f72ce470 | [] | no_license | RobotNo42/old_coed | 995df921e31d5a9b65f1609380235330edb546ad | 59f82e5d58965dd5c6340f4daf4ef43d1d311252 | refs/heads/master | 2021-07-18T00:07:33.450173 | 2020-06-16T13:51:11 | 2020-06-16T13:51:11 | 180,384,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 161 | py | #!D:\python\project\RealDjango\venv\Scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| [
"chengge1124@gmail.com"
] | chengge1124@gmail.com |
cadfb27d3e580c907f5b9d0002da72f1651d5bc7 | 5bec100877bd9c2e4b17f1c35dfc2c2ee98ae51d | /azure-iot-device/azure/iot/device/common/evented_callback.py | beea5941efbf6ec689374260f87c4370d4499417 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | taak77/azure-iot-sdk-python | 2cba813f20ec13f919ed4dfaecdc66afc0ca6bc8 | a20319d6dbd10463b2ba83b63fdccd389cef4552 | refs/heads/master | 2020-07-24T08:51:02.692696 | 2019-09-09T17:23:16 | 2019-09-09T17:23:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,496 | py | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import threading
import logging
import six
logger = logging.getLogger(__name__)
class EventedCallback(object):
"""
A sync callback whose completion can be waited upon.
"""
def __init__(self, return_arg_name=None):
"""
Creates an instance of an EventedCallback.
"""
# LBYL because this mistake doesn't cause an exception until the callback
# which is much later and very difficult to trace back to here.
if return_arg_name and not isinstance(return_arg_name, six.string_types):
raise TypeError("internal error: return_arg_name must be a string")
self.completion_event = threading.Event()
self.exception = None
self.result = None
def wrapping_callback(*args, **kwargs):
if "error" in kwargs and kwargs["error"]:
logger.error("Callback called with error {}".format(kwargs["error"]))
self.exception = kwargs["error"]
elif return_arg_name:
if return_arg_name in kwargs:
self.result = kwargs[return_arg_name]
else:
raise TypeError(
"internal error: excepected argument with name '{}', did not get".format(
return_arg_name
)
)
if self.exception:
logger.error(
"Callback completed with error {}".format(self.exception),
exc_info=self.exception,
)
else:
logger.info("Callback completed with result {}".format(self.result))
self.completion_event.set()
self.callback = wrapping_callback
def __call__(self, *args, **kwargs):
"""
Calls the callback.
"""
self.callback(*args, **kwargs)
def wait_for_completion(self, *args, **kwargs):
"""
Wait for the callback to be called, and return the results.
"""
self.completion_event.wait(*args, **kwargs)
if self.exception:
raise self.exception
else:
return self.result
| [
"bertk@microsoft.com"
] | bertk@microsoft.com |
a60bdb0bf993fb4b18f4786c28e0843c18323e08 | f00b409aa45e4eda11c6ad9ed1a4b522a8cac613 | /exe076.py | adfb0952bbbb78f4a7a95fafab5d4277f7bd0918 | [
"MIT"
] | permissive | evertondutra/Curso_em_Video_Python | 428d4b1451a308cac8be191ad3ad20dc63cacf51 | c44b0ca79d3a5f3d0db0f9a8b32a1ea210d07bba | refs/heads/master | 2022-10-04T23:17:34.679128 | 2020-06-05T03:46:04 | 2020-06-05T03:46:04 | 255,818,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 698 | py | """
Crie um programa que tenha uma tupla única com nomes
de produtos e seus respectivos preços, na sequencia.
No final uma listagem de preços, organizando os dados
em forma tabular.
"""
listagem = ('Lápis', 1.75,
'Borracha', 2,
'Caderno', 15.90,
'Estojo', 25,
'Transferidor', 4.20,
'Compasso', 9.99,
'Mochila', 120.32,
'Canetas', 22.30,
"Livro", 34.90)
print('-'*38)
print(f'{"LISTAGEM DE PREÇO":^38}')
print('-'*38)
for pos in range(0, len(listagem)):
if pos % 2 == 0:
print(f'{listagem[pos]:.<30}', end='')
if pos % 2 == 1:
print(f'R${listagem[pos]:>6.2f}')
print('-'*38) | [
"evertondutra02@gmail.com"
] | evertondutra02@gmail.com |
eb73286927ed427073080c8a740fe5eec2562aa2 | d7375d6de6a995d1052abb8443bf252c79edf915 | /meiduo_mall/meiduo_mall/apps/users/migrations/0004_user_default_address.py | 57a937c040dcecaad274d872943569a015c5ae0c | [] | no_license | liguozige/meiduo_29 | 9f87abd6dacbecf2cb19a8f6bf4023412f05b024 | 7ca160fd85dff282e1c72b0c9fff308479443e0b | refs/heads/master | 2020-03-21T00:23:13.262556 | 2018-07-07T10:30:33 | 2018-07-07T10:30:33 | 137,890,479 | 0 | 0 | null | 2018-07-07T10:30:34 | 2018-06-19T12:47:22 | HTML | UTF-8 | Python | false | false | 603 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-07-03 05:23
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('users', '0003_address'),
]
operations = [
migrations.AddField(
model_name='user',
name='default_address',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='users', to='users.Address', verbose_name='默认地址'),
),
]
| [
"lgl@163.com"
] | lgl@163.com |
5fd00c56070da70f6114da681544c544f52272e0 | 5ea279fcdc4ba18f4d7212d657cfe101185d2f22 | /libs/events/__init__.py | b1bb2920c5e13d862b2535bf80289d6971e53fd2 | [
"Apache-2.0"
] | permissive | FAF21/spoofcheckselftest | 76bb26bee1fa61774f7eb974345801cfbfbb2b73 | 316c435273edd3f8c90e83595767506817f65e0c | refs/heads/master | 2023-08-24T16:47:47.925899 | 2017-05-24T18:54:11 | 2017-05-24T18:54:11 | 422,992,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 47 | py | TASK_EVENTS = 'task_list'
TASK_ROUTING_KEY = '' | [
"alexdefreese@gmail.com"
] | alexdefreese@gmail.com |
d16ef364cf6106a88a1b28a9a96bdae89166f80c | 778a3e1e70b0b2782d2a35f8818bbe799e6c7396 | /Seventh_week_exersice/03Sum_prime_non_prime.py | def7d6757eba88c49c90e3f84af9077c2e5e6b72 | [] | no_license | skafev/Python_basics | 0088203207fe3960b26944e0940acaec40a8caaf | 8bfc1a8b0dad3bf829fffbd539cebe3688f75974 | refs/heads/main | 2023-06-10T11:25:27.468914 | 2021-07-01T15:28:12 | 2021-07-01T15:28:12 | 382,078,056 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | number = input()
not_prime = 0
prime = 0
while number != "stop":
number = int(number)
if number < 0:
print("Number is negative.")
elif number > 3:
if number % 2 == 0 or number % 3 == 0:
not_prime += number
else:
prime += number
else:
prime += number
number = input()
print(f"Sum of all prime numbers is: {prime}")
print(f"Sum of all non prime numbers is: {not_prime}") | [
"s.kafev@gmail.com"
] | s.kafev@gmail.com |
2c8269a6d5c4ddb8c4b445466174f74aecf370f6 | 857b051f99e8a42f94dd5895c7ac735e37867e94 | /hakkimizda/urls.py | 56836439053617eeb3e0ba317c7a1333be1e19df | [
"MIT"
] | permissive | kopuskopecik/projem | a88e4970ef23a4917e590e1a0a19ac7c49c86a73 | 738b0eeb2bf407b4ef54197cce1ce26ea67279c8 | refs/heads/master | 2021-06-22T10:04:44.523681 | 2020-12-25T19:56:10 | 2020-12-25T19:56:10 | 172,302,265 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | from django.urls import path
from django.conf.urls import url
from .views import *
app_name="hakkimizda"
urlpatterns = [
path('hakkimizda/', hakkimizda, name="hak"),
] | [
"kopuskopecik@gmail.com"
] | kopuskopecik@gmail.com |
11c178214cdb08fd06eb4056b44dfd4a76314ab8 | 8a61146cfb0dc80eb74f493d99b60ae0dfa26ec8 | /python/src/q_2_1.py | 00075249df73eb506b935ab3b6167aaedea58833 | [] | no_license | elliotCamblor/CTCI | 53adff9804c7552a45f5c5754a85c3e2c770190e | 03b57a6fa1e97fa635f09f1e8a48760cbf540b8c | refs/heads/master | 2021-01-20T07:07:31.801397 | 2016-08-09T05:21:51 | 2016-08-09T05:21:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 499 | py | from lib.HSLinkedList import Node
def removeDuplicates(head):
n = head
d = {}
p = None
while n:
if n.data in d:
p.next = p.next.next
else:
d[n.data] = True
p = n
n = n.next
if __name__ == "__main__":
n = Node(1)
add = n.appendToTail
add(1)
add(2)
add(3)
add(3)
add(4)
add(5)
add(5)
print(n)
removeDuplicates(n);
print(n)
assert(len(n) == 5)
print("pass")
| [
"hydersmh@gmail.com"
] | hydersmh@gmail.com |
d95985a14b17c478faf2a25852d0b0286636cace | ad9d4bf92a3af72bb0be4a899b58208359c3577a | /firebaseListener/FirebaseListener.py | e70ffaea25eee60d1bebee9b1f28a9094108e4c7 | [] | no_license | rebekkbb/Datacollector_app | e065a6eb705679c1612a2867abe757e385074b52 | fd6d4c099d9ed7fb0aae23a0f5a4018c5576b30f | refs/heads/master | 2022-12-12T00:39:11.570335 | 2020-09-16T14:36:35 | 2020-09-16T14:36:35 | 294,697,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 760 | py | import pyrebase
import time
import numpy
polarID= "75157825"
config = {
"apiKey": "APIkey",
"authDomain": "projectId.firebaseapp.com",
"databaseURL": "https://projectId.firebaseio.com/",
"storageBucket": "projectId.appspot.com"
}
arr=[]
file=open(polarID+"-rrs.txt",'a')
firebase=pyrebase.initialize_app(config)
db = firebase.database()
start=db.child(polarID).child("start").get()
print(start.val())
while(int(start.val())==1):
start=db.child(polarID).child("start").get()
data=db.child(polarID).child("rrs").get()
y=db.child(polarID).child("rrs").child("rr").get()
arr.append(data.val())
if int(start.val())==0:
break
for k in arr:
file.write(k['timestamp']+","+k['rr']+"\n")
| [
"noreply@github.com"
] | noreply@github.com |
bec64a7169611c133f6effb658d194136f903149 | feff273063b4c89bde3aa190b4e49c83ab1e5855 | /memphis/view/layout.py | 6a21cc666494b2107e8bc16e66c706a54a3bb83b | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | mcdonc/memphis | 7d53b8f77f7bab7c20a258a9ab33d1cc663711a2 | daef09507eacb32b235faf070a0146ffb5cf035f | refs/heads/master | 2016-09-05T23:04:01.578991 | 2011-10-11T03:37:43 | 2011-10-11T03:37:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,147 | py | """ layout implementation """
import sys, logging
from zope import interface
from pyramid.interfaces import IRequest, IRouteRequest
from memphis import config
from memphis.view.base import View
from memphis.view.formatter import format
from memphis.view.interfaces import ILayout
from memphis.view.customize import LayerWrapper
log = logging.getLogger('memphis.view')
def queryLayout(request, context, name=''):
""" query named layout for context """
while context is not None:
layout = config.registry.queryMultiAdapter(
(context, request), ILayout, name)
if layout is not None:
return layout
context = getattr(context, '__parent__', None)
return None
class Layout(View):
interface.implements(ILayout)
name = ''
template = None
view = None
viewcontext = None
@property
def __name__(self):
return self.name
def render(self, content, **kwargs):
if self.template is None:
return content
kwargs.update({'view': self,
'content': content,
'context': self.context,
'request': self.request,
'format': format})
return self.template(**kwargs)
def __call__(self, content, layout=None, view=None):
if view is not None:
self.view = view
self.viewcontext = getattr(view, 'context', self.context)
if layout is not None:
self.view = layout.view or self.view
self.viewcontext = layout.viewcontext or self.viewcontext
result = self.render(content, **(self.update() or {}))
if self.layout is None:
return result
parent = getattr(view, '__parent__', self.context)
if self.name != self.layout:
layout = queryLayout(self.request, parent, self.layout)
if layout is not None:
return layout(result, layout=self, view=view)
else:
if layout is not None:
context = layout.context
else:
context = self.context
parent = getattr(context, '__parent__', None)
if parent is not None:
layout = queryLayout(self.request, parent, self.layout)
if layout is not None:
return layout(result, view=view)
log.warning("Can't find parent layout: '%s'"%self.layout)
return self.render(result)
def registerLayout(
name='', context=None, parent='',
klass=Layout, template = None, route=None, layer=''):
if not klass or not issubclass(klass, Layout):
raise ValueError("klass has to inherit from Layout class")
discriminator = ('memphis.view:layout', name, context, route, layer)
info = config.DirectiveInfo()
info.attach(
config.Action(
LayerWrapper(registerLayoutImpl, discriminator),
(klass, name, context, template, parent, route),
discriminator = discriminator)
)
def registerLayoutImpl(klass, name, context, template, parent, route_name):
if klass in _registered:
raise ValueError("Class can't be reused for different layouts")
if not parent:
layout = None
elif parent == '.':
layout = ''
else:
layout = parent
# class attributes
cdict = {'name': name,
'layout': layout}
if template is not None:
cdict['template'] = template
if issubclass(klass, Layout) and klass is not Layout:
layout_class = klass
_registered.append(klass)
for attr, value in cdict.items():
setattr(layout_class, attr, value)
else:
layout_class = type(str('Layout<%s>'%name), (Layout,), cdict)
# register layout
request_iface = IRequest
if route_name is not None:
request_iface = config.registry.getUtility(IRouteRequest,name=route_name)
config.registry.registerAdapter(
layout_class, (context, request_iface), ILayout, name)
_registered = []
@config.addCleanup
def cleanUp():
_registered[:] = []
| [
"fafhrd91@gmail.com"
] | fafhrd91@gmail.com |
268448f85e803d703f627aecc5148a87e32cbe13 | 7ff04d4e819fd94cfbd8dd00d68e52801a6128a8 | /Hurricane/breaking_down_z_cal_from_matlab.py | c9b28d807e5173088f7c6aaf8c758a802751d3e0 | [] | no_license | Timryanlab/Python-Master | aed6e0de57cc073c243cdc06fd066928f795786b | 59c421821df1e08735a23358e04f4888f649d13d | refs/heads/Andrew | 2021-11-13T03:56:26.379086 | 2021-11-07T20:07:36 | 2021-11-07T20:07:36 | 205,262,840 | 0 | 0 | null | 2020-05-22T19:02:09 | 2019-08-29T22:47:28 | Python | UTF-8 | Python | false | false | 11,356 | py | # -*- coding: utf-8 -*-
"""
Title:
Concept:
Created on Thu May 28 15:06:51 2020
@author: Andrew Nelson
"""
#% Import Libraries
from ryan_image_io import *
from scipy.io import loadmat
import matplotlib.pyplot as plt
from localization_kernels import *
from mpl_toolkits.mplot3d import Axes3D
#% Functions
def simulate_psf_array(N = 100, pix = 5):
psf_image_array = np.zeros((2*pix+1,2*pix+1,N))
x_build = np.linspace(-pix,pix,2*pix +1)
X , Y = np.meshgrid(x_build, x_build)
truths = np.zeros((N,6))
loc1 = Localizations()
orange, red = loc1.get_sigma_curves()
loc1.split = 0
for i in range(N):
# Start by Determining your truths
truths[i,0] = np.random.uniform(-0.5, 0.5)
truths[i,1] = np.random.uniform(-0.5, 0.5)
truths[i,2] = np.random.uniform(1000, 3000)
ind = np.random.randint(0,orange.shape[1])
if truths[i,0] <= loc1.split:
truths[i,3] = orange[1,ind]
truths[i,4] = orange[2,ind]
else:
truths[i,3] = red[1,ind]
truths[i,4] = red[2,ind]
truths[i,3] += np.random.normal(0,0.001)
truths[i,4] += np.random.normal(0,0.001)
truths[i,5] = np.random.uniform(1, 3)
x_gauss = 0.5 * (erf( (X - truths[i,0] + 0.5) / (np.sqrt(2 * truths[i,3]**2))) - erf( (X - truths[i,0] - 0.5) / (np.sqrt(2 * truths[i,3]**2))))
y_gauss = 0.5 * (erf( (Y - truths[i,1] + 0.5) / (np.sqrt(2 * truths[i,4]**2))) - erf( (Y - truths[i,1] - 0.5) / (np.sqrt(2 * truths[i,4]**2))))
#print(np.round(truths[i,2]*x_gauss*y_gauss + truths[i,5]))
psf_image_array[:,:,i] = np.random.poisson(np.round(truths[i,2]*x_gauss*y_gauss + truths[i,5]))
return psf_image_array, truths
#%% Localization Class
class Localizations:
def __init__(self, pixel_size = 0.13):
self.xf = np.array([])
self.yf = np.array([])
self.zf = np.array([])
self.N = np.array([])
self.sx = np.array([])
self.sy = np.array([])
self.o = np.array([])
self.frames = np.array([])
self.pixel_size = pixel_size
self.xf_error = np.array([])
self.yf_error = np.array([])
self.sx_error = np.array([])
self.sy_error = np.array([])
self.cal_files = ['C:\\Users\\andre\\Documents\\GitHub\\Matlab-Master\\Hurricane\\hurricane_functions\\z_calib.mat', # axial calibration
'C:\\Users\\andre\\Documents\\GitHub\\Matlab-Master\\2-Channel Codes\\2_color_calibration.mat'] # 2 color calibration
self.store_calibration_values()
def show_localizations(self):
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(self.xf, self.yf, self.zf)
ax.set_xlabel('X um')
ax.set_ylabel('Y um')
ax.set_zlabel('Z um')
fig.show()
def show_axial_sigma_curve(self):
fig = plt.figure()
(ax1, ax2) = fig.subplots(1,2)
ax1.scatter(self.zf[self.color], self.sx[self.color], color = 'orange', alpha = 0.8)
ax1.scatter(self.zf[self.color], self.sy[self.color], color = 'blue', alpha = 0.8)
ax1.set_xlabel('Axial Position in um')
ax1.set_ylabel('Gaussian Width in um')
ax2.scatter(self.zf[~self.color], self.sx[~self.color], color = 'orange', alpha = 0.8)
ax2.scatter(self.zf[~self.color], self.sy[~self.color], color = 'blue', alpha = 0.8)
ax2.set_xlabel('Axial Position in um')
ax2.set_ylabel('Gaussian Width in um')
fig.show()
def store_fits(self, fitting_vectors, crlb_vectors, frames):
self.xf = self.pixel_size*(fitting_vectors[:,0])
self.yf = self.pixel_size*(fitting_vectors[:,1])
self.zf = np.empty_like(self.xf)
self.N = fitting_vectors[:,2]
self.sx = np.abs(self.pixel_size*fitting_vectors[:,3])
self.sy = np.abs(self.pixel_size*fitting_vectors[:,4])
self.o = fitting_vectors[:,5]
self.frames = frames
self.color = self.xf <= self.split # given the 2 color system we can use a boolean variable to relay color info
# False = Red channel True = Orange Channel
self.get_z_from_widths()
self.xf_error = self.pixel_size*crlb_vectors[:,0]**0.5
self.yf_error = self.pixel_size*crlb_vectors[:,1]**0.5
self.sx_error = self.pixel_size*crlb_vectors[:,3]**0.5
def get_z_from_widths(self):
# Depending on color, we should load either orange or red z params
x = np.linspace(-0.5,0.5,1000) # gives nanometer level resolution, well below actual resolution
# Build curve for orange calibration
xs = self.orange_z_calibration[0]
gx = self.orange_z_calibration[1]
dx = self.orange_z_calibration[2]
ax = self.orange_z_calibration[3]
bx = self.orange_z_calibration[4]
ys = self.orange_z_calibration[5]
gy = self.orange_z_calibration[6]
dy = self.orange_z_calibration[7]
ay = self.orange_z_calibration[8]
by = self.orange_z_calibration[9]
orange_sigma_x_curve = self.pixel_size*xs*(1 + ((x-gx)/dx)**2 + ax*((x-gx)/dx)**3 + bx*((x-gx)/dx)**4)**0.5
orange_sigma_y_curve = self.pixel_size*ys*(1 + ((x-gy)/dy)**2 + ay*((x-gy)/dy)**3 + by*((x-gy)/dy)**4)**0.5
'''
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(x, orange_sigma_x_curve)
ax.scatter(x, orange_sigma_y_curve)
ax.set_xlabel('Axial Position in um')
ax.set_ylabel('Sigma Width Position in um')
fig.show()
'''
# Repeat for red curves
xs = self.red_z_calibration[0]
gx = self.red_z_calibration[1]
dx = self.red_z_calibration[2]
ax = self.red_z_calibration[3]
bx = self.red_z_calibration[4]
ys = self.red_z_calibration[5]
gy = self.red_z_calibration[6]
dy = self.red_z_calibration[7]
ay = self.red_z_calibration[8]
by = self.red_z_calibration[9]
red_sigma_x_curve = self.pixel_size*xs*(1 + ((x-gx)/dx)**2 + ax*((x-gx)/dx)**3 + bx*((x-gx)/dx)**4)**0.5
red_sigma_y_curve = self.pixel_size*ys*(1 + ((x-gy)/dy)**2 + ay*((x-gy)/dy)**3 + by*((x-gy)/dy)**4)**0.5
del xs, gx, dx, ax, bx, ys, gy, dy, ay, by
for i in range(len(self.xf)):
if self.color[i]: # If molecule was found in the orange channel, use orange calibration parameters
D = ((self.sx[i]**0.5 - orange_sigma_x_curve**0.5)**2 +(self.sy[i]**0.5 - orange_sigma_y_curve**0.5)**2)**0.5
if ~np.isnan(D.min()):
index = np.argwhere(D == D.min())
self.zf[i] = x[index[0][0]]
else:
self.zf[i] = -0.501
if ~self.color[i]: # If molecule was found in the orange channel, use orange calibration parameters
D = ((self.sx[i]**0.5 - red_sigma_x_curve**0.5)**2 +(self.sy[i]**0.5 - red_sigma_y_curve**0.5)**2)**0.5
if ~np.isnan(D.min()):
index = np.argwhere(D == D.min())
self.zf[i] = -x[index[0][0]]
else:
self.zf[i] = -0.501
def get_sigma_curves(self):
# Depending on color, we should load either orange or red z params
x = np.linspace(-0.5,0.5,1000) # gives nanometer level resolution, well below actual resolution
# Build curve for orange calibration
xs = self.orange_z_calibration[0]
gx = self.orange_z_calibration[1]
dx = self.orange_z_calibration[2]
ax = self.orange_z_calibration[3]
bx = self.orange_z_calibration[4]
ys = self.orange_z_calibration[5]
gy = self.orange_z_calibration[6]
dy = self.orange_z_calibration[7]
ay = self.orange_z_calibration[8]
by = self.orange_z_calibration[9]
orange_sigma_x_curve = xs*(1 + ((x-gx)/dx)**2 + ax*((x-gx)/dx)**3 + bx*((x-gx)/dx)**4)**0.5
orange_sigma_y_curve = ys*(1 + ((x-gy)/dy)**2 + ay*((x-gy)/dy)**3 + by*((x-gy)/dy)**4)**0.5
'''
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(x, orange_sigma_x_curve)
ax.scatter(x, orange_sigma_y_curve)
ax.set_xlabel('Axial Position in um')
ax.set_ylabel('Sigma Width Position in um')
fig.show()
'''
# Repeat for red curves
xs = self.red_z_calibration[0]
gx = self.red_z_calibration[1]
dx = self.red_z_calibration[2]
ax = self.red_z_calibration[3]
bx = self.red_z_calibration[4]
ys = self.red_z_calibration[5]
gy = self.red_z_calibration[6]
dy = self.red_z_calibration[7]
ay = self.red_z_calibration[8]
by = self.red_z_calibration[9]
red_sigma_x_curve = xs*(1 + ((x-gx)/dx)**2 + ax*((x-gx)/dx)**3 + bx*((x-gx)/dx)**4)**0.5
red_sigma_y_curve = ys*(1 + ((x-gy)/dy)**2 + ay*((x-gy)/dy)**3 + by*((x-gy)/dy)**4)**0.5
return np.array([x, orange_sigma_x_curve, orange_sigma_y_curve]), np.array([x, red_sigma_x_curve, red_sigma_y_curve])
def store_calibration_values(self):
#Store axial Calibration file into memory
mat_dict = loadmat(self.cal_files[0])
orange = mat_dict['orange']
self.orange_z_calibration = orange[0][0][0][0]
self.orange_angle = orange[0][0][3][0][0]
self.orange_refraction_tilt = orange[0][0][1][0][0]
self.orange_x_tilt = orange[0][0][2][0][0][0][0]
self.orange_y_tilt = orange[0][0][2][0][0][1][0]
orange_z0_tilt = orange[0][0][2][0][0][2][0]
self.orange_z_tilt = orange_z0_tilt[1:] + np.mean(np.diff(orange_z0_tilt))/2
orange = mat_dict['red']
self.red_z_calibration = orange[0][0][0][0]
self.red_refraction_tilt = orange[0][0][1][0][0]
self.red_x_tilt = orange[0][0][2][0][0][0][0]
self.red_y_tilt = orange[0][0][2][0][0][1][0]
red_z0_tilt = orange[0][0][2][0][0][2][0]
self.red_angle = orange[0][0][3][0][0]
self.red_z_tilt = red_z0_tilt[1:] + np.mean(np.diff(red_z0_tilt))/2
# Story 2 color overlay information into memory
mat_dict = loadmat(self.cal_files[1])
self.orange_2_red_x_weights = mat_dict['o2rx'][:,0]
self.orange_2_red_y_weights = mat_dict['o2ry'][:,0]
self.split = mat_dict['split'][0][0]
#% Main Workspace
if __name__ == '__main__':
fpath = 'C:\\Users\\andre\\Documents\\GitHub\\Matlab-Master\\Hurricane\\hurricane_functions\\z_calib.mat'
loc1 = Localizations()
loc1.split = 0
psfs, truths = simulate_psf_array(1000)
fits = fit_psf_array_on_gpu(psfs)
fits[:,3:4] = np.abs(fits[:,3:4])
list_of_good_fits = remove_bad_fits(fits)
keep_vectors = fits[list_of_good_fits,:]
keep_psfs = psfs[:,:,list_of_good_fits]
crlb_vectors = get_error_values(keep_psfs, keep_vectors)
loc1.store_fits(keep_vectors, crlb_vectors, np.array(range(keep_vectors.shape[0])))
loc1.show_axial_sigma_curve()
| [
"ajn2004@med.cornell.edu"
] | ajn2004@med.cornell.edu |
222e8c2ba286b930f0faeef59dc4de48321308c7 | 684bc9502ddd1fdd117c499bf13775d7e8229d08 | /mapadroid/utils/token_dispenser.py | 84486012b8115e1328a8e37907a851e969a5bfdf | [] | no_license | JabLuszko/MAD | 9162633e9ebed9b2a6b992a24297256a5b959700 | 591fefa3ee1795f5994aec015e98503234289be7 | refs/heads/master | 2023-08-17T19:06:51.060746 | 2020-06-22T20:21:55 | 2020-06-22T20:21:55 | 170,873,917 | 0 | 0 | null | 2023-08-07T15:21:22 | 2019-02-15T14:02:23 | Python | UTF-8 | Python | false | false | 2,644 | py | import requests
import time
from mapadroid.utils.logging import get_logger, LoggerEnums
logger = get_logger(LoggerEnums.utils)
class TokenDispenser(requests.Session):
def __init__(self, host: str, retries: int = 3, sleep_timer: float = 1.0, timeout: float = 3.0):
# Create the session
super().__init__()
self.host = host
self.retries = retries
self.sleep_timer = sleep_timer
self.timeout = timeout
self.email = None
self.token = None
self.setup()
def prepare_request(self, request):
""" Override the class function to create the URL with the URI and any other processing required """
if request.url[0] == "/":
request.url = request.url[1:]
request.url = "%s/%s" % (self.host, request.url)
return super().prepare_request(request)
def send(self, request, **kwargs):
""" Override the class function to handle retries and specific error codes """
attempt = 0
finished = False
expected_code = 200
if "expected_code" in kwargs:
expected_code = kwargs['expected_code']
del kwargs['expected_code']
last_err = None
if "timeout" not in kwargs or ("timeout" in kwargs and kwargs["timeout"] is None):
kwargs["timeout"] = self.timeout
while not finished and attempt < self.retries:
try:
r = super().send(request, **kwargs)
if r.status_code == expected_code:
return r
else:
logger.debug('Invalid status code returned: {}', r.status_code)
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as err:
logger.warning(err)
last_err = err
except Exception as err:
logger.warning("Unknown exception, %s", str(err))
last_err = err
attempt += 1
if attempt < self.retries:
time.sleep(self.sleep_timer)
raise last_err
def setup(self) -> bool:
try:
self.email = self.get('email').text
if self.email is None:
return False
self.token = self.get('token/email/%s' % (self.email)).text
if self.token is None:
return False
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError):
logger.debug('Unable to use token-dispenser {}', self.host)
return False
return True
| [
"noreply@github.com"
] | noreply@github.com |
ee4b03b084880037f7dc2510f9f60d51b04f80d6 | 6a7f91725e7a64a63676402a85d8c3859030d5df | /Lec 9/1- count_letters_using_dict.py | 26420bc93264e5a43342c8e9e6f77c20a3070458 | [] | no_license | moabdelmoez/road_to_pythonista | 22a7601df361338ee38301f8dc5729c932e94754 | eacc4f2ecc1fd1ce9fe5f109f9d9048a83714782 | refs/heads/master | 2020-07-07T02:53:18.638849 | 2019-11-15T07:25:43 | 2019-11-15T07:25:43 | 203,222,933 | 7 | 3 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | word = 'brontosaurus'
d = dict()
for c in word:
if c not in d:
d[c] = 1
else:
d[c] = d[c] + 1
print(d)
| [
"noreply@github.com"
] | noreply@github.com |
21f7be6bda6c3cb5dd112d9a5bb84d861f39e9eb | 04d0914e3e2a7221db32e2ef12b656c3b20a6d11 | /blog/migrations/0001_initial.py | df8ac01b6a819cfe6187c5762fe923dd9e9da542 | [] | no_license | JydanX/my-first-blog | 8560d9c41c1de8322293fdc9e07c51bb161af9a8 | cdb7eebb6bf5c0213c3861e016724b150b12bb36 | refs/heads/master | 2023-01-20T11:56:47.260277 | 2020-11-26T06:31:19 | 2020-11-26T06:31:19 | 315,541,921 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 987 | py | # Generated by Django 2.2.17 on 2020-11-24 05:47
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Post',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('text', models.TextField()),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('published_date', models.DateTimeField(blank=True, null=True)),
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
]
| [
"jasonxing2140@gmail.com"
] | jasonxing2140@gmail.com |
c21d74a662d5db8b34c6793c5b0def3026ab0cfe | 8afb5afd38548c631f6f9536846039ef6cb297b9 | /_MY_ORGS/Web-Dev-Collaborative/blog-research/ciriculumn/week.18-/W18D2_lectures/08-posts/app/routes.py | 91d6b5ace00c8f67a076bc546d9f4e510c7630de | [
"MIT"
] | permissive | bgoonz/UsefulResourceRepo2.0 | d87588ffd668bb498f7787b896cc7b20d83ce0ad | 2cb4b45dd14a230aa0e800042e893f8dfb23beda | refs/heads/master | 2023-03-17T01:22:05.254751 | 2022-08-11T03:18:22 | 2022-08-11T03:18:22 | 382,628,698 | 10 | 12 | MIT | 2022-10-10T14:13:54 | 2021-07-03T13:58:52 | null | UTF-8 | Python | false | false | 809 | py | from flask import render_template, redirect
from app import app
from app.forms.login import LoginForm
@app.route('/')
def index():
return render_template('page.html', title='Welcome')
@app.route('/login', methods=['GET', 'POST'])
def login():
form = LoginForm()
if form.validate_on_submit():
return redirect('/')
return render_template('login.html', form=form)
@app.route('/help')
def help():
return render_template('page.html', title='Help')
@app.route('/item/<int:id>')
def item(id):
if (id > 0 and id < 100):
item = {
"id": id,
"name": f"Fancy Item {id}",
"description": "Coming soon!",
}
return render_template('item.html', item=item)
else:
return '<h1>Sample App</h1><h2>Item Not Found</h2>'
| [
"bryan.guner@gmail.com"
] | bryan.guner@gmail.com |
4da542b4aab2647d2231056c2fc19bba3a9d9e8f | b0cbfcd14bedb859794c5b290eefc8b451e05acb | /test.spec | eb77bf7d60ef956d01e2c74a7409be5fa6802be3 | [] | no_license | wangjiwang/QtDesign | 144e08ed0c3affa5a4763af59e8cad015c9e5054 | 4480df0c59af3baef20022ffacf62be292706c09 | refs/heads/master | 2020-11-24T13:42:52.208797 | 2019-12-15T11:37:53 | 2019-12-15T11:37:53 | 228,174,217 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 853 | spec | # -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['test.py'],
pathex=['G:/wjw', 'G:\\python\\QtDesign'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='test',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )
| [
"a24337111abd11"
] | a24337111abd11 |
02f9fb6821ca44f99f522c391849f128d0979395 | 5d86904b1858d91148f0880d5496223aec0cf2dd | /test_stubs/headunit-v2-buttondemo.py | bb41b7617d4ff6a0148dd001b3bc600116df8ea6 | [] | no_license | Grimmish/tdb2k | ca69b1e5fae265f0f4a2ef6d46b85a1418b71c51 | 42e87f24b0da31b61f4f14a98d1a51d8ae3cfe0a | refs/heads/master | 2020-04-02T03:24:35.985993 | 2019-10-06T22:55:41 | 2019-10-06T22:55:41 | 153,964,096 | 0 | 0 | null | 2019-09-15T15:44:17 | 2018-10-21T01:46:29 | C++ | UTF-8 | Python | false | false | 975 | py | #!/usr/bin/python
import sys
import time
from bens_rf24 import bens_rf24
from rf24_headunit import rf24_headunit
radio = bens_rf24(addr=0xE0E0E0E0E0, debug=False)
radio.set_rx_pipeline(chan=0, enable=1, addr=0xE0E0E0E0E0)
headunit = rf24_headunit(radio=radio, addr=0xE1E1E1E1E1)
headunit.radio.set_rx_mode() # Not really necessary; RX mode is default
print("Waiting forever... (use CTRL+C to break out)")
while True:
if headunit.radio.rx_dr():
print("Packet!")
packet = "".join(map(chr, headunit.radio.r_rx_payload()))
print(">> Payload: " + packet)
if packet[0] == 'B':
if packet[2] == '0':
# Release
headunit.display.floodColor('B')
else:
if packet[1] == '1':
headunit.display.floodColor('R')
if packet[1] == '2':
headunit.display.floodColor('G')
if packet[1] == '3':
headunit.display.floodColor('Y')
headunit.sendBuffer()
radio.destroy()
print("SPI closed")
| [
"noreply@github.com"
] | noreply@github.com |
eb439ef5321ace82cb57ceda8a14ba4f5978f5b8 | 52508ce70294ec29f84c9e551d8b92a7b402913d | /anyflow/flow.py | 647b6d25ed535d940110f411ddcc5ba175e061f2 | [
"MIT"
] | permissive | Cologler/anyflow-python | 0f18003a39cb645c24aa5549df4ee39173977fff | cde20b0c74faf18cb7dc503072d4c2f99d5681de | refs/heads/master | 2021-07-30T15:12:19.478682 | 2021-07-29T14:08:22 | 2021-07-29T14:08:22 | 241,824,800 | 0 | 0 | MIT | 2021-07-29T14:08:22 | 2020-02-20T07:53:25 | Python | UTF-8 | Python | false | false | 2,957 | py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2020~2999 - Cologler <skyoflw@gmail.com>
# ----------
#
# ----------
from typing import Callable, Any, List
from abc import ABC, abstractmethod
from .err import Abort
from .ctx import FlowContext
#Next = Callable[[], Any]
class MiddlewareInvoker:
__slots__ = ('_ctx', '_factorys')
def __init__(self, factorys: list, ctx: FlowContext):
super().__init__()
self._factorys = factorys
self._ctx = ctx
def invoke(self) -> Any:
if self._factorys:
return self.run_middleware(0)
def run_middleware(self, index) -> Any:
factory = self._factorys[index]
middleware = factory(self._ctx)
next = Next(self, index+1)
return middleware(self._ctx, next)
def has_next(self, next_index: int):
'return whether has the next middleware.'
return len(self._factorys) > next_index
class Next:
__slots__ = ('_invoker', '_next_index', '_retvals')
def __init__(self, invoker: MiddlewareInvoker, next_index: int):
super().__init__()
self._invoker = invoker
self._next_index = next_index
self._retvals = None
def __call__(self, or_value=None):
if not self._retvals:
if self._invoker.has_next(self._next_index):
rv = self._invoker.run_middleware(self._next_index)
else:
rv = or_value
self._retvals = (rv, )
return self._retvals[0]
@property
def is_nop(self):
return not self._invoker.has_next(self._next_index)
Middleware = Callable[[FlowContext, Next], Any]
MiddlewareFactory = Callable[[FlowContext], Middleware]
class Flow:
def __init__(self, *, ctx_cls=FlowContext, state: dict=None):
super().__init__()
if not issubclass(ctx_cls, FlowContext):
raise TypeError(f'excepted subclass of FlowContext, got {ctx_cls}')
self._ctx_cls = ctx_cls
self._factorys = []
self.suppress_abort = False
self._state = dict(state or ()) # make a clone
def run(self, state: dict=None):
ctx_state = self._state.copy()
ctx_state.update(state or ())
ctx = self._ctx_cls(ctx_state)
invoker = MiddlewareInvoker(self._factorys.copy(), ctx)
try:
return invoker.invoke()
except Abort:
if not self.suppress_abort:
raise
def use(self, middleware: Middleware=None):
'''
*this method can use as decorator.*
'''
if middleware is None:
return lambda m: self.use(m)
return self.use_factory(lambda _: middleware)
def use_factory(self, middleware_factory: MiddlewareFactory=None):
'''
*this method can use as decorator.*
'''
if middleware_factory is None:
return lambda mf: self.use_factory(mf)
self._factorys.append(middleware_factory)
| [
"skyoflw@gmail.com"
] | skyoflw@gmail.com |
f219a8dca76e8992ab90c17d8177628b7f9c7f7b | a9e871324db2d87cad0f2a736bd5acd622b639a5 | /aes-based/fitness.py | 6e8088f5210ff2ada5b2afbacfedcdd1f74fe41b | [] | no_license | ivicanikolicsg/metaheuristics | c053f67be6440697cedb64d6a732dcf8dfa0c220 | 658907e4c1b78d91a6f90e7971bc2d94400de03e | refs/heads/master | 2021-08-31T05:41:13.885098 | 2017-12-20T12:34:43 | 2017-12-20T12:34:43 | 114,865,822 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,925 | py | # Author: Ivica Nikolic (cube444@gmail.com)
from gurobipy import *
import random, copy
from parameters import params
from fitness_milpaes import *
############################################
# MILP parameters for the fitness function implemented in gurobi.
# OUTPUT_GUROBI can be set to output the gurobi output.
# USE_CORES is the number of cores gurobi will use to solve the model.
#
OUTPUT_GUROBI = 0
THREADS = 30
ROUNDS = 30 # max length the trail. can increase to more, but only when needed to double check that the result is correct
def fitness_function(message_masks, aes_masks, feedforward_masks):
nextvar = 0;
dummy = 0;
try:
model = Model('milp')
model.params.OutputFlag = OUTPUT_GUROBI
model.params.Threads = THREADS
sbox_inputs = LinExpr()
first_round_message = LinExpr()
# Set the initial state
state = []
for i in range(params.SIZE):
l2 = []
for j in range(4):
l = []
for k in range(4):
l.append( model.addVar(0.0, 1.0, 0.0, vtype=GRB.BINARY, name = "x"+str(nextvar)) )
nextvar += 1
l2.append(l)
state.append(l2)
model.update();
# No difference in the intial state
for l in range(params.SIZE):
for i in range(4):
for j in range(4):
model.addConstr(state[l][i][j] == 0)
# Go throught the rounds
for r_big in range(ROUNDS/params.DIFFERENT_ROUNDS):
for r_small in range(params.DIFFERENT_ROUNDS):
# Go one round (below temp is a temporary state)
# Apply the AES rounds according to the aes masks
temp = [ [[0] * 4 for st1 in range(4)] for st2 in range(params.SIZE) ]
for i in range(params.SIZE):
for j in range(4):
for k in range(4):
temp[(i+1)%params.SIZE][j][k] = state[i][j][k]
if aes_masks[r_small][i] :
nextvar,dummy = AES_ROUND(model, temp[(i+1)%params.SIZE], sbox_inputs, nextvar, dummy )
# Apply the XOR feedforward according to the masks
for i in range(params.SIZE):
if feedforward_masks[r_small][i] :
nextvar,dummy = State_XOR(model, temp[i], state[i], dummy, nextvar)
# XOR the message words according to the message masks
# First assign new variables for the message bytes
message_vars = [ [[0] * 4 for st1 in range(4)] for st2 in range(params.SIZE) ]
for i in range(params.SIZE):
used = 0
for j in range(params.SIZE):
if message_masks[r_small][j][i] :
used = 1
if used:
for j in range(4):
for k in range(4):
message_vars[i][j][k] = model.addVar(0.0, 1.0, 0.0, vtype=GRB.BINARY, name="x"+str(nextvar));
nextvar += 1
model.update();
# Xor the variables according to the masks
for i in range(params.SIZE): #For each word of the state
for j in range(params.SIZE): #For each message state
if message_masks[r_small][i][j] :
nextvar,dummy = State_XOR( model, temp[i], message_vars[j], dummy, nextvar );
if 0 == r_big :
for k in range(4):
for l in range(4):
first_round_message += message_vars[j][k][l] ;
# Store back from temp to state
for i in range(params.SIZE):
for j in range(4):
for k in range(4):
state[i][j][k] = temp[i][j][k]
#No difference in the state after all ROUNDS
for l in range(params.SIZE):
for i in range(4):
for j in range(4):
model.addConstr(state[l][i][j] == 0)
#At least one message byte in the first round has a difference
model.addConstr( first_round_message >= 1 )
# Set objective function
model.setObjective(sbox_inputs, GRB.MINIMIZE)
model.optimize()
return model.objVal
except GurobiError as e:
print('Error code ' + str(e.errno) + ' : ' + str(e))
return 0
return 0
| [
"iceman@r-163-123-25-172.comp.nus.edu.sg"
] | iceman@r-163-123-25-172.comp.nus.edu.sg |
e1ad09bf5d5b998196daedaaebd795995c4cb01a | a5cfa656caa38ccdb0661a8633502aae5ff352d3 | /definic/definic/possys/classes/backstage/inventory.py | 1d01351067fbd5e50d1379f28c7f222437417dd9 | [] | no_license | hueie/definic | b4a7cc620ce06aa1e60c26f5d65b7b2ce37d707b | 926598a11be21746b30ac8015bd0fc3c4e0f087e | refs/heads/master | 2020-12-30T23:47:52.368121 | 2017-05-18T07:41:47 | 2017-05-18T07:41:47 | 80,578,022 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,163 | py | # -*- coding: utf-8 -*-
import sys,os
'''
sys.path.append((os.path.sep).join( os.getcwd().split(os.path.sep)[0:-1]))
from common.dbhandler import DBHandler
'''
from ..common.dbhandler import DBHandler
from ..common.commonutil import CommonUtil
import datetime
import pandas as pd
class Inventory:
def __init__(self):
self.dbhandler = DBHandler()
def selectInventoryFromDB(self):
if(self.dbhandler.dbtype == "mysql"):
sql = "SELECT inv_id, in_out, from_to, inv_item_id, inv_expense, inv_quantity, inv_date FROM possys_inventory"
elif(self.dbhandler.dbtype == "sqlite3"):
sql = "SELECT inv_id, in_out, from_to, inv_item_id, inv_expense, inv_quantity, inv_date FROM possys_inventory"
return pd.read_sql(sql, self.dbhandler.conn)
def selectMaxInv_idFromDB(self):
if(self.dbhandler.dbtype == "mysql"):
sql = "SELECT MAX(inv_id) FROM possys_inventory"
elif(self.dbhandler.dbtype == "sqlite3"):
sql = "SELECT MAX(inv_id) FROM possys_inventory"
else:
pass
return pd.read_sql(sql, self.dbhandler.conn)
def insertInventoryToDB(self, pInv_id, pIn_out, pFrom_to, pInv_item_id, pInv_expense, pInv_quantity, pInv_date):
commonutil = CommonUtil()
if(self.dbhandler.dbtype == "mysql"):
sql = "INSERT INTO possys_inventory('in_out','from_to','inv_item_id','inv_expense','inv_quantity','inv_date') "
sql += " VALUES ( "
sql += "%s" % (pIn_out)
sql += ",'%s'" % (pFrom_to)
sql += ",'%s'" % (pInv_item_id)
sql += ",%s" % (pInv_expense)
sql += ",%s" % (pInv_quantity)
sql += ",'%s %s'" %( commonutil.getDate() , commonutil.getTime() )
sql += " )"
elif(self.dbhandler.dbtype == "sqlite3"):
sql = "INSERT INTO possys_inventory(inv_id, in_out, from_to, inv_item_id, inv_expense, inv_quantity, inv_date) "
sql += " VALUES ( "
sql += "%s" % (pInv_id)
sql += ",%s" % (pIn_out)
sql += ",'%s'" % (pFrom_to)
sql += ",'%s'" % (pInv_item_id)
sql += ",%s" % (pInv_expense)
sql += ",%s" % (pInv_quantity)
sql += ",'%s %s'" %( commonutil.getDate() , commonutil.getTime() )
sql += " )"
else:
pass
print(sql)
self.dbhandler.execSql(sql)
pass
def updateInventoryToDB(self,pInv_id, pIn_out,pFrom_to,pInv_item_id,pInv_expense,pInv_quantity,pInv_date):
commonutil = CommonUtil()
if(self.dbhandler.dbtype == "mysql"):
sql = " UPDATE possys_inventory SET "
sql += "in_out=%s" % (pIn_out)
sql += ",from_to='%s'" % (pFrom_to)
sql += ",inv_item_id='%s'" % (pInv_item_id)
sql += ",inv_expense=%s" % (pInv_expense)
sql += ",inv_quantity=%s" % (pInv_quantity)
sql += " WHERE inv_date LIKE '%s' " % (pInv_date)
elif(self.dbhandler.dbtype == "sqlite3"):
sql = "UPDATE possys_inventory SET "
sql += "inv_id = %s" % (pInv_id)
sql += ",in_out = %s" % (pIn_out)
sql += ",from_to = '%s'" % (pFrom_to)
sql += ",inv_item_id = '%s'" % (pInv_item_id)
sql += ",inv_expense = %s" % (pInv_expense)
sql += ",inv_quantity = %s" % (pInv_quantity)
sql += " WHERE inv_date LIKE '%s' " % (pInv_date)
else:
pass
self.dbhandler.execSql(sql)
pass
| [
"kait@kait-PC"
] | kait@kait-PC |
c3973679874c6bcb06a9d97d54f6965242f7ef53 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_143/388.py | 2c19f330a95780da7bb74471727f3b492214bb28 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 636 | py | import math
def solve(a, b, k):
count = 0
i = 0
while i < a:
j = 0
while j < b:
if (i & j) < k:
count += 1
j += 1
i += 1
return count
name = "B-small-attempt0"
fi = open(name + ".in", "r")
fout = open(name + ".out", "w")
numTestCases = int(fi.readline())
print "#TestCases: ", numTestCases
for i in range(0, numTestCases):
line = fi.readline().strip().split(" ")
a = int(line[0])
b = int(line[1])
k = int(line[2])
fout.write("Case #" + str(i + 1) + ": " + str(solve(a, b, k)) + "\n")
#print "Case #" + str(i + 1) + ": " + str(solve(a, b, k))
fi.close()
fout.close() | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
35440d203bf4710c94c9611765f2972097cb0802 | 7857b646da831f11059e9244b4f848f9ca541ccd | /tensorflow_save_restore_variable.py | 9297ccfeac0b39fb5c70f41ffcf714ed4db68276 | [] | no_license | gwlzhf/lhc_learning | 259622b7781c59384aba5f74f980ff1b5cb70c1a | 8476cfc01b58d96202ad6d12117aea1826e0f1c8 | refs/heads/master | 2021-06-06T01:12:55.676465 | 2020-01-07T07:45:24 | 2020-01-07T07:45:24 | 81,399,055 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,314 | py | import tensorflow as tf
'''
#Creat some varuable
v1 = tf.get_variable("v1",shape=[3],initializer = tf.zeros_initializer)
v2 = tf.get_variable("v2",shape=[5],initializer = tf.zeros_initializer)
inc_v1 = v1.assign(v1+1)
dec_v2 = v2.assign(v2-1)
#Add an op to initialize the variable
init_op = tf.global_variables_initializer()
#Add ops to save and restore all the variables.
saver = tf.train.Saver()
#Later, launch the model, initialize the variable,do some work and save the
#the variable to disk.
with tf.Session() as sess:
sess.run(init_op)
print(v1.eval())
print(v2.eval())
inc_v1.op.run()
dec_v2.op.run()
#Save the variable to disk
save_path = saver.save(sess,"/tmp/save.ckpt")
print("model saved in file %s" % save_path )
'''
#Restore
tf.reset_default_graph()
#creat the variale that you want to restore
v1 = tf.get_variable("v1", [3], initializer = tf.zeros_initializer)
v2 = tf.get_variable("v2", [5], initializer = tf.zeros_initializer)
#Add ops to retore variable
saver = tf.train.Saver([v2])
#use the saver object normally after that.
with tf.Session() as sess:
#v1.initializer.run()
#v2.initializer.run()
#initialize v1 since the saver will not
saver.restore(sess,"/tmp/save.ckpt")
#print("v1 : %s" %v1.eval())
print("v2 : %s" %v2.eval())
| [
"chencd520@gmail.com"
] | chencd520@gmail.com |
df878a5c3cc3aceb24500b864616b1cae36bd549 | 73bc927ae90563974cf72890ae8684d4ef6e09ac | /extract.py | 795b9031e39178494c4ea916744b7f8b1cb05a3b | [
"Apache-2.0"
] | permissive | InvokerLiu/DenseNet-Tensorflow | 912f5b0a02b1121240b580ac3b5c8e59caed40ff | 8e171eb3f14a46cc68cdebd3d4db92b1376af698 | refs/heads/master | 2020-05-19T19:43:30.329584 | 2019-05-09T07:04:07 | 2019-05-09T07:04:07 | 185,186,982 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,738 | py | #! /usr/bin/env python3
# coding=utf-8
# ================================================================
#
# Editor : PyCharm
# File name : extract.py
# Author : LiuBo
# Created date: 2019-05-09 09:52
# Description :
#
# ================================================================
from nets.DenseNet56 import DenseNet56
from nets.DenseNet48 import DenseNet48
from nets.DenseNet40 import DenseNet40
from nets.DenseNet32 import DenseNet32
from nets.DenseNet24 import DenseNet24
from nets.DenseNet16 import DenseNet16
from nets.DenseNet8 import DenseNet8
from Utils.FeatureExtractor import FeatureExtractor
import numpy
if __name__ == "__main__":
segmentation_scale = 90
input_size = 40
object_id = 31936
model = DenseNet40(train_summary_dir="summary/train/" + str(input_size),
test_summary_dir="summary/test/" + str(input_size), training=False)
original_file = "D:/DoLab/Research/Data/WV/WV10400.jpg"
window_set_file = "WindowSet/WV/" + str(segmentation_scale) + "/WindowSet" + str(input_size) + "Percent.txt"
result_file = "features/WV/" + str(segmentation_scale) + "/meanFeatures" + str(input_size) + ".txt"
checkpoint = "checkpoint/" + str(input_size)
deep_features_file = "features/WV/" + str(segmentation_scale) + "/" + \
str(object_id) + "_" + str(input_size) + ".tif"
aggregation_function = numpy.mean
extractor = FeatureExtractor(model)
extractor.extract_object_features_by_id(window_set_file, deep_features_file, checkpoint, original_file, object_id)
# extractor.extract_features(window_set_file, result_file, checkpoint, original_file, aggregation_function)
| [
"noreply@github.com"
] | noreply@github.com |
11d0cd4a97ec3088ce6ea22bcde16728a52f69b2 | 90519d2dbf8d1132b1b5cd42c041a18b1d1405b2 | /task1/sales.py | a3b1beecf88f09d9a3e6945dc7b81e6f0feea71f | [] | no_license | RivalLogorithm/shopx | 4391b4714ddcf090b4122e911a91d2bae9a7bbc4 | 558edea6049359b63fe0efa019370cedd6ab6214 | refs/heads/main | 2023-03-04T03:14:27.580466 | 2021-02-17T16:37:47 | 2021-02-17T16:37:47 | 339,390,594 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 645 | py | import random
class Sale:
def __init__(self):
self.sale = 0
def __get__(self, instance, owner):
if 0 < instance.points < 100:
self.sale = 0.01
elif 100 <= instance.points < 200:
self.sale = 0.03
elif 200 <= instance.points < 500:
self.sale = 0.05
elif instance.points >= 500:
self.sale = 0.1
return self.sale
class Points:
sale = Sale()
def __init__(self, points):
self.points = points
if __name__ == '__main__':
automate = Points(random.randint(0, 1000))
price = 1000 - 1000 * automate.sale
print(price)
| [
"sharshatov99@mail.ru"
] | sharshatov99@mail.ru |
1f072c221a7339282e310371d4855ddbc391c020 | e9ee62bfb91ef646af8aae63048af0eff53e8df4 | /tools/create_block_bps.py | 51e24d34814469f0f9b6bf344bd5827bc5ce8f38 | [] | no_license | enenra/aqdse | 869d32e2f4650d5a759aa466c9fcc6224a7b95af | 3bbc93d3ef31927a1685f59bb17552d1a87e97c2 | refs/heads/master | 2023-08-05T22:17:42.918673 | 2023-07-22T08:05:33 | 2023-07-22T08:05:33 | 143,330,299 | 14 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,871 | py | import os
import xml.etree.ElementTree as ET
import xml.dom.minidom
def main():
blocks = []
files = []
src = os.path.join(os.path.dirname(__file__), 'Data')
for r, d, f in os.walk(src):
for file in f:
if '.sbc' in file:
files.append(os.path.join(r, file))
for filename in files:
with open(os.path.join(src, filename), 'r') as f:
lines = f.read()
f.close()
if lines.find("<CubeBlocks>") == -1:
continue
while lines.find("<Definition") != -1:
blocks.append(get_info(lines))
lines = lines[lines.find("</Definition>") + len("</Definition>"):]
defs = ET.Element('Definitions')
defs.set('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance')
defs.set('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema')
bpce = ET.SubElement(defs, 'BlueprintClassEntries')
for b in blocks:
entry = ET.SubElement(bpce, 'Entry')
if b[2] == "Large":
entry.set('Class', "LargeBlocks")
else:
entry.set('Class', "SmallBlocks")
entry.set('BlueprintSubtypeId', b[0] + '/' + b[1])
temp_string = ET.tostring(defs, 'utf-8')
temp_string.decode('ascii')
xml_string = xml.dom.minidom.parseString(temp_string)
xml_formatted = xml_string.toprettyxml()
target_file = os.path.join(src, "BlueprintClassEntries.sbc")
exported_xml = open(target_file, "w")
exported_xml.write(xml_formatted)
return
def get_info(lines):
return [get_tag_content(lines, "TypeId"), get_tag_content(lines, "SubtypeId"), get_tag_content(lines, "CubeSize")]
def get_tag_content(lines, tag):
content = lines[lines.find('<' + tag + '>') + len('<' + tag + '>'):]
content = content[:content.find('</' + tag + '>')]
return content
if __name__ == '__main__':
main() | [
"enenra9@gmail.com"
] | enenra9@gmail.com |
7802de979825f36c48ce9a8e2ca81d2e8c4362d3 | de8b39b99d257655cd0a19a59980b188e1212c72 | /bichoMineiroOld/train.py | 4da8fa6a664d7c607c4f85867af0f8731b6a7024 | [] | no_license | gabrielvasco/bichoMineiroUsingTensorFlow | 2dfa398417469e209d8a7a99cb8a116848a51808 | 7c7009e72361b34a3678a77eaaf0d80b3952bdeb | refs/heads/master | 2020-05-17T01:42:21.972884 | 2019-05-31T11:42:50 | 2019-05-31T11:42:50 | 183,418,223 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,339 | py | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 12 22:13:54 2018
@author: v3n0w
"""
import tensorflow as tf
import glob
import imageio
import numpy as np
ImagesTrain = glob.glob('SamplesTestView/Train/Images/*.png')
LabelsTrain = glob.glob('SamplesTestView/Train/Labels/*.png')
ImagesVal = glob.glob('SamplesTestView/Validation/Images/*.png')
LabelsVal = glob.glob('SamplesTestView/Validation/Labels/*.png')
print(ImagesTrain[37] + ' == '+ LabelsTrain[37])
print('This ^ should be the same.')
x_all_train = np.zeros((len(ImagesTrain), 256, 256, 3))
y_all_train = np.zeros((len(ImagesTrain), 256, 256, 1))
x_all_val = np.zeros((len(ImagesVal), 256, 256, 3))
y_all_val = np.zeros((len(ImagesVal), 256, 256, 1))
for i, imageFile in enumerate(ImagesTrain):
image = imageio.imread(imageFile)
image = np.reshape(image, (256, 256, 3))
image = image / 255.
label = imageio.imread(LabelsTrain[i])
label = np.reshape(label[:,:,0], (256, 256, 1))
label = label > 0.1
x_all_train[i, :,:,:] = image
y_all_train[i, :,:,:] = label
for i, imageFile in enumerate(ImagesVal):
image = imageio.imread(imageFile)
image = np.reshape(image, (256, 256, 3))
image = image / 255.
label = imageio.imread(LabelsVal[i])
label = np.reshape(label[:,:,0], (256, 256, 1))
label = label > 0.1
x_all_val[i, :,:,:] = image
y_all_val[i, :,:,:] = label
model = tf.keras.models.Sequential()
regu = tf.keras.regularizers.l2(0.000000)
inp = tf.keras.layers.Input((256, 256, 3))
net = tf.keras.layers.Conv2D(8, (3, 3), activation='relu', input_shape=(256, 256, 3), padding = 'same', kernel_regularizer=regu)(inp)
down_1 = tf.keras.layers.Conv2D(8, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.MaxPooling2D(pool_size=(2, 2))(down_1)
net = tf.keras.layers.Conv2D(16, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
down_2 = tf.keras.layers.Conv2D(16, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.MaxPooling2D(pool_size=(2, 2))(down_2)
net = tf.keras.layers.Conv2D(32, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
down_3 = tf.keras.layers.Conv2D(32, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.MaxPooling2D(pool_size=(2, 2))(down_3)
net = tf.keras.layers.Conv2D(64, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
down_4 = tf.keras.layers.Conv2D(64, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.MaxPooling2D(pool_size=(2, 2))(down_4)
net = tf.keras.layers.Conv2D(128, (3, 3), activation='relu', padding = 'same')(net)
net = tf.keras.layers.Conv2D(128, (3, 3), activation='relu', padding = 'same')(net)
net = tf.keras.layers.Conv2DTranspose(64, (3, 3), strides=(2, 2), padding='same', activation='relu', bias_initializer='zeros', kernel_regularizer=regu)(net)
net = tf.keras.layers.Concatenate()([net, down_4])
net = tf.keras.layers.Conv2D(64, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.Conv2D(64, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.Conv2DTranspose(32, (3, 3), strides=(2, 2), padding='same', activation='relu', bias_initializer='zeros', kernel_regularizer=regu)(net)
net = tf.keras.layers.Concatenate()([net, down_3])
net = tf.keras.layers.Conv2D(32, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.Conv2D(32, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.Conv2DTranspose(16, (3, 3), strides=(2, 2), padding='same', activation='relu', bias_initializer='zeros', kernel_regularizer=regu)(net)
net = tf.keras.layers.Concatenate()([net, down_2])
net = tf.keras.layers.Conv2D(16, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.Conv2D(16, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.Conv2DTranspose(8, (3, 3), strides=(2, 2), padding='same', activation='relu', bias_initializer='zeros', kernel_regularizer=regu)(net)
net = tf.keras.layers.Concatenate()([net, down_1])
net = tf.keras.layers.Conv2D(8, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.Conv2D(8, (3, 3), activation='relu', padding = 'same', kernel_regularizer=regu)(net)
net = tf.keras.layers.Conv2D(1, (3, 3), activation='sigmoid', padding = 'same', bias_initializer='zeros')(net)
inp_mask = tf.keras.layers.Input((256, 256, 1))
net = tf.keras.layers.Multiply()([net, inp_mask])
model = tf.keras.models.Model(inputs=[inp, inp_mask], outputs = net)
model.compile(loss='binary_crossentropy', optimizer='adam')
train_x = x_all_train
val_x = x_all_val
train_y = y_all_train
val_y = y_all_val
epochs = 300
n = 30
x = 0
test_mask_train = np.ones((train_x.shape[0], 256, 256, 1))
test_mask_val = np.ones((val_x.shape[0], 256, 256, 1))
max_acc_val = - np.inf
for i in range(epochs):
print('Starting Epoch %d' %(i))
loss_pblock = (np.random.rand(train_x.shape[0], 16, 16, 1) > 0.).astype(np.float)
loss_weights = np.zeros((train_x.shape[0], 256, 256, 1))
from skimage.transform import resize
for j in range(train_x.shape[0]):
loss_weights[j,...] = resize(loss_pblock[j, ...], (256, 256), mode='reflect', order = 0)
train_y_m = train_y * loss_weights
model.fit([train_x, loss_weights], train_y_m, 10, 1, shuffle=True)
train_pred = model.predict([train_x, test_mask_train])
train_acc = np.mean(np.isclose(np.round(train_pred), train_y))
val_pred = model.predict([val_x, test_mask_val])
val_acc = np.mean(np.isclose(np.round(val_pred), val_y))
x = x + 1
if max_acc_val < val_acc:
print('Best val found!!')
model.save('model.h5')
max_acc_val = val_acc
x = 0
print('Train acc: %f, Val acc %f' %(train_acc, val_acc))
if (x == n) & (max_acc_val > val_acc):
print('Model did not improve for %d epochs' %(n))
print('Stopping training')
exit()
| [
"gabrielvasconcelos1996@hotmail.com"
] | gabrielvasconcelos1996@hotmail.com |
dc2c02201077734f0940b49833f87a4ddfed5f94 | 5a5752d756aceadf85eb351aabcd9da8ed6eabe6 | /Django-4/Learn_url_templates/Learn_url_templates/wsgi.py | 70c05c31ed85981d1a35ff553316ce505d9961af | [] | no_license | Shruti-2303/Django | 8a7c2e7db4f4b97d0e292d51cbe3b1743343f6b7 | efc713baf4caa614745a402e3c8b7906f6237ebb | refs/heads/master | 2023-06-01T05:03:53.952498 | 2021-07-08T05:24:12 | 2021-07-08T05:24:12 | 384,010,527 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 415 | py | """
WSGI config for Learn_url_templates project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Learn_url_templates.settings')
application = get_wsgi_application()
| [
"sharmas23032001@gmail.com"
] | sharmas23032001@gmail.com |
e4c272e583fe74fb6f44730d1592da92bcf8070e | 9c713425498c8366c47c3a4ce1a50c791c24572f | /src/controller/python/chip/clusters/CHIPClusters.py | 9c255daabb6ebae42433f892387b6697bde79631 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | krzysztofziobro/connectedhomeip | d17a754c88bf9a4703baf1bef222e34327042139 | f07ff95183d33af17bc833c92c64e7409c6fd2eb | refs/heads/master | 2023-07-17T22:46:22.035503 | 2021-08-28T16:08:30 | 2021-08-28T16:08:30 | 385,177,354 | 0 | 0 | Apache-2.0 | 2021-07-12T11:39:14 | 2021-07-12T08:28:33 | null | UTF-8 | Python | false | false | 487,956 | py | '''
/*
*
* Copyright (c) 2021 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS FILE IS GENERATED BY ZAP
'''
import ctypes
from chip.ChipStack import *
from chip.exceptions import *
__all__ = ["ChipClusters"]
class ChipClusters:
SUCCESS_DELEGATE = ctypes.CFUNCTYPE(None)
FAILURE_DELEGATE = ctypes.CFUNCTYPE(None, ctypes.c_uint8)
_ACCOUNT_LOGIN_CLUSTER_INFO = {
"clusterName": "AccountLogin",
"clusterId": 0x0000050E,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "GetSetupPIN",
"args": {
"tempAccountIdentifier": "str",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "Login",
"args": {
"tempAccountIdentifier": "str",
"setupPIN": "str",
},
},
},
"attributes": {
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_ADMINISTRATOR_COMMISSIONING_CLUSTER_INFO = {
"clusterName": "AdministratorCommissioning",
"clusterId": 0x0000003C,
"commands": {
0x00000001: {
"commandId": 0x00000001,
"commandName": "OpenBasicCommissioningWindow",
"args": {
"commissioningTimeout": "int",
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "OpenCommissioningWindow",
"args": {
"commissioningTimeout": "int",
"pAKEVerifier": "bytes",
"discriminator": "int",
"iterations": "int",
"salt": "bytes",
"passcodeID": "int",
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "RevokeCommissioning",
"args": {
},
},
},
"attributes": {
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_APPLICATION_BASIC_CLUSTER_INFO = {
"clusterName": "ApplicationBasic",
"clusterId": 0x0000050D,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "ChangeStatus",
"args": {
"status": "int",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "VendorName",
"attributeId": 0x00000000,
"type": "str",
},
0x00000001: {
"attributeName": "VendorId",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "ApplicationName",
"attributeId": 0x00000002,
"type": "str",
},
0x00000003: {
"attributeName": "ProductId",
"attributeId": 0x00000003,
"type": "int",
},
0x00000005: {
"attributeName": "ApplicationId",
"attributeId": 0x00000005,
"type": "str",
},
0x00000006: {
"attributeName": "CatalogVendorId",
"attributeId": 0x00000006,
"type": "int",
},
0x00000007: {
"attributeName": "ApplicationStatus",
"attributeId": 0x00000007,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_APPLICATION_LAUNCHER_CLUSTER_INFO = {
"clusterName": "ApplicationLauncher",
"clusterId": 0x0000050C,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "LaunchApp",
"args": {
"data": "str",
"catalogVendorId": "int",
"applicationId": "str",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "ApplicationLauncherList",
"attributeId": 0x00000000,
"type": "int",
},
0x00000001: {
"attributeName": "CatalogVendorId",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "ApplicationId",
"attributeId": 0x00000002,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_AUDIO_OUTPUT_CLUSTER_INFO = {
"clusterName": "AudioOutput",
"clusterId": 0x0000050B,
"commands": {
0x00000001: {
"commandId": 0x00000001,
"commandName": "RenameOutput",
"args": {
"index": "int",
"name": "str",
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "SelectOutput",
"args": {
"index": "int",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "AudioOutputList",
"attributeId": 0x00000000,
"type": "",
},
0x00000001: {
"attributeName": "CurrentAudioOutput",
"attributeId": 0x00000001,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_BARRIER_CONTROL_CLUSTER_INFO = {
"clusterName": "BarrierControl",
"clusterId": 0x00000103,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "BarrierControlGoToPercent",
"args": {
"percentOpen": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "BarrierControlStop",
"args": {
},
},
},
"attributes": {
0x00000001: {
"attributeName": "BarrierMovingState",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "BarrierSafetyStatus",
"attributeId": 0x00000002,
"type": "int",
},
0x00000003: {
"attributeName": "BarrierCapabilities",
"attributeId": 0x00000003,
"type": "int",
},
0x0000000A: {
"attributeName": "BarrierPosition",
"attributeId": 0x0000000A,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_BASIC_CLUSTER_INFO = {
"clusterName": "Basic",
"clusterId": 0x00000028,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "MfgSpecificPing",
"args": {
},
},
},
"attributes": {
0x00000000: {
"attributeName": "InteractionModelVersion",
"attributeId": 0x00000000,
"type": "int",
},
0x00000001: {
"attributeName": "VendorName",
"attributeId": 0x00000001,
"type": "str",
},
0x00000002: {
"attributeName": "VendorID",
"attributeId": 0x00000002,
"type": "int",
},
0x00000003: {
"attributeName": "ProductName",
"attributeId": 0x00000003,
"type": "str",
},
0x00000004: {
"attributeName": "ProductID",
"attributeId": 0x00000004,
"type": "int",
},
0x00000005: {
"attributeName": "UserLabel",
"attributeId": 0x00000005,
"type": "str",
"writable": True,
},
0x00000006: {
"attributeName": "Location",
"attributeId": 0x00000006,
"type": "str",
"writable": True,
},
0x00000007: {
"attributeName": "HardwareVersion",
"attributeId": 0x00000007,
"type": "int",
},
0x00000008: {
"attributeName": "HardwareVersionString",
"attributeId": 0x00000008,
"type": "str",
},
0x00000009: {
"attributeName": "SoftwareVersion",
"attributeId": 0x00000009,
"type": "int",
},
0x0000000A: {
"attributeName": "SoftwareVersionString",
"attributeId": 0x0000000A,
"type": "str",
},
0x0000000B: {
"attributeName": "ManufacturingDate",
"attributeId": 0x0000000B,
"type": "str",
},
0x0000000C: {
"attributeName": "PartNumber",
"attributeId": 0x0000000C,
"type": "str",
},
0x0000000D: {
"attributeName": "ProductURL",
"attributeId": 0x0000000D,
"type": "str",
},
0x0000000E: {
"attributeName": "ProductLabel",
"attributeId": 0x0000000E,
"type": "str",
},
0x0000000F: {
"attributeName": "SerialNumber",
"attributeId": 0x0000000F,
"type": "str",
},
0x00000010: {
"attributeName": "LocalConfigDisabled",
"attributeId": 0x00000010,
"type": "bool",
"writable": True,
},
0x00000011: {
"attributeName": "Reachable",
"attributeId": 0x00000011,
"type": "bool",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_BINARY_INPUT_BASIC_CLUSTER_INFO = {
"clusterName": "BinaryInputBasic",
"clusterId": 0x0000000F,
"commands": {
},
"attributes": {
0x00000051: {
"attributeName": "OutOfService",
"attributeId": 0x00000051,
"type": "bool",
"writable": True,
},
0x00000055: {
"attributeName": "PresentValue",
"attributeId": 0x00000055,
"type": "bool",
"reportable": True,
"writable": True,
},
0x0000006F: {
"attributeName": "StatusFlags",
"attributeId": 0x0000006F,
"type": "int",
"reportable": True,
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_BINDING_CLUSTER_INFO = {
"clusterName": "Binding",
"clusterId": 0x0000F000,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "Bind",
"args": {
"nodeId": "int",
"groupId": "int",
"endpointId": "int",
"clusterId": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "Unbind",
"args": {
"nodeId": "int",
"groupId": "int",
"endpointId": "int",
"clusterId": "int",
},
},
},
"attributes": {
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_BRIDGED_DEVICE_BASIC_CLUSTER_INFO = {
"clusterName": "BridgedDeviceBasic",
"clusterId": 0x00000039,
"commands": {
},
"attributes": {
0x00000001: {
"attributeName": "VendorName",
"attributeId": 0x00000001,
"type": "str",
},
0x00000002: {
"attributeName": "VendorID",
"attributeId": 0x00000002,
"type": "int",
},
0x00000003: {
"attributeName": "ProductName",
"attributeId": 0x00000003,
"type": "str",
},
0x00000005: {
"attributeName": "UserLabel",
"attributeId": 0x00000005,
"type": "str",
"writable": True,
},
0x00000007: {
"attributeName": "HardwareVersion",
"attributeId": 0x00000007,
"type": "int",
},
0x00000008: {
"attributeName": "HardwareVersionString",
"attributeId": 0x00000008,
"type": "str",
},
0x00000009: {
"attributeName": "SoftwareVersion",
"attributeId": 0x00000009,
"type": "int",
},
0x0000000A: {
"attributeName": "SoftwareVersionString",
"attributeId": 0x0000000A,
"type": "str",
},
0x0000000B: {
"attributeName": "ManufacturingDate",
"attributeId": 0x0000000B,
"type": "str",
},
0x0000000C: {
"attributeName": "PartNumber",
"attributeId": 0x0000000C,
"type": "str",
},
0x0000000D: {
"attributeName": "ProductURL",
"attributeId": 0x0000000D,
"type": "str",
},
0x0000000E: {
"attributeName": "ProductLabel",
"attributeId": 0x0000000E,
"type": "str",
},
0x0000000F: {
"attributeName": "SerialNumber",
"attributeId": 0x0000000F,
"type": "str",
},
0x00000011: {
"attributeName": "Reachable",
"attributeId": 0x00000011,
"type": "bool",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_COLOR_CONTROL_CLUSTER_INFO = {
"clusterName": "ColorControl",
"clusterId": 0x00000300,
"commands": {
0x00000044: {
"commandId": 0x00000044,
"commandName": "ColorLoopSet",
"args": {
"updateFlags": "int",
"action": "int",
"direction": "int",
"time": "int",
"startHue": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000041: {
"commandId": 0x00000041,
"commandName": "EnhancedMoveHue",
"args": {
"moveMode": "int",
"rate": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000040: {
"commandId": 0x00000040,
"commandName": "EnhancedMoveToHue",
"args": {
"enhancedHue": "int",
"direction": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000043: {
"commandId": 0x00000043,
"commandName": "EnhancedMoveToHueAndSaturation",
"args": {
"enhancedHue": "int",
"saturation": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000042: {
"commandId": 0x00000042,
"commandName": "EnhancedStepHue",
"args": {
"stepMode": "int",
"stepSize": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000008: {
"commandId": 0x00000008,
"commandName": "MoveColor",
"args": {
"rateX": "int",
"rateY": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x0000004B: {
"commandId": 0x0000004B,
"commandName": "MoveColorTemperature",
"args": {
"moveMode": "int",
"rate": "int",
"colorTemperatureMinimum": "int",
"colorTemperatureMaximum": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "MoveHue",
"args": {
"moveMode": "int",
"rate": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "MoveSaturation",
"args": {
"moveMode": "int",
"rate": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000007: {
"commandId": 0x00000007,
"commandName": "MoveToColor",
"args": {
"colorX": "int",
"colorY": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x0000000A: {
"commandId": 0x0000000A,
"commandName": "MoveToColorTemperature",
"args": {
"colorTemperature": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "MoveToHue",
"args": {
"hue": "int",
"direction": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000006: {
"commandId": 0x00000006,
"commandName": "MoveToHueAndSaturation",
"args": {
"hue": "int",
"saturation": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000003: {
"commandId": 0x00000003,
"commandName": "MoveToSaturation",
"args": {
"saturation": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000009: {
"commandId": 0x00000009,
"commandName": "StepColor",
"args": {
"stepX": "int",
"stepY": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x0000004C: {
"commandId": 0x0000004C,
"commandName": "StepColorTemperature",
"args": {
"stepMode": "int",
"stepSize": "int",
"transitionTime": "int",
"colorTemperatureMinimum": "int",
"colorTemperatureMaximum": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "StepHue",
"args": {
"stepMode": "int",
"stepSize": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000005: {
"commandId": 0x00000005,
"commandName": "StepSaturation",
"args": {
"stepMode": "int",
"stepSize": "int",
"transitionTime": "int",
"optionsMask": "int",
"optionsOverride": "int",
},
},
0x00000047: {
"commandId": 0x00000047,
"commandName": "StopMoveStep",
"args": {
"optionsMask": "int",
"optionsOverride": "int",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "CurrentHue",
"attributeId": 0x00000000,
"type": "int",
"reportable": True,
},
0x00000001: {
"attributeName": "CurrentSaturation",
"attributeId": 0x00000001,
"type": "int",
"reportable": True,
},
0x00000002: {
"attributeName": "RemainingTime",
"attributeId": 0x00000002,
"type": "int",
},
0x00000003: {
"attributeName": "CurrentX",
"attributeId": 0x00000003,
"type": "int",
"reportable": True,
},
0x00000004: {
"attributeName": "CurrentY",
"attributeId": 0x00000004,
"type": "int",
"reportable": True,
},
0x00000005: {
"attributeName": "DriftCompensation",
"attributeId": 0x00000005,
"type": "int",
},
0x00000006: {
"attributeName": "CompensationText",
"attributeId": 0x00000006,
"type": "str",
},
0x00000007: {
"attributeName": "ColorTemperature",
"attributeId": 0x00000007,
"type": "int",
"reportable": True,
},
0x00000008: {
"attributeName": "ColorMode",
"attributeId": 0x00000008,
"type": "int",
},
0x0000000F: {
"attributeName": "ColorControlOptions",
"attributeId": 0x0000000F,
"type": "int",
"writable": True,
},
0x00000010: {
"attributeName": "NumberOfPrimaries",
"attributeId": 0x00000010,
"type": "int",
},
0x00000011: {
"attributeName": "Primary1X",
"attributeId": 0x00000011,
"type": "int",
},
0x00000012: {
"attributeName": "Primary1Y",
"attributeId": 0x00000012,
"type": "int",
},
0x00000013: {
"attributeName": "Primary1Intensity",
"attributeId": 0x00000013,
"type": "int",
},
0x00000015: {
"attributeName": "Primary2X",
"attributeId": 0x00000015,
"type": "int",
},
0x00000016: {
"attributeName": "Primary2Y",
"attributeId": 0x00000016,
"type": "int",
},
0x00000017: {
"attributeName": "Primary2Intensity",
"attributeId": 0x00000017,
"type": "int",
},
0x00000019: {
"attributeName": "Primary3X",
"attributeId": 0x00000019,
"type": "int",
},
0x0000001A: {
"attributeName": "Primary3Y",
"attributeId": 0x0000001A,
"type": "int",
},
0x0000001B: {
"attributeName": "Primary3Intensity",
"attributeId": 0x0000001B,
"type": "int",
},
0x00000020: {
"attributeName": "Primary4X",
"attributeId": 0x00000020,
"type": "int",
},
0x00000021: {
"attributeName": "Primary4Y",
"attributeId": 0x00000021,
"type": "int",
},
0x00000022: {
"attributeName": "Primary4Intensity",
"attributeId": 0x00000022,
"type": "int",
},
0x00000024: {
"attributeName": "Primary5X",
"attributeId": 0x00000024,
"type": "int",
},
0x00000025: {
"attributeName": "Primary5Y",
"attributeId": 0x00000025,
"type": "int",
},
0x00000026: {
"attributeName": "Primary5Intensity",
"attributeId": 0x00000026,
"type": "int",
},
0x00000028: {
"attributeName": "Primary6X",
"attributeId": 0x00000028,
"type": "int",
},
0x00000029: {
"attributeName": "Primary6Y",
"attributeId": 0x00000029,
"type": "int",
},
0x0000002A: {
"attributeName": "Primary6Intensity",
"attributeId": 0x0000002A,
"type": "int",
},
0x00000030: {
"attributeName": "WhitePointX",
"attributeId": 0x00000030,
"type": "int",
"writable": True,
},
0x00000031: {
"attributeName": "WhitePointY",
"attributeId": 0x00000031,
"type": "int",
"writable": True,
},
0x00000032: {
"attributeName": "ColorPointRX",
"attributeId": 0x00000032,
"type": "int",
"writable": True,
},
0x00000033: {
"attributeName": "ColorPointRY",
"attributeId": 0x00000033,
"type": "int",
"writable": True,
},
0x00000034: {
"attributeName": "ColorPointRIntensity",
"attributeId": 0x00000034,
"type": "int",
"writable": True,
},
0x00000036: {
"attributeName": "ColorPointGX",
"attributeId": 0x00000036,
"type": "int",
"writable": True,
},
0x00000037: {
"attributeName": "ColorPointGY",
"attributeId": 0x00000037,
"type": "int",
"writable": True,
},
0x00000038: {
"attributeName": "ColorPointGIntensity",
"attributeId": 0x00000038,
"type": "int",
"writable": True,
},
0x0000003A: {
"attributeName": "ColorPointBX",
"attributeId": 0x0000003A,
"type": "int",
"writable": True,
},
0x0000003B: {
"attributeName": "ColorPointBY",
"attributeId": 0x0000003B,
"type": "int",
"writable": True,
},
0x0000003C: {
"attributeName": "ColorPointBIntensity",
"attributeId": 0x0000003C,
"type": "int",
"writable": True,
},
0x00004000: {
"attributeName": "EnhancedCurrentHue",
"attributeId": 0x00004000,
"type": "int",
},
0x00004001: {
"attributeName": "EnhancedColorMode",
"attributeId": 0x00004001,
"type": "int",
},
0x00004002: {
"attributeName": "ColorLoopActive",
"attributeId": 0x00004002,
"type": "int",
},
0x00004003: {
"attributeName": "ColorLoopDirection",
"attributeId": 0x00004003,
"type": "int",
},
0x00004004: {
"attributeName": "ColorLoopTime",
"attributeId": 0x00004004,
"type": "int",
},
0x00004005: {
"attributeName": "ColorLoopStartEnhancedHue",
"attributeId": 0x00004005,
"type": "int",
},
0x00004006: {
"attributeName": "ColorLoopStoredEnhancedHue",
"attributeId": 0x00004006,
"type": "int",
},
0x0000400A: {
"attributeName": "ColorCapabilities",
"attributeId": 0x0000400A,
"type": "int",
},
0x0000400B: {
"attributeName": "ColorTempPhysicalMin",
"attributeId": 0x0000400B,
"type": "int",
},
0x0000400C: {
"attributeName": "ColorTempPhysicalMax",
"attributeId": 0x0000400C,
"type": "int",
},
0x0000400D: {
"attributeName": "CoupleColorTempToLevelMinMireds",
"attributeId": 0x0000400D,
"type": "int",
},
0x00004010: {
"attributeName": "StartUpColorTemperatureMireds",
"attributeId": 0x00004010,
"type": "int",
"writable": True,
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_CONTENT_LAUNCHER_CLUSTER_INFO = {
"clusterName": "ContentLauncher",
"clusterId": 0x0000050A,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "LaunchContent",
"args": {
"autoPlay": "bool",
"data": "str",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "LaunchURL",
"args": {
"contentURL": "str",
"displayString": "str",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "AcceptsHeaderList",
"attributeId": 0x00000000,
"type": "bytes",
},
0x00000001: {
"attributeName": "SupportedStreamingTypes",
"attributeId": 0x00000001,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_DESCRIPTOR_CLUSTER_INFO = {
"clusterName": "Descriptor",
"clusterId": 0x0000001D,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "DeviceList",
"attributeId": 0x00000000,
"type": "",
},
0x00000001: {
"attributeName": "ServerList",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "ClientList",
"attributeId": 0x00000002,
"type": "int",
},
0x00000003: {
"attributeName": "PartsList",
"attributeId": 0x00000003,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_DIAGNOSTIC_LOGS_CLUSTER_INFO = {
"clusterName": "DiagnosticLogs",
"clusterId": 0x00000032,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "RetrieveLogsRequest",
"args": {
"intent": "int",
"requestedProtocol": "int",
"transferFileDesignator": "bytes",
},
},
},
"attributes": {
},
}
_DOOR_LOCK_CLUSTER_INFO = {
"clusterName": "DoorLock",
"clusterId": 0x00000101,
"commands": {
0x00000008: {
"commandId": 0x00000008,
"commandName": "ClearAllPins",
"args": {
},
},
0x00000019: {
"commandId": 0x00000019,
"commandName": "ClearAllRfids",
"args": {
},
},
0x00000013: {
"commandId": 0x00000013,
"commandName": "ClearHolidaySchedule",
"args": {
"scheduleId": "int",
},
},
0x00000007: {
"commandId": 0x00000007,
"commandName": "ClearPin",
"args": {
"userId": "int",
},
},
0x00000018: {
"commandId": 0x00000018,
"commandName": "ClearRfid",
"args": {
"userId": "int",
},
},
0x0000000D: {
"commandId": 0x0000000D,
"commandName": "ClearWeekdaySchedule",
"args": {
"scheduleId": "int",
"userId": "int",
},
},
0x00000010: {
"commandId": 0x00000010,
"commandName": "ClearYeardaySchedule",
"args": {
"scheduleId": "int",
"userId": "int",
},
},
0x00000012: {
"commandId": 0x00000012,
"commandName": "GetHolidaySchedule",
"args": {
"scheduleId": "int",
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "GetLogRecord",
"args": {
"logIndex": "int",
},
},
0x00000006: {
"commandId": 0x00000006,
"commandName": "GetPin",
"args": {
"userId": "int",
},
},
0x00000017: {
"commandId": 0x00000017,
"commandName": "GetRfid",
"args": {
"userId": "int",
},
},
0x00000015: {
"commandId": 0x00000015,
"commandName": "GetUserType",
"args": {
"userId": "int",
},
},
0x0000000C: {
"commandId": 0x0000000C,
"commandName": "GetWeekdaySchedule",
"args": {
"scheduleId": "int",
"userId": "int",
},
},
0x0000000F: {
"commandId": 0x0000000F,
"commandName": "GetYeardaySchedule",
"args": {
"scheduleId": "int",
"userId": "int",
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "LockDoor",
"args": {
"pin": "str",
},
},
0x00000011: {
"commandId": 0x00000011,
"commandName": "SetHolidaySchedule",
"args": {
"scheduleId": "int",
"localStartTime": "int",
"localEndTime": "int",
"operatingModeDuringHoliday": "int",
},
},
0x00000005: {
"commandId": 0x00000005,
"commandName": "SetPin",
"args": {
"userId": "int",
"userStatus": "int",
"userType": "int",
"pin": "str",
},
},
0x00000016: {
"commandId": 0x00000016,
"commandName": "SetRfid",
"args": {
"userId": "int",
"userStatus": "int",
"userType": "int",
"id": "str",
},
},
0x00000014: {
"commandId": 0x00000014,
"commandName": "SetUserType",
"args": {
"userId": "int",
"userType": "int",
},
},
0x0000000B: {
"commandId": 0x0000000B,
"commandName": "SetWeekdaySchedule",
"args": {
"scheduleId": "int",
"userId": "int",
"daysMask": "int",
"startHour": "int",
"startMinute": "int",
"endHour": "int",
"endMinute": "int",
},
},
0x0000000E: {
"commandId": 0x0000000E,
"commandName": "SetYeardaySchedule",
"args": {
"scheduleId": "int",
"userId": "int",
"localStartTime": "int",
"localEndTime": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "UnlockDoor",
"args": {
"pin": "str",
},
},
0x00000003: {
"commandId": 0x00000003,
"commandName": "UnlockWithTimeout",
"args": {
"timeoutInSeconds": "int",
"pin": "str",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "LockState",
"attributeId": 0x00000000,
"type": "int",
"reportable": True,
},
0x00000001: {
"attributeName": "LockType",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "ActuatorEnabled",
"attributeId": 0x00000002,
"type": "bool",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_ELECTRICAL_MEASUREMENT_CLUSTER_INFO = {
"clusterName": "ElectricalMeasurement",
"clusterId": 0x00000B04,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "MeasurementType",
"attributeId": 0x00000000,
"type": "int",
},
0x00000304: {
"attributeName": "TotalActivePower",
"attributeId": 0x00000304,
"type": "int",
},
0x00000505: {
"attributeName": "RmsVoltage",
"attributeId": 0x00000505,
"type": "int",
},
0x00000506: {
"attributeName": "RmsVoltageMin",
"attributeId": 0x00000506,
"type": "int",
},
0x00000507: {
"attributeName": "RmsVoltageMax",
"attributeId": 0x00000507,
"type": "int",
},
0x00000508: {
"attributeName": "RmsCurrent",
"attributeId": 0x00000508,
"type": "int",
},
0x00000509: {
"attributeName": "RmsCurrentMin",
"attributeId": 0x00000509,
"type": "int",
},
0x0000050A: {
"attributeName": "RmsCurrentMax",
"attributeId": 0x0000050A,
"type": "int",
},
0x0000050B: {
"attributeName": "ActivePower",
"attributeId": 0x0000050B,
"type": "int",
},
0x0000050C: {
"attributeName": "ActivePowerMin",
"attributeId": 0x0000050C,
"type": "int",
},
0x0000050D: {
"attributeName": "ActivePowerMax",
"attributeId": 0x0000050D,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_INFO = {
"clusterName": "EthernetNetworkDiagnostics",
"clusterId": 0x00000037,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "ResetCounts",
"args": {
},
},
},
"attributes": {
0x00000002: {
"attributeName": "PacketRxCount",
"attributeId": 0x00000002,
"type": "int",
},
0x00000003: {
"attributeName": "PacketTxCount",
"attributeId": 0x00000003,
"type": "int",
},
0x00000004: {
"attributeName": "TxErrCount",
"attributeId": 0x00000004,
"type": "int",
},
0x00000005: {
"attributeName": "CollisionCount",
"attributeId": 0x00000005,
"type": "int",
},
0x00000006: {
"attributeName": "OverrunCount",
"attributeId": 0x00000006,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_FIXED_LABEL_CLUSTER_INFO = {
"clusterName": "FixedLabel",
"clusterId": 0x00000040,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "LabelList",
"attributeId": 0x00000000,
"type": "",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_FLOW_MEASUREMENT_CLUSTER_INFO = {
"clusterName": "FlowMeasurement",
"clusterId": 0x00000404,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "MeasuredValue",
"attributeId": 0x00000000,
"type": "int",
},
0x00000001: {
"attributeName": "MinMeasuredValue",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "MaxMeasuredValue",
"attributeId": 0x00000002,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_GENERAL_COMMISSIONING_CLUSTER_INFO = {
"clusterName": "GeneralCommissioning",
"clusterId": 0x00000030,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "ArmFailSafe",
"args": {
"expiryLengthSeconds": "int",
"breadcrumb": "int",
"timeoutMs": "int",
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "CommissioningComplete",
"args": {
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "SetRegulatoryConfig",
"args": {
"location": "int",
"countryCode": "str",
"breadcrumb": "int",
"timeoutMs": "int",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "Breadcrumb",
"attributeId": 0x00000000,
"type": "int",
"writable": True,
},
0x00000001: {
"attributeName": "BasicCommissioningInfoList",
"attributeId": 0x00000001,
"type": "",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_GENERAL_DIAGNOSTICS_CLUSTER_INFO = {
"clusterName": "GeneralDiagnostics",
"clusterId": 0x00000033,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "NetworkInterfaces",
"attributeId": 0x00000000,
"type": "",
},
0x00000001: {
"attributeName": "RebootCount",
"attributeId": 0x00000001,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_GROUP_KEY_MANAGEMENT_CLUSTER_INFO = {
"clusterName": "GroupKeyManagement",
"clusterId": 0x0000F004,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "Groups",
"attributeId": 0x00000000,
"type": "",
},
0x00000001: {
"attributeName": "GroupKeys",
"attributeId": 0x00000001,
"type": "",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_GROUPS_CLUSTER_INFO = {
"clusterName": "Groups",
"clusterId": 0x00000004,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "AddGroup",
"args": {
"groupId": "int",
"groupName": "str",
},
},
0x00000005: {
"commandId": 0x00000005,
"commandName": "AddGroupIfIdentifying",
"args": {
"groupId": "int",
"groupName": "str",
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "GetGroupMembership",
"args": {
"groupCount": "int",
"groupList": "int",
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "RemoveAllGroups",
"args": {
},
},
0x00000003: {
"commandId": 0x00000003,
"commandName": "RemoveGroup",
"args": {
"groupId": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "ViewGroup",
"args": {
"groupId": "int",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "NameSupport",
"attributeId": 0x00000000,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_IDENTIFY_CLUSTER_INFO = {
"clusterName": "Identify",
"clusterId": 0x00000003,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "Identify",
"args": {
"identifyTime": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "IdentifyQuery",
"args": {
},
},
},
"attributes": {
0x00000000: {
"attributeName": "IdentifyTime",
"attributeId": 0x00000000,
"type": "int",
"writable": True,
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_KEYPAD_INPUT_CLUSTER_INFO = {
"clusterName": "KeypadInput",
"clusterId": 0x00000509,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "SendKey",
"args": {
"keyCode": "int",
},
},
},
"attributes": {
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_LEVEL_CONTROL_CLUSTER_INFO = {
"clusterName": "LevelControl",
"clusterId": 0x00000008,
"commands": {
0x00000001: {
"commandId": 0x00000001,
"commandName": "Move",
"args": {
"moveMode": "int",
"rate": "int",
"optionMask": "int",
"optionOverride": "int",
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "MoveToLevel",
"args": {
"level": "int",
"transitionTime": "int",
"optionMask": "int",
"optionOverride": "int",
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "MoveToLevelWithOnOff",
"args": {
"level": "int",
"transitionTime": "int",
},
},
0x00000005: {
"commandId": 0x00000005,
"commandName": "MoveWithOnOff",
"args": {
"moveMode": "int",
"rate": "int",
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "Step",
"args": {
"stepMode": "int",
"stepSize": "int",
"transitionTime": "int",
"optionMask": "int",
"optionOverride": "int",
},
},
0x00000006: {
"commandId": 0x00000006,
"commandName": "StepWithOnOff",
"args": {
"stepMode": "int",
"stepSize": "int",
"transitionTime": "int",
},
},
0x00000003: {
"commandId": 0x00000003,
"commandName": "Stop",
"args": {
"optionMask": "int",
"optionOverride": "int",
},
},
0x00000007: {
"commandId": 0x00000007,
"commandName": "StopWithOnOff",
"args": {
},
},
},
"attributes": {
0x00000000: {
"attributeName": "CurrentLevel",
"attributeId": 0x00000000,
"type": "int",
"reportable": True,
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_LOW_POWER_CLUSTER_INFO = {
"clusterName": "LowPower",
"clusterId": 0x00000508,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "Sleep",
"args": {
},
},
},
"attributes": {
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_MEDIA_INPUT_CLUSTER_INFO = {
"clusterName": "MediaInput",
"clusterId": 0x00000507,
"commands": {
0x00000002: {
"commandId": 0x00000002,
"commandName": "HideInputStatus",
"args": {
},
},
0x00000003: {
"commandId": 0x00000003,
"commandName": "RenameInput",
"args": {
"index": "int",
"name": "str",
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "SelectInput",
"args": {
"index": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "ShowInputStatus",
"args": {
},
},
},
"attributes": {
0x00000000: {
"attributeName": "MediaInputList",
"attributeId": 0x00000000,
"type": "",
},
0x00000001: {
"attributeName": "CurrentMediaInput",
"attributeId": 0x00000001,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_MEDIA_PLAYBACK_CLUSTER_INFO = {
"clusterName": "MediaPlayback",
"clusterId": 0x00000506,
"commands": {
0x00000007: {
"commandId": 0x00000007,
"commandName": "MediaFastForward",
"args": {
},
},
0x00000005: {
"commandId": 0x00000005,
"commandName": "MediaNext",
"args": {
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "MediaPause",
"args": {
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "MediaPlay",
"args": {
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "MediaPrevious",
"args": {
},
},
0x00000006: {
"commandId": 0x00000006,
"commandName": "MediaRewind",
"args": {
},
},
0x0000000A: {
"commandId": 0x0000000A,
"commandName": "MediaSeek",
"args": {
"position": "int",
},
},
0x00000009: {
"commandId": 0x00000009,
"commandName": "MediaSkipBackward",
"args": {
"deltaPositionMilliseconds": "int",
},
},
0x00000008: {
"commandId": 0x00000008,
"commandName": "MediaSkipForward",
"args": {
"deltaPositionMilliseconds": "int",
},
},
0x00000003: {
"commandId": 0x00000003,
"commandName": "MediaStartOver",
"args": {
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "MediaStop",
"args": {
},
},
},
"attributes": {
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_NETWORK_COMMISSIONING_CLUSTER_INFO = {
"clusterName": "NetworkCommissioning",
"clusterId": 0x00000031,
"commands": {
0x00000006: {
"commandId": 0x00000006,
"commandName": "AddThreadNetwork",
"args": {
"operationalDataset": "bytes",
"breadcrumb": "int",
"timeoutMs": "int",
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "AddWiFiNetwork",
"args": {
"ssid": "bytes",
"credentials": "bytes",
"breadcrumb": "int",
"timeoutMs": "int",
},
},
0x0000000E: {
"commandId": 0x0000000E,
"commandName": "DisableNetwork",
"args": {
"networkID": "bytes",
"breadcrumb": "int",
"timeoutMs": "int",
},
},
0x0000000C: {
"commandId": 0x0000000C,
"commandName": "EnableNetwork",
"args": {
"networkID": "bytes",
"breadcrumb": "int",
"timeoutMs": "int",
},
},
0x00000010: {
"commandId": 0x00000010,
"commandName": "GetLastNetworkCommissioningResult",
"args": {
"timeoutMs": "int",
},
},
0x0000000A: {
"commandId": 0x0000000A,
"commandName": "RemoveNetwork",
"args": {
"networkID": "bytes",
"breadcrumb": "int",
"timeoutMs": "int",
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "ScanNetworks",
"args": {
"ssid": "bytes",
"breadcrumb": "int",
"timeoutMs": "int",
},
},
0x00000008: {
"commandId": 0x00000008,
"commandName": "UpdateThreadNetwork",
"args": {
"operationalDataset": "bytes",
"breadcrumb": "int",
"timeoutMs": "int",
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "UpdateWiFiNetwork",
"args": {
"ssid": "bytes",
"credentials": "bytes",
"breadcrumb": "int",
"timeoutMs": "int",
},
},
},
"attributes": {
0x0000FFFC: {
"attributeName": "FeatureMap",
"attributeId": 0x0000FFFC,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_INFO = {
"clusterName": "OtaSoftwareUpdateProvider",
"clusterId": 0x00000029,
"commands": {
0x00000001: {
"commandId": 0x00000001,
"commandName": "ApplyUpdateRequest",
"args": {
"updateToken": "bytes",
"newVersion": "int",
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "NotifyUpdateApplied",
"args": {
"updateToken": "bytes",
"currentVersion": "int",
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "QueryImage",
"args": {
"vendorId": "int",
"productId": "int",
"imageType": "int",
"hardwareVersion": "int",
"currentVersion": "int",
"protocolsSupported": "int",
"location": "str",
"requestorCanConsent": "bool",
"metadataForProvider": "bytes",
},
},
},
"attributes": {
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_OCCUPANCY_SENSING_CLUSTER_INFO = {
"clusterName": "OccupancySensing",
"clusterId": 0x00000406,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "Occupancy",
"attributeId": 0x00000000,
"type": "int",
"reportable": True,
},
0x00000001: {
"attributeName": "OccupancySensorType",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "OccupancySensorTypeBitmap",
"attributeId": 0x00000002,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_ON_OFF_CLUSTER_INFO = {
"clusterName": "OnOff",
"clusterId": 0x00000006,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "Off",
"args": {
},
},
0x00000040: {
"commandId": 0x00000040,
"commandName": "OffWithEffect",
"args": {
"effectId": "int",
"effectVariant": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "On",
"args": {
},
},
0x00000041: {
"commandId": 0x00000041,
"commandName": "OnWithRecallGlobalScene",
"args": {
},
},
0x00000042: {
"commandId": 0x00000042,
"commandName": "OnWithTimedOff",
"args": {
"onOffControl": "int",
"onTime": "int",
"offWaitTime": "int",
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "Toggle",
"args": {
},
},
},
"attributes": {
0x00000000: {
"attributeName": "OnOff",
"attributeId": 0x00000000,
"type": "bool",
"reportable": True,
},
0x00004000: {
"attributeName": "GlobalSceneControl",
"attributeId": 0x00004000,
"type": "bool",
},
0x00004001: {
"attributeName": "OnTime",
"attributeId": 0x00004001,
"type": "int",
"writable": True,
},
0x00004002: {
"attributeName": "OffWaitTime",
"attributeId": 0x00004002,
"type": "int",
"writable": True,
},
0x00004003: {
"attributeName": "StartUpOnOff",
"attributeId": 0x00004003,
"type": "int",
"writable": True,
},
0x0000FFFC: {
"attributeName": "FeatureMap",
"attributeId": 0x0000FFFC,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_INFO = {
"clusterName": "OnOffSwitchConfiguration",
"clusterId": 0x00000007,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "SwitchType",
"attributeId": 0x00000000,
"type": "int",
},
0x00000010: {
"attributeName": "SwitchActions",
"attributeId": 0x00000010,
"type": "int",
"writable": True,
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_OPERATIONAL_CREDENTIALS_CLUSTER_INFO = {
"clusterName": "OperationalCredentials",
"clusterId": 0x0000003E,
"commands": {
0x00000006: {
"commandId": 0x00000006,
"commandName": "AddNOC",
"args": {
"nOCArray": "bytes",
"iPKValue": "bytes",
"caseAdminNode": "int",
"adminVendorId": "int",
},
},
0x0000000B: {
"commandId": 0x0000000B,
"commandName": "AddTrustedRootCertificate",
"args": {
"rootCertificate": "bytes",
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "OpCSRRequest",
"args": {
"cSRNonce": "bytes",
},
},
0x0000000A: {
"commandId": 0x0000000A,
"commandName": "RemoveFabric",
"args": {
"fabricIndex": "int",
},
},
0x0000000C: {
"commandId": 0x0000000C,
"commandName": "RemoveTrustedRootCertificate",
"args": {
"trustedRootIdentifier": "bytes",
},
},
0x00000009: {
"commandId": 0x00000009,
"commandName": "UpdateFabricLabel",
"args": {
"label": "str",
},
},
0x00000007: {
"commandId": 0x00000007,
"commandName": "UpdateNOC",
"args": {
"nOCArray": "bytes",
},
},
},
"attributes": {
0x00000001: {
"attributeName": "FabricsList",
"attributeId": 0x00000001,
"type": "",
},
0x00000002: {
"attributeName": "SupportedFabrics",
"attributeId": 0x00000002,
"type": "int",
},
0x00000003: {
"attributeName": "CommissionedFabrics",
"attributeId": 0x00000003,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_PRESSURE_MEASUREMENT_CLUSTER_INFO = {
"clusterName": "PressureMeasurement",
"clusterId": 0x00000403,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "MeasuredValue",
"attributeId": 0x00000000,
"type": "int",
"reportable": True,
},
0x00000001: {
"attributeName": "MinMeasuredValue",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "MaxMeasuredValue",
"attributeId": 0x00000002,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_INFO = {
"clusterName": "PumpConfigurationAndControl",
"clusterId": 0x00000200,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "MaxPressure",
"attributeId": 0x00000000,
"type": "int",
},
0x00000001: {
"attributeName": "MaxSpeed",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "MaxFlow",
"attributeId": 0x00000002,
"type": "int",
},
0x00000011: {
"attributeName": "EffectiveOperationMode",
"attributeId": 0x00000011,
"type": "int",
},
0x00000012: {
"attributeName": "EffectiveControlMode",
"attributeId": 0x00000012,
"type": "int",
},
0x00000013: {
"attributeName": "Capacity",
"attributeId": 0x00000013,
"type": "int",
"reportable": True,
},
0x00000020: {
"attributeName": "OperationMode",
"attributeId": 0x00000020,
"type": "int",
"writable": True,
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_INFO = {
"clusterName": "RelativeHumidityMeasurement",
"clusterId": 0x00000405,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "MeasuredValue",
"attributeId": 0x00000000,
"type": "int",
"reportable": True,
},
0x00000001: {
"attributeName": "MinMeasuredValue",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "MaxMeasuredValue",
"attributeId": 0x00000002,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_SCENES_CLUSTER_INFO = {
"clusterName": "Scenes",
"clusterId": 0x00000005,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "AddScene",
"args": {
"groupId": "int",
"sceneId": "int",
"transitionTime": "int",
"sceneName": "str",
"clusterId": "int",
"length": "int",
"value": "int",
},
},
0x00000006: {
"commandId": 0x00000006,
"commandName": "GetSceneMembership",
"args": {
"groupId": "int",
},
},
0x00000005: {
"commandId": 0x00000005,
"commandName": "RecallScene",
"args": {
"groupId": "int",
"sceneId": "int",
"transitionTime": "int",
},
},
0x00000003: {
"commandId": 0x00000003,
"commandName": "RemoveAllScenes",
"args": {
"groupId": "int",
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "RemoveScene",
"args": {
"groupId": "int",
"sceneId": "int",
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "StoreScene",
"args": {
"groupId": "int",
"sceneId": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "ViewScene",
"args": {
"groupId": "int",
"sceneId": "int",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "SceneCount",
"attributeId": 0x00000000,
"type": "int",
},
0x00000001: {
"attributeName": "CurrentScene",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "CurrentGroup",
"attributeId": 0x00000002,
"type": "int",
},
0x00000003: {
"attributeName": "SceneValid",
"attributeId": 0x00000003,
"type": "bool",
},
0x00000004: {
"attributeName": "NameSupport",
"attributeId": 0x00000004,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_SOFTWARE_DIAGNOSTICS_CLUSTER_INFO = {
"clusterName": "SoftwareDiagnostics",
"clusterId": 0x00000034,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "ResetWatermarks",
"args": {
},
},
},
"attributes": {
0x00000003: {
"attributeName": "CurrentHeapHighWatermark",
"attributeId": 0x00000003,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_SWITCH_CLUSTER_INFO = {
"clusterName": "Switch",
"clusterId": 0x0000003B,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "NumberOfPositions",
"attributeId": 0x00000000,
"type": "int",
},
0x00000001: {
"attributeName": "CurrentPosition",
"attributeId": 0x00000001,
"type": "int",
"reportable": True,
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_TV_CHANNEL_CLUSTER_INFO = {
"clusterName": "TvChannel",
"clusterId": 0x00000504,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "ChangeChannel",
"args": {
"match": "str",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "ChangeChannelByNumber",
"args": {
"majorNumber": "int",
"minorNumber": "int",
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "SkipChannel",
"args": {
"count": "int",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "TvChannelList",
"attributeId": 0x00000000,
"type": "",
},
0x00000001: {
"attributeName": "TvChannelLineup",
"attributeId": 0x00000001,
"type": "bytes",
},
0x00000002: {
"attributeName": "CurrentTvChannel",
"attributeId": 0x00000002,
"type": "bytes",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_TARGET_NAVIGATOR_CLUSTER_INFO = {
"clusterName": "TargetNavigator",
"clusterId": 0x00000505,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "NavigateTarget",
"args": {
"target": "int",
"data": "str",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "TargetNavigatorList",
"attributeId": 0x00000000,
"type": "",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_TEMPERATURE_MEASUREMENT_CLUSTER_INFO = {
"clusterName": "TemperatureMeasurement",
"clusterId": 0x00000402,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "MeasuredValue",
"attributeId": 0x00000000,
"type": "int",
"reportable": True,
},
0x00000001: {
"attributeName": "MinMeasuredValue",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "MaxMeasuredValue",
"attributeId": 0x00000002,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_TEST_CLUSTER_CLUSTER_INFO = {
"clusterName": "TestCluster",
"clusterId": 0x0000050F,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "Test",
"args": {
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "TestAddArguments",
"args": {
"arg1": "int",
"arg2": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "TestNotHandled",
"args": {
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "TestSpecific",
"args": {
},
},
0x00000003: {
"commandId": 0x00000003,
"commandName": "TestUnknownCommand",
"args": {
},
},
},
"attributes": {
0x00000000: {
"attributeName": "Boolean",
"attributeId": 0x00000000,
"type": "bool",
"writable": True,
},
0x00000001: {
"attributeName": "Bitmap8",
"attributeId": 0x00000001,
"type": "int",
"writable": True,
},
0x00000002: {
"attributeName": "Bitmap16",
"attributeId": 0x00000002,
"type": "int",
"writable": True,
},
0x00000003: {
"attributeName": "Bitmap32",
"attributeId": 0x00000003,
"type": "int",
"writable": True,
},
0x00000004: {
"attributeName": "Bitmap64",
"attributeId": 0x00000004,
"type": "int",
"writable": True,
},
0x00000005: {
"attributeName": "Int8u",
"attributeId": 0x00000005,
"type": "int",
"writable": True,
},
0x00000006: {
"attributeName": "Int16u",
"attributeId": 0x00000006,
"type": "int",
"writable": True,
},
0x00000008: {
"attributeName": "Int32u",
"attributeId": 0x00000008,
"type": "int",
"writable": True,
},
0x0000000C: {
"attributeName": "Int64u",
"attributeId": 0x0000000C,
"type": "int",
"writable": True,
},
0x0000000D: {
"attributeName": "Int8s",
"attributeId": 0x0000000D,
"type": "int",
"writable": True,
},
0x0000000E: {
"attributeName": "Int16s",
"attributeId": 0x0000000E,
"type": "int",
"writable": True,
},
0x00000010: {
"attributeName": "Int32s",
"attributeId": 0x00000010,
"type": "int",
"writable": True,
},
0x00000014: {
"attributeName": "Int64s",
"attributeId": 0x00000014,
"type": "int",
"writable": True,
},
0x00000015: {
"attributeName": "Enum8",
"attributeId": 0x00000015,
"type": "int",
"writable": True,
},
0x00000016: {
"attributeName": "Enum16",
"attributeId": 0x00000016,
"type": "int",
"writable": True,
},
0x00000019: {
"attributeName": "OctetString",
"attributeId": 0x00000019,
"type": "bytes",
"writable": True,
},
0x0000001A: {
"attributeName": "ListInt8u",
"attributeId": 0x0000001A,
"type": "int",
},
0x0000001B: {
"attributeName": "ListOctetString",
"attributeId": 0x0000001B,
"type": "bytes",
},
0x0000001C: {
"attributeName": "ListStructOctetString",
"attributeId": 0x0000001C,
"type": "",
},
0x0000001D: {
"attributeName": "LongOctetString",
"attributeId": 0x0000001D,
"type": "bytes",
"writable": True,
},
0x0000001E: {
"attributeName": "CharString",
"attributeId": 0x0000001E,
"type": "str",
"writable": True,
},
0x0000001F: {
"attributeName": "LongCharString",
"attributeId": 0x0000001F,
"type": "str",
"writable": True,
},
0x000000FF: {
"attributeName": "Unsupported",
"attributeId": 0x000000FF,
"type": "bool",
"writable": True,
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_THERMOSTAT_CLUSTER_INFO = {
"clusterName": "Thermostat",
"clusterId": 0x00000201,
"commands": {
0x00000003: {
"commandId": 0x00000003,
"commandName": "ClearWeeklySchedule",
"args": {
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "GetRelayStatusLog",
"args": {
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "GetWeeklySchedule",
"args": {
"daysToReturn": "int",
"modeToReturn": "int",
},
},
0x00000001: {
"commandId": 0x00000001,
"commandName": "SetWeeklySchedule",
"args": {
"numberOfTransitionsForSequence": "int",
"dayOfWeekForSequence": "int",
"modeForSequence": "int",
"payload": "int",
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "SetpointRaiseLower",
"args": {
"mode": "int",
"amount": "int",
},
},
},
"attributes": {
0x00000000: {
"attributeName": "LocalTemperature",
"attributeId": 0x00000000,
"type": "int",
"reportable": True,
},
0x00000003: {
"attributeName": "AbsMinHeatSetpointLimit",
"attributeId": 0x00000003,
"type": "int",
},
0x00000004: {
"attributeName": "AbsMaxHeatSetpointLimit",
"attributeId": 0x00000004,
"type": "int",
},
0x00000005: {
"attributeName": "AbsMinCoolSetpointLimit",
"attributeId": 0x00000005,
"type": "int",
},
0x00000006: {
"attributeName": "AbsMaxCoolSetpointLimit",
"attributeId": 0x00000006,
"type": "int",
},
0x00000011: {
"attributeName": "OccupiedCoolingSetpoint",
"attributeId": 0x00000011,
"type": "int",
"writable": True,
},
0x00000012: {
"attributeName": "OccupiedHeatingSetpoint",
"attributeId": 0x00000012,
"type": "int",
"writable": True,
},
0x00000015: {
"attributeName": "MinHeatSetpointLimit",
"attributeId": 0x00000015,
"type": "int",
"writable": True,
},
0x00000016: {
"attributeName": "MaxHeatSetpointLimit",
"attributeId": 0x00000016,
"type": "int",
"writable": True,
},
0x00000017: {
"attributeName": "MinCoolSetpointLimit",
"attributeId": 0x00000017,
"type": "int",
"writable": True,
},
0x00000018: {
"attributeName": "MaxCoolSetpointLimit",
"attributeId": 0x00000018,
"type": "int",
"writable": True,
},
0x0000001B: {
"attributeName": "ControlSequenceOfOperation",
"attributeId": 0x0000001B,
"type": "int",
"writable": True,
},
0x0000001C: {
"attributeName": "SystemMode",
"attributeId": 0x0000001C,
"type": "int",
"writable": True,
},
0x00000020: {
"attributeName": "StartOfWeek",
"attributeId": 0x00000020,
"type": "int",
},
0x00000021: {
"attributeName": "NumberOfWeeklyTransitions",
"attributeId": 0x00000021,
"type": "int",
},
0x00000022: {
"attributeName": "NumberOfDailyTransitions",
"attributeId": 0x00000022,
"type": "int",
},
0x0000FFFC: {
"attributeName": "FeatureMap",
"attributeId": 0x0000FFFC,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_INFO = {
"clusterName": "ThermostatUserInterfaceConfiguration",
"clusterId": 0x00000204,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "TemperatureDisplayMode",
"attributeId": 0x00000000,
"type": "int",
"writable": True,
},
0x00000001: {
"attributeName": "KeypadLockout",
"attributeId": 0x00000001,
"type": "int",
"writable": True,
},
0x00000002: {
"attributeName": "ScheduleProgrammingVisibility",
"attributeId": 0x00000002,
"type": "int",
"writable": True,
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_INFO = {
"clusterName": "ThreadNetworkDiagnostics",
"clusterId": 0x00000035,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "ResetCounts",
"args": {
},
},
},
"attributes": {
0x00000000: {
"attributeName": "Channel",
"attributeId": 0x00000000,
"type": "int",
},
0x00000001: {
"attributeName": "RoutingRole",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "NetworkName",
"attributeId": 0x00000002,
"type": "bytes",
},
0x00000003: {
"attributeName": "PanId",
"attributeId": 0x00000003,
"type": "int",
},
0x00000004: {
"attributeName": "ExtendedPanId",
"attributeId": 0x00000004,
"type": "int",
},
0x00000005: {
"attributeName": "MeshLocalPrefix",
"attributeId": 0x00000005,
"type": "bytes",
},
0x00000006: {
"attributeName": "OverrunCount",
"attributeId": 0x00000006,
"type": "int",
},
0x00000007: {
"attributeName": "NeighborTableList",
"attributeId": 0x00000007,
"type": "",
},
0x00000008: {
"attributeName": "RouteTableList",
"attributeId": 0x00000008,
"type": "",
},
0x00000009: {
"attributeName": "PartitionId",
"attributeId": 0x00000009,
"type": "int",
},
0x0000000A: {
"attributeName": "Weighting",
"attributeId": 0x0000000A,
"type": "int",
},
0x0000000B: {
"attributeName": "DataVersion",
"attributeId": 0x0000000B,
"type": "int",
},
0x0000000C: {
"attributeName": "StableDataVersion",
"attributeId": 0x0000000C,
"type": "int",
},
0x0000000D: {
"attributeName": "LeaderRouterId",
"attributeId": 0x0000000D,
"type": "int",
},
0x0000000E: {
"attributeName": "DetachedRoleCount",
"attributeId": 0x0000000E,
"type": "int",
},
0x0000000F: {
"attributeName": "ChildRoleCount",
"attributeId": 0x0000000F,
"type": "int",
},
0x00000010: {
"attributeName": "RouterRoleCount",
"attributeId": 0x00000010,
"type": "int",
},
0x00000011: {
"attributeName": "LeaderRoleCount",
"attributeId": 0x00000011,
"type": "int",
},
0x00000012: {
"attributeName": "AttachAttemptCount",
"attributeId": 0x00000012,
"type": "int",
},
0x00000013: {
"attributeName": "PartitionIdChangeCount",
"attributeId": 0x00000013,
"type": "int",
},
0x00000014: {
"attributeName": "BetterPartitionAttachAttemptCount",
"attributeId": 0x00000014,
"type": "int",
},
0x00000015: {
"attributeName": "ParentChangeCount",
"attributeId": 0x00000015,
"type": "int",
},
0x00000016: {
"attributeName": "TxTotalCount",
"attributeId": 0x00000016,
"type": "int",
},
0x00000017: {
"attributeName": "TxUnicastCount",
"attributeId": 0x00000017,
"type": "int",
},
0x00000018: {
"attributeName": "TxBroadcastCount",
"attributeId": 0x00000018,
"type": "int",
},
0x00000019: {
"attributeName": "TxAckRequestedCount",
"attributeId": 0x00000019,
"type": "int",
},
0x0000001A: {
"attributeName": "TxAckedCount",
"attributeId": 0x0000001A,
"type": "int",
},
0x0000001B: {
"attributeName": "TxNoAckRequestedCount",
"attributeId": 0x0000001B,
"type": "int",
},
0x0000001C: {
"attributeName": "TxDataCount",
"attributeId": 0x0000001C,
"type": "int",
},
0x0000001D: {
"attributeName": "TxDataPollCount",
"attributeId": 0x0000001D,
"type": "int",
},
0x0000001E: {
"attributeName": "TxBeaconCount",
"attributeId": 0x0000001E,
"type": "int",
},
0x0000001F: {
"attributeName": "TxBeaconRequestCount",
"attributeId": 0x0000001F,
"type": "int",
},
0x00000020: {
"attributeName": "TxOtherCount",
"attributeId": 0x00000020,
"type": "int",
},
0x00000021: {
"attributeName": "TxRetryCount",
"attributeId": 0x00000021,
"type": "int",
},
0x00000022: {
"attributeName": "TxDirectMaxRetryExpiryCount",
"attributeId": 0x00000022,
"type": "int",
},
0x00000023: {
"attributeName": "TxIndirectMaxRetryExpiryCount",
"attributeId": 0x00000023,
"type": "int",
},
0x00000024: {
"attributeName": "TxErrCcaCount",
"attributeId": 0x00000024,
"type": "int",
},
0x00000025: {
"attributeName": "TxErrAbortCount",
"attributeId": 0x00000025,
"type": "int",
},
0x00000026: {
"attributeName": "TxErrBusyChannelCount",
"attributeId": 0x00000026,
"type": "int",
},
0x00000027: {
"attributeName": "RxTotalCount",
"attributeId": 0x00000027,
"type": "int",
},
0x00000028: {
"attributeName": "RxUnicastCount",
"attributeId": 0x00000028,
"type": "int",
},
0x00000029: {
"attributeName": "RxBroadcastCount",
"attributeId": 0x00000029,
"type": "int",
},
0x0000002A: {
"attributeName": "RxDataCount",
"attributeId": 0x0000002A,
"type": "int",
},
0x0000002B: {
"attributeName": "RxDataPollCount",
"attributeId": 0x0000002B,
"type": "int",
},
0x0000002C: {
"attributeName": "RxBeaconCount",
"attributeId": 0x0000002C,
"type": "int",
},
0x0000002D: {
"attributeName": "RxBeaconRequestCount",
"attributeId": 0x0000002D,
"type": "int",
},
0x0000002E: {
"attributeName": "RxOtherCount",
"attributeId": 0x0000002E,
"type": "int",
},
0x0000002F: {
"attributeName": "RxAddressFilteredCount",
"attributeId": 0x0000002F,
"type": "int",
},
0x00000030: {
"attributeName": "RxDestAddrFilteredCount",
"attributeId": 0x00000030,
"type": "int",
},
0x00000031: {
"attributeName": "RxDuplicatedCount",
"attributeId": 0x00000031,
"type": "int",
},
0x00000032: {
"attributeName": "RxErrNoFrameCount",
"attributeId": 0x00000032,
"type": "int",
},
0x00000033: {
"attributeName": "RxErrUnknownNeighborCount",
"attributeId": 0x00000033,
"type": "int",
},
0x00000034: {
"attributeName": "RxErrInvalidSrcAddrCount",
"attributeId": 0x00000034,
"type": "int",
},
0x00000035: {
"attributeName": "RxErrSecCount",
"attributeId": 0x00000035,
"type": "int",
},
0x00000036: {
"attributeName": "RxErrFcsCount",
"attributeId": 0x00000036,
"type": "int",
},
0x00000037: {
"attributeName": "RxErrOtherCount",
"attributeId": 0x00000037,
"type": "int",
},
0x0000003B: {
"attributeName": "SecurityPolicy",
"attributeId": 0x0000003B,
"type": "",
},
0x0000003C: {
"attributeName": "ChannelMask",
"attributeId": 0x0000003C,
"type": "int",
},
0x0000003D: {
"attributeName": "OperationalDatasetComponents",
"attributeId": 0x0000003D,
"type": "",
},
0x0000003E: {
"attributeName": "ActiveNetworkFaultsList",
"attributeId": 0x0000003E,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_WAKE_ON_LAN_CLUSTER_INFO = {
"clusterName": "WakeOnLan",
"clusterId": 0x00000503,
"commands": {
},
"attributes": {
0x00000000: {
"attributeName": "WakeOnLanMacAddress",
"attributeId": 0x00000000,
"type": "str",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_WI_FI_NETWORK_DIAGNOSTICS_CLUSTER_INFO = {
"clusterName": "WiFiNetworkDiagnostics",
"clusterId": 0x00000036,
"commands": {
0x00000000: {
"commandId": 0x00000000,
"commandName": "ResetCounts",
"args": {
},
},
},
"attributes": {
0x00000000: {
"attributeName": "Bssid",
"attributeId": 0x00000000,
"type": "bytes",
},
0x00000001: {
"attributeName": "SecurityType",
"attributeId": 0x00000001,
"type": "int",
},
0x00000002: {
"attributeName": "WiFiVersion",
"attributeId": 0x00000002,
"type": "int",
},
0x00000003: {
"attributeName": "ChannelNumber",
"attributeId": 0x00000003,
"type": "int",
},
0x00000004: {
"attributeName": "Rssi",
"attributeId": 0x00000004,
"type": "int",
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_WINDOW_COVERING_CLUSTER_INFO = {
"clusterName": "WindowCovering",
"clusterId": 0x00000102,
"commands": {
0x00000001: {
"commandId": 0x00000001,
"commandName": "DownOrClose",
"args": {
},
},
0x00000005: {
"commandId": 0x00000005,
"commandName": "GoToLiftPercentage",
"args": {
"liftPercentageValue": "int",
"liftPercent100thsValue": "int",
},
},
0x00000004: {
"commandId": 0x00000004,
"commandName": "GoToLiftValue",
"args": {
"liftValue": "int",
},
},
0x00000008: {
"commandId": 0x00000008,
"commandName": "GoToTiltPercentage",
"args": {
"tiltPercentageValue": "int",
"tiltPercent100thsValue": "int",
},
},
0x00000007: {
"commandId": 0x00000007,
"commandName": "GoToTiltValue",
"args": {
"tiltValue": "int",
},
},
0x00000002: {
"commandId": 0x00000002,
"commandName": "StopMotion",
"args": {
},
},
0x00000000: {
"commandId": 0x00000000,
"commandName": "UpOrOpen",
"args": {
},
},
},
"attributes": {
0x00000000: {
"attributeName": "Type",
"attributeId": 0x00000000,
"type": "int",
},
0x00000003: {
"attributeName": "CurrentPositionLift",
"attributeId": 0x00000003,
"type": "int",
},
0x00000004: {
"attributeName": "CurrentPositionTilt",
"attributeId": 0x00000004,
"type": "int",
},
0x00000007: {
"attributeName": "ConfigStatus",
"attributeId": 0x00000007,
"type": "int",
},
0x00000008: {
"attributeName": "CurrentPositionLiftPercentage",
"attributeId": 0x00000008,
"type": "int",
"reportable": True,
},
0x00000009: {
"attributeName": "CurrentPositionTiltPercentage",
"attributeId": 0x00000009,
"type": "int",
"reportable": True,
},
0x0000000A: {
"attributeName": "OperationalStatus",
"attributeId": 0x0000000A,
"type": "int",
"reportable": True,
},
0x0000000B: {
"attributeName": "TargetPositionLiftPercent100ths",
"attributeId": 0x0000000B,
"type": "int",
"reportable": True,
},
0x0000000C: {
"attributeName": "TargetPositionTiltPercent100ths",
"attributeId": 0x0000000C,
"type": "int",
"reportable": True,
},
0x0000000D: {
"attributeName": "EndProductType",
"attributeId": 0x0000000D,
"type": "int",
},
0x0000000E: {
"attributeName": "CurrentPositionLiftPercent100ths",
"attributeId": 0x0000000E,
"type": "int",
"reportable": True,
},
0x0000000F: {
"attributeName": "CurrentPositionTiltPercent100ths",
"attributeId": 0x0000000F,
"type": "int",
"reportable": True,
},
0x00000010: {
"attributeName": "InstalledOpenLimitLift",
"attributeId": 0x00000010,
"type": "int",
},
0x00000011: {
"attributeName": "InstalledClosedLimitLift",
"attributeId": 0x00000011,
"type": "int",
},
0x00000012: {
"attributeName": "InstalledOpenLimitTilt",
"attributeId": 0x00000012,
"type": "int",
},
0x00000013: {
"attributeName": "InstalledClosedLimitTilt",
"attributeId": 0x00000013,
"type": "int",
},
0x00000017: {
"attributeName": "Mode",
"attributeId": 0x00000017,
"type": "int",
"writable": True,
},
0x0000001A: {
"attributeName": "SafetyStatus",
"attributeId": 0x0000001A,
"type": "int",
"reportable": True,
},
0x0000FFFD: {
"attributeName": "ClusterRevision",
"attributeId": 0x0000FFFD,
"type": "int",
},
},
}
_CLUSTER_ID_DICT = {
0x0000050E: _ACCOUNT_LOGIN_CLUSTER_INFO,
0x0000003C: _ADMINISTRATOR_COMMISSIONING_CLUSTER_INFO,
0x0000050D: _APPLICATION_BASIC_CLUSTER_INFO,
0x0000050C: _APPLICATION_LAUNCHER_CLUSTER_INFO,
0x0000050B: _AUDIO_OUTPUT_CLUSTER_INFO,
0x00000103: _BARRIER_CONTROL_CLUSTER_INFO,
0x00000028: _BASIC_CLUSTER_INFO,
0x0000000F: _BINARY_INPUT_BASIC_CLUSTER_INFO,
0x0000F000: _BINDING_CLUSTER_INFO,
0x00000039: _BRIDGED_DEVICE_BASIC_CLUSTER_INFO,
0x00000300: _COLOR_CONTROL_CLUSTER_INFO,
0x0000050A: _CONTENT_LAUNCHER_CLUSTER_INFO,
0x0000001D: _DESCRIPTOR_CLUSTER_INFO,
0x00000032: _DIAGNOSTIC_LOGS_CLUSTER_INFO,
0x00000101: _DOOR_LOCK_CLUSTER_INFO,
0x00000B04: _ELECTRICAL_MEASUREMENT_CLUSTER_INFO,
0x00000037: _ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_INFO,
0x00000040: _FIXED_LABEL_CLUSTER_INFO,
0x00000404: _FLOW_MEASUREMENT_CLUSTER_INFO,
0x00000030: _GENERAL_COMMISSIONING_CLUSTER_INFO,
0x00000033: _GENERAL_DIAGNOSTICS_CLUSTER_INFO,
0x0000F004: _GROUP_KEY_MANAGEMENT_CLUSTER_INFO,
0x00000004: _GROUPS_CLUSTER_INFO,
0x00000003: _IDENTIFY_CLUSTER_INFO,
0x00000509: _KEYPAD_INPUT_CLUSTER_INFO,
0x00000008: _LEVEL_CONTROL_CLUSTER_INFO,
0x00000508: _LOW_POWER_CLUSTER_INFO,
0x00000507: _MEDIA_INPUT_CLUSTER_INFO,
0x00000506: _MEDIA_PLAYBACK_CLUSTER_INFO,
0x00000031: _NETWORK_COMMISSIONING_CLUSTER_INFO,
0x00000029: _OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_INFO,
0x00000406: _OCCUPANCY_SENSING_CLUSTER_INFO,
0x00000006: _ON_OFF_CLUSTER_INFO,
0x00000007: _ON_OFF_SWITCH_CONFIGURATION_CLUSTER_INFO,
0x0000003E: _OPERATIONAL_CREDENTIALS_CLUSTER_INFO,
0x00000403: _PRESSURE_MEASUREMENT_CLUSTER_INFO,
0x00000200: _PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_INFO,
0x00000405: _RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_INFO,
0x00000005: _SCENES_CLUSTER_INFO,
0x00000034: _SOFTWARE_DIAGNOSTICS_CLUSTER_INFO,
0x0000003B: _SWITCH_CLUSTER_INFO,
0x00000504: _TV_CHANNEL_CLUSTER_INFO,
0x00000505: _TARGET_NAVIGATOR_CLUSTER_INFO,
0x00000402: _TEMPERATURE_MEASUREMENT_CLUSTER_INFO,
0x0000050F: _TEST_CLUSTER_CLUSTER_INFO,
0x00000201: _THERMOSTAT_CLUSTER_INFO,
0x00000204: _THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_INFO,
0x00000035: _THREAD_NETWORK_DIAGNOSTICS_CLUSTER_INFO,
0x00000503: _WAKE_ON_LAN_CLUSTER_INFO,
0x00000036: _WI_FI_NETWORK_DIAGNOSTICS_CLUSTER_INFO,
0x00000102: _WINDOW_COVERING_CLUSTER_INFO,
}
_CLUSTER_NAME_DICT = {
"AccountLogin": _ACCOUNT_LOGIN_CLUSTER_INFO,
"AdministratorCommissioning": _ADMINISTRATOR_COMMISSIONING_CLUSTER_INFO,
"ApplicationBasic": _APPLICATION_BASIC_CLUSTER_INFO,
"ApplicationLauncher": _APPLICATION_LAUNCHER_CLUSTER_INFO,
"AudioOutput": _AUDIO_OUTPUT_CLUSTER_INFO,
"BarrierControl": _BARRIER_CONTROL_CLUSTER_INFO,
"Basic": _BASIC_CLUSTER_INFO,
"BinaryInputBasic": _BINARY_INPUT_BASIC_CLUSTER_INFO,
"Binding": _BINDING_CLUSTER_INFO,
"BridgedDeviceBasic": _BRIDGED_DEVICE_BASIC_CLUSTER_INFO,
"ColorControl": _COLOR_CONTROL_CLUSTER_INFO,
"ContentLauncher": _CONTENT_LAUNCHER_CLUSTER_INFO,
"Descriptor": _DESCRIPTOR_CLUSTER_INFO,
"DiagnosticLogs": _DIAGNOSTIC_LOGS_CLUSTER_INFO,
"DoorLock": _DOOR_LOCK_CLUSTER_INFO,
"ElectricalMeasurement": _ELECTRICAL_MEASUREMENT_CLUSTER_INFO,
"EthernetNetworkDiagnostics": _ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_INFO,
"FixedLabel": _FIXED_LABEL_CLUSTER_INFO,
"FlowMeasurement": _FLOW_MEASUREMENT_CLUSTER_INFO,
"GeneralCommissioning": _GENERAL_COMMISSIONING_CLUSTER_INFO,
"GeneralDiagnostics": _GENERAL_DIAGNOSTICS_CLUSTER_INFO,
"GroupKeyManagement": _GROUP_KEY_MANAGEMENT_CLUSTER_INFO,
"Groups": _GROUPS_CLUSTER_INFO,
"Identify": _IDENTIFY_CLUSTER_INFO,
"KeypadInput": _KEYPAD_INPUT_CLUSTER_INFO,
"LevelControl": _LEVEL_CONTROL_CLUSTER_INFO,
"LowPower": _LOW_POWER_CLUSTER_INFO,
"MediaInput": _MEDIA_INPUT_CLUSTER_INFO,
"MediaPlayback": _MEDIA_PLAYBACK_CLUSTER_INFO,
"NetworkCommissioning": _NETWORK_COMMISSIONING_CLUSTER_INFO,
"OtaSoftwareUpdateProvider": _OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_INFO,
"OccupancySensing": _OCCUPANCY_SENSING_CLUSTER_INFO,
"OnOff": _ON_OFF_CLUSTER_INFO,
"OnOffSwitchConfiguration": _ON_OFF_SWITCH_CONFIGURATION_CLUSTER_INFO,
"OperationalCredentials": _OPERATIONAL_CREDENTIALS_CLUSTER_INFO,
"PressureMeasurement": _PRESSURE_MEASUREMENT_CLUSTER_INFO,
"PumpConfigurationAndControl": _PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_INFO,
"RelativeHumidityMeasurement": _RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_INFO,
"Scenes": _SCENES_CLUSTER_INFO,
"SoftwareDiagnostics": _SOFTWARE_DIAGNOSTICS_CLUSTER_INFO,
"Switch": _SWITCH_CLUSTER_INFO,
"TvChannel": _TV_CHANNEL_CLUSTER_INFO,
"TargetNavigator": _TARGET_NAVIGATOR_CLUSTER_INFO,
"TemperatureMeasurement": _TEMPERATURE_MEASUREMENT_CLUSTER_INFO,
"TestCluster": _TEST_CLUSTER_CLUSTER_INFO,
"Thermostat": _THERMOSTAT_CLUSTER_INFO,
"ThermostatUserInterfaceConfiguration": _THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_INFO,
"ThreadNetworkDiagnostics": _THREAD_NETWORK_DIAGNOSTICS_CLUSTER_INFO,
"WakeOnLan": _WAKE_ON_LAN_CLUSTER_INFO,
"WiFiNetworkDiagnostics": _WI_FI_NETWORK_DIAGNOSTICS_CLUSTER_INFO,
"WindowCovering": _WINDOW_COVERING_CLUSTER_INFO,
}
def __init__(self, chipstack):
self._ChipStack = chipstack
def GetClusterInfoById(self, cluster_id: int):
data = ChipClusters._CLUSTER_ID_DICT.get(cluster_id, None)
if not data:
raise UnknownCluster(cluster_id)
return data
def ListClusterInfo(self):
return ChipClusters._CLUSTER_NAME_DICT
def ListClusterCommands(self):
return { clusterName: {
command["commandName"]: command["args"] for command in clusterInfo["commands"].values()
} for clusterName, clusterInfo in ChipClusters._CLUSTER_NAME_DICT.items() }
def ListClusterAttributes(self):
return { clusterName: {
attribute["attributeName"]: attribute for attribute in clusterInfo["attributes"].values()
} for clusterName, clusterInfo in ChipClusters._CLUSTER_NAME_DICT.items() }
def SendCommand(self, device: ctypes.c_void_p, cluster: str, command: str, endpoint: int, groupid: int, args, imEnabled):
func = getattr(self, "Cluster{}_Command{}".format(cluster, command), None)
if not func:
raise UnknownCommand(cluster, command)
funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync
res = funcCaller(lambda: func(device, endpoint, groupid, **args))
if res != 0:
raise self._ChipStack.ErrorToException(res)
def ReadAttribute(self, device: ctypes.c_void_p, cluster: str, attribute: str, endpoint: int, groupid: int, imEnabled):
func = getattr(self, "Cluster{}_ReadAttribute{}".format(cluster, attribute), None)
if not func:
raise UnknownAttribute(cluster, attribute)
funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync
res = funcCaller(lambda: func(device, endpoint, groupid))
if res != 0:
raise self._ChipStack.ErrorToException(res)
def ConfigureAttribute(self, device: ctypes.c_void_p, cluster: str, attribute: str, endpoint: int, minInterval: int, maxInterval: int, change: int, imEnabled):
func = getattr(self, "Cluster{}_ConfigureAttribute{}".format(cluster, attribute), None)
if not func:
raise UnknownAttribute(cluster, attribute)
funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync
funcCaller(lambda: func(device, endpoint, minInterval, maxInterval, change))
def WriteAttribute(self, device: ctypes.c_void_p, cluster: str, attribute: str, endpoint: int, groupid: int, value, imEnabled):
func = getattr(self, "Cluster{}_WriteAttribute{}".format(cluster, attribute), None)
if not func:
raise UnknownAttribute(cluster, attribute)
funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync
funcCaller(lambda: func(device, endpoint, groupid, value))
# Cluster commands
def ClusterAccountLogin_CommandGetSetupPIN(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, tempAccountIdentifier: bytes):
tempAccountIdentifier = tempAccountIdentifier.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_AccountLogin_GetSetupPIN(
device, ZCLendpoint, ZCLgroupid, tempAccountIdentifier, len(tempAccountIdentifier)
)
def ClusterAccountLogin_CommandLogin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, tempAccountIdentifier: bytes, setupPIN: bytes):
tempAccountIdentifier = tempAccountIdentifier.encode("utf-8") + b'\x00'
setupPIN = setupPIN.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_AccountLogin_Login(
device, ZCLendpoint, ZCLgroupid, tempAccountIdentifier, len(tempAccountIdentifier), setupPIN, len(setupPIN)
)
def ClusterAdministratorCommissioning_CommandOpenBasicCommissioningWindow(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, commissioningTimeout: int):
return self._chipLib.chip_ime_AppendCommand_AdministratorCommissioning_OpenBasicCommissioningWindow(
device, ZCLendpoint, ZCLgroupid, commissioningTimeout
)
def ClusterAdministratorCommissioning_CommandOpenCommissioningWindow(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, commissioningTimeout: int, pAKEVerifier: bytes, discriminator: int, iterations: int, salt: bytes, passcodeID: int):
return self._chipLib.chip_ime_AppendCommand_AdministratorCommissioning_OpenCommissioningWindow(
device, ZCLendpoint, ZCLgroupid, commissioningTimeout, pAKEVerifier, len(pAKEVerifier), discriminator, iterations, salt, len(salt), passcodeID
)
def ClusterAdministratorCommissioning_CommandRevokeCommissioning(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_AdministratorCommissioning_RevokeCommissioning(
device, ZCLendpoint, ZCLgroupid
)
def ClusterApplicationBasic_CommandChangeStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, status: int):
return self._chipLib.chip_ime_AppendCommand_ApplicationBasic_ChangeStatus(
device, ZCLendpoint, ZCLgroupid, status
)
def ClusterApplicationLauncher_CommandLaunchApp(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, data: bytes, catalogVendorId: int, applicationId: bytes):
data = data.encode("utf-8") + b'\x00'
applicationId = applicationId.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_ApplicationLauncher_LaunchApp(
device, ZCLendpoint, ZCLgroupid, data, len(data), catalogVendorId, applicationId, len(applicationId)
)
def ClusterAudioOutput_CommandRenameOutput(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, index: int, name: bytes):
name = name.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_AudioOutput_RenameOutput(
device, ZCLendpoint, ZCLgroupid, index, name, len(name)
)
def ClusterAudioOutput_CommandSelectOutput(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, index: int):
return self._chipLib.chip_ime_AppendCommand_AudioOutput_SelectOutput(
device, ZCLendpoint, ZCLgroupid, index
)
def ClusterBarrierControl_CommandBarrierControlGoToPercent(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, percentOpen: int):
return self._chipLib.chip_ime_AppendCommand_BarrierControl_BarrierControlGoToPercent(
device, ZCLendpoint, ZCLgroupid, percentOpen
)
def ClusterBarrierControl_CommandBarrierControlStop(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_BarrierControl_BarrierControlStop(
device, ZCLendpoint, ZCLgroupid
)
def ClusterBasic_CommandMfgSpecificPing(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_Basic_MfgSpecificPing(
device, ZCLendpoint, ZCLgroupid
)
def ClusterBinding_CommandBind(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, nodeId: int, groupId: int, endpointId: int, clusterId: int):
return self._chipLib.chip_ime_AppendCommand_Binding_Bind(
device, ZCLendpoint, ZCLgroupid, nodeId, groupId, endpointId, clusterId
)
def ClusterBinding_CommandUnbind(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, nodeId: int, groupId: int, endpointId: int, clusterId: int):
return self._chipLib.chip_ime_AppendCommand_Binding_Unbind(
device, ZCLendpoint, ZCLgroupid, nodeId, groupId, endpointId, clusterId
)
def ClusterColorControl_CommandColorLoopSet(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, updateFlags: int, action: int, direction: int, time: int, startHue: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_ColorLoopSet(
device, ZCLendpoint, ZCLgroupid, updateFlags, action, direction, time, startHue, optionsMask, optionsOverride
)
def ClusterColorControl_CommandEnhancedMoveHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, moveMode: int, rate: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedMoveHue(
device, ZCLendpoint, ZCLgroupid, moveMode, rate, optionsMask, optionsOverride
)
def ClusterColorControl_CommandEnhancedMoveToHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, enhancedHue: int, direction: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedMoveToHue(
device, ZCLendpoint, ZCLgroupid, enhancedHue, direction, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandEnhancedMoveToHueAndSaturation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, enhancedHue: int, saturation: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedMoveToHueAndSaturation(
device, ZCLendpoint, ZCLgroupid, enhancedHue, saturation, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandEnhancedStepHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, stepMode: int, stepSize: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedStepHue(
device, ZCLendpoint, ZCLgroupid, stepMode, stepSize, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandMoveColor(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, rateX: int, rateY: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_MoveColor(
device, ZCLendpoint, ZCLgroupid, rateX, rateY, optionsMask, optionsOverride
)
def ClusterColorControl_CommandMoveColorTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, moveMode: int, rate: int, colorTemperatureMinimum: int, colorTemperatureMaximum: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_MoveColorTemperature(
device, ZCLendpoint, ZCLgroupid, moveMode, rate, colorTemperatureMinimum, colorTemperatureMaximum, optionsMask, optionsOverride
)
def ClusterColorControl_CommandMoveHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, moveMode: int, rate: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_MoveHue(
device, ZCLendpoint, ZCLgroupid, moveMode, rate, optionsMask, optionsOverride
)
def ClusterColorControl_CommandMoveSaturation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, moveMode: int, rate: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_MoveSaturation(
device, ZCLendpoint, ZCLgroupid, moveMode, rate, optionsMask, optionsOverride
)
def ClusterColorControl_CommandMoveToColor(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, colorX: int, colorY: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToColor(
device, ZCLendpoint, ZCLgroupid, colorX, colorY, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandMoveToColorTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, colorTemperature: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToColorTemperature(
device, ZCLendpoint, ZCLgroupid, colorTemperature, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandMoveToHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, hue: int, direction: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToHue(
device, ZCLendpoint, ZCLgroupid, hue, direction, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandMoveToHueAndSaturation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, hue: int, saturation: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToHueAndSaturation(
device, ZCLendpoint, ZCLgroupid, hue, saturation, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandMoveToSaturation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, saturation: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToSaturation(
device, ZCLendpoint, ZCLgroupid, saturation, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandStepColor(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, stepX: int, stepY: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_StepColor(
device, ZCLendpoint, ZCLgroupid, stepX, stepY, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandStepColorTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, stepMode: int, stepSize: int, transitionTime: int, colorTemperatureMinimum: int, colorTemperatureMaximum: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_StepColorTemperature(
device, ZCLendpoint, ZCLgroupid, stepMode, stepSize, transitionTime, colorTemperatureMinimum, colorTemperatureMaximum, optionsMask, optionsOverride
)
def ClusterColorControl_CommandStepHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, stepMode: int, stepSize: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_StepHue(
device, ZCLendpoint, ZCLgroupid, stepMode, stepSize, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandStepSaturation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, stepMode: int, stepSize: int, transitionTime: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_StepSaturation(
device, ZCLendpoint, ZCLgroupid, stepMode, stepSize, transitionTime, optionsMask, optionsOverride
)
def ClusterColorControl_CommandStopMoveStep(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, optionsMask: int, optionsOverride: int):
return self._chipLib.chip_ime_AppendCommand_ColorControl_StopMoveStep(
device, ZCLendpoint, ZCLgroupid, optionsMask, optionsOverride
)
def ClusterContentLauncher_CommandLaunchContent(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, autoPlay: bool, data: bytes):
data = data.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_ContentLauncher_LaunchContent(
device, ZCLendpoint, ZCLgroupid, autoPlay, data, len(data)
)
def ClusterContentLauncher_CommandLaunchURL(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, contentURL: bytes, displayString: bytes):
contentURL = contentURL.encode("utf-8") + b'\x00'
displayString = displayString.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_ContentLauncher_LaunchURL(
device, ZCLendpoint, ZCLgroupid, contentURL, len(contentURL), displayString, len(displayString)
)
def ClusterDiagnosticLogs_CommandRetrieveLogsRequest(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, intent: int, requestedProtocol: int, transferFileDesignator: bytes):
return self._chipLib.chip_ime_AppendCommand_DiagnosticLogs_RetrieveLogsRequest(
device, ZCLendpoint, ZCLgroupid, intent, requestedProtocol, transferFileDesignator, len(transferFileDesignator)
)
def ClusterDoorLock_CommandClearAllPins(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_ClearAllPins(
device, ZCLendpoint, ZCLgroupid
)
def ClusterDoorLock_CommandClearAllRfids(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_ClearAllRfids(
device, ZCLendpoint, ZCLgroupid
)
def ClusterDoorLock_CommandClearHolidaySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, scheduleId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_ClearHolidaySchedule(
device, ZCLendpoint, ZCLgroupid, scheduleId
)
def ClusterDoorLock_CommandClearPin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, userId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_ClearPin(
device, ZCLendpoint, ZCLgroupid, userId
)
def ClusterDoorLock_CommandClearRfid(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, userId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_ClearRfid(
device, ZCLendpoint, ZCLgroupid, userId
)
def ClusterDoorLock_CommandClearWeekdaySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, scheduleId: int, userId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_ClearWeekdaySchedule(
device, ZCLendpoint, ZCLgroupid, scheduleId, userId
)
def ClusterDoorLock_CommandClearYeardaySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, scheduleId: int, userId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_ClearYeardaySchedule(
device, ZCLendpoint, ZCLgroupid, scheduleId, userId
)
def ClusterDoorLock_CommandGetHolidaySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, scheduleId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_GetHolidaySchedule(
device, ZCLendpoint, ZCLgroupid, scheduleId
)
def ClusterDoorLock_CommandGetLogRecord(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, logIndex: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_GetLogRecord(
device, ZCLendpoint, ZCLgroupid, logIndex
)
def ClusterDoorLock_CommandGetPin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, userId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_GetPin(
device, ZCLendpoint, ZCLgroupid, userId
)
def ClusterDoorLock_CommandGetRfid(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, userId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_GetRfid(
device, ZCLendpoint, ZCLgroupid, userId
)
def ClusterDoorLock_CommandGetUserType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, userId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_GetUserType(
device, ZCLendpoint, ZCLgroupid, userId
)
def ClusterDoorLock_CommandGetWeekdaySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, scheduleId: int, userId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_GetWeekdaySchedule(
device, ZCLendpoint, ZCLgroupid, scheduleId, userId
)
def ClusterDoorLock_CommandGetYeardaySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, scheduleId: int, userId: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_GetYeardaySchedule(
device, ZCLendpoint, ZCLgroupid, scheduleId, userId
)
def ClusterDoorLock_CommandLockDoor(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, pin: bytes):
pin = pin.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_DoorLock_LockDoor(
device, ZCLendpoint, ZCLgroupid, pin, len(pin)
)
def ClusterDoorLock_CommandSetHolidaySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, scheduleId: int, localStartTime: int, localEndTime: int, operatingModeDuringHoliday: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_SetHolidaySchedule(
device, ZCLendpoint, ZCLgroupid, scheduleId, localStartTime, localEndTime, operatingModeDuringHoliday
)
def ClusterDoorLock_CommandSetPin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, userId: int, userStatus: int, userType: int, pin: bytes):
pin = pin.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_DoorLock_SetPin(
device, ZCLendpoint, ZCLgroupid, userId, userStatus, userType, pin, len(pin)
)
def ClusterDoorLock_CommandSetRfid(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, userId: int, userStatus: int, userType: int, id: bytes):
id = id.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_DoorLock_SetRfid(
device, ZCLendpoint, ZCLgroupid, userId, userStatus, userType, id, len(id)
)
def ClusterDoorLock_CommandSetUserType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, userId: int, userType: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_SetUserType(
device, ZCLendpoint, ZCLgroupid, userId, userType
)
def ClusterDoorLock_CommandSetWeekdaySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, scheduleId: int, userId: int, daysMask: int, startHour: int, startMinute: int, endHour: int, endMinute: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_SetWeekdaySchedule(
device, ZCLendpoint, ZCLgroupid, scheduleId, userId, daysMask, startHour, startMinute, endHour, endMinute
)
def ClusterDoorLock_CommandSetYeardaySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, scheduleId: int, userId: int, localStartTime: int, localEndTime: int):
return self._chipLib.chip_ime_AppendCommand_DoorLock_SetYeardaySchedule(
device, ZCLendpoint, ZCLgroupid, scheduleId, userId, localStartTime, localEndTime
)
def ClusterDoorLock_CommandUnlockDoor(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, pin: bytes):
pin = pin.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_DoorLock_UnlockDoor(
device, ZCLendpoint, ZCLgroupid, pin, len(pin)
)
def ClusterDoorLock_CommandUnlockWithTimeout(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, timeoutInSeconds: int, pin: bytes):
pin = pin.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_DoorLock_UnlockWithTimeout(
device, ZCLendpoint, ZCLgroupid, timeoutInSeconds, pin, len(pin)
)
def ClusterEthernetNetworkDiagnostics_CommandResetCounts(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_EthernetNetworkDiagnostics_ResetCounts(
device, ZCLendpoint, ZCLgroupid
)
def ClusterGeneralCommissioning_CommandArmFailSafe(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, expiryLengthSeconds: int, breadcrumb: int, timeoutMs: int):
return self._chipLib.chip_ime_AppendCommand_GeneralCommissioning_ArmFailSafe(
device, ZCLendpoint, ZCLgroupid, expiryLengthSeconds, breadcrumb, timeoutMs
)
def ClusterGeneralCommissioning_CommandCommissioningComplete(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_GeneralCommissioning_CommissioningComplete(
device, ZCLendpoint, ZCLgroupid
)
def ClusterGeneralCommissioning_CommandSetRegulatoryConfig(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, location: int, countryCode: bytes, breadcrumb: int, timeoutMs: int):
countryCode = countryCode.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_GeneralCommissioning_SetRegulatoryConfig(
device, ZCLendpoint, ZCLgroupid, location, countryCode, len(countryCode), breadcrumb, timeoutMs
)
def ClusterGroups_CommandAddGroup(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int, groupName: bytes):
groupName = groupName.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_Groups_AddGroup(
device, ZCLendpoint, ZCLgroupid, groupId, groupName, len(groupName)
)
def ClusterGroups_CommandAddGroupIfIdentifying(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int, groupName: bytes):
groupName = groupName.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_Groups_AddGroupIfIdentifying(
device, ZCLendpoint, ZCLgroupid, groupId, groupName, len(groupName)
)
def ClusterGroups_CommandGetGroupMembership(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupCount: int, groupList: int):
return self._chipLib.chip_ime_AppendCommand_Groups_GetGroupMembership(
device, ZCLendpoint, ZCLgroupid, groupCount, groupList
)
def ClusterGroups_CommandRemoveAllGroups(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_Groups_RemoveAllGroups(
device, ZCLendpoint, ZCLgroupid
)
def ClusterGroups_CommandRemoveGroup(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int):
return self._chipLib.chip_ime_AppendCommand_Groups_RemoveGroup(
device, ZCLendpoint, ZCLgroupid, groupId
)
def ClusterGroups_CommandViewGroup(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int):
return self._chipLib.chip_ime_AppendCommand_Groups_ViewGroup(
device, ZCLendpoint, ZCLgroupid, groupId
)
def ClusterIdentify_CommandIdentify(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, identifyTime: int):
return self._chipLib.chip_ime_AppendCommand_Identify_Identify(
device, ZCLendpoint, ZCLgroupid, identifyTime
)
def ClusterIdentify_CommandIdentifyQuery(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_Identify_IdentifyQuery(
device, ZCLendpoint, ZCLgroupid
)
def ClusterKeypadInput_CommandSendKey(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, keyCode: int):
return self._chipLib.chip_ime_AppendCommand_KeypadInput_SendKey(
device, ZCLendpoint, ZCLgroupid, keyCode
)
def ClusterLevelControl_CommandMove(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, moveMode: int, rate: int, optionMask: int, optionOverride: int):
return self._chipLib.chip_ime_AppendCommand_LevelControl_Move(
device, ZCLendpoint, ZCLgroupid, moveMode, rate, optionMask, optionOverride
)
def ClusterLevelControl_CommandMoveToLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, level: int, transitionTime: int, optionMask: int, optionOverride: int):
return self._chipLib.chip_ime_AppendCommand_LevelControl_MoveToLevel(
device, ZCLendpoint, ZCLgroupid, level, transitionTime, optionMask, optionOverride
)
def ClusterLevelControl_CommandMoveToLevelWithOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, level: int, transitionTime: int):
return self._chipLib.chip_ime_AppendCommand_LevelControl_MoveToLevelWithOnOff(
device, ZCLendpoint, ZCLgroupid, level, transitionTime
)
def ClusterLevelControl_CommandMoveWithOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, moveMode: int, rate: int):
return self._chipLib.chip_ime_AppendCommand_LevelControl_MoveWithOnOff(
device, ZCLendpoint, ZCLgroupid, moveMode, rate
)
def ClusterLevelControl_CommandStep(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, stepMode: int, stepSize: int, transitionTime: int, optionMask: int, optionOverride: int):
return self._chipLib.chip_ime_AppendCommand_LevelControl_Step(
device, ZCLendpoint, ZCLgroupid, stepMode, stepSize, transitionTime, optionMask, optionOverride
)
def ClusterLevelControl_CommandStepWithOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, stepMode: int, stepSize: int, transitionTime: int):
return self._chipLib.chip_ime_AppendCommand_LevelControl_StepWithOnOff(
device, ZCLendpoint, ZCLgroupid, stepMode, stepSize, transitionTime
)
def ClusterLevelControl_CommandStop(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, optionMask: int, optionOverride: int):
return self._chipLib.chip_ime_AppendCommand_LevelControl_Stop(
device, ZCLendpoint, ZCLgroupid, optionMask, optionOverride
)
def ClusterLevelControl_CommandStopWithOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_LevelControl_StopWithOnOff(
device, ZCLendpoint, ZCLgroupid
)
def ClusterLowPower_CommandSleep(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_LowPower_Sleep(
device, ZCLendpoint, ZCLgroupid
)
def ClusterMediaInput_CommandHideInputStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_MediaInput_HideInputStatus(
device, ZCLendpoint, ZCLgroupid
)
def ClusterMediaInput_CommandRenameInput(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, index: int, name: bytes):
name = name.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_MediaInput_RenameInput(
device, ZCLendpoint, ZCLgroupid, index, name, len(name)
)
def ClusterMediaInput_CommandSelectInput(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, index: int):
return self._chipLib.chip_ime_AppendCommand_MediaInput_SelectInput(
device, ZCLendpoint, ZCLgroupid, index
)
def ClusterMediaInput_CommandShowInputStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_MediaInput_ShowInputStatus(
device, ZCLendpoint, ZCLgroupid
)
def ClusterMediaPlayback_CommandMediaFastForward(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaFastForward(
device, ZCLendpoint, ZCLgroupid
)
def ClusterMediaPlayback_CommandMediaNext(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaNext(
device, ZCLendpoint, ZCLgroupid
)
def ClusterMediaPlayback_CommandMediaPause(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaPause(
device, ZCLendpoint, ZCLgroupid
)
def ClusterMediaPlayback_CommandMediaPlay(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaPlay(
device, ZCLendpoint, ZCLgroupid
)
def ClusterMediaPlayback_CommandMediaPrevious(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaPrevious(
device, ZCLendpoint, ZCLgroupid
)
def ClusterMediaPlayback_CommandMediaRewind(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaRewind(
device, ZCLendpoint, ZCLgroupid
)
def ClusterMediaPlayback_CommandMediaSeek(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, position: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaSeek(
device, ZCLendpoint, ZCLgroupid, position
)
def ClusterMediaPlayback_CommandMediaSkipBackward(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, deltaPositionMilliseconds: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaSkipBackward(
device, ZCLendpoint, ZCLgroupid, deltaPositionMilliseconds
)
def ClusterMediaPlayback_CommandMediaSkipForward(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, deltaPositionMilliseconds: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaSkipForward(
device, ZCLendpoint, ZCLgroupid, deltaPositionMilliseconds
)
def ClusterMediaPlayback_CommandMediaStartOver(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaStartOver(
device, ZCLendpoint, ZCLgroupid
)
def ClusterMediaPlayback_CommandMediaStop(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaStop(
device, ZCLendpoint, ZCLgroupid
)
def ClusterNetworkCommissioning_CommandAddThreadNetwork(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, operationalDataset: bytes, breadcrumb: int, timeoutMs: int):
return self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_AddThreadNetwork(
device, ZCLendpoint, ZCLgroupid, operationalDataset, len(operationalDataset), breadcrumb, timeoutMs
)
def ClusterNetworkCommissioning_CommandAddWiFiNetwork(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, ssid: bytes, credentials: bytes, breadcrumb: int, timeoutMs: int):
return self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_AddWiFiNetwork(
device, ZCLendpoint, ZCLgroupid, ssid, len(ssid), credentials, len(credentials), breadcrumb, timeoutMs
)
def ClusterNetworkCommissioning_CommandDisableNetwork(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, networkID: bytes, breadcrumb: int, timeoutMs: int):
return self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_DisableNetwork(
device, ZCLendpoint, ZCLgroupid, networkID, len(networkID), breadcrumb, timeoutMs
)
def ClusterNetworkCommissioning_CommandEnableNetwork(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, networkID: bytes, breadcrumb: int, timeoutMs: int):
return self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_EnableNetwork(
device, ZCLendpoint, ZCLgroupid, networkID, len(networkID), breadcrumb, timeoutMs
)
def ClusterNetworkCommissioning_CommandGetLastNetworkCommissioningResult(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, timeoutMs: int):
return self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_GetLastNetworkCommissioningResult(
device, ZCLendpoint, ZCLgroupid, timeoutMs
)
def ClusterNetworkCommissioning_CommandRemoveNetwork(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, networkID: bytes, breadcrumb: int, timeoutMs: int):
return self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_RemoveNetwork(
device, ZCLendpoint, ZCLgroupid, networkID, len(networkID), breadcrumb, timeoutMs
)
def ClusterNetworkCommissioning_CommandScanNetworks(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, ssid: bytes, breadcrumb: int, timeoutMs: int):
return self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_ScanNetworks(
device, ZCLendpoint, ZCLgroupid, ssid, len(ssid), breadcrumb, timeoutMs
)
def ClusterNetworkCommissioning_CommandUpdateThreadNetwork(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, operationalDataset: bytes, breadcrumb: int, timeoutMs: int):
return self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_UpdateThreadNetwork(
device, ZCLendpoint, ZCLgroupid, operationalDataset, len(operationalDataset), breadcrumb, timeoutMs
)
def ClusterNetworkCommissioning_CommandUpdateWiFiNetwork(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, ssid: bytes, credentials: bytes, breadcrumb: int, timeoutMs: int):
return self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_UpdateWiFiNetwork(
device, ZCLendpoint, ZCLgroupid, ssid, len(ssid), credentials, len(credentials), breadcrumb, timeoutMs
)
def ClusterOtaSoftwareUpdateProvider_CommandApplyUpdateRequest(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, updateToken: bytes, newVersion: int):
return self._chipLib.chip_ime_AppendCommand_OtaSoftwareUpdateProvider_ApplyUpdateRequest(
device, ZCLendpoint, ZCLgroupid, updateToken, len(updateToken), newVersion
)
def ClusterOtaSoftwareUpdateProvider_CommandNotifyUpdateApplied(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, updateToken: bytes, currentVersion: int):
return self._chipLib.chip_ime_AppendCommand_OtaSoftwareUpdateProvider_NotifyUpdateApplied(
device, ZCLendpoint, ZCLgroupid, updateToken, len(updateToken), currentVersion
)
def ClusterOtaSoftwareUpdateProvider_CommandQueryImage(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, vendorId: int, productId: int, imageType: int, hardwareVersion: int, currentVersion: int, protocolsSupported: int, location: bytes, requestorCanConsent: bool, metadataForProvider: bytes):
location = location.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_OtaSoftwareUpdateProvider_QueryImage(
device, ZCLendpoint, ZCLgroupid, vendorId, productId, imageType, hardwareVersion, currentVersion, protocolsSupported, location, len(location), requestorCanConsent, metadataForProvider, len(metadataForProvider)
)
def ClusterOnOff_CommandOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_OnOff_Off(
device, ZCLendpoint, ZCLgroupid
)
def ClusterOnOff_CommandOffWithEffect(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, effectId: int, effectVariant: int):
return self._chipLib.chip_ime_AppendCommand_OnOff_OffWithEffect(
device, ZCLendpoint, ZCLgroupid, effectId, effectVariant
)
def ClusterOnOff_CommandOn(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_OnOff_On(
device, ZCLendpoint, ZCLgroupid
)
def ClusterOnOff_CommandOnWithRecallGlobalScene(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_OnOff_OnWithRecallGlobalScene(
device, ZCLendpoint, ZCLgroupid
)
def ClusterOnOff_CommandOnWithTimedOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, onOffControl: int, onTime: int, offWaitTime: int):
return self._chipLib.chip_ime_AppendCommand_OnOff_OnWithTimedOff(
device, ZCLendpoint, ZCLgroupid, onOffControl, onTime, offWaitTime
)
def ClusterOnOff_CommandToggle(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_OnOff_Toggle(
device, ZCLendpoint, ZCLgroupid
)
def ClusterOperationalCredentials_CommandAddNOC(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, nOCArray: bytes, iPKValue: bytes, caseAdminNode: int, adminVendorId: int):
return self._chipLib.chip_ime_AppendCommand_OperationalCredentials_AddNOC(
device, ZCLendpoint, ZCLgroupid, nOCArray, len(nOCArray), iPKValue, len(iPKValue), caseAdminNode, adminVendorId
)
def ClusterOperationalCredentials_CommandAddTrustedRootCertificate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, rootCertificate: bytes):
return self._chipLib.chip_ime_AppendCommand_OperationalCredentials_AddTrustedRootCertificate(
device, ZCLendpoint, ZCLgroupid, rootCertificate, len(rootCertificate)
)
def ClusterOperationalCredentials_CommandOpCSRRequest(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, cSRNonce: bytes):
return self._chipLib.chip_ime_AppendCommand_OperationalCredentials_OpCSRRequest(
device, ZCLendpoint, ZCLgroupid, cSRNonce, len(cSRNonce)
)
def ClusterOperationalCredentials_CommandRemoveFabric(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, fabricIndex: int):
return self._chipLib.chip_ime_AppendCommand_OperationalCredentials_RemoveFabric(
device, ZCLendpoint, ZCLgroupid, fabricIndex
)
def ClusterOperationalCredentials_CommandRemoveTrustedRootCertificate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, trustedRootIdentifier: bytes):
return self._chipLib.chip_ime_AppendCommand_OperationalCredentials_RemoveTrustedRootCertificate(
device, ZCLendpoint, ZCLgroupid, trustedRootIdentifier, len(trustedRootIdentifier)
)
def ClusterOperationalCredentials_CommandUpdateFabricLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, label: bytes):
label = label.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_OperationalCredentials_UpdateFabricLabel(
device, ZCLendpoint, ZCLgroupid, label, len(label)
)
def ClusterOperationalCredentials_CommandUpdateNOC(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, nOCArray: bytes):
return self._chipLib.chip_ime_AppendCommand_OperationalCredentials_UpdateNOC(
device, ZCLendpoint, ZCLgroupid, nOCArray, len(nOCArray)
)
def ClusterScenes_CommandAddScene(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int, sceneId: int, transitionTime: int, sceneName: bytes, clusterId: int, length: int, value: int):
sceneName = sceneName.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_Scenes_AddScene(
device, ZCLendpoint, ZCLgroupid, groupId, sceneId, transitionTime, sceneName, len(sceneName), clusterId, length, value
)
def ClusterScenes_CommandGetSceneMembership(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int):
return self._chipLib.chip_ime_AppendCommand_Scenes_GetSceneMembership(
device, ZCLendpoint, ZCLgroupid, groupId
)
def ClusterScenes_CommandRecallScene(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int, sceneId: int, transitionTime: int):
return self._chipLib.chip_ime_AppendCommand_Scenes_RecallScene(
device, ZCLendpoint, ZCLgroupid, groupId, sceneId, transitionTime
)
def ClusterScenes_CommandRemoveAllScenes(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int):
return self._chipLib.chip_ime_AppendCommand_Scenes_RemoveAllScenes(
device, ZCLendpoint, ZCLgroupid, groupId
)
def ClusterScenes_CommandRemoveScene(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int, sceneId: int):
return self._chipLib.chip_ime_AppendCommand_Scenes_RemoveScene(
device, ZCLendpoint, ZCLgroupid, groupId, sceneId
)
def ClusterScenes_CommandStoreScene(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int, sceneId: int):
return self._chipLib.chip_ime_AppendCommand_Scenes_StoreScene(
device, ZCLendpoint, ZCLgroupid, groupId, sceneId
)
def ClusterScenes_CommandViewScene(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, groupId: int, sceneId: int):
return self._chipLib.chip_ime_AppendCommand_Scenes_ViewScene(
device, ZCLendpoint, ZCLgroupid, groupId, sceneId
)
def ClusterSoftwareDiagnostics_CommandResetWatermarks(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_SoftwareDiagnostics_ResetWatermarks(
device, ZCLendpoint, ZCLgroupid
)
def ClusterTvChannel_CommandChangeChannel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, match: bytes):
match = match.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_TvChannel_ChangeChannel(
device, ZCLendpoint, ZCLgroupid, match, len(match)
)
def ClusterTvChannel_CommandChangeChannelByNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, majorNumber: int, minorNumber: int):
return self._chipLib.chip_ime_AppendCommand_TvChannel_ChangeChannelByNumber(
device, ZCLendpoint, ZCLgroupid, majorNumber, minorNumber
)
def ClusterTvChannel_CommandSkipChannel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, count: int):
return self._chipLib.chip_ime_AppendCommand_TvChannel_SkipChannel(
device, ZCLendpoint, ZCLgroupid, count
)
def ClusterTargetNavigator_CommandNavigateTarget(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, target: int, data: bytes):
data = data.encode("utf-8") + b'\x00'
return self._chipLib.chip_ime_AppendCommand_TargetNavigator_NavigateTarget(
device, ZCLendpoint, ZCLgroupid, target, data, len(data)
)
def ClusterTestCluster_CommandTest(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_TestCluster_Test(
device, ZCLendpoint, ZCLgroupid
)
def ClusterTestCluster_CommandTestAddArguments(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, arg1: int, arg2: int):
return self._chipLib.chip_ime_AppendCommand_TestCluster_TestAddArguments(
device, ZCLendpoint, ZCLgroupid, arg1, arg2
)
def ClusterTestCluster_CommandTestNotHandled(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_TestCluster_TestNotHandled(
device, ZCLendpoint, ZCLgroupid
)
def ClusterTestCluster_CommandTestSpecific(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_TestCluster_TestSpecific(
device, ZCLendpoint, ZCLgroupid
)
def ClusterTestCluster_CommandTestUnknownCommand(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_TestCluster_TestUnknownCommand(
device, ZCLendpoint, ZCLgroupid
)
def ClusterThermostat_CommandClearWeeklySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_Thermostat_ClearWeeklySchedule(
device, ZCLendpoint, ZCLgroupid
)
def ClusterThermostat_CommandGetRelayStatusLog(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_Thermostat_GetRelayStatusLog(
device, ZCLendpoint, ZCLgroupid
)
def ClusterThermostat_CommandGetWeeklySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, daysToReturn: int, modeToReturn: int):
return self._chipLib.chip_ime_AppendCommand_Thermostat_GetWeeklySchedule(
device, ZCLendpoint, ZCLgroupid, daysToReturn, modeToReturn
)
def ClusterThermostat_CommandSetWeeklySchedule(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, numberOfTransitionsForSequence: int, dayOfWeekForSequence: int, modeForSequence: int, payload: int):
return self._chipLib.chip_ime_AppendCommand_Thermostat_SetWeeklySchedule(
device, ZCLendpoint, ZCLgroupid, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, payload
)
def ClusterThermostat_CommandSetpointRaiseLower(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, mode: int, amount: int):
return self._chipLib.chip_ime_AppendCommand_Thermostat_SetpointRaiseLower(
device, ZCLendpoint, ZCLgroupid, mode, amount
)
def ClusterThreadNetworkDiagnostics_CommandResetCounts(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_ThreadNetworkDiagnostics_ResetCounts(
device, ZCLendpoint, ZCLgroupid
)
def ClusterWiFiNetworkDiagnostics_CommandResetCounts(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_WiFiNetworkDiagnostics_ResetCounts(
device, ZCLendpoint, ZCLgroupid
)
def ClusterWindowCovering_CommandDownOrClose(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_WindowCovering_DownOrClose(
device, ZCLendpoint, ZCLgroupid
)
def ClusterWindowCovering_CommandGoToLiftPercentage(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, liftPercentageValue: int, liftPercent100thsValue: int):
return self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToLiftPercentage(
device, ZCLendpoint, ZCLgroupid, liftPercentageValue, liftPercent100thsValue
)
def ClusterWindowCovering_CommandGoToLiftValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, liftValue: int):
return self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToLiftValue(
device, ZCLendpoint, ZCLgroupid, liftValue
)
def ClusterWindowCovering_CommandGoToTiltPercentage(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, tiltPercentageValue: int, tiltPercent100thsValue: int):
return self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToTiltPercentage(
device, ZCLendpoint, ZCLgroupid, tiltPercentageValue, tiltPercent100thsValue
)
def ClusterWindowCovering_CommandGoToTiltValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, tiltValue: int):
return self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToTiltValue(
device, ZCLendpoint, ZCLgroupid, tiltValue
)
def ClusterWindowCovering_CommandStopMotion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_WindowCovering_StopMotion(
device, ZCLendpoint, ZCLgroupid
)
def ClusterWindowCovering_CommandUpOrOpen(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_AppendCommand_WindowCovering_UpOrOpen(
device, ZCLendpoint, ZCLgroupid
)
# Cluster attributes
def ClusterAccountLogin_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_AccountLogin_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterAdministratorCommissioning_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationBasic_ReadAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorName(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationBasic_ReadAttributeVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorId(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationBasic_ReadAttributeApplicationName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationName(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationBasic_ReadAttributeProductId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ProductId(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationBasic_ReadAttributeApplicationId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationId(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationBasic_ReadAttributeCatalogVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationBasic_ReadAttributeApplicationStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationLauncher_ReadAttributeApplicationLauncherList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationLauncher_ReadAttributeCatalogVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationLauncher_ReadAttributeApplicationId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId(device, ZCLendpoint, ZCLgroupid)
def ClusterApplicationLauncher_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterAudioOutput_ReadAttributeAudioOutputList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_AudioOutput_AudioOutputList(device, ZCLendpoint, ZCLgroupid)
def ClusterAudioOutput_ReadAttributeCurrentAudioOutput(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput(device, ZCLendpoint, ZCLgroupid)
def ClusterAudioOutput_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_AudioOutput_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterBarrierControl_ReadAttributeBarrierMovingState(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierMovingState(device, ZCLendpoint, ZCLgroupid)
def ClusterBarrierControl_ReadAttributeBarrierSafetyStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus(device, ZCLendpoint, ZCLgroupid)
def ClusterBarrierControl_ReadAttributeBarrierCapabilities(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities(device, ZCLendpoint, ZCLgroupid)
def ClusterBarrierControl_ReadAttributeBarrierPosition(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierPosition(device, ZCLendpoint, ZCLgroupid)
def ClusterBarrierControl_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BarrierControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeInteractionModelVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_InteractionModelVersion(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_VendorName(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeVendorID(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_VendorID(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeProductName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_ProductName(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeProductID(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_ProductID(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeUserLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_UserLabel(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_WriteAttributeUserLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bytes):
value = value.encode("utf-8")
return self._chipLib.chip_ime_WriteAttribute_Basic_UserLabel(device, ZCLendpoint, ZCLgroupid, value, len(value))
def ClusterBasic_ReadAttributeLocation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_Location(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_WriteAttributeLocation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bytes):
value = value.encode("utf-8")
return self._chipLib.chip_ime_WriteAttribute_Basic_Location(device, ZCLendpoint, ZCLgroupid, value, len(value))
def ClusterBasic_ReadAttributeHardwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersion(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeHardwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersionString(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeSoftwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersion(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeSoftwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersionString(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeManufacturingDate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_ManufacturingDate(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributePartNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_PartNumber(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeProductURL(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_ProductURL(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeProductLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_ProductLabel(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeSerialNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_SerialNumber(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeLocalConfigDisabled(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_LocalConfigDisabled(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_WriteAttributeLocalConfigDisabled(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bool):
return self._chipLib.chip_ime_WriteAttribute_Basic_LocalConfigDisabled(device, ZCLendpoint, ZCLgroupid, value)
def ClusterBasic_ReadAttributeReachable(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_Reachable(device, ZCLendpoint, ZCLgroupid)
def ClusterBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Basic_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterBinaryInputBasic_ReadAttributeOutOfService(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_OutOfService(device, ZCLendpoint, ZCLgroupid)
def ClusterBinaryInputBasic_WriteAttributeOutOfService(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bool):
return self._chipLib.chip_ime_WriteAttribute_BinaryInputBasic_OutOfService(device, ZCLendpoint, ZCLgroupid, value)
def ClusterBinaryInputBasic_ReadAttributePresentValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_PresentValue(device, ZCLendpoint, ZCLgroupid)
def ClusterBinaryInputBasic_ConfigureAttributePresentValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_BinaryInputBasic_PresentValue(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterBinaryInputBasic_WriteAttributePresentValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bool):
return self._chipLib.chip_ime_WriteAttribute_BinaryInputBasic_PresentValue(device, ZCLendpoint, ZCLgroupid, value)
def ClusterBinaryInputBasic_ReadAttributeStatusFlags(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags(device, ZCLendpoint, ZCLgroupid)
def ClusterBinaryInputBasic_ConfigureAttributeStatusFlags(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_BinaryInputBasic_StatusFlags(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterBinaryInputBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterBinding_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Binding_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeVendorID(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeProductName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeUserLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_WriteAttributeUserLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bytes):
value = value.encode("utf-8")
return self._chipLib.chip_ime_WriteAttribute_BridgedDeviceBasic_UserLabel(device, ZCLendpoint, ZCLgroupid, value, len(value))
def ClusterBridgedDeviceBasic_ReadAttributeHardwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeHardwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeSoftwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeSoftwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeManufacturingDate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributePartNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeProductURL(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeProductLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeSerialNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeReachable(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable(device, ZCLendpoint, ZCLgroupid)
def ClusterBridgedDeviceBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeCurrentHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentHue(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ConfigureAttributeCurrentHue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentHue(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterColorControl_ReadAttributeCurrentSaturation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentSaturation(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ConfigureAttributeCurrentSaturation(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentSaturation(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterColorControl_ReadAttributeRemainingTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_RemainingTime(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeCurrentX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentX(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ConfigureAttributeCurrentX(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentX(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterColorControl_ReadAttributeCurrentY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentY(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ConfigureAttributeCurrentY(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentY(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterColorControl_ReadAttributeDriftCompensation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_DriftCompensation(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeCompensationText(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_CompensationText(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeColorTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTemperature(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ConfigureAttributeColorTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_ColorControl_ColorTemperature(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterColorControl_ReadAttributeColorMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorMode(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeColorControlOptions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorControlOptions(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeColorControlOptions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorControlOptions(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeNumberOfPrimaries(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary1X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1X(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary1Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Y(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary1Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Intensity(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary2X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2X(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary2Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Y(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary2Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Intensity(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary3X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3X(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary3Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Y(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary3Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Intensity(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary4X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4X(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary4Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Y(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary4Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Intensity(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary5X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5X(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary5Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Y(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary5Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Intensity(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary6X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6X(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary6Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Y(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributePrimary6Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Intensity(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeWhitePointX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointX(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeWhitePointX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_WhitePointX(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeWhitePointY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointY(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeWhitePointY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_WhitePointY(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeColorPointRX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRX(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeColorPointRX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointRX(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeColorPointRY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRY(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeColorPointRY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointRY(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeColorPointRIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeColorPointRIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointRIntensity(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeColorPointGX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGX(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeColorPointGX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointGX(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeColorPointGY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGY(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeColorPointGY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointGY(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeColorPointGIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeColorPointGIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointGIntensity(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeColorPointBX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBX(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeColorPointBX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointBX(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeColorPointBY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBY(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeColorPointBY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointBY(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeColorPointBIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeColorPointBIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointBIntensity(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeEnhancedCurrentHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeEnhancedColorMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedColorMode(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeColorLoopActive(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopActive(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeColorLoopDirection(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopDirection(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeColorLoopTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopTime(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeColorLoopStartEnhancedHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeColorLoopStoredEnhancedHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeColorCapabilities(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorCapabilities(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeColorTempPhysicalMin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeColorTempPhysicalMax(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeCoupleColorTempToLevelMinMireds(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_ReadAttributeStartUpColorTemperatureMireds(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(device, ZCLendpoint, ZCLgroupid)
def ClusterColorControl_WriteAttributeStartUpColorTemperatureMireds(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ColorControl_StartUpColorTemperatureMireds(device, ZCLendpoint, ZCLgroupid, value)
def ClusterColorControl_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ColorControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterContentLauncher_ReadAttributeAcceptsHeaderList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList(device, ZCLendpoint, ZCLgroupid)
def ClusterContentLauncher_ReadAttributeSupportedStreamingTypes(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes(device, ZCLendpoint, ZCLgroupid)
def ClusterContentLauncher_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ContentLauncher_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterDescriptor_ReadAttributeDeviceList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Descriptor_DeviceList(device, ZCLendpoint, ZCLgroupid)
def ClusterDescriptor_ReadAttributeServerList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Descriptor_ServerList(device, ZCLendpoint, ZCLgroupid)
def ClusterDescriptor_ReadAttributeClientList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Descriptor_ClientList(device, ZCLendpoint, ZCLgroupid)
def ClusterDescriptor_ReadAttributePartsList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Descriptor_PartsList(device, ZCLendpoint, ZCLgroupid)
def ClusterDescriptor_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Descriptor_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterDoorLock_ReadAttributeLockState(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_DoorLock_LockState(device, ZCLendpoint, ZCLgroupid)
def ClusterDoorLock_ConfigureAttributeLockState(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_DoorLock_LockState(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterDoorLock_ReadAttributeLockType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_DoorLock_LockType(device, ZCLendpoint, ZCLgroupid)
def ClusterDoorLock_ReadAttributeActuatorEnabled(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(device, ZCLendpoint, ZCLgroupid)
def ClusterDoorLock_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_DoorLock_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeMeasurementType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeTotalActivePower(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeRmsVoltage(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeRmsVoltageMin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeRmsVoltageMax(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeRmsCurrent(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeRmsCurrentMin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeRmsCurrentMax(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeActivePower(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeActivePowerMin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeActivePowerMax(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax(device, ZCLendpoint, ZCLgroupid)
def ClusterElectricalMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterEthernetNetworkDiagnostics_ReadAttributePacketRxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount(device, ZCLendpoint, ZCLgroupid)
def ClusterEthernetNetworkDiagnostics_ReadAttributePacketTxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount(device, ZCLendpoint, ZCLgroupid)
def ClusterEthernetNetworkDiagnostics_ReadAttributeTxErrCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount(device, ZCLendpoint, ZCLgroupid)
def ClusterEthernetNetworkDiagnostics_ReadAttributeCollisionCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount(device, ZCLendpoint, ZCLgroupid)
def ClusterEthernetNetworkDiagnostics_ReadAttributeOverrunCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount(device, ZCLendpoint, ZCLgroupid)
def ClusterEthernetNetworkDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterFixedLabel_ReadAttributeLabelList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_FixedLabel_LabelList(device, ZCLendpoint, ZCLgroupid)
def ClusterFixedLabel_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_FixedLabel_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterFlowMeasurement_ReadAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterFlowMeasurement_ReadAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterFlowMeasurement_ReadAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterFlowMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterGeneralCommissioning_ReadAttributeBreadcrumb(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb(device, ZCLendpoint, ZCLgroupid)
def ClusterGeneralCommissioning_WriteAttributeBreadcrumb(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_GeneralCommissioning_Breadcrumb(device, ZCLendpoint, ZCLgroupid, value)
def ClusterGeneralCommissioning_ReadAttributeBasicCommissioningInfoList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_BasicCommissioningInfoList(device, ZCLendpoint, ZCLgroupid)
def ClusterGeneralCommissioning_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterGeneralDiagnostics_ReadAttributeNetworkInterfaces(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces(device, ZCLendpoint, ZCLgroupid)
def ClusterGeneralDiagnostics_ReadAttributeRebootCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount(device, ZCLendpoint, ZCLgroupid)
def ClusterGeneralDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterGroupKeyManagement_ReadAttributeGroups(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_Groups(device, ZCLendpoint, ZCLgroupid)
def ClusterGroupKeyManagement_ReadAttributeGroupKeys(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys(device, ZCLendpoint, ZCLgroupid)
def ClusterGroupKeyManagement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterGroups_ReadAttributeNameSupport(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Groups_NameSupport(device, ZCLendpoint, ZCLgroupid)
def ClusterGroups_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Groups_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterIdentify_ReadAttributeIdentifyTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Identify_IdentifyTime(device, ZCLendpoint, ZCLgroupid)
def ClusterIdentify_WriteAttributeIdentifyTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_Identify_IdentifyTime(device, ZCLendpoint, ZCLgroupid, value)
def ClusterIdentify_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Identify_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterKeypadInput_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_KeypadInput_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterLevelControl_ReadAttributeCurrentLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentLevel(device, ZCLendpoint, ZCLgroupid)
def ClusterLevelControl_ConfigureAttributeCurrentLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_LevelControl_CurrentLevel(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterLevelControl_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_LevelControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterLowPower_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_LowPower_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterMediaInput_ReadAttributeMediaInputList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_MediaInput_MediaInputList(device, ZCLendpoint, ZCLgroupid)
def ClusterMediaInput_ReadAttributeCurrentMediaInput(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_MediaInput_CurrentMediaInput(device, ZCLendpoint, ZCLgroupid)
def ClusterMediaInput_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_MediaInput_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterMediaPlayback_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_MediaPlayback_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterNetworkCommissioning_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap(device, ZCLendpoint, ZCLgroupid)
def ClusterNetworkCommissioning_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterOtaSoftwareUpdateProvider_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterOccupancySensing_ReadAttributeOccupancy(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OccupancySensing_Occupancy(device, ZCLendpoint, ZCLgroupid)
def ClusterOccupancySensing_ConfigureAttributeOccupancy(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_OccupancySensing_Occupancy(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterOccupancySensing_ReadAttributeOccupancySensorType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType(device, ZCLendpoint, ZCLgroupid)
def ClusterOccupancySensing_ReadAttributeOccupancySensorTypeBitmap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap(device, ZCLendpoint, ZCLgroupid)
def ClusterOccupancySensing_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OccupancySensing_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterOnOff_ReadAttributeOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OnOff_OnOff(device, ZCLendpoint, ZCLgroupid)
def ClusterOnOff_ConfigureAttributeOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_OnOff_OnOff(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterOnOff_ReadAttributeGlobalSceneControl(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OnOff_GlobalSceneControl(device, ZCLendpoint, ZCLgroupid)
def ClusterOnOff_ReadAttributeOnTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OnOff_OnTime(device, ZCLendpoint, ZCLgroupid)
def ClusterOnOff_WriteAttributeOnTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_OnOff_OnTime(device, ZCLendpoint, ZCLgroupid, value)
def ClusterOnOff_ReadAttributeOffWaitTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OnOff_OffWaitTime(device, ZCLendpoint, ZCLgroupid)
def ClusterOnOff_WriteAttributeOffWaitTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_OnOff_OffWaitTime(device, ZCLendpoint, ZCLgroupid, value)
def ClusterOnOff_ReadAttributeStartUpOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OnOff_StartUpOnOff(device, ZCLendpoint, ZCLgroupid)
def ClusterOnOff_WriteAttributeStartUpOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_OnOff_StartUpOnOff(device, ZCLendpoint, ZCLgroupid, value)
def ClusterOnOff_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OnOff_FeatureMap(device, ZCLendpoint, ZCLgroupid)
def ClusterOnOff_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OnOff_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterOnOffSwitchConfiguration_ReadAttributeSwitchType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType(device, ZCLendpoint, ZCLgroupid)
def ClusterOnOffSwitchConfiguration_ReadAttributeSwitchActions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions(device, ZCLendpoint, ZCLgroupid)
def ClusterOnOffSwitchConfiguration_WriteAttributeSwitchActions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_OnOffSwitchConfiguration_SwitchActions(device, ZCLendpoint, ZCLgroupid, value)
def ClusterOnOffSwitchConfiguration_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterOperationalCredentials_ReadAttributeFabricsList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_FabricsList(device, ZCLendpoint, ZCLgroupid)
def ClusterOperationalCredentials_ReadAttributeSupportedFabrics(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics(device, ZCLendpoint, ZCLgroupid)
def ClusterOperationalCredentials_ReadAttributeCommissionedFabrics(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics(device, ZCLendpoint, ZCLgroupid)
def ClusterOperationalCredentials_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterPressureMeasurement_ReadAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterPressureMeasurement_ConfigureAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_PressureMeasurement_MeasuredValue(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterPressureMeasurement_ReadAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterPressureMeasurement_ReadAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterPressureMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterPumpConfigurationAndControl_ReadAttributeMaxPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure(device, ZCLendpoint, ZCLgroupid)
def ClusterPumpConfigurationAndControl_ReadAttributeMaxSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed(device, ZCLendpoint, ZCLgroupid)
def ClusterPumpConfigurationAndControl_ReadAttributeMaxFlow(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow(device, ZCLendpoint, ZCLgroupid)
def ClusterPumpConfigurationAndControl_ReadAttributeEffectiveOperationMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode(device, ZCLendpoint, ZCLgroupid)
def ClusterPumpConfigurationAndControl_ReadAttributeEffectiveControlMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode(device, ZCLendpoint, ZCLgroupid)
def ClusterPumpConfigurationAndControl_ReadAttributeCapacity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity(device, ZCLendpoint, ZCLgroupid)
def ClusterPumpConfigurationAndControl_ConfigureAttributeCapacity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_PumpConfigurationAndControl_Capacity(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterPumpConfigurationAndControl_ReadAttributeOperationMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode(device, ZCLendpoint, ZCLgroupid)
def ClusterPumpConfigurationAndControl_WriteAttributeOperationMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_PumpConfigurationAndControl_OperationMode(device, ZCLendpoint, ZCLgroupid, value)
def ClusterPumpConfigurationAndControl_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterRelativeHumidityMeasurement_ReadAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterRelativeHumidityMeasurement_ConfigureAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_RelativeHumidityMeasurement_MeasuredValue(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterRelativeHumidityMeasurement_ReadAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterRelativeHumidityMeasurement_ReadAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterRelativeHumidityMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterScenes_ReadAttributeSceneCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Scenes_SceneCount(device, ZCLendpoint, ZCLgroupid)
def ClusterScenes_ReadAttributeCurrentScene(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentScene(device, ZCLendpoint, ZCLgroupid)
def ClusterScenes_ReadAttributeCurrentGroup(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentGroup(device, ZCLendpoint, ZCLgroupid)
def ClusterScenes_ReadAttributeSceneValid(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Scenes_SceneValid(device, ZCLendpoint, ZCLgroupid)
def ClusterScenes_ReadAttributeNameSupport(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Scenes_NameSupport(device, ZCLendpoint, ZCLgroupid)
def ClusterScenes_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Scenes_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterSoftwareDiagnostics_ReadAttributeCurrentHeapHighWatermark(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(device, ZCLendpoint, ZCLgroupid)
def ClusterSoftwareDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterSwitch_ReadAttributeNumberOfPositions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Switch_NumberOfPositions(device, ZCLendpoint, ZCLgroupid)
def ClusterSwitch_ReadAttributeCurrentPosition(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Switch_CurrentPosition(device, ZCLendpoint, ZCLgroupid)
def ClusterSwitch_ConfigureAttributeCurrentPosition(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_Switch_CurrentPosition(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterSwitch_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Switch_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterTvChannel_ReadAttributeTvChannelList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelList(device, ZCLendpoint, ZCLgroupid)
def ClusterTvChannel_ReadAttributeTvChannelLineup(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelLineup(device, ZCLendpoint, ZCLgroupid)
def ClusterTvChannel_ReadAttributeCurrentTvChannel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TvChannel_CurrentTvChannel(device, ZCLendpoint, ZCLgroupid)
def ClusterTvChannel_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TvChannel_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterTargetNavigator_ReadAttributeTargetNavigatorList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList(device, ZCLendpoint, ZCLgroupid)
def ClusterTargetNavigator_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TargetNavigator_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterTemperatureMeasurement_ReadAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterTemperatureMeasurement_ConfigureAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_TemperatureMeasurement_MeasuredValue(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterTemperatureMeasurement_ReadAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterTemperatureMeasurement_ReadAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue(device, ZCLendpoint, ZCLgroupid)
def ClusterTemperatureMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_ReadAttributeBoolean(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Boolean(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeBoolean(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bool):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Boolean(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeBitmap8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap8(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeBitmap8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap8(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeBitmap16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap16(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeBitmap16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap16(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeBitmap32(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap32(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeBitmap32(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap32(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeBitmap64(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap64(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeBitmap64(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap64(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeInt8u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8u(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeInt8u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Int8u(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeInt16u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16u(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeInt16u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Int16u(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeInt32u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32u(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeInt32u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Int32u(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeInt64u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64u(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeInt64u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Int64u(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeInt8s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8s(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeInt8s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Int8s(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeInt16s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16s(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeInt16s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Int16s(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeInt32s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32s(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeInt32s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Int32s(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeInt64s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64s(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeInt64s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Int64s(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeEnum8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum8(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeEnum8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Enum8(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeEnum16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum16(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeEnum16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Enum16(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_OctetString(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bytes):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_OctetString(device, ZCLendpoint, ZCLgroupid, value, len(value))
def ClusterTestCluster_ReadAttributeListInt8u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_ListInt8u(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_ReadAttributeListOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_ListOctetString(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_ReadAttributeListStructOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_ListStructOctetString(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_ReadAttributeLongOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_LongOctetString(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeLongOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bytes):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_LongOctetString(device, ZCLendpoint, ZCLgroupid, value, len(value))
def ClusterTestCluster_ReadAttributeCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_CharString(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bytes):
value = value.encode("utf-8")
return self._chipLib.chip_ime_WriteAttribute_TestCluster_CharString(device, ZCLendpoint, ZCLgroupid, value, len(value))
def ClusterTestCluster_ReadAttributeLongCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_LongCharString(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeLongCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bytes):
value = value.encode("utf-8")
return self._chipLib.chip_ime_WriteAttribute_TestCluster_LongCharString(device, ZCLendpoint, ZCLgroupid, value, len(value))
def ClusterTestCluster_ReadAttributeUnsupported(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_Unsupported(device, ZCLendpoint, ZCLgroupid)
def ClusterTestCluster_WriteAttributeUnsupported(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: bool):
return self._chipLib.chip_ime_WriteAttribute_TestCluster_Unsupported(device, ZCLendpoint, ZCLgroupid, value)
def ClusterTestCluster_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_TestCluster_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_ReadAttributeLocalTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_LocalTemperature(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_ConfigureAttributeLocalTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_Thermostat_LocalTemperature(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterThermostat_ReadAttributeAbsMinHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_ReadAttributeAbsMaxHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_ReadAttributeAbsMinCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_ReadAttributeAbsMaxCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_ReadAttributeOccupiedCoolingSetpoint(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_WriteAttributeOccupiedCoolingSetpoint(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_Thermostat_OccupiedCoolingSetpoint(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostat_ReadAttributeOccupiedHeatingSetpoint(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_WriteAttributeOccupiedHeatingSetpoint(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_Thermostat_OccupiedHeatingSetpoint(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostat_ReadAttributeMinHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_WriteAttributeMinHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_Thermostat_MinHeatSetpointLimit(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostat_ReadAttributeMaxHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_WriteAttributeMaxHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_Thermostat_MaxHeatSetpointLimit(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostat_ReadAttributeMinCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_WriteAttributeMinCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_Thermostat_MinCoolSetpointLimit(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostat_ReadAttributeMaxCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_WriteAttributeMaxCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_Thermostat_MaxCoolSetpointLimit(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostat_ReadAttributeControlSequenceOfOperation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_WriteAttributeControlSequenceOfOperation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_Thermostat_ControlSequenceOfOperation(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostat_ReadAttributeSystemMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_SystemMode(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_WriteAttributeSystemMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_Thermostat_SystemMode(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostat_ReadAttributeStartOfWeek(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_StartOfWeek(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_ReadAttributeNumberOfWeeklyTransitions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_ReadAttributeNumberOfDailyTransitions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_FeatureMap(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostat_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_Thermostat_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostatUserInterfaceConfiguration_ReadAttributeTemperatureDisplayMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostatUserInterfaceConfiguration_WriteAttributeTemperatureDisplayMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostatUserInterfaceConfiguration_ReadAttributeKeypadLockout(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostatUserInterfaceConfiguration_WriteAttributeKeypadLockout(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostatUserInterfaceConfiguration_ReadAttributeScheduleProgrammingVisibility(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility(device, ZCLendpoint, ZCLgroupid)
def ClusterThermostatUserInterfaceConfiguration_WriteAttributeScheduleProgrammingVisibility(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility(device, ZCLendpoint, ZCLgroupid, value)
def ClusterThermostatUserInterfaceConfiguration_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeChannel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRoutingRole(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeNetworkName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributePanId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeExtendedPanId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeMeshLocalPrefix(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeOverrunCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeNeighborTableList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRouteTableList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributePartitionId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeWeighting(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeDataVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeStableDataVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeLeaderRouterId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeDetachedRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeChildRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRouterRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeLeaderRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeAttachAttemptCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributePartitionIdChangeCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeBetterPartitionAttachAttemptCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeParentChangeCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxTotalCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxUnicastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxBroadcastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxAckRequestedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxAckedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxNoAckRequestedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxDataCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxDataPollCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxBeaconCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxBeaconRequestCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxOtherCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxRetryCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxDirectMaxRetryExpiryCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxIndirectMaxRetryExpiryCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxErrCcaCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxErrAbortCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeTxErrBusyChannelCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxTotalCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxUnicastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxBroadcastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxDataCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxDataPollCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxBeaconCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxBeaconRequestCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxOtherCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxAddressFilteredCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxDestAddrFilteredCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxDuplicatedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrNoFrameCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrUnknownNeighborCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrInvalidSrcAddrCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrSecCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrFcsCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrOtherCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeSecurityPolicy(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeChannelMask(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeOperationalDatasetComponents(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OperationalDatasetComponents(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeActiveNetworkFaultsList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveNetworkFaultsList(device, ZCLendpoint, ZCLgroupid)
def ClusterThreadNetworkDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterWakeOnLan_ReadAttributeWakeOnLanMacAddress(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress(device, ZCLendpoint, ZCLgroupid)
def ClusterWakeOnLan_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WakeOnLan_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterWiFiNetworkDiagnostics_ReadAttributeBssid(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid(device, ZCLendpoint, ZCLgroupid)
def ClusterWiFiNetworkDiagnostics_ReadAttributeSecurityType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType(device, ZCLendpoint, ZCLgroupid)
def ClusterWiFiNetworkDiagnostics_ReadAttributeWiFiVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion(device, ZCLendpoint, ZCLgroupid)
def ClusterWiFiNetworkDiagnostics_ReadAttributeChannelNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber(device, ZCLendpoint, ZCLgroupid)
def ClusterWiFiNetworkDiagnostics_ReadAttributeRssi(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi(device, ZCLendpoint, ZCLgroupid)
def ClusterWiFiNetworkDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ReadAttributeType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_Type(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ReadAttributeCurrentPositionLift(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ReadAttributeCurrentPositionTilt(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ReadAttributeConfigStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_ConfigStatus(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ReadAttributeCurrentPositionLiftPercentage(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ConfigureAttributeCurrentPositionLiftPercentage(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionLiftPercentage(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterWindowCovering_ReadAttributeCurrentPositionTiltPercentage(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ConfigureAttributeCurrentPositionTiltPercentage(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionTiltPercentage(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterWindowCovering_ReadAttributeOperationalStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_OperationalStatus(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ConfigureAttributeOperationalStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_OperationalStatus(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterWindowCovering_ReadAttributeTargetPositionLiftPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionLiftPercent100ths(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ConfigureAttributeTargetPositionLiftPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_TargetPositionLiftPercent100ths(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterWindowCovering_ReadAttributeTargetPositionTiltPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionTiltPercent100ths(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ConfigureAttributeTargetPositionTiltPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_TargetPositionTiltPercent100ths(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterWindowCovering_ReadAttributeEndProductType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_EndProductType(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ReadAttributeCurrentPositionLiftPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercent100ths(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ConfigureAttributeCurrentPositionLiftPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionLiftPercent100ths(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterWindowCovering_ReadAttributeCurrentPositionTiltPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercent100ths(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ConfigureAttributeCurrentPositionTiltPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionTiltPercent100ths(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterWindowCovering_ReadAttributeInstalledOpenLimitLift(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ReadAttributeInstalledClosedLimitLift(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ReadAttributeInstalledOpenLimitTilt(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ReadAttributeInstalledClosedLimitTilt(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ReadAttributeMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_Mode(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_WriteAttributeMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int, value: int):
return self._chipLib.chip_ime_WriteAttribute_WindowCovering_Mode(device, ZCLendpoint, ZCLgroupid, value)
def ClusterWindowCovering_ReadAttributeSafetyStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_SafetyStatus(device, ZCLendpoint, ZCLgroupid)
def ClusterWindowCovering_ConfigureAttributeSafetyStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int, change: int):
return self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_SafetyStatus(device, ZCLendpoint, minInterval, maxInterval, change)
def ClusterWindowCovering_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int):
return self._chipLib.chip_ime_ReadAttribute_WindowCovering_ClusterRevision(device, ZCLendpoint, ZCLgroupid)
# Init native functions
def InitLib(self, chipLib):
self._chipLib = chipLib
# Response delegate setters
self._chipLib.chip_ime_SetSuccessResponseDelegate.argtypes = [ChipClusters.SUCCESS_DELEGATE]
self._chipLib.chip_ime_SetSuccessResponseDelegate.restype = None
self._chipLib.chip_ime_SetFailureResponseDelegate.argtypes = [ChipClusters.FAILURE_DELEGATE]
self._chipLib.chip_ime_SetFailureResponseDelegate.res = None
# Cluster AccountLogin
# Cluster AccountLogin Command GetSetupPIN
self._chipLib.chip_ime_AppendCommand_AccountLogin_GetSetupPIN.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_AccountLogin_GetSetupPIN.restype = ctypes.c_uint32
# Cluster AccountLogin Command Login
self._chipLib.chip_ime_AppendCommand_AccountLogin_Login.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_AccountLogin_Login.restype = ctypes.c_uint32
# Cluster AccountLogin ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_AccountLogin_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_AccountLogin_ClusterRevision.restype = ctypes.c_uint32
# Cluster AdministratorCommissioning
# Cluster AdministratorCommissioning Command OpenBasicCommissioningWindow
self._chipLib.chip_ime_AppendCommand_AdministratorCommissioning_OpenBasicCommissioningWindow.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_AdministratorCommissioning_OpenBasicCommissioningWindow.restype = ctypes.c_uint32
# Cluster AdministratorCommissioning Command OpenCommissioningWindow
self._chipLib.chip_ime_AppendCommand_AdministratorCommissioning_OpenCommissioningWindow.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint16, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_AdministratorCommissioning_OpenCommissioningWindow.restype = ctypes.c_uint32
# Cluster AdministratorCommissioning Command RevokeCommissioning
self._chipLib.chip_ime_AppendCommand_AdministratorCommissioning_RevokeCommissioning.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_AdministratorCommissioning_RevokeCommissioning.restype = ctypes.c_uint32
# Cluster AdministratorCommissioning ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision.restype = ctypes.c_uint32
# Cluster ApplicationBasic
# Cluster ApplicationBasic Command ChangeStatus
self._chipLib.chip_ime_AppendCommand_ApplicationBasic_ChangeStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ApplicationBasic_ChangeStatus.restype = ctypes.c_uint32
# Cluster ApplicationBasic ReadAttribute VendorName
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorName.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorName.restype = ctypes.c_uint32
# Cluster ApplicationBasic ReadAttribute VendorId
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorId.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorId.restype = ctypes.c_uint32
# Cluster ApplicationBasic ReadAttribute ApplicationName
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationName.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationName.restype = ctypes.c_uint32
# Cluster ApplicationBasic ReadAttribute ProductId
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ProductId.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ProductId.restype = ctypes.c_uint32
# Cluster ApplicationBasic ReadAttribute ApplicationId
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationId.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationId.restype = ctypes.c_uint32
# Cluster ApplicationBasic ReadAttribute CatalogVendorId
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId.restype = ctypes.c_uint32
# Cluster ApplicationBasic ReadAttribute ApplicationStatus
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus.restype = ctypes.c_uint32
# Cluster ApplicationBasic ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision.restype = ctypes.c_uint32
# Cluster ApplicationLauncher
# Cluster ApplicationLauncher Command LaunchApp
self._chipLib.chip_ime_AppendCommand_ApplicationLauncher_LaunchApp.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_ApplicationLauncher_LaunchApp.restype = ctypes.c_uint32
# Cluster ApplicationLauncher ReadAttribute ApplicationLauncherList
self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList.restype = ctypes.c_uint32
# Cluster ApplicationLauncher ReadAttribute CatalogVendorId
self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId.restype = ctypes.c_uint32
# Cluster ApplicationLauncher ReadAttribute ApplicationId
self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId.restype = ctypes.c_uint32
# Cluster ApplicationLauncher ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision.restype = ctypes.c_uint32
# Cluster AudioOutput
# Cluster AudioOutput Command RenameOutput
self._chipLib.chip_ime_AppendCommand_AudioOutput_RenameOutput.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_AudioOutput_RenameOutput.restype = ctypes.c_uint32
# Cluster AudioOutput Command SelectOutput
self._chipLib.chip_ime_AppendCommand_AudioOutput_SelectOutput.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_AudioOutput_SelectOutput.restype = ctypes.c_uint32
# Cluster AudioOutput ReadAttribute AudioOutputList
self._chipLib.chip_ime_ReadAttribute_AudioOutput_AudioOutputList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_AudioOutput_AudioOutputList.restype = ctypes.c_uint32
# Cluster AudioOutput ReadAttribute CurrentAudioOutput
self._chipLib.chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput.restype = ctypes.c_uint32
# Cluster AudioOutput ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_AudioOutput_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_AudioOutput_ClusterRevision.restype = ctypes.c_uint32
# Cluster BarrierControl
# Cluster BarrierControl Command BarrierControlGoToPercent
self._chipLib.chip_ime_AppendCommand_BarrierControl_BarrierControlGoToPercent.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_BarrierControl_BarrierControlGoToPercent.restype = ctypes.c_uint32
# Cluster BarrierControl Command BarrierControlStop
self._chipLib.chip_ime_AppendCommand_BarrierControl_BarrierControlStop.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_BarrierControl_BarrierControlStop.restype = ctypes.c_uint32
# Cluster BarrierControl ReadAttribute BarrierMovingState
self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierMovingState.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierMovingState.restype = ctypes.c_uint32
# Cluster BarrierControl ReadAttribute BarrierSafetyStatus
self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus.restype = ctypes.c_uint32
# Cluster BarrierControl ReadAttribute BarrierCapabilities
self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities.restype = ctypes.c_uint32
# Cluster BarrierControl ReadAttribute BarrierPosition
self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierPosition.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierPosition.restype = ctypes.c_uint32
# Cluster BarrierControl ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_BarrierControl_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BarrierControl_ClusterRevision.restype = ctypes.c_uint32
# Cluster Basic
# Cluster Basic Command MfgSpecificPing
self._chipLib.chip_ime_AppendCommand_Basic_MfgSpecificPing.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Basic_MfgSpecificPing.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute InteractionModelVersion
self._chipLib.chip_ime_ReadAttribute_Basic_InteractionModelVersion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_InteractionModelVersion.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute VendorName
self._chipLib.chip_ime_ReadAttribute_Basic_VendorName.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_VendorName.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute VendorID
self._chipLib.chip_ime_ReadAttribute_Basic_VendorID.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_VendorID.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute ProductName
self._chipLib.chip_ime_ReadAttribute_Basic_ProductName.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_ProductName.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute ProductID
self._chipLib.chip_ime_ReadAttribute_Basic_ProductID.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_ProductID.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute UserLabel
self._chipLib.chip_ime_ReadAttribute_Basic_UserLabel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_UserLabel.restype = ctypes.c_uint32
# Cluster Basic WriteAttribute UserLabel
self._chipLib.chip_ime_WriteAttribute_Basic_UserLabel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_WriteAttribute_Basic_UserLabel.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute Location
self._chipLib.chip_ime_ReadAttribute_Basic_Location.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_Location.restype = ctypes.c_uint32
# Cluster Basic WriteAttribute Location
self._chipLib.chip_ime_WriteAttribute_Basic_Location.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_WriteAttribute_Basic_Location.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute HardwareVersion
self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersion.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute HardwareVersionString
self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersionString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersionString.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute SoftwareVersion
self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersion.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute SoftwareVersionString
self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersionString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersionString.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute ManufacturingDate
self._chipLib.chip_ime_ReadAttribute_Basic_ManufacturingDate.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_ManufacturingDate.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute PartNumber
self._chipLib.chip_ime_ReadAttribute_Basic_PartNumber.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_PartNumber.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute ProductURL
self._chipLib.chip_ime_ReadAttribute_Basic_ProductURL.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_ProductURL.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute ProductLabel
self._chipLib.chip_ime_ReadAttribute_Basic_ProductLabel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_ProductLabel.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute SerialNumber
self._chipLib.chip_ime_ReadAttribute_Basic_SerialNumber.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_SerialNumber.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute LocalConfigDisabled
self._chipLib.chip_ime_ReadAttribute_Basic_LocalConfigDisabled.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_LocalConfigDisabled.restype = ctypes.c_uint32
# Cluster Basic WriteAttribute LocalConfigDisabled
self._chipLib.chip_ime_WriteAttribute_Basic_LocalConfigDisabled.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_bool]
self._chipLib.chip_ime_WriteAttribute_Basic_LocalConfigDisabled.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute Reachable
self._chipLib.chip_ime_ReadAttribute_Basic_Reachable.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_Reachable.restype = ctypes.c_uint32
# Cluster Basic ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_Basic_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Basic_ClusterRevision.restype = ctypes.c_uint32
# Cluster BinaryInputBasic
# Cluster BinaryInputBasic ReadAttribute OutOfService
self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_OutOfService.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_OutOfService.restype = ctypes.c_uint32
# Cluster BinaryInputBasic WriteAttribute OutOfService
self._chipLib.chip_ime_WriteAttribute_BinaryInputBasic_OutOfService.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_bool]
self._chipLib.chip_ime_WriteAttribute_BinaryInputBasic_OutOfService.restype = ctypes.c_uint32
# Cluster BinaryInputBasic ReadAttribute PresentValue
self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_PresentValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_PresentValue.restype = ctypes.c_uint32
# Cluster BinaryInputBasic ConfigureAttribute PresentValue
self._chipLib.chip_ime_ConfigureAttribute_BinaryInputBasic_PresentValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_BinaryInputBasic_PresentValue.restype = ctypes.c_uint32
# Cluster BinaryInputBasic WriteAttribute PresentValue
self._chipLib.chip_ime_WriteAttribute_BinaryInputBasic_PresentValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_bool]
self._chipLib.chip_ime_WriteAttribute_BinaryInputBasic_PresentValue.restype = ctypes.c_uint32
# Cluster BinaryInputBasic ReadAttribute StatusFlags
self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags.restype = ctypes.c_uint32
# Cluster BinaryInputBasic ConfigureAttribute StatusFlags
self._chipLib.chip_ime_ConfigureAttribute_BinaryInputBasic_StatusFlags.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_BinaryInputBasic_StatusFlags.restype = ctypes.c_uint32
# Cluster BinaryInputBasic ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision.restype = ctypes.c_uint32
# Cluster Binding
# Cluster Binding Command Bind
self._chipLib.chip_ime_AppendCommand_Binding_Bind.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint64, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_Binding_Bind.restype = ctypes.c_uint32
# Cluster Binding Command Unbind
self._chipLib.chip_ime_AppendCommand_Binding_Unbind.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint64, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_Binding_Unbind.restype = ctypes.c_uint32
# Cluster Binding ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_Binding_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Binding_ClusterRevision.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic
# Cluster BridgedDeviceBasic ReadAttribute VendorName
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute VendorID
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute ProductName
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute UserLabel
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic WriteAttribute UserLabel
self._chipLib.chip_ime_WriteAttribute_BridgedDeviceBasic_UserLabel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_WriteAttribute_BridgedDeviceBasic_UserLabel.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute HardwareVersion
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute HardwareVersionString
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute SoftwareVersion
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute SoftwareVersionString
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute ManufacturingDate
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute PartNumber
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute ProductURL
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute ProductLabel
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute SerialNumber
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute Reachable
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable.restype = ctypes.c_uint32
# Cluster BridgedDeviceBasic ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision.restype = ctypes.c_uint32
# Cluster ColorControl
# Cluster ColorControl Command ColorLoopSet
self._chipLib.chip_ime_AppendCommand_ColorControl_ColorLoopSet.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_ColorLoopSet.restype = ctypes.c_uint32
# Cluster ColorControl Command EnhancedMoveHue
self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedMoveHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedMoveHue.restype = ctypes.c_uint32
# Cluster ColorControl Command EnhancedMoveToHue
self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedMoveToHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedMoveToHue.restype = ctypes.c_uint32
# Cluster ColorControl Command EnhancedMoveToHueAndSaturation
self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedMoveToHueAndSaturation.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedMoveToHueAndSaturation.restype = ctypes.c_uint32
# Cluster ColorControl Command EnhancedStepHue
self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedStepHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_EnhancedStepHue.restype = ctypes.c_uint32
# Cluster ColorControl Command MoveColor
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveColor.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16, ctypes.c_int16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveColor.restype = ctypes.c_uint32
# Cluster ColorControl Command MoveColorTemperature
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveColorTemperature.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveColorTemperature.restype = ctypes.c_uint32
# Cluster ColorControl Command MoveHue
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveHue.restype = ctypes.c_uint32
# Cluster ColorControl Command MoveSaturation
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveSaturation.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveSaturation.restype = ctypes.c_uint32
# Cluster ColorControl Command MoveToColor
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToColor.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToColor.restype = ctypes.c_uint32
# Cluster ColorControl Command MoveToColorTemperature
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToColorTemperature.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToColorTemperature.restype = ctypes.c_uint32
# Cluster ColorControl Command MoveToHue
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToHue.restype = ctypes.c_uint32
# Cluster ColorControl Command MoveToHueAndSaturation
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToHueAndSaturation.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToHueAndSaturation.restype = ctypes.c_uint32
# Cluster ColorControl Command MoveToSaturation
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToSaturation.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_MoveToSaturation.restype = ctypes.c_uint32
# Cluster ColorControl Command StepColor
self._chipLib.chip_ime_AppendCommand_ColorControl_StepColor.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16, ctypes.c_int16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_StepColor.restype = ctypes.c_uint32
# Cluster ColorControl Command StepColorTemperature
self._chipLib.chip_ime_AppendCommand_ColorControl_StepColorTemperature.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_StepColorTemperature.restype = ctypes.c_uint32
# Cluster ColorControl Command StepHue
self._chipLib.chip_ime_AppendCommand_ColorControl_StepHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_StepHue.restype = ctypes.c_uint32
# Cluster ColorControl Command StepSaturation
self._chipLib.chip_ime_AppendCommand_ColorControl_StepSaturation.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_StepSaturation.restype = ctypes.c_uint32
# Cluster ColorControl Command StopMoveStep
self._chipLib.chip_ime_AppendCommand_ColorControl_StopMoveStep.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_ColorControl_StopMoveStep.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute CurrentHue
self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentHue.restype = ctypes.c_uint32
# Cluster ColorControl ConfigureAttribute CurrentHue
self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentHue.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute CurrentSaturation
self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentSaturation.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentSaturation.restype = ctypes.c_uint32
# Cluster ColorControl ConfigureAttribute CurrentSaturation
self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentSaturation.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentSaturation.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute RemainingTime
self._chipLib.chip_ime_ReadAttribute_ColorControl_RemainingTime.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_RemainingTime.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute CurrentX
self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentX.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentX.restype = ctypes.c_uint32
# Cluster ColorControl ConfigureAttribute CurrentX
self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentX.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentX.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute CurrentY
self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentY.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentY.restype = ctypes.c_uint32
# Cluster ColorControl ConfigureAttribute CurrentY
self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentY.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_ColorControl_CurrentY.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute DriftCompensation
self._chipLib.chip_ime_ReadAttribute_ColorControl_DriftCompensation.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_DriftCompensation.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute CompensationText
self._chipLib.chip_ime_ReadAttribute_ColorControl_CompensationText.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_CompensationText.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorTemperature
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTemperature.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTemperature.restype = ctypes.c_uint32
# Cluster ColorControl ConfigureAttribute ColorTemperature
self._chipLib.chip_ime_ConfigureAttribute_ColorControl_ColorTemperature.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_ColorControl_ColorTemperature.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorMode
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorMode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorMode.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorControlOptions
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorControlOptions.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorControlOptions.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute ColorControlOptions
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorControlOptions.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorControlOptions.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute NumberOfPrimaries
self._chipLib.chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary1X
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1X.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1X.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary1Y
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Y.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Y.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary1Intensity
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Intensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Intensity.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary2X
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2X.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2X.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary2Y
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Y.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Y.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary2Intensity
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Intensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Intensity.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary3X
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3X.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3X.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary3Y
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Y.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Y.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary3Intensity
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Intensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Intensity.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary4X
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4X.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4X.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary4Y
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Y.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Y.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary4Intensity
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Intensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Intensity.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary5X
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5X.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5X.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary5Y
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Y.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Y.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary5Intensity
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Intensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Intensity.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary6X
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6X.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6X.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary6Y
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Y.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Y.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute Primary6Intensity
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Intensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Intensity.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute WhitePointX
self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointX.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointX.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute WhitePointX
self._chipLib.chip_ime_WriteAttribute_ColorControl_WhitePointX.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_ColorControl_WhitePointX.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute WhitePointY
self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointY.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointY.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute WhitePointY
self._chipLib.chip_ime_WriteAttribute_ColorControl_WhitePointY.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_ColorControl_WhitePointY.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorPointRX
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRX.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRX.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute ColorPointRX
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointRX.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointRX.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorPointRY
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRY.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRY.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute ColorPointRY
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointRY.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointRY.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorPointRIntensity
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute ColorPointRIntensity
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointRIntensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointRIntensity.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorPointGX
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGX.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGX.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute ColorPointGX
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointGX.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointGX.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorPointGY
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGY.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGY.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute ColorPointGY
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointGY.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointGY.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorPointGIntensity
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute ColorPointGIntensity
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointGIntensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointGIntensity.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorPointBX
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBX.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBX.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute ColorPointBX
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointBX.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointBX.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorPointBY
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBY.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBY.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute ColorPointBY
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointBY.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointBY.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorPointBIntensity
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute ColorPointBIntensity
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointBIntensity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_ColorControl_ColorPointBIntensity.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute EnhancedCurrentHue
self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute EnhancedColorMode
self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedColorMode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedColorMode.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorLoopActive
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopActive.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopActive.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorLoopDirection
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopDirection.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopDirection.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorLoopTime
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopTime.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopTime.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorLoopStartEnhancedHue
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorLoopStoredEnhancedHue
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorCapabilities
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorCapabilities.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorCapabilities.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorTempPhysicalMin
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ColorTempPhysicalMax
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute CoupleColorTempToLevelMinMireds
self._chipLib.chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute StartUpColorTemperatureMireds
self._chipLib.chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds.restype = ctypes.c_uint32
# Cluster ColorControl WriteAttribute StartUpColorTemperatureMireds
self._chipLib.chip_ime_WriteAttribute_ColorControl_StartUpColorTemperatureMireds.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_ColorControl_StartUpColorTemperatureMireds.restype = ctypes.c_uint32
# Cluster ColorControl ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_ColorControl_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ColorControl_ClusterRevision.restype = ctypes.c_uint32
# Cluster ContentLauncher
# Cluster ContentLauncher Command LaunchContent
self._chipLib.chip_ime_AppendCommand_ContentLauncher_LaunchContent.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_bool, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_ContentLauncher_LaunchContent.restype = ctypes.c_uint32
# Cluster ContentLauncher Command LaunchURL
self._chipLib.chip_ime_AppendCommand_ContentLauncher_LaunchURL.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_ContentLauncher_LaunchURL.restype = ctypes.c_uint32
# Cluster ContentLauncher ReadAttribute AcceptsHeaderList
self._chipLib.chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList.restype = ctypes.c_uint32
# Cluster ContentLauncher ReadAttribute SupportedStreamingTypes
self._chipLib.chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes.restype = ctypes.c_uint32
# Cluster ContentLauncher ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_ContentLauncher_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ContentLauncher_ClusterRevision.restype = ctypes.c_uint32
# Cluster Descriptor
# Cluster Descriptor ReadAttribute DeviceList
self._chipLib.chip_ime_ReadAttribute_Descriptor_DeviceList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Descriptor_DeviceList.restype = ctypes.c_uint32
# Cluster Descriptor ReadAttribute ServerList
self._chipLib.chip_ime_ReadAttribute_Descriptor_ServerList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Descriptor_ServerList.restype = ctypes.c_uint32
# Cluster Descriptor ReadAttribute ClientList
self._chipLib.chip_ime_ReadAttribute_Descriptor_ClientList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Descriptor_ClientList.restype = ctypes.c_uint32
# Cluster Descriptor ReadAttribute PartsList
self._chipLib.chip_ime_ReadAttribute_Descriptor_PartsList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Descriptor_PartsList.restype = ctypes.c_uint32
# Cluster Descriptor ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_Descriptor_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Descriptor_ClusterRevision.restype = ctypes.c_uint32
# Cluster DiagnosticLogs
# Cluster DiagnosticLogs Command RetrieveLogsRequest
self._chipLib.chip_ime_AppendCommand_DiagnosticLogs_RetrieveLogsRequest.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_DiagnosticLogs_RetrieveLogsRequest.restype = ctypes.c_uint32
# Cluster DoorLock
# Cluster DoorLock Command ClearAllPins
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearAllPins.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearAllPins.restype = ctypes.c_uint32
# Cluster DoorLock Command ClearAllRfids
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearAllRfids.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearAllRfids.restype = ctypes.c_uint32
# Cluster DoorLock Command ClearHolidaySchedule
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearHolidaySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearHolidaySchedule.restype = ctypes.c_uint32
# Cluster DoorLock Command ClearPin
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearPin.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearPin.restype = ctypes.c_uint32
# Cluster DoorLock Command ClearRfid
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearRfid.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearRfid.restype = ctypes.c_uint32
# Cluster DoorLock Command ClearWeekdaySchedule
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearWeekdaySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearWeekdaySchedule.restype = ctypes.c_uint32
# Cluster DoorLock Command ClearYeardaySchedule
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearYeardaySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_ClearYeardaySchedule.restype = ctypes.c_uint32
# Cluster DoorLock Command GetHolidaySchedule
self._chipLib.chip_ime_AppendCommand_DoorLock_GetHolidaySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_DoorLock_GetHolidaySchedule.restype = ctypes.c_uint32
# Cluster DoorLock Command GetLogRecord
self._chipLib.chip_ime_AppendCommand_DoorLock_GetLogRecord.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_GetLogRecord.restype = ctypes.c_uint32
# Cluster DoorLock Command GetPin
self._chipLib.chip_ime_AppendCommand_DoorLock_GetPin.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_GetPin.restype = ctypes.c_uint32
# Cluster DoorLock Command GetRfid
self._chipLib.chip_ime_AppendCommand_DoorLock_GetRfid.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_GetRfid.restype = ctypes.c_uint32
# Cluster DoorLock Command GetUserType
self._chipLib.chip_ime_AppendCommand_DoorLock_GetUserType.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_GetUserType.restype = ctypes.c_uint32
# Cluster DoorLock Command GetWeekdaySchedule
self._chipLib.chip_ime_AppendCommand_DoorLock_GetWeekdaySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_GetWeekdaySchedule.restype = ctypes.c_uint32
# Cluster DoorLock Command GetYeardaySchedule
self._chipLib.chip_ime_AppendCommand_DoorLock_GetYeardaySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_DoorLock_GetYeardaySchedule.restype = ctypes.c_uint32
# Cluster DoorLock Command LockDoor
self._chipLib.chip_ime_AppendCommand_DoorLock_LockDoor.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_DoorLock_LockDoor.restype = ctypes.c_uint32
# Cluster DoorLock Command SetHolidaySchedule
self._chipLib.chip_ime_AppendCommand_DoorLock_SetHolidaySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint32, ctypes.c_uint32, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_DoorLock_SetHolidaySchedule.restype = ctypes.c_uint32
# Cluster DoorLock Command SetPin
self._chipLib.chip_ime_AppendCommand_DoorLock_SetPin.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_DoorLock_SetPin.restype = ctypes.c_uint32
# Cluster DoorLock Command SetRfid
self._chipLib.chip_ime_AppendCommand_DoorLock_SetRfid.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_DoorLock_SetRfid.restype = ctypes.c_uint32
# Cluster DoorLock Command SetUserType
self._chipLib.chip_ime_AppendCommand_DoorLock_SetUserType.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_DoorLock_SetUserType.restype = ctypes.c_uint32
# Cluster DoorLock Command SetWeekdaySchedule
self._chipLib.chip_ime_AppendCommand_DoorLock_SetWeekdaySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_DoorLock_SetWeekdaySchedule.restype = ctypes.c_uint32
# Cluster DoorLock Command SetYeardaySchedule
self._chipLib.chip_ime_AppendCommand_DoorLock_SetYeardaySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint32, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_DoorLock_SetYeardaySchedule.restype = ctypes.c_uint32
# Cluster DoorLock Command UnlockDoor
self._chipLib.chip_ime_AppendCommand_DoorLock_UnlockDoor.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_DoorLock_UnlockDoor.restype = ctypes.c_uint32
# Cluster DoorLock Command UnlockWithTimeout
self._chipLib.chip_ime_AppendCommand_DoorLock_UnlockWithTimeout.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_DoorLock_UnlockWithTimeout.restype = ctypes.c_uint32
# Cluster DoorLock ReadAttribute LockState
self._chipLib.chip_ime_ReadAttribute_DoorLock_LockState.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_DoorLock_LockState.restype = ctypes.c_uint32
# Cluster DoorLock ConfigureAttribute LockState
self._chipLib.chip_ime_ConfigureAttribute_DoorLock_LockState.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_DoorLock_LockState.restype = ctypes.c_uint32
# Cluster DoorLock ReadAttribute LockType
self._chipLib.chip_ime_ReadAttribute_DoorLock_LockType.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_DoorLock_LockType.restype = ctypes.c_uint32
# Cluster DoorLock ReadAttribute ActuatorEnabled
self._chipLib.chip_ime_ReadAttribute_DoorLock_ActuatorEnabled.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_DoorLock_ActuatorEnabled.restype = ctypes.c_uint32
# Cluster DoorLock ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_DoorLock_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_DoorLock_ClusterRevision.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement
# Cluster ElectricalMeasurement ReadAttribute MeasurementType
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute TotalActivePower
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute RmsVoltage
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute RmsVoltageMin
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute RmsVoltageMax
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute RmsCurrent
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute RmsCurrentMin
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute RmsCurrentMax
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute ActivePower
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute ActivePowerMin
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute ActivePowerMax
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax.restype = ctypes.c_uint32
# Cluster ElectricalMeasurement ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision.restype = ctypes.c_uint32
# Cluster EthernetNetworkDiagnostics
# Cluster EthernetNetworkDiagnostics Command ResetCounts
self._chipLib.chip_ime_AppendCommand_EthernetNetworkDiagnostics_ResetCounts.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_EthernetNetworkDiagnostics_ResetCounts.restype = ctypes.c_uint32
# Cluster EthernetNetworkDiagnostics ReadAttribute PacketRxCount
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount.restype = ctypes.c_uint32
# Cluster EthernetNetworkDiagnostics ReadAttribute PacketTxCount
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount.restype = ctypes.c_uint32
# Cluster EthernetNetworkDiagnostics ReadAttribute TxErrCount
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount.restype = ctypes.c_uint32
# Cluster EthernetNetworkDiagnostics ReadAttribute CollisionCount
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount.restype = ctypes.c_uint32
# Cluster EthernetNetworkDiagnostics ReadAttribute OverrunCount
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount.restype = ctypes.c_uint32
# Cluster EthernetNetworkDiagnostics ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision.restype = ctypes.c_uint32
# Cluster FixedLabel
# Cluster FixedLabel ReadAttribute LabelList
self._chipLib.chip_ime_ReadAttribute_FixedLabel_LabelList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_FixedLabel_LabelList.restype = ctypes.c_uint32
# Cluster FixedLabel ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_FixedLabel_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_FixedLabel_ClusterRevision.restype = ctypes.c_uint32
# Cluster FlowMeasurement
# Cluster FlowMeasurement ReadAttribute MeasuredValue
self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue.restype = ctypes.c_uint32
# Cluster FlowMeasurement ReadAttribute MinMeasuredValue
self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue.restype = ctypes.c_uint32
# Cluster FlowMeasurement ReadAttribute MaxMeasuredValue
self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32
# Cluster FlowMeasurement ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision.restype = ctypes.c_uint32
# Cluster GeneralCommissioning
# Cluster GeneralCommissioning Command ArmFailSafe
self._chipLib.chip_ime_AppendCommand_GeneralCommissioning_ArmFailSafe.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint64, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_GeneralCommissioning_ArmFailSafe.restype = ctypes.c_uint32
# Cluster GeneralCommissioning Command CommissioningComplete
self._chipLib.chip_ime_AppendCommand_GeneralCommissioning_CommissioningComplete.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_GeneralCommissioning_CommissioningComplete.restype = ctypes.c_uint32
# Cluster GeneralCommissioning Command SetRegulatoryConfig
self._chipLib.chip_ime_AppendCommand_GeneralCommissioning_SetRegulatoryConfig.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_GeneralCommissioning_SetRegulatoryConfig.restype = ctypes.c_uint32
# Cluster GeneralCommissioning ReadAttribute Breadcrumb
self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb.restype = ctypes.c_uint32
# Cluster GeneralCommissioning WriteAttribute Breadcrumb
self._chipLib.chip_ime_WriteAttribute_GeneralCommissioning_Breadcrumb.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint64]
self._chipLib.chip_ime_WriteAttribute_GeneralCommissioning_Breadcrumb.restype = ctypes.c_uint32
# Cluster GeneralCommissioning ReadAttribute BasicCommissioningInfoList
self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_BasicCommissioningInfoList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_BasicCommissioningInfoList.restype = ctypes.c_uint32
# Cluster GeneralCommissioning ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision.restype = ctypes.c_uint32
# Cluster GeneralDiagnostics
# Cluster GeneralDiagnostics ReadAttribute NetworkInterfaces
self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces.restype = ctypes.c_uint32
# Cluster GeneralDiagnostics ReadAttribute RebootCount
self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount.restype = ctypes.c_uint32
# Cluster GeneralDiagnostics ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision.restype = ctypes.c_uint32
# Cluster GroupKeyManagement
# Cluster GroupKeyManagement ReadAttribute Groups
self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_Groups.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_Groups.restype = ctypes.c_uint32
# Cluster GroupKeyManagement ReadAttribute GroupKeys
self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys.restype = ctypes.c_uint32
# Cluster GroupKeyManagement ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision.restype = ctypes.c_uint32
# Cluster Groups
# Cluster Groups Command AddGroup
self._chipLib.chip_ime_AppendCommand_Groups_AddGroup.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_Groups_AddGroup.restype = ctypes.c_uint32
# Cluster Groups Command AddGroupIfIdentifying
self._chipLib.chip_ime_AppendCommand_Groups_AddGroupIfIdentifying.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_Groups_AddGroupIfIdentifying.restype = ctypes.c_uint32
# Cluster Groups Command GetGroupMembership
self._chipLib.chip_ime_AppendCommand_Groups_GetGroupMembership.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Groups_GetGroupMembership.restype = ctypes.c_uint32
# Cluster Groups Command RemoveAllGroups
self._chipLib.chip_ime_AppendCommand_Groups_RemoveAllGroups.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Groups_RemoveAllGroups.restype = ctypes.c_uint32
# Cluster Groups Command RemoveGroup
self._chipLib.chip_ime_AppendCommand_Groups_RemoveGroup.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Groups_RemoveGroup.restype = ctypes.c_uint32
# Cluster Groups Command ViewGroup
self._chipLib.chip_ime_AppendCommand_Groups_ViewGroup.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Groups_ViewGroup.restype = ctypes.c_uint32
# Cluster Groups ReadAttribute NameSupport
self._chipLib.chip_ime_ReadAttribute_Groups_NameSupport.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Groups_NameSupport.restype = ctypes.c_uint32
# Cluster Groups ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_Groups_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Groups_ClusterRevision.restype = ctypes.c_uint32
# Cluster Identify
# Cluster Identify Command Identify
self._chipLib.chip_ime_AppendCommand_Identify_Identify.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Identify_Identify.restype = ctypes.c_uint32
# Cluster Identify Command IdentifyQuery
self._chipLib.chip_ime_AppendCommand_Identify_IdentifyQuery.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Identify_IdentifyQuery.restype = ctypes.c_uint32
# Cluster Identify ReadAttribute IdentifyTime
self._chipLib.chip_ime_ReadAttribute_Identify_IdentifyTime.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Identify_IdentifyTime.restype = ctypes.c_uint32
# Cluster Identify WriteAttribute IdentifyTime
self._chipLib.chip_ime_WriteAttribute_Identify_IdentifyTime.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_Identify_IdentifyTime.restype = ctypes.c_uint32
# Cluster Identify ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_Identify_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Identify_ClusterRevision.restype = ctypes.c_uint32
# Cluster KeypadInput
# Cluster KeypadInput Command SendKey
self._chipLib.chip_ime_AppendCommand_KeypadInput_SendKey.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_KeypadInput_SendKey.restype = ctypes.c_uint32
# Cluster KeypadInput ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_KeypadInput_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_KeypadInput_ClusterRevision.restype = ctypes.c_uint32
# Cluster LevelControl
# Cluster LevelControl Command Move
self._chipLib.chip_ime_AppendCommand_LevelControl_Move.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_LevelControl_Move.restype = ctypes.c_uint32
# Cluster LevelControl Command MoveToLevel
self._chipLib.chip_ime_AppendCommand_LevelControl_MoveToLevel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_LevelControl_MoveToLevel.restype = ctypes.c_uint32
# Cluster LevelControl Command MoveToLevelWithOnOff
self._chipLib.chip_ime_AppendCommand_LevelControl_MoveToLevelWithOnOff.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_LevelControl_MoveToLevelWithOnOff.restype = ctypes.c_uint32
# Cluster LevelControl Command MoveWithOnOff
self._chipLib.chip_ime_AppendCommand_LevelControl_MoveWithOnOff.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_LevelControl_MoveWithOnOff.restype = ctypes.c_uint32
# Cluster LevelControl Command Step
self._chipLib.chip_ime_AppendCommand_LevelControl_Step.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_LevelControl_Step.restype = ctypes.c_uint32
# Cluster LevelControl Command StepWithOnOff
self._chipLib.chip_ime_AppendCommand_LevelControl_StepWithOnOff.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_LevelControl_StepWithOnOff.restype = ctypes.c_uint32
# Cluster LevelControl Command Stop
self._chipLib.chip_ime_AppendCommand_LevelControl_Stop.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_LevelControl_Stop.restype = ctypes.c_uint32
# Cluster LevelControl Command StopWithOnOff
self._chipLib.chip_ime_AppendCommand_LevelControl_StopWithOnOff.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_LevelControl_StopWithOnOff.restype = ctypes.c_uint32
# Cluster LevelControl ReadAttribute CurrentLevel
self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentLevel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentLevel.restype = ctypes.c_uint32
# Cluster LevelControl ConfigureAttribute CurrentLevel
self._chipLib.chip_ime_ConfigureAttribute_LevelControl_CurrentLevel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_ConfigureAttribute_LevelControl_CurrentLevel.restype = ctypes.c_uint32
# Cluster LevelControl ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_LevelControl_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_LevelControl_ClusterRevision.restype = ctypes.c_uint32
# Cluster LowPower
# Cluster LowPower Command Sleep
self._chipLib.chip_ime_AppendCommand_LowPower_Sleep.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_LowPower_Sleep.restype = ctypes.c_uint32
# Cluster LowPower ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_LowPower_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_LowPower_ClusterRevision.restype = ctypes.c_uint32
# Cluster MediaInput
# Cluster MediaInput Command HideInputStatus
self._chipLib.chip_ime_AppendCommand_MediaInput_HideInputStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_MediaInput_HideInputStatus.restype = ctypes.c_uint32
# Cluster MediaInput Command RenameInput
self._chipLib.chip_ime_AppendCommand_MediaInput_RenameInput.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_MediaInput_RenameInput.restype = ctypes.c_uint32
# Cluster MediaInput Command SelectInput
self._chipLib.chip_ime_AppendCommand_MediaInput_SelectInput.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_MediaInput_SelectInput.restype = ctypes.c_uint32
# Cluster MediaInput Command ShowInputStatus
self._chipLib.chip_ime_AppendCommand_MediaInput_ShowInputStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_MediaInput_ShowInputStatus.restype = ctypes.c_uint32
# Cluster MediaInput ReadAttribute MediaInputList
self._chipLib.chip_ime_ReadAttribute_MediaInput_MediaInputList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_MediaInput_MediaInputList.restype = ctypes.c_uint32
# Cluster MediaInput ReadAttribute CurrentMediaInput
self._chipLib.chip_ime_ReadAttribute_MediaInput_CurrentMediaInput.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_MediaInput_CurrentMediaInput.restype = ctypes.c_uint32
# Cluster MediaInput ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_MediaInput_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_MediaInput_ClusterRevision.restype = ctypes.c_uint32
# Cluster MediaPlayback
# Cluster MediaPlayback Command MediaFastForward
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaFastForward.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaFastForward.restype = ctypes.c_uint32
# Cluster MediaPlayback Command MediaNext
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaNext.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaNext.restype = ctypes.c_uint32
# Cluster MediaPlayback Command MediaPause
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaPause.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaPause.restype = ctypes.c_uint32
# Cluster MediaPlayback Command MediaPlay
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaPlay.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaPlay.restype = ctypes.c_uint32
# Cluster MediaPlayback Command MediaPrevious
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaPrevious.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaPrevious.restype = ctypes.c_uint32
# Cluster MediaPlayback Command MediaRewind
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaRewind.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaRewind.restype = ctypes.c_uint32
# Cluster MediaPlayback Command MediaSeek
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaSeek.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint64]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaSeek.restype = ctypes.c_uint32
# Cluster MediaPlayback Command MediaSkipBackward
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaSkipBackward.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint64]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaSkipBackward.restype = ctypes.c_uint32
# Cluster MediaPlayback Command MediaSkipForward
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaSkipForward.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint64]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaSkipForward.restype = ctypes.c_uint32
# Cluster MediaPlayback Command MediaStartOver
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaStartOver.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaStartOver.restype = ctypes.c_uint32
# Cluster MediaPlayback Command MediaStop
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaStop.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_MediaPlayback_MediaStop.restype = ctypes.c_uint32
# Cluster MediaPlayback ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_MediaPlayback_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_MediaPlayback_ClusterRevision.restype = ctypes.c_uint32
# Cluster NetworkCommissioning
# Cluster NetworkCommissioning Command AddThreadNetwork
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_AddThreadNetwork.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_AddThreadNetwork.restype = ctypes.c_uint32
# Cluster NetworkCommissioning Command AddWiFiNetwork
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_AddWiFiNetwork.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_AddWiFiNetwork.restype = ctypes.c_uint32
# Cluster NetworkCommissioning Command DisableNetwork
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_DisableNetwork.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_DisableNetwork.restype = ctypes.c_uint32
# Cluster NetworkCommissioning Command EnableNetwork
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_EnableNetwork.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_EnableNetwork.restype = ctypes.c_uint32
# Cluster NetworkCommissioning Command GetLastNetworkCommissioningResult
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_GetLastNetworkCommissioningResult.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_GetLastNetworkCommissioningResult.restype = ctypes.c_uint32
# Cluster NetworkCommissioning Command RemoveNetwork
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_RemoveNetwork.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_RemoveNetwork.restype = ctypes.c_uint32
# Cluster NetworkCommissioning Command ScanNetworks
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_ScanNetworks.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_ScanNetworks.restype = ctypes.c_uint32
# Cluster NetworkCommissioning Command UpdateThreadNetwork
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_UpdateThreadNetwork.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_UpdateThreadNetwork.restype = ctypes.c_uint32
# Cluster NetworkCommissioning Command UpdateWiFiNetwork
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_UpdateWiFiNetwork.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_NetworkCommissioning_UpdateWiFiNetwork.restype = ctypes.c_uint32
# Cluster NetworkCommissioning ReadAttribute FeatureMap
self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap.restype = ctypes.c_uint32
# Cluster NetworkCommissioning ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision.restype = ctypes.c_uint32
# Cluster OtaSoftwareUpdateProvider
# Cluster OtaSoftwareUpdateProvider Command ApplyUpdateRequest
self._chipLib.chip_ime_AppendCommand_OtaSoftwareUpdateProvider_ApplyUpdateRequest.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_OtaSoftwareUpdateProvider_ApplyUpdateRequest.restype = ctypes.c_uint32
# Cluster OtaSoftwareUpdateProvider Command NotifyUpdateApplied
self._chipLib.chip_ime_AppendCommand_OtaSoftwareUpdateProvider_NotifyUpdateApplied.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_OtaSoftwareUpdateProvider_NotifyUpdateApplied.restype = ctypes.c_uint32
# Cluster OtaSoftwareUpdateProvider Command QueryImage
self._chipLib.chip_ime_AppendCommand_OtaSoftwareUpdateProvider_QueryImage.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32, ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_bool, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_OtaSoftwareUpdateProvider_QueryImage.restype = ctypes.c_uint32
# Cluster OtaSoftwareUpdateProvider ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision.restype = ctypes.c_uint32
# Cluster OccupancySensing
# Cluster OccupancySensing ReadAttribute Occupancy
self._chipLib.chip_ime_ReadAttribute_OccupancySensing_Occupancy.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OccupancySensing_Occupancy.restype = ctypes.c_uint32
# Cluster OccupancySensing ConfigureAttribute Occupancy
self._chipLib.chip_ime_ConfigureAttribute_OccupancySensing_Occupancy.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_OccupancySensing_Occupancy.restype = ctypes.c_uint32
# Cluster OccupancySensing ReadAttribute OccupancySensorType
self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType.restype = ctypes.c_uint32
# Cluster OccupancySensing ReadAttribute OccupancySensorTypeBitmap
self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap.restype = ctypes.c_uint32
# Cluster OccupancySensing ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_OccupancySensing_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OccupancySensing_ClusterRevision.restype = ctypes.c_uint32
# Cluster OnOff
# Cluster OnOff Command Off
self._chipLib.chip_ime_AppendCommand_OnOff_Off.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_OnOff_Off.restype = ctypes.c_uint32
# Cluster OnOff Command OffWithEffect
self._chipLib.chip_ime_AppendCommand_OnOff_OffWithEffect.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_OnOff_OffWithEffect.restype = ctypes.c_uint32
# Cluster OnOff Command On
self._chipLib.chip_ime_AppendCommand_OnOff_On.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_OnOff_On.restype = ctypes.c_uint32
# Cluster OnOff Command OnWithRecallGlobalScene
self._chipLib.chip_ime_AppendCommand_OnOff_OnWithRecallGlobalScene.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_OnOff_OnWithRecallGlobalScene.restype = ctypes.c_uint32
# Cluster OnOff Command OnWithTimedOff
self._chipLib.chip_ime_AppendCommand_OnOff_OnWithTimedOff.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_OnOff_OnWithTimedOff.restype = ctypes.c_uint32
# Cluster OnOff Command Toggle
self._chipLib.chip_ime_AppendCommand_OnOff_Toggle.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_OnOff_Toggle.restype = ctypes.c_uint32
# Cluster OnOff ReadAttribute OnOff
self._chipLib.chip_ime_ReadAttribute_OnOff_OnOff.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OnOff_OnOff.restype = ctypes.c_uint32
# Cluster OnOff ConfigureAttribute OnOff
self._chipLib.chip_ime_ConfigureAttribute_OnOff_OnOff.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_OnOff_OnOff.restype = ctypes.c_uint32
# Cluster OnOff ReadAttribute GlobalSceneControl
self._chipLib.chip_ime_ReadAttribute_OnOff_GlobalSceneControl.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OnOff_GlobalSceneControl.restype = ctypes.c_uint32
# Cluster OnOff ReadAttribute OnTime
self._chipLib.chip_ime_ReadAttribute_OnOff_OnTime.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OnOff_OnTime.restype = ctypes.c_uint32
# Cluster OnOff WriteAttribute OnTime
self._chipLib.chip_ime_WriteAttribute_OnOff_OnTime.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_OnOff_OnTime.restype = ctypes.c_uint32
# Cluster OnOff ReadAttribute OffWaitTime
self._chipLib.chip_ime_ReadAttribute_OnOff_OffWaitTime.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OnOff_OffWaitTime.restype = ctypes.c_uint32
# Cluster OnOff WriteAttribute OffWaitTime
self._chipLib.chip_ime_WriteAttribute_OnOff_OffWaitTime.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_OnOff_OffWaitTime.restype = ctypes.c_uint32
# Cluster OnOff ReadAttribute StartUpOnOff
self._chipLib.chip_ime_ReadAttribute_OnOff_StartUpOnOff.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OnOff_StartUpOnOff.restype = ctypes.c_uint32
# Cluster OnOff WriteAttribute StartUpOnOff
self._chipLib.chip_ime_WriteAttribute_OnOff_StartUpOnOff.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_OnOff_StartUpOnOff.restype = ctypes.c_uint32
# Cluster OnOff ReadAttribute FeatureMap
self._chipLib.chip_ime_ReadAttribute_OnOff_FeatureMap.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OnOff_FeatureMap.restype = ctypes.c_uint32
# Cluster OnOff ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_OnOff_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OnOff_ClusterRevision.restype = ctypes.c_uint32
# Cluster OnOffSwitchConfiguration
# Cluster OnOffSwitchConfiguration ReadAttribute SwitchType
self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType.restype = ctypes.c_uint32
# Cluster OnOffSwitchConfiguration ReadAttribute SwitchActions
self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions.restype = ctypes.c_uint32
# Cluster OnOffSwitchConfiguration WriteAttribute SwitchActions
self._chipLib.chip_ime_WriteAttribute_OnOffSwitchConfiguration_SwitchActions.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_OnOffSwitchConfiguration_SwitchActions.restype = ctypes.c_uint32
# Cluster OnOffSwitchConfiguration ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision.restype = ctypes.c_uint32
# Cluster OperationalCredentials
# Cluster OperationalCredentials Command AddNOC
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_AddNOC.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_AddNOC.restype = ctypes.c_uint32
# Cluster OperationalCredentials Command AddTrustedRootCertificate
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_AddTrustedRootCertificate.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_AddTrustedRootCertificate.restype = ctypes.c_uint32
# Cluster OperationalCredentials Command OpCSRRequest
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_OpCSRRequest.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_OpCSRRequest.restype = ctypes.c_uint32
# Cluster OperationalCredentials Command RemoveFabric
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_RemoveFabric.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_RemoveFabric.restype = ctypes.c_uint32
# Cluster OperationalCredentials Command RemoveTrustedRootCertificate
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_RemoveTrustedRootCertificate.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_RemoveTrustedRootCertificate.restype = ctypes.c_uint32
# Cluster OperationalCredentials Command UpdateFabricLabel
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_UpdateFabricLabel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_UpdateFabricLabel.restype = ctypes.c_uint32
# Cluster OperationalCredentials Command UpdateNOC
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_UpdateNOC.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_OperationalCredentials_UpdateNOC.restype = ctypes.c_uint32
# Cluster OperationalCredentials ReadAttribute FabricsList
self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_FabricsList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_FabricsList.restype = ctypes.c_uint32
# Cluster OperationalCredentials ReadAttribute SupportedFabrics
self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics.restype = ctypes.c_uint32
# Cluster OperationalCredentials ReadAttribute CommissionedFabrics
self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics.restype = ctypes.c_uint32
# Cluster OperationalCredentials ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision.restype = ctypes.c_uint32
# Cluster PressureMeasurement
# Cluster PressureMeasurement ReadAttribute MeasuredValue
self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue.restype = ctypes.c_uint32
# Cluster PressureMeasurement ConfigureAttribute MeasuredValue
self._chipLib.chip_ime_ConfigureAttribute_PressureMeasurement_MeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_ConfigureAttribute_PressureMeasurement_MeasuredValue.restype = ctypes.c_uint32
# Cluster PressureMeasurement ReadAttribute MinMeasuredValue
self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue.restype = ctypes.c_uint32
# Cluster PressureMeasurement ReadAttribute MaxMeasuredValue
self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32
# Cluster PressureMeasurement ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision.restype = ctypes.c_uint32
# Cluster PumpConfigurationAndControl
# Cluster PumpConfigurationAndControl ReadAttribute MaxPressure
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure.restype = ctypes.c_uint32
# Cluster PumpConfigurationAndControl ReadAttribute MaxSpeed
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed.restype = ctypes.c_uint32
# Cluster PumpConfigurationAndControl ReadAttribute MaxFlow
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow.restype = ctypes.c_uint32
# Cluster PumpConfigurationAndControl ReadAttribute EffectiveOperationMode
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode.restype = ctypes.c_uint32
# Cluster PumpConfigurationAndControl ReadAttribute EffectiveControlMode
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode.restype = ctypes.c_uint32
# Cluster PumpConfigurationAndControl ReadAttribute Capacity
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity.restype = ctypes.c_uint32
# Cluster PumpConfigurationAndControl ConfigureAttribute Capacity
self._chipLib.chip_ime_ConfigureAttribute_PumpConfigurationAndControl_Capacity.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_ConfigureAttribute_PumpConfigurationAndControl_Capacity.restype = ctypes.c_uint32
# Cluster PumpConfigurationAndControl ReadAttribute OperationMode
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode.restype = ctypes.c_uint32
# Cluster PumpConfigurationAndControl WriteAttribute OperationMode
self._chipLib.chip_ime_WriteAttribute_PumpConfigurationAndControl_OperationMode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_PumpConfigurationAndControl_OperationMode.restype = ctypes.c_uint32
# Cluster PumpConfigurationAndControl ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision.restype = ctypes.c_uint32
# Cluster RelativeHumidityMeasurement
# Cluster RelativeHumidityMeasurement ReadAttribute MeasuredValue
self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue.restype = ctypes.c_uint32
# Cluster RelativeHumidityMeasurement ConfigureAttribute MeasuredValue
self._chipLib.chip_ime_ConfigureAttribute_RelativeHumidityMeasurement_MeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_RelativeHumidityMeasurement_MeasuredValue.restype = ctypes.c_uint32
# Cluster RelativeHumidityMeasurement ReadAttribute MinMeasuredValue
self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue.restype = ctypes.c_uint32
# Cluster RelativeHumidityMeasurement ReadAttribute MaxMeasuredValue
self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32
# Cluster RelativeHumidityMeasurement ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision.restype = ctypes.c_uint32
# Cluster Scenes
# Cluster Scenes Command AddScene
self._chipLib.chip_ime_AppendCommand_Scenes_AddScene.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32, ctypes.c_uint32, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_Scenes_AddScene.restype = ctypes.c_uint32
# Cluster Scenes Command GetSceneMembership
self._chipLib.chip_ime_AppendCommand_Scenes_GetSceneMembership.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Scenes_GetSceneMembership.restype = ctypes.c_uint32
# Cluster Scenes Command RecallScene
self._chipLib.chip_ime_AppendCommand_Scenes_RecallScene.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Scenes_RecallScene.restype = ctypes.c_uint32
# Cluster Scenes Command RemoveAllScenes
self._chipLib.chip_ime_AppendCommand_Scenes_RemoveAllScenes.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Scenes_RemoveAllScenes.restype = ctypes.c_uint32
# Cluster Scenes Command RemoveScene
self._chipLib.chip_ime_AppendCommand_Scenes_RemoveScene.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_Scenes_RemoveScene.restype = ctypes.c_uint32
# Cluster Scenes Command StoreScene
self._chipLib.chip_ime_AppendCommand_Scenes_StoreScene.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_Scenes_StoreScene.restype = ctypes.c_uint32
# Cluster Scenes Command ViewScene
self._chipLib.chip_ime_AppendCommand_Scenes_ViewScene.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_Scenes_ViewScene.restype = ctypes.c_uint32
# Cluster Scenes ReadAttribute SceneCount
self._chipLib.chip_ime_ReadAttribute_Scenes_SceneCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Scenes_SceneCount.restype = ctypes.c_uint32
# Cluster Scenes ReadAttribute CurrentScene
self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentScene.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentScene.restype = ctypes.c_uint32
# Cluster Scenes ReadAttribute CurrentGroup
self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentGroup.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentGroup.restype = ctypes.c_uint32
# Cluster Scenes ReadAttribute SceneValid
self._chipLib.chip_ime_ReadAttribute_Scenes_SceneValid.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Scenes_SceneValid.restype = ctypes.c_uint32
# Cluster Scenes ReadAttribute NameSupport
self._chipLib.chip_ime_ReadAttribute_Scenes_NameSupport.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Scenes_NameSupport.restype = ctypes.c_uint32
# Cluster Scenes ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_Scenes_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Scenes_ClusterRevision.restype = ctypes.c_uint32
# Cluster SoftwareDiagnostics
# Cluster SoftwareDiagnostics Command ResetWatermarks
self._chipLib.chip_ime_AppendCommand_SoftwareDiagnostics_ResetWatermarks.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_SoftwareDiagnostics_ResetWatermarks.restype = ctypes.c_uint32
# Cluster SoftwareDiagnostics ReadAttribute CurrentHeapHighWatermark
self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark.restype = ctypes.c_uint32
# Cluster SoftwareDiagnostics ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision.restype = ctypes.c_uint32
# Cluster Switch
# Cluster Switch ReadAttribute NumberOfPositions
self._chipLib.chip_ime_ReadAttribute_Switch_NumberOfPositions.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Switch_NumberOfPositions.restype = ctypes.c_uint32
# Cluster Switch ReadAttribute CurrentPosition
self._chipLib.chip_ime_ReadAttribute_Switch_CurrentPosition.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Switch_CurrentPosition.restype = ctypes.c_uint32
# Cluster Switch ConfigureAttribute CurrentPosition
self._chipLib.chip_ime_ConfigureAttribute_Switch_CurrentPosition.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_ConfigureAttribute_Switch_CurrentPosition.restype = ctypes.c_uint32
# Cluster Switch ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_Switch_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Switch_ClusterRevision.restype = ctypes.c_uint32
# Cluster TvChannel
# Cluster TvChannel Command ChangeChannel
self._chipLib.chip_ime_AppendCommand_TvChannel_ChangeChannel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_TvChannel_ChangeChannel.restype = ctypes.c_uint32
# Cluster TvChannel Command ChangeChannelByNumber
self._chipLib.chip_ime_AppendCommand_TvChannel_ChangeChannelByNumber.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_TvChannel_ChangeChannelByNumber.restype = ctypes.c_uint32
# Cluster TvChannel Command SkipChannel
self._chipLib.chip_ime_AppendCommand_TvChannel_SkipChannel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_TvChannel_SkipChannel.restype = ctypes.c_uint32
# Cluster TvChannel ReadAttribute TvChannelList
self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelList.restype = ctypes.c_uint32
# Cluster TvChannel ReadAttribute TvChannelLineup
self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelLineup.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelLineup.restype = ctypes.c_uint32
# Cluster TvChannel ReadAttribute CurrentTvChannel
self._chipLib.chip_ime_ReadAttribute_TvChannel_CurrentTvChannel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TvChannel_CurrentTvChannel.restype = ctypes.c_uint32
# Cluster TvChannel ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_TvChannel_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TvChannel_ClusterRevision.restype = ctypes.c_uint32
# Cluster TargetNavigator
# Cluster TargetNavigator Command NavigateTarget
self._chipLib.chip_ime_AppendCommand_TargetNavigator_NavigateTarget.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_AppendCommand_TargetNavigator_NavigateTarget.restype = ctypes.c_uint32
# Cluster TargetNavigator ReadAttribute TargetNavigatorList
self._chipLib.chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList.restype = ctypes.c_uint32
# Cluster TargetNavigator ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_TargetNavigator_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TargetNavigator_ClusterRevision.restype = ctypes.c_uint32
# Cluster TemperatureMeasurement
# Cluster TemperatureMeasurement ReadAttribute MeasuredValue
self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue.restype = ctypes.c_uint32
# Cluster TemperatureMeasurement ConfigureAttribute MeasuredValue
self._chipLib.chip_ime_ConfigureAttribute_TemperatureMeasurement_MeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_ConfigureAttribute_TemperatureMeasurement_MeasuredValue.restype = ctypes.c_uint32
# Cluster TemperatureMeasurement ReadAttribute MinMeasuredValue
self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue.restype = ctypes.c_uint32
# Cluster TemperatureMeasurement ReadAttribute MaxMeasuredValue
self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32
# Cluster TemperatureMeasurement ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision.restype = ctypes.c_uint32
# Cluster TestCluster
# Cluster TestCluster Command Test
self._chipLib.chip_ime_AppendCommand_TestCluster_Test.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_TestCluster_Test.restype = ctypes.c_uint32
# Cluster TestCluster Command TestAddArguments
self._chipLib.chip_ime_AppendCommand_TestCluster_TestAddArguments.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_TestCluster_TestAddArguments.restype = ctypes.c_uint32
# Cluster TestCluster Command TestNotHandled
self._chipLib.chip_ime_AppendCommand_TestCluster_TestNotHandled.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_TestCluster_TestNotHandled.restype = ctypes.c_uint32
# Cluster TestCluster Command TestSpecific
self._chipLib.chip_ime_AppendCommand_TestCluster_TestSpecific.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_TestCluster_TestSpecific.restype = ctypes.c_uint32
# Cluster TestCluster Command TestUnknownCommand
self._chipLib.chip_ime_AppendCommand_TestCluster_TestUnknownCommand.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_TestCluster_TestUnknownCommand.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Boolean
self._chipLib.chip_ime_ReadAttribute_TestCluster_Boolean.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Boolean.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Boolean
self._chipLib.chip_ime_WriteAttribute_TestCluster_Boolean.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_bool]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Boolean.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Bitmap8
self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap8.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap8.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Bitmap8
self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap8.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap8.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Bitmap16
self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap16.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap16.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Bitmap16
self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap16.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap16.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Bitmap32
self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap32.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap32.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Bitmap32
self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap32.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint32]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap32.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Bitmap64
self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap64.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap64.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Bitmap64
self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap64.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint64]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Bitmap64.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Int8u
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8u.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8u.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Int8u
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int8u.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int8u.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Int16u
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16u.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16u.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Int16u
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int16u.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int16u.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Int32u
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32u.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32u.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Int32u
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int32u.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint32]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int32u.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Int64u
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64u.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64u.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Int64u
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int64u.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint64]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int64u.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Int8s
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8s.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8s.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Int8s
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int8s.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int8]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int8s.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Int16s
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16s.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16s.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Int16s
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int16s.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int16s.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Int32s
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32s.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32s.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Int32s
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int32s.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int32]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int32s.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Int64s
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64s.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64s.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Int64s
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int64s.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int64]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Int64s.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Enum8
self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum8.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum8.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Enum8
self._chipLib.chip_ime_WriteAttribute_TestCluster_Enum8.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Enum8.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Enum16
self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum16.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum16.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Enum16
self._chipLib.chip_ime_WriteAttribute_TestCluster_Enum16.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Enum16.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute OctetString
self._chipLib.chip_ime_ReadAttribute_TestCluster_OctetString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_OctetString.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute OctetString
self._chipLib.chip_ime_WriteAttribute_TestCluster_OctetString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_WriteAttribute_TestCluster_OctetString.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute ListInt8u
self._chipLib.chip_ime_ReadAttribute_TestCluster_ListInt8u.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_ListInt8u.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute ListOctetString
self._chipLib.chip_ime_ReadAttribute_TestCluster_ListOctetString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_ListOctetString.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute ListStructOctetString
self._chipLib.chip_ime_ReadAttribute_TestCluster_ListStructOctetString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_ListStructOctetString.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute LongOctetString
self._chipLib.chip_ime_ReadAttribute_TestCluster_LongOctetString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_LongOctetString.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute LongOctetString
self._chipLib.chip_ime_WriteAttribute_TestCluster_LongOctetString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_WriteAttribute_TestCluster_LongOctetString.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute CharString
self._chipLib.chip_ime_ReadAttribute_TestCluster_CharString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_CharString.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute CharString
self._chipLib.chip_ime_WriteAttribute_TestCluster_CharString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_WriteAttribute_TestCluster_CharString.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute LongCharString
self._chipLib.chip_ime_ReadAttribute_TestCluster_LongCharString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_LongCharString.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute LongCharString
self._chipLib.chip_ime_WriteAttribute_TestCluster_LongCharString.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_char_p, ctypes.c_uint32]
self._chipLib.chip_ime_WriteAttribute_TestCluster_LongCharString.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute Unsupported
self._chipLib.chip_ime_ReadAttribute_TestCluster_Unsupported.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_Unsupported.restype = ctypes.c_uint32
# Cluster TestCluster WriteAttribute Unsupported
self._chipLib.chip_ime_WriteAttribute_TestCluster_Unsupported.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_bool]
self._chipLib.chip_ime_WriteAttribute_TestCluster_Unsupported.restype = ctypes.c_uint32
# Cluster TestCluster ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_TestCluster_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_TestCluster_ClusterRevision.restype = ctypes.c_uint32
# Cluster Thermostat
# Cluster Thermostat Command ClearWeeklySchedule
self._chipLib.chip_ime_AppendCommand_Thermostat_ClearWeeklySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Thermostat_ClearWeeklySchedule.restype = ctypes.c_uint32
# Cluster Thermostat Command GetRelayStatusLog
self._chipLib.chip_ime_AppendCommand_Thermostat_GetRelayStatusLog.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_Thermostat_GetRelayStatusLog.restype = ctypes.c_uint32
# Cluster Thermostat Command GetWeeklySchedule
self._chipLib.chip_ime_AppendCommand_Thermostat_GetWeeklySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_Thermostat_GetWeeklySchedule.restype = ctypes.c_uint32
# Cluster Thermostat Command SetWeeklySchedule
self._chipLib.chip_ime_AppendCommand_Thermostat_SetWeeklySchedule.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8]
self._chipLib.chip_ime_AppendCommand_Thermostat_SetWeeklySchedule.restype = ctypes.c_uint32
# Cluster Thermostat Command SetpointRaiseLower
self._chipLib.chip_ime_AppendCommand_Thermostat_SetpointRaiseLower.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_int8]
self._chipLib.chip_ime_AppendCommand_Thermostat_SetpointRaiseLower.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute LocalTemperature
self._chipLib.chip_ime_ReadAttribute_Thermostat_LocalTemperature.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_LocalTemperature.restype = ctypes.c_uint32
# Cluster Thermostat ConfigureAttribute LocalTemperature
self._chipLib.chip_ime_ConfigureAttribute_Thermostat_LocalTemperature.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_ConfigureAttribute_Thermostat_LocalTemperature.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute AbsMinHeatSetpointLimit
self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute AbsMaxHeatSetpointLimit
self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute AbsMinCoolSetpointLimit
self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute AbsMaxCoolSetpointLimit
self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute OccupiedCoolingSetpoint
self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint.restype = ctypes.c_uint32
# Cluster Thermostat WriteAttribute OccupiedCoolingSetpoint
self._chipLib.chip_ime_WriteAttribute_Thermostat_OccupiedCoolingSetpoint.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_WriteAttribute_Thermostat_OccupiedCoolingSetpoint.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute OccupiedHeatingSetpoint
self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint.restype = ctypes.c_uint32
# Cluster Thermostat WriteAttribute OccupiedHeatingSetpoint
self._chipLib.chip_ime_WriteAttribute_Thermostat_OccupiedHeatingSetpoint.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_WriteAttribute_Thermostat_OccupiedHeatingSetpoint.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute MinHeatSetpointLimit
self._chipLib.chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat WriteAttribute MinHeatSetpointLimit
self._chipLib.chip_ime_WriteAttribute_Thermostat_MinHeatSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_WriteAttribute_Thermostat_MinHeatSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute MaxHeatSetpointLimit
self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat WriteAttribute MaxHeatSetpointLimit
self._chipLib.chip_ime_WriteAttribute_Thermostat_MaxHeatSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_WriteAttribute_Thermostat_MaxHeatSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute MinCoolSetpointLimit
self._chipLib.chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat WriteAttribute MinCoolSetpointLimit
self._chipLib.chip_ime_WriteAttribute_Thermostat_MinCoolSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_WriteAttribute_Thermostat_MinCoolSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute MaxCoolSetpointLimit
self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat WriteAttribute MaxCoolSetpointLimit
self._chipLib.chip_ime_WriteAttribute_Thermostat_MaxCoolSetpointLimit.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_int16]
self._chipLib.chip_ime_WriteAttribute_Thermostat_MaxCoolSetpointLimit.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute ControlSequenceOfOperation
self._chipLib.chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation.restype = ctypes.c_uint32
# Cluster Thermostat WriteAttribute ControlSequenceOfOperation
self._chipLib.chip_ime_WriteAttribute_Thermostat_ControlSequenceOfOperation.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_Thermostat_ControlSequenceOfOperation.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute SystemMode
self._chipLib.chip_ime_ReadAttribute_Thermostat_SystemMode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_SystemMode.restype = ctypes.c_uint32
# Cluster Thermostat WriteAttribute SystemMode
self._chipLib.chip_ime_WriteAttribute_Thermostat_SystemMode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_Thermostat_SystemMode.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute StartOfWeek
self._chipLib.chip_ime_ReadAttribute_Thermostat_StartOfWeek.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_StartOfWeek.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute NumberOfWeeklyTransitions
self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute NumberOfDailyTransitions
self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute FeatureMap
self._chipLib.chip_ime_ReadAttribute_Thermostat_FeatureMap.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_FeatureMap.restype = ctypes.c_uint32
# Cluster Thermostat ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_Thermostat_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_Thermostat_ClusterRevision.restype = ctypes.c_uint32
# Cluster ThermostatUserInterfaceConfiguration
# Cluster ThermostatUserInterfaceConfiguration ReadAttribute TemperatureDisplayMode
self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode.restype = ctypes.c_uint32
# Cluster ThermostatUserInterfaceConfiguration WriteAttribute TemperatureDisplayMode
self._chipLib.chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode.restype = ctypes.c_uint32
# Cluster ThermostatUserInterfaceConfiguration ReadAttribute KeypadLockout
self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout.restype = ctypes.c_uint32
# Cluster ThermostatUserInterfaceConfiguration WriteAttribute KeypadLockout
self._chipLib.chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout.restype = ctypes.c_uint32
# Cluster ThermostatUserInterfaceConfiguration ReadAttribute ScheduleProgrammingVisibility
self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility.restype = ctypes.c_uint32
# Cluster ThermostatUserInterfaceConfiguration WriteAttribute ScheduleProgrammingVisibility
self._chipLib.chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility.restype = ctypes.c_uint32
# Cluster ThermostatUserInterfaceConfiguration ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics
# Cluster ThreadNetworkDiagnostics Command ResetCounts
self._chipLib.chip_ime_AppendCommand_ThreadNetworkDiagnostics_ResetCounts.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_ThreadNetworkDiagnostics_ResetCounts.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute Channel
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RoutingRole
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute NetworkName
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute PanId
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute ExtendedPanId
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute MeshLocalPrefix
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute OverrunCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute NeighborTableList
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RouteTableList
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute PartitionId
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute Weighting
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute DataVersion
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute StableDataVersion
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute LeaderRouterId
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute DetachedRoleCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute ChildRoleCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RouterRoleCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute LeaderRoleCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute AttachAttemptCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute PartitionIdChangeCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute BetterPartitionAttachAttemptCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute ParentChangeCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxTotalCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxUnicastCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxBroadcastCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxAckRequestedCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxAckedCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxNoAckRequestedCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxDataCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxDataPollCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxBeaconCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxBeaconRequestCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxOtherCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxRetryCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxDirectMaxRetryExpiryCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxIndirectMaxRetryExpiryCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxErrCcaCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxErrAbortCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute TxErrBusyChannelCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxTotalCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxUnicastCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxBroadcastCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxDataCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxDataPollCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxBeaconCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxBeaconRequestCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxOtherCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxAddressFilteredCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxDestAddrFilteredCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxDuplicatedCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxErrNoFrameCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxErrUnknownNeighborCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxErrInvalidSrcAddrCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxErrSecCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxErrFcsCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute RxErrOtherCount
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute SecurityPolicy
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute ChannelMask
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute OperationalDatasetComponents
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OperationalDatasetComponents.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OperationalDatasetComponents.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute ActiveNetworkFaultsList
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveNetworkFaultsList.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveNetworkFaultsList.restype = ctypes.c_uint32
# Cluster ThreadNetworkDiagnostics ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision.restype = ctypes.c_uint32
# Cluster WakeOnLan
# Cluster WakeOnLan ReadAttribute WakeOnLanMacAddress
self._chipLib.chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress.restype = ctypes.c_uint32
# Cluster WakeOnLan ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_WakeOnLan_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WakeOnLan_ClusterRevision.restype = ctypes.c_uint32
# Cluster WiFiNetworkDiagnostics
# Cluster WiFiNetworkDiagnostics Command ResetCounts
self._chipLib.chip_ime_AppendCommand_WiFiNetworkDiagnostics_ResetCounts.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_WiFiNetworkDiagnostics_ResetCounts.restype = ctypes.c_uint32
# Cluster WiFiNetworkDiagnostics ReadAttribute Bssid
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid.restype = ctypes.c_uint32
# Cluster WiFiNetworkDiagnostics ReadAttribute SecurityType
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType.restype = ctypes.c_uint32
# Cluster WiFiNetworkDiagnostics ReadAttribute WiFiVersion
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion.restype = ctypes.c_uint32
# Cluster WiFiNetworkDiagnostics ReadAttribute ChannelNumber
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber.restype = ctypes.c_uint32
# Cluster WiFiNetworkDiagnostics ReadAttribute Rssi
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi.restype = ctypes.c_uint32
# Cluster WiFiNetworkDiagnostics ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision.restype = ctypes.c_uint32
# Cluster WindowCovering
# Cluster WindowCovering Command DownOrClose
self._chipLib.chip_ime_AppendCommand_WindowCovering_DownOrClose.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_WindowCovering_DownOrClose.restype = ctypes.c_uint32
# Cluster WindowCovering Command GoToLiftPercentage
self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToLiftPercentage.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToLiftPercentage.restype = ctypes.c_uint32
# Cluster WindowCovering Command GoToLiftValue
self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToLiftValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToLiftValue.restype = ctypes.c_uint32
# Cluster WindowCovering Command GoToTiltPercentage
self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToTiltPercentage.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToTiltPercentage.restype = ctypes.c_uint32
# Cluster WindowCovering Command GoToTiltValue
self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToTiltValue.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_WindowCovering_GoToTiltValue.restype = ctypes.c_uint32
# Cluster WindowCovering Command StopMotion
self._chipLib.chip_ime_AppendCommand_WindowCovering_StopMotion.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_WindowCovering_StopMotion.restype = ctypes.c_uint32
# Cluster WindowCovering Command UpOrOpen
self._chipLib.chip_ime_AppendCommand_WindowCovering_UpOrOpen.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_AppendCommand_WindowCovering_UpOrOpen.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute Type
self._chipLib.chip_ime_ReadAttribute_WindowCovering_Type.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_Type.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute CurrentPositionLift
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute CurrentPositionTilt
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute ConfigStatus
self._chipLib.chip_ime_ReadAttribute_WindowCovering_ConfigStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_ConfigStatus.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute CurrentPositionLiftPercentage
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage.restype = ctypes.c_uint32
# Cluster WindowCovering ConfigureAttribute CurrentPositionLiftPercentage
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionLiftPercentage.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionLiftPercentage.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute CurrentPositionTiltPercentage
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage.restype = ctypes.c_uint32
# Cluster WindowCovering ConfigureAttribute CurrentPositionTiltPercentage
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionTiltPercentage.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionTiltPercentage.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute OperationalStatus
self._chipLib.chip_ime_ReadAttribute_WindowCovering_OperationalStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_OperationalStatus.restype = ctypes.c_uint32
# Cluster WindowCovering ConfigureAttribute OperationalStatus
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_OperationalStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_OperationalStatus.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute TargetPositionLiftPercent100ths
self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionLiftPercent100ths.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionLiftPercent100ths.restype = ctypes.c_uint32
# Cluster WindowCovering ConfigureAttribute TargetPositionLiftPercent100ths
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_TargetPositionLiftPercent100ths.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_TargetPositionLiftPercent100ths.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute TargetPositionTiltPercent100ths
self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionTiltPercent100ths.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionTiltPercent100ths.restype = ctypes.c_uint32
# Cluster WindowCovering ConfigureAttribute TargetPositionTiltPercent100ths
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_TargetPositionTiltPercent100ths.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_TargetPositionTiltPercent100ths.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute EndProductType
self._chipLib.chip_ime_ReadAttribute_WindowCovering_EndProductType.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_EndProductType.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute CurrentPositionLiftPercent100ths
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercent100ths.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercent100ths.restype = ctypes.c_uint32
# Cluster WindowCovering ConfigureAttribute CurrentPositionLiftPercent100ths
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionLiftPercent100ths.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionLiftPercent100ths.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute CurrentPositionTiltPercent100ths
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercent100ths.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercent100ths.restype = ctypes.c_uint32
# Cluster WindowCovering ConfigureAttribute CurrentPositionTiltPercent100ths
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionTiltPercent100ths.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionTiltPercent100ths.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute InstalledOpenLimitLift
self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute InstalledClosedLimitLift
self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute InstalledOpenLimitTilt
self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute InstalledClosedLimitTilt
self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute Mode
self._chipLib.chip_ime_ReadAttribute_WindowCovering_Mode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_Mode.restype = ctypes.c_uint32
# Cluster WindowCovering WriteAttribute Mode
self._chipLib.chip_ime_WriteAttribute_WindowCovering_Mode.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint8]
self._chipLib.chip_ime_WriteAttribute_WindowCovering_Mode.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute SafetyStatus
self._chipLib.chip_ime_ReadAttribute_WindowCovering_SafetyStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_SafetyStatus.restype = ctypes.c_uint32
# Cluster WindowCovering ConfigureAttribute SafetyStatus
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_SafetyStatus.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16]
self._chipLib.chip_ime_ConfigureAttribute_WindowCovering_SafetyStatus.restype = ctypes.c_uint32
# Cluster WindowCovering ReadAttribute ClusterRevision
self._chipLib.chip_ime_ReadAttribute_WindowCovering_ClusterRevision.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16]
self._chipLib.chip_ime_ReadAttribute_WindowCovering_ClusterRevision.restype = ctypes.c_uint32
# Init response delegates
def HandleSuccess():
self._ChipStack.callbackRes = 0
self._ChipStack.completeEvent.set()
def HandleFailure(status):
self._ChipStack.callbackRes = status
self._ChipStack.completeEvent.set()
self._HandleSuccess = ChipClusters.SUCCESS_DELEGATE(HandleSuccess)
self._HandleFailure = ChipClusters.FAILURE_DELEGATE(HandleFailure)
self._chipLib.chip_ime_SetSuccessResponseDelegate(self._HandleSuccess)
self._chipLib.chip_ime_SetFailureResponseDelegate(self._HandleFailure)
| [
"noreply@github.com"
] | noreply@github.com |
71744ddfa4f910716c940e05d0a8b2493004e164 | ecb44a36763cb82b8c02760312418e23da8bc8f1 | /test_crop.py | fec9c5b6b533744296acc8119453b37bf0192445 | [] | no_license | johanubbink/photobooth | 3e32c355292c091f845031e2edb8923397824001 | 3b864a5ed3baa7cb50e59c8ba2b999bbb24ac2c8 | refs/heads/master | 2020-12-04T04:42:27.117421 | 2020-01-09T22:10:40 | 2020-01-09T22:10:40 | 231,616,462 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 919 | py | import glob
import os
from PIL import Image
def get_last_photo():
'''
Method to get the most recent file in the directory and
add the file
'''
list_of_files = glob.glob('images/*') # * means all if need specific format then *.csv
latest_file = max(list_of_files, key=os.path.getctime)
return latest_file
def crop_sensor(file_name):
'''
Method to crop the image to more closely resemble the webcam
'''
SIZE_PERCENT = 0.75
image1 = Image.open(file_name)
grid_x, grid_y = image1.size
desired_height = int(grid_y*SIZE_PERCENT)
desired_width = int(grid_x*SIZE_PERCENT)
crop_y = grid_y - desired_height
crop_x = grid_x - desired_width
image_cropped = image1.crop((crop_x//2,crop_y//2,grid_x - crop_x//2,grid_y - crop_y//2))
image_cropped.save(file_name)
latest = get_last_photo()
print (latest)
crop_sensor(latest) | [
"johan.ubbink@gmail.com"
] | johan.ubbink@gmail.com |
6b9eff8db477ad75b5041e4d195e0bb41ba74e3d | 62137b1e8b6b24d14ff926ee4d4beecd5817e29c | /file_0.py | 5d4ee1c3d609dd3678f4ddb2f93111f7d8b119e0 | [] | no_license | tionuriam/newproject | 2cedae322e408c630e549961b34fe29fe83a6f39 | bfd24286f2e135f49044ad30e139d5cb1d1a683b | refs/heads/master | 2020-09-14T18:54:22.525636 | 2019-11-21T17:10:04 | 2019-11-21T17:10:04 | 223,220,347 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 42 | py | print("Oops, I thin I broke the code!")
| [
"turiam@gmail.com"
] | turiam@gmail.com |
fb5c537766a3e918f1f2f4ff412eab23e1d498b5 | 3f5a02a26b49da58b93f515852fadff971877a11 | /run_one.py | 87a9da5efc9d6a9a396e648ffaf6cb821c654eac | [
"MIT"
] | permissive | karthikbharath/Trees_DyckPaths | 6c5b612754bff5fc16f142eb04cad02330837759 | 6fc9b5e603aa8bb89cb68964a06d3992f32085a7 | refs/heads/master | 2020-12-02T16:22:06.429165 | 2017-07-07T13:29:33 | 2017-07-07T13:29:33 | 96,541,142 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,718 | py | #!/usr/bin/env python
#
# Author: Anju Kambadur
# Please run as follows:
# ./run_one.py -n 1,2,3 4 -d <distribution> ...
#
# For help please see:
# ./run_one.py -h
#
import os
import sys
import re
from optparse import OptionParser
def nodes_callback(option, opt, value, parser):
setattr(parser.values, option.dest, re.split(',', value))
def parseArguments():
parser = OptionParser('Process arguments')
parser.add_option('-d', '--distribution',
dest='distribution',
default='Binomial',
action='store',
type='choice',
choices=['Binomial',
'Geometric',
'Poisson',
'Binary-0-2',
'Binary-0-1-2'],
help='distribution to simulate')
parser.add_option('-o', '--out-dir',
dest='out_dir',
default='result',
action='store',
type='string',
help='output directory')
parser.add_option('-n', '--nodes',
dest='nodes',
action='callback',
type='string',
callback=nodes_callback,
help='list of the number of nodes')
parser.add_option('-b', '--basename',
dest='basename',
default='',
action='store',
type='string',
help='prefix for output files')
parser.add_option('-p', '',
dest='p',
default=0.5,
action='store',
type='float',
help='Probability of success (Binomial,Binary-0-2,Binary-0-1-2,Geometric)')
parser.add_option('-l', '',
dest='l',
default=0.0,
action='store',
type='float',
help='A new value introduced by Karthik for Binary-0-2')
parser.add_option('-k', '',
dest='k',
default=2,
action='store',
type='int',
help='Number of trials (Binomial)')
parser.add_option('-L', '--lambda',
dest='L',
default=1,
action='store',
type='int',
help='Mean for Poisson')
parser.add_option('-t', '--num-experiments',
dest='num_experiments',
default=1,
action='store',
type='int',
help='Number of experiments to run per tree-size')
(options, args) = parser.parse_args()
return options
def main():
options = parseArguments()
if not os.path.isdir(options.out_dir):
print '%s does not exist, creating it ... ' % options.out_dir,
os.makedirs(options.out_dir)
print 'done'
response_file_string = \
'''\
--gen-method %s \
--num-trials %d \
--verbosity 0 \
--print-path true \
--print-tree true \
--measure-mle false \
--test-confidence false \
--lambda %d \
--k %d \
--p %f \
--l %f \
--dump-numbers false \
--use-random-weights false \
--num-threads 1 \
''' % (options.distribution, \
options.num_experiments, \
options.L, \
options.k, \
options.p,
options.l)
if not options.nodes:
print 'Please enter the number of nodes as a list, e.g., \'-n 10,20,30\''
return
for tree_size in options.nodes:
dist_string = ''
if options.distribution == 'Binary-0-2':
dist_string = 'Binary-0-2-p=%f' % options.p
elif options.distribution == 'Binary-0-1-2':
dist_string = 'Binary-0-1-2-p=%f' % options.p
elif options.distribution == 'Binomial':
dist_string = 'Binomial-p=%f-k=%d' % (options.p, options.k)
elif options.distribution == 'Geometric':
dist_string = 'Geometric-p=%f' % options.p
elif options.distribution == 'Poisson':
dist_string = 'Poisson-lambda=%d' % options.l
output_filename = '';
if options.basename: output_filename = options.basename+'-'+dist_string
else: output_filename = dist_string
cur_response_file_string = response_file_string + \
'''\
--n %s \
--dyck-out %s \
--dot-out %s \
''' % (tree_size, \
tree_size, \
options.out_dir+'/'+output_filename+'-dyck-n-'+tree_size+'.txt', \
options.out_dir+'/'+output_filename+'-dot-n-'+tree_size+'.dot')
print './harness %s' % cur_response_file_string
os.system('./harness %s' % cur_response_file_string)
# Main starts here
if __name__ == '__main__': main()
| [
"noreply@github.com"
] | noreply@github.com |
0044513fd1762c1decd4fc3f514cf241c31cae25 | ebe9ecfbace948bf93e79264db489dd5809e0e5b | /Libreria/ProyectoLibreria/gestion/urls.py | 630ed62adb6f69decd548595440307c58217b138 | [] | no_license | hariasfrancia/Backend-Tecsup | 13f6faaa519ddc482f997344ddee0a09a81e5ecb | b58f8e81699cd5df3ded3d41c0b7c3fe007d8db4 | refs/heads/master | 2023-04-15T00:11:27.002893 | 2021-04-18T04:50:30 | 2021-04-18T04:50:30 | 356,749,480 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | from django.urls import path
from .views import ListarCategoriaController, CRUDCategoriaController
# !Esta variable se tiene quellamar SI o SI así:
urlpatterns = [
path('categorias', ListarCategoriaController.as_view()),
path('categorias/<int:pk>', CRUDCategoriaController.as_view()),
]
| [
"hariasfrancia@gmail.com"
] | hariasfrancia@gmail.com |
8193114cc129b134848750940aebc211652c5404 | 92cdb5dd1fd6269755edbcb8129f698fd11d462a | /test/udb_integration_test/tests/test_dap_commands.py | c401abc2bd5ff56c5548762f6e45b28489e6dc84 | [
"Apache-2.0"
] | permissive | google/DAPLink-port | fb5314a2c64955dba48296329ec159a2839678ec | 3f6a45f653fb93ae8f8d63261871548a2eb75090 | refs/heads/master_udb | 2023-06-28T16:53:14.377760 | 2022-06-27T05:56:22 | 2022-06-27T05:56:22 | 280,530,485 | 15 | 12 | Apache-2.0 | 2022-06-06T07:11:25 | 2020-07-17T21:43:46 | C | UTF-8 | Python | false | false | 1,010 | py | #!/usr/bin/env python
from typing import ClassVar, Generator
from udb_dap_device import UDBDapTestDevice
from udb_test_helper import ContextTest
from pyocd.probe.pydapaccess.cmsis_dap_core import Capabilities
import logging
logger = logging.getLogger("test.udb_integration_test")
class DAPCommandTest(ContextTest):
udb: UDBDapTestDevice
def context(self) -> Generator:
with UDBDapTestDevice() as self.udb:
yield
def test_dap_cmd_info_for_swd_capability(self) -> None:
# Verify the DAP info command returned the expected data when the pyocd device was
# initialized
self.assertTrue((self.udb.get_device_dap_capabilities() & Capabilities.SWD) != 0,
"No SWD capability returned in DAP info")
def test_dap_vendor_command_version(self) -> None:
# Verify device responds to vendor commands
self.assertTrue((self.udb.get_udb_interface_version()[1:5] == "udb_",
"Wrong version returned"))
| [
"gaborcsapo@google.com"
] | gaborcsapo@google.com |
f27cadf13a59eadb627295a3c642e84f8e57ccb1 | 3c000380cbb7e8deb6abf9c6f3e29e8e89784830 | /venv/Lib/site-packages/cobra/modelimpl/cloud/hostrouteringressbytes15min.py | cc28259373b4b2613646e12c80ac99530e16d402 | [] | no_license | bkhoward/aciDOM | 91b0406f00da7aac413a81c8db2129b4bfc5497b | f2674456ecb19cf7299ef0c5a0887560b8b315d0 | refs/heads/master | 2023-03-27T23:37:02.836904 | 2021-03-26T22:07:54 | 2021-03-26T22:07:54 | 351,855,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,198 | py | # coding=UTF-8
# **********************************************************************
# Copyright (c) 2013-2020 Cisco Systems, Inc. All rights reserved
# written by zen warriors, do not modify!
# **********************************************************************
from cobra.mit.meta import ClassMeta
from cobra.mit.meta import StatsClassMeta
from cobra.mit.meta import CounterMeta
from cobra.mit.meta import PropMeta
from cobra.mit.meta import Category
from cobra.mit.meta import SourceRelationMeta
from cobra.mit.meta import NamedSourceRelationMeta
from cobra.mit.meta import TargetRelationMeta
from cobra.mit.meta import DeploymentPathMeta, DeploymentCategory
from cobra.model.category import MoCategory, PropCategory, CounterCategory
from cobra.mit.mo import Mo
# ##################################################
class HostRouterIngressBytes15min(Mo):
"""
Mo doc not defined in techpub!!!
"""
meta = StatsClassMeta("cobra.model.cloud.HostRouterIngressBytes15min", "host router cloud ingress bytess")
counter = CounterMeta("unicast", CounterCategory.COUNTER, "bytes", "host router ingress unicast bytes")
counter._propRefs[PropCategory.IMPLICIT_LASTREADING] = "unicastLast"
counter._propRefs[PropCategory.IMPLICIT_CUMULATIVE] = "unicastCum"
counter._propRefs[PropCategory.IMPLICIT_PERIODIC] = "unicastPer"
counter._propRefs[PropCategory.IMPLICIT_MIN] = "unicastMin"
counter._propRefs[PropCategory.IMPLICIT_MAX] = "unicastMax"
counter._propRefs[PropCategory.IMPLICIT_AVG] = "unicastAvg"
counter._propRefs[PropCategory.IMPLICIT_SUSPECT] = "unicastSpct"
counter._propRefs[PropCategory.IMPLICIT_BASELINE] = "unicastBase"
counter._propRefs[PropCategory.IMPLICIT_THRESHOLDED] = "unicastThr"
counter._propRefs[PropCategory.IMPLICIT_TREND_BASE] = "unicastTrBase"
counter._propRefs[PropCategory.IMPLICIT_TREND] = "unicastTr"
counter._propRefs[PropCategory.IMPLICIT_RATE] = "unicastRate"
meta._counters.append(counter)
meta.moClassName = "cloudHostRouterIngressBytes15min"
meta.rnFormat = "CDcloudHostRouterIngressBytes15min"
meta.category = MoCategory.STATS_CURRENT
meta.label = "current host router cloud ingress bytess stats in 15 minute"
meta.writeAccessMask = 0x601
meta.readAccessMask = 0x601
meta.isDomainable = False
meta.isReadOnly = True
meta.isConfigurable = False
meta.isDeletable = False
meta.isContextRoot = False
meta.parentClasses.add("cobra.model.cloud.HostRouterTunnelInfoHolder")
meta.superClasses.add("cobra.model.stats.Item")
meta.superClasses.add("cobra.model.stats.Curr")
meta.superClasses.add("cobra.model.cloud.HostRouterIngressBytes")
meta.rnPrefixes = [
('CDcloudHostRouterIngressBytes15min', False),
]
prop = PropMeta("str", "childAction", "childAction", 4, PropCategory.CHILD_ACTION)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop._addConstant("deleteAll", "deleteall", 16384)
prop._addConstant("deleteNonPresent", "deletenonpresent", 8192)
prop._addConstant("ignore", "ignore", 4096)
meta.props.add("childAction", prop)
prop = PropMeta("str", "cnt", "cnt", 16212, PropCategory.REGULAR)
prop.label = "Number of Collections During this Interval"
prop.isImplicit = True
prop.isAdmin = True
meta.props.add("cnt", prop)
prop = PropMeta("str", "dn", "dn", 1, PropCategory.DN)
prop.label = "None"
prop.isDn = True
prop.isImplicit = True
prop.isAdmin = True
prop.isCreateOnly = True
meta.props.add("dn", prop)
prop = PropMeta("str", "lastCollOffset", "lastCollOffset", 111, PropCategory.REGULAR)
prop.label = "Collection Length"
prop.isImplicit = True
prop.isAdmin = True
meta.props.add("lastCollOffset", prop)
prop = PropMeta("str", "modTs", "modTs", 7, PropCategory.REGULAR)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = 0
prop.defaultValueStr = "never"
prop._addConstant("never", "never", 0)
meta.props.add("modTs", prop)
prop = PropMeta("str", "repIntvEnd", "repIntvEnd", 110, PropCategory.REGULAR)
prop.label = "Reporting End Time"
prop.isImplicit = True
prop.isAdmin = True
meta.props.add("repIntvEnd", prop)
prop = PropMeta("str", "repIntvStart", "repIntvStart", 109, PropCategory.REGULAR)
prop.label = "Reporting Start Time"
prop.isImplicit = True
prop.isAdmin = True
meta.props.add("repIntvStart", prop)
prop = PropMeta("str", "rn", "rn", 2, PropCategory.RN)
prop.label = "None"
prop.isRn = True
prop.isImplicit = True
prop.isAdmin = True
prop.isCreateOnly = True
meta.props.add("rn", prop)
prop = PropMeta("str", "status", "status", 3, PropCategory.STATUS)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop._addConstant("created", "created", 2)
prop._addConstant("deleted", "deleted", 8)
prop._addConstant("modified", "modified", 4)
meta.props.add("status", prop)
prop = PropMeta("str", "unicastAvg", "unicastAvg", 54328, PropCategory.IMPLICIT_AVG)
prop.label = "host router ingress unicast bytes average value"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastAvg", prop)
prop = PropMeta("str", "unicastBase", "unicastBase", 54323, PropCategory.IMPLICIT_BASELINE)
prop.label = "host router ingress unicast bytes baseline"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastBase", prop)
prop = PropMeta("str", "unicastCum", "unicastCum", 54324, PropCategory.IMPLICIT_CUMULATIVE)
prop.label = "host router ingress unicast bytes cumulative"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastCum", prop)
prop = PropMeta("str", "unicastLast", "unicastLast", 54322, PropCategory.IMPLICIT_LASTREADING)
prop.label = "host router ingress unicast bytes current value"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastLast", prop)
prop = PropMeta("str", "unicastMax", "unicastMax", 54327, PropCategory.IMPLICIT_MAX)
prop.label = "host router ingress unicast bytes maximum value"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastMax", prop)
prop = PropMeta("str", "unicastMin", "unicastMin", 54326, PropCategory.IMPLICIT_MIN)
prop.label = "host router ingress unicast bytes minimum value"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastMin", prop)
prop = PropMeta("str", "unicastPer", "unicastPer", 54325, PropCategory.IMPLICIT_PERIODIC)
prop.label = "host router ingress unicast bytes periodic"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastPer", prop)
prop = PropMeta("str", "unicastRate", "unicastRate", 54333, PropCategory.IMPLICIT_RATE)
prop.label = "host router ingress unicast bytes rate"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastRate", prop)
prop = PropMeta("str", "unicastSpct", "unicastSpct", 54329, PropCategory.IMPLICIT_SUSPECT)
prop.label = "host router ingress unicast bytes suspect count"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastSpct", prop)
prop = PropMeta("str", "unicastThr", "unicastThr", 54330, PropCategory.IMPLICIT_THRESHOLDED)
prop.label = "host router ingress unicast bytes thresholded flags"
prop.isOper = True
prop.isStats = True
prop.defaultValue = 0
prop.defaultValueStr = "unspecified"
prop._addConstant("avgCrit", "avg-severity-critical", 2199023255552)
prop._addConstant("avgHigh", "avg-crossed-high-threshold", 68719476736)
prop._addConstant("avgLow", "avg-crossed-low-threshold", 137438953472)
prop._addConstant("avgMajor", "avg-severity-major", 1099511627776)
prop._addConstant("avgMinor", "avg-severity-minor", 549755813888)
prop._addConstant("avgRecovering", "avg-recovering", 34359738368)
prop._addConstant("avgWarn", "avg-severity-warning", 274877906944)
prop._addConstant("cumulativeCrit", "cumulative-severity-critical", 8192)
prop._addConstant("cumulativeHigh", "cumulative-crossed-high-threshold", 256)
prop._addConstant("cumulativeLow", "cumulative-crossed-low-threshold", 512)
prop._addConstant("cumulativeMajor", "cumulative-severity-major", 4096)
prop._addConstant("cumulativeMinor", "cumulative-severity-minor", 2048)
prop._addConstant("cumulativeRecovering", "cumulative-recovering", 128)
prop._addConstant("cumulativeWarn", "cumulative-severity-warning", 1024)
prop._addConstant("lastReadingCrit", "lastreading-severity-critical", 64)
prop._addConstant("lastReadingHigh", "lastreading-crossed-high-threshold", 2)
prop._addConstant("lastReadingLow", "lastreading-crossed-low-threshold", 4)
prop._addConstant("lastReadingMajor", "lastreading-severity-major", 32)
prop._addConstant("lastReadingMinor", "lastreading-severity-minor", 16)
prop._addConstant("lastReadingRecovering", "lastreading-recovering", 1)
prop._addConstant("lastReadingWarn", "lastreading-severity-warning", 8)
prop._addConstant("maxCrit", "max-severity-critical", 17179869184)
prop._addConstant("maxHigh", "max-crossed-high-threshold", 536870912)
prop._addConstant("maxLow", "max-crossed-low-threshold", 1073741824)
prop._addConstant("maxMajor", "max-severity-major", 8589934592)
prop._addConstant("maxMinor", "max-severity-minor", 4294967296)
prop._addConstant("maxRecovering", "max-recovering", 268435456)
prop._addConstant("maxWarn", "max-severity-warning", 2147483648)
prop._addConstant("minCrit", "min-severity-critical", 134217728)
prop._addConstant("minHigh", "min-crossed-high-threshold", 4194304)
prop._addConstant("minLow", "min-crossed-low-threshold", 8388608)
prop._addConstant("minMajor", "min-severity-major", 67108864)
prop._addConstant("minMinor", "min-severity-minor", 33554432)
prop._addConstant("minRecovering", "min-recovering", 2097152)
prop._addConstant("minWarn", "min-severity-warning", 16777216)
prop._addConstant("periodicCrit", "periodic-severity-critical", 1048576)
prop._addConstant("periodicHigh", "periodic-crossed-high-threshold", 32768)
prop._addConstant("periodicLow", "periodic-crossed-low-threshold", 65536)
prop._addConstant("periodicMajor", "periodic-severity-major", 524288)
prop._addConstant("periodicMinor", "periodic-severity-minor", 262144)
prop._addConstant("periodicRecovering", "periodic-recovering", 16384)
prop._addConstant("periodicWarn", "periodic-severity-warning", 131072)
prop._addConstant("rateCrit", "rate-severity-critical", 36028797018963968)
prop._addConstant("rateHigh", "rate-crossed-high-threshold", 1125899906842624)
prop._addConstant("rateLow", "rate-crossed-low-threshold", 2251799813685248)
prop._addConstant("rateMajor", "rate-severity-major", 18014398509481984)
prop._addConstant("rateMinor", "rate-severity-minor", 9007199254740992)
prop._addConstant("rateRecovering", "rate-recovering", 562949953421312)
prop._addConstant("rateWarn", "rate-severity-warning", 4503599627370496)
prop._addConstant("trendCrit", "trend-severity-critical", 281474976710656)
prop._addConstant("trendHigh", "trend-crossed-high-threshold", 8796093022208)
prop._addConstant("trendLow", "trend-crossed-low-threshold", 17592186044416)
prop._addConstant("trendMajor", "trend-severity-major", 140737488355328)
prop._addConstant("trendMinor", "trend-severity-minor", 70368744177664)
prop._addConstant("trendRecovering", "trend-recovering", 4398046511104)
prop._addConstant("trendWarn", "trend-severity-warning", 35184372088832)
prop._addConstant("unspecified", None, 0)
meta.props.add("unicastThr", prop)
prop = PropMeta("str", "unicastTr", "unicastTr", 54332, PropCategory.IMPLICIT_TREND)
prop.label = "host router ingress unicast bytes trend"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastTr", prop)
prop = PropMeta("str", "unicastTrBase", "unicastTrBase", 54331, PropCategory.IMPLICIT_TREND_BASE)
prop.label = "host router ingress unicast bytes trend baseline"
prop.isOper = True
prop.isStats = True
meta.props.add("unicastTrBase", prop)
# Deployment Meta
meta.deploymentQuery = True
meta.deploymentType = "Ancestor"
meta.deploymentQueryPaths.append(DeploymentPathMeta("FvCtxToHcloudIgw", "From fv:Ctx to hcloud:Igw", "cobra.model.hcloud.Igw"))
meta.deploymentQueryPaths.append(DeploymentPathMeta("FvCtxToHcloudVgw", "From fv:Ctx to hcloud:Vgw", "cobra.model.hcloud.Vgw"))
meta.deploymentQueryPaths.append(DeploymentPathMeta("FvCtxToCloudExtEPg", "From fvCtx (VRF) to cloudExtEPg", "cobra.model.cloud.ExtEPg"))
meta.deploymentQueryPaths.append(DeploymentPathMeta("FvCtxToCloudRegion", "From fvCtx (VRF) to CloudRegion", "cobra.model.cloud.Region"))
meta.deploymentQueryPaths.append(DeploymentPathMeta("FvCtxToHcloudCsr", "From fvCtx (VRF) to hcloudCsr (CSR)", "cobra.model.hcloud.Csr"))
meta.deploymentQueryPaths.append(DeploymentPathMeta("FvCtxToHCloudEndPoint", "From fvCtx (VRF) to hcloud:EndPoint", "cobra.model.hcloud.EndPoint"))
meta.deploymentQueryPaths.append(DeploymentPathMeta("FvCtxToHCloudCtx", "From fvCtx (VRF) to hcloudCtx (VPC)", "cobra.model.hcloud.Ctx"))
meta.deploymentQueryPaths.append(DeploymentPathMeta("FvCtxToCloudCtxProfile", "From fvCtx (VRF) to cloudCtxProfile", "cobra.model.cloud.CtxProfile"))
meta.deploymentQueryPaths.append(DeploymentPathMeta("FvCtxToCloudEPg", "From fvCtx (VRF) to cloud EPg", "cobra.model.cloud.EPg"))
meta.deploymentQueryPaths.append(DeploymentPathMeta("CtxToRegion", "Vrf to cloud Region", "cobra.model.cloud.Region"))
meta.deploymentQueryPaths.append(DeploymentPathMeta("CtxToNwIf", "Private Network to Interface", "cobra.model.nw.If"))
def __init__(self, parentMoOrDn, markDirty=True, **creationProps):
namingVals = []
Mo.__init__(self, parentMoOrDn, markDirty, *namingVals, **creationProps)
# End of package file
# ##################################################
| [
"bkhoward@live.com"
] | bkhoward@live.com |
6893693708dcaae0837dab91099dc9787226403e | bb7c7a1556c6a27799876b7a5440a98d530a3996 | /phonebook/book/migrations/0001_initial.py | cce593943ba889b19ce6365ca15f3058be9959fc | [] | no_license | alff0x1f/phonebook_npf | e332b958c7640c2fcbf5099d721e40fad34a57c5 | cdee4c6cb7e845832044303afbe0382c1ca0dfcd | refs/heads/master | 2020-09-28T14:28:46.454548 | 2019-12-09T06:10:48 | 2019-12-09T06:10:48 | 226,796,513 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 611 | py | # Generated by Django 3.0 on 2019-12-09 03:03
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='PhoneRecord',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('phone', models.CharField(max_length=50)),
('address', models.CharField(max_length=50)),
],
),
]
| [
"alff0x1f@gmail.com"
] | alff0x1f@gmail.com |
17480f6f7565ee7617480674a2fadf166e70810a | 1f8a47641cb1c987f70dd7cf502d49e07ded52af | /backend/hss/hss/wsgi.py | 1de8e14bb33a901652171821ff9561d31b1a8d19 | [] | no_license | do-park/shawcheckredemption | 0fda66e3c1958b1ea27258de2da51b6bb9ce92ef | 8267e4d4ce4e815600bb4c21f7df878c8807d645 | refs/heads/ft_front | 2023-01-19T16:58:44.680144 | 2020-11-26T08:02:21 | 2020-11-26T08:02:21 | 316,159,702 | 1 | 1 | null | 2020-11-26T08:02:22 | 2020-11-26T07:55:14 | null | UTF-8 | Python | false | false | 383 | py | """
WSGI config for hss project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hss.settings')
application = get_wsgi_application()
| [
"gjtjdtn201@naver.com"
] | gjtjdtn201@naver.com |
058d1285a53dbb0187d01cf1e58b809a202f32ac | a666728ea849cc385e4e487d4f5598d44ad67cf7 | /activitytracker/trackerapp/migrations/0007_auto_20190806_1914.py | 694012347199613163deed5500d32a7d169188f5 | [] | no_license | laurenmit/ActivityTracker | 051be5a682723a3c26878732cc8e505fc908527f | 3a6154741b9d5f7e7c1c692f604c5d4e9319be87 | refs/heads/master | 2021-02-16T04:01:27.645009 | 2020-03-04T17:35:02 | 2020-03-04T17:35:02 | 244,964,045 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,259 | py | # Generated by Django 2.2.3 on 2019-08-06 19:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('trackerapp', '0006_auto_20190805_1820'),
]
operations = [
migrations.AlterField(
model_name='totals',
name='bike_time',
field=models.IntegerField(),
),
migrations.AlterField(
model_name='totals',
name='hike_time',
field=models.IntegerField(),
),
migrations.AlterField(
model_name='totals',
name='other_time',
field=models.IntegerField(),
),
migrations.AlterField(
model_name='totals',
name='run_time',
field=models.IntegerField(),
),
migrations.AlterField(
model_name='totals',
name='swim_time',
field=models.IntegerField(),
),
migrations.AlterField(
model_name='totals',
name='time_total',
field=models.IntegerField(),
),
migrations.AlterField(
model_name='totals',
name='walk_time',
field=models.IntegerField(),
),
]
| [
"laurenmit98@bitbucket.org"
] | laurenmit98@bitbucket.org |
00a0207b66df98957fc27da9b7e1e9cd662daa42 | 004b3ad85e2c18cc0b946936396e9266a6417430 | /ssh-config.py | 3310b5bc1fbb42306e317be18feaec8f31b10f1a | [] | no_license | Anyass3/dmt-rpi-setup-script | 79f9daa49cda71a92966f3ce48956404e1437b1e | 081c2f3c6163478b0783e617ab47ef84ed676724 | refs/heads/main | 2023-08-30T19:38:16.834983 | 2021-10-28T10:51:11 | 2021-10-28T10:51:11 | 421,994,233 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | import re
with open('/etc/ssh/sshd_config') as f:
content=f.read()
content = re.sub(r'#PermitRootLogin.*\n','PermitRootLogin Yes\n' , content)
content = re.sub(r'#UseDNS no','UseDNS no' , content)
with open('/etc/ssh/sshd_config','w') as f:
f.write(content) | [
"nyassabu@gmail.com"
] | nyassabu@gmail.com |
3537db0ac3bc3368f969f3f8da94e081e8a6460e | d015039e1c070832d29898057bac90074e6cdf38 | /week2/day4_NumPy_SciPy/SciPy_1.py | 91677ec190374e17b0ddd28dccef76caa4a06d67 | [] | no_license | aikolesnikov/ptn_summer_school | f13955c0634d890cf1cfbbec502f9d58d1ca659b | 00c05fd1fdd86ccdba3c4fbd0101eb0196439808 | refs/heads/master | 2020-12-02T22:08:14.268572 | 2017-07-14T09:56:04 | 2017-07-14T09:56:04 | 96,089,867 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | import numpy as np
import scipy.interpolate
from scipy.interpolate import interp1d
import matplotlib.pyplot as plt
x = np.linspace(0, 10, 20)
y = np.sin(x)
f = interp1d(x, y)
f1 = interp1d(x, y)
print(np.sin(5))
print(f(5))
plt.plot(x, f(x), '-', f1(x), '--')
#plt.show()
from scipy.stats import describe
print(describe(x))
| [
"artyom.kolesnikov@gmail.com"
] | artyom.kolesnikov@gmail.com |
4857b7a788d7da057eb001f79e36abae96642ea4 | 0200c3abfaa0e19525dc8f278656ffc9f97b68ca | /FullDbAllChildFst.py | 5b3f3c78bc3183f3f8ef53f750caf3f67ce2cab1 | [] | no_license | eugenio-santos/rootanalysis | 61f795cb07192144d7a6309ca0d75fde83c86dbe | 14cd26c20f575d7690e101cac6f9167979b9e1b1 | refs/heads/main | 2023-06-03T07:43:48.988706 | 2021-06-20T16:23:21 | 2021-06-20T16:23:21 | 363,212,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,720 | py | import mariadb
import sys
import timeit
countAnalysis = 0
# Connect to MariaDB Platform
try:
conn = mariadb.connect(
user="root",
password="root",
host="127.0.0.1",
port=3306,
database="proj"
)
except mariadb.Error as e:
print(f"Error connecting to MariaDB Platform: {e}")
sys.exit(1)
cur = conn.cursor(buffered=True)
def rootAnalysis(key, table, f):
global countAnalysis
# selcionar as datas e valores de uma serie
query = 'SELECT Date, Value, anomaly FROM {} WHERE PrimaryKey ="{}" and anomaly = 1'.format(
table, key)
cur.execute(query)
datesNvalues = []
# ignoring 0 values for now
for d in cur:
if(d[1] != 0):
datesNvalues.append(d)
total = 0
for dateNvalue in datesNvalues:
date = dateNvalue[0]
rootValue = dateNvalue[1]
anom = dateNvalue[2]
start = timeit.default_timer()
leafCandidates = []
query = "SELECT * FROM ( SELECT * FROM {0} WHERE {0}.PrimaryKey NOT IN ( SELECT {0}.RelationKey FROM {0} WHERE {0}.GroupKey = '{1}' AND {0}.Date = '{2}') AND {0}.GroupKey = '{1}' AND {0}.Date = '{2}') AS A WHERE A.GroupKey = '{1}' AND A.Date = '{2}' AND A.relationkey != '' ORDER BY VALUE DESC".format(table, key, date)
cur.execute(query)
for c in cur:
countAnalysis += 1
if ((c[5]*100)/rootValue > 10):
leafCandidates.append(c)
else:
break
end = timeit.default_timer()
total += end-start
f.write('ROOT: {}, date: {}, $: {}, time:{}, a: {}\n'.format(
key, date, rootValue, end-start, anom))
f.write("leaf candidates: \n")
for l in leafCandidates:
f.writelines('{}, {}, {}, {}\n'.format(l[1], l[4], l[5], l[8]))
f.write('###########\nAvg for Key: {} = {} on {} entries. \n###########\n'.format(
key, total/len(datesNvalues), len(datesNvalues)))
return total, len(datesNvalues)
TABLE = 'gastos_train'
# results file
f = open("all_children_gastos_train_result.txt", "w")
query = 'SELECT * FROM {} WHERE RelationType = "ROOT" GROUP BY PrimaryKey'.format(
TABLE)
cur.execute(query)
rootKeys = []
for c in cur:
rootKeys.append(c[0])
print(rootKeys)
times = []
for rootKey in rootKeys:
times.append(rootAnalysis(rootKey, TABLE, f))
totalTime = 0
numSeries = 0
for t in times:
totalTime += t[0]
numSeries += t[1]
print('Total: ', totalTime, 'Avg: ', totalTime/numSeries,
' # Series: ', numSeries, 'Total Analysis: ', countAnalysis)
f.close()
| [
"noreply@github.com"
] | noreply@github.com |
8f2e7f337f5f3d2ac233ffb167e4bd14350407c6 | c9cb1b6391c290ef33d56f455ab6abbea5ea194a | /day11.py | 3e0a20dac995979cfe19dfad17a8d8d4f4d17a68 | [] | no_license | matthenschke/30-Days-of-Code-HackerRank | 5b6fbc5a9394a88aa7f87b6898fcf4f97f947a2a | 78f11ff81a178c7e611f7aefa2e091f5b64a85a1 | refs/heads/master | 2021-01-03T22:55:47.141800 | 2020-02-20T19:15:22 | 2020-02-20T19:15:22 | 240,270,365 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | #!/bin/python3
import math
import os
import random
import re
import sys
if __name__ == '__main__':
arr = []
for _ in range(6):
arr.append(list(map(int, input().rstrip().split())))
hour_glass_sums = []
for i in range(len(arr) - 2):
for j in range(len(arr[i]) - 2):
current_sum = 0
current_sum += sum(arr[i][j: j + 3]) + \
arr[i+1][j+1] + sum(arr[i+2][j: j + 3])
hour_glass_sums.append(current_sum)
print(max(hour_glass_sums))
| [
"matthewhenschke98@gmail.com"
] | matthewhenschke98@gmail.com |
360f05627dbd8c4159b54eca942d4974b63531c4 | 13a39681376455c8f47d40084a64265c6bc71d65 | /K 均值聚类/ConvexHull.py | 6dbd72b55373d3da7449f5b2c7d97770146be4a1 | [] | no_license | Jonathan-Jiang/Algorithm | f85bbef96c82861f26d0383ef069761f40b125de | 5dc6af8d7854d3ea2ad60237bcc1f21652c728fa | refs/heads/master | 2021-05-28T11:40:19.002992 | 2015-01-07T06:34:34 | 2015-01-07T06:34:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,837 | py | # -*- coding: utf-8 -*-
import pygame
from pygame.locals import *
from random import randint as rand
# ========================================
# GrahamScan algorithm
def Top(stack):
return stack[0]
def NextToTop(stack):
return stack[1]
def Push(p, stack):
stack.insert(0, p)
def Pop(stack):
return stack.pop(0)
def vec2DCrossProduct((x1, y1), (x2, y2), (x0, y0)):
# (x1 - x0) * (y2 - y0) - (x2 - x0) * (y1 - y0)
# 是 p0p1 叉乘 p0p2
# 如果这个值
# > 0 p0p1 在 p0p2 的顺时针方向
# < 0 p0p1 在 p0p2 的逆时针方向
# = 0 共线
return (x1 - x0) * (y2 - y0) - (x2 - x0) * (y1 - y0)
def turnLeft((x1, y1), (x2, y2), (x0, y0)):
return vec2DCrossProduct((x1, y1), (x2, y2), (x0, y0))
def GrahamScan(Q):
if len(Q) == 1 or len(Q) == 2:
return Q
# let p0 be the point with the minimum y-coordinate
Q = sorted(Q, key = lambda (x, y): y)
(x0, y0) = Q.pop(0)
# let <p1, ..., pm> be the remaining points in Q, sorted by the angle in counterclockwise order around p0
Q.sort(lambda (x1, y1), (x2, y2): turnLeft((x2, y2), (x1, y1), (x0, y0)))
# Top(S) = 0
stack = []
# Push(p0, S); Push(p1, S); Push(p2, S)
Push((x0, y0), stack)
Push(Q[0], stack)
Push(Q[1], stack)
Pop(Q)
Pop(Q)
for (x, y) in Q:
# while the angle formed by points NextToTop(S), Top(S) and pi makes a non-left turn do
# Pop(stack)
while turnLeft((x, y), Top(stack), NextToTop(stack)) >= 0:
Pop(stack)
Push((x, y), stack)
return stack
# ========================================
def drawConvexHull(points, screen):
frame_color = pygame.Color(200, 200, 200)
for i, point in enumerate(points):
pygame.draw.line(screen, frame_color, points[i], points[(i + 1) % len(points)], 3)
| [
"daishengdong@gmail.com"
] | daishengdong@gmail.com |
147eafbcdb47571b8ec157075995bcb513a53efa | f167dffa2f767a0419aa82bf434852069a8baeb8 | /lib/youtube_dl/extractor/kankan.py | a677ff44712794ef54f53a1afe9c55fbacad91e2 | [
"MIT"
] | permissive | firsttris/plugin.video.sendtokodi | d634490b55149adfdcb62c1af1eb77568b8da3f5 | 1095c58e2bc21de4ab6fcb67a70e4f0f04febbc3 | refs/heads/master | 2023-08-18T10:10:39.544848 | 2023-08-15T17:06:44 | 2023-08-15T17:06:44 | 84,665,460 | 111 | 31 | MIT | 2022-11-11T08:05:21 | 2017-03-11T16:53:06 | Python | UTF-8 | Python | false | false | 1,738 | py | from __future__ import unicode_literals
import re
import hashlib
from .common import InfoExtractor
_md5 = lambda s: hashlib.md5(s.encode('utf-8')).hexdigest()
class KankanIE(InfoExtractor):
_VALID_URL = r'https?://(?:.*?\.)?kankan\.com/.+?/(?P<id>\d+)\.shtml'
_TEST = {
'url': 'http://yinyue.kankan.com/vod/48/48863.shtml',
'md5': '29aca1e47ae68fc28804aca89f29507e',
'info_dict': {
'id': '48863',
'ext': 'flv',
'title': 'Ready To Go',
},
'skip': 'Only available from China',
}
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
title = self._search_regex(r'(?:G_TITLE=|G_MOVIE_TITLE = )[\'"](.+?)[\'"]', webpage, 'video title')
surls = re.search(r'surls:\[\'.+?\'\]|lurl:\'.+?\.flv\'', webpage).group(0)
gcids = re.findall(r'http://.+?/.+?/(.+?)/', surls)
gcid = gcids[-1]
info_url = 'http://p2s.cl.kankan.com/getCdnresource_flv?gcid=%s' % gcid
video_info_page = self._download_webpage(
info_url, video_id, 'Downloading video url info')
ip = self._search_regex(r'ip:"(.+?)"', video_info_page, 'video url ip')
path = self._search_regex(r'path:"(.+?)"', video_info_page, 'video url path')
param1 = self._search_regex(r'param1:(\d+)', video_info_page, 'param1')
param2 = self._search_regex(r'param2:(\d+)', video_info_page, 'param2')
key = _md5('xl_mp43651' + param1 + param2)
video_url = 'http://%s%s?key=%s&key1=%s' % (ip, path, key, param2)
return {
'id': video_id,
'title': title,
'url': video_url,
}
| [
"noreply@github.com"
] | noreply@github.com |
79c9226a1b3d3e20c7a138186c0d1034328a52c2 | d6004043924c8aa7640d00a83bb3fa11e789cb30 | /tools/prepare_data.py | f974c36eb82e3fb9bdcf34f6be01e36987bd7fc8 | [] | no_license | dongzhi0312/can-dta | 8dc63d4f76fe1c18acec7e4d55abc62da0ed3c58 | 4ba5c83eac14437cfdc7d1e8cd9840ffbd9627ad | refs/heads/master | 2023-02-03T21:49:58.927039 | 2020-12-17T02:38:23 | 2020-12-17T02:38:23 | 319,578,430 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,789 | py | import os
import data.utils as data_utils
from data.custom_dataset_dataloader import CustomDatasetDataLoader
from data.class_aware_dataset_dataloader import ClassAwareDataLoader
from config.config import cfg
def prepare_data_CAN():
# 转换操作的一些配置
dataloaders = {}
train_transform = data_utils.get_transform(True)
test_transform = data_utils.get_transform(False)
# 源域和目标域的数据目录
source = cfg.DATASET.SOURCE_NAME # train
target = cfg.DATASET.TARGET_NAME # validation
dataroot_S = os.path.join(cfg.DATASET.DATAROOT, source)
dataroot_T = os.path.join(cfg.DATASET.DATAROOT, target)
# 读取类别信息
with open(os.path.join(cfg.DATASET.DATAROOT, 'category.txt'), 'r') as f:
classes = f.readlines()
classes = [c.strip() for c in classes]
assert (len(classes) == cfg.DATASET.NUM_CLASSES)
# for clustering,加载单一源域数据
batch_size = cfg.CLUSTERING.SOURCE_BATCH_SIZE
dataset_type = 'SingleDataset'
print('Building clustering_%s dataloader...' % source)
dataloaders['clustering_' + source] = CustomDatasetDataLoader(
dataset_root=dataroot_S, dataset_type=dataset_type,
batch_size=batch_size, transform=train_transform,
train=False, num_workers=cfg.NUM_WORKERS,
classnames=classes)
batch_size = cfg.CLUSTERING.TARGET_BATCH_SIZE
dataset_type = cfg.CLUSTERING.TARGET_DATASET_TYPE # SingleDatasetWithoutLabel
print('Building clustering_%s dataloader...' % target)
dataloaders['clustering_' + target] = CustomDatasetDataLoader(
dataset_root=dataroot_T, dataset_type=dataset_type,
batch_size=batch_size, transform=train_transform,
train=False, num_workers=cfg.NUM_WORKERS,
classnames=classes)
# class-agnostic source dataloader for supervised training
batch_size = cfg.TRAIN.SOURCE_BATCH_SIZE
dataset_type = 'SingleDataset'
print('Building %s dataloader...' % source)
dataloaders[source] = CustomDatasetDataLoader(
dataset_root=dataroot_S, dataset_type=dataset_type,
batch_size=batch_size, transform=train_transform,
train=True, num_workers=cfg.NUM_WORKERS,
classnames=classes)
# initialize the categorical dataloader
dataset_type = 'CategoricalSTDataset'
source_batch_size = cfg.TRAIN.SOURCE_CLASS_BATCH_SIZE
target_batch_size = cfg.TRAIN.TARGET_CLASS_BATCH_SIZE
print('Building categorical dataloader...')
dataloaders['categorical'] = ClassAwareDataLoader(
dataset_type=dataset_type,
source_batch_size=source_batch_size,
target_batch_size=target_batch_size,
source_dataset_root=dataroot_S,
transform=train_transform,
classnames=classes,
num_workers=cfg.NUM_WORKERS,
drop_last=True, sampler='RandomSampler')
batch_size = cfg.TEST.BATCH_SIZE
dataset_type = cfg.TEST.DATASET_TYPE # SingleDataset
test_domain = cfg.TEST.DOMAIN if cfg.TEST.DOMAIN != "" else target # target:validation
dataroot_test = os.path.join(cfg.DATASET.DATAROOT, test_domain)
dataloaders['test'] = CustomDatasetDataLoader(
dataset_root=dataroot_test, dataset_type=dataset_type,
batch_size=batch_size, transform=test_transform,
train=False, num_workers=cfg.NUM_WORKERS,
classnames=classes)
return dataloaders
def prepare_data_MMD():
dataloaders = {}
train_transform = data_utils.get_transform(True)
test_transform = data_utils.get_transform(False)
source = cfg.DATASET.SOURCE_NAME
target = cfg.DATASET.TARGET_NAME
dataroot_S = os.path.join(cfg.DATASET.DATAROOT, source)
dataroot_T = os.path.join(cfg.DATASET.DATAROOT, target)
with open(os.path.join(cfg.DATASET.DATAROOT, 'category.txt'), 'r') as f:
classes = f.readlines()
classes = [c.strip() for c in classes]
assert (len(classes) == cfg.DATASET.NUM_CLASSES)
batch_size = cfg.TRAIN.SOURCE_BATCH_SIZE
dataset_type = 'SingleDataset'
dataloaders[source] = CustomDatasetDataLoader(
dataset_root=dataroot_S, dataset_type=dataset_type,
batch_size=batch_size, transform=train_transform,
train=True, num_workers=cfg.NUM_WORKERS,
classnames=classes)
batch_size = cfg.TRAIN.TARGET_BATCH_SIZE
dataset_type = 'SingleDatasetWithoutLabel'
dataloaders[target] = CustomDatasetDataLoader(
dataset_root=dataroot_T, dataset_type=dataset_type,
batch_size=batch_size, transform=train_transform,
train=True, num_workers=cfg.NUM_WORKERS,
classnames=classes)
batch_size = cfg.TEST.BATCH_SIZE
dataset_type = cfg.TEST.DATASET_TYPE
test_domain = cfg.TEST.DOMAIN if cfg.TEST.DOMAIN != "" else target
dataroot_test = os.path.join(cfg.DATASET.DATAROOT, test_domain)
dataloaders['test'] = CustomDatasetDataLoader(
dataset_root=dataroot_test, dataset_type=dataset_type,
batch_size=batch_size, transform=test_transform,
train=False, num_workers=cfg.NUM_WORKERS,
classnames=classes)
return dataloaders
def prepare_data_SingleDomainSource():
dataloaders = {}
train_transform = data_utils.get_transform(True)
test_transform = data_utils.get_transform(False)
source = cfg.DATASET.SOURCE_NAME
target = cfg.DATASET.TARGET_NAME
dataroot_S = os.path.join(cfg.DATASET.DATAROOT, source)
dataroot_T = os.path.join(cfg.DATASET.DATAROOT, target)
with open(os.path.join(cfg.DATASET.DATAROOT, 'category.txt'), 'r') as f:
classes = f.readlines()
classes = [c.strip() for c in classes]
assert (len(classes) == cfg.DATASET.NUM_CLASSES)
batch_size = cfg.TRAIN.SOURCE_BATCH_SIZE
dataset_type = 'SingleDataset'
dataloaders[source] = CustomDatasetDataLoader(
dataset_root=dataroot_S, dataset_type=dataset_type,
batch_size=batch_size, transform=train_transform,
train=True, num_workers=cfg.NUM_WORKERS,
classnames=classes)
batch_size = cfg.TEST.BATCH_SIZE
dataset_type = cfg.TEST.DATASET_TYPE
test_domain = cfg.TEST.DOMAIN if cfg.TEST.DOMAIN != "" else target
dataroot_test = os.path.join(cfg.DATASET.DATAROOT, test_domain)
dataloaders['test'] = CustomDatasetDataLoader(
dataset_root=dataroot_test, dataset_type=dataset_type,
batch_size=batch_size, transform=test_transform,
train=False, num_workers=cfg.NUM_WORKERS,
classnames=classes)
return dataloaders
def prepare_data_SingleDomainTarget():
dataloaders = {}
train_transform = data_utils.get_transform(True)
test_transform = data_utils.get_transform(False)
with open(os.path.join(cfg.DATASET.DATAROOT, 'category.txt'), 'r') as f:
classes = f.readlines()
classes = [c.strip() for c in classes]
assert (len(classes) == cfg.DATASET.NUM_CLASSES)
target = cfg.DATASET.TARGET_NAME
dataroot_T = os.path.join(cfg.DATASET.DATAROOT, target)
batch_size = cfg.TRAIN.TARGET_BATCH_SIZE
dataset_type = 'SingleDataset'
dataloaders[target] = CustomDatasetDataLoader(
dataset_root=dataroot_T, dataset_type=dataset_type,
batch_size=batch_size, transform=train_transform,
train=True, num_workers=cfg.NUM_WORKERS,
classnames=classes)
batch_size = cfg.TEST.BATCH_SIZE
dataset_type = cfg.TEST.DATASET_TYPE
test_domain = cfg.TEST.DOMAIN if cfg.TEST.DOMAIN != "" else target
dataroot_test = os.path.join(cfg.DATASET.DATAROOT, test_domain)
dataloaders['test'] = CustomDatasetDataLoader(
dataset_root=dataroot_test, dataset_type=dataset_type,
batch_size=batch_size, transform=test_transform,
train=False, num_workers=cfg.NUM_WORKERS,
classnames=classes)
return dataloaders
| [
"zhangzhidong0312@163.com"
] | zhangzhidong0312@163.com |
bdd0760e8844fd6ba461b3318c1347dc4022acd9 | b090cb9bc30ac595675d8aa253fde95aef2ce5ea | /trunk/test/NightlyRun/test405.py | 4234b88e576ef0f06697b7c02f12c1d1579361dc | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | eyhl/issm | 5ae1500715c258d7988e2ef344c5c1fd15be55f7 | 1013e74c28ed663ebb8c9d398d9be0964d002667 | refs/heads/master | 2022-01-05T14:31:23.235538 | 2019-01-15T13:13:08 | 2019-01-15T13:13:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 931 | py | #Test Name: SquareSheetShelfStressMHOPenalties
import numpy as np
from model import *
from socket import gethostname
from triangle import *
from setmask import *
from parameterize import *
from setflowequation import *
from solve import *
md=triangle(model(),'../Exp/Square.exp',180000.)
md=setmask(md,'../Exp/SquareShelf.exp','')
md=parameterize(md,'../Par/SquareSheetShelf.py')
md.extrude(5,1.)
md=setflowequation(md,'SSA','../Exp/SquareHalfRight.exp','fill','HO','coupling','penalties')
md.cluster=generic('name',gethostname(),'np',3)
md=solve(md,'Stressbalance')
#Fields and tolerances to track changes
field_names =['Vx','Vy','Vz','Vel','Pressure']
field_tolerances=[5e-05,5e-05,5e-05,5e-05,1e-05]
field_values=[\
md.results.StressbalanceSolution.Vx,\
md.results.StressbalanceSolution.Vy,\
md.results.StressbalanceSolution.Vz,\
md.results.StressbalanceSolution.Vel,\
md.results.StressbalanceSolution.Pressure,\
]
| [
"cummings.evan@gmail.com"
] | cummings.evan@gmail.com |
16171d2537690ba28373d9cd75ca453d9866e78b | 1cfed68681ff666e853693f7bcb69ed6aee57765 | /sensation_save.py | a52999091dc6009d97be3f0fe4b6cbe7b408d30a | [
"MIT"
] | permissive | HLTCHKUST/sensational_headline | dd323a99963d2b9bd2e3aaf3cb52b9109fc2e336 | ec024b8c562edd8205847782a675f14feac2836f | refs/heads/master | 2022-06-26T16:48:26.612197 | 2022-04-14T07:51:01 | 2022-04-14T07:51:01 | 202,470,204 | 26 | 13 | null | 2022-06-21T23:43:37 | 2019-08-15T03:49:17 | Python | UTF-8 | Python | false | false | 17,941 | py | import numpy as np
import logging
from tqdm import tqdm
from utils.config import *
from utils.utils_sensation_lcsts import *
from torch.nn.utils import clip_grad_norm
# from seq2seq.vanilla_seq2seq import *
# from seq2seq.attn_seq2seq import *
from seq2seq.sensation_get_to_the_point import *
from seq2seq.sensation_scorer import SensationCNN
import logging
import copy
import jieba
from utils.function import *
def count_parameters(model):
return sum(p.numel() for p in model.parameters() if p.requires_grad)
class Trainer(object):
def __init__(self):
args = NNParams().args
train, dev, test, lang, max_q, max_r = prepare_data_seq(batch_size=args['batch_size'], debug=args["debug"], shuffle=True, pointer_gen=args["pointer_gen"], output_vocab_size=args['output_vocab_size'], thd=args["thd"])
args["vocab_size"] = lang.n_words
args["max_q"] = max_q
args["max_r"] = max_r
self.args = args
self.train = train
self.dev = dev
self.test = test
self.lang = lang
# model = globals()[args["model_type"]](args, lang, max_q, max_r)
model = PointerAttnSeqToSeq(self.args, lang)
self.model = model
if USE_CUDA:
self.model = self.model.cuda()
logging.info(model)
logging.info("encoder parameters: {}".format(count_parameters(model.encoder)))
logging.info("decoder parameters: {}".format(count_parameters(model.decoder)))
logging.info("embedding parameters: {}".format(count_parameters(model.embedding)))
logging.info("model parameters: {}".format(count_parameters(model)))
self.loss, self.acc, self.reward, self.print_every = 0.0, 0.0, 0.0, 1
assert args["sensation_scorer_path"] is not None
opts = torch.load(args["sensation_scorer_path"]+"/args.th")
self.sensation_model = SensationCNN(opts, self.lang)
logging.info("load checkpoint from {}".format(args["sensation_scorer_path"]))
checkpoint = torch.load(args["sensation_scorer_path"]+"/sensation_scorer.th")
self.sensation_model.load_state_dict(checkpoint['model'])
if USE_CUDA:
self.sensation_model.cuda()
if self.args['optimizer'] == "adam":
self.optimizer = torch.optim.Adam(self.model.parameters(), lr=self.args['lr'])
elif self.args['optimizer'] == "sgd":
self.optimizer = torch.optim.SGD(self.model.parameters(), lr=self.args['lr'])
else:
raise ValueError("optimizer not implemented")
def save_model(self, save_name, best_result, step):
directory = "sensation_save/" + save_name + "/"
directory = directory + "_".join([str(self.args[a]) for a in save_params]) + "_" + str(best_result)
if not os.path.exists(directory):
os.makedirs(directory)
ckpt = {"model": self.model.state_dict(), "step": step, "optimizer": self.optimizer.state_dict(),
"best_result":best_result}
torch.save(self.args, directory+"/args.th")
if self.args["use_rl"]:
ckpt["rl_optimizer"] = self.rl_optimizer
torch.save(ckpt, directory+"/rl.th")
else:
torch.save(ckpt, directory+"/get_to_the_point.th")
return directory
def load_d_model(self):
path = self.args["d_model_path"]
ckpt = torch.load(path+"/disc.th")
logging.info("load ckpt from {}".format(path))
self.D = DiscriminatorCNN(torch.load(path+"/args.th"), self.lang)
self.D.load_state_dict(ckpt["disc"])
self.d_optimizer = torch.optim.Adam(self.D.parameters(), lr=0.001)
self.d_optimizer.load_state_dict(ckpt["d_optimizer"])
def load_base_model(self):
path = self.args["path"]
ckpt = torch.load(path+"/get_to_the_point.th")
logging.info("load ckpt from {}, step is {}, best_result {}".format(path, ckpt["step"], ckpt["best_result"]))
self.model.load_state_dict(ckpt["model"])
if not self.args["use_rl"]:
self.optimizer.load_state_dict(ckpt["optimizer"])
return ckpt["step"], ckpt["best_result"]
def load_rl_model(self):
path = self.args["rl_model_path"]
ckpt = torch.load(path+"/rl.th")
logging.info("load ckpt from {}, step is {}, best_result {}".format(path, ckpt["step"], ckpt["best_result"]))
self.model.load_state_dict(ckpt["model"])
self.optimizer.load_state_dict(ckpt["optimizer"])
self.rl_optimizer = ckpt["rl_optimizer"]
return ckpt["step"], ckpt["best_result"]
def print_loss(self, step):
print_loss_avg = self.loss / self.print_every
print_acc_avg = self.acc / self.print_every
print_reward_avg = self.reward / self.print_every
if self.args["use_rl"]:
print_expected_rewards_loss_avg = self.expected_rewards_loss / self.print_every
self.print_every += 1
if self.args["use_rl"]:
return 'step: {}, L:{:.2f}, acc:{:.2f}, r:{:.3f}, r_loss:{:.4f}'.format(step, print_loss_avg, print_acc_avg, print_reward_avg, print_expected_rewards_loss_avg)
else:
return 'step: {}, L:{:.2f}, acc:{:.2f}, r:{:.3f}'.format(step, print_loss_avg, print_acc_avg, print_reward_avg)
def evaluate_d(self):
true_a, fake_a = [], []
for batch in self.dev:
input_batch = batch["input_batch"].transpose(0,1)
sampled_batch, sampled_ext_vocab_batch, sampled_lengths = self.old_model.sample_batch(batch)
probs = self.D(input_batch, sampled_batch)
true_acc, fake_acc = self.d_step(batch, probs, backward=False)
true_a.append(true_acc), fake_a.append(fake_acc)
logging.info("true accuracy {}, fake accuracy {}".format(sum(true_a) / len(true_a), sum(fake_a) / len(fake_a)))
def pretrain_d(self):
for i, batch in enumerate(self.train):
self.d_optimizer.zero_grad()
input_batch = batch["input_batch"].transpose(0,1)
sampled_batch, sampled_ext_vocab_batch, sampled_lengths = self.old_model.sample_batch(batch)
probs = self.D(input_batch, sampled_batch)
self.d_step(batch, probs)
self.d_optimizer.step()
self.evaluate_d()
def train_step(self, batch, step, reset):
if reset:
self.loss = 0.0
self.acc = 0.0
self.reward = 0.0
self.print_every = 1
if self.args["use_rl"]:
self.expected_rewards_loss = 0.0
self.optimizer.zero_grad()
if self.args["use_rl"]:
r, loss, acc, expected_rewards_loss, _ = self.model.get_rl_loss(batch, self.sensation_model)
else:
_, loss, acc = self.model.get_loss(batch)
loss.backward()
clip_grad_norm(self.model.parameters(), self.args["max_grad_norm"])
self.optimizer.step()
self.loss += loss.data[0]
self.acc += acc.data[0]
if self.args["use_rl"]:
self.reward += r.data[0]
if self.args["use_rl"]:
self.rl_optimizer.zero_grad()
expected_rewards_loss.backward()
self.rl_optimizer.step()
self.expected_rewards_loss += expected_rewards_loss.data[0]
def d_step(self, batch, probs, backward=True):
## from seq_first to batch first
input_batch = batch["input_batch"].transpose(0,1)
target_batch = batch["target_batch"].transpose(0,1)
batch_size = input_batch.size(0)
true_prob = self.D(input_batch, target_batch)
true_labels = Variable(torch.ones(batch_size))
if USE_CUDA:
true_labels = true_labels.cuda()
true_loss = F.binary_cross_entropy(true_prob, true_labels)
if backward:
true_loss.backward()
true_acc = ((true_prob > 0.5).long() == true_labels.long()).float().sum() * 1.0 / true_labels.size(0)
fake_labels = Variable(torch.zeros(batch_size))
if USE_CUDA:
fake_labels = fake_labels.cuda()
fake_loss = F.binary_cross_entropy(probs, fake_labels)
if backward:
fake_loss.backward(retain_graph=True)
fake_acc = ((probs > 0.5).long() == fake_labels.long()).float().sum() * 1.0 / fake_labels.size(0)
loss = (true_loss.data[0] + fake_loss.data[0]) / 2
# acc = (true_acc + fake_acc) / 2
if backward:
logging.info("true loss is {}, fake loss is {}, true acc is {}, false acc is {}".format(true_loss, fake_loss, true_acc, fake_acc))
return true_acc.data[0], fake_acc.data[0]
def training(self):
# Configure models
step = 0
best_metric = 0.0
cnt = 0
if self.args["use_rl"] and self.args["path"] is None and self.args["rl_model_path"] is None:
raise ValueError("use rl but path is not given")
if self.args["use_rl"] is None and self.args["rl_model_path"] is not None:
raise ValueError("not using rl but give rl_model_path")
if self.args["rl_model_path"] is not None:
self.model.expected_reward_layer = torch.nn.Linear(self.args["hidden_size"], 1)
if USE_CUDA:
self.model.expected_reward_layer = self.model.expected_reward_layer.cuda()
self.rl_optimizer = torch.optim.Adam(self.model.expected_reward_layer.parameters(), lr=self.args["rl_lr"])
step, best_metric = self.load_rl_model()
elif self.args["path"] is not None:
step, best_metric = self.load_base_model()
if self.args["use_rl"]:
best_metric = 0.0
self.model.expected_reward_layer = torch.nn.Linear(self.args["hidden_size"], 1)
if USE_CUDA:
self.model.expected_reward_layer = self.model.expected_reward_layer.cuda()
self.rl_optimizer = torch.optim.Adam(self.model.expected_reward_layer.parameters(), lr=self.args["rl_lr"])
else:
pass
# self.old_model = copy.deepcopy(self.model)
total_steps = self.args["total_steps"]
while step < total_steps:
for j, batch in enumerate(self.train):
if self.args['debug'] and j>1100:
break
if not self.args["debug"]:
logging_step = 1000
else:
logging_step = 10
if j % logging_step == 0:
# if self.args["use_rl"]:
# save_folder = "logs/Rl/"+"_".join([str(self.args[a]) for a in save_params])
# os.makedirs(save_folder, exist_ok=True)
# self.save_decode_sents(self.test, save_folder+"/prediction_step_{}.txt".format(step))
hyp, ref = self.model.predict_batch(batch, self.args["decode_type"])
decoded_sents = self.model.decode_batch(batch,"beam")
lexicon_rewards = self.model.get_lexicon_reward(decoded_sents, batch, self.sensation_model)
rewards = self.model.get_reward(decoded_sents, batch, self.sensation_model)[0]
for i,(prediction, ground_truth) in enumerate(zip(hyp, ref)):
logging.info("prediction: {}".format(prediction))
logging.info("prediction sensation score: {}, {}".format(lexicon_rewards[i], rewards[i]))
if self.args["use_rl"]:
rouge_rewards = self.model.compute_rouge_reward(list(jieba.cut("".join(prediction.split()))), batch["input_txt"][i], batch["target_txt"][i])
logging.info("rouge_r: {}, lexicon_r: {}, arousal_r:{}, reward:{}".format(rouge_rewards, lexicon_rewards[i], 0.0, rewards[i]))
logging.info("ground truth: {}".format(ground_truth))
logging.info("ground sensation score: {}".format(batch["sensation_scores"][i]))
logging.info("input article: {}".format(batch["input_txt"][i]))
logging.info("decode type: {}, {}: {}".format(self.args["decode_type"], rouge_metric, rouge([prediction], [ground_truth])[rouge_metric]))
if step % int(self.args['eval_step']) == 0:
dev_metric, _, (hyp, ref, rewards, sensation_scores, articles) = self.model.evaluate(self.dev, self.args["decode_type"], sensation_model=self.sensation_model, return_pred=True)
if(dev_metric > best_metric):
best_metric = dev_metric
cnt=0
if self.args["use_rl"]:
directory = self.save_model("Rl", best_metric, step)
with open(directory + "/prediction", "w") as f:
f.write("\n".join(["{}\t{:.5f}\n{}\t{:.5f}\n{}\n".format(h,r,g,s,a) for h,g,r,s,a in zip(hyp, ref, rewards, sensation_scores, articles)]))
else:
directory = self.save_model("PointerAttn", best_metric, step)
with open(directory + "/prediction", "w") as f:
f.write("\n".join(["{}\t{:.5f}\n{}\t{:.5f}\n{}\n".format(h,r,g,s,a) for h,g,r,s,a in zip(hyp, ref, rewards, sensation_scores, articles)]))
else:
cnt+=1
if(cnt == 5):
## early stopping
step = total_steps + 1
break
self.train_step(batch, step, j==0)
logging.info(self.print_loss(step))
step += 1
def save_decode_sents(self, data, save_file):
logging.info("start decoding")
hyp = []
ref = []
article = []
# pbar = tqdm(enumerate(dev), total=len(dev))
# for j, data_dev in pbar:
rewards = []
rouge_r = []
lexicon_rewards = []
for j, data_dev in enumerate(data):
decoded_sents = self.model.decode_batch(data_dev, "beam")
if self.args["use_rl"]:
lexicon_rewards.extend([r for r in self.model.get_lexicon_reward(decoded_sents, data_dev, self.sensation_model)])
rewards.extend([ r for r in self.model.get_reward(decoded_sents, data_dev, self.sensation_model)[0] ])
for i, sent in enumerate(decoded_sents):
hyp.append(" ".join("".join(sent)))
ref.append(" ".join("".join(data_dev["target_txt"][i].split())))
article.append(data_dev["input_txt"][i])
if self.args["use_rl"]:
rouge_r.append(self.model.compute_rouge_reward(sent, data_dev["input_txt"][i], data_dev["target_txt"][i]))
rouge_score = rouge(hyp, ref)
with open(save_file, "w") as f:
if self.args["use_rl"]:
f.write("\n".join(["{}\nrouge_r: {},lexicon_r:{}, reward:{}\n{}\n{}\n".format(h,r_r,l_r,r,g,a) for h,g,r_r,l_r,r,a in zip(hyp, ref, rouge_r,lexicon_rewards, rewards, article)]))
else:
f.write("\n".join([h+"\n"+g+"\n" for h,g in zip(hyp, ref)]))
f.write("\n" + str(rouge_score) + "\n")
f.write("rewards: " + str(sum(rewards) / len(rewards)) + "\n")
def decoding(self, decode_type="beam"):
# Configure models
if self.args["use_rl"] and self.args["rl_model_path"] is None:
raise ValueError("use rl but path is not given")
if self.args["use_rl"] is None and self.args["rl_model_path"] is not None:
raise ValueError("not using rl but give rl_model_path")
if self.args["rl_model_path"] is not None:
rl_path = self.args["rl_model_path"]
self.args = torch.load(self.args["rl_model_path"]+"/args.th")
print(self.args)
self.args["rl_model_path"] = rl_path
self.model.expected_reward_layer = torch.nn.Linear(self.args["hidden_size"], 1)
if USE_CUDA:
self.model.expected_reward_layer = self.model.expected_reward_layer.cuda()
self.rl_optimizer = torch.optim.Adam(self.model.expected_reward_layer.parameters(), lr=self.args["rl_lr"])
step, _ = self.load_rl_model()
elif self.args["path"] is not None:
step, _ = self.load_base_model()
if self.args["use_rl"]:
self.model.expected_reward_layer = torch.nn.Linear(self.args["hidden_size"], 1)
if USE_CUDA:
self.model.expected_reward_layer = self.model.expected_reward_layer.cuda()
self.rl_optimizer = torch.optim.Adam(self.model.expected_reward_layer.parameters(), lr=self.args["rl_lr"])
else:
pass
_, _, (hyp, ref, rewards, sensation_scores, articles) = self.model.evaluate(self.test, self.args["decode_type"], sensation_model=self.sensation_model, return_pred=True)
if self.args["rl_model_path"] is not None:
directory = self.args["rl_model_path"]
with open(directory + "/test_prediction", "w") as f:
f.write("\n".join(["{}\t{:.5f}\n{}\t{:.5f}\n{}\n".format(h,r,g,s,a) for h,g,r,s,a in zip(hyp, ref, rewards, sensation_scores, articles)]))
f.write("\n{}\n".format(str(rouge(hyp, ref))))
elif self.args["path"] is not None:
directory = self.args["path"]
with open(directory + "/test_prediction", "w") as f:
f.write("\n".join(["{}\t{:.5f}\n{}\t{:.5f}\n{}\n".format(h,r,g,s,a) for h,g,r,s,a in zip(hyp, ref, rewards, sensation_scores, articles)]))
f.write("\n{}\n".format(str(rouge(hyp, ref))))
if __name__ == "__main__":
trainer = Trainer()
trainer.decoding()
| [
"pxuab@connect.ust.hk"
] | pxuab@connect.ust.hk |
2776ac741886e88c41c59c9ca2db59a6f2ca88c3 | a762fd9b180d9e105e81102af0cc32c2c5f25548 | /new_currentdirectory.py | fe2763abca62b05fb91793bf6a59e09928a5b000 | [] | no_license | codergirlstl/python | ef595f506f57b026217ac0afcdedd95b6a6bfa42 | 04b0f8443927aba9885cf572a28a4ff73366b4e2 | refs/heads/master | 2023-04-26T13:56:45.058960 | 2021-05-19T19:37:11 | 2021-05-19T19:37:11 | 368,584,947 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 325 | py | import os
import os.path
directory_path = os.getcwd()
print("My current directory is : " + directory_path)
folder_name = os.path.basename(directory_path)
print("My directory name is : " + folder_name)
print("The files listed under "+ folder_name + " are: ")
directory_files=os.listdir(directory_path)
print(directory_files)
| [
"sheilamarierabbitt@gmail.com"
] | sheilamarierabbitt@gmail.com |
7daa835842061d066ec5f159c6f827c6e69c52b8 | 00ee3993b42d749aff6cb0638be8734e9c3b083f | /mysite02/article/models.py | 776380f0bda3d098e978eb357e6b39ec849effac | [] | no_license | wfshhebau/blogsite | 9015ed61bf72f3e2d7ccb95ec177c5f19830a063 | cfa6c7a374bece19ef1e5f1c0c5a4087c46fe313 | refs/heads/master | 2022-11-06T11:48:31.905594 | 2020-06-24T11:23:35 | 2020-06-24T11:23:35 | 272,388,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,828 | py | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class ArticleColumn(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='article_column')
column = models.CharField(max_length=200)
created = models.DateTimeField(auto_now_add=True) # the column created time
def __str__(self):
return self.column
#++++++++++++++++文章标签数据模型++++++++++
# 注意:1 要写在ArticlePost的前面;2 要在ArticlePost()中加article_tag字段
class ArticleTag(models.Model):
author = models.ForeignKey(User,on_delete=models.CASCADE,related_name="tag")
tag = models.CharField(max_length=300)
def __str__(self):
return self.tag
#++++++++++++++++发表文章的数据模型++++++++++
# Creat 文章Post的Modle
from django.utils import timezone
from django.urls import reverse, reverse_lazy
from slugify import slugify
class ArticlePost(models.Model):
author = models.ForeignKey(User,on_delete=models.CASCADE,related_name="article")
title = models.CharField(max_length=200)
slug = models.SlugField(max_length=200)
column = models.ForeignKey(ArticleColumn,on_delete=models.CASCADE,related_name="article_column")
body = models.TextField()
created = models.DateTimeField(default=timezone.now)
updated = models.DateTimeField(auto_now=True)
# P167 Chap4.3 点赞功能
users_like = models.ManyToManyField(User,related_name="articles_like",blank=True)
# P195 Chap4.7.1 文章标签
article_tag = models.ManyToManyField(ArticleTag,related_name="article_tag",blank=True)
class Meta:
ordering = ("title",)
index_together = (("id","slug"),)
def save(self,*args,**kwargs):
self.slug = slugify(self.title)
super(ArticlePost,self).save(*args,**kwargs)
# 获取链接地址中的id和slug,传给article.urls下的name=article_detail的url
def get_absolute_url(self):
return reverse("article:article_detail", args=[self.id,self.slug])
# 获取链接地址中的id和slug,传给article.urls下的name=list_article_detail的url
def get_url_path(self):
return reverse("article:list_article_detail",args=[self.id,self.slug])
# 创建评论Comment数据模型
from django.db import models
from django.contrib.auth.models import User
class Comment(models.Model):
article = models.ForeignKey(ArticlePost, on_delete=models.CASCADE, related_name="comments")
commentator = models.CharField(max_length=30)
body = models.TextField()
created = models.DateTimeField(auto_now_add=True)
class Meta:
ordering = ("-created",)
def __str__(self):
return "comment by {0} on {0}".format(self.commentator.username, self.article) # 为啥要有.username呢?
| [
"wangfushun1981@163.com"
] | wangfushun1981@163.com |
21948ad727a97b0a4236089fde5ba20a01fa586f | d050dde2ae69ef0660180fb4f98a54c308017d19 | /app/wikis/tests/test_models.py | 75f5e76049ae004e67e905f6658901f766d70fa9 | [] | no_license | MasterTeamFTN/uks | 1ffd3c3531743da79c54fdb6d763efa54889afc3 | f3e5b001b29a578da3429e1e57f2cb9542d3ee7a | refs/heads/main | 2023-03-09T22:29:05.614544 | 2021-02-19T23:09:58 | 2021-02-19T23:09:58 | 324,634,414 | 0 | 0 | null | 2021-02-19T23:09:59 | 2020-12-26T21:00:24 | Python | UTF-8 | Python | false | false | 846 | py | from django.test import TestCase, Client
from django.contrib.auth.models import User
from ..models import Wiki, WikiVersion
from ...projects.models import Project
WIKI_PAGE_NAME = 'Wiki home page'
class TestWikiModels(TestCase):
def test(self):
self.assertEquals(1, 1)
# TODO: Implement this
# TODO: Treba naci nacin kako mockovati save metodu ili kako proslediti autentifikovanog user-a
# def setUp(self):
# self.project = Project.objects.create(
# name='UKS Lab',
# description='This is project description',
# github_url='' # we don't need branches and commits here
# )
# self.wiki = Wiki.objects.create(title=WIKI_PAGE_NAME, project=self.project)
# def test_str(self):
# self.assertEquals(self.wiki.__str__(), WIKI_PAGE_NAME)
| [
"b.sulicenko@gmail.com"
] | b.sulicenko@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.