plantstar-shared 2.0.3.0.2.11__tar.gz → 2.0.3.0.2.13__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.
Files changed (26) hide show
  1. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/PKG-INFO +1 -1
  2. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/tcp_socket_utils.py +7 -7
  3. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared.egg-info/PKG-INFO +1 -1
  4. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/setup.py +1 -1
  5. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/README.md +0 -0
  6. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/DataCollectionModuleProcessNames.py +0 -0
  7. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/HuskyInterfacePacketTypes.py +0 -0
  8. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/MockRawDataProcessor.py +0 -0
  9. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/RawDataProcessorInterfaceActions.py +0 -0
  10. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/SysconType.py +0 -0
  11. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/__init__.py +0 -0
  12. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/add_size_onto_string_and_return.py +0 -0
  13. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/api_types.py +0 -0
  14. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/convert_bytes_to_object.py +0 -0
  15. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/convert_object_to_bytes.py +0 -0
  16. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/errors.py +0 -0
  17. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/global_definitions.py +0 -0
  18. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/is_valid_signed_string.py +0 -0
  19. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/obtain_raw_data_processor_function_for_action_name.py +0 -0
  20. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/syscon_image_field.py +0 -0
  21. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared/syscon_json.py +0 -0
  22. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared.egg-info/SOURCES.txt +0 -0
  23. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared.egg-info/dependency_links.txt +0 -0
  24. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared.egg-info/requires.txt +0 -0
  25. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/plantstar_shared.egg-info/top_level.txt +0 -0
  26. {plantstar-shared-2.0.3.0.2.11 → plantstar-shared-2.0.3.0.2.13}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plantstar-shared
3
- Version: 2.0.3.0.2.11
3
+ Version: 2.0.3.0.2.13
4
4
  Summary: Shared code used in plantstar_apu and plantstar_dcm
5
5
  Home-page: https://github.com/SYSCON-International/plantstar_shared
6
6
  Author: SYSCON International
@@ -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 preceds data coming from Husky OIs
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,15 +102,15 @@ 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, should_remove_prefix_size_from_read=False
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, _ = get_bytes_from_socket(
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
 
112
112
  if not object_from_interface_as_bytes:
113
- return None
113
+ return None, 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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plantstar-shared
3
- Version: 2.0.3.0.2.11
3
+ Version: 2.0.3.0.2.13
4
4
  Summary: Shared code used in plantstar_apu and plantstar_dcm
5
5
  Home-page: https://github.com/SYSCON-International/plantstar_shared
6
6
  Author: SYSCON International
@@ -7,7 +7,7 @@ setuptools.setup(
7
7
  name="plantstar-shared",
8
8
  # MAJOR_MILESTONE_VERSION.MINOR_MILESTONE_VERSION.MAJOR_VERSION.MINOR_VERSION.HOTFIX_VERSION.SUBVERSION
9
9
  # The main version should stay as v2.0.3.0.x until we have passed that in the plantstar_apu/plantstar_dcm projects
10
- version="2.0.3.0.2.11",
10
+ version="2.0.3.0.2.13",
11
11
  author="SYSCON International",
12
12
  author_email="dev@syscon-intl.com",
13
13
  description="Shared code used in plantstar_apu and plantstar_dcm",