fprime/Svc/ComQueue/ComQueue.fpp
Thomas Boyer-Chammard c3b2e04880
Use data return pattern on Uplink and standardize port names (#3546)
* First pass at Svc + TcpClient implementation

* Revert FileUplink changes

* Add copy (with allocation/deallocation) to FprimeRouter to simplify buffer management

* Update FprimeRouter UTs

* Update FprimeDeframer UTs

* Update FrameAccumulator UTs

* Update ComStub UTs

* Update missing Drv and UTs

* Update ComInterface to use ComDataWithContext on output

* Update Ref/RPI topology

* Fix spelling

* Fix test typo

* Update Udp component and UTs

* Rename data ports and standardize "Return" naming pattern

* Fix variable name

* Adapt UTs

* Update Communication Adapter Interface docs

* Full SDD updates

* Spelling &  nits and details

* Put formatting back to original

* Update Deframer interface to include bufferReturn

* Address review comments
2025-05-08 10:54:54 -07:00

79 lines
2.6 KiB
Fortran

module Svc {
@ An enumeration of queue data types
enum QueueType { COM_QUEUE, BUFFER_QUEUE }
@ Array of queue depths for Fw::Com types
array ComQueueDepth = [ComQueueComPorts] U32
@ Array of queue depths for Fw::Buffer types
array BuffQueueDepth = [ComQueueBufferPorts] U32
@ Component used to queue buffer types
active component ComQueue {
# ----------------------------------------------------------------------
# General ports
# ----------------------------------------------------------------------
@ Port for emitting data ready to be sent
output port dataOut: Svc.ComDataWithContext
@ Port for receiving the status signal
async input port comStatusIn: Fw.SuccessCondition
@ Port array for receiving Fw::ComBuffers
async input port comPacketQueueIn: [ComQueueComPorts] Fw.Com drop
@ Port array for receiving Fw::Buffers
async input port bufferQueueIn: [ComQueueBufferPorts] Fw.BufferSend hook
@ Port array for returning ownership of Fw::Buffer to its original sender
output port bufferReturnOut: [ComQueueBufferPorts] Fw.BufferSend
@ Port for receiving Fw::Buffer whose ownership needs to be handed back
sync input port dataReturnIn: Svc.ComDataWithContext
@ Port for scheduling telemetry output
async input port run: Svc.Sched drop
# ----------------------------------------------------------------------
# Special ports
# ----------------------------------------------------------------------
@ Port for emitting events
event port Log
@ Port for emitting text events
text event port LogText
@ Port for getting the time
time get port Time
@ Port for emitting telemetry
telemetry port Tlm
# ----------------------------------------------------------------------
# Events
# ----------------------------------------------------------------------
@ Queue overflow event
event QueueOverflow(
queueType: QueueType @< The Queue data type
index: U32 @< index of overflowed queue
) \
severity warning high \
format "The {} queue at index {} overflowed"
# ----------------------------------------------------------------------
# Telemetry
# ----------------------------------------------------------------------
@ Depth of queues of Fw::ComBuffer type
telemetry comQueueDepth: ComQueueDepth id 0
@ Depth of queues of Fw::Buffer type
telemetry buffQueueDepth: BuffQueueDepth id 1
}
}