fprime-component-implementation
하는 일
승인된 FPP 모델에서 생성된 핸들러 함수를 채우도록 AI 에이전트를 안내합니다. F Prime 컴포넌트용 C++를 작성하는 엔지니어를 위한 스킬입니다.
사용하는 경우
- ✓F Prime 컴포넌트의 FPP 모델이 승인되어 C++ 코드를 작성해야 할 때.
- ✓컴포넌트의 명령이나 포트 핸들러 함수를 채워야 할 때.
- ✓F Prime의 스타일과 설계 규칙을 따르는 C++ 코드를 원할 때.
스킬 링크
https://github.com/nasa/fprime/blob/devel/.github/skills/fprime-component-implementation/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“FPP 모델이 승인되었습니다. 이 F Prime 컴포넌트의 C++ 핸들러를 작성해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 F Prime의 스타일 가이드와 설계 규칙을 따라, 컴포넌트 자체 클래스에서 생성된 핸들러 함수를 구현합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Skill: F Prime Component Implementation (C++)
Implementation fills in the handler stubs generated from the FPP model. The autocoder produces base classes with pure-virtual handlers; you implement the derived class.
For the full reference on autocoded functions (port handlers, command handlers, telemetry, events, parameters, initialization), see Autocoded Functions and Component Classes.
Use F Prime design patterns where possible — standard solutions exist for common needs:
- Rate Group Pattern —
docs/user-manual/design-patterns/rate-group.md - Health Checking —
docs/user-manual/design-patterns/health-checking.md - Manager-Worker —
docs/user-manual/design-patterns/manager-worker.md - Application-Manager-Driver —
docs/user-manual/design-patterns/app-man-drv.md - Common Port Patterns —
docs/user-manual/design-patterns/common-port-patterns.md
Follow F Prime Style Guidelines for naming and code style.
Prerequisites
The FPP model must be confirmed (see
fprime-component-design-fpp) and C++ design rules
(fprime-cpp-design, CPP-1 through CPP-37) are mandatory.
The confirmed requirements and FPP model should provide all the
information needed for implementation.
Step-by-Step Process
Step 1 — Generate Implementation Stubs
fprime-util impl
This produces <Component>-template.cpp and <Component>-template.hpp
files. If this is the first time:
mv <Component>-template.cpp <Component>.cpp
mv <Component>-template.hpp <Component>.hpp
If iterating on an existing design, copy new handler stubs from the template into your existing files.
Step 2 — Implement Handlers
Implement all pure-virtual handlers generated from the FPP model. See Autocoded Functions for handler naming conventions, argument types, and the full API provided by the base class.
Key rules to follow during implementation:
- No dynamic memory after construction (CPP-1) — size all arrays at compile time
- Fixed-size types:
U32,FwSizeType, etc. (CPP-3, CPP-28) - No STL containers — use
Fw/DataStructuresor fixed arrays (CPP-22, CPP-25) - No
FW_ASSERTon untrusted inputs (CPP-4) — validate and return an error response instead - All variables initialized (CPP-19)
Fw::Stringoverchar*(CPP-24)- Every command handler must call
cmdResponse_out— omitting it hangs the command in the dispatcher - Events for each command (CPP-37) — add an event that describes what the command did, including the command arguments. This is frequently forgotten and is very useful for recreating what happened.
- One event emission per call site (CPP-36) — never emit the same event with the same argument set from two places; use a distinct event or a site-identifying argument.
- Mark copy/move as deleted for components (CPP-17)
Step 3 — Build and Fix Errors
fprime-util build
Iterate until compilation succeeds. Common issues:
- Missing
#includefor types used in handlers - Incorrect argument types (check the generated base class)
- Missing
cmdResponse_outcall in command handlers
Step 4 — Review Against C++ Design Rules
Before considering implementation complete, verify compliance with
fprime-cpp-design (CPP-1 through CPP-37).
Anti-Patterns
- Using
FW_ASSERTon command arguments or hardware inputs - Forgetting
cmdResponse_out(command will hang in dispatcher) - Command handlers that emit no event describing what the command did (CPP-37)
- The same event emitted from several sites with indistinguishable arguments (CPP-36)
- Using
new/deletein handler code - Using
std::string,std::vector, or other STL containers - Leaving member variables uninitialized
- Implementing behavior not covered by a requirement
자주 묻는 질문
핸들러 함수는 무엇인가요?
자동 코드 생성기(오토코더)가 스텁으로 만들어 주며, 사용자가 컴포넌트의 실제 동작으로 채웁니다.
어떤 규칙을 따라야 하나요?
스킬은 F Prime C++ 설계 규칙이 구현에 필수라고 설명합니다.
FPP 모델을 건너뛸 수 있나요?
아닙니다. 스킬은 구현을 시작하기 전에 확정된 FPP 모델을 요구합니다.
상세 정보
작성자의 원본 설명
C++ implementation phase of F Prime component development. Guides the agent through implementing handler functions generated from the FPP model. Must follow fprime-cpp-design rules (CPP-1 through CPP-37). Trigger when the FPP model is confirmed and the next step is to write the C++ implementation. Keywords: F Prime, C++, implementation, handler, component, flight software, autocoded.
repo: nasa/fprime
인기도
- GitHub 스타
- 12k
- 순위
- #11496
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
fprime-cmake-build-system
12k에이전트가 F Prime 비행 소프트웨어 프로젝트의 CMake 계층을 통해 모듈, 빌드 타깃, 플랫폼 설정을 추가하도록 돕습니다.
fprime-component-design-fpp
12k에이전트가 승인된 F Prime 컴포넌트 요구사항을 포트, 명령, 이벤트, 텔레메트리의 FPP 모델로 바꾸도록 돕습니다.
fprime-component-development
12k에이전트가 요구사항에서 통합 테스트까지, F Prime 컴포넌트를 각 개발 단계마다 안내하도록 돕습니다.
fprime-component-integration-test
12k에이전트가 실행 중인 배포를 대상으로 돌리는 F Prime 컴포넌트용 재사용 가능한 pytest 통합 테스트를 작성하도록 돕습니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.