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

cFS-GroundSystem Integration candidate: 2021-01-19 #150

Merged
merged 7 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions GroundSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@
# CFS Ground System: Setup and manage the main window
#
class GroundSystem(QMainWindow, Ui_MainWindow):
HDR_VER_1_OFFSET = 0
HDR_VER_2_OFFSET = 4
TLM_HDR_V1_OFFSET = 4
TLM_HDR_V2_OFFSET = 4
CMD_HDR_PRI_V1_OFFSET = 0
CMD_HDR_SEC_V1_OFFSET = 0
CMD_HDR_PRI_V2_OFFSET = 4
CMD_HDR_SEC_V2_OFFSET = 4

#
# Init the class
Expand All @@ -57,10 +61,16 @@ def __init__(self):
self.RoutingService = None
self.alert = QMessageBox()

# set initial defaults
self.sbTlmOffset.setValue(self.TLM_HDR_V1_OFFSET)
self.sbCmdOffsetPri.setValue(self.CMD_HDR_PRI_V1_OFFSET)
self.sbCmdOffsetSec.setValue(self.CMD_HDR_SEC_V1_OFFSET)

self.pushButtonStartTlm.clicked.connect(self.startTlmSystem)
self.pushButtonStartCmd.clicked.connect(self.startCmdSystem)
self.cbTlmHeaderVer.currentIndexChanged.connect(self.setTlmOffset)
self.cbCmdHeaderVer.currentIndexChanged.connect(self.setCmdOffsets)

for sb in (self.sbTlmOffset, self.sbCmdOffsetPri, self.sbCmdOffsetSec):
sb.valueChanged.connect(self.saveOffsets)
# Init lists
Expand Down Expand Up @@ -132,9 +142,9 @@ def setTlmOffset(self):
else:
self.sbTlmOffset.setEnabled(False)
if selectedVer == "1":
self.sbTlmOffset.setValue(self.HDR_VER_1_OFFSET)
self.sbTlmOffset.setValue(self.TLM_HDR_V1_OFFSET)
elif selectedVer == "2":
self.sbTlmOffset.setValue(self.HDR_VER_2_OFFSET)
self.sbTlmOffset.setValue(self.TLM_HDR_V2_OFFSET)

def setCmdOffsets(self):
selectedVer = self.cbCmdHeaderVer.currentText().strip()
Expand All @@ -145,10 +155,11 @@ def setCmdOffsets(self):
self.sbCmdOffsetPri.setEnabled(False)
self.sbCmdOffsetSec.setEnabled(False)
if selectedVer == "1":
self.sbCmdOffsetPri.setValue(self.HDR_VER_1_OFFSET)
self.sbCmdOffsetPri.setValue(self.CMD_HDR_PRI_V1_OFFSET)
self.sbCmdOffsetSec.setValue(self.CMD_HDR_SEC_V1_OFFSET)
elif selectedVer == "2":
self.sbCmdOffsetPri.setValue(self.HDR_VER_2_OFFSET)
self.sbCmdOffsetSec.setValue(self.HDR_VER_1_OFFSET)
self.sbCmdOffsetPri.setValue(self.CMD_HDR_PRI_V2_OFFSET)
self.sbCmdOffsetSec.setValue(self.CMD_HDR_SEC_V2_OFFSET)

def saveOffsets(self):
offsets = bytes((self.sbTlmOffset.value(), self.sbCmdOffsetPri.value(),
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ See [Guide-GroundSystem.md](https://github.com/nasa/cFS-GroundSystem/blob/master

## Version History

### Development Build: 2.2.0-rc1+dev18

- Documentation: Add `Security.md` with instructions to report vulnerabilities
- **Breaking change**, CmdUtil, Rounds header up to match <https://github.com/nasa/cFE/pull/1077>
- **Breaking change**, GUI, Rounds header up to match <https://github.com/nasa/cFE/pull/1077>
- See <https://github.com/nasa/cFS-GroundSystem/pull/150>

### Development Build: 2.2.0-rc1+dev11

- Updated CHeaderParser.py to address specific issues.
Expand Down Expand Up @@ -41,7 +48,7 @@ See [Guide-GroundSystem.md](https://github.com/nasa/cFS-GroundSystem/blob/master
- Change all individual UI elements to table widgets. Update backend code accordingly
- Temporary fix for implicit declaration of endian functions on some systems (RH/CentOs). No build errors on CentOS
- See <https://github.com/nasa/cFS-GroundSystem/pull/107>

### Development Build: 2.1.11

- Default behavior is the same except adds checksum and doesn't actually require fields. Adds all the packet fields, overrides, more supported data types, etc.
Expand Down
15 changes: 15 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Security Policy

## Reporting a Vulnerability

To report a vulnerability for the cFS-GroundSystem subsystem please [submit an issue](https://github.com/nasa/cFS-GroundSystem/issues/new/choose).

For general cFS vulnerabilities please [open a cFS framework issue](https://github.com/nasa/cfs/issues/new/choose) and see our [top-level security policy](https://github.com/nasa/cFS/security/policy).

In either case please use the "Bug Report" template and provide as much information as possible. Apply appropraite labels for each report. For security related reports, tag the issue with the "security" label.

## Additional Support

For additional support, email us at cfs-program@lists.nasa.gov. For help using OSAL and cFS, [subscribe to our mailing list](https://lists.nasa.gov/mailman/listinfo/cfs-community) that includes all the community members/users of the NASA core Flight Software (cFS) product line. The mailing list is used to communicate any information related to the cFS product such as current releases, bug findings and fixes, enhancement requests, community meeting notifications, sending out meeting minutes, etc.

If you wish to report a cybersecurity incident or concern please contact the NASA Security Operations Center either by phone at 1-877-627-2732 or via email address soc@nasa.gov.
3 changes: 3 additions & 0 deletions Subsystems/cmdUtil/cmdUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,9 @@ int main(int argc, char *argv[])
if (cmd.IncludeCFSSec)
startbyte += sizeof(cmd.CFS_CmdSecHdr);

/* Round up to account for padding */
startbyte += startbyte % 8;

if (cmd.Verbose)
{
printf("Payload start byte = %u\n", startbyte);
Expand Down
13 changes: 6 additions & 7 deletions _version.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#

# Development Build Macro Definitions
_cFS_GrndSys_build_number = 11
_cFS_GrndSys_build_number = 18
_cFS_GrndSys_build_baseline = "v2.2.0-rc1"

# Version Number Definitions
Expand All @@ -30,20 +30,19 @@
_cFS_GrndSys_REVISION = 0
_cFS_GrndSys_MISSIONREV = 0

# Development Build format for __version__
# Development Build format for __version__
# Baseline git tag + Number of commits since baseline
__version__ = "+dev".join((_cFS_GrndSys_build_baseline,str(_cFS_GrndSys_build_number)))

# Development Build format for __version_string__
# Development Build format for __version_string__
_version_string = " cFS-GroundSystem DEVELOPMENT BUILD\n " + __version__

# Use the following templates for Official Releases ONLY
# Use the following templates for Official Releases ONLY

# Official Release format for __version__
# Official Release format for __version__
# __version__ = ".".join(map(str,(_cFS_GrndSys_MAJOR, _cFS_GrndSys_MINOR, _cFS_GrndSys_REVISION, _cFS_GrndSys_MISSIONREV)))

# Official Release format for _version_string
# _version_string = " cFS-GroundSystem v" + __version__

# END TEMPLATES