fmu-manipulation-toolbox 1.9.2b4__py3-none-any.whl → 1.9.2rc1__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.
@@ -1 +1 @@
1
- 'V1.9.2b4'
1
+ 'V1.9.2rc1'
@@ -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
@@ -1,9 +1,9 @@
1
1
  fmu_manipulation_toolbox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  fmu_manipulation_toolbox/__main__.py,sha256=g0ZhVsMiAs5KnhyVNwTe01N2PQjAg7F9YCnXHZB-HwA,356
3
- fmu_manipulation_toolbox/__version__.py,sha256=Gbo0eZjyM2y_SKH83AQYtGZD5IHxJiZo3K7RDSiIIyA,11
3
+ fmu_manipulation_toolbox/__version__.py,sha256=fTyJ9LrsqumarkNI8x2J8OaXjD3NU3bBSG-iZvTnuKM,12
4
4
  fmu_manipulation_toolbox/assembly.py,sha256=QmFihza_I0hK0Ia6tWbjdZeoREhveLrv3d7ERrBUaDk,27217
5
5
  fmu_manipulation_toolbox/checker.py,sha256=Dh47b3blibCWjHCeZ61Y_w9Ug0PWvEuSiemZtp-llQA,3141
6
- fmu_manipulation_toolbox/container.py,sha256=b_F6jjgnn9aWm54265KTennjslcj9YUFChUkQB1w9Kk,57017
6
+ fmu_manipulation_toolbox/container.py,sha256=DaE4GQjKPTGg2zp4CXGevFjgW9B8dFCVQWh08IRXG5w,57167
7
7
  fmu_manipulation_toolbox/help.py,sha256=j8xmnCrwQpaW-SZ8hSqA1dlTXgaqzQWc4Yr3RH_oqck,6012
8
8
  fmu_manipulation_toolbox/ls.py,sha256=wmyoKrvDLXpL-PFz6cUhLLqxDMD5E9L_P4KswWpQHsk,975
9
9
  fmu_manipulation_toolbox/operations.py,sha256=y3QDMiLaG1TUhIQ4r_onWp1kGm8QZaFfTOdQr0oC7_A,21177
@@ -12,7 +12,7 @@ fmu_manipulation_toolbox/split.py,sha256=6D99SAGNu4B3PSaSsliWc6Bb5aSBZMxL8t0v8TJ
12
12
  fmu_manipulation_toolbox/terminals.py,sha256=mGGS4tdE6cJuz-2zvwc7drpmT0QJ7YPe8ENw2UGlEHA,5062
13
13
  fmu_manipulation_toolbox/version.py,sha256=L26Cc3PH97SOa4G9yiYnafrdolK0G_DCQZZTvv3YXqI,392
14
14
  fmu_manipulation_toolbox/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- fmu_manipulation_toolbox/cli/datalog2pcap.py,sha256=A0KNHVTzEvzKaT5HG0zgHVRC5G1bXoIbfLRXuvOsE-U,6080
15
+ fmu_manipulation_toolbox/cli/datalog2pcap.py,sha256=gdqScDLNu9jxl_bAld7Qf9GEEs8XePcIpkVJ4p87hlM,7689
16
16
  fmu_manipulation_toolbox/cli/fmucontainer.py,sha256=ZLoC8QMVBVG2S3cdNthMIQ0gYIU9WUbYj8Aj2vxzyfs,5338
17
17
  fmu_manipulation_toolbox/cli/fmusplit.py,sha256=sLzdxiC4R5hJYJo9F2TZOMrJOHcadqCvUo9KoCjUaxE,1773
18
18
  fmu_manipulation_toolbox/cli/fmutool.py,sha256=E-CCymksBwGFlS3-zJ7DIDA8xIdp_synsxMDYXst8dc,6186
@@ -34,7 +34,7 @@ fmu_manipulation_toolbox/resources/icon_fmu.png,sha256=EuygB2xcoM2WAfKKdyKG_UvTL
34
34
  fmu_manipulation_toolbox/resources/license.txt,sha256=5ODuU8g8pIkK-NMWXu_rjZ6k7gM7b-N2rmg87-2Kmqw,1583
35
35
  fmu_manipulation_toolbox/resources/mask.png,sha256=px1U4hQGL0AmZ4BQPknOVREpMpTSejbah3ntkpqAzFA,3008
36
36
  fmu_manipulation_toolbox/resources/model.png,sha256=EAf_HnZJe8zYGZygerG1MMt2U-tMMZlifzXPj4_iORA,208788
37
- fmu_manipulation_toolbox/resources/darwin64/container.dylib,sha256=BEFw77tHDaZ-D_LiCDbYF7aefPJ1z0n_G-XjGU2oN0Q,230704
37
+ fmu_manipulation_toolbox/resources/darwin64/container.dylib,sha256=px6TxvPDKZBakjHE183KMoyiADA8a3_-Sh1LbYrvqLc,230704
38
38
  fmu_manipulation_toolbox/resources/fmi-2.0/fmi2Annotation.xsd,sha256=OGfyJtaJntKypX5KDpuZ-nV1oYLZ6HV16pkpKOmYox4,2731
39
39
  fmu_manipulation_toolbox/resources/fmi-2.0/fmi2AttributeGroups.xsd,sha256=HwyV7LBse-PQSv4z1xjmtzPU3Hjnv4mluq9YdSBNHMQ,3704
40
40
  fmu_manipulation_toolbox/resources/fmi-2.0/fmi2ModelDescription.xsd,sha256=JM4j_9q-pc40XYHb28jfT3iV3aYM5JLqD5aRjO72K1E,18939
@@ -54,19 +54,19 @@ fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Type.xsd,sha256=TaHRoUBIFtmdEwBKB
54
54
  fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Unit.xsd,sha256=CK_F2t5LfyQ6eSNJ8soTFMVK9DU8vD2WiMi2MQvjB0g,3746
55
55
  fmu_manipulation_toolbox/resources/fmi-3.0/fmi3Variable.xsd,sha256=3YU-3q1-c-namz7sMe5cxnmOVOJsRSmfWR02PKv3xaU,19171
56
56
  fmu_manipulation_toolbox/resources/fmi-3.0/fmi3VariableDependency.xsd,sha256=YQSBwXt4IsDlyegY8bX-qQHGSfE5TipTPfo2g2yqq1c,3082
57
- fmu_manipulation_toolbox/resources/linux32/client_sm.so,sha256=hkRPy649TVuT3lcae-BMXUZH6JVwTNiejv_S-FKmZZU,34664
57
+ fmu_manipulation_toolbox/resources/linux32/client_sm.so,sha256=bG2SLZpGVEXXFyDlqEUaFwhpcHvuyGUEBOtLxmfY5_4,34664
58
58
  fmu_manipulation_toolbox/resources/linux32/server_sm,sha256=gzKU0BTeaRkvhTMQtHHj3K8uYFyEdyGGn_mZy_jG9xo,21304
59
- fmu_manipulation_toolbox/resources/linux64/client_sm.so,sha256=VTg20ibYrtPCFj71x2ciwk5Trotr39DYu74ZpH5Z_9A,32464
60
- fmu_manipulation_toolbox/resources/linux64/container.so,sha256=Qwmdg6IFtmbzNgGXPPnmacVAfHFgS1sh0dJjn4VW2mI,194192
59
+ fmu_manipulation_toolbox/resources/linux64/client_sm.so,sha256=1hUExrfYF0nuCiHMxXS1SfggkcxKJVh2X8eIIsT9mTk,32464
60
+ fmu_manipulation_toolbox/resources/linux64/container.so,sha256=432wFrnzOA-AwvX-Fq4WDJJkYSL8U3fCyZW5-LPH-mQ,194120
61
61
  fmu_manipulation_toolbox/resources/linux64/server_sm,sha256=MZn6vITN2qpBHYt_RaK2VnFFp00hk8fTALBHmXPtLwc,22608
62
- fmu_manipulation_toolbox/resources/win32/client_sm.dll,sha256=6M3HnC-Yo-6K30Vz7cM2v-WmsldJrQIW1kitE7MZw2I,17920
63
- fmu_manipulation_toolbox/resources/win32/server_sm.exe,sha256=sGBilm9IUvn7ZyRE_TgElP6Eod7WykZ-alqQ9U2OYC8,15360
64
- fmu_manipulation_toolbox/resources/win64/client_sm.dll,sha256=uuZhxRU8Vhgc7coHPGePcnb7Ck3F4NWkxFzmBIJCzxs,20992
65
- fmu_manipulation_toolbox/resources/win64/container.dll,sha256=526FLsn7DbNnRioLc3YayPBqX_IRpgKNzfAfG1GqrTg,153088
66
- fmu_manipulation_toolbox/resources/win64/server_sm.exe,sha256=UamakjF0Tpd6l2SDvgwBtDIS24kO8JlI6wDv2GKwNCM,18432
67
- fmu_manipulation_toolbox-1.9.2b4.dist-info/licenses/LICENSE.txt,sha256=0Q8zhEwTu1K-MDmg8Khay5j56BIz2VLI6RcijIFbU_g,1255
68
- fmu_manipulation_toolbox-1.9.2b4.dist-info/METADATA,sha256=6QSkWxWMMoZEpMFuvOgIlzBuv7AFrgwRFp0QcpxhIK8,1899
69
- fmu_manipulation_toolbox-1.9.2b4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
70
- fmu_manipulation_toolbox-1.9.2b4.dist-info/entry_points.txt,sha256=VOWf1jbG1O-2JrqXOvSoHRRfdH3RNONvz-2RIPHNX0s,338
71
- fmu_manipulation_toolbox-1.9.2b4.dist-info/top_level.txt,sha256=9D_h-5BMjSqf9z-XFkbJL_bMppR2XNYW3WNuPkXou0k,25
72
- fmu_manipulation_toolbox-1.9.2b4.dist-info/RECORD,,
62
+ fmu_manipulation_toolbox/resources/win32/client_sm.dll,sha256=o1fd4agl_I_weOD_XaA-MNtgOxoj8JWTeqg_dcBmBDQ,17920
63
+ fmu_manipulation_toolbox/resources/win32/server_sm.exe,sha256=HGU6d1wohheSOI6TnojomLRDlXsl1kpbh1LKvDd_sBM,15360
64
+ fmu_manipulation_toolbox/resources/win64/client_sm.dll,sha256=bs8CsHa26F0sry-bPRz1X1ETTIS3gexm1-fkTmPftRg,20992
65
+ fmu_manipulation_toolbox/resources/win64/container.dll,sha256=NvBPdeFGUjeS4RdESOXG1kiFJjkDY3qvpXcSF8Lr2Kc,153088
66
+ fmu_manipulation_toolbox/resources/win64/server_sm.exe,sha256=q-t1lCsree15azU0uDbBAEfooxSqSzNszQiZqikpam4,18432
67
+ fmu_manipulation_toolbox-1.9.2rc1.dist-info/licenses/LICENSE.txt,sha256=0Q8zhEwTu1K-MDmg8Khay5j56BIz2VLI6RcijIFbU_g,1255
68
+ fmu_manipulation_toolbox-1.9.2rc1.dist-info/METADATA,sha256=OXL37xMzbMCFOj7LRwgx_G6UtuRcNk__WLCVkHBzwcw,1900
69
+ fmu_manipulation_toolbox-1.9.2rc1.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
70
+ fmu_manipulation_toolbox-1.9.2rc1.dist-info/entry_points.txt,sha256=VOWf1jbG1O-2JrqXOvSoHRRfdH3RNONvz-2RIPHNX0s,338
71
+ fmu_manipulation_toolbox-1.9.2rc1.dist-info/top_level.txt,sha256=9D_h-5BMjSqf9z-XFkbJL_bMppR2XNYW3WNuPkXou0k,25
72
+ fmu_manipulation_toolbox-1.9.2rc1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5