Skip to content

Commit

Permalink
2604: SDD in Progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivaly-Reddy committed Mar 28, 2024
1 parent 5c1dd45 commit 2a5dba3
Show file tree
Hide file tree
Showing 6 changed files with 213 additions and 0 deletions.
1 change: 1 addition & 0 deletions Svc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwi
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PosixTime/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxTimer/")
endif()
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Version/")
22 changes: 22 additions & 0 deletions Svc/Version/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
####
# F prime CMakeLists.txt:
#
# SOURCE_FILES: combined list of source and autocoding files
# MOD_DEPS: (optional) module dependencies
# UT_SOURCE_FILES: list of source files for unit tests
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/Version.fpp"
"${CMAKE_CURRENT_LIST_DIR}/Version.cpp"
)

# Uncomment and add any modules that this component depends on, else
# they might not be available when cmake tries to build this component.

set(MOD_DEPS
Os
version
)

register_fprime_module()
29 changes: 29 additions & 0 deletions Svc/Version/Version.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// ======================================================================
// \title Version.cpp
// \author sreddy
// \brief cpp file for Version component implementation class
// ======================================================================

#include "FpConfig.hpp"
#include "Svc/Version/Version.hpp"

namespace Svc {

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

Version ::
Version(const char* const compName) :
VersionComponentBase(compName)
{

}

Version ::
~Version()
{

}

}
55 changes: 55 additions & 0 deletions Svc/Version/Version.fpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
module Svc {
@ Tracks veramework, user defined versions etc
passive component Version {

##############################################################################
#### 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

}
}
36 changes: 36 additions & 0 deletions Svc/Version/Version.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// ======================================================================
// \title Version.hpp
// \author sreddy
// \brief hpp file for Version component implementation class
// ======================================================================

#ifndef Svc_Version_HPP
#define Svc_Version_HPP

#include "Svc/Version/VersionComponentAc.hpp"

namespace Svc {

class Version :
public VersionComponentBase
{

public:

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

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

//! Destroy Version object
~Version();

};

}

#endif
70 changes: 70 additions & 0 deletions Svc/Version/docs/sdd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Svc::Version

Tracks versions for framework,project, libraries and user defined project specific versions.

## Usage Examples
Add usage examples here

### Diagrams
Add diagrams here

### Typical Usage
And the typical usage of the component here

## 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

| Name | Description | Validation |
|---|---|---|
|SVC-VERSION-001|`Svc::Version` shall create an EVR indicating versions of framework, project and libary at start-up and on command| This is to provide transparency to users on versions being used|
|SVC-VERSION-002|`Svc::Version` shall provide a telemetry channel on framework version| Accessiblity to versions being used|
|SVC-VERSION-003|`Svc::Version` shall provide a telemetry channel on project version| Accessiblity to versions being used|
|SVC-VERSION-004|`Svc::Version` shall provide a telemetry channel on library version| Accessiblity to versions being used|
|SVC-VERSION-005|`Svc::Version` shall provide an interface for users to set custom versions.| Enables projects to set hardware and FPGA versions as needed|

## Change Log
| Date | Description |
|---|---|
|---| Initial Draft |

0 comments on commit 2a5dba3

Please sign in to comment.