Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trick 19.5.1 ICG drops class parameters that have invalid format for smart comment from inclusion into S_sie.resource file. #1822

Open
miltondean opened this issue Dec 31, 2024 · 1 comment · May be fixed by #1828
Assignees

Comments

@miltondean
Copy link

While processing a header file with Trick 19.5.1, we noticed some inconsistent error processing during ICG processing. In addition, some parameters did not generate any warnings and these parameters were not added to the S_sie.resource file and hence these parameters were not visible to be logged or viewed by trick DR logging and Trick TV. Note that the parameters that generated the warning messages were included in the S_sie.resource file:

    <member units="ohm" type="float" name="Analog_Out_Thermistor_Resistance_Panel3" io_attributes="15" description="sSolarArray: This is the Total Resultant resistance value for the thermistor circuit."/>
    <member units="ohm" type="float" name="ms_root_resistance" io_attributes="15" description="sSolarArray: State current panel hinge resistance."/>
    <member units="1" type="float" name="test_root_resistance" io_attributes="15" description="sSolarArray: State current panel hinge resistance."/>
    <member units="1" type="float" name="test1_root_resistance" io_attributes="15" description="sSolarArray: State current panel hinge resistance."/>
    <member units="1" type="bool" name="mIsInitialized" io_attributes="15" description="SAW Model initialization flag"/>
</class>

Format error was no space between the *io and the units. The attribute ms_root_resistance (line 164) was formatted correctly in this example.

Example code:
163 float ms_panel_resistance; //!< *io(ohm) sSolarArray: State current panel hinge resistance. /
164 float ms_root_resistance; //!< *io (ohm) sSolarArray: State current panel hinge resistance. */
165
166 float test_root_resistance; /
!< *io(--) sSolarArray: State current panel hinge resistance. */
167 float test1_root_resistance; //!< *io(--) sSolarArray: State current panel hinge resistance. */
168 float test2_root_resistance; //!< *io(1) sSolarArray: State current panel hinge resistance. */
169 float test3_root_resistance; //!< *io(degree) sSolarArray: State current panel hinge resistance. */
170 float test4_root_resistance; //!< *io(V) sSolarArray: State current panel hinge resistance. */
171 float test5_root_resistance; //!< *io(degK) sSolarArray: State current panel hinge resistance. */

Generates these messages:
Writing build/home/mwdean/SswDevEM3mSwim_docking/OrionSim/SIMSW/sMech/src/io_sSolarArray.cpp
Warning /home/mwdean/SswDevEM3mSwim_docking/OrionSim/SIMSW/sMech/src/sSolarArray.h:166
Invalid units specification. Changing "*" to "1"
Warning /home/mwdean/SswDevEM3mSwim_docking/OrionSim/SIMSW/sMech/src/sSolarArray.h:166
-- is not a valid trick_io value. Setting to io
Warning /home/mwdean/SswDevEM3mSwim_docking/OrionSim/SIMSW/sMech/src/sSolarArray.h:167
Invalid units specification. Changing "
" to "1"
Warning /home/mwdean/SswDevEM3mSwim_docking/OrionSim/SIMSW/sMech/src/sSolarArray.h:167
-- is not a valid trick_io value. Setting to *io

@hchen99
Copy link
Contributor

hchen99 commented Jan 6, 2025

Thanks for reporting this. Looks like *i(<units>) or *o(<units>) (no space between io spec and units) is treated as *i (<units>) or *o (<units>) (with a space between io spect and units). However, *io(<units>) (no space between io space and units) except *io(--) is treated as **. Will look into this.

@hchen99 hchen99 self-assigned this Jan 9, 2025
@hchen99 hchen99 linked a pull request Jan 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants