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 #116, 117+118 - Multiple cleanups related to array indexing and range checking #127

Merged
merged 4 commits into from
Dec 5, 2023

Commits on Nov 9, 2023

  1. Fix nasa#116, scrub types used for indexing and identification

    Introduces header files and dedicated types for the purpose of indexing
    and identification of SC objects and structures.  This include ATS/RTS
    identification, time sequence numbers, word offsets, and command
    numbers.
    
    Use a separate typedef for each, and document its purpose/intent in the
    description, then update all FSW to use the typedef rather than a simple
    uint16.
    
    Note - in places where the CMD/TLM interface were _not_ using a uint16,
    the old type is kept.  This maintains backward compatibility of the I/F.
    jphickey committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    ee3db0e View commit details
    Browse the repository at this point in the history
  2. Fix nasa#117, change local array refs to object pointer

    This changes all "info" table access to go through an object pointer
    that is obtained via an accessor method.
    jphickey committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    a017a7b View commit details
    Browse the repository at this point in the history
  3. Fix nasa#118, implement range checking functions

    Adds inline functions to do range checking, and uses them in all places
    where the same logic had been copied around.  This reduces repetition of
    logic.
    
    Introduces proper data types and wrapper functions to deal with the
    different types of IDs and indices.
    jphickey committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    3fd6345 View commit details
    Browse the repository at this point in the history
  4. Fix nasa#121, add extra range checking

    Adds additional range checks to avoid out-of-bounds array access
    jphickey committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    ee21c30 View commit details
    Browse the repository at this point in the history