Closed ClemensLinnhoff closed 1 year ago
@MarcelKe could your check the public logging functionality with CarMaker?
@MarcelKe could your check the public logging functionality with CarMaker?
Public logging is yet not working. The variable names above have to be adjusted in case of the OSMP.h:
In case of the MySensorModel.h it should not be able to find the required variables, since they are private variables of the OSMP class. I quick-fixed it by adding the required variables as private variables to the MySensorModel class as well and defining them with a copy of the corresponding OSMP variables during model initialization:
In this way, there is of course some duplicate code in the template and one has to hand over three parameters to the model initialization just for logging. A nicer alternative might be to decouple the OSMP interface from the logger or to forego public logging for the sensor model. What do you think?
One minor remark: I also recognized that the OSMPVERSION is not yet defined in the uppermost CMakeLists. Hence, it is not automatically set in the resulting ModelDescribtion.xml - I just recognized because Carmaker is checking for the OSMP version of the FMU.
@MarcelKe Could you commit your fixes here? Then I can get a better understanding of what's necessary to enable public logging.
One minor remark: I also recognized that the OSMPVERSION is not yet defined in the uppermost CMakeLists. Hence, it is not automatically set in the resulting ModelDescribtion.xml - I just recognized because Carmaker is checking for the OSMP version of the FMU.
You are right. Although I am not sure, if the OSMP version is even set correctly, when the variable is defined. Which one does carmaker need? Is it this line?
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp version="@OSMPVERSION@" osi-version="@OSIVERSION@"/></Tool>
Because currently the OSMPVERSION is also set as version
directly under "<fmiModelDescription" but I think this should be the version of the model itself, right?
I added a commit with this differentiation.
@MarcelKe Could you commit your fixes here? Then I can get a better understanding of what's necessary to enable public logging.
@ClemensLinnhoff unfortunately, I don't have permission to push my public logging fix branch (I checked it out from the logging-fix)
One minor remark: I also recognized that the OSMPVERSION is not yet defined in the uppermost CMakeLists. Hence, it is not automatically set in the resulting ModelDescribtion.xml - I just recognized because Carmaker is checking for the OSMP version of the FMU.
You are right. Although I am not sure, if the OSMP version is even set correctly, when the variable is defined. Which one does carmaker need? Is it this line?
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp version="@OSMPVERSION@" osi-version="@OSIVERSION@"/></Tool>
Because currently the OSMPVERSION is also set as
version
directly under "<fmiModelDescription" but I think this should be the version of the model itself, right?I added a commit with this differentiation.
@ClemensLinnhoff Carmaker expects 1.0.0 - If I set the OSMPVERSION variable to it within the CmakeLists it was transferred correctly to the final modelDescription.xml and accepted by Carmaker. I am not quite sure which line Carmaker actually reads, since I have yet only changed it globally - But I would also expect the second one. I agree - For me it would also make more sense if the "version" is utilized for the model version.
@MarcelKe Could you commit your fixes here? Then I can get a better understanding of what's necessary to enable public logging.
@ClemensLinnhoff unfortunately, I don't have permission to push my public logging fix branch (I checked it out from the logging-fix)
You should have access now. I added you to the contributors teams.
@MarcelKe Could you commit your fixes here? Then I can get a better understanding of what's necessary to enable public logging.
@ClemensLinnhoff unfortunately, I don't have permission to push my public logging fix branch (I checked it out from the logging-fix)
You should have access now. I added you to the contributors teams.
Thank you, I pushed the branch.
One minor remark: I also recognized that the OSMPVERSION is not yet defined in the uppermost CMakeLists. Hence, it is not automatically set in the resulting ModelDescribtion.xml - I just recognized because Carmaker is checking for the OSMP version of the FMU.
You are right. Although I am not sure, if the OSMP version is even set correctly, when the variable is defined. Which one does carmaker need? Is it this line?
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp version="@OSMPVERSION@" osi-version="@OSIVERSION@"/></Tool>
Because currently the OSMPVERSION is also set as
version
directly under "<fmiModelDescription" but I think this should be the version of the model itself, right? I added a commit with this differentiation.@ClemensLinnhoff Carmaker expects 1.0.0 - If I set the OSMPVERSION variable to it within the CmakeLists it was transferred correctly to the final modelDescription.xml and accepted by Carmaker. I am not quite sure which line Carmaker actually reads, since I have yet only changed it globally - But I would also expect the second one. I agree - For me it would also make more sense if the "version" is utilized for the model version.
I tested it quickly - Carmaker is as expected checking only the above mentioned line in the xml, therefore the "version" specifier can be used for the model version as planned
I merged your branch into this one @MarcelKe. Is this now ready to be merged into main?
Some files did not pass the configured checks!
Have any feedback or feature suggestions? Share it here.
Reference to a related issue in the repository
69
Add a description Fixes private logging
Take this checklist as orientation for yourself, if this PR is ready for Maintainer Review