Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break Apart Deframer #2763

Open
2 tasks
LeStarch opened this issue Jun 7, 2024 · 1 comment
Open
2 tasks

Break Apart Deframer #2763

LeStarch opened this issue Jun 7, 2024 · 1 comment
Assignees
Labels
enhancement EPIC Container for related issues

Comments

@LeStarch
Copy link
Collaborator

LeStarch commented Jun 7, 2024

F´ Version
Affected Component

Feature Description

The Deframer is performing several peices:

  1. It reassembles frames
  2. It calls custom deframing via a subclass
  3. It routes data to F´ components.

On modern projects, we have seen the following needs that the deframer cannot support.

  1. Custom deframing needs to use custom port calls (e.g. call out to a helper component, database component, etc)
  2. Routing to F´ components often needs to be customized
  3. Reassembly is optional (e.g. a packet radio is already produces complete frames)

Thus we will break the deframer into 3 F´ items:

  1. An optional accumulator that takes in byte streams and outputs complete frames in Fw::Buffer: Build A Frame Reassembler #2764
  2. A deframer interface that allows custom deframing to a standard component "drop in":
  3. A router implementation for basic F´ constructs:

EPIC Subtasks

@LeStarch LeStarch added the EPIC Container for related issues label Jun 7, 2024
@thomas-bc thomas-bc linked a pull request Sep 30, 2024 that will close this issue
1 task
@matt392code
Copy link
Contributor

Proposed Deframer Interface:
deframer-interface.txt
Proposed basic F Prime router implementation:
uplink-router(1).txt
Proposed implementation file for the UplinkRouter:
uplink-router-cpp.txt
Let me explain the key aspects of this implementation:

  1. DeframerInterface (deframer-interface.hpp):
  • Pure virtual interface for custom deframing implementations
  • Defines key methods that must be implemented:
    • deframe(): Process incoming frame data
    • getPacketType(): Extract packet type from deframed data
    • validateFrame(): Validate frame before processing
  • Status codes for deframing operations
  • Clean separation of concerns focusing only on deframing
  1. UplinkRouter (uplink-router.hpp and uplink-router.cpp):
  • Handles routing of deframed packets to F Prime components
  • Supports command and file packet types
  • Maintains statistics on routed packets
  • Follows F Prime component patterns
  • Key features:
    • Command packet routing via ComBuffer
    • File packet routing with proper buffer management
    • Error handling and logging
    • Port connection validation

The design achieves several goals:

  1. Separation of concerns between deframing and routing
  2. Flexibility for custom deframing implementations
  3. Standard interface for F Prime integration
  4. Clean error handling and logging
  5. Statistics tracking for monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement EPIC Container for related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants