Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions fsw/lioness-sw/LionessSw/Components/ASIDetector/ASIDetector.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// ======================================================================
// \title ASIDetector.cpp
// \author jchen25
// \brief cpp file for ASIDetector component implementation class
// ======================================================================

#include "LionessSw/Components/ASIDetector/ASIDetector.hpp"

namespace Components {

// ----------------------------------------------------------------------
// Component construction and destruction
// ----------------------------------------------------------------------

ASIDetector ::ASIDetector(const char* const compName) : ASIDetectorComponentBase(compName) {}

ASIDetector ::~ASIDetector() {}

// ----------------------------------------------------------------------
// Handler implementations for commands
// ----------------------------------------------------------------------

void ASIDetector ::TODO_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
// TODO
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
}

} // namespace Components
60 changes: 60 additions & 0 deletions fsw/lioness-sw/LionessSw/Components/ASIDetector/ASIDetector.fpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
module Components {
@ Component that interfaces with the ASI174 Mini detector and takes measurements.
active component ASIDetector {

# One async command/port is required for active components
# This should be overridden by the developers with a useful command/port
@ TODO
async command TODO opcode 0

##############################################################################
#### Uncomment the following examples to start customizing your component ####
##############################################################################

# @ Example async command
# async command COMMAND_NAME(param_name: U32)

# @ Example telemetry counter
# telemetry ExampleCounter: U64

# @ Example event
# event ExampleStateEvent(example_state: Fw.On) severity activity high id 0 format "State set to {}"

# @ Example port: receiving calls from the rate group
# sync input port run: Svc.Sched

# @ Example parameter
# param PARAMETER_NAME: U32

###############################################################################
# Standard AC Ports: Required for Channels, Events, Commands, and Parameters #
###############################################################################
@ Port for requesting the current time
time get port timeCaller

@ Port for sending command registrations
command reg port cmdRegOut

@ Port for receiving commands
command recv port cmdIn

@ Port for sending command responses
command resp port cmdResponseOut

@ Port for sending textual representation of events
text event port logTextOut

@ Port for sending events to downlink
event port logOut

@ Port for sending telemetry channels to downlink
telemetry port tlmOut

@ Port to return the value of a parameter
param get port prmGetOut

@Port to set the value of a parameter
param set port prmSetOut

}
}
42 changes: 42 additions & 0 deletions fsw/lioness-sw/LionessSw/Components/ASIDetector/ASIDetector.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// ======================================================================
// \title ASIDetector.hpp
// \author jchen25
// \brief hpp file for ASIDetector component implementation class
// ======================================================================

#ifndef Components_ASIDetector_HPP
#define Components_ASIDetector_HPP

#include "LionessSw/Components/ASIDetector/ASIDetectorComponentAc.hpp"

namespace Components {

class ASIDetector final : public ASIDetectorComponentBase {
public:
// ----------------------------------------------------------------------
// Component construction and destruction
// ----------------------------------------------------------------------

//! Construct ASIDetector object
ASIDetector(const char* const compName //!< The component name
);

//! Destroy ASIDetector object
~ASIDetector();

private:
// ----------------------------------------------------------------------
// Handler implementations for commands
// ----------------------------------------------------------------------

//! Handler implementation for command TODO
//!
//! TODO
void TODO_cmdHandler(FwOpcodeType opCode, //!< The opcode
U32 cmdSeq //!< The command sequence number
) override;
};

} // namespace Components

#endif
36 changes: 36 additions & 0 deletions fsw/lioness-sw/LionessSw/Components/ASIDetector/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
####
# F Prime CMakeLists.txt:
#
# SOURCES: list of source files (to be compiled)
# AUTOCODER_INPUTS: list of files to be passed to the autocoders
# DEPENDS: list of libraries that this module depends on
#
# More information in the F´ CMake API documentation:
# https://fprime.jpl.nasa.gov/latest/docs/reference/api/cmake/API/
#
####

# Module names are derived from the path from the nearest project/library/framework
# root when not specifically overridden by the developer. i.e. The module defined by
# `Ref/SignalGen/CMakeLists.txt` will be named `Ref_SignalGen`.

register_fprime_library(
AUTOCODER_INPUTS
"${CMAKE_CURRENT_LIST_DIR}/ASIDetector.fpp"
SOURCES
"${CMAKE_CURRENT_LIST_DIR}/ASIDetector.cpp"
# DEPENDS
# MyPackage_MyOtherModule
)

### Unit Tests ###
# register_fprime_ut(
# AUTOCODER_INPUTS
# "${CMAKE_CURRENT_LIST_DIR}/ASIDetector.fpp"
# SOURCES
# "${CMAKE_CURRENT_LIST_DIR}/test/ut/ASIDetectorTestMain.cpp"
# "${CMAKE_CURRENT_LIST_DIR}/test/ut/ASIDetectorTester.cpp"
# DEPENDS
# STest # For rules-based testing
# UT_AUTO_HELPERS
# )
66 changes: 66 additions & 0 deletions fsw/lioness-sw/LionessSw/Components/ASIDetector/docs/sdd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Components::ASIDetector

Component that interfaces with the ASI174 Mini detector and takes measurements.

## Usage Examples
Pulling info from the ASI174 Mini detector.

### Diagrams
Add diagrams here

### Typical Usage
Pulling info from the ASI174 Mini detector.

## Class Diagram
Add a class diagram here

## Port Descriptions
| Name | Description |
|---|---|
|---|---|

## Component States
Add component states in the chart below
| Name | Description |
|---|---|
|---|---|

## Sequence Diagrams
Add sequence diagrams here

## Parameters
| Name | Description |
|---|---|
|---|---|

## Commands
| Name | Description |
|---|---|
|---|---|

## Events
| Name | Description |
|---|---|
|---|---|

## Telemetry
| Name | Description |
|---|---|
|---|---|

## Unit Tests
Add unit test descriptions in the chart below
| Name | Description | Output | Coverage |
|---|---|---|---|
|---|---|---|---|

## Requirements
Add requirements in the chart below
| Name | Description | Validation |
|---|---|---|
|ASI-001|The component shall activate upon startup.|Inspection|

## Change Log
| Date | Description |
|---|---|
|---| Initial Draft |
1 change: 1 addition & 0 deletions fsw/lioness-sw/LionessSw/Components/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Include project-wide components here

# add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/MyComponent")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ASIDetector/")