Skip to content

Commit

Permalink
Update RPI deployment to use FrameAccumulator/Router
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-bc committed Sep 25, 2024
1 parent 44ad2ae commit 4b17736
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 27 deletions.
1 change: 1 addition & 0 deletions RPI/Top/RPITopologyDefs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "RPI/Top/FppConstantsAc.hpp"
#include "Svc/FramingProtocol/FprimeProtocol.hpp"
#include "Svc/LinuxTimer/LinuxTimer.hpp"
#include <Svc/FrameAccumulator/FrameDetector/FprimeFrameDetector.hpp>

namespace RPI {

Expand Down
25 changes: 12 additions & 13 deletions RPI/Top/instances.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,7 @@ module RPI {

}

instance uplink: Svc.Deframer base id 1240 \
{

phase Fpp.ToCpp.Phases.configObjects """
Svc::FprimeDeframing deframing;
"""

phase Fpp.ToCpp.Phases.configComponents """
RPI::uplink.setup(ConfigObjects::RPI_uplink::deframing);
"""

}
instance deframer: Svc.Deframer base id 1240

instance comm: Drv.TcpClient base id 1260 \
{
Expand Down Expand Up @@ -459,8 +448,18 @@ module RPI {

instance frameAccumulator: Svc.FrameAccumulator base id 2900 \
{

phase Fpp.ToCpp.Phases.configObjects """
Svc::FrameDetectors::FprimeFrameDetector fprimeFrameDetector;
"""

phase Fpp.ToCpp.Phases.configComponents """
{
frameAccumulator.configure(ConfigObjects::RPI_frameAccumulator::fprimeFrameDetector, 1, Allocation::mallocator, 2048);
}
"""
}

instance uplinkRouter: Svc.Router base id 3000

}
30 changes: 17 additions & 13 deletions RPI/Top/topology.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ module RPI {
instance cmdDisp
instance cmdSeq
instance comm
instance deframer
instance downlink
instance eventLogger
instance fatalAdapter
instance fatalHandler
instance fileDownlink
instance fileUplink
instance frameAccumulator
instance commsBufferManager
instance gpio17Drv
instance gpio23Drv
Expand All @@ -33,8 +35,8 @@ module RPI {
instance spiDrv
instance textLogger
instance uartDrv
instance uplink
instance uartBufferManager
instance uplinkRouter

# ----------------------------------------------------------------------
# Pattern graph specifiers
Expand Down Expand Up @@ -70,13 +72,6 @@ module RPI {
eventLogger.FatalAnnounce -> fatalHandler.FatalReceive
}

connections FileUplinkBuffers {
fileUplink.bufferSendOut -> commsBufferManager.bufferSendIn
uplink.bufferAllocate -> commsBufferManager.bufferGetCallee
uplink.bufferDeallocate -> commsBufferManager.bufferSendIn
uplink.bufferOut -> fileUplink.bufferSendIn
}

connections GPIO {
rpiDemo.GpioRead -> gpio25Drv.gpioRead
rpiDemo.GpioRead -> gpio17Drv.gpioRead
Expand Down Expand Up @@ -113,11 +108,14 @@ module RPI {
rpiDemo.SpiReadWrite -> spiDrv.SpiReadWrite
}

connections StaticMemory {
connections MemoryMgmt {

Check failure on line 111 in RPI/Top/topology.fpp

View workflow job for this annotation

GitHub Actions / Spell checking

`Mgmt` is not a recognized word. (unrecognized-spelling)
comm.allocate -> commsBufferManager.bufferGetCallee
comm.deallocate -> commsBufferManager.bufferSendIn
downlink.framedAllocate -> commsBufferManager.bufferGetCallee
uplink.framedDeallocate -> commsBufferManager.bufferSendIn
fileUplink.bufferSendOut -> commsBufferManager.bufferSendIn
frameAccumulator.frameAllocate -> commsBufferManager.bufferGetCallee
frameAccumulator.dataDeallocate -> commsBufferManager.bufferSendIn
uplinkRouter.bufferDeallocate -> commsBufferManager.bufferSendIn
}

connections UART {
Expand All @@ -128,9 +126,15 @@ module RPI {
}

connections Uplink {
cmdDisp.seqCmdStatus -> uplink.cmdResponseIn
comm.$recv -> uplink.framedIn
uplink.comOut -> cmdDisp.seqCmdBuff
comm.$recv -> frameAccumulator.dataIn

frameAccumulator.frameOut -> deframer.framedIn
deframer.deframedOut -> uplinkRouter.dataIn

uplinkRouter.commandOut -> cmdDisp.seqCmdBuff
uplinkRouter.fileOut -> fileUplink.bufferSendIn

cmdDisp.seqCmdStatus -> uplinkRouter.cmdResponseIn
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
#define SVC_FRAMEACCUCULATOR_FRAME_DETECTOR_STARTLENGTHCHECKSUMDETECTOR_HPP
#include "Fw/Types/PolyType.hpp"
#include "Svc/FrameAccumulator/FrameDetector.hpp"
#include "Utils/Hash/libcrc/lib_crc.h"
#include <type_traits>

// Include the lic crc c library:
extern "C" {
#include <Utils/Hash/libcrc/lib_crc.h>
}

namespace Svc {
namespace FrameDetectors {

Expand Down

0 comments on commit 4b17736

Please sign in to comment.