Newer
Older
{
"cells": [
{
"cell_type": "code",

Taya Snijder
committed
"execution_count": 61,
"id": "waiting-chance",
"metadata": {},
"outputs": [],
"source": [
"import time\n",
"import numpy"
]
},
{
"cell_type": "code",

Taya Snijder
committed
"execution_count": 62,
"id": "moving-alexandria",
"metadata": {},
"outputs": [],
"source": [
]
},
{
"cell_type": "code",

Taya Snijder
committed
"execution_count": 63,
"id": "ranking-aluminum",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Device is now in on state\n"
]
}
],
"source": [
"state = str(d.state())\n",
"\n",
"if state == \"OFF\":\n",
" d.initialise()\n",
" time.sleep(1)\n",
"state = str(d.state())\n",
"if state == \"STANDBY\":\n",
" d.on()\n",
"state = str(d.state())\n",
"if state == \"ON\":\n",
" print(\"Device is now in on state\")\n"
]
},
{
"cell_type": "code",

Taya Snijder
committed
"execution_count": 68,
"id": "beneficial-evidence",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [

Taya Snijder
committed
"packet_count_R [55]\n",
"last_packet_timestamp_R [1623249385]\n",
"queue_percentage_used_R [0.]\n",
"State <function __get_command_func.<locals>.f at 0x7fcb205fd0d0>\n",
"Status <function __get_command_func.<locals>.f at 0x7fcb205fd0d0>\n"
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
]
}
],
"source": [
"attr_names = d.get_attribute_list()\n",
"\n",
"for i in attr_names:\n",
" exec(\"value = print(i, d.{})\".format(i))\n"
]
},
{
"cell_type": "code",
"execution_count": 39,
"id": "sporting-current",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3.0"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"d.RCU_mask_RW = [False, False, False, False, False, False, False, False, False, False, False, False,\n",
" False, False, False, False, False, False, False, False, False, False, False, False,\n",
" False, False, False, False, False, False, False, False,]\n",
"time.sleep(1)\n",
"print(d.RCU_mask_RW)\n",
"\n",
"monitor_rate = d.RCU_monitor_rate_RW\n",
"print(\"current monitoring rate: {}, setting to {}\".format(monitor_rate, monitor_rate + 1))\n",
"monitor_rate = monitor_rate + 1\n",
"\n",
"time.sleep(1)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "sharing-mechanics",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "ruled-tracy",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "StationControl",
"language": "python",
"name": "stationcontrol"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}