eva-shell 0.2.38__tar.gz → 0.2.40__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.
@@ -1,26 +1,18 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eva-shell
3
- Version: 0.2.38
3
+ Version: 0.2.40
4
4
  Summary: EVA ICS v4 shell
5
5
  Home-page: https://github.com/eva-ics/eva4
6
6
  Author: Bohemia Automation / Altertech
7
7
  Author-email: div@altertech.com
8
8
  License: Apache License 2.0
9
+ Platform: UNKNOWN
9
10
  Classifier: Programming Language :: Python :: 3
10
11
  Classifier: License :: OSI Approved :: MIT License
11
12
  Classifier: Topic :: Communications
12
13
  Description-Content-Type: text/markdown
13
14
  License-File: LICENSE
14
- Requires-Dist: busrt>=0.1.0
15
- Requires-Dist: evaics>=0.0.32
16
- Requires-Dist: yedb[cli]>=0.2.25
17
- Requires-Dist: argcomplete>=2.0.0
18
- Requires-Dist: python-dateutil>=2.7.3
19
- Requires-Dist: neotermcolor>=2.0.10
20
- Requires-Dist: pyyaml>=6.0
21
- Requires-Dist: pygments>=2.11.2
22
- Requires-Dist: pytz>=2024.1
23
- Requires-Dist: pwinput>=1.0.2
24
- Requires-Dist: tzlocal>=5.1
25
15
 
26
16
  # EVA ICS v4 shell
17
+
18
+
@@ -1,3 +1,3 @@
1
- __version__ = '0.2.38'
1
+ __version__ = '0.2.40'
2
2
 
3
3
  DEFAULT_REPOSITORY_URL = 'https://pub.bma.ai/eva4'
@@ -770,6 +770,9 @@ def append_item_cli(root_sp):
770
770
  p.add_argument('i', metavar='MASK').completer = ComplOID('state')
771
771
  p.add_argument('-y', '--full', action='store_true')
772
772
 
773
+ p = sp.add_parser('stream-info', help='item stream info')
774
+ p.add_argument('i', metavar='MASK').completer = ComplOID('state')
775
+
773
776
  p = sp.add_parser('history', help='item state history')
774
777
  p.add_argument('i', metavar='OID').completer = ComplOID('state')
775
778
  p.add_argument('-a',
@@ -1190,6 +1190,37 @@ class CLI:
1190
1190
  't|n=set time|f=time', 'node', 'connected', 'act'
1191
1191
  ])
1192
1192
 
1193
+ def item_stream_info(self, i):
1194
+ try:
1195
+ from evaics.sdk import VideoFrame
1196
+ except:
1197
+ raise RuntimeError('Requires EVA ICS Python SDK 0.2.35 or newer')
1198
+ data = call_rpc(
1199
+ 'item.state',
1200
+ dict(i=i, include_binary_values=True),
1201
+ )
1202
+ for d in data:
1203
+ value = d['value']
1204
+ del d['value']
1205
+ if value is None:
1206
+ d['format'] = 'nodata'
1207
+ else:
1208
+ try:
1209
+ frame = VideoFrame(value)
1210
+ d['format'] = frame.format_name()
1211
+ d['dims'] = [frame.width, frame.height]
1212
+ except:
1213
+ d['format'] = 'not-a-stream'
1214
+
1215
+ print_result(data,
1216
+ cols=[
1217
+ 'oid',
1218
+ 'status',
1219
+ 'format',
1220
+ 'dims',
1221
+ 't|n=set time|f=time',
1222
+ ])
1223
+
1193
1224
  def item_slog(self, i, db_svc, time_start, time_end, time_zone, limit):
1194
1225
  time_start = prepare_time(time_start)
1195
1226
  time_end = prepare_time(time_end)
@@ -1,26 +1,18 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eva-shell
3
- Version: 0.2.38
3
+ Version: 0.2.40
4
4
  Summary: EVA ICS v4 shell
5
5
  Home-page: https://github.com/eva-ics/eva4
6
6
  Author: Bohemia Automation / Altertech
7
7
  Author-email: div@altertech.com
8
8
  License: Apache License 2.0
9
+ Platform: UNKNOWN
9
10
  Classifier: Programming Language :: Python :: 3
10
11
  Classifier: License :: OSI Approved :: MIT License
11
12
  Classifier: Topic :: Communications
12
13
  Description-Content-Type: text/markdown
13
14
  License-File: LICENSE
14
- Requires-Dist: busrt>=0.1.0
15
- Requires-Dist: evaics>=0.0.32
16
- Requires-Dist: yedb[cli]>=0.2.25
17
- Requires-Dist: argcomplete>=2.0.0
18
- Requires-Dist: python-dateutil>=2.7.3
19
- Requires-Dist: neotermcolor>=2.0.10
20
- Requires-Dist: pyyaml>=6.0
21
- Requires-Dist: pygments>=2.11.2
22
- Requires-Dist: pytz>=2024.1
23
- Requires-Dist: pwinput>=1.0.2
24
- Requires-Dist: tzlocal>=5.1
25
15
 
26
16
  # EVA ICS v4 shell
17
+
18
+
@@ -1,4 +1,4 @@
1
- __version__ = '0.2.38'
1
+ __version__ = '0.2.40'
2
2
 
3
3
  import setuptools
4
4
 
File without changes
File without changes
File without changes
File without changes