cdp-client 2.0.4__tar.gz → 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {cdp-client-2.0.4/cdp_client.egg-info → cdp-client-2.1.0}/PKG-INFO +8 -1
  2. {cdp-client-2.0.4 → cdp-client-2.1.0}/README.rst +7 -0
  3. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/cdp.py +8 -0
  4. {cdp-client-2.0.4 → cdp-client-2.1.0/cdp_client.egg-info}/PKG-INFO +8 -1
  5. {cdp-client-2.0.4 → cdp-client-2.1.0}/setup.py +1 -1
  6. {cdp-client-2.0.4 → cdp-client-2.1.0}/LICENSE.txt +0 -0
  7. {cdp-client-2.0.4 → cdp-client-2.1.0}/MANIFEST.in +0 -0
  8. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/__init__.py +0 -0
  9. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/cdp_pb2.py +0 -0
  10. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/tests/__init__.py +0 -0
  11. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/tests/fake_data.py +0 -0
  12. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/tests/test_client.py +0 -0
  13. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/tests/test_connection.py +0 -0
  14. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/tests/test_main.py +0 -0
  15. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/tests/test_node.py +0 -0
  16. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/tests/test_nodetree.py +0 -0
  17. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client/tests/test_requests.py +0 -0
  18. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client.egg-info/SOURCES.txt +0 -0
  19. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client.egg-info/dependency_links.txt +0 -0
  20. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client.egg-info/requires.txt +0 -0
  21. {cdp-client-2.0.4 → cdp-client-2.1.0}/cdp_client.egg-info/top_level.txt +0 -0
  22. {cdp-client-2.0.4 → cdp-client-2.1.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: cdp-client
3
- Version: 2.0.4
3
+ Version: 2.1.0
4
4
  Summary: Provides an API that allows to interact with CDP applications
5
5
  Home-page: https://github.com/CDPTechnologies/PythonCDPClient
6
6
  Author: CDP Technologies AS
@@ -200,6 +200,13 @@ Description: CDP-Client
200
200
 
201
201
  The type of the Node object returned as one of the cdp.NodeType values.
202
202
 
203
+ node.class_name()
204
+ ^^^^^^^^^^^^^^^^^
205
+
206
+ - Returns
207
+
208
+ CDP class name as a string.
209
+
203
210
  node.last_value()
204
211
  ^^^^^^^^^^^^^^^^^
205
212
 
@@ -192,6 +192,13 @@ node.type()
192
192
 
193
193
  The type of the Node object returned as one of the cdp.NodeType values.
194
194
 
195
+ node.class_name()
196
+ ^^^^^^^^^^^^^^^^^
197
+
198
+ - Returns
199
+
200
+ CDP class name as a string.
201
+
195
202
  node.last_value()
196
203
  ^^^^^^^^^^^^^^^^^
197
204
 
@@ -187,6 +187,9 @@ class Node:
187
187
  def type(self):
188
188
  return self._translate_type(self._structure.info.node_type)
189
189
 
190
+ def class_name(self):
191
+ return self._structure.info.type_name
192
+
190
193
  def is_read_only(self):
191
194
  return self._structure.info.flags & proto.Info.eValueIsReadOnly != 0
192
195
 
@@ -253,6 +256,11 @@ class Node:
253
256
  def _send_value_request(self):
254
257
  max_fs = max(self._value_subscriptions, key=lambda e: e[1])[1]
255
258
  max_sample_rate = max(self._value_subscriptions, key=lambda e: e[2])[2]
259
+ #by studio api protocol 0 is the highest sample rate (all samples), so override maxSampleRate if 0 is found
260
+ for s in self._value_subscriptions:
261
+ if s[2] == 0:
262
+ max_sample_rate = 0
263
+ break
256
264
  self._connection.send_value_request(self._id(), max_fs, max_sample_rate)
257
265
 
258
266
  def _update_structure(self, structure):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: cdp-client
3
- Version: 2.0.4
3
+ Version: 2.1.0
4
4
  Summary: Provides an API that allows to interact with CDP applications
5
5
  Home-page: https://github.com/CDPTechnologies/PythonCDPClient
6
6
  Author: CDP Technologies AS
@@ -200,6 +200,13 @@ Description: CDP-Client
200
200
 
201
201
  The type of the Node object returned as one of the cdp.NodeType values.
202
202
 
203
+ node.class_name()
204
+ ^^^^^^^^^^^^^^^^^
205
+
206
+ - Returns
207
+
208
+ CDP class name as a string.
209
+
203
210
  node.last_value()
204
211
  ^^^^^^^^^^^^^^^^^
205
212
 
@@ -10,7 +10,7 @@ def readme():
10
10
 
11
11
  setup(
12
12
  name='cdp-client',
13
- version='2.0.4',
13
+ version='2.1.0',
14
14
  packages=find_packages(),
15
15
  install_requires=[
16
16
  'promise==2.2.1',
File without changes
File without changes
File without changes