Skip to content
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

Work/dp catalog #2713

Draft
wants to merge 80 commits into
base: devel
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
26c8765
Starting on FDD for DpCatalog
timcanham Jan 19, 2024
041a450
More DpCatalog SDD edits
timcanham Jan 22, 2024
c4f6294
More refined DpCatalog requirements
timcanham Jan 23, 2024
91a363e
Starting prototype code
timcanham Jan 24, 2024
3e7d121
Working on DpCatalog build command
timcanham Jan 24, 2024
e1a5783
More DpCatalog work
timcanham Jan 26, 2024
fe96b1a
More DpCatalog work
timcanham Jan 29, 2024
666e77b
Merge from devel
timcanham Feb 20, 2024
f99d851
More work on reading DP headers
timcanham Feb 21, 2024
4394336
More work...
timcanham Feb 21, 2024
f3af664
Continued work
timcanham Feb 26, 2024
c17652f
Spelling fixes
timcanham Feb 27, 2024
06c3fa6
More spelling fixes
timcanham Feb 27, 2024
c80d844
First run of init unit test
timcanham Feb 27, 2024
2848241
One DP works
timcanham Feb 29, 2024
7b9be73
Refactor unit test helpers
timcanham Mar 1, 2024
e51a07e
Working on multiple DPs
timcanham Mar 1, 2024
da0700e
More work on multiple DPs
timcanham Mar 3, 2024
0a1176d
Fixed filesRead bug
timcanham Mar 5, 2024
7425848
Merge from fprime devel
timcanham Mar 5, 2024
1e3452f
More merge fixes
timcanham Mar 5, 2024
cdd6b71
Adding DPs to SignalGen
timcanham Mar 11, 2024
1f0d4ec
Merge from F Prime devel
timcanham Mar 29, 2024
a0748fe
Adding DP components
timcanham Mar 29, 2024
7753fdd
Added DP directory to DpWriter
timcanham Mar 29, 2024
977a6a6
First working version of Data Products!
timcanham Mar 30, 2024
d4a3a0e
Added missing FileDownlink connection
timcanham Apr 3, 2024
3797067
Added early proto warning to SDD.
timcanham Apr 8, 2024
dc5dd7b
Switched to Fw::FileNameString
timcanham Apr 10, 2024
f8ac1cc
Fixed unit test compile
timcanham Apr 10, 2024
018f4ad
Add missing override keyword
timcanham Apr 10, 2024
38a3fd6
Fix unit test override
timcanham Apr 10, 2024
745b19f
Fixed format specifiers
timcanham Apr 10, 2024
d8991d6
Reformat code
bocchino Apr 11, 2024
715cc47
Revise DpWriter uts
bocchino Apr 11, 2024
52168ce
Revise dp writer
bocchino Apr 11, 2024
e3bc890
Revise dp writer
bocchino Apr 11, 2024
e62571c
Removed extra ;
timcanham Apr 25, 2024
623653a
Merge remote-tracking branch 'upstream/devel' into work/DpCatalog
timcanham Apr 25, 2024
da1065b
Fix markdown broken links
timcanham Apr 25, 2024
3c17315
Updated SDD to force CI to run again
timcanham Apr 25, 2024
f2fc62a
Adding async DP request example
timcanham Apr 26, 2024
0f09e8e
Working on async example
timcanham Apr 26, 2024
94170ce
Still working on async DP
timcanham Apr 26, 2024
b7912f6
Remove test printf
timcanham May 1, 2024
fa579b9
Merge from F Prime devel
timcanham May 1, 2024
e59053c
Merge remote-tracking branch 'upstream/devel' into work/DpCatalog
timcanham May 1, 2024
c6de09b
Another merge with F Prime devel
timcanham May 1, 2024
a823572
Merge with mainline
timcanham Jun 11, 2024
45516af
Merge remote-tracking branch 'nasa/devel' into work/DpCatalog
timcanham Jun 28, 2024
9aeb644
Merge remote-tracking branch 'upstream/devel' into work/DpCatalog
timcanham Aug 8, 2024
d4f5aaf
Merge remote-tracking branch 'upstream/devel' into work/DpCatalog
timcanham Aug 22, 2024
7867da5
Working on binary tree implementation
timcanham Aug 24, 2024
5f8be61
Work in progress. Doesn't work yet
timcanham Aug 25, 2024
489b7c9
Merge remote-tracking branch 'upstream/devel' into work/DpCatalog
timcanham Aug 30, 2024
e9bc028
Still working
timcanham Sep 16, 2024
526eca7
Merge remote-tracking branch 'nasa/devel' into work/DpCatalog
timcanham Sep 16, 2024
1bddd64
debug launch config
timcanham Sep 16, 2024
fb0f13e
fixed pre-launch run step
timcanham Sep 16, 2024
a02dd45
Some progress on algo
timcanham Sep 19, 2024
595e440
2 and 3 nodes work
timcanham Sep 19, 2024
8ae835d
Refactored some code
timcanham Sep 19, 2024
4ee2c62
Tree traverse seems to work!
timcanham Sep 26, 2024
7ab7857
One transmitted test
timcanham Sep 26, 2024
108b908
Fixed NULL to nullptr
timcanham Sep 26, 2024
3fdb91a
Fixed spelling
timcanham Sep 26, 2024
96add80
Fixed memory alignment
timcanham Sep 26, 2024
d1219c9
Starting on state file
timcanham Oct 1, 2024
ed9a697
Fixed spelling - AGAIN
timcanham Oct 1, 2024
5f8a863
Added reading of the state file
timcanham Oct 2, 2024
ed94902
Added function to get state for DP from state file
timcanham Oct 2, 2024
3257d82
Added state file data pruning function
timcanham Oct 2, 2024
f0c3793
Code to update the state file
timcanham Oct 3, 2024
da133de
Debugging DpCat
timcanham Oct 3, 2024
a07e5d6
More work on DPs
timcanham Oct 8, 2024
29d6704
Working on state file
timcanham Oct 9, 2024
905b061
Added to spelling expect.txt
timcanham Oct 9, 2024
c6dc446
fix double 'the'
timcanham Oct 9, 2024
ea98bfc
Testing with DpManager/SignalGen
timcanham Oct 11, 2024
195cc44
merge from core devel; updates to DpCatalog
timcanham Oct 11, 2024
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
11 changes: 9 additions & 2 deletions Ref/SignalGen/Commands.fppi
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ async command SignalGen_Toggle \
async command SignalGen_Skip \
opcode 2

enum DpReqType {
IMMEDIATE
ASYNC
}


@ Signal Generator Settings
async command SignalGen_Dp(
records: U32
) \
reqType: DpReqType
records: U32
) \
opcode 3

10 changes: 10 additions & 0 deletions Ref/SignalGen/Events.fppi
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,13 @@ event SignalGen_DpsNotConnected \
severity warning high \
id 4 \
format "DP Ports not connected!"

event SignalGen_DpMemoryFail \
severity warning high \
id 5 \
format "Failed to acquire a DP buffer"

event SignalGen_InSufficientDpRecords \
severity warning high \
id 6 \
format "Need to request at least one record"
63 changes: 49 additions & 14 deletions Ref/SignalGen/SignalGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,20 @@ namespace Ref {
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
}

void SignalGen ::
SignalGen_Dp_cmdHandler(
FwOpcodeType opCode,
U32 cmdSeq,
U32 records
)
void SignalGen::SignalGen_Dp_cmdHandler(
FwOpcodeType opCode,
U32 cmdSeq,
Ref::SignalGen_DpReqType reqType,
U32 records
)
{
// at least one record
if (0 == records) {
this->log_WARNING_HI_SignalGen_InSufficientDpRecords();
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::VALIDATION_ERROR);
return;
}

// make sure DPs are available
if (
not this->isConnected_productGetOut_OutputPort(0)
Expand All @@ -223,18 +230,34 @@ namespace Ref {
return;
}

// get DP buffer
this->dpGet_DataContainer(records*SIZE_OF_DataRecord_RECORD,this->m_dpContainer);
this->m_dpInProgress = true;
// get DP buffer. Use sync or async request depending on
// requested type
FwSizeType dpSize = records*(SignalInfo::SERIALIZED_SIZE + sizeof(FwDpIdType));
this->m_numDps = records;
this->m_currDp = 0;
this->log_ACTIVITY_LO_SignalGen_DpStarted(records);
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
if (Ref::SignalGen_DpReqType::IMMEDIATE == reqType) {
Fw::Success stat = this->dpGet_DataContainer(dpSize,this->m_dpContainer);
// make sure we got the memory we wanted
if (Fw::Success::FAILURE == stat) {
this->log_WARNING_HI_SignalGen_DpMemoryFail();
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
} else {
this->m_dpInProgress = true;
this->log_ACTIVITY_LO_SignalGen_DpStarted(records);
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
}
} else if (Ref::SignalGen_DpReqType::ASYNC == reqType) {
this->dpRequest_DataContainer(dpSize);
} else {
// should never get here
FW_ASSERT(0,reqType.e);
}

}

void SignalGen::cleanupAndSendDp() {
this->dpSend(this->m_dpContainer);
this->m_dpInProgress = 0;
this->m_dpInProgress = false;
this->m_dpBytes = 0;
this->m_numDps = 0;
this->m_currDp = 0;
Expand All @@ -252,8 +275,20 @@ namespace Ref {
Fw::Success::T status
)
{
// TODO
}

// Make sure we got the buffer we wanted or quit
if (Fw::Success::SUCCESS == status) {
this->m_dpContainer = container;
this->m_dpInProgress = true;
this->log_ACTIVITY_LO_SignalGen_DpStarted(this->m_numDps);
} else {
this->log_WARNING_HI_SignalGen_DpMemoryFail();
// cleanup
this->m_dpInProgress = false;
this->m_dpBytes = 0;
this->m_numDps = 0;
this->m_currDp = 0;
}
}

};
12 changes: 7 additions & 5 deletions Ref/SignalGen/SignalGen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Ref {
void schedIn_handler(
NATIVE_INT_TYPE portNum, /*!< The port number*/
U32 context /*!< The call order*/
);
) final;

void SignalGen_Settings_cmdHandler(
FwOpcodeType opCode, /*!< The opcode*/
Expand All @@ -46,6 +46,7 @@ namespace Ref {
FwOpcodeType opCode, /*!< The opcode*/
U32 cmdSeq /*!< The command sequence number*/
) final;

void SignalGen_Skip_cmdHandler(
FwOpcodeType opCode, /*!< The opcode*/
U32 cmdSeq /*!< The command sequence number*/
Expand All @@ -55,10 +56,11 @@ namespace Ref {
//!
//! Signal Generator Settings
void SignalGen_Dp_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
U32 records
) final;
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
Ref::SignalGen_DpReqType reqType,
U32 records
) final;

// ----------------------------------------------------------------------
// Handler implementations for data products
Expand Down
12 changes: 10 additions & 2 deletions Ref/SignalGen/docs/sdd.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@

## 1. Introduction

The `Ref::SignalGen` is a demonstration component that receives data buffers from `Ref::SignalGen` ([SDD](../../SendBuffApp/docs/sdd.md)). It is a source for testing plots in the ground software.
The `Ref::SignalGen` is a demonstration component that generates different waveforms. It is a source for testing plots in the ground software. It also provides a demonstration of data products.

## 2. Requirements

The requirements for `Ref::SignalGen` are as follows:

Requirement | Description | Verification Method
----------- | ----------- | -------------------
ISF-SGN-001 | The `Ref::SignalGen` component shall generate telemetry with tunable waveforms | System test
REF-SGN-001 | The `Ref::SignalGen` component shall generate telemetry with tunable waveforms | System test
REF-SGN-002 | The `Ref::SignalGen` component shall store waveform data using data products | System test

## 3. Design

Expand All @@ -23,6 +24,12 @@ The `Ref::SignalGen` component has the following component diagram:

![`Ref::SignalGen` Diagram](img/SignalGenBDD.jpg "Ref::SignalGen")

#### 3.1.2 Data Products

The `Ref::SignalGen` component will generate data products using the `SignalGen_Dp` command.
It will demonstrate the two different ways to request data product buffers and will generate
a data product based on storing a commanded number of

## 4. Dictionaries

## 5. Module Checklists
Expand All @@ -34,6 +41,7 @@ The `Ref::SignalGen` component has the following component diagram:
Date | Description
---- | -----------
4/20/2017 | Initial Version
4/26/2024 | Added data product demonstration



Loading
Loading