Skip to content
Merged
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
62 changes: 37 additions & 25 deletions Ref/Top/RefTopologyDefs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include "Svc/Subtopologies/DataProducts/SubtopologyTopologyDefs.hpp"
#include "Svc/Subtopologies/FileHandling/SubtopologyTopologyDefs.hpp"

//ComCcsds Enum Includes
#include "Svc/Subtopologies/ComCcsds/Ports_ComPacketQueueEnumAc.hpp"
// ComCcsds Enum Includes
#include "Svc/Subtopologies/ComCcsds/Ports_ComBufferQueueEnumAc.hpp"
#include "Svc/Subtopologies/ComCcsds/Ports_ComPacketQueueEnumAc.hpp"

/**
* \brief required ping constants
Expand All @@ -50,34 +50,46 @@
* ```
*/
namespace PingEntries {
namespace Ref_blockDrv {enum { WARN = 3, FATAL = 5 };}
namespace Ref_pingRcvr {enum { WARN = 3, FATAL = 5 };}
namespace Ref_rateGroup1Comp {enum { WARN = 3, FATAL = 5 };}
namespace Ref_rateGroup2Comp {enum { WARN = 3, FATAL = 5 };}
namespace Ref_rateGroup3Comp {enum { WARN = 3, FATAL = 5 };}
namespace Ref_cmdSeq {enum { WARN = 3, FATAL = 5 };}
namespace Ref_blockDrv {
enum { WARN = 3, FATAL = 5 };
}
namespace Ref_pingRcvr {
enum { WARN = 3, FATAL = 5 };
}
namespace Ref_rateGroup1Comp {
enum { WARN = 3, FATAL = 5 };
}
namespace Ref_rateGroup2Comp {
enum { WARN = 3, FATAL = 5 };
}
namespace Ref_rateGroup3Comp {
enum { WARN = 3, FATAL = 5 };
}
namespace Ref_cmdSeq {
enum { WARN = 3, FATAL = 5 };
}
} // namespace PingEntries

// Definitions are placed within a namespace named after the deployment
namespace Ref {

/**
* \brief required type definition to carry state
*
* The topology autocoder requires an object that carries state with the name `Ref::TopologyState`. Only the type
* definition is required by the autocoder and the contents of this object are otherwise opaque to the autocoder. The
* contents are entirely up to the definition of the project. This reference application specifies hostname and port
* fields, which are derived by command line inputs.
*/
struct TopologyState {
const char* hostname; //!< Hostname for TCP communication
U16 port; //!< Port for TCP communication
CdhCore::SubtopologyState cdhCore; //!< Subtopology state for CdhCore
ComCcsds::SubtopologyState comCcsds; //!< Subtopology state for ComCcsds
DataProducts::SubtopologyState dataProducts; //!< Subtopology state for DataProducts
FileHandling::SubtopologyState fileHandling; //!< Subtopology state for FileHandling
};
/**
* \brief required type definition to carry state
*
* The topology autocoder requires an object that carries state with the name `Ref::TopologyState`. Only the type
* definition is required by the autocoder and the contents of this object are otherwise opaque to the autocoder. The
* contents are entirely up to the definition of the project. This reference application specifies hostname and port
* fields, which are derived by command line inputs.
*/
struct TopologyState {
const char* hostname; //!< Hostname for TCP communication
U16 port; //!< Port for TCP communication
CdhCore::SubtopologyState cdhCore; //!< Subtopology state for CdhCore
ComCcsds::SubtopologyState comCcsds; //!< Subtopology state for ComCcsds
DataProducts::SubtopologyState dataProducts; //!< Subtopology state for DataProducts
FileHandling::SubtopologyState fileHandling; //!< Subtopology state for FileHandling
};

namespace PingEntries = ::PingEntries;
namespace PingEntries = ::PingEntries;
} // namespace Ref
#endif
2 changes: 1 addition & 1 deletion Ref/Top/instances.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ module Ref {

instance linuxTimer: Svc.LinuxTimer base id 0x10024000

instance comDriver: Drv.TcpClient base id 0x10025000
instance comDriver: Drv.TcpClient base id 0x10025000

}
2 changes: 1 addition & 1 deletion Ref/Top/topology.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Ref {
import ComCcsds.Subtopology
import FileHandling.Subtopology
import DataProducts.Subtopology

# ----------------------------------------------------------------------
# Instances used in the topology
# ----------------------------------------------------------------------
Expand Down
73 changes: 36 additions & 37 deletions Ref/test/int/int_config.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
{
"Svc.ActiveRateGroup" : "Ref.rateGroup1Comp",
"Svc.CommandDispatcher" : "CdhCore.cmdDisp",
"Svc.CmdSequencer" : "Ref.cmdSeq",
"Svc.FileDownlink" : "FileHandling.fileDownlink",
"Svc.FileManager" : "FileHandling.fileManager",
"Svc.FileUplink" : "Ref.fileUplink",
"Ref.PingReceiver" : "Ref.pingRcvr",
"Svc.EventManager" : "CdhCore.events",
"Svc.TlmChan" : "Ref.tlmSend",
"Svc.PrmDb" : "FileHandling.prmDb",
"Svc.PrmDb.filename" : "/tmp/PrmDb.dat",
"Svc.DpCatalog" : "DataProducts.dpCat",
"Svc.DpManager" : "DataProducts.dpMgr",
"Svc.DpWriter" : "DataProducts.dpWriter",
"Svc.ComQueue" : "Ref.comQueue",
"Ref.TypeDemo" : "Ref.typeDemo",
"Svc.Health" : "CdhCore.health",
"Ref.SignalGen" : "Ref.SG1",
"Ref.SendBuff" : "Ref.sendBuffComp",
"Drv.TcpClient" : "Ref.comDriver",
"Svc.AssertFatalAdapter" : "Ref.fatalAdapter",
"Svc.FatalHandler" : "Ref.fatalHandler",
"Svc.BufferManager" : "Ref.commsBufferManager",
"Svc.PosixTime" : "Ref.posixTime",
"Svc.RateGroupDriver" : "Ref.rateGroupDriverComp",
"Ref.RecvBuff" : "Ref.recvBuffComp",
"Svc.Version" : "CdhCore.version",
"Svc.PassiveTextLogger" : "Ref.textLogger",
"Svc.SystemResources" : "Ref.systemResources",
"Svc.BufferManager" : "Ref.dpBufferManager",
"Svc.FrameAccumulator" : "Ref.frameAccumulator",
"Svc.FprimeDeframer" : "Ref.deframer",
"Svc.FprimeRouter" : "Ref.fprimeRouter",
"Svc.FprimeFramer" : "Ref.fprimeFramer",
"Svc.ComStub" : "Ref.comStub"
}

"Svc.ActiveRateGroup": "Ref.rateGroup1Comp",
"Svc.CommandDispatcher": "CdhCore.cmdDisp",
"Svc.CmdSequencer": "Ref.cmdSeq",
"Svc.FileDownlink": "FileHandling.fileDownlink",
"Svc.FileManager": "FileHandling.fileManager",
"Svc.FileUplink": "Ref.fileUplink",
"Ref.PingReceiver": "Ref.pingRcvr",
"Svc.EventManager": "CdhCore.events",
"Svc.TlmChan": "Ref.tlmSend",
"Svc.PrmDb": "FileHandling.prmDb",
"Svc.PrmDb.filename": "/tmp/PrmDb.dat",
"Svc.DpCatalog": "DataProducts.dpCat",
"Svc.DpManager": "DataProducts.dpMgr",
"Svc.DpWriter": "DataProducts.dpWriter",
"Svc.ComQueue": "Ref.comQueue",
"Ref.TypeDemo": "Ref.typeDemo",
"Svc.Health": "CdhCore.health",
"Ref.SignalGen": "Ref.SG1",
"Ref.SendBuff": "Ref.sendBuffComp",
"Drv.TcpClient": "Ref.comDriver",
"Svc.AssertFatalAdapter": "Ref.fatalAdapter",
"Svc.FatalHandler": "Ref.fatalHandler",
"Svc.BufferManager": "Ref.commsBufferManager",
"Svc.PosixTime": "Ref.posixTime",
"Svc.RateGroupDriver": "Ref.rateGroupDriverComp",
"Ref.RecvBuff": "Ref.recvBuffComp",
"Svc.Version": "CdhCore.version",
"Svc.PassiveTextLogger": "Ref.textLogger",
"Svc.SystemResources": "Ref.systemResources",
"Svc.BufferManager": "Ref.dpBufferManager",
"Svc.FrameAccumulator": "Ref.frameAccumulator",
"Svc.FprimeDeframer": "Ref.deframer",
"Svc.FprimeRouter": "Ref.fprimeRouter",
"Svc.FprimeFramer": "Ref.framer",
"Svc.ComStub": "Ref.comStub"
}
2 changes: 1 addition & 1 deletion Svc/Subtopologies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ add_custom_target(
Svc_Subtopologies_DataProducts
Svc_Subtopologies_DataProducts_DataProductsConfig
Svc_Subtopologies_ComLoggerTee
)
)
83 changes: 53 additions & 30 deletions Svc/Subtopologies/ComCcsds/ComCcsds.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,38 +90,49 @@ module ComCcsds {
"""
}

instance fprimeRouter: Svc.FprimeRouter base id ComCcsdsConfig.BASE_ID + 0x03000 \

instance comStub: Svc.ComStub base id ComCcsdsConfig.BASE_ID + 0x04000 \
instance fprimeRouter: Svc.FprimeRouter base id ComCcsdsConfig.BASE_ID + 0x03000

instance tcDeframer: Svc.Ccsds.TcDeframer base id ComCcsdsConfig.BASE_ID + 0x05000 \
instance tcDeframer: Svc.Ccsds.TcDeframer base id ComCcsdsConfig.BASE_ID + 0x04000

instance spacePacketDeframer: Svc.Ccsds.SpacePacketDeframer base id ComCcsdsConfig.BASE_ID + 0x06000 \
instance spacePacketDeframer: Svc.Ccsds.SpacePacketDeframer base id ComCcsdsConfig.BASE_ID + 0x05000
# NOTE: name 'framer' is used for the framer that connects to the Com Adapter Interface for better subtopology interoperability
instance framer: Svc.Ccsds.TmFramer base id ComCcsdsConfig.BASE_ID + 0x06000

instance tmFramer: Svc.Ccsds.TmFramer base id ComCcsdsConfig.BASE_ID + 0x07000 \
instance spacePacketFramer: Svc.Ccsds.SpacePacketFramer base id ComCcsdsConfig.BASE_ID + 0x07000

instance spacePacketFramer: Svc.Ccsds.SpacePacketFramer base id ComCcsdsConfig.BASE_ID + 0x08000 \
instance apidManager: Svc.Ccsds.ApidManager base id ComCcsdsConfig.BASE_ID + 0x08000

instance comStub: Svc.ComStub base id ComCcsdsConfig.BASE_ID + 0x09000

topology FramingSubtopology {
# Usage Note:
#
# When importing this subtopology, users shall establish 5 port connections with a component implementing
# the Svc.Com (Svc/Interfaces/Com.fpp) interface. They are as follows:
#
# 1) Outputs:
# - ComCcsds.framer.dataOut -> [Svc.Com].dataIn
# - ComCcsds.frameAccumulator.dataReturnOut -> [Svc.Com].dataReturnIn
# 2) Inputs:
# - [Svc.Com].dataReturnOut -> ComCcsds.framer.dataReturnIn
# - [Svc.Com].comStatusOut -> ComCcsds.framer.comStatusIn
# - [Svc.Com].dataOut -> ComCcsds.frameAccumulator.dataIn

instance apidManager: Svc.Ccsds.ApidManager base id ComCcsdsConfig.BASE_ID + 0x09000 \

topology Subtopology {
# Active Components
instance comQueue

# Passive Components
instance commsBufferManager
instance frameAccumulator
instance fprimeRouter
instance comStub
instance tcDeframer
instance spacePacketDeframer
instance tmFramer
instance framer
instance spacePacketFramer
instance apidManager

connections Downlink {


# ComQueue <-> SpacePacketFramer
comQueue.dataOut -> spacePacketFramer.dataIn
spacePacketFramer.dataReturnOut -> comQueue.dataReturnIn
Expand All @@ -130,27 +141,22 @@ module ComCcsds {
spacePacketFramer.bufferDeallocate -> commsBufferManager.bufferSendIn
spacePacketFramer.getApidSeqCount -> apidManager.getApidSeqCountIn
# SpacePacketFramer <-> TmFramer
spacePacketFramer.dataOut -> tmFramer.dataIn
tmFramer.dataReturnOut -> spacePacketFramer.dataReturnIn
# Framer <-> ComStub
tmFramer.dataOut -> comStub.dataIn
comStub.dataReturnOut -> tmFramer.dataReturnIn
spacePacketFramer.dataOut -> framer.dataIn
framer.dataReturnOut -> spacePacketFramer.dataReturnIn
# ComStatus
comStub.comStatusOut -> tmFramer.comStatusIn
tmFramer.comStatusOut -> spacePacketFramer.comStatusIn
spacePacketFramer.comStatusOut -> comQueue.comStatusIn
framer.comStatusOut -> spacePacketFramer.comStatusIn
spacePacketFramer.comStatusOut -> comQueue.comStatusIn
# (Outgoing) Framer <-> ComInterface connections shall be established by the user
}

connections Uplink {
# ComStub <-> FrameAccumulator
comStub.dataOut -> frameAccumulator.dataIn
frameAccumulator.dataReturnOut -> comStub.dataReturnIn
# (Incoming) ComInterface <-> FrameAccumulator connections shall be established by the user
# FrameAccumulator buffer allocations
frameAccumulator.bufferDeallocate -> commsBufferManager.bufferSendIn
frameAccumulator.bufferAllocate -> commsBufferManager.bufferGetCallee
# FrameAccumulator <-> Deframer
frameAccumulator.dataOut -> tcDeframer.dataIn
tcDeframer.dataReturnOut -> frameAccumulator.dataReturnIn
# FrameAccumulator <-> TcDeframer
frameAccumulator.dataOut -> tcDeframer.dataIn
tcDeframer.dataReturnOut -> frameAccumulator.dataReturnIn
# TcDeframer <-> SpacePacketDeframer
tcDeframer.dataOut -> spacePacketDeframer.dataIn
spacePacketDeframer.dataReturnOut -> tcDeframer.dataReturnIn
Expand All @@ -162,8 +168,25 @@ module ComCcsds {
# Router buffer allocations
fprimeRouter.bufferAllocate -> commsBufferManager.bufferGetCallee
fprimeRouter.bufferDeallocate -> commsBufferManager.bufferSendIn

}
} # end FramingSubtopology

# This subtopology uses FramingSubtopology with a ComStub component for Com Interface
topology Subtopology {
import FramingSubtopology

instance comStub

connections ComStub {
# Framer <-> ComStub (Downlink)
ComCcsds.framer.dataOut -> comStub.dataIn
comStub.dataReturnOut -> ComCcsds.framer.dataReturnIn
comStub.comStatusOut -> ComCcsds.framer.comStatusIn

# ComStub <-> FrameAccumulator (Uplink)
comStub.dataOut -> ComCcsds.frameAccumulator.dataIn
ComCcsds.frameAccumulator.dataReturnOut -> comStub.dataReturnIn
}
} # end Subtopology

} # end topology
} # end ComCcsds Subtopology
} # end ComCcsds
Loading
Loading