Multiplexing video data and telemetry via downlink #2985
Replies: 4 comments 10 replies
-
The CCSDS protocols you mentioned are something we have had on our radar for some time, and the community seems eager to adopt them as well. For these reasons we are seriously considering how we could integrate them in the framework. We have had an effort that had us investigate how integrating those into the framework could look like, and this is where these PRs you found are coming from. #2900 is improving the deframing/routing stack by making deframers easier to implement and swap in, swap out and chain up. We will be picking up that work shortly. As for USLP, it does look very promising. We added it to our roadmap, but unsure how it will be prioritized vs. the other protocols that have been around for a little longer. The past few months we have had to spend a lot of effort onto releasing v3.5.0 on time for our October workshop, so that ate a lot of our time. Hopefully we'll get back to CCSDS soon, but this is also pending some internal prioritization of the work that I can't speak for at the moment... Hopefully that clears things up a little! |
Beta Was this translation helpful? Give feedback.
-
@LeStarch The fork that I've started developing on can be found here note that its very much a WIP however I'm planning on doing a cleanup tomorrow |
Beta Was this translation helpful? Give feedback.
-
I figure I'd update progress on my end here. Basically I've iterated on the existing ccsds data link layer implementation. The current implementation accounts for functional components outlined in the TM SpaceDataLink Spec with functional stratification derived from both that and other related specifications.
Right now I'm just handling test data that gets propagated through a local component for a loop back test, the data gets put into a virtual channel frame and "multiplexed" (there's only one virtual channel so the multiplexing is effectively just a pass through to a queue atm). Next step is apply refactoring to the deframer/TC side of things. Probably after that break things out into a hub model. @LeStarch my current work is probably past the peak churn point but there's a fair bit more to be done prior to merge (not least of which includes adding an sdd.md, unit tests and apply clangd with the correct config). |
Beta Was this translation helpful? Give feedback.
-
@LeStarch @gcgandhi I had to de-priortize this work for a bit so it took me longer than I'd thought to come back but just hacked together a little proof of concept and I've got the full TM chain working and muxing 3 virtual channels. I haven't added much in the way of robustness and I do a lot of excessive copies and stuff that made sense for development but less so for production however in adhering to the spec I ended up with some mechanisms that may be useful. For example is I send frames between channels using the priority queue like this: // "Pull" a frame from a queue that contains buffers which can extract them
template <typename ChannelTemplateConfig>
bool ChannelBase<ChannelTemplateConfig>::pullFrame(Queue_t& queue, FPrimeTransferFrame& frame) {
Os::Queue::Status qStatus;
bool status;
// NOTE this is a hugely inefficient way of sending the channel info around.
// This is just done for now as a convinient mechanism for testing out the architecture.
// TODO replace with either a standard queue or queued component interfaces + buffer memory management
serialBuffer.resetDeser();
serialBuffer.setBuffLen(frame.SERIALIZED_SIZE);
FwQueuePriorityType currentPriority = m_priority;
FwSizeType actualSize;
qStatus =
queue.receive(serialBuffer.getBuffAddr(), frame.SERIALIZED_SIZE, m_blockType, actualSize, currentPriority);
FW_ASSERT(qStatus == Os::Queue::Status::OP_OK, qStatus);
FW_ASSERT(actualSize == static_cast<FwSizeType>(FPrimeTransferFrame::SERIALIZED_SIZE), actualSize,
static_cast<FwSizeType>(FPrimeTransferFrame::SERIALIZED_SIZE));
status = frame.extract(serialBuffer);
FW_ASSERT(status);
return true;
}
template <typename ChannelTemplateConfig>
bool ChannelBase<ChannelTemplateConfig>::pushFrame(Queue_t& queue, FPrimeTransferFrame& frame) {
Os::Queue::Status qStatus;
bool status;
// NOTE this is a hugely inefficient way of sending the channel info around.
// This is just done for now as a convinient mechanism for testing out the architecture.
// TODO replace with either a standard queue or queued component interfaces + buffer memory management
serialBuffer.setBuffLen(frame.SERIALIZED_SIZE);
serialBuffer.resetSer();
status = frame.insert(serialBuffer);
FW_ASSERT(status);
qStatus = queue.send(serialBuffer.getBuffAddr(), frame.SERIALIZED_SIZE, m_priority, m_blockType);
FW_ASSERT(qStatus == Os::Queue::Status::OP_OK, qStatus);
return true;
}
Note I took this approach because my immediate goals were: I figured if I got those done then flattening the layers and reducing my copying would be easier rather than starting with a restrictive but performant design and trying to make that work for my con-ops. I'm now going to be moving a bit in that direction and while considering whether each channel should be made into a component (passive for Vc's active queues for MC's) I realized it may have wider implications for our development that might be worth sharing. E.g. The channels could possibly be used to create a multiple producer, single consumer queue (or mpmc depending on how its configured). I thought that might be useful as a mechanism for this issue and I wonder if @zimri-leisher or @timcanham had thoughts on that. I'd be curious to hear your thoughts and once its a bit more cleaned up I'd be happy to make an MR if desired. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I've been working on a flight software project in which one of the necessary features is to multiplex video data alongside telemetry. Originally originally the plan was to create some custom component to leverage one of ffpmegs muxers and to combine a video stream with a subset of the system's telemetry and then send that via a queue to a component which would interface with the transport layer.
This seemed doable and would provide a lot of control over bandwidth use and performance but at the same time it would come with the downsides that the output would no longer be something that fprime-gds or yamcs would be able to understand.
However after doing some research I came across CCSDS and in particular found that the Space Packet Protocol (SPP) and the Unified Space Data Link Protocol (USLP), the former of which seeming more light weight but with only a few mentions of multiplexing support and the later seeming to have a lot but possibly being a bit more heavy weight and beastly to contend with.
Simultaneously I've seen that there is already work ongoing on both the fprime and fprime-gds side of things which seems promising.
To that end I'd be curious what is driving that and if there might be some insight to be gained in how this can be leverage for my use case and if so how I could contribute.
Beta Was this translation helpful? Give feedback.
All reactions