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

Add initial prototype Event Management files #1

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

keegan-moore
Copy link
Owner

@keegan-moore keegan-moore commented Mar 19, 2024

Describe the contribution

This PR add prototype implementations for the BPLib's Event Management (EVM) design (part of the Core Infrastructure).
This design intends to abstract the cFS EVS API calls from the BP App, using a new EVM API the BPLib.
A related PR exists for BP app, here: keegan-moore/bp#1 .

Testing performed

  1. Build steps
    1. make native.distclean
      2.make ENABLE_TESTS=false native.install
  2. Execution steps '...'
    1. cd build-native-9.4.0/exe/cpu1
    2. ./core-cpu1

Expected behavior changes

A clear and concise description of how this contribution will change behavior and level of impact.

  • API Changes:
    • During BP app initialization, BP is now expected to call BPL_EVM_Initialize instead of CFE_EVS_Register
    • When the BP app wants to generate an event, the app should now use BPL_EVM_SendEvent
  • Behavior Change:
    • No changes to behavior

System(s) tested on

  • Hardware: PC / x86_64
  • OS: Ubuntu 22.04
  • Versions: cFE 6.7 (equuleus) release candidate

Additional context
N/A

Third party code
N/A

Contributor Info - All information REQUIRED for consideration of pull request
Keegan Moore, NASA/GSFC Code 582 (Flight Software Systems)

warning: failed to compile/link with the app
@keegan-moore keegan-moore self-assigned this Mar 19, 2024
Comment on lines +1 to +3
/*
* TODO: Fill in file header, if necessary.
*/
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does there need to be a file header for these files?

Comment on lines +28 to +36
typedef struct
{
uint32_t ReturnValue;
} BPL_Status_t;

#define BPL_STATUS_SUCCESS (0u)
#define BPL_STATUS_ERROR_GENERAL (1u)
#define BPL_STATUS_ERROR_INPUT_INVALID (2u)
#define BPL_STATUS_ERROR_PROXY_INIT (3u)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these should be moved to somewhere else (if we decide to keep the struct impl of the return types, as discussed).

BPL_EVM_ProxyCallbacks.Initialize_Impl = ProxyCallbacks.Initialize_Impl;
BPL_EVM_ProxyCallbacks.SendEvent_Impl = ProxyCallbacks.SendEvent_Impl;

/* TODO: immediately want to call the proxy init, or wait for a directive to do so? */
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to address this TODO

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider removing the Initialize_Impl function pointer entirely. Have the BPNode call CFE_EVS_Register (or any other initialization) directly.

now that things are working
@keegan-moore keegan-moore marked this pull request as draft March 20, 2024 18:18
@keegan-moore keegan-moore changed the title WIP: Add initial prototype Event Management files Add initial prototype Event Management files Mar 20, 2024
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 this pull request may close these issues.

1 participant