GCC Code Coverage Report


Directory: ./
File: build-fprime-automatic-native/F-Prime/default/config/CommandDispatcherImplCfg.hpp
Date: 2026-11-03 22:10:14
Exec Total Coverage
Lines: 2 2 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /*
2 * CmdDispatcherImplCfg.hpp
3 *
4 * Created on: May 6, 2015
5 * Author: tcanham
6 */
7
8 #ifndef CMDDISPATCHER_COMMANDDISPATCHERIMPLCFG_HPP_
9 #define CMDDISPATCHER_COMMANDDISPATCHERIMPLCFG_HPP_
10
11 #include <Fw/FPrimeBasicTypes.hpp>
12
13 // Define configuration values for dispatcher
14
15 enum {
16 CMD_DISPATCHER_DISPATCH_TABLE_SIZE = 150, // !< The size of the table holding opcodes to dispatch
17 CMD_DISPATCHER_SEQUENCER_TABLE_SIZE = 25, // !< The size of the table holding commands in progress
18 };
19
20 namespace Svc {
21 namespace CmdDispatcherCfg {
22
23 //! Include command opcodes in events when true.
24 //! When false, opcode fields are set to the maximum FwOpcodeType value.
25 constexpr bool IncludeCommandOpcodesInEvents = true;
26
27 //! Map a command opcode to the value reported in events.
28 //!
29 //! Every command opcode emitted in an event by Svc::CmdDispatcher and the sequencers passes through this function.
30 //! Projects may replace the body with a more elaborate mapping (e.g. a lookup table or lightweight obfuscation);
31 //! it must be deterministic and must not allocate.
32 451 inline FwOpcodeType getEventOpcode(const FwOpcodeType opcode) {
33 451 return IncludeCommandOpcodesInEvents ? opcode : std::numeric_limits<FwOpcodeType>::max();
34 }
35
36 //! Default for whether a sequence command is dispatched when the sequence tracker table is full.
37 //! Per-instance override: CommandDispatcherImpl::configure(bool).
38 constexpr bool EXECUTE_WHEN_SEQUENCE_TABLE_FULL_DEFAULT = false;
39
40 } // namespace CmdDispatcherCfg
41 } // namespace Svc
42
43 #endif /* CMDDISPATCHER_COMMANDDISPATCHERIMPLCFG_HPP_ */
44