fmu-manipulation-toolbox 1.9.2b4__tar.gz → 1.9.2rc1__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 (82) hide show
  1. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/PKG-INFO +1 -1
  2. fmu_manipulation_toolbox-1.9.2rc1/fmu_manipulation_toolbox/__version__.py +1 -0
  3. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/cli/datalog2pcap.py +34 -4
  4. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/container.py +7 -3
  5. fmu_manipulation_toolbox-1.9.2rc1/fmu_manipulation_toolbox/resources/darwin64/container.dylib +0 -0
  6. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/linux32/client_sm.so +0 -0
  7. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/linux64/client_sm.so +0 -0
  8. fmu_manipulation_toolbox-1.9.2rc1/fmu_manipulation_toolbox/resources/linux64/container.so +0 -0
  9. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/win32/client_sm.dll +0 -0
  10. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/win32/server_sm.exe +0 -0
  11. fmu_manipulation_toolbox-1.9.2rc1/fmu_manipulation_toolbox/resources/win64/client_sm.dll +0 -0
  12. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/win64/container.dll +0 -0
  13. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/win64/server_sm.exe +0 -0
  14. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox.egg-info/PKG-INFO +1 -1
  15. fmu_manipulation_toolbox-1.9.2b4/fmu_manipulation_toolbox/__version__.py +0 -1
  16. fmu_manipulation_toolbox-1.9.2b4/fmu_manipulation_toolbox/resources/darwin64/container.dylib +0 -0
  17. fmu_manipulation_toolbox-1.9.2b4/fmu_manipulation_toolbox/resources/linux64/container.so +0 -0
  18. fmu_manipulation_toolbox-1.9.2b4/fmu_manipulation_toolbox/resources/win64/client_sm.dll +0 -0
  19. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/LICENSE.txt +0 -0
  20. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/README.md +0 -0
  21. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/__init__.py +0 -0
  22. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/__main__.py +0 -0
  23. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/assembly.py +0 -0
  24. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/checker.py +0 -0
  25. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/cli/__init__.py +0 -0
  26. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/cli/fmucontainer.py +0 -0
  27. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/cli/fmusplit.py +0 -0
  28. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/cli/fmutool.py +0 -0
  29. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/cli/utils.py +0 -0
  30. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/help.py +0 -0
  31. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/ls.py +0 -0
  32. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/operations.py +0 -0
  33. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/remoting.py +0 -0
  34. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/checkbox-checked-disabled.png +0 -0
  35. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/checkbox-checked-hover.png +0 -0
  36. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/checkbox-checked.png +0 -0
  37. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/checkbox-unchecked-disabled.png +0 -0
  38. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/checkbox-unchecked-hover.png +0 -0
  39. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/checkbox-unchecked.png +0 -0
  40. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/container.png +0 -0
  41. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/drop_fmu.png +0 -0
  42. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2Annotation.xsd +0 -0
  43. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2AttributeGroups.xsd +0 -0
  44. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2ModelDescription.xsd +0 -0
  45. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2ScalarVariable.xsd +0 -0
  46. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2Type.xsd +0 -0
  47. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2Unit.xsd +0 -0
  48. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-2.0/fmi2VariableDependency.xsd +0 -0
  49. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Annotation.xsd +0 -0
  50. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3AttributeGroups.xsd +0 -0
  51. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3BuildDescription.xsd +0 -0
  52. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3InterfaceType.xsd +0 -0
  53. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3LayeredStandardManifest.xsd +0 -0
  54. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3ModelDescription.xsd +0 -0
  55. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Terminal.xsd +0 -0
  56. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3TerminalsAndIcons.xsd +0 -0
  57. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Type.xsd +0 -0
  58. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Unit.xsd +0 -0
  59. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Variable.xsd +0 -0
  60. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmi-3.0/fmi3VariableDependency.xsd +0 -0
  61. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmu.png +0 -0
  62. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/fmu_manipulation_toolbox.png +0 -0
  63. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/help.png +0 -0
  64. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/icon-round.png +0 -0
  65. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/icon.png +0 -0
  66. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/icon_fmu.png +0 -0
  67. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/license.txt +0 -0
  68. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/linux32/server_sm +0 -0
  69. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/linux64/server_sm +0 -0
  70. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/mask.png +0 -0
  71. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/resources/model.png +0 -0
  72. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/split.py +0 -0
  73. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/terminals.py +0 -0
  74. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox/version.py +0 -0
  75. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox.egg-info/SOURCES.txt +0 -0
  76. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox.egg-info/dependency_links.txt +0 -0
  77. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox.egg-info/entry_points.txt +0 -0
  78. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox.egg-info/requires.txt +0 -0
  79. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/fmu_manipulation_toolbox.egg-info/top_level.txt +0 -0
  80. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/setup.cfg +0 -0
  81. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/setup.py +0 -0
  82. {fmu_manipulation_toolbox-1.9.2b4 → fmu_manipulation_toolbox-1.9.2rc1}/tests/test_suite.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmu_manipulation_toolbox
3
- Version: 1.9.2b4
3
+ Version: 1.9.2rc1
4
4
  Summary: FMU Manipulation Toolbox is a python package which helps to analyze, modify or combine Functional Mock-up Units (FMUs) without recompilation.
5
5
  Home-page: https://github.com/grouperenault/fmu_manipulation_toolbox/
6
6
  Author: Nicolas.LAURENT@Renault.com
@@ -15,6 +15,20 @@ class DatalogConverter:
15
15
  def __init__(self, cvs_filename: Union[Path, str]):
16
16
  self.csv_filename = Path(cvs_filename)
17
17
  self.pcap_filename = self.csv_filename.with_suffix(".pcap")
18
+ self.opcode_name = {
19
+ "CAN": {
20
+ 0x0001: "FMI3_LS_BUS_OP_FORMAT_ERROR",
21
+ 0x0010: "FMI3_LS_BUS_CAN_OP_CAN_TRANSMIT",
22
+ 0x0011: "FMI3_LS_BUS_CAN_OP_CANFD_TRANSMIT",
23
+ 0x0012: "FMI3_LS_BUS_CAN_OP_CANXL_TRANSMIT",
24
+ 0x0020: "FMI3_LS_BUS_CAN_OP_CONFIRM",
25
+ 0x0030: "FMI3_LS_BUS_CAN_OP_ARBITRATION_LOST",
26
+ 0x0031: "FMI3_LS_BUS_CAN_OP_BUS_ERROR",
27
+ 0x0040: "FMI3_LS_BUS_CAN_OP_CONFIGURATION",
28
+ 0x0041: "FMI3_LS_BUS_CAN_OP_STATUS",
29
+ 0x0042: "FMI3_LS_BUS_CAN_OP_WAKEUP"
30
+ }
31
+ }
18
32
 
19
33
  def open_pcap(self):
20
34
  logger.info(f"Creating PCAP file '{self.pcap_filename}'...")
@@ -31,7 +45,10 @@ class DatalogConverter:
31
45
  # captured from each packet.
32
46
 
33
47
  file.write(int(227).to_bytes(4, byteorder="big")) # link type. his field is defined in the Section
34
- # # 8.1 IANA registry.
48
+ # 8.1 IANA registry.
49
+ # 190: Reserved for Controller Area Network (CAN) v. 2.0B packets
50
+ # 210: Reserved for FlexRay automotive bus
51
+ # 227: CAN (Controller Area Network) frames, with a pseudo-header followed by the frame payload.
35
52
  return file
36
53
 
37
54
  def open_csv(self):
@@ -42,15 +59,21 @@ class DatalogConverter:
42
59
  def decode_hexstring(self, hex_string: bytes, time_s, time_us):
43
60
  opcode = int.from_bytes(hex_string[0:4], byteorder="little")
44
61
  length = int.from_bytes(hex_string[4:8], byteorder="little")
45
- can_id = int.from_bytes(hex_string[8:12], byteorder="little")
62
+
46
63
  if opcode == 0x10: # TRANSMIT
64
+ can_id = int.from_bytes(hex_string[8:12], byteorder="little")
47
65
  rtr = int.from_bytes(hex_string[13:14], byteorder="little")
48
66
  ide = int.from_bytes(hex_string[12:13], byteorder="little")
49
67
  data_length = int.from_bytes(hex_string[14:16], byteorder="little")
50
68
  raw_data = hex_string[16:]
51
69
 
70
+ raw_str = ""
71
+ for i, b in enumerate(raw_data):
72
+ raw_str += f"{i}:{b:d} "
73
+ logger.info(f"time={time_s}.{time_us:06d} data length {data_length} with data {raw_str}")
74
+
52
75
  logger.debug(f"time={time_s}.{time_us:06d} OP=0x{opcode:04X} len={length} {data_length} id={can_id}"
53
- f" ide={ide} rtr={rtr} len={data_length} {raw_data}")
76
+ f" ide={ide} rtr={rtr} len={data_length} raw_len={len(raw_data)} {raw_str}")
54
77
 
55
78
  # TimeStamp
56
79
  self.pcapfile.write(time_s.to_bytes(4, byteorder="big"))
@@ -76,7 +99,14 @@ class DatalogConverter:
76
99
  self.pcapfile.write(dlc.to_bytes(1, byteorder="big"))
77
100
 
78
101
  # PAYLOAD
79
- self.pcapfile.write(raw_data)
102
+ self.pcapfile.write(raw_data[0:data_length])
103
+
104
+ elif opcode == 0x40:
105
+ parameter = int.from_bytes(hex_string[8:9], byteorder="little")
106
+ logger.debug(f"Config parameter: {parameter}")
107
+ if (parameter == 1):
108
+ baudrate = int.from_bytes(hex_string[9:13], byteorder="little")
109
+ logger.debug(f"baudrate parameter: {baudrate}")
80
110
 
81
111
  def convert(self):
82
112
  with self.open_csv() as self.csvfile, self.open_pcap() as self.pcapfile:
@@ -602,9 +602,13 @@ class FMUContainer:
602
602
  canHandleVariableCommunicationStepSize="true"
603
603
  canBeInstantiatedOnlyOncePerProcess="{only_once}"
604
604
  canNotUseMemoryManagementFunctions="true"
605
- canGetAndSetFMUstate="false"
606
- canSerializeFMUstate="false"
607
- providesDirectionalDerivative="false"
605
+ canGetAndSetFMUState="false"
606
+ canSerializeFMUState="false"
607
+ providesDirectionalDerivatives="false"
608
+ providesAdjointDerivatives="false"
609
+ providesPerElementDependencies="false"
610
+ providesEvaluateDiscreteStates="false"
611
+ hasEventMode="true"
608
612
  needsExecutionTool="{execution_tool}">
609
613
  </CoSimulation>
610
614
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmu_manipulation_toolbox
3
- Version: 1.9.2b4
3
+ Version: 1.9.2rc1
4
4
  Summary: FMU Manipulation Toolbox is a python package which helps to analyze, modify or combine Functional Mock-up Units (FMUs) without recompilation.
5
5
  Home-page: https://github.com/grouperenault/fmu_manipulation_toolbox/
6
6
  Author: Nicolas.LAURENT@Renault.com