From d6437b2daf22765954eb1e9b1670654f967bb594 Mon Sep 17 00:00:00 2001
From: Thijs <snijder@astron.nl>
Date: Wed, 9 Jun 2021 14:33:34 +0200
Subject: [PATCH] changed put_nowait to put

---
 devices/clients/sst_client.py       |  4 +--
 jupyter-notebooks/test_device.ipynb | 44 ++++++-----------------------
 2 files changed, 10 insertions(+), 38 deletions(-)

diff --git a/devices/clients/sst_client.py b/devices/clients/sst_client.py
index a53c849b2..4692b5d07 100644
--- a/devices/clients/sst_client.py
+++ b/devices/clients/sst_client.py
@@ -130,7 +130,7 @@ class UDP_Receiver(Thread):
             try:
                 packet = [bytearray(self.buffersize)]
                 self.sock.recvmsg_into(packet[0:self.buffersize])
-                self.queue.put_nowait(packet)
+                self.queue.put(packet)
 
             except socket.timeout:
                 pass
@@ -159,8 +159,6 @@ class SST(Thread):
         self.streams.debug_stream("starting SST thread")
 
         while True:
-
-
             packet = self.queue.get()
 
             if packet is None:
diff --git a/jupyter-notebooks/test_device.ipynb b/jupyter-notebooks/test_device.ipynb
index 66d3a5f10..b404b04c7 100644
--- a/jupyter-notebooks/test_device.ipynb
+++ b/jupyter-notebooks/test_device.ipynb
@@ -2,7 +2,7 @@
  "cells": [
   {
    "cell_type": "code",
-   "execution_count": 26,
+   "execution_count": 1,
    "id": "waiting-chance",
    "metadata": {},
    "outputs": [],
@@ -13,17 +13,17 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 2,
+   "execution_count": 3,
    "id": "moving-alexandria",
    "metadata": {},
    "outputs": [],
    "source": [
-    "d=DeviceProxy(\"LTS/test_device/1\")"
+    "d=DeviceProxy(\"LTS/SST/1\")"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 27,
+   "execution_count": 4,
    "id": "ranking-aluminum",
    "metadata": {},
    "outputs": [
@@ -51,7 +51,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 31,
+   "execution_count": 8,
    "id": "beneficial-evidence",
    "metadata": {},
    "outputs": [
@@ -59,36 +59,10 @@
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "bool_scalar_R [False]\n",
-      "bool_scalar_RW [False]\n",
-      "int64_spectrum_R [0 0 0 0 0 0 0 0]\n",
-      "str_spectrum_RW ('', '', '', '', '', '', '', '')\n",
-      "double_image_R [[0. 0.]\n",
-      " [0. 0.]\n",
-      " [0. 0.]\n",
-      " [0. 0.]\n",
-      " [0. 0.]\n",
-      " [0. 0.]\n",
-      " [0. 0.]\n",
-      " [0. 0.]]\n",
-      "double_image_RW [[0. 0. 0. 0. 0. 0. 0. 0.]\n",
-      " [0. 0. 0. 0. 0. 0. 0. 0.]]\n",
-      "int32_scalar_R [0]\n",
-      "uint16_spectrum_RW [0 0 0 0 0 0 0 0]\n",
-      "float32_image_R [[0. 0. 0. 0. 0. 0. 0. 0.]\n",
-      " [0. 0. 0. 0. 0. 0. 0. 0.]]\n",
-      "uint8_image_RW [[0 0]\n",
-      " [0 0]\n",
-      " [0 0]\n",
-      " [0 0]\n",
-      " [0 0]\n",
-      " [0 0]\n",
-      " [0 0]\n",
-      " [0 0]]\n",
-      "tr_tod_R [0]\n",
-      "tr_uptime_R [0]\n",
-      "State <function __get_command_func.<locals>.f at 0x7f1c88a29e18>\n",
-      "Status <function __get_command_func.<locals>.f at 0x7f1c88a5abf8>\n"
+      "packet_count_R [80]\n",
+      "last_packet_timestamp_R [1623239037]\n",
+      "State <function __get_command_func.<locals>.f at 0x7fcb20e510d0>\n",
+      "Status <function __get_command_func.<locals>.f at 0x7fcb20e510d0>\n"
      ]
     }
    ],
-- 
GitLab