holado 0.4.2__py3-none-any.whl → 0.5.2__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.
Potentially problematic release.
This version of holado might be problematic. Click here for more details.
- holado/common/context/session_context.py +6 -0
- {holado-0.4.2.dist-info → holado-0.5.2.dist-info}/METADATA +1 -1
- {holado-0.4.2.dist-info → holado-0.5.2.dist-info}/RECORD +57 -28
- holado_ais/ais/ais_messages.py +44 -15
- holado_ais/ais/patch_pyais.py +47 -176
- holado_ais/tests/behave/steps/ais/ais_messages_steps.py +2 -6
- holado_core/common/resource/persisted_data_manager.py +4 -5
- holado_core/common/resource/resource_manager.py +4 -18
- holado_core/common/tools/converters/converter.py +14 -3
- holado_core/common/tools/tools.py +9 -2
- holado_data/data/generator/generator_manager.py +1 -13
- holado_db/tools/db/clients/base/db_audit.py +94 -0
- holado_db/tools/db/clients/base/db_client.py +145 -59
- holado_db/tools/db/clients/postgresql/postgresql_audit.py +75 -0
- holado_db/tools/db/clients/postgresql/postgresql_client.py +4 -0
- holado_db/tools/db/clients/sqlite/sqlite_audit.py +70 -0
- holado_db/tools/db/clients/sqlite/sqlite_client.py +4 -0
- holado_django/server/patch_djangogrpcframework.py +46 -0
- holado_logging/common/logging/holado_logger.py +1 -6
- holado_multitask/multithreading/thread.py +13 -7
- holado_multitask/multithreading/timer.py +3 -0
- holado_python/common/tools/datetime.py +31 -13
- holado_python/standard_library/ssl/resources/certificates/tcpbin.crt +16 -16
- holado_python/standard_library/ssl/resources/certificates/tcpbin.key +26 -26
- holado_rabbitmq/tools/rabbitmq/rabbitmq_blocking_client.py +24 -2
- holado_rabbitmq/tools/rabbitmq/rabbitmq_client.py +2 -2
- holado_report/report/builders/failure_report_builder.py +129 -0
- holado_report/report/report_manager.py +4 -0
- holado_rest/api/rest/rest_client.py +19 -7
- holado_rest/tests/behave/steps/api/rest_client_steps.py +1 -2
- test_holado/features/NonReg/holado_ais/message_types/type-10.feature +38 -0
- test_holado/features/NonReg/holado_ais/message_types/type-12.feature +37 -0
- test_holado/features/NonReg/holado_ais/message_types/type-14.feature +36 -0
- test_holado/features/NonReg/holado_ais/message_types/type-15.feature +36 -0
- test_holado/features/NonReg/holado_ais/message_types/type-16.feature +38 -0
- test_holado/features/NonReg/holado_ais/message_types/type-17.feature +46 -0
- test_holado/features/NonReg/holado_ais/message_types/type-18.feature +37 -0
- test_holado/features/NonReg/holado_ais/message_types/type-19.feature +38 -0
- test_holado/features/NonReg/holado_ais/message_types/type-1_2_3.feature +42 -0
- test_holado/features/NonReg/holado_ais/message_types/type-20.feature +38 -0
- test_holado/features/NonReg/holado_ais/message_types/type-21.feature +37 -0
- test_holado/features/NonReg/holado_ais/message_types/type-22.feature +84 -0
- test_holado/features/NonReg/holado_ais/message_types/type-23.feature +49 -0
- test_holado/features/NonReg/holado_ais/message_types/type-24.feature +72 -0
- test_holado/features/NonReg/holado_ais/message_types/type-25.feature +143 -0
- test_holado/features/NonReg/holado_ais/message_types/type-26.feature +144 -0
- test_holado/features/NonReg/holado_ais/message_types/type-27.feature +36 -0
- test_holado/features/NonReg/holado_ais/message_types/type-4_11.feature +39 -0
- test_holado/features/NonReg/holado_ais/message_types/type-5.feature +33 -0
- test_holado/features/NonReg/holado_ais/message_types/type-6.feature +37 -0
- test_holado/features/NonReg/holado_ais/message_types/type-7_13.feature +43 -0
- test_holado/features/NonReg/holado_ais/message_types/type-8.feature +37 -0
- test_holado/features/NonReg/holado_ais/message_types/type-9.feature +37 -0
- test_holado/tools/django/api_grpc/manage.py +2 -0
- test_holado/tools/django/api_grpc/patch_djangogrpcframework.py +42 -0
- {holado-0.4.2.dist-info → holado-0.5.2.dist-info}/WHEEL +0 -0
- {holado-0.4.2.dist-info → holado-0.5.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -168,6 +168,9 @@ class SessionContext(Context):
|
|
|
168
168
|
with self.__multitask_lock:
|
|
169
169
|
self.behave_manager.set_main_context(behave_context)
|
|
170
170
|
self.report_manager.before_all()
|
|
171
|
+
|
|
172
|
+
# Set variable with session context instance
|
|
173
|
+
self.variable_manager.register_variable("SESSION_CONTEXT", self)
|
|
171
174
|
|
|
172
175
|
def after_all(self):
|
|
173
176
|
with self.__multitask_lock:
|
|
@@ -201,6 +204,9 @@ class SessionContext(Context):
|
|
|
201
204
|
feature_context = FeatureContext(feature)
|
|
202
205
|
self.__set_feature_context(feature_context)
|
|
203
206
|
|
|
207
|
+
# Set variable with feature context instance
|
|
208
|
+
self.variable_manager.register_variable("FEATURE_CONTEXT", feature_context)
|
|
209
|
+
|
|
204
210
|
# Report
|
|
205
211
|
try:
|
|
206
212
|
self.report_manager.before_feature(feature_context, feature)
|
|
@@ -4,7 +4,7 @@ holado/common/__init__.py,sha256=ZjXM-FRQgnfzRNXqcvJOGewDHVRR-U5-ugStSs8U2Xs,152
|
|
|
4
4
|
holado/common/context/__init__.py,sha256=3jJBLm8myrYF9jbdV1EhIA6BtnlmjX33eeoDpTzwmLA,1604
|
|
5
5
|
holado/common/context/context.py,sha256=XPrdZw_9j096AI9EZwMT4xVd58c1ZH6VGxT5Yb-qYYU,6660
|
|
6
6
|
holado/common/context/service_manager.py,sha256=LaCn8ukE1aqJynmwoexAYj5hCkdb_F3hXRtUBGqorUE,14087
|
|
7
|
-
holado/common/context/session_context.py,sha256=
|
|
7
|
+
holado/common/context/session_context.py,sha256=eIcq3AfS1zQLzd2ud6n2T-p8Z6I-WThCmhFFSb22O70,22770
|
|
8
8
|
holado/common/handlers/__init__.py,sha256=d0KDUpaAAw1eBXyX08gaRh4RECnJlXjYQ0TcU-Ndicc,1372
|
|
9
9
|
holado/common/handlers/enums.py,sha256=ieqKVoukEiNyfE3KrKmMOImdbFS1ocUMud8JHe2xNLs,1662
|
|
10
10
|
holado/common/handlers/object.py,sha256=5vR7iV2NUI1sZxvkzcUBOe7FT9LkzYaivNDTE4d_6ds,6703
|
|
@@ -14,14 +14,14 @@ holado/common/tools/gc_manager.py,sha256=TjQg7MisGRhxuiQ22hB3IuqNhnWCVEWpU253-rO
|
|
|
14
14
|
holado_ais/__init__.py,sha256=Mudcgu_7p1hBDBs6LpSz757H4haB0yLHgT70sznG82c,1807
|
|
15
15
|
holado_ais/ais/MaritimeIdentificationDigits.csv,sha256=r-uHt4wOvxlbA26af9e-N3BKbuiMf6ia3PN0ZGfYk2A,8547
|
|
16
16
|
holado_ais/ais/ais_manager.py,sha256=QvN94JoUBbSXT08HABl2FNsAVOM-YCmQO5tN9COg6Rc,6496
|
|
17
|
-
holado_ais/ais/ais_messages.py,sha256=
|
|
17
|
+
holado_ais/ais/ais_messages.py,sha256=QzJx6VrbqE_vXCPeWBDhFAGJQoN4b_9W5PboY9W7-lQ,15892
|
|
18
18
|
holado_ais/ais/ais_payload.py,sha256=mdOa_4JIbkFLK4_KUmQF5jUt1nLxvZhmIcqK8i-YY6w,1791
|
|
19
19
|
holado_ais/ais/enums.py,sha256=bsqfJVg65fWiJwL_VlSKwKgTY0pLoDcI4T06aEOcQnw,1108
|
|
20
|
-
holado_ais/ais/patch_pyais.py,sha256=
|
|
20
|
+
holado_ais/ais/patch_pyais.py,sha256=M4Fa8GZubXx4auRsk5I1yQPC40IR1p-1iVZIc4PXFfk,49850
|
|
21
21
|
holado_ais/tests/behave/steps/__init__.py,sha256=cM4YsjHIq0Tb9mTTJjvDojzhLwov6mc2RyjZz8XLVA8,1321
|
|
22
22
|
holado_ais/tests/behave/steps/ais/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
holado_ais/tests/behave/steps/ais/ais_manager_steps.py,sha256=nRtJUEyAzAqgm0UWwRUFAyOzhDxzRZKTGsEYU1DwE-Q,2170
|
|
24
|
-
holado_ais/tests/behave/steps/ais/ais_messages_steps.py,sha256=
|
|
24
|
+
holado_ais/tests/behave/steps/ais/ais_messages_steps.py,sha256=jqRupZyEc5jn_jwvAQJqVb-0cUTx77VBIGNGUvgt_sA,10471
|
|
25
25
|
holado_binary/__init__.py,sha256=Gl285tg-QaPE-3etWwZql9sH26G7EnVoQn97B0NMvOI,1248
|
|
26
26
|
holado_binary/ipc/binary.py,sha256=QYwK7jK4dzXRKprHMxnTxFljMy1LZDSXjMJ406yEOHk,5520
|
|
27
27
|
holado_binary/ipc/bit_series.py,sha256=PNuW_OXGV8yeRrMHxMPImR75np52KpcDOfXXdDKObWw,15508
|
|
@@ -97,9 +97,9 @@ holado_core/common/inspectors/tree_inspector.py,sha256=DYXmzGFQAzAT1pypKqxpOGPze
|
|
|
97
97
|
holado_core/common/inspectors/tools/inspect_builder.py,sha256=v7azgwciXHtO-o7gcgI5gOo3B-7rfRs8RQNO_q5LWjI,6830
|
|
98
98
|
holado_core/common/inspectors/tools/inspect_context.py,sha256=lzhhO5HxG00c6uMPyIXEUz0FHA61VCNUZr_39ykZ8lQ,2700
|
|
99
99
|
holado_core/common/inspectors/tools/inspect_parameters.py,sha256=2vXUpnZlP2cCYTvI9ddI6NGhONideoM1hBJ0vGdvPKo,7346
|
|
100
|
-
holado_core/common/resource/persisted_data_manager.py,sha256=
|
|
100
|
+
holado_core/common/resource/persisted_data_manager.py,sha256=59J_5NP9mwv74xkdq2dKGy3gAIh7Yr9Hw1icQ57jwP8,6185
|
|
101
101
|
holado_core/common/resource/persisted_method_to_call_manager.py,sha256=M_1G8OKwOUn5ha18MOwXD3kXz2-1XOyUP0H9QYvg6FQ,7756
|
|
102
|
-
holado_core/common/resource/resource_manager.py,sha256=
|
|
102
|
+
holado_core/common/resource/resource_manager.py,sha256=vyBP4-QKSG4ryB879p5j1_0QvW8YaARtnd7-520Pxi8,7020
|
|
103
103
|
holado_core/common/tables/__init__.py,sha256=i2-gExPOUa_AnmEPgZJQ2lAXeK02PLpPnjEqbsgj1Co,8
|
|
104
104
|
holado_core/common/tables/enums.py,sha256=YtYTSI1m6KQ3XFzOSFPi5De6Jc-nkDMTbnmqfRfsiJ0,1395
|
|
105
105
|
holado_core/common/tables/table.py,sha256=VV-68K0J7lzgWpmzesYdU3-ZrkmaIfu9eIYlNhAA02c,10252
|
|
@@ -127,10 +127,10 @@ holado_core/common/tables/converters/table_converter.py,sha256=TLKLOXIAhxM2ENu1a
|
|
|
127
127
|
holado_core/common/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
128
128
|
holado_core/common/tools/path_manager.py,sha256=dgdm8wAaVubh-krpquCXXeGUTtGqRKDpuEKmvhA9dKA,8899
|
|
129
129
|
holado_core/common/tools/string_tools.py,sha256=bQuMlI_yS7OoSPFL7qyfyXkrnjC8xHVpIsfmEC6JxhI,5590
|
|
130
|
-
holado_core/common/tools/tools.py,sha256=
|
|
130
|
+
holado_core/common/tools/tools.py,sha256=FLQ55BeksEu3Tqg6mZC7UwkmY0ZX1pHr78qZv-iDnpU,9555
|
|
131
131
|
holado_core/common/tools/comparators/comparator.py,sha256=K4LcXIRORHX5vkmDibI6P6Bu1L-6Xezb63ZzzOMKrWY,6812
|
|
132
132
|
holado_core/common/tools/comparators/object_comparator.py,sha256=RPI319h_tij6z75UVbZII3gBggQolRFMNMD4cN6z37Y,1399
|
|
133
|
-
holado_core/common/tools/converters/converter.py,sha256=
|
|
133
|
+
holado_core/common/tools/converters/converter.py,sha256=a77OzLC_bp6-jRVNVYcSXyixOrk_lg4hhs-jj9pYqaA,4136
|
|
134
134
|
holado_core/tests/behave/steps/__init__.py,sha256=H5vtbXvgGaNgLh2OsdeKQQn-xGvCBQz_2Mq17eEEF2U,1389
|
|
135
135
|
holado_core/tests/behave/steps/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
136
136
|
holado_core/tests/behave/steps/common/common_steps.py,sha256=GRMm562xO1g6tHzuY5JNbJ3jRVFG0JUqSpEQJEmmcgA,6351
|
|
@@ -143,7 +143,7 @@ holado_core/tools/abstracts/blocking_command_service.py,sha256=_mJ1DkIRMTKKASq2X
|
|
|
143
143
|
holado_core/tools/abstracts/service.py,sha256=07JkHz5bK2WBpAtiH2YmpZnUZY6roaUbHfD4QJ1spD4,2062
|
|
144
144
|
holado_data/__init__.py,sha256=KpbIi2cm1BYZgoWf0LuhE0ei3ZCE15UcUtjC1cSA55M,1653
|
|
145
145
|
holado_data/data/generator/base.py,sha256=axzEsz0A_6Ty0gnZ-ebFskY40dqEb_hX4D2qjrB6b3o,3764
|
|
146
|
-
holado_data/data/generator/generator_manager.py,sha256=
|
|
146
|
+
holado_data/data/generator/generator_manager.py,sha256=V6Vvj2nGEaGeVWLNFnlR38jqFpoXlabaAWVJA93U_sM,1360
|
|
147
147
|
holado_data/data/generator/python_generator.py,sha256=4ceEBAahGsCM6_u0Ea-0nvhzYKwt8C6INS-Uc0iEjVk,1738
|
|
148
148
|
holado_data/tests/behave/steps/__init__.py,sha256=_ykaOZqP9MUCf48E9V3Ze4Kt74Dr36iHFJcq6Cxukjw,1315
|
|
149
149
|
holado_data/tests/behave/steps/data/generator_steps.py,sha256=6rzSVnUOnub0q7yjV87AQjb7y3nRutSz9ObjaKQLKdU,3808
|
|
@@ -154,9 +154,12 @@ holado_db/tests/behave/steps/tools/db/db_client_steps.py,sha256=BmQ1M1ol3TGHu10Y
|
|
|
154
154
|
holado_db/tests/behave/steps/tools/db/postgresql_client_steps.py,sha256=HtO-NSlTG3figZxcRo88PG9Tdo2dfd8GlfkoscS7MMk,2954
|
|
155
155
|
holado_db/tests/behave/steps/tools/db/sqlite_client_steps.py,sha256=6B8GGBJxxG6Z49cGCPykm8BP7nQQZWUrWpw0XgaYGaE,2930
|
|
156
156
|
holado_db/tools/db/db_manager.py,sha256=0llXc6YhXfLr6oNfncPNjh4_ZInIm8XYywutQYvvLso,5400
|
|
157
|
-
holado_db/tools/db/clients/base/
|
|
158
|
-
holado_db/tools/db/clients/
|
|
159
|
-
holado_db/tools/db/clients/
|
|
157
|
+
holado_db/tools/db/clients/base/db_audit.py,sha256=eJ1r_0YUhvq50JngpWAdyEeVHWjAD4YCvWCJsLc1zmc,4368
|
|
158
|
+
holado_db/tools/db/clients/base/db_client.py,sha256=Boe_lsy9D-alK4FXzrFMTrzxq8EanWmUkcvAtkyAN9c,15265
|
|
159
|
+
holado_db/tools/db/clients/postgresql/postgresql_audit.py,sha256=yoy4-Yt4lZHJw7xAcuTj2Thg4aTDCYJBt-6HzQeEE80,3939
|
|
160
|
+
holado_db/tools/db/clients/postgresql/postgresql_client.py,sha256=40UOniOJS-2Jrl-lxCSPTn32JGmblO-WqRFQYV40srk,4246
|
|
161
|
+
holado_db/tools/db/clients/sqlite/sqlite_audit.py,sha256=cK7hBE7aKCFOX5xnT-QnYD_1loQPgPP9Gf6qTT1XuI4,3966
|
|
162
|
+
holado_db/tools/db/clients/sqlite/sqlite_client.py,sha256=-EvKAeaOc1Iv_wmuAgvzpS5hEfDFvZgP9OkFc9L5M-s,2891
|
|
160
163
|
holado_db/tools/db/query/query_manager.py,sha256=7n-d_Q373hlsKQshY3accIH8XfqaLScqnhMdTT2oWC4,3642
|
|
161
164
|
holado_db/tools/db/query/base/query_builder.py,sha256=-nCyBe8zsRhOX39uCV0P7OY_YKobQJVIpJDL2sUA_H8,5926
|
|
162
165
|
holado_db/tools/db/query/pypika/pypika_query_builder.py,sha256=qwFtd-7dSRju-qwGkiaDPwSkNgYpdfKsunq-TM3HhI8,10988
|
|
@@ -164,6 +167,7 @@ holado_django/__init__.py,sha256=KpbIi2cm1BYZgoWf0LuhE0ei3ZCE15UcUtjC1cSA55M,165
|
|
|
164
167
|
holado_django/server/HOWTO.txt,sha256=91z7uC1Hf_X6dNO2wxdqQFKG2U6wIIW6NKxirUglYOA,2085
|
|
165
168
|
holado_django/server/django_server.py,sha256=2nVH0WX99nGGH-c4QztfoC-zAJKmLrNTXvhTp4qsL08,4557
|
|
166
169
|
holado_django/server/grpc_django_server.py,sha256=dxK5Qs2u7wV0Sr4oa2hpBDdidZQqDbdR1_aurLyyhxk,2757
|
|
170
|
+
holado_django/server/patch_djangogrpcframework.py,sha256=bOa5FbbCFZrXRrSBxduofEVl3YX_fwoyf44mklGk3sY,2149
|
|
167
171
|
holado_django/server/django_projects/rest_api/db.sqlite3,sha256=LBFAfNepksCk8npTt9QtnG7CVtDKbZM7kmy13wv1Er0,131072
|
|
168
172
|
holado_django/server/django_projects/rest_api/manage.py,sha256=tElgH5cQY8xlY1-mVesjaqsqxe6U3Y--2kXfNIUZ5m0,664
|
|
169
173
|
holado_django/server/django_projects/rest_api/rest_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -238,7 +242,7 @@ holado_keycloak/tests/behave/steps/tools/keycloak_client_steps.py,sha256=Dc1xB3q
|
|
|
238
242
|
holado_keycloak/tools/keycloak/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
239
243
|
holado_keycloak/tools/keycloak/keycloak_client.py,sha256=QXAsf9rF0pKq1dHhXeZFZOxuEg_1uzp6vqXnwWDnegg,4019
|
|
240
244
|
holado_logging/__init__.py,sha256=EMmwm_jHe739gftVCmf6lb_dT20IVseVg0bbGGADn8w,2176
|
|
241
|
-
holado_logging/common/logging/holado_logger.py,sha256=
|
|
245
|
+
holado_logging/common/logging/holado_logger.py,sha256=PuHy9ne96MhO1f_YFQn9wUJvQrys7kuUoUUWF74hDz4,3083
|
|
242
246
|
holado_logging/common/logging/log_config.py,sha256=DdYEW-2YSZ6QZDZCeVn_IZOKQlwWvqi2NWEbPhvExxw,6578
|
|
243
247
|
holado_logging/common/logging/log_manager.py,sha256=gq92IAfnKEX-GKUHexNVgEI0UUrUdiWaC5GLcSTAaUE,13604
|
|
244
248
|
holado_multitask/__init__.py,sha256=EwuwiBmp8ICbPZ8CKPju8tHRTh2rG68PB_wGXczY9rw,2143
|
|
@@ -253,9 +257,9 @@ holado_multitask/multithreading/functionthreaded.py,sha256=gCLVMrxI18dKDNOQ9szH4
|
|
|
253
257
|
holado_multitask/multithreading/loopfunctionthreaded.py,sha256=5kfONDR76uuT1bTJrAtnfSncHwvVvzl8jagWUvTduHw,2492
|
|
254
258
|
holado_multitask/multithreading/loopthread.py,sha256=4II3d22PRf891De8dd9P4WjuwI52KrTDRTSTPzzvso8,4265
|
|
255
259
|
holado_multitask/multithreading/periodicfunctionthreaded.py,sha256=PCBKpbOIThNGLq12rOONAh2ECxEOmaOb6Aqj2Ob2XY8,6926
|
|
256
|
-
holado_multitask/multithreading/thread.py,sha256=
|
|
260
|
+
holado_multitask/multithreading/thread.py,sha256=dKgw1301nTv-8g7y29ecza9ZB5nhbAKCYs1p4KdmLUQ,9376
|
|
257
261
|
holado_multitask/multithreading/threadsmanager.py,sha256=5a-kV8t0-lwL6a9vCLL3_Oi-i67epcqOWWBz6vIJFEU,8462
|
|
258
|
-
holado_multitask/multithreading/timer.py,sha256=
|
|
262
|
+
holado_multitask/multithreading/timer.py,sha256=77tI9WITN2CpQoY82SUYinoGzfx_stpqf2fRLUI1Itk,2638
|
|
259
263
|
holado_multitask/multithreading/context/thread_context.py,sha256=pGcySQnqx92NIaVT64Ra3gIV7BpgBFfEy3N8PYTCOlI,3570
|
|
260
264
|
holado_multitask/multithreading/reflection/inspect.py,sha256=yntSXI6YEZDBfqoDnB0KS6HGxs__qTQFwF6FLUDZqCI,2137
|
|
261
265
|
holado_multitask/multithreading/reflection/sys.py,sha256=1Q7hX9nddjqUvfn-k39SuPQhwLjXJmB9gegV6vNM534,1558
|
|
@@ -278,7 +282,7 @@ holado_protobuf/tests/behave/steps/ipc/protobuf_steps.py,sha256=Pbw5E-AbTTSKR_i_
|
|
|
278
282
|
holado_python/__init__.py,sha256=uZzFUgE2zqLWiM-2yF9D5KinWqZYqoXYMCiD02A3iW8,1657
|
|
279
283
|
holado_python/common/enums.py,sha256=iwffWOqUdiFaOn83RPmjRVVHakTjQve55sNsbY4x8Ek,1535
|
|
280
284
|
holado_python/common/iterables.py,sha256=YxJYr_Xg1st-E5tDbdg14JpVI_8kYsrBjMEM7Sqh4yY,1629
|
|
281
|
-
holado_python/common/tools/datetime.py,sha256=
|
|
285
|
+
holado_python/common/tools/datetime.py,sha256=Wyg4i-lM0zbp3gC6cILmTtYwo3c6c5bhDAMJ86JUVJg,12163
|
|
282
286
|
holado_python/common/tools/comparators/boolean_comparator.py,sha256=66AtqQ1u7NLTKAmgZHdnbE8vMPfgwJ2ZrzMiea90jX0,2042
|
|
283
287
|
holado_python/common/tools/comparators/bytes_comparator.py,sha256=VKD5Q734n1k5Q0zX14fYgvM-66ysyRWkjo2fLgleyt0,2412
|
|
284
288
|
holado_python/common/tools/comparators/datetime_comparator.py,sha256=6smSvQ7ErnNuBNHkSbkf4HoSUJU54DNS2ILhxM1FHAk,3487
|
|
@@ -301,8 +305,8 @@ holado_python/standard_library/ssl/resources/certificates/NOTES.txt,sha256=GlPGG
|
|
|
301
305
|
holado_python/standard_library/ssl/resources/certificates/localhost.crt,sha256=iLmZpDuOQVawUlbZkb72g2-uv1c4SAmRJOrm4Th5anY,1123
|
|
302
306
|
holado_python/standard_library/ssl/resources/certificates/localhost.key,sha256=lP2NCvB9mr2E5sk8whA8FyQRcyU6H7sdWkJeKz80Hyc,1704
|
|
303
307
|
holado_python/standard_library/ssl/resources/certificates/rootCACert.pem,sha256=ECQDZ8OHRfqpZHCu6JRLMUjiONaPIhKZQF0-kidVrWQ,1424
|
|
304
|
-
holado_python/standard_library/ssl/resources/certificates/tcpbin.crt,sha256=
|
|
305
|
-
holado_python/standard_library/ssl/resources/certificates/tcpbin.key,sha256=
|
|
308
|
+
holado_python/standard_library/ssl/resources/certificates/tcpbin.crt,sha256=erWTdXBZG0GrWy96lXxg6Dla6S13XdFPasAdUIYjz20,1237
|
|
309
|
+
holado_python/standard_library/ssl/resources/certificates/tcpbin.key,sha256=iJAMTlmRPP9URH2Xb5qnv8m-ttE4IYYdRPT5xhZB4_k,1704
|
|
306
310
|
holado_python/tests/behave/steps/__init__.py,sha256=TWEk-kBTTDHi9I4nuu48nufmNMdZ9FHAhPZv0A_cWzc,1661
|
|
307
311
|
holado_python/tests/behave/steps/convert_steps.py,sha256=bZqRvJVp_u6fSPpdu4ne9NwVyZmui7R-AVdO2-H-I1A,2728
|
|
308
312
|
holado_python/tests/behave/steps/iterable_steps.py,sha256=f4vGIWBH8Qnjq69Q-ZBluYyctQ8SKauazTc41dsktZA,4041
|
|
@@ -318,8 +322,8 @@ holado_rabbitmq/__init__.py,sha256=4QWQhcore0gjLpI72i3m9CZpNP4RyvT-qiNUdP6AkCU,1
|
|
|
318
322
|
holado_rabbitmq/tests/behave/steps/__init__.py,sha256=l-VWY2Qv9f-9ZoPmWjUmeurF8kayJCDMReHsCRwNwYc,1332
|
|
319
323
|
holado_rabbitmq/tests/behave/steps/tools/rabbitmq_client_steps.py,sha256=z5BKvzoAZhiflSS7FCLOjV5V0HUcSbW5Fuxpp6JL3ZE,29795
|
|
320
324
|
holado_rabbitmq/tests/behave/steps/tools/rabbitmq_server_steps.py,sha256=hG6sXnZhiJ2RzxFUmlyx2ymTQNTqL_99B0dp5od7PT8,3081
|
|
321
|
-
holado_rabbitmq/tools/rabbitmq/rabbitmq_blocking_client.py,sha256=
|
|
322
|
-
holado_rabbitmq/tools/rabbitmq/rabbitmq_client.py,sha256=
|
|
325
|
+
holado_rabbitmq/tools/rabbitmq/rabbitmq_blocking_client.py,sha256=XjcllR9MKhTuj1Nibcd6DM-sCjwr7qWmBNVvREjd7KE,16486
|
|
326
|
+
holado_rabbitmq/tools/rabbitmq/rabbitmq_client.py,sha256=hRbpGN9_dhrddTTjfA20XPzA-yeXyctN6kcOon4a5I4,29953
|
|
323
327
|
holado_rabbitmq/tools/rabbitmq/rabbitmq_manager.py,sha256=jFxghEOohM8dUjXQg4FYLslJV-lT5xMSdVcKKAiQ8x4,7761
|
|
324
328
|
holado_rabbitmq/tools/rabbitmq/rabbitmq_select_client.py,sha256=urWn9A8XZqpAAtbvRZ-YUGVbOX_1Y0uSBA2lHGqJxLA,21039
|
|
325
329
|
holado_rabbitmq/tools/rabbitmq/rabbitmq_server.py,sha256=FW8iKAHm0I78bHQEbRk4rl0dtCmv4dvAe5BY_HfOQVM,1613
|
|
@@ -331,10 +335,11 @@ holado_redis/tools/redis/redis_client.py,sha256=KWuOrnwTcwt5xkD3rtI_l07v164Y_bso
|
|
|
331
335
|
holado_redis/tools/redis/redis_manager.py,sha256=tMO0XrCZTCfGdByFfgWXk9R-I_TUPLO9wXMQf8yCYcQ,1814
|
|
332
336
|
holado_report/__init__.py,sha256=ryApXT02HJHEeCQxA8grjw6Nml3LjZ31zqypFoJqzWg,1682
|
|
333
337
|
holado_report/report/execution_historic.py,sha256=hXosOGtsq-O9Oq6AeBXWlnIQxSy3bv89QKYPCHF9_GY,6799
|
|
334
|
-
holado_report/report/report_manager.py,sha256=
|
|
338
|
+
holado_report/report/report_manager.py,sha256=PZ-nWMyOIGKpdC1tBY91j5sWWIK2FdWxUp7h0_1XpJI,12350
|
|
335
339
|
holado_report/report/analyze/execution_historic_manager.py,sha256=FMKKPguXOvWNxjF7Q8DodHHsH-2ci9pFzrTV41B8nL4,4556
|
|
336
340
|
holado_report/report/analyze/scenario_duration_manager.py,sha256=Preaxu83qFKGfbvQnzolhSXztZ4i5Zo_Bnxx8tNA80Q,12468
|
|
337
341
|
holado_report/report/builders/detailed_scenario_failed_report_builder.py,sha256=LuuanB2BGnsY1EiCfmYIw-8CZY3nMsr0m2Oec4wyxkA,7501
|
|
342
|
+
holado_report/report/builders/failure_report_builder.py,sha256=hu_IOEK93IxtE5zpcXFwMUXgjMRN35bAyEUn5B4Uo3M,6397
|
|
338
343
|
holado_report/report/builders/json_execution_historic_report_builder.py,sha256=M7OGUvkqNRTG5Td7fO96tv1SJEzRzjm0pl1W02v052E,5929
|
|
339
344
|
holado_report/report/builders/report_builder.py,sha256=5qlhxbdTkSN7p9q6EADkpHQGPDVEHquIhgA3mK2Ck2k,2261
|
|
340
345
|
holado_report/report/builders/short_scenario_failed_report_builder.py,sha256=aKFEb7ldCmW0LbsphEf77Be2AXPQHjQLooCnkfVrzf4,3838
|
|
@@ -346,11 +351,11 @@ holado_report/report/reports/feature_report.py,sha256=i0wpk3LQLArVjWDsP9UcNSJzAU
|
|
|
346
351
|
holado_report/report/reports/scenario_report.py,sha256=eMyqw9EzaKMmX3pGFJN1rqAOQ5eqO2ISZdxAfK3XQR4,2945
|
|
347
352
|
holado_rest/__init__.py,sha256=BOeE6t6ejeqRYd44SE4vYJVTNz01BwcVCIWfwRQ5axg,1526
|
|
348
353
|
holado_rest/api/rest/TODO.txt,sha256=Oz8BYPkBEs9OAEgyYLLm7i5tJ1bRE5POBpT3SRFWTi4,29
|
|
349
|
-
holado_rest/api/rest/rest_client.py,sha256=
|
|
354
|
+
holado_rest/api/rest/rest_client.py,sha256=sa3xYJ2zts3cnRlHbxAIpN_B0stiaPrneOnqy2xzfgM,6531
|
|
350
355
|
holado_rest/api/rest/rest_manager.py,sha256=nekokAwN73n7Dn3nLhwf22XaKDW1sYjy4-JLWdfGxBQ,3559
|
|
351
356
|
holado_rest/tests/behave/steps/__init__.py,sha256=lEH5NYkKtpgDV2ZAO1qAGNN4ipwILWMpgvQgnamgYKk,1283
|
|
352
357
|
holado_rest/tests/behave/steps/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
353
|
-
holado_rest/tests/behave/steps/api/rest_client_steps.py,sha256
|
|
358
|
+
holado_rest/tests/behave/steps/api/rest_client_steps.py,sha256=naN0YcRVQyM--RhV0jPhnlsjZS6luijwGvVC5lM0XCY,9749
|
|
354
359
|
holado_rest/tests/behave/steps/private/__init__.py,sha256=TGsd7qLZpPQRxphFzgepFa22NhHSoZgxAWSIqwvA4L8,1276
|
|
355
360
|
holado_rest/tests/behave/steps/private/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
356
361
|
holado_rest/tests/behave/steps/private/api/rest_steps.py,sha256=GT97p6BzX-fWDLMUIxZ7ingCP6pTwZgk_3QX7yEMhoE,3324
|
|
@@ -485,6 +490,29 @@ test_holado/features/NonReg/common/tables/value_table_conversion.feature,sha256=
|
|
|
485
490
|
test_holado/features/NonReg/common/tools/DateTime.feature,sha256=Gf59f3iOdlE2fDnnZyNhz9SMqnl0W9mfLKvaWQVPuv4,3606
|
|
486
491
|
test_holado/features/NonReg/common/tools/UniqueValueManager.feature,sha256=Ok-f0RB01KQGIbEVyZ8nNmXJ3Y-qs3rzHg1_EPHIkuQ,995
|
|
487
492
|
test_holado/features/NonReg/holado_ais/ais_message-bitarray_to_nmea.feature,sha256=ILT9HR_v9kRSfoycMWtH329G5Wtx6H4Tu-V_uXXWphA,14188
|
|
493
|
+
test_holado/features/NonReg/holado_ais/message_types/type-10.feature,sha256=XNk-Z0HlLmDJPSDlgCMTeMGyIXo3rKS9As1C3IQCHUY,1495
|
|
494
|
+
test_holado/features/NonReg/holado_ais/message_types/type-12.feature,sha256=qG1Yt4klAdDpGi8ZU2NHeSsl3_wjIJr__iFcu_83v4g,1715
|
|
495
|
+
test_holado/features/NonReg/holado_ais/message_types/type-14.feature,sha256=ohBmsbuthRMRGtmfMj-aPpdupUG4O1mYSAHNsU14RdA,1570
|
|
496
|
+
test_holado/features/NonReg/holado_ais/message_types/type-15.feature,sha256=awQKEh-vYcT-Pco0TqdNBzb209YISpfJC7GCQRZxChg,1915
|
|
497
|
+
test_holado/features/NonReg/holado_ais/message_types/type-16.feature,sha256=9uBLWdoUAJbcQ8XjY1TFkUXzskDJh4vxT4gSX-q3Snc,1803
|
|
498
|
+
test_holado/features/NonReg/holado_ais/message_types/type-17.feature,sha256=SdLR3yxQ1VcYLpjIi_IOzs7tiv-1b293rRxGAvPo1xE,1743
|
|
499
|
+
test_holado/features/NonReg/holado_ais/message_types/type-18.feature,sha256=J0c85rJWEyV7qSo9IL4nE56qAy8PmJpKTVDJFXlERug,2357
|
|
500
|
+
test_holado/features/NonReg/holado_ais/message_types/type-19.feature,sha256=5GRe7IXmGc_-zhLiB9vsx9fIgG-uTQ4YuEPQbHWnnI8,2568
|
|
501
|
+
test_holado/features/NonReg/holado_ais/message_types/type-1_2_3.feature,sha256=30JTq9xcfdLJUesQUP09RXIg8MQvxql8yKnFlZoWYiQ,2283
|
|
502
|
+
test_holado/features/NonReg/holado_ais/message_types/type-20.feature,sha256=badMirPaJRTsbhsfNZvv4FEV0rB8lScEE-2xivAitrU,2466
|
|
503
|
+
test_holado/features/NonReg/holado_ais/message_types/type-21.feature,sha256=xDqfzp2z1gRuCIe553bQ0AVUrcX2vGHN0fNVTWxrLQs,2464
|
|
504
|
+
test_holado/features/NonReg/holado_ais/message_types/type-22.feature,sha256=x3RVWKorZH5E9ODOt6_vBWGtIQM9wCEOkxvCfemAxU8,4519
|
|
505
|
+
test_holado/features/NonReg/holado_ais/message_types/type-23.feature,sha256=d5SfiA-bXGql2pNZ6x1sG2svR1jk_OxaqslRa1LKHQc,2216
|
|
506
|
+
test_holado/features/NonReg/holado_ais/message_types/type-24.feature,sha256=ngYiOhE6D4dp5Cdm97REl20dbsfFbYhLBx-Y83p5g2Q,3621
|
|
507
|
+
test_holado/features/NonReg/holado_ais/message_types/type-25.feature,sha256=ECBzw-IRdKJqL2nyCQ9NoEikWrb_e8e7eEBhOwRiCKg,6878
|
|
508
|
+
test_holado/features/NonReg/holado_ais/message_types/type-26.feature,sha256=fiAhhYLK2yt2UibkWb_6D_3mSaRcK6sc0V8k7mDHbL0,7008
|
|
509
|
+
test_holado/features/NonReg/holado_ais/message_types/type-27.feature,sha256=fYH4tVzZ2Ngsi6A4qr8Gui2fMDtVLPmDAsV5ycAYTiM,1817
|
|
510
|
+
test_holado/features/NonReg/holado_ais/message_types/type-4_11.feature,sha256=uGc6JwB98Iiw97e7wXEgEOJJGzMkyIz5wjS-o2nb8JY,2172
|
|
511
|
+
test_holado/features/NonReg/holado_ais/message_types/type-5.feature,sha256=aVxQap88Myeut9lWmCIR4ONgiTNh8gkRZneajTqAcMM,2431
|
|
512
|
+
test_holado/features/NonReg/holado_ais/message_types/type-6.feature,sha256=q2Bcmjn-2yPHrK_VWsnoCY8MgGpLmcGdf8IXk6o6XPQ,1771
|
|
513
|
+
test_holado/features/NonReg/holado_ais/message_types/type-7_13.feature,sha256=FcnduMuDb8RHnb7bODmL1I5EleMAQWIaUKJrTN-xnxg,2188
|
|
514
|
+
test_holado/features/NonReg/holado_ais/message_types/type-8.feature,sha256=hYdJ8ln8fp06a0mNlVPErayC5t7k7162nVQwQ0XaRHo,1531
|
|
515
|
+
test_holado/features/NonReg/holado_ais/message_types/type-9.feature,sha256=JNiBFcp6wQwDRWt63DYdoPtsSsMGu8n79EbN3k0hsyk,2074
|
|
488
516
|
test_holado/features/NonReg/holado_binary/bit_series.error.feature,sha256=6RVQIb5oeuEHM-MvR0z9t_uT81GY0MbpZOxZp4qf_x4,1903
|
|
489
517
|
test_holado/features/NonReg/holado_binary/bit_series.feature,sha256=_FS1JMDFtt3LzBOhl92wgdznZJxbPAiFx9Z_p4mpJ_U,5730
|
|
490
518
|
test_holado/features/NonReg/holado_protobuf/protobuf.feature,sha256=5PjD4R_ow3lMwWNFuemGZ6J0_A2_pzn-oNY4aV-wsGg,11857
|
|
@@ -525,8 +553,9 @@ test_holado/steps/private_steps.py,sha256=nhypmhPUbSAvOq-98kFOlc7uddKi5Qkoz_Mqxq
|
|
|
525
553
|
test_holado/steps/public_steps.py,sha256=qKBNrNQNQqH6E3Y7L4yqs-6XEWbeTN-M4c1Lp5Nf3to,1324
|
|
526
554
|
test_holado/tools/django/README.txt,sha256=yJhso4V-Sn0Ok6QTfn5I27g9KCXK6-dGkIQOy5kgo5U,74
|
|
527
555
|
test_holado/tools/django/api_grpc/db.sqlite3,sha256=4k0iEt66XiVaWNgdAjqkq2lAnB6i4t7dcsN2UVV8n_I,131072
|
|
528
|
-
test_holado/tools/django/api_grpc/manage.py,sha256=
|
|
556
|
+
test_holado/tools/django/api_grpc/manage.py,sha256=90Y2fhWHRk1_8vnRBv_t6_q_Dn3dTp9fUYoDp5fOHmc,980
|
|
529
557
|
test_holado/tools/django/api_grpc/manual_test_commands.txt,sha256=tcIOybu0GXaKsjT_xwhzJhvVoOqNG4Xp034gFSFo0f0,758
|
|
558
|
+
test_holado/tools/django/api_grpc/patch_djangogrpcframework.py,sha256=PNsSTgzUQVFeaejEuBsRkXOOQKnGweCsAPnPBlLJG6o,2019
|
|
530
559
|
test_holado/tools/django/api_grpc/api_grpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
531
560
|
test_holado/tools/django/api_grpc/api_grpc/asgi.py,sha256=HL0wl1nDWo9hahf-HsfkzbqwVP4KqOXlLdOQjV2G10Y,393
|
|
532
561
|
test_holado/tools/django/api_grpc/api_grpc/settings.py,sha256=mMhispf5zXJKIv887h9uGqSI2KvxOz-xdL1taM6npnc,3274
|
|
@@ -560,7 +589,7 @@ test_holado/tools/django/api_rest/api_rest/api1/serializers.py,sha256=o_YxFr-tgC
|
|
|
560
589
|
test_holado/tools/django/api_rest/api_rest/api1/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
|
561
590
|
test_holado/tools/django/api_rest/api_rest/api1/views.py,sha256=kOt2xT6bxO47_z__5yYR9kcYIWWv4qYzpX0K8Tqonik,758
|
|
562
591
|
test_holado/tools/django/api_rest/api_rest/api1/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
563
|
-
holado-0.
|
|
564
|
-
holado-0.
|
|
565
|
-
holado-0.
|
|
566
|
-
holado-0.
|
|
592
|
+
holado-0.5.2.dist-info/METADATA,sha256=xyAU8PGbI1Gwi45yArq_BB33HS-XXBYm5DBlMJPSGms,6065
|
|
593
|
+
holado-0.5.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
594
|
+
holado-0.5.2.dist-info/licenses/LICENSE,sha256=IgGmNlcFHnbp7UWrLJqAFvs_HIgjJDTmjCNRircJLsk,1070
|
|
595
|
+
holado-0.5.2.dist-info/RECORD,,
|
holado_ais/ais/ais_messages.py
CHANGED
|
@@ -23,13 +23,15 @@ from holado_core.common.tools.tools import Tools
|
|
|
23
23
|
from holado_python.standard_library.typing import Typing
|
|
24
24
|
import copy
|
|
25
25
|
from holado_core.common.exceptions.functional_exception import FunctionalException
|
|
26
|
+
from holado_ais.ais.enums import AISMessageType
|
|
26
27
|
|
|
27
28
|
logger = logging.getLogger(__name__)
|
|
28
29
|
|
|
29
30
|
try:
|
|
30
31
|
import pyais
|
|
31
32
|
from bitarray import bitarray
|
|
32
|
-
from
|
|
33
|
+
from pyais.encode import ais_to_nmea_0183
|
|
34
|
+
from pyais.messages import TagBlock
|
|
33
35
|
with_pyais = True
|
|
34
36
|
|
|
35
37
|
# Patch pyais with some fixes
|
|
@@ -55,23 +57,27 @@ class AISMessages(object):
|
|
|
55
57
|
def __init__(self):
|
|
56
58
|
self.__tag_block_group_id = 0
|
|
57
59
|
|
|
58
|
-
def default_message_data(self, msg_type:int):
|
|
60
|
+
def default_message_data(self, msg_type:Union[int,str]):
|
|
59
61
|
"""Return default data values for required data by pyais but not functionnaly required.
|
|
60
62
|
It is useful when generating custom messages, for example for tests.
|
|
61
63
|
"""
|
|
62
64
|
return {}
|
|
63
65
|
|
|
64
|
-
def new_message_as_bitarray_bytes(self, msg_type:int, data:Union[dict,TableWithHeader]):
|
|
66
|
+
def new_message_as_bitarray_bytes(self, msg_type:Union[int,str], data:Union[dict,TableWithHeader]):
|
|
65
67
|
msg = self.new_message(msg_type, data)
|
|
66
68
|
res = self.convert_message_to_bytes(msg)
|
|
67
69
|
return res
|
|
68
70
|
|
|
69
|
-
def new_message(self, msg_type:int, data:Union[dict,TableWithHeader]):
|
|
71
|
+
def new_message(self, msg_type:Union[int,str], data:Union[dict,TableWithHeader]):
|
|
70
72
|
if isinstance(data, TableWithHeader):
|
|
71
73
|
data = self.__convert_table_to_dict(data)
|
|
72
74
|
if not isinstance(data, dict):
|
|
73
75
|
raise TechnicalException(f"Unexpected data type '{Typing.get_object_class_fullname(data)}'")
|
|
74
76
|
|
|
77
|
+
# Add data key 'msg_type' if missing
|
|
78
|
+
if 'msg_type' not in data:
|
|
79
|
+
data['msg_type'] = self.__get_message_type_int(msg_type)
|
|
80
|
+
|
|
75
81
|
message_type = self.__get_message_type(msg_type)
|
|
76
82
|
res = message_type.create(**data)
|
|
77
83
|
return res
|
|
@@ -87,7 +93,7 @@ class AISMessages(object):
|
|
|
87
93
|
args = encoded_bytes.split(parts_separator)
|
|
88
94
|
return pyais.decode(*args, error_if_checksum_invalid=True)
|
|
89
95
|
|
|
90
|
-
def decode_message(self, msg_type:int, bit_array:Union[str,bitarray]):
|
|
96
|
+
def decode_message(self, msg_type:Union[int,str], bit_array:Union[str,bitarray]):
|
|
91
97
|
if isinstance(bit_array, str):
|
|
92
98
|
if StrTools.is_hex(bit_array) and not StrTools.is_bitarray(bit_array):
|
|
93
99
|
bit_array = Binary.convert_hex_str_to_bin_str(bit_array)
|
|
@@ -98,21 +104,29 @@ class AISMessages(object):
|
|
|
98
104
|
message_type = self.__get_message_type(msg_type)
|
|
99
105
|
return message_type.from_bitarray(bit_array)
|
|
100
106
|
|
|
101
|
-
def encode_raw_payload(self,
|
|
107
|
+
def encode_raw_payload(self, payload:Union[str,bytes], tag_block: TagBlock = None, with_tag_block=True, talker_id: str = "AIVDM", **kwargs):
|
|
102
108
|
from pyais.util import encode_ascii_6
|
|
103
109
|
|
|
110
|
+
if isinstance(payload, bytes):
|
|
111
|
+
payload_bytes = payload
|
|
112
|
+
elif isinstance(payload, str):
|
|
113
|
+
payload_bytes = bytes.fromhex(payload)
|
|
114
|
+
else:
|
|
115
|
+
raise TechnicalException(f"Unmanaged payload type '{Typing.get_object_class_fullname(payload)}'")
|
|
116
|
+
|
|
104
117
|
payload_bitarray = bitarray()
|
|
105
|
-
payload_bitarray.frombytes(
|
|
118
|
+
payload_bitarray.frombytes(payload_bytes)
|
|
106
119
|
payload_ascii6, fill_bits = encode_ascii_6(payload_bitarray)
|
|
107
120
|
|
|
108
121
|
seq_id = kwargs.pop('seq_id') if 'seq_id' in kwargs else self.__tag_block_group_id % 10
|
|
109
122
|
radio_channel = kwargs['radio_channel'] if 'radio_channel' in kwargs else 'A'
|
|
110
123
|
group_id = kwargs.pop('group_id') if 'group_id' in kwargs else None
|
|
111
124
|
|
|
112
|
-
sentences = HA_ais_to_nmea_0183(payload_ascii6, talker_id, radio_channel, fill_bits, seq_id)
|
|
125
|
+
# sentences = HA_ais_to_nmea_0183(payload_ascii6, talker_id, radio_channel, fill_bits, seq_id)
|
|
126
|
+
sentences = ais_to_nmea_0183(payload_ascii6, talker_id, radio_channel, fill_bits, seq_id)
|
|
113
127
|
return self.__encode_add_tag_block(sentences, tag_block, with_tag_block=with_tag_block, group_id=group_id)
|
|
114
128
|
|
|
115
|
-
def encode(self, data, tag_block:
|
|
129
|
+
def encode(self, data, tag_block: TagBlock = None, with_tag_block=True, talker_id: str = "AIVDM", **kwargs):
|
|
116
130
|
if isinstance(data, pyais.messages.Payload):
|
|
117
131
|
return self.encode_msg(data, tag_block=tag_block, with_tag_block=with_tag_block, talker_id=talker_id, **kwargs)
|
|
118
132
|
elif isinstance(data, dict):
|
|
@@ -122,17 +136,18 @@ class AISMessages(object):
|
|
|
122
136
|
else:
|
|
123
137
|
raise TechnicalException(f"Unexpected data type '{Typing.get_object_class_fullname(data)}'")
|
|
124
138
|
|
|
125
|
-
def encode_msg(self, msg, tag_block:
|
|
139
|
+
def encode_msg(self, msg, tag_block: TagBlock = None, with_tag_block=True, talker_id: str = "AIVDM", **kwargs):
|
|
126
140
|
if not isinstance(msg, pyais.messages.Payload):
|
|
127
141
|
raise TechnicalException(f"Parameter 'msg' is not an AIS message (obtained type: {Typing.get_object_class_fullname(msg)})")
|
|
128
142
|
|
|
129
143
|
seq_id = kwargs.pop('seq_id') if 'seq_id' in kwargs else self.__tag_block_group_id % 10
|
|
130
144
|
group_id = kwargs.pop('group_id') if 'group_id' in kwargs else None
|
|
131
145
|
|
|
146
|
+
logger.print(f"+++++++ encode_msg: {msg=} ; {talker_id=} ; {kwargs=}")
|
|
132
147
|
sentences = pyais.encode_msg(msg, seq_id=seq_id, talker_id=talker_id, **kwargs)
|
|
133
148
|
return self.__encode_add_tag_block(sentences, tag_block, with_tag_block=with_tag_block, group_id=group_id)
|
|
134
149
|
|
|
135
|
-
def encode_data(self, data, tag_block:
|
|
150
|
+
def encode_data(self, data, tag_block: TagBlock = None, with_tag_block=True, talker_id: str = "AIVDM", **kwargs):
|
|
136
151
|
if not isinstance(data, dict):
|
|
137
152
|
raise TechnicalException(f"Parameter 'data' is not a dict (obtained type: {Typing.get_object_class_fullname(data)})")
|
|
138
153
|
|
|
@@ -142,11 +157,11 @@ class AISMessages(object):
|
|
|
142
157
|
sentences = pyais.encode_dict(data, seq_id=seq_id, talker_id=talker_id, **kwargs)
|
|
143
158
|
return self.__encode_add_tag_block(sentences, tag_block, with_tag_block=with_tag_block, group_id=group_id)
|
|
144
159
|
|
|
145
|
-
def encode_table(self, table, tag_block:
|
|
160
|
+
def encode_table(self, table, tag_block: TagBlock = None, with_tag_block=True, talker_id: str = "AIVDM", **kwargs):
|
|
146
161
|
data = self.__convert_table_to_dict(table)
|
|
147
162
|
return self.encode_data(data, tag_block=tag_block, with_tag_block=with_tag_block, talker_id=talker_id, **kwargs)
|
|
148
163
|
|
|
149
|
-
def __encode_add_tag_block(self, encoded_sentences, tag_block:
|
|
164
|
+
def __encode_add_tag_block(self, encoded_sentences, tag_block: TagBlock = None, with_tag_block=True, group_id=None):
|
|
150
165
|
from pyais.messages import TagBlockGroup
|
|
151
166
|
|
|
152
167
|
if not with_tag_block:
|
|
@@ -166,7 +181,7 @@ class AISMessages(object):
|
|
|
166
181
|
sentence_tag_block = copy.deepcopy(tag_block) if index == 0 else None
|
|
167
182
|
if group_id is not None:
|
|
168
183
|
if sentence_tag_block is None:
|
|
169
|
-
sentence_tag_block =
|
|
184
|
+
sentence_tag_block = TagBlock(None)
|
|
170
185
|
sentence_tag_block._group = TagBlockGroup(msg_id=index+1, total=nb_sentences, group_id=group_id)
|
|
171
186
|
|
|
172
187
|
if sentence_tag_block is not None:
|
|
@@ -182,11 +197,25 @@ class AISMessages(object):
|
|
|
182
197
|
def convert_message_to_bytes(self, msg):
|
|
183
198
|
return msg.to_bitarray().tobytes()
|
|
184
199
|
|
|
185
|
-
def __get_message_type(self, msg_type:int):
|
|
200
|
+
def __get_message_type(self, msg_type:Union[int,str]):
|
|
186
201
|
import importlib
|
|
202
|
+
|
|
203
|
+
if isinstance(msg_type, str):
|
|
204
|
+
msg_type = AISMessageType[msg_type].value
|
|
205
|
+
|
|
187
206
|
module = importlib.import_module('pyais.messages')
|
|
188
207
|
res = getattr(module, f"MessageType{msg_type}")
|
|
189
208
|
return res
|
|
209
|
+
|
|
210
|
+
def __get_message_type_int(self, msg_type:Union[int,str]):
|
|
211
|
+
if isinstance(msg_type, int):
|
|
212
|
+
return msg_type
|
|
213
|
+
|
|
214
|
+
if isinstance(msg_type, str):
|
|
215
|
+
msg_type = AISMessageType[msg_type]
|
|
216
|
+
if not isinstance(msg_type, AISMessageType):
|
|
217
|
+
raise TechnicalException(f"Unmanaged message type of class '{Typing.get_object_class_fullname(msg_type)}'")
|
|
218
|
+
return msg_type.value
|
|
190
219
|
|
|
191
220
|
def __convert_table_to_dict(self, table):
|
|
192
221
|
if not ValueTableManager.is_table_with_header(table):
|