plantstar-shared 2.0.3.0.2.11__py3-none-any.whl → 2.0.3.0.2.12__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.
- plantstar_shared/tcp_socket_utils.py +6 -6
- {plantstar_shared-2.0.3.0.2.11.dist-info → plantstar_shared-2.0.3.0.2.12.dist-info}/METADATA +1 -1
- {plantstar_shared-2.0.3.0.2.11.dist-info → plantstar_shared-2.0.3.0.2.12.dist-info}/RECORD +5 -5
- {plantstar_shared-2.0.3.0.2.11.dist-info → plantstar_shared-2.0.3.0.2.12.dist-info}/WHEEL +0 -0
- {plantstar_shared-2.0.3.0.2.11.dist-info → plantstar_shared-2.0.3.0.2.12.dist-info}/top_level.txt +0 -0
@@ -4,8 +4,8 @@ from plantstar_shared.convert_bytes_to_object import convert_bytes_to_object
|
|
4
4
|
from plantstar_shared.convert_object_to_bytes import convert_object_to_bytes
|
5
5
|
from plantstar_shared.errors import SocketConnectionError, SysconProgrammingError
|
6
6
|
|
7
|
-
SIZE_OF_UNSIGNED_INT_FOR_HUSKY = 2 # size of integer value that
|
8
|
-
SIZE_OF_UNSIGNED_INT_STRUCT = 4 # size of integer value that precedes data coming from DCM
|
7
|
+
SIZE_OF_UNSIGNED_INT_FOR_HUSKY = 2 # size of the integer value that precedes data coming from Husky OIs
|
8
|
+
SIZE_OF_UNSIGNED_INT_STRUCT = 4 # size of the integer value that precedes data coming from most sockets (DeviceController, DCM, etc)
|
9
9
|
|
10
10
|
|
11
11
|
def read_size_value_from_socket(*, remote_socket, is_big_endian, number_of_bytes_for_size_prefix):
|
@@ -102,10 +102,10 @@ def send_encoded_message_on_socket(*, remote_socket, encoded_message):
|
|
102
102
|
|
103
103
|
|
104
104
|
def get_object_from_socket(
|
105
|
-
*, remote_socket, number_of_bytes_to_read=None, is_big_endian=True, number_of_bytes_for_size_prefix=SIZE_OF_UNSIGNED_INT_STRUCT
|
105
|
+
*, remote_socket, number_of_bytes_to_read=None, is_big_endian=True, number_of_bytes_for_size_prefix=SIZE_OF_UNSIGNED_INT_STRUCT
|
106
106
|
):
|
107
|
-
"""Function that is used between the APU and DCM to send dictionaries """
|
108
|
-
object_from_interface_as_bytes,
|
107
|
+
"""Function that is used between the APU and DCM to send dictionaries. Returns a tuple of the object and its size in bytes."""
|
108
|
+
object_from_interface_as_bytes, size_of_object_in_bytes = get_bytes_from_socket(
|
109
109
|
remote_socket=remote_socket, number_of_bytes_to_read=number_of_bytes_to_read, is_big_endian=is_big_endian, number_of_bytes_for_size_prefix=number_of_bytes_for_size_prefix
|
110
110
|
)
|
111
111
|
|
@@ -113,4 +113,4 @@ def get_object_from_socket(
|
|
113
113
|
return None
|
114
114
|
|
115
115
|
object_from_interface = convert_bytes_to_object(object_from_interface_as_bytes)
|
116
|
-
return object_from_interface
|
116
|
+
return object_from_interface, size_of_object_in_bytes
|
@@ -14,8 +14,8 @@ plantstar_shared/is_valid_signed_string.py,sha256=5ZiEsPRz30J8yxN4A1dHq-hlz7VI9r
|
|
14
14
|
plantstar_shared/obtain_raw_data_processor_function_for_action_name.py,sha256=DYo307PraRRD8zGiSO6Fn03bZ4X9aDOYV9rwaRm8mXM,1134
|
15
15
|
plantstar_shared/syscon_image_field.py,sha256=GlTTudqFT5EsWM5sPRO0p5SDascX7gI1BEOeF1OG7Tw,441
|
16
16
|
plantstar_shared/syscon_json.py,sha256=8OG9_55d52V9e2fFNguDtQ_pnw1YwyYsg2pnUkhjW6g,4213
|
17
|
-
plantstar_shared/tcp_socket_utils.py,sha256=
|
18
|
-
plantstar_shared-2.0.3.0.2.
|
19
|
-
plantstar_shared-2.0.3.0.2.
|
20
|
-
plantstar_shared-2.0.3.0.2.
|
21
|
-
plantstar_shared-2.0.3.0.2.
|
17
|
+
plantstar_shared/tcp_socket_utils.py,sha256=bW4KSKSTZLWyivdVZ0cIH4CN5Kw92CNa2xMj3fIZ7_U,5586
|
18
|
+
plantstar_shared-2.0.3.0.2.12.dist-info/METADATA,sha256=bjxjBORuN81GgyCFuQ7bxShD1Hbh7ot7TsxuZQnFuUo,659
|
19
|
+
plantstar_shared-2.0.3.0.2.12.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
20
|
+
plantstar_shared-2.0.3.0.2.12.dist-info/top_level.txt,sha256=9ZTCr_aP1GqYGt7EVmlSIUF72bdMZErapyhbik-MWVQ,17
|
21
|
+
plantstar_shared-2.0.3.0.2.12.dist-info/RECORD,,
|
File without changes
|
{plantstar_shared-2.0.3.0.2.11.dist-info → plantstar_shared-2.0.3.0.2.12.dist-info}/top_level.txt
RENAMED
File without changes
|