Skip to content

Request for a tool to report all port definitions #3527

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

Open
bevinduckett opened this issue Apr 24, 2025 · 1 comment
Open

Request for a tool to report all port definitions #3527

bevinduckett opened this issue Apr 24, 2025 · 1 comment

Comments

@bevinduckett
Copy link
Collaborator

F´ Version
Affected Component

Feature Description

It would be useful to have a tool that could recursively search for all port definitions from a directory and then report them in some TBD user friendly format.
I have a python script that uses a regex to produce a CSV with a summary of ports - but that's not ideal to be using regexp for this since FPP an interpreted language so there must be a cleaner approach.

File,Port Name,Port Args,Return Value
./lib/fprime/Drv/ByteStreamDriverModel/ByteStreamDriverModel.fpp,ByteStreamSend, ref sendBuffer: Fw.Buffer @< Data to send ,SendStatus
./lib/fprime/Drv/ByteStreamDriverModel/ByteStreamDriverModel.fpp,ByteStreamRecv, ref recvBuffer: Fw.Buffer recvStatus: RecvStatus ,
./lib/fprime/Drv/ByteStreamDriverModel/ByteStreamDriverModel.fpp,ByteStreamPoll, ref pollBuffer: Fw.Buffer ,PollStatus

Rationale

Ports should be defined in fpp files in Ports/ - however a project that includes multiple libraries can have multiple Ports/ subdirectories and some components define the ports in their fpp files rather than in a separate file. It'd be useful to have a tool that lets you see everything defined and where those things are defined

@Kronos3
Copy link
Collaborator

Kronos3 commented Apr 24, 2025

It may be possible to use a combination of find (to list all the .fpp files in a directory recursively), fpp-to-json, and an additional processing script to convert the json to a format for your use.

P.S. Shameless plug for https://marketplace.visualstudio.com/items?itemName=jet-propulsion-laboratory.fpp which will parse through your FPrime project and prompt you with ports, types, etc as you define your components which may meet your usecase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants