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

Fix #17, Use real message types in tables #35

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

skliper
Copy link
Contributor

@skliper skliper commented Jun 7, 2022

Checklist (Please check before submitting)

Describe the contribution

Note so far this is just partial/example, is not backwards compatible with Caelum framework and has a dependency on nasa/cFE#2115. Marking as draft for now.

Testing performed
Ran with the cFE changes, confirmed noops were sent/received using the following cmds:

./cmdUtil -ELE -C0 -A0xAA  # SC HK cycle so table wil get started
./cmdUtil -ELE -C0 -A0xAB  # 1 Hz wakeup repeated as needed to trigger RTS manually

Expected behavior changes
Behavior is the same, just makes table maintenance easier and slightly more portable across different endian systems and w/ different header implementations.

System(s) tested on

  • Hardware: i5/wsl
  • OS: Ubuntu 18.04
  • Versions: Bundle main + this commit/repo and additions to build/run SC as well as the commit that adds the macro header macro

Additional context
Depends on cFE update nasa/cFE#2115

Third party code
None

Contributor Info - All information REQUIRED for consideration of pull request
Jacob Hageman - NASA/GSFC

@astrogeco
Copy link
Contributor

CCB:2022-06-08 APPROVED

fsw/tables/sc_rts001.c Fixed Show fixed Hide fixed
fsw/tables/sc_rts001.c Fixed Show resolved Hide resolved
@skliper
Copy link
Contributor Author

skliper commented Nov 9, 2022

Marking as draft for now until #62 is merged which will simplify includes

@skliper
Copy link
Contributor Author

skliper commented Nov 10, 2022

To test ATS:
Table Load: /cf/sc_ats1.tbl
Table Validate: ActiveTableFlag = 0; TableName = SC.ATS_TBL1
Set Time: 1000000, 0
Table Activate: SC.ATS_TBL1
SC ATS1 Start: ./cmdUtil -ELE -A0xA9 -C2 --int16=1 --int16=0
Then send hk and 1hz cmds above (or add to scheduler)

Output should look something like this:

EVS Port1 66/1/CFE_TBL 12: Successful load of '/cf/sc_ats1.tbl' into 'SC.ATS_TBL1' working buffer
.EVS Port1 66/1/SC 103: Verify ATS Table: command count = 4, byte count = 72
EVS Port1 66/1/CFE_TBL 36: SC validation successful for Inactive 'SC.ATS_TBL1'
..EVS Port1 66/1/CFE_TIME 12: Set Time -- secs = 1000000, usecs = 0, ssecs = 0x0
EVS Port1 66/1/CFE_TBL 37: SC Successfully Updated 'SC.ATS_TBL1'
.EVS Port1 66/1/SC 23: ATS A Execution Started
....EVS Port1 66/1/SC 52: No-op command. Version 3.1.99.0
..EVS Port1 66/1/SC 73: RTS Number 001 Started
EVS Port1 66/1/SC 52: No-op command. Version 3.1.99.0
.EVS Port1 66/1/SC 86: RTS 001 Execution Completed
EVS Port1 66/1/SC 73: RTS Number 002 Started
.EVS Port1 66/1/SC 52: No-op command. Version 3.1.99.0
EVS Port1 66/1/SC 52: No-op command. Version 3.1.99.0
.EVS Port1 66/1/SC 86: RTS 002 Execution Completed
EVS Port1 66/1/SC 52: No-op command. Version 3.1.99.0
.......EVS Port1 66/1/SC 87: ATS A Execution Completed

@skliper skliper changed the title Part #17, Use real message types in tables Fix #17, Use real message types in tables Nov 10, 2022
#define CMD3_TIME (TEST_TIME + 40)
#define CMD4_TIME (TEST_TIME + 100)
/* Checksum for each sample command */
#ifndef SC_NOOP_CKSUM

Check notice

Code scanning / CodeQL-coding-standard

Conditional compilation

Use of conditional compilation must be kept to a minimum.
#ifndef SC_NOOP_CKSUM
#define SC_NOOP_CKSUM (0x8F)
#endif
#ifndef SC_ENABLE_RTS1_CKSUM

Check notice

Code scanning / CodeQL-coding-standard

Conditional compilation

Use of conditional compilation must be kept to a minimum.
#ifndef SC_ENABLE_RTS1_CKSUM
#define SC_ENABLE_RTS1_CKSUM (0x8D)
#endif
#ifndef SC_START_RTS1_CKSUM

Check notice

Code scanning / CodeQL-coding-standard

Conditional compilation

Use of conditional compilation must be kept to a minimum.
#ifndef SC_START_RTS1_CKSUM
#define SC_START_RTS1_CKSUM (0x8E)
#endif
#ifndef SC_RESET_COUNTERS_CKSUM

Check notice

Code scanning / CodeQL-coding-standard

Conditional compilation

Use of conditional compilation must be kept to a minimum.
#define CMD2_TIME 5
#define CMD3_TIME 5
/* Checksum for each sample command */
#ifndef SC_NOOP_CKSUM

Check notice

Code scanning / CodeQL-coding-standard

Conditional compilation

Use of conditional compilation must be kept to a minimum.
#ifndef SC_NOOP_CKSUM
#define SC_NOOP_CKSUM (0x8F)
#endif
#ifndef SC_ENABLE_RTS2_CKSUM

Check notice

Code scanning / CodeQL-coding-standard

Conditional compilation

Use of conditional compilation must be kept to a minimum.
#ifndef SC_ENABLE_RTS2_CKSUM
#define SC_ENABLE_RTS2_CKSUM (0x8E)
#endif
#ifndef SC_START_RTS2_CKSUM

Check notice

Code scanning / CodeQL-coding-standard

Conditional compilation

Use of conditional compilation must be kept to a minimum.
#define CMD2_TIME 5
#define CMD3_TIME 7
/* Checksum for each sample command */
#ifndef SC_NOOP_CKSUM

Check notice

Code scanning / CodeQL-coding-standard

Conditional compilation

Use of conditional compilation must be kept to a minimum.
fsw/tables/sc_ats1.c Fixed Show fixed Hide fixed
fsw/tables/sc_rts002.c Fixed Show fixed Hide fixed
@dmknutsen dmknutsen added this to the Draco milestone Dec 20, 2022
@skliper
Copy link
Contributor Author

skliper commented Dec 20, 2022

This is good to go, only CI failures are unrelated and documented in:

@skliper skliper marked this pull request as ready for review January 3, 2023 19:25
@dzbaker dzbaker removed the CCB:Ready label Jan 5, 2023
@dzbaker dzbaker merged commit c65b280 into nasa:main Jan 5, 2023
@skliper skliper deleted the fix17-tbl_msg_struct branch April 1, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use real headers and structures to define tables
5 participants