openMSL / sl-1-0-sensor-model-repository-template

Template repository: Clone and build your ASAM OSI sensor model.
Mozilla Public License 2.0
8 stars 2 forks source link

Align HelloWorldSensor with changes in OSMPDummySensor #27

Closed ClemensLinnhoff closed 1 year ago

ClemensLinnhoff commented 1 year ago

Reference to a related issue in the repository

26

Add a description Align the HelloWorldSensor with the changes in the OSMPDummySensor regarding coordinate transformations

Take this checklist as orientation for yourself, if this PR is ready for Maintainer Review

github-actions[bot] commented 1 year ago

Cpp-Linter Report :warning:

Some files did not pass the configured checks!

clang-tidy reports: 22 concern(s) - src/OSMP.cpp /src/OSMP.cpp:60:5: warning: [cppcoreguidelines-pro-type-member-init] > uninitialized record type: 'myaddr' ```cpp union Addrconv ^ ``` /src/OSMP.cpp:69:12: warning: [cppcoreguidelines-pro-type-union-access] > do not access members of unions; use (boost::)variant instead ```cpp myaddr.base.lo = lo; ^ ``` /src/OSMP.cpp:70:12: warning: [cppcoreguidelines-pro-type-union-access] > do not access members of unions; use (boost::)variant instead ```cpp myaddr.base.hi = hi; ^ ``` /src/OSMP.cpp:71:12: warning: [cppcoreguidelines-pro-type-reinterpret-cast] > do not use reinterpret_cast ```cpp return reinterpret_cast(myaddr.address); ^ ``` /src/OSMP.cpp:71:43: warning: [cppcoreguidelines-pro-type-union-access] > do not access members of unions; use (boost::)variant instead ```cpp return reinterpret_cast(myaddr.address); ^ ``` /src/OSMP.cpp:82:5: warning: [cppcoreguidelines-pro-type-member-init] > uninitialized record type: 'myaddr' ```cpp union Addrconv ^ ``` /src/OSMP.cpp:91:12: warning: [cppcoreguidelines-pro-type-union-access] > do not access members of unions; use (boost::)variant instead ```cpp myaddr.address = reinterpret_cast(ptr); ^ ``` /src/OSMP.cpp:91:22: warning: [cppcoreguidelines-pro-type-reinterpret-cast] > do not use reinterpret_cast ```cpp myaddr.address = reinterpret_cast(ptr); ^ ``` /src/OSMP.cpp:92:17: warning: [cppcoreguidelines-pro-type-union-access] > do not access members of unions; use (boost::)variant instead ```cpp hi = myaddr.base.hi; ^ ``` /src/OSMP.cpp:93:17: warning: [cppcoreguidelines-pro-type-union-access] > do not access members of unions; use (boost::)variant instead ```cpp lo = myaddr.base.lo; ^ ``` /src/OSMP.cpp:231:18: warning: [readability-convert-member-functions-to-static] > method 'DoStart' can be made static ```cpp fmi2Status OSMP::DoStart(fmi2Boolean tolerance_defined, fmi2Real tolerance, fmi2Real start_time, fmi2Boolean stop_time_defined, fmi2Real stop_time) ^ ``` /src/OSMP.cpp:236:18: warning: [readability-convert-member-functions-to-static] > method 'DoEnterInitializationMode' can be made static ```cpp fmi2Status OSMP::DoEnterInitializationMode() ^ ``` /src/OSMP.cpp:295:18: warning: [readability-convert-member-functions-to-static] > method 'DoTerm' can be made static ```cpp fmi2Status OSMP::DoTerm() ^ ``` /src/OSMP.cpp:306:1: warning: [cppcoreguidelines-pro-type-member-init] > constructor does not initialize these fields: boolean_vars_, integer_vars_, real_vars_, my_sensor_model_ ```cpp OSMP::OSMP(fmi2String theinstance_name, ^ ``` /src/OSMP.cpp:466:24: warning: [cppcoreguidelines-pro-bounds-constant-array-index] > do not use array subscript when the index is not an integer constant expression ```cpp value[i] = real_vars_[vr[i]]; ^ ``` /src/OSMP.cpp:490:24: warning: [cppcoreguidelines-pro-bounds-constant-array-index] > do not use array subscript when the index is not an integer constant expression ```cpp value[i] = integer_vars_[vr[i]]; ^ ``` /src/OSMP.cpp:507:24: warning: [cppcoreguidelines-pro-bounds-constant-array-index] > do not use array subscript when the index is not an integer constant expression ```cpp value[i] = boolean_vars_[vr[i]]; ^ ``` /src/OSMP.cpp:524:24: warning: [cppcoreguidelines-pro-bounds-constant-array-index] > do not use array subscript when the index is not an integer constant expression ```cpp value[i] = string_vars_[vr[i]].c_str(); ^ ``` /src/OSMP.cpp:541:13: warning: [cppcoreguidelines-pro-bounds-constant-array-index] > do not use array subscript when the index is not an integer constant expression ```cpp real_vars_[vr[i]] = value[i]; ^ ``` /src/OSMP.cpp:558:13: warning: [cppcoreguidelines-pro-bounds-constant-array-index] > do not use array subscript when the index is not an integer constant expression ```cpp integer_vars_[vr[i]] = value[i]; ^ ``` /src/OSMP.cpp:575:13: warning: [cppcoreguidelines-pro-bounds-constant-array-index] > do not use array subscript when the index is not an integer constant expression ```cpp boolean_vars_[vr[i]] = value[i]; ^ ``` /src/OSMP.cpp:592:13: warning: [cppcoreguidelines-pro-bounds-constant-array-index] > do not use array subscript when the index is not an integer constant expression ```cpp string_vars_[vr[i]] = value[i]; ^ ```

Have any feedback or feature suggestions? Share it here.