nedo-vision-worker 1.0.0__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.
- nedo_vision_worker/__init__.py +10 -0
- nedo_vision_worker/cli.py +195 -0
- nedo_vision_worker/config/ConfigurationManager.py +196 -0
- nedo_vision_worker/config/__init__.py +1 -0
- nedo_vision_worker/database/DatabaseManager.py +219 -0
- nedo_vision_worker/database/__init__.py +1 -0
- nedo_vision_worker/doctor.py +453 -0
- nedo_vision_worker/initializer/AppInitializer.py +78 -0
- nedo_vision_worker/initializer/__init__.py +1 -0
- nedo_vision_worker/models/__init__.py +15 -0
- nedo_vision_worker/models/ai_model.py +29 -0
- nedo_vision_worker/models/auth.py +14 -0
- nedo_vision_worker/models/config.py +9 -0
- nedo_vision_worker/models/dataset_source.py +30 -0
- nedo_vision_worker/models/logs.py +9 -0
- nedo_vision_worker/models/ppe_detection.py +39 -0
- nedo_vision_worker/models/ppe_detection_label.py +20 -0
- nedo_vision_worker/models/restricted_area_violation.py +20 -0
- nedo_vision_worker/models/user.py +10 -0
- nedo_vision_worker/models/worker_source.py +19 -0
- nedo_vision_worker/models/worker_source_pipeline.py +21 -0
- nedo_vision_worker/models/worker_source_pipeline_config.py +24 -0
- nedo_vision_worker/models/worker_source_pipeline_debug.py +15 -0
- nedo_vision_worker/models/worker_source_pipeline_detection.py +14 -0
- nedo_vision_worker/protos/AIModelService_pb2.py +46 -0
- nedo_vision_worker/protos/AIModelService_pb2_grpc.py +140 -0
- nedo_vision_worker/protos/DatasetSourceService_pb2.py +46 -0
- nedo_vision_worker/protos/DatasetSourceService_pb2_grpc.py +140 -0
- nedo_vision_worker/protos/HumanDetectionService_pb2.py +44 -0
- nedo_vision_worker/protos/HumanDetectionService_pb2_grpc.py +140 -0
- nedo_vision_worker/protos/PPEDetectionService_pb2.py +46 -0
- nedo_vision_worker/protos/PPEDetectionService_pb2_grpc.py +140 -0
- nedo_vision_worker/protos/VisionWorkerService_pb2.py +72 -0
- nedo_vision_worker/protos/VisionWorkerService_pb2_grpc.py +471 -0
- nedo_vision_worker/protos/WorkerSourcePipelineService_pb2.py +64 -0
- nedo_vision_worker/protos/WorkerSourcePipelineService_pb2_grpc.py +312 -0
- nedo_vision_worker/protos/WorkerSourceService_pb2.py +50 -0
- nedo_vision_worker/protos/WorkerSourceService_pb2_grpc.py +183 -0
- nedo_vision_worker/protos/__init__.py +1 -0
- nedo_vision_worker/repositories/AIModelRepository.py +44 -0
- nedo_vision_worker/repositories/DatasetSourceRepository.py +150 -0
- nedo_vision_worker/repositories/PPEDetectionRepository.py +112 -0
- nedo_vision_worker/repositories/RestrictedAreaRepository.py +88 -0
- nedo_vision_worker/repositories/WorkerSourcePipelineDebugRepository.py +90 -0
- nedo_vision_worker/repositories/WorkerSourcePipelineDetectionRepository.py +48 -0
- nedo_vision_worker/repositories/WorkerSourcePipelineRepository.py +174 -0
- nedo_vision_worker/repositories/WorkerSourceRepository.py +46 -0
- nedo_vision_worker/repositories/__init__.py +1 -0
- nedo_vision_worker/services/AIModelClient.py +362 -0
- nedo_vision_worker/services/ConnectionInfoClient.py +57 -0
- nedo_vision_worker/services/DatasetSourceClient.py +88 -0
- nedo_vision_worker/services/FileToRTMPServer.py +78 -0
- nedo_vision_worker/services/GrpcClientBase.py +155 -0
- nedo_vision_worker/services/GrpcClientManager.py +141 -0
- nedo_vision_worker/services/ImageUploadClient.py +82 -0
- nedo_vision_worker/services/PPEDetectionClient.py +108 -0
- nedo_vision_worker/services/RTSPtoRTMPStreamer.py +98 -0
- nedo_vision_worker/services/RestrictedAreaClient.py +100 -0
- nedo_vision_worker/services/SystemUsageClient.py +77 -0
- nedo_vision_worker/services/VideoStreamClient.py +161 -0
- nedo_vision_worker/services/WorkerSourceClient.py +215 -0
- nedo_vision_worker/services/WorkerSourcePipelineClient.py +393 -0
- nedo_vision_worker/services/WorkerSourceUpdater.py +134 -0
- nedo_vision_worker/services/WorkerStatusClient.py +65 -0
- nedo_vision_worker/services/__init__.py +1 -0
- nedo_vision_worker/util/HardwareID.py +104 -0
- nedo_vision_worker/util/ImageUploader.py +92 -0
- nedo_vision_worker/util/Networking.py +94 -0
- nedo_vision_worker/util/PlatformDetector.py +50 -0
- nedo_vision_worker/util/SystemMonitor.py +299 -0
- nedo_vision_worker/util/VideoProbeUtil.py +120 -0
- nedo_vision_worker/util/__init__.py +1 -0
- nedo_vision_worker/worker/CoreActionWorker.py +125 -0
- nedo_vision_worker/worker/DataSenderWorker.py +168 -0
- nedo_vision_worker/worker/DataSyncWorker.py +143 -0
- nedo_vision_worker/worker/DatasetFrameSender.py +208 -0
- nedo_vision_worker/worker/DatasetFrameWorker.py +412 -0
- nedo_vision_worker/worker/PPEDetectionManager.py +86 -0
- nedo_vision_worker/worker/PipelineActionWorker.py +129 -0
- nedo_vision_worker/worker/PipelineImageWorker.py +116 -0
- nedo_vision_worker/worker/RabbitMQListener.py +170 -0
- nedo_vision_worker/worker/RestrictedAreaManager.py +85 -0
- nedo_vision_worker/worker/SystemUsageManager.py +111 -0
- nedo_vision_worker/worker/VideoStreamWorker.py +139 -0
- nedo_vision_worker/worker/WorkerManager.py +155 -0
- nedo_vision_worker/worker/__init__.py +1 -0
- nedo_vision_worker/worker_service.py +264 -0
- nedo_vision_worker-1.0.0.dist-info/METADATA +563 -0
- nedo_vision_worker-1.0.0.dist-info/RECORD +92 -0
- nedo_vision_worker-1.0.0.dist-info/WHEEL +5 -0
- nedo_vision_worker-1.0.0.dist-info/entry_points.txt +2 -0
- nedo_vision_worker-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
from nedo_vision_worker.protos import VisionWorkerService_pb2 as nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2
|
|
7
|
+
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.73.1'
|
|
9
|
+
GRPC_VERSION = grpc.__version__
|
|
10
|
+
_version_not_supported = False
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from grpc._utilities import first_version_is_lower
|
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
15
|
+
except ImportError:
|
|
16
|
+
_version_not_supported = True
|
|
17
|
+
|
|
18
|
+
if _version_not_supported:
|
|
19
|
+
raise RuntimeError(
|
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
+
+ f' but the generated code in nedo_vision_worker/protos/VisionWorkerService_pb2_grpc.py depends on'
|
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class VisionWorkerServiceStub(object):
|
|
29
|
+
"""Define the VisionWorkerService
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def __init__(self, channel):
|
|
33
|
+
"""Constructor.
|
|
34
|
+
|
|
35
|
+
Args:
|
|
36
|
+
channel: A grpc.Channel.
|
|
37
|
+
"""
|
|
38
|
+
self.GetConnectionInfo = channel.unary_unary(
|
|
39
|
+
'/Sindika.AspNet.App005.Services.VisionWorkerService/GetConnectionInfo',
|
|
40
|
+
request_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.GetWorkerConnectionInfoRequest.SerializeToString,
|
|
41
|
+
response_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.GetWorkerConnectionInfoResponse.FromString,
|
|
42
|
+
_registered_method=True)
|
|
43
|
+
self.SendSystemUsage = channel.unary_unary(
|
|
44
|
+
'/Sindika.AspNet.App005.Services.VisionWorkerService/SendSystemUsage',
|
|
45
|
+
request_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.SystemUsageRequest.SerializeToString,
|
|
46
|
+
response_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.SystemUsageResponse.FromString,
|
|
47
|
+
_registered_method=True)
|
|
48
|
+
self.UpdateStatus = channel.unary_unary(
|
|
49
|
+
'/Sindika.AspNet.App005.Services.VisionWorkerService/UpdateStatus',
|
|
50
|
+
request_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UpdateWorkerStatusRequest.SerializeToString,
|
|
51
|
+
response_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UpdateWorkerStatusResponse.FromString,
|
|
52
|
+
_registered_method=True)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class VisionWorkerServiceServicer(object):
|
|
56
|
+
"""Define the VisionWorkerService
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
def GetConnectionInfo(self, request, context):
|
|
60
|
+
"""Connection Info Service
|
|
61
|
+
"""
|
|
62
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
63
|
+
context.set_details('Method not implemented!')
|
|
64
|
+
raise NotImplementedError('Method not implemented!')
|
|
65
|
+
|
|
66
|
+
def SendSystemUsage(self, request, context):
|
|
67
|
+
"""System Usage Service
|
|
68
|
+
"""
|
|
69
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
70
|
+
context.set_details('Method not implemented!')
|
|
71
|
+
raise NotImplementedError('Method not implemented!')
|
|
72
|
+
|
|
73
|
+
def UpdateStatus(self, request, context):
|
|
74
|
+
"""Update Status Service
|
|
75
|
+
"""
|
|
76
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
77
|
+
context.set_details('Method not implemented!')
|
|
78
|
+
raise NotImplementedError('Method not implemented!')
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def add_VisionWorkerServiceServicer_to_server(servicer, server):
|
|
82
|
+
rpc_method_handlers = {
|
|
83
|
+
'GetConnectionInfo': grpc.unary_unary_rpc_method_handler(
|
|
84
|
+
servicer.GetConnectionInfo,
|
|
85
|
+
request_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.GetWorkerConnectionInfoRequest.FromString,
|
|
86
|
+
response_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.GetWorkerConnectionInfoResponse.SerializeToString,
|
|
87
|
+
),
|
|
88
|
+
'SendSystemUsage': grpc.unary_unary_rpc_method_handler(
|
|
89
|
+
servicer.SendSystemUsage,
|
|
90
|
+
request_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.SystemUsageRequest.FromString,
|
|
91
|
+
response_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.SystemUsageResponse.SerializeToString,
|
|
92
|
+
),
|
|
93
|
+
'UpdateStatus': grpc.unary_unary_rpc_method_handler(
|
|
94
|
+
servicer.UpdateStatus,
|
|
95
|
+
request_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UpdateWorkerStatusRequest.FromString,
|
|
96
|
+
response_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UpdateWorkerStatusResponse.SerializeToString,
|
|
97
|
+
),
|
|
98
|
+
}
|
|
99
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
100
|
+
'Sindika.AspNet.App005.Services.VisionWorkerService', rpc_method_handlers)
|
|
101
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
102
|
+
server.add_registered_method_handlers('Sindika.AspNet.App005.Services.VisionWorkerService', rpc_method_handlers)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# This class is part of an EXPERIMENTAL API.
|
|
106
|
+
class VisionWorkerService(object):
|
|
107
|
+
"""Define the VisionWorkerService
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
@staticmethod
|
|
111
|
+
def GetConnectionInfo(request,
|
|
112
|
+
target,
|
|
113
|
+
options=(),
|
|
114
|
+
channel_credentials=None,
|
|
115
|
+
call_credentials=None,
|
|
116
|
+
insecure=False,
|
|
117
|
+
compression=None,
|
|
118
|
+
wait_for_ready=None,
|
|
119
|
+
timeout=None,
|
|
120
|
+
metadata=None):
|
|
121
|
+
return grpc.experimental.unary_unary(
|
|
122
|
+
request,
|
|
123
|
+
target,
|
|
124
|
+
'/Sindika.AspNet.App005.Services.VisionWorkerService/GetConnectionInfo',
|
|
125
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.GetWorkerConnectionInfoRequest.SerializeToString,
|
|
126
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.GetWorkerConnectionInfoResponse.FromString,
|
|
127
|
+
options,
|
|
128
|
+
channel_credentials,
|
|
129
|
+
insecure,
|
|
130
|
+
call_credentials,
|
|
131
|
+
compression,
|
|
132
|
+
wait_for_ready,
|
|
133
|
+
timeout,
|
|
134
|
+
metadata,
|
|
135
|
+
_registered_method=True)
|
|
136
|
+
|
|
137
|
+
@staticmethod
|
|
138
|
+
def SendSystemUsage(request,
|
|
139
|
+
target,
|
|
140
|
+
options=(),
|
|
141
|
+
channel_credentials=None,
|
|
142
|
+
call_credentials=None,
|
|
143
|
+
insecure=False,
|
|
144
|
+
compression=None,
|
|
145
|
+
wait_for_ready=None,
|
|
146
|
+
timeout=None,
|
|
147
|
+
metadata=None):
|
|
148
|
+
return grpc.experimental.unary_unary(
|
|
149
|
+
request,
|
|
150
|
+
target,
|
|
151
|
+
'/Sindika.AspNet.App005.Services.VisionWorkerService/SendSystemUsage',
|
|
152
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.SystemUsageRequest.SerializeToString,
|
|
153
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.SystemUsageResponse.FromString,
|
|
154
|
+
options,
|
|
155
|
+
channel_credentials,
|
|
156
|
+
insecure,
|
|
157
|
+
call_credentials,
|
|
158
|
+
compression,
|
|
159
|
+
wait_for_ready,
|
|
160
|
+
timeout,
|
|
161
|
+
metadata,
|
|
162
|
+
_registered_method=True)
|
|
163
|
+
|
|
164
|
+
@staticmethod
|
|
165
|
+
def UpdateStatus(request,
|
|
166
|
+
target,
|
|
167
|
+
options=(),
|
|
168
|
+
channel_credentials=None,
|
|
169
|
+
call_credentials=None,
|
|
170
|
+
insecure=False,
|
|
171
|
+
compression=None,
|
|
172
|
+
wait_for_ready=None,
|
|
173
|
+
timeout=None,
|
|
174
|
+
metadata=None):
|
|
175
|
+
return grpc.experimental.unary_unary(
|
|
176
|
+
request,
|
|
177
|
+
target,
|
|
178
|
+
'/Sindika.AspNet.App005.Services.VisionWorkerService/UpdateStatus',
|
|
179
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UpdateWorkerStatusRequest.SerializeToString,
|
|
180
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UpdateWorkerStatusResponse.FromString,
|
|
181
|
+
options,
|
|
182
|
+
channel_credentials,
|
|
183
|
+
insecure,
|
|
184
|
+
call_credentials,
|
|
185
|
+
compression,
|
|
186
|
+
wait_for_ready,
|
|
187
|
+
timeout,
|
|
188
|
+
metadata,
|
|
189
|
+
_registered_method=True)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
class ImageServiceStub(object):
|
|
193
|
+
"""//////////////////////////
|
|
194
|
+
|
|
195
|
+
"""
|
|
196
|
+
|
|
197
|
+
def __init__(self, channel):
|
|
198
|
+
"""Constructor.
|
|
199
|
+
|
|
200
|
+
Args:
|
|
201
|
+
channel: A grpc.Channel.
|
|
202
|
+
"""
|
|
203
|
+
self.GetLastImageDate = channel.unary_unary(
|
|
204
|
+
'/Sindika.AspNet.App005.Services.ImageService/GetLastImageDate',
|
|
205
|
+
request_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.LastImageDateRequest.SerializeToString,
|
|
206
|
+
response_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.LastImageDateResponse.FromString,
|
|
207
|
+
_registered_method=True)
|
|
208
|
+
self.UploadImage = channel.unary_unary(
|
|
209
|
+
'/Sindika.AspNet.App005.Services.ImageService/UploadImage',
|
|
210
|
+
request_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UploadImageRequest.SerializeToString,
|
|
211
|
+
response_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UploadImageResponse.FromString,
|
|
212
|
+
_registered_method=True)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
class ImageServiceServicer(object):
|
|
216
|
+
"""//////////////////////////
|
|
217
|
+
|
|
218
|
+
"""
|
|
219
|
+
|
|
220
|
+
def GetLastImageDate(self, request, context):
|
|
221
|
+
"""Get the last uploaded image date
|
|
222
|
+
"""
|
|
223
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
224
|
+
context.set_details('Method not implemented!')
|
|
225
|
+
raise NotImplementedError('Method not implemented!')
|
|
226
|
+
|
|
227
|
+
def UploadImage(self, request, context):
|
|
228
|
+
"""Upload an image and metadata
|
|
229
|
+
"""
|
|
230
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
231
|
+
context.set_details('Method not implemented!')
|
|
232
|
+
raise NotImplementedError('Method not implemented!')
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def add_ImageServiceServicer_to_server(servicer, server):
|
|
236
|
+
rpc_method_handlers = {
|
|
237
|
+
'GetLastImageDate': grpc.unary_unary_rpc_method_handler(
|
|
238
|
+
servicer.GetLastImageDate,
|
|
239
|
+
request_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.LastImageDateRequest.FromString,
|
|
240
|
+
response_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.LastImageDateResponse.SerializeToString,
|
|
241
|
+
),
|
|
242
|
+
'UploadImage': grpc.unary_unary_rpc_method_handler(
|
|
243
|
+
servicer.UploadImage,
|
|
244
|
+
request_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UploadImageRequest.FromString,
|
|
245
|
+
response_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UploadImageResponse.SerializeToString,
|
|
246
|
+
),
|
|
247
|
+
}
|
|
248
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
249
|
+
'Sindika.AspNet.App005.Services.ImageService', rpc_method_handlers)
|
|
250
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
251
|
+
server.add_registered_method_handlers('Sindika.AspNet.App005.Services.ImageService', rpc_method_handlers)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
# This class is part of an EXPERIMENTAL API.
|
|
255
|
+
class ImageService(object):
|
|
256
|
+
"""//////////////////////////
|
|
257
|
+
|
|
258
|
+
"""
|
|
259
|
+
|
|
260
|
+
@staticmethod
|
|
261
|
+
def GetLastImageDate(request,
|
|
262
|
+
target,
|
|
263
|
+
options=(),
|
|
264
|
+
channel_credentials=None,
|
|
265
|
+
call_credentials=None,
|
|
266
|
+
insecure=False,
|
|
267
|
+
compression=None,
|
|
268
|
+
wait_for_ready=None,
|
|
269
|
+
timeout=None,
|
|
270
|
+
metadata=None):
|
|
271
|
+
return grpc.experimental.unary_unary(
|
|
272
|
+
request,
|
|
273
|
+
target,
|
|
274
|
+
'/Sindika.AspNet.App005.Services.ImageService/GetLastImageDate',
|
|
275
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.LastImageDateRequest.SerializeToString,
|
|
276
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.LastImageDateResponse.FromString,
|
|
277
|
+
options,
|
|
278
|
+
channel_credentials,
|
|
279
|
+
insecure,
|
|
280
|
+
call_credentials,
|
|
281
|
+
compression,
|
|
282
|
+
wait_for_ready,
|
|
283
|
+
timeout,
|
|
284
|
+
metadata,
|
|
285
|
+
_registered_method=True)
|
|
286
|
+
|
|
287
|
+
@staticmethod
|
|
288
|
+
def UploadImage(request,
|
|
289
|
+
target,
|
|
290
|
+
options=(),
|
|
291
|
+
channel_credentials=None,
|
|
292
|
+
call_credentials=None,
|
|
293
|
+
insecure=False,
|
|
294
|
+
compression=None,
|
|
295
|
+
wait_for_ready=None,
|
|
296
|
+
timeout=None,
|
|
297
|
+
metadata=None):
|
|
298
|
+
return grpc.experimental.unary_unary(
|
|
299
|
+
request,
|
|
300
|
+
target,
|
|
301
|
+
'/Sindika.AspNet.App005.Services.ImageService/UploadImage',
|
|
302
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UploadImageRequest.SerializeToString,
|
|
303
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.UploadImageResponse.FromString,
|
|
304
|
+
options,
|
|
305
|
+
channel_credentials,
|
|
306
|
+
insecure,
|
|
307
|
+
call_credentials,
|
|
308
|
+
compression,
|
|
309
|
+
wait_for_ready,
|
|
310
|
+
timeout,
|
|
311
|
+
metadata,
|
|
312
|
+
_registered_method=True)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
class HealthCheckServiceStub(object):
|
|
316
|
+
"""//////////////////////////
|
|
317
|
+
|
|
318
|
+
Health Check Service for gRPC Latency
|
|
319
|
+
"""
|
|
320
|
+
|
|
321
|
+
def __init__(self, channel):
|
|
322
|
+
"""Constructor.
|
|
323
|
+
|
|
324
|
+
Args:
|
|
325
|
+
channel: A grpc.Channel.
|
|
326
|
+
"""
|
|
327
|
+
self.HealthCheck = channel.unary_unary(
|
|
328
|
+
'/Sindika.AspNet.App005.Services.HealthCheckService/HealthCheck',
|
|
329
|
+
request_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.HealthCheckRequest.SerializeToString,
|
|
330
|
+
response_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.HealthCheckResponse.FromString,
|
|
331
|
+
_registered_method=True)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
class HealthCheckServiceServicer(object):
|
|
335
|
+
"""//////////////////////////
|
|
336
|
+
|
|
337
|
+
Health Check Service for gRPC Latency
|
|
338
|
+
"""
|
|
339
|
+
|
|
340
|
+
def HealthCheck(self, request, context):
|
|
341
|
+
"""Missing associated documentation comment in .proto file."""
|
|
342
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
343
|
+
context.set_details('Method not implemented!')
|
|
344
|
+
raise NotImplementedError('Method not implemented!')
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
def add_HealthCheckServiceServicer_to_server(servicer, server):
|
|
348
|
+
rpc_method_handlers = {
|
|
349
|
+
'HealthCheck': grpc.unary_unary_rpc_method_handler(
|
|
350
|
+
servicer.HealthCheck,
|
|
351
|
+
request_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.HealthCheckRequest.FromString,
|
|
352
|
+
response_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.HealthCheckResponse.SerializeToString,
|
|
353
|
+
),
|
|
354
|
+
}
|
|
355
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
356
|
+
'Sindika.AspNet.App005.Services.HealthCheckService', rpc_method_handlers)
|
|
357
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
358
|
+
server.add_registered_method_handlers('Sindika.AspNet.App005.Services.HealthCheckService', rpc_method_handlers)
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
# This class is part of an EXPERIMENTAL API.
|
|
362
|
+
class HealthCheckService(object):
|
|
363
|
+
"""//////////////////////////
|
|
364
|
+
|
|
365
|
+
Health Check Service for gRPC Latency
|
|
366
|
+
"""
|
|
367
|
+
|
|
368
|
+
@staticmethod
|
|
369
|
+
def HealthCheck(request,
|
|
370
|
+
target,
|
|
371
|
+
options=(),
|
|
372
|
+
channel_credentials=None,
|
|
373
|
+
call_credentials=None,
|
|
374
|
+
insecure=False,
|
|
375
|
+
compression=None,
|
|
376
|
+
wait_for_ready=None,
|
|
377
|
+
timeout=None,
|
|
378
|
+
metadata=None):
|
|
379
|
+
return grpc.experimental.unary_unary(
|
|
380
|
+
request,
|
|
381
|
+
target,
|
|
382
|
+
'/Sindika.AspNet.App005.Services.HealthCheckService/HealthCheck',
|
|
383
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.HealthCheckRequest.SerializeToString,
|
|
384
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.HealthCheckResponse.FromString,
|
|
385
|
+
options,
|
|
386
|
+
channel_credentials,
|
|
387
|
+
insecure,
|
|
388
|
+
call_credentials,
|
|
389
|
+
compression,
|
|
390
|
+
wait_for_ready,
|
|
391
|
+
timeout,
|
|
392
|
+
metadata,
|
|
393
|
+
_registered_method=True)
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
class VideoStreamServiceStub(object):
|
|
397
|
+
"""//////////////////////////
|
|
398
|
+
|
|
399
|
+
"""
|
|
400
|
+
|
|
401
|
+
def __init__(self, channel):
|
|
402
|
+
"""Constructor.
|
|
403
|
+
|
|
404
|
+
Args:
|
|
405
|
+
channel: A grpc.Channel.
|
|
406
|
+
"""
|
|
407
|
+
self.StreamVideo = channel.stream_unary(
|
|
408
|
+
'/Sindika.AspNet.App005.Services.VideoStreamService/StreamVideo',
|
|
409
|
+
request_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.VideoFrame.SerializeToString,
|
|
410
|
+
response_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.VideoResponse.FromString,
|
|
411
|
+
_registered_method=True)
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
class VideoStreamServiceServicer(object):
|
|
415
|
+
"""//////////////////////////
|
|
416
|
+
|
|
417
|
+
"""
|
|
418
|
+
|
|
419
|
+
def StreamVideo(self, request_iterator, context):
|
|
420
|
+
"""Missing associated documentation comment in .proto file."""
|
|
421
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
422
|
+
context.set_details('Method not implemented!')
|
|
423
|
+
raise NotImplementedError('Method not implemented!')
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
def add_VideoStreamServiceServicer_to_server(servicer, server):
|
|
427
|
+
rpc_method_handlers = {
|
|
428
|
+
'StreamVideo': grpc.stream_unary_rpc_method_handler(
|
|
429
|
+
servicer.StreamVideo,
|
|
430
|
+
request_deserializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.VideoFrame.FromString,
|
|
431
|
+
response_serializer=nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.VideoResponse.SerializeToString,
|
|
432
|
+
),
|
|
433
|
+
}
|
|
434
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
435
|
+
'Sindika.AspNet.App005.Services.VideoStreamService', rpc_method_handlers)
|
|
436
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
437
|
+
server.add_registered_method_handlers('Sindika.AspNet.App005.Services.VideoStreamService', rpc_method_handlers)
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
# This class is part of an EXPERIMENTAL API.
|
|
441
|
+
class VideoStreamService(object):
|
|
442
|
+
"""//////////////////////////
|
|
443
|
+
|
|
444
|
+
"""
|
|
445
|
+
|
|
446
|
+
@staticmethod
|
|
447
|
+
def StreamVideo(request_iterator,
|
|
448
|
+
target,
|
|
449
|
+
options=(),
|
|
450
|
+
channel_credentials=None,
|
|
451
|
+
call_credentials=None,
|
|
452
|
+
insecure=False,
|
|
453
|
+
compression=None,
|
|
454
|
+
wait_for_ready=None,
|
|
455
|
+
timeout=None,
|
|
456
|
+
metadata=None):
|
|
457
|
+
return grpc.experimental.stream_unary(
|
|
458
|
+
request_iterator,
|
|
459
|
+
target,
|
|
460
|
+
'/Sindika.AspNet.App005.Services.VideoStreamService/StreamVideo',
|
|
461
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.VideoFrame.SerializeToString,
|
|
462
|
+
nedo__vision__worker_dot_protos_dot_VisionWorkerService__pb2.VideoResponse.FromString,
|
|
463
|
+
options,
|
|
464
|
+
channel_credentials,
|
|
465
|
+
insecure,
|
|
466
|
+
call_credentials,
|
|
467
|
+
compression,
|
|
468
|
+
wait_for_ready,
|
|
469
|
+
timeout,
|
|
470
|
+
metadata,
|
|
471
|
+
_registered_method=True)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: nedo_vision_worker/protos/WorkerSourcePipelineService.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.0
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
0,
|
|
17
|
+
'',
|
|
18
|
+
'nedo_vision_worker/protos/WorkerSourcePipelineService.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n;nedo_vision_worker/protos/WorkerSourcePipelineService.proto\x12\x1eSindika.AspNet.App005.Services\"\x90\x01\n WorkerSourcePipelineListResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\x12J\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32<.Sindika.AspNet.App005.Services.WorkerSourcePipelineResponse\"<\n\x18GetListByWorkerIdRequest\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"I\n\x1eGetListByWorkerSourceIdRequest\x12\x18\n\x10worker_source_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"\x9b\x02\n\x1cWorkerSourcePipelineResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x18\n\x10worker_source_id\x18\x03 \x01(\t\x12\x11\n\tworker_id\x18\x04 \x01(\t\x12\x13\n\x0b\x61i_model_id\x18\x05 \x01(\t\x12\x1c\n\x14pipeline_status_code\x18\x06 \x01(\t\x12j\n\x1eworker_source_pipeline_configs\x18\x07 \x03(\x0b\x32\x42.Sindika.AspNet.App005.Services.WorkerSourcePipelineConfigResponse\x12\x15\n\rlocation_name\x18\x08 \x01(\t\"\xe3\x01\n\"WorkerSourcePipelineConfigResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12!\n\x19worker_source_pipeline_id\x18\x02 \x01(\t\x12\x1a\n\x12pipeline_config_id\x18\x03 \x01(\t\x12\x12\n\nis_enabled\x18\x04 \x01(\x08\x12\r\n\x05value\x18\x05 \x01(\t\x12O\n\x0fpipeline_config\x18\x06 \x01(\x0b\x32\x36.Sindika.AspNet.App005.Services.PipelineConfigResponse\"@\n\x16PipelineConfigResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\t\"i\n\x18SendPipelineImageRequest\x12!\n\x19worker_source_pipeline_id\x18\x01 \x01(\t\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x12\r\n\x05image\x18\x03 \x01(\x0c\x12\r\n\x05token\x18\x04 \x01(\t\"=\n\x19SendPipelineImageResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"i\n\x1bUpdatePipelineStatusRequest\x12\x13\n\x0bpipeline_id\x18\x01 \x01(\t\x12\x13\n\x0bstatus_code\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x03\x12\r\n\x05token\x18\x04 \x01(\t\"@\n\x1cUpdatePipelineStatusResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"w\n\x18SendPipelineDebugRequest\x12!\n\x19worker_source_pipeline_id\x18\x01 \x01(\t\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\x12\r\n\x05image\x18\x04 \x01(\x0c\x12\r\n\x05token\x18\x05 \x01(\t\"=\n\x19SendPipelineDebugResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"\x92\x01\n SendPipelineDetectionDataRequest\x12!\n\x19worker_source_pipeline_id\x18\x01 \x01(\t\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\x12\r\n\x05image\x18\x04 \x01(\x0c\x12\x11\n\ttimestamp\x18\x05 \x01(\x03\x12\r\n\x05token\x18\x06 \x01(\t\"E\n!SendPipelineDetectionDataResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t2\x92\x07\n\x1bWorkerSourcePipelineService\x12\x8f\x01\n\x11GetListByWorkerId\x12\x38.Sindika.AspNet.App005.Services.GetListByWorkerIdRequest\x1a@.Sindika.AspNet.App005.Services.WorkerSourcePipelineListResponse\x12\x9b\x01\n\x17GetListByWorkerSourceId\x12>.Sindika.AspNet.App005.Services.GetListByWorkerSourceIdRequest\x1a@.Sindika.AspNet.App005.Services.WorkerSourcePipelineListResponse\x12\x88\x01\n\x11SendPipelineImage\x12\x38.Sindika.AspNet.App005.Services.SendPipelineImageRequest\x1a\x39.Sindika.AspNet.App005.Services.SendPipelineImageResponse\x12\x89\x01\n\x0cUpdateStatus\x12;.Sindika.AspNet.App005.Services.UpdatePipelineStatusRequest\x1a<.Sindika.AspNet.App005.Services.UpdatePipelineStatusResponse\x12\x88\x01\n\x11SendPipelineDebug\x12\x38.Sindika.AspNet.App005.Services.SendPipelineDebugRequest\x1a\x39.Sindika.AspNet.App005.Services.SendPipelineDebugResponse\x12\xa0\x01\n\x19SendPipelineDetectionData\x12@.Sindika.AspNet.App005.Services.SendPipelineDetectionDataRequest\x1a\x41.Sindika.AspNet.App005.Services.SendPipelineDetectionDataResponseb\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nedo_vision_worker.protos.WorkerSourcePipelineService_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_WORKERSOURCEPIPELINELISTRESPONSE']._serialized_start=96
|
|
35
|
+
_globals['_WORKERSOURCEPIPELINELISTRESPONSE']._serialized_end=240
|
|
36
|
+
_globals['_GETLISTBYWORKERIDREQUEST']._serialized_start=242
|
|
37
|
+
_globals['_GETLISTBYWORKERIDREQUEST']._serialized_end=302
|
|
38
|
+
_globals['_GETLISTBYWORKERSOURCEIDREQUEST']._serialized_start=304
|
|
39
|
+
_globals['_GETLISTBYWORKERSOURCEIDREQUEST']._serialized_end=377
|
|
40
|
+
_globals['_WORKERSOURCEPIPELINERESPONSE']._serialized_start=380
|
|
41
|
+
_globals['_WORKERSOURCEPIPELINERESPONSE']._serialized_end=663
|
|
42
|
+
_globals['_WORKERSOURCEPIPELINECONFIGRESPONSE']._serialized_start=666
|
|
43
|
+
_globals['_WORKERSOURCEPIPELINECONFIGRESPONSE']._serialized_end=893
|
|
44
|
+
_globals['_PIPELINECONFIGRESPONSE']._serialized_start=895
|
|
45
|
+
_globals['_PIPELINECONFIGRESPONSE']._serialized_end=959
|
|
46
|
+
_globals['_SENDPIPELINEIMAGEREQUEST']._serialized_start=961
|
|
47
|
+
_globals['_SENDPIPELINEIMAGEREQUEST']._serialized_end=1066
|
|
48
|
+
_globals['_SENDPIPELINEIMAGERESPONSE']._serialized_start=1068
|
|
49
|
+
_globals['_SENDPIPELINEIMAGERESPONSE']._serialized_end=1129
|
|
50
|
+
_globals['_UPDATEPIPELINESTATUSREQUEST']._serialized_start=1131
|
|
51
|
+
_globals['_UPDATEPIPELINESTATUSREQUEST']._serialized_end=1236
|
|
52
|
+
_globals['_UPDATEPIPELINESTATUSRESPONSE']._serialized_start=1238
|
|
53
|
+
_globals['_UPDATEPIPELINESTATUSRESPONSE']._serialized_end=1302
|
|
54
|
+
_globals['_SENDPIPELINEDEBUGREQUEST']._serialized_start=1304
|
|
55
|
+
_globals['_SENDPIPELINEDEBUGREQUEST']._serialized_end=1423
|
|
56
|
+
_globals['_SENDPIPELINEDEBUGRESPONSE']._serialized_start=1425
|
|
57
|
+
_globals['_SENDPIPELINEDEBUGRESPONSE']._serialized_end=1486
|
|
58
|
+
_globals['_SENDPIPELINEDETECTIONDATAREQUEST']._serialized_start=1489
|
|
59
|
+
_globals['_SENDPIPELINEDETECTIONDATAREQUEST']._serialized_end=1635
|
|
60
|
+
_globals['_SENDPIPELINEDETECTIONDATARESPONSE']._serialized_start=1637
|
|
61
|
+
_globals['_SENDPIPELINEDETECTIONDATARESPONSE']._serialized_end=1706
|
|
62
|
+
_globals['_WORKERSOURCEPIPELINESERVICE']._serialized_start=1709
|
|
63
|
+
_globals['_WORKERSOURCEPIPELINESERVICE']._serialized_end=2623
|
|
64
|
+
# @@protoc_insertion_point(module_scope)
|