Skip to content

Commit 221c9e1

Browse files
committed
Update to use aggregation
1 parent b21abcf commit 221c9e1

File tree

7 files changed

+11
-2
lines changed

7 files changed

+11
-2
lines changed

FprimeZephyrReference/Components/ComDelay/ComDelay.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ void ComDelay ::run_handler(FwIndexType portNum, U32 context) {
5151
bool valid = this->m_last_status_valid.compare_exchange_strong(expected, false);
5252
if (valid) {
5353
this->comStatusOut_out(0, this->m_last_status);
54+
this->timeout_out(0, 0);
5455
}
5556
}
5657

FprimeZephyrReference/Components/ComDelay/ComDelay.fpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ module Components {
55
@ Rate schedule port used to trigger radio transmission
66
sync input port run: Svc.Sched
77

8+
@ Rate schedule port used to trigger aggregation timeout
9+
output port timeout: Svc.Sched
10+
811
@ Input comStatus from radio component
912
sync input port comStatusIn: Fw.SuccessCondition
1013

FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ module ReferenceDeployment {
8080
lora.dataReturnOut -> ComCcsds.framer.dataReturnIn
8181
lora.comStatusOut -> comDelay.comStatusIn
8282
comDelay.comStatusOut ->ComCcsds.framer.comStatusIn
83+
84+
comDelay.timeout -> ComCcsds.aggregator.timeout
8385
}
8486

8587
connections RateGroups {

FprimeZephyrReference/project/config/ComCcsdsConfig.fpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ module ComCcsdsConfig {
44

55
module QueueSizes {
66
constant comQueue = 10
7+
constant aggregator = 2
78
}
89

910
module StackSizes {
1011
constant comQueue = 8 * 1024 # Must match prj.conf thread stack size
12+
constant aggregator = 8 * 1024 # Must match prj.conf thread stack size
1113
}
1214

1315
module Priorities {

FprimeZephyrReference/project/config/ComCfg.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module ComCfg {
1717
# - potentially APID enum ?
1818
constant SpacecraftId = 0x0044 # Spacecraft ID (10 bits)
1919
constant TmFrameFixedSize = 248 # Needs to be at least COM_BUFFER_MAX_SIZE + (2 * SpacePacketHeaderSize) + 1
20+
constant AggregationSize = TmFrameFixedSize - 6 - 6 - 1 - 2 # 2 header (6) + 1 idle byte + 2 trailer bytes
2021

2122
@ APIDs are 11 bits in the Space Packet protocol, so we use U16. Max value 7FF
2223
enum Apid : FwPacketDescriptorType {

FprimeZephyrReference/project/config/FpConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ extern "C" {
166166

167167
// Specifies the size of the buffer that contains a communications packet.
168168
#ifndef FW_COM_BUFFER_MAX_SIZE
169-
#define FW_COM_BUFFER_MAX_SIZE 235
169+
#define FW_COM_BUFFER_MAX_SIZE 233
170170
#endif
171171

172172
// Specifies the size of the buffer attached to state machine signals.

0 commit comments

Comments
 (0)