Back to Fprime

Svc::CmdSplitter Component

Svc/CmdSplitter/docs/sdd.md

4.2.24.0 KB
Original Source

Svc::CmdSplitter Component

1. Introduction

The Svc::CmdSplitter splits an uplinked command execution to two separate Svc::CmdDispatcher components: one "local" and the other "remote". This splitting is done by opcode where local commands are commands whose opcode is less than a configured base and remote commands are those opcodes equal to or larger than that configurated base setting. Svc::CmdSplitter is intended to be used as part of the hub pattern to route command to a command dispatcher in the remote deployment.

All input and output are done through port arrays that mirror the port array of input commands to the command dispatcher. In this way Svc::CmdSplitter may support multiple command sources in the same manner that Svc::CmdDispatcher does.

2. Requirements

The requirements for Svc::CmdSplitter are as follows:

RequirementDescriptionVerification Method
SVC-CMD-SPLITTER-000The Svc::CmdSplitter component shall support multiple command sources.Unit Test
SVC-CMD-SPLITTER-001The Svc::CmdSplitter component shall accept incoming command buffers.Unit Test
SVC-CMD-SPLITTER-002The Svc::CmdSplitter component shall route commands under a configured value to the "local" port.Unit Test
SVC-CMD-SPLITTER-003The Svc::CmdSplitter component shall route commands under a configured value to the "remote" port.Unit Test
SVC-CMD-SPLITTER-004The Svc::CmdSplitter component shall route commands to the "local" port when an error occurs.Unit Test
SVC-CMD-SPLITTER-005The Svc::CmdSplitter component shall forward command status responses.Unit Test

3. Design

3.1 Ports

NameTypeKindDescription
CmdBuffFw.Comsync input arrayArray of incoming command buffer.
seqCmdStatusFw.CmdResponsesync input arrayArray of incoming command status from both local and remote dispatchers.
LocalCmdFw.Comoutput arrayArray of outgoing command buffer for local command dispatcher.
RemoteCmdFw.Comoutput arrayArray of outgoing command buffer for remote command dispatcher.
forwardSeqCmdStatusFw.CmdResponseoutput arrayArray of outgoing forwarded command status.

Port arrays mirror those of the command dispatcher in order to support multiple sources in the same fashion that command dispatcher does.

3.2 Functional Description

The Svc::CmdSplitter routes an incoming command buffer of type Fw::ComBuffer to a local or remote command dispatcher. This is done by comparing the command's opcode to the configured base opcode value. All command responses are forwarded through.

3.1 State

Svc::CmdSplitter has only one internal state variable: m_remoteBase the configured base opcode for remote opcodes. This is set by a call to the configure() method at system start-up.

3.2 Algorithms

Svc::CmdSplitter has no significant algorithms.

4. Unit Testing

To see unit test coverage run fprime-util check --coverage in the Svc::CmdSplitter directory

5. Change Log

DateDescription
2023-06-12Initial
2023-09-27Support multiple command inputs