Skip to content

Commit fed78d0

Browse files
Added CfdpManager skeleton
1 parent d656ebc commit fed78d0

6 files changed

Lines changed: 230 additions & 0 deletions

File tree

Svc/Ccsds/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SpacePacketFramer/")
55
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/TcDeframer/")
66
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/TmFramer/")
77
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ApidManager/")
8+
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/CfdpManager/")
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
####
2+
# F Prime CMakeLists.txt:
3+
#
4+
# SOURCES: list of source files (to be compiled)
5+
# AUTOCODER_INPUTS: list of files to be passed to the autocoders
6+
# DEPENDS: list of libraries that this module depends on
7+
#
8+
# More information in the F´ CMake API documentation:
9+
# https://fprime.jpl.nasa.gov/latest/docs/reference/api/cmake/API/
10+
#
11+
####
12+
13+
# Module names are derived from the path from the nearest project/library/framework
14+
# root when not specifically overridden by the developer, i.e. the module defined by
15+
# `MyProj/Some/Path/CMakeLists.txt` will be named `MyProj_Some_Path`.
16+
17+
register_fprime_library(
18+
AUTOCODER_INPUTS
19+
"${CMAKE_CURRENT_LIST_DIR}/CfdpManager.fpp"
20+
SOURCES
21+
"${CMAKE_CURRENT_LIST_DIR}/CfdpManager.cpp"
22+
# DEPENDS
23+
# MyPackage_MyOtherModule
24+
)
25+
26+
### Unit Tests ###
27+
# register_fprime_ut(
28+
# AUTOCODER_INPUTS
29+
# "${CMAKE_CURRENT_LIST_DIR}/CfdpManager.fpp"
30+
# SOURCES
31+
# "${CMAKE_CURRENT_LIST_DIR}/test/ut/CfdpManagerTestMain.cpp"
32+
# "${CMAKE_CURRENT_LIST_DIR}/test/ut/CfdpManagerTester.cpp"
33+
# DEPENDS
34+
# STest # For rules-based testing
35+
# UT_AUTO_HELPERS
36+
# )
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// ======================================================================
2+
// \title CfdpManager.cpp
3+
// \author campuzan
4+
// \brief cpp file for CfdpManager component implementation class
5+
// ======================================================================
6+
7+
#include "Svc/Ccsds/CfdpManager/CfdpManager.hpp"
8+
9+
namespace Svc {
10+
namespace Ccsds {
11+
12+
// ----------------------------------------------------------------------
13+
// Component construction and destruction
14+
// ----------------------------------------------------------------------
15+
16+
CfdpManager ::CfdpManager(const char* const compName) : CfdpManagerComponentBase(compName) {}
17+
18+
CfdpManager ::~CfdpManager() {}
19+
20+
// ----------------------------------------------------------------------
21+
// Handler implementations for commands
22+
// ----------------------------------------------------------------------
23+
24+
void CfdpManager ::TODO_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
25+
// TODO
26+
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
27+
}
28+
29+
} // namespace Ccsds
30+
} // namespace Svc
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
module Svc {
2+
module Ccsds {
3+
@ F' implementation of the CFDP file transfer prototcol
4+
active component CfdpManager {
5+
6+
# One async command/port is required for active components
7+
# This should be overridden by the developers with a useful command/port
8+
@ TODO
9+
async command TODO opcode 0
10+
11+
##############################################################################
12+
#### Uncomment the following examples to start customizing your component ####
13+
##############################################################################
14+
15+
# @ Example async command
16+
# async command COMMAND_NAME(param_name: U32)
17+
18+
# @ Example telemetry counter
19+
# telemetry ExampleCounter: U64
20+
21+
# @ Example event
22+
# event ExampleStateEvent(example_state: Fw.On) severity activity high id 0 format "State set to {}"
23+
24+
# @ Example port: receiving calls from the rate group
25+
# sync input port run: Svc.Sched
26+
27+
# @ Example parameter
28+
# param PARAMETER_NAME: U32
29+
30+
###############################################################################
31+
# Standard AC Ports: Required for Channels, Events, Commands, and Parameters #
32+
###############################################################################
33+
@ Port for requesting the current time
34+
time get port timeCaller
35+
36+
@ Enables command handling
37+
import Fw.Command
38+
39+
@ Enables event handling
40+
import Fw.Event
41+
42+
@ Enables telemetry channels handling
43+
import Fw.Channel
44+
45+
@ Port to return the value of a parameter
46+
param get port prmGetOut
47+
48+
@Port to set the value of a parameter
49+
param set port prmSetOut
50+
51+
}
52+
} # end Ccsds
53+
} # end Svc
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// ======================================================================
2+
// \title CfdpManager.hpp
3+
// \author campuzan
4+
// \brief hpp file for CfdpManager component implementation class
5+
// ======================================================================
6+
7+
#ifndef Ccsds_CfdpManager_HPP
8+
#define Ccsds_CfdpManager_HPP
9+
10+
#include "Svc/Ccsds/CfdpManager/CfdpManagerComponentAc.hpp"
11+
12+
namespace Svc {
13+
namespace Ccsds {
14+
15+
class CfdpManager final : public CfdpManagerComponentBase {
16+
public:
17+
// ----------------------------------------------------------------------
18+
// Component construction and destruction
19+
// ----------------------------------------------------------------------
20+
21+
//! Construct CfdpManager object
22+
CfdpManager(const char* const compName //!< The component name
23+
);
24+
25+
//! Destroy CfdpManager object
26+
~CfdpManager();
27+
28+
private:
29+
// ----------------------------------------------------------------------
30+
// Handler implementations for commands
31+
// ----------------------------------------------------------------------
32+
33+
//! Handler implementation for command TODO
34+
//!
35+
//! TODO
36+
void TODO_cmdHandler(FwOpcodeType opCode, //!< The opcode
37+
U32 cmdSeq //!< The command sequence number
38+
) override;
39+
};
40+
41+
} // namespace Ccsds
42+
} // namespace Svc
43+
44+
#endif

Svc/Ccsds/CfdpManager/docs/sdd.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Ccsds::CfdpManager
2+
3+
F' implementation of the CFDP file transfer prototcol
4+
5+
## Usage Examples
6+
Add usage examples here
7+
8+
### Diagrams
9+
Add diagrams here
10+
11+
### Typical Usage
12+
And the typical usage of the component here
13+
14+
## Class Diagram
15+
Add a class diagram here
16+
17+
## Port Descriptions
18+
| Name | Description |
19+
|---|---|
20+
|---|---|
21+
22+
## Component States
23+
Add component states in the chart below
24+
| Name | Description |
25+
|---|---|
26+
|---|---|
27+
28+
## Sequence Diagrams
29+
Add sequence diagrams here
30+
31+
## Parameters
32+
| Name | Description |
33+
|---|---|
34+
|---|---|
35+
36+
## Commands
37+
| Name | Description |
38+
|---|---|
39+
|---|---|
40+
41+
## Events
42+
| Name | Description |
43+
|---|---|
44+
|---|---|
45+
46+
## Telemetry
47+
| Name | Description |
48+
|---|---|
49+
|---|---|
50+
51+
## Unit Tests
52+
Add unit test descriptions in the chart below
53+
| Name | Description | Output | Coverage |
54+
|---|---|---|---|
55+
|---|---|---|---|
56+
57+
## Requirements
58+
Add requirements in the chart below
59+
| Name | Description | Validation |
60+
|---|---|---|
61+
|---|---|---|
62+
63+
## Change Log
64+
| Date | Description |
65+
|---|---|
66+
|---| Initial Draft |

0 commit comments

Comments
 (0)