cgse-common 0.18.0__py3-none-any.whl → 0.18.1__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cgse-common
3
- Version: 0.18.0
3
+ Version: 0.18.1
4
4
  Summary: Software framework to support hardware testing
5
5
  Author: IvS KU Leuven
6
6
  Maintainer-email: Rik Huygen <rik.huygen@kuleuven.be>, Sara Regibo <sara.regibo@kuleuven.be>
@@ -29,14 +29,14 @@ egse/settings.py,sha256=eiZ9eGydgF9lNBjHH8VqOgcFDxSdhO6dLs7pYA725lo,16849
29
29
  egse/settings.yaml,sha256=mz9O2QqmiptezsMvxJRLhnC1ROwIHENX0nbnhMaXUpE,190
30
30
  egse/setup.py,sha256=GToyqe2esIbxVn4NT3mYIPDaFJgkWZQykbgWDOwChB8,34331
31
31
  egse/signal.py,sha256=f5pyOiNW9iTSIxV_ce5stIfG0ub9MRbaekE85kQOVzs,7992
32
- egse/socketdevice.py,sha256=rlTX9rpQ8VKcixBD42oNJg67-qKj9IIxk2UPM_mtz6I,14672
32
+ egse/socketdevice.py,sha256=8RpZVAGb-sJuRxMLFnM4SGSVa-7yMAgonGlJFWi6vFk,14964
33
33
  egse/state.py,sha256=HdU2MFOlYRbawYRZmizV6Y8MgnZrUF0bx4fXaYU-M_s,3023
34
34
  egse/system.py,sha256=XiMXm5tEB95TsQQsInm_9iZTRDuPqS82VyB_9XMPL8E,77697
35
35
  egse/task.py,sha256=ODSLE05f31CgWsSVcVFFq1WYUZrJMb1LioPTx6VM824,2804
36
36
  egse/version.py,sha256=vPUsCy9HYR7nKm0Sg6EDoq1JtkBKPCr3kYrt9QYM1B8,6602
37
37
  egse/zmq_ser.py,sha256=YJFupsxuvhI8TJMeS2Hem9oMMcVmSBx0rZv93gvN-hA,3263
38
38
  egse/plugins/metrics/influxdb.py,sha256=WnAqTWRkAyMSd7W2ASwUAIEwFborrv55iX-umceevFA,8162
39
- cgse_common-0.18.0.dist-info/METADATA,sha256=stU8OErbxr__5BPUohIhl9VJ7_Q5dYYqav9yfZSSAYs,3068
40
- cgse_common-0.18.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
41
- cgse_common-0.18.0.dist-info/entry_points.txt,sha256=xJsPRIDjtADVgd_oEDHVW10wS5LG30Ox_3brVKeyCGw,168
42
- cgse_common-0.18.0.dist-info/RECORD,,
39
+ cgse_common-0.18.1.dist-info/METADATA,sha256=3kz_oHVzK-GMf55yINAt6J51Omunlkw53Mm0QMlievs,3068
40
+ cgse_common-0.18.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
41
+ cgse_common-0.18.1.dist-info/entry_points.txt,sha256=xJsPRIDjtADVgd_oEDHVW10wS5LG30Ox_3brVKeyCGw,168
42
+ cgse_common-0.18.1.dist-info/RECORD,,
egse/socketdevice.py CHANGED
@@ -14,9 +14,12 @@ from egse.device import DeviceConnectionError
14
14
  from egse.device import DeviceConnectionInterface
15
15
  from egse.device import DeviceTimeoutError
16
16
  from egse.device import DeviceTransport
17
+ from egse.env import bool_env
17
18
  from egse.log import logger
18
19
  from egse.system import type_name
19
20
 
21
+ VERBOSE_DEBUG = bool_env("VERBOSE_DEBUG", default=False)
22
+
20
23
  SEPARATOR = b"\x03"
21
24
  SEPARATOR_STR = SEPARATOR.decode()
22
25
 
@@ -219,6 +222,8 @@ class SocketDevice(DeviceConnectionInterface, DeviceTransport):
219
222
 
220
223
  try:
221
224
  command += self.separator_str if not command.endswith(self.separator_str) else ""
225
+ if VERBOSE_DEBUG:
226
+ logger.debug(f"Writing to {self.device_name}: {command!r}")
222
227
  self.socket.sendall(command.encode())
223
228
  except socket.timeout as exc:
224
229
  raise DeviceTimeoutError(self.device_name, "Socket timeout error") from exc
@@ -248,9 +253,11 @@ class SocketDevice(DeviceConnectionInterface, DeviceTransport):
248
253
  raise DeviceConnectionError(self.device_name, "The device is not connected, connect before writing.")
249
254
 
250
255
  self.write(command)
251
-
252
256
  response = self.read()
253
257
 
258
+ if VERBOSE_DEBUG:
259
+ logger.debug(f"Read from {self.device_name}: {response!r}")
260
+
254
261
  return response
255
262
 
256
263