Merge pull request #912 from LeStarch/update/cmake-and-fpp-are-now-friends

lestarch: integrate FPP and CMake
This commit is contained in:
M Starch 2021-09-01 11:22:59 -07:00 committed by GitHub
commit 2bc9d80759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
183 changed files with 998 additions and 7450 deletions

View File

@ -542,6 +542,7 @@ formatline
foundin
fpconfighpp
FPGA
FPL
fpl
FPL
fpp
@ -934,6 +935,8 @@ memcheck
memcmp
memcpy
memname
memoization
memoize
memoizing
memset
MEMTEST
@ -1007,8 +1010,8 @@ ncsl
NDELAY
ndiffs
netdb
Netscape
Netscape's
Netscape
newloc
newroot
newself
@ -1066,8 +1069,8 @@ odo
oflag
okidocki
oldeol
OMG
OMG's
OMG
onchange
onlinepubs
OParg
@ -1326,6 +1329,7 @@ saveop
saxutils
sbb
SBF
sbt
sbin
sched
schem
@ -1570,6 +1574,7 @@ textui
tfile
tflat
tfn
tgz
thepihut
Thhmmss
thiscol
@ -1644,8 +1649,8 @@ tt
ttype
Tuszynski
TXD
typedef
typedef'ed
typedef
typeid
typeinfo
typelist
@ -1743,6 +1748,7 @@ weakref
website
Werror
Wextra
wget
whitebox
whitelist
wiki

View File

@ -25,6 +25,9 @@ xmi:id="[^"]*"
# uuid:
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
# github hash
[a-f0-9]{40}
# https://www.gnu.org/software/groff/manual/groff.html
# man troff content
\\f[BCIPR]

View File

@ -88,13 +88,13 @@ jobs:
path: ci-logs.tar.gz
retention-days: 5
CMake:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install fprime tools
run: pip3 install fprime-tools fprime-gds
- name: CMake Tests
working-directory: ./cmake/test
run: pytest
# CMake:
# runs-on: ubuntu-latest
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v2
# - name: Install fprime tools
# run: pip3 install fprime-tools fprime-gds
# - name: CMake Tests
# working-directory: ./cmake/test
# run: pytest

View File

@ -30,6 +30,9 @@ extraction:
- "python3 -m venv ./fprime-venv"
- ". ./fprime-venv/bin/activate"
- "pip install fprime-tools fprime-gds"
- "wget https://github.com/sbt/sbt/releases/download/v1.5.5/sbt-1.5.5.tgz"
- "tar -xf sbt-1.5.5.tgz"
- 'export PATH="$PATH:${PWD}/sbt/bin"'
configure:
command:
before_index:

View File

@ -44,12 +44,4 @@ set(UT_SOURCE_FILES
register_fprime_ut()
# ac.ini needs to be copied into Autocode directory
if (CMAKE_BUILD_TYPE STREQUAL "TESTING" AND NOT __FPRIME_NO_UT_GEN__)
add_custom_target(py_ac_test_stress_ac_ini
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_LIST_DIR}/Autocode
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/ac.ini ${CMAKE_CURRENT_LIST_DIR}/Autocode
)
add_dependencies(${MODULE_NAME}_ut_exe py_ac_test_stress_ac_ini)
endif()
file(COPY ${CMAKE_CURRENT_LIST_DIR}/ac.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

View File

@ -1,86 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
BlockDriverComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Drv" name="BlockDriver" kind="active">
<comment>
An example block driver component with data buffers and interrupts
</comment>
<import_port_type>Drv/DataTypes/DataBufferPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_port_type>Svc/Cycle/CyclePortAi.xml</import_port_type>
<import_port_type>Svc/Ping/PingPortAi.xml</import_port_type>
<import_port_type>Svc/Sched/SchedPortAi.xml</import_port_type>
<ports>
<port name="BufferIn" data_type="Drv::DataBuffer" kind="async_input" max_number="1" full="assert">
<comment>
The input data buffer port
</comment>
</port>
<port name="BufferOut" data_type="Drv::DataBuffer" kind="output" max_number="1">
<comment>
The output data buffer port
</comment>
</port>
<port name="CycleOut" data_type="Svc::Cycle" kind="output" max_number="1">
<comment>
The cycle outputs. Meant to be connected to rate group driver
</comment>
</port>
<port name="PingIn" data_type="Svc::Ping" kind="async_input" max_number="1" full="assert">
<comment>
Input ping port
</comment>
</port>
<port name="PingOut" data_type="Svc::Ping" kind="output" max_number="1">
<comment>
Output ping port
</comment>
</port>
<port name="Sched" data_type="Svc::Sched" kind="async_input" max_number="1" full="assert">
<comment>
The rate group scheduler input
</comment>
</port>
<port name="Time" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Time get port
</comment>
</port>
<port name="Tlm" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
<comment>
Telemetry port
</comment>
</port>
</ports>
<internal_interfaces>
<internal_interface name="InterruptReport" priority="1" full="assert">
<comment>
Internal interrupt reporting interface
</comment>
<args>
<arg name="interrupt" type="U32">
<comment>
The interrupt register value
</comment>
</arg>
</args>
</internal_interface>
</internal_interfaces>
<telemetry>
<channel id="0x0" name="BD_Cycles" data_type="U32" update="always">
<comment>
Driver cycle count
</comment>
</channel>
</telemetry>
</component>

View File

@ -6,7 +6,7 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/BlockDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/BlockDriver.fpp"
"${CMAKE_CURRENT_LIST_DIR}/BlockDriverImpl.cpp"
)

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="ByteStreamDriverModel" kind="passive" namespace="Drv" modeler="true">
<import_port_type>Fw/Buffer/BufferGetPortAi.xml</import_port_type>
<import_port_type>Fw/Buffer/BufferSendPortAi.xml</import_port_type>
<import_port_type>Drv/ByteStreamDriverModel/ByteStreamSendPortAi.xml</import_port_type>
<import_port_type>Drv/ByteStreamDriverModel/ByteStreamRecvPortAi.xml</import_port_type>
<import_port_type>Drv/ByteStreamDriverModel/ByteStreamPollPortAi.xml</import_port_type>
<import_port_type>Drv/ByteStreamDriverModel/ByteStreamReadyPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<ports>
<!-- Functional ports -->
<port name="recv" data_type="Drv::ByteStreamRecv" kind="output" max_number="1">
</port>
<port name="send" data_type="Drv::ByteStreamSend" kind="guarded_input" max_number="1">
</port>
<port name="poll" data_type="Drv::ByteStreamPoll" kind="guarded_input" max_number="1">
</port>
<port name="ready" data_type="Drv::ByteStreamReady" kind="output" max_number="1">
</port>
<!-- Buffer request port used for incoming data -->
<port name="allocate" data_type="Fw::BufferGet" kind="output" max_number="1">
</port>
<!-- Buffer request port used for outgoing data return -->
<port name="deallocate" data_type="Fw::BufferSend" kind="output" max_number="1">
</port>
</ports>
</component>

View File

@ -32,8 +32,12 @@ module Drv {
ref pollBuffer: Fw.Buffer
) -> PollStatus
port ByteStreamReady()
passive component ByteStreamDriverModel {
output port ready: Drv.ByteStreamReady
output port $recv: Drv.ByteStreamRecv
guarded input port send: Drv.ByteStreamSend

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ByteStreamDriverModelComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Drv" name="ByteStreamDriverModel" kind="passive">
<import_port_type>Drv/ByteStreamDriverModel/ByteStreamPollPortAi.xml</import_port_type>
<import_port_type>Drv/ByteStreamDriverModel/ByteStreamRecvPortAi.xml</import_port_type>
<import_port_type>Drv/ByteStreamDriverModel/ByteStreamSendPortAi.xml</import_port_type>
<import_port_type>Fw/Buffer/BufferGetPortAi.xml</import_port_type>
<import_port_type>Fw/Buffer/BufferSendPortAi.xml</import_port_type>
<ports>
<port name="allocate" data_type="Fw::BufferGet" kind="output" max_number="1"/>
<port name="deallocate" data_type="Fw::BufferSend" kind="output" max_number="1"/>
<port name="poll" data_type="Drv::ByteStreamPoll" kind="guarded_input" max_number="1"/>
<port name="recv" data_type="Drv::ByteStreamRecv" kind="output" max_number="1"/>
<port name="send" data_type="Drv::ByteStreamSend" kind="guarded_input" max_number="1"/>
</ports>
</component>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ByteStreamPollPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Drv" name="ByteStreamPoll">
<import_enum_type>Drv/ByteStreamDriverModel/PollStatusEnumAi.xml</import_enum_type>
<include_header>Fw/Buffer/Buffer.hpp</include_header>
<args>
<arg name="pollBuffer" type="Fw::Buffer" pass_by="reference"/>
</args>
<return type="Drv::PollStatus"/>
</interface>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface name="ByteStreamReady" namespace="Drv">
</interface>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ByteStreamRecvPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Drv" name="ByteStreamRecv">
<import_enum_type>Drv/ByteStreamDriverModel/RecvStatusEnumAi.xml</import_enum_type>
<include_header>Fw/Buffer/Buffer.hpp</include_header>
<args>
<arg name="recvBuffer" type="Fw::Buffer" pass_by="reference"/>
<arg name="recvStatus" type="Drv::RecvStatus"/>
</args>
</interface>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ByteStreamSendPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Drv" name="ByteStreamSend">
<import_enum_type>Drv/ByteStreamDriverModel/SendStatusEnumAi.xml</import_enum_type>
<include_header>Fw/Buffer/Buffer.hpp</include_header>
<args>
<arg name="sendBuffer" type="Fw::Buffer" pass_by="reference"/>
</args>
<return type="Drv::SendStatus"/>
</interface>

View File

@ -6,14 +6,7 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/ByteStreamRecvPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/ByteStreamSendPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/ByteStreamPollPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/PollStatusEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/RecvStatusEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/SendStatusEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/ByteStreamReadyPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/ByteStreamDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/ByteStreamDriverModel.fpp"
)
register_fprime_module()

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
PollStatusEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Drv" name="PollStatus" serialize_type="I32" default="POLL_OK">
<item name="POLL_OK" value="0" comment="Poll successfully received data"/>
<item name="POLL_RETRY" value="1" comment="No data available, retry later"/>
<item name="POLL_ERROR" value="2" comment="Error received when polling"/>
</enum>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
RecvStatusEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Drv" name="RecvStatus" serialize_type="I32" default="RECV_OK">
<item name="RECV_OK" value="0" comment="Receive worked as expected"/>
<item name="RECV_ERROR" value="1" comment="Receive error occurred retrying may succeed"/>
</enum>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
SendStatusEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Drv" name="SendStatus" serialize_type="I32" default="SEND_OK">
<item name="SEND_OK" value="0" comment="Send worked as expected"/>
<item name="SEND_RETRY" value="1" comment="Data send should be retried"/>
<item name="SEND_ERROR" value="2" comment="Send error occurred retrying may succeed"/>
</enum>

View File

@ -6,7 +6,7 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/DataBufferPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/DataTypes.fpp"
"${CMAKE_CURRENT_LIST_DIR}/DataBuffer.cpp"
)

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
DataBufferPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Drv" name="DataBuffer">
<comment>
Data Buffer Port
</comment>
<include_header>Drv/DataTypes/DataBuffer.hpp</include_header>
<args>
<arg name="buff" type="Drv::DataBuffer" pass_by="reference">
<comment>
A data buffer
</comment>
</arg>
</args>
</interface>

View File

@ -6,7 +6,6 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/../ByteStreamDriverModel/ByteStreamDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/TcpClientComponentImpl.cpp"
)
@ -21,7 +20,7 @@ register_fprime_module()
### UTs ###
set(UT_SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/../ByteStreamDriverModel/ByteStreamDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/../ByteStreamDriverModel/ByteStreamDriverModel.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/TestMain.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
)
@ -29,4 +28,4 @@ set(UT_MOD_DEPS
STest
PortSelector
)
register_fprime_ut()
#register_fprime_ut()

View File

@ -12,6 +12,7 @@
#include <Drv/TcpClient/TcpClientComponentImpl.hpp>
#include "Fw/Types/BasicTypes.hpp"
#include "Fw/Types/Assert.hpp"
namespace Drv {

View File

@ -16,7 +16,7 @@
#include <Drv/Ip/IpSocket.hpp>
#include <Drv/Ip/SocketReadTask.hpp>
#include <Drv/Ip/TcpClientSocket.hpp>
#include "Drv/ByteStreamDriverModel/ByteStreamDriverComponentAc.hpp"
#include "Drv/ByteStreamDriverModel/ByteStreamDriverModelComponentAc.hpp"
namespace Drv {

View File

@ -6,7 +6,6 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/../ByteStreamDriverModel/ByteStreamDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/TcpServerComponentImpl.cpp"
)
@ -21,7 +20,7 @@ register_fprime_module()
### UTs ###
set(UT_SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/../ByteStreamDriverModel/ByteStreamDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/../ByteStreamDriverModel/ByteStreamDriverModel.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/TestMain.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
)
@ -29,4 +28,4 @@ set(UT_MOD_DEPS
STest
PortSelector
)
register_fprime_ut()
#register_fprime_ut()

View File

@ -12,6 +12,7 @@
#include <Drv/TcpServer/TcpServerComponentImpl.hpp>
#include "Fw/Types/BasicTypes.hpp"
#include "Fw/Types/Assert.hpp"
namespace Drv {

View File

@ -17,7 +17,7 @@
#include <Drv/Ip/IpSocket.hpp>
#include <Drv/Ip/SocketReadTask.hpp>
#include <Drv/Ip/TcpServerSocket.hpp>
#include "Drv/ByteStreamDriverModel/ByteStreamDriverComponentAc.hpp"
#include "Drv/ByteStreamDriverModel/ByteStreamDriverModelComponentAc.hpp"
namespace Drv {

View File

@ -6,7 +6,6 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/../ByteStreamDriverModel/ByteStreamDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/UdpComponentImpl.cpp"
)
@ -21,7 +20,7 @@ register_fprime_module()
### UTs ###
set(UT_SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/../ByteStreamDriverModel/ByteStreamDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/../ByteStreamDriverModel/ByteStreamDriverModel.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/TestMain.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
)
@ -29,4 +28,4 @@ set(UT_MOD_DEPS
STest
PortSelector
)
register_fprime_ut()
#register_fprime_ut()

View File

@ -13,6 +13,7 @@
#include <Drv/Udp/UdpComponentImpl.hpp>
#include <IpCfg.hpp>
#include "Fw/Types/BasicTypes.hpp"
#include "Fw/Types/Assert.hpp"
namespace Drv {

View File

@ -16,7 +16,7 @@
#include <Drv/Ip/IpSocket.hpp>
#include <Drv/Ip/SocketReadTask.hpp>
#include <Drv/Ip/UdpSocket.hpp>
#include "Drv/ByteStreamDriverModel/ByteStreamDriverComponentAc.hpp"
#include "Drv/ByteStreamDriverModel/ByteStreamDriverModelComponentAc.hpp"
namespace Drv {

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
BufferGetPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="BufferGet">
<include_header>Fw/Buffer/Buffer.hpp</include_header>
<args>
<arg name="size" type="U32"/>
</args>
<return type="Fw::Buffer"/>
</interface>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
BufferSendPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="BufferSend">
<include_header>Fw/Buffer/Buffer.hpp</include_header>
<args>
<arg name="fwBuffer" type="Fw::Buffer" pass_by="reference"/>
</args>
</interface>

View File

@ -6,8 +6,7 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/BufferGetPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/BufferSendPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/Buffer.fpp"
"${CMAKE_CURRENT_LIST_DIR}/Buffer.cpp"
)

View File

@ -11,10 +11,7 @@ set(MOD_DEPS
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/CmdArgBuffer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/CmdPacket.cpp"
"${CMAKE_CURRENT_LIST_DIR}/CmdPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/CmdRegPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/CmdResponseEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/CmdResponsePortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/Cmd.fpp"
"${CMAKE_CURRENT_LIST_DIR}/CmdString.cpp"
)
register_fprime_module()

View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
CmdPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="Cmd">
<comment>
Port for sending commands
</comment>
<include_header>Fw/Cmd/CmdArgBuffer.hpp</include_header>
<args>
<arg name="opCode" type="FwOpcodeType">
<comment>
Command Op Code
</comment>
</arg>
<arg name="cmdSeq" type="U32">
<comment>
Command Sequence
</comment>
</arg>
<arg name="args" type="Fw::CmdArgBuffer" pass_by="reference">
<comment>
Buffer containing arguments
</comment>
</arg>
</args>
</interface>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
CmdRegPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="CmdReg">
<comment>
Command registration port
</comment>
<args>
<arg name="opCode" type="FwOpcodeType">
<comment>
Command Op Code
</comment>
</arg>
</args>
</interface>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
CmdResponseEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Fw" name="CmdResponse" serialize_type="I32" default="OK">
<comment>
Enum representing a command response
</comment>
<item name="OK" value="0" comment="Command successfully executed"/>
<item name="INVALID_OPCODE" value="1" comment="Invalid opcode dispatched"/>
<item name="VALIDATION_ERROR" value="2" comment="Command failed validation"/>
<item name="FORMAT_ERROR" value="3" comment="Command failed to deserialize"/>
<item name="EXECUTION_ERROR" value="4" comment="Command had execution error"/>
<item name="BUSY" value="5" comment="Component busy"/>
</enum>

View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
CmdResponsePortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="CmdResponse">
<comment>
Port for sending command responses
</comment>
<import_enum_type>Fw/Cmd/CmdResponseEnumAi.xml</import_enum_type>
<args>
<arg name="opCode" type="FwOpcodeType">
<comment>
Command Op Code
</comment>
</arg>
<arg name="cmdSeq" type="U32">
<comment>
Command Sequence
</comment>
</arg>
<arg name="response" type="Fw::CmdResponse">
<comment>
The command response argument
</comment>
</arg>
</args>
</interface>

View File

@ -6,7 +6,7 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/ComPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/Com.fpp"
"${CMAKE_CURRENT_LIST_DIR}/ComPacket.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ComBuffer.cpp"
)

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ComPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="Com">
<comment>
Port for passing communication packet buffers
</comment>
<include_header>Fw/Com/ComBuffer.hpp</include_header>
<args>
<arg name="data" type="Fw::ComBuffer" pass_by="reference">
<comment>
Buffer containing packet data
</comment>
</arg>
<arg name="context" type="U32">
<comment>
Call context value; meaning chosen by user
</comment>
</arg>
</args>
</interface>

View File

@ -11,10 +11,8 @@ set(MOD_DEPS
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LogBuffer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogPacket.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LogSeverityEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/Log.fpp"
"${CMAKE_CURRENT_LIST_DIR}/LogString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogTextPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/TextLogString.cpp"
)

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
LogPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="Log">
<comment>
Event log port
</comment>
<import_enum_type>Fw/Log/LogSeverityEnumAi.xml</import_enum_type>
<include_header>Fw/Log/LogBuffer.hpp</include_header>
<include_header>Fw/Time/Time.hpp</include_header>
<args>
<arg name="id" type="FwEventIdType">
<comment>
Log ID
</comment>
</arg>
<arg name="timeTag" type="Fw::Time" pass_by="reference">
<comment>
Time Tag
</comment>
</arg>
<arg name="severity" type="Fw::LogSeverity">
<comment>
The severity argument
</comment>
</arg>
<arg name="args" type="Fw::LogBuffer" pass_by="reference">
<comment>
Buffer containing serialized log entry
</comment>
</arg>
</args>
</interface>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
LogSeverityEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Fw" name="LogSeverity" serialize_type="I32" default="FATAL">
<comment>
Enum representing event severity
</comment>
<item name="FATAL" value="1" comment="A fatal non-recoverable event"/>
<item name="WARNING_HI" value="2" comment="A serious but recoverable event"/>
<item name="WARNING_LO" value="3" comment="A less serious but recoverable event"/>
<item name="COMMAND" value="4" comment="An activity related to commanding"/>
<item name="ACTIVITY_HI" value="5" comment="Important informational events"/>
<item name="ACTIVITY_LO" value="6" comment="Less important informational events"/>
<item name="DIAGNOSTIC" value="7" comment="Software diagnostic events"/>
</enum>

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
LogTextPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="LogText">
<comment>
Text event log port
Use for development and debugging, turn off for flight
</comment>
<import_enum_type>Fw/Log/LogSeverityEnumAi.xml</import_enum_type>
<include_header>Fw/Log/TextLogString.hpp</include_header>
<include_header>Fw/Time/Time.hpp</include_header>
<args>
<arg name="id" type="FwEventIdType">
<comment>
Log ID
</comment>
</arg>
<arg name="timeTag" type="Fw::Time" pass_by="reference">
<comment>
Time Tag
</comment>
</arg>
<arg name="severity" type="Fw::LogSeverity">
<comment>
The severity argument
</comment>
</arg>
<arg name="text" type="Fw::TextLogString" pass_by="reference">
<comment>
Text of log message
</comment>
</arg>
</args>
</interface>

View File

@ -6,10 +6,8 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/ParamValidEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/Prm.fpp"
"${CMAKE_CURRENT_LIST_DIR}/PrmBuffer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/PrmGetPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/PrmSetPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/PrmString.cpp"
)

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ParamValidEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Fw" name="ParamValid" serialize_type="I32" default="UNINIT">
<comment>
Enum representing parameter validity
</comment>
<item name="UNINIT" value="0"/>
<item name="VALID" value="1"/>
<item name="INVALID" value="2"/>
<item name="DEFAULT" value="3"/>
</enum>

View File

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
PrmGetPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="PrmGet">
<comment>
Port for getting a parameter
</comment>
<import_enum_type>Fw/Prm/ParamValidEnumAi.xml</import_enum_type>
<include_header>Fw/Prm/ParamBuffer.hpp</include_header>
<args>
<arg name="id" type="FwPrmIdType">
<comment>
Parameter ID
</comment>
</arg>
<arg name="val" type="Fw::ParamBuffer" pass_by="reference">
<comment>
Buffer containing serialized parameter value
</comment>
</arg>
</args>
<return type="Fw::ParamValid"/>
</interface>

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
PrmSetPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="PrmSet">
<comment>
Port for setting a parameter
</comment>
<include_header>Fw/Prm/ParamBuffer.hpp</include_header>
<args>
<arg name="id" type="FwPrmIdType">
<comment>
Parameter ID
</comment>
</arg>
<arg name="val" type="Fw::ParamBuffer" pass_by="reference">
<comment>
Buffer containing serialized parameter value
</comment>
</arg>
</args>
</interface>

View File

@ -6,7 +6,7 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/TimePortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/Time.fpp"
"${CMAKE_CURRENT_LIST_DIR}/Time.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Time.cpp"
)

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
TimePortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="Time">
<comment>
Time port
</comment>
<include_header>Fw/Time/Time.hpp</include_header>
<args>
<arg name="time" type="Fw::Time" pass_by="reference">
<comment>
The U32 cmd argument
</comment>
</arg>
</args>
</interface>

View File

@ -9,8 +9,7 @@ set(MOD_DEPS
Fw/Com
)
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/TlmPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/TlmGetPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/Tlm.fpp"
"${CMAKE_CURRENT_LIST_DIR}/TlmBuffer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TlmPacket.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TlmString.cpp"
@ -28,4 +27,4 @@ set(UT_MOD_DEPS
"${FPRIME_FRAMEWORK_PATH}/Fw/Time"
"${FPRIME_FRAMEWORK_PATH}/Fw/Types"
)
register_fprime_ut()
register_fprime_ut()

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
TlmGetPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="TlmGet">
<comment>
Port for getting telemetry
</comment>
<include_header>Fw/Time/Time.hpp</include_header>
<include_header>Fw/Tlm/TlmBuffer.hpp</include_header>
<args>
<arg name="id" type="FwChanIdType">
<comment>
Telemetry Channel ID
</comment>
</arg>
<arg name="timeTag" type="Fw::Time" pass_by="reference">
<comment>
Time Tag
</comment>
</arg>
<arg name="val" type="Fw::TlmBuffer" pass_by="reference">
<comment>
Buffer containing serialized telemetry value
</comment>
</arg>
</args>
</interface>

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
TlmPortAi.xml
Generated by fpp-to-xml
====================================================================== -->
<interface namespace="Fw" name="Tlm">
<comment>
Port for sending telemetry
</comment>
<include_header>Fw/Time/Time.hpp</include_header>
<include_header>Fw/Tlm/TlmBuffer.hpp</include_header>
<args>
<arg name="id" type="FwChanIdType">
<comment>
Telemetry Channel ID
</comment>
</arg>
<arg name="timeTag" type="Fw::Time" pass_by="reference">
<comment>
Time Tag
</comment>
</arg>
<arg name="val" type="Fw::TlmBuffer" pass_by="reference">
<comment>
Buffer containing serialized telemetry value
</comment>
</arg>
</args>
</interface>

View File

@ -6,19 +6,15 @@
#
# Note: using PROJECT_NAME as EXECUTABLE_NAME
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/Assert.cpp"
set(SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Assert.cpp"
"${CMAKE_CURRENT_LIST_DIR}/BasicTypes.cpp"
"${CMAKE_CURRENT_LIST_DIR}/DeserialStatusEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/EightyCharString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/EnabledEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/Types.fpp"
"${CMAKE_CURRENT_LIST_DIR}/String.cpp"
"${CMAKE_CURRENT_LIST_DIR}/InternalInterfaceString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/MallocAllocator.cpp"
"${CMAKE_CURRENT_LIST_DIR}/MemAllocator.cpp"
"${CMAKE_CURRENT_LIST_DIR}/PolyType.cpp"
"${CMAKE_CURRENT_LIST_DIR}/SerialBuffer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/SerialStatusEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/Serializable.cpp"
"${CMAKE_CURRENT_LIST_DIR}/StringType.cpp"
"${CMAKE_CURRENT_LIST_DIR}/StringUtils.cpp"

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
DeserialStatusEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Fw" name="DeserialStatus" serialize_type="I32" default="OK">
<comment>
Deserialization status
</comment>
<item name="OK" value="0"/>
<item name="BUFFER_EMPTY" value="3" comment="Deserialization buffer was empty when trying to read data"/>
<item name="FORMAT_ERROR" value="4" comment="Deserialization data had incorrect values (unexpected data types)"/>
<item name="SIZE_MISMATCH" value="5" comment="Data was left in in the buffer, but not enough to deserialize"/>
<item name="TYPE_MISMATCH" value="6" comment="Deserialized type ID didn't match"/>
</enum>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
EnabledEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Fw" name="Enabled" serialize_type="I32" default="DISABLED">
<comment>
Enabled and disabled states
</comment>
<item name="DISABLED" value="0" comment="Disabled state"/>
<item name="ENABLED" value="1" comment="Enabled state"/>
</enum>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
SerialStatusEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Fw" name="SerialStatus" serialize_type="I32" default="OK">
<comment>
Serialization status
</comment>
<item name="OK" value="0" comment="Serialization operation succeeded"/>
<item name="FORMAT_ERROR" value="1" comment="Data was the wrong format (e.g. wrong packet type)"/>
<item name="NO_ROOM_LEFT" value="2" comment="No room left in the buffer to serialize data"/>
</enum>

View File

@ -8,7 +8,7 @@
# Basic module dependencies
set(MOD_DEPS
"${CMAKE_THREAD_LIBS_INIT}"
${CMAKE_THREAD_LIBS_INIT}
Fw/Cfg
Fw/Types
Fw/Logger

View File

@ -22,7 +22,7 @@
<import_component_type>Svc/RateGroupDriver/RateGroupDriverComponentAi.xml</import_component_type>
<import_component_type>Svc/FileDownlink/FileDownlinkComponentAi.xml</import_component_type>
<import_component_type>Svc/PassiveConsoleTextLogger/PassiveTextLoggerComponentAi.xml</import_component_type>
<import_component_type>Drv/ByteStreamDriverModel/ByteStreamDriverComponentAi.xml</import_component_type>
<import_component_type>Drv/ByteStreamDriverModel/ByteStreamDriverModelComponentAi.xml</import_component_type>
<import_component_type>Svc/StaticMemory/StaticMemoryComponentAi.xml</import_component_type>
<import_component_type>Svc/Framer/FramerComponentAi.xml</import_component_type>
<import_component_type>Svc/Deframer/DeframerComponentAi.xml</import_component_type>
@ -31,7 +31,6 @@
<import_component_type>Drv/LinuxSpiDriver/LinuxSpiDriverComponentAi.xml</import_component_type>
<import_component_type>RPI/RpiDemo/RpiDemoComponentAi.xml</import_component_type>
<import_component_type>Drv/ByteStreamDriverModel/ByteStreamDriverComponentAi.xml</import_component_type>
<!-- Declare component instances - must match names in Components.hpp -->

View File

@ -6,7 +6,7 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/PingReceiverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/PingReceiver.fpp"
"${CMAKE_CURRENT_LIST_DIR}/PingReceiverComponentImpl.cpp"
)
register_fprime_module()

View File

@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
PingReceiverComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Ref" name="PingReceiver" kind="active">
<comment>
A rate group active component with input and output ping ports
</comment>
<import_port_type>Fw/Cmd/CmdPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdRegPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdResponsePortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_port_type>Svc/Ping/PingPortAi.xml</import_port_type>
<ports>
<port name="CmdDisp" data_type="Fw::Cmd" kind="input" role="Cmd" max_number="1">
<comment>
Command receive port
</comment>
</port>
<port name="CmdReg" data_type="Fw::CmdReg" kind="output" role="CmdRegistration" max_number="1">
<comment>
Command registration port
</comment>
</port>
<port name="CmdStatus" data_type="Fw::CmdResponse" kind="output" role="CmdResponse" max_number="1">
<comment>
Command response port
</comment>
</port>
<port name="Log" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Event port
</comment>
</port>
<port name="LogText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Text event port
</comment>
</port>
<port name="PingIn" data_type="Svc::Ping" kind="async_input" max_number="1" full="assert">
<comment>
The ping input port
</comment>
</port>
<port name="PingOut" data_type="Svc::Ping" kind="output" max_number="1">
<comment>
The ping input port
</comment>
</port>
<port name="Time" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Time get port
</comment>
</port>
<port name="Tlm" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
<comment>
Telemetry port
</comment>
</port>
</ports>
<commands>
<command kind="async" opcode="0x0" mnemonic="PR_StopPings" full="assert">
<comment>
Command to disable ping response
</comment>
</command>
</commands>
<events>
<event id="0x0" name="PR_PingsDisabled" severity="ACTIVITY_HI" format_string="PingReceiver ping responses disabled">
<comment>
Disabled ping responses
</comment>
</event>
<event id="0x1" name="PR_PingReceived" severity="DIAGNOSTIC" format_string="PingReceiver pinged with code %u">
<comment>
Got ping
</comment>
<args>
<arg name="code" type="U32">
<comment>
Ping code
</comment>
</arg>
</args>
</event>
</events>
<telemetry>
<channel id="0x0" name="PR_NumPings" data_type="U32" update="always">
<comment>
Number of pings received
</comment>
</channel>
</telemetry>
</component>

View File

@ -6,10 +6,8 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/RecvBuffComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/PacketStatSerializableAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/RecvBuffApp.fpp"
"${CMAKE_CURRENT_LIST_DIR}/RecvBuffComponentImpl.cpp"
"${CMAKE_CURRENT_LIST_DIR}/PacketRecvStatusEnumAi.xml"
)
set(MOD_DEPS "Os" "Fw/Cmd")

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
PacketRecvStatusEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Ref" name="PacketRecvStatus" serialize_type="I32" default="PACKET_STATE_NO_PACKETS">
<comment>
Packet receive status
</comment>
<item name="PACKET_STATE_NO_PACKETS" value="0"/>
<item name="PACKET_STATE_OK" value="1"/>
<item name="PACKET_STATE_ERRORS" value="3" comment="Receiver has seen errors"/>
</enum>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
PacketStatSerializableAi.xml
Generated by fpp-to-xml
====================================================================== -->
<serializable namespace="Ref" name="PacketStat">
<comment>
Some Packet Statistics
</comment>
<import_enum_type>Ref/RecvBuffApp/PacketRecvStatusEnumAi.xml</import_enum_type>
<members>
<member name="BuffRecv" type="U32" format="%u" comment="Number of buffers received">
<default>0</default>
</member>
<member name="BuffErr" type="U32" format="%u" comment="Number of buffers received with errors">
<default>0</default>
</member>
<member name="PacketStatus" type="Ref::PacketRecvStatus" format="%s" comment="Packet Status">
<default>Ref::PacketRecvStatus::PACKET_STATE_NO_PACKETS</default>
</member>
</members>
</serializable>

View File

@ -1,158 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
RecvBuffComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Ref" name="RecvBuff" kind="passive">
<comment>
A rate group active component with input and output scheduler ports
</comment>
<import_port_type>Drv/DataTypes/DataBufferPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdRegPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdResponsePortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Prm/PrmGetPortAi.xml</import_port_type>
<import_port_type>Fw/Prm/PrmSetPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_serializable_type>Ref/RecvBuffApp/PacketStatSerializableAi.xml</import_serializable_type>
<ports>
<port name="CmdDisp" data_type="Fw::Cmd" kind="input" role="Cmd" max_number="1">
<comment>
Command receive port
</comment>
</port>
<port name="CmdReg" data_type="Fw::CmdReg" kind="output" role="CmdRegistration" max_number="1">
<comment>
Command registration port
</comment>
</port>
<port name="CmdStatus" data_type="Fw::CmdResponse" kind="output" role="CmdResponse" max_number="1">
<comment>
Command response port
</comment>
</port>
<port name="Data" data_type="Drv::DataBuffer" kind="sync_input" max_number="1">
<comment>
The data buffer input
</comment>
</port>
<port name="Log" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Event port
</comment>
</port>
<port name="LogText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Text event port
</comment>
</port>
<port name="ParamGet" data_type="Fw::PrmGet" kind="output" role="ParamGet" max_number="1">
<comment>
A port for getting parameter values
</comment>
</port>
<port name="ParamSet" data_type="Fw::PrmSet" kind="output" role="ParamSet" max_number="1">
<comment>
A port for setting parameter values
</comment>
</port>
<port name="Time" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Time get port
</comment>
</port>
<port name="Tlm" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
<comment>
Telemetry port
</comment>
</port>
</ports>
<events>
<event id="0x0" name="FirstPacketReceived" severity="ACTIVITY_LO" format_string="First packet ID %u received">
<comment>
First packet received
</comment>
<args>
<arg name="id" type="U32">
<comment>
The ID argument
</comment>
</arg>
</args>
</event>
<event id="0x1" name="PacketChecksumError" severity="WARNING_HI" format_string="Packet ID %u had checksum error">
<comment>
Packet checksum error
</comment>
<args>
<arg name="id" type="U32">
<comment>
The ID argument
</comment>
</arg>
</args>
</event>
<event id="0x2" name="BuffRecvParameterUpdated" severity="ACTIVITY_LO" format_string="BuffRecv Parameter %u was updated">
<comment>
Report parameter update
</comment>
<args>
<arg name="id" type="U32">
<comment>
The ID argument
</comment>
</arg>
</args>
</event>
</events>
<parameters>
<parameter id="0x0" set_opcode="0x0" save_opcode="0x1" name="parameter1" data_type="U32" default="10">
<comment>
A test parameter
</comment>
</parameter>
<parameter id="0x1" set_opcode="0x2" save_opcode="0x3" name="parameter2" data_type="I16" default="11">
<comment>
A test parameter
</comment>
</parameter>
</parameters>
<telemetry>
<channel id="0x0" name="PktState" data_type="Ref::PacketStat" update="always">
<comment>
Packet Statistics
</comment>
</channel>
<channel id="0x1" name="Sensor1" data_type="F32" update="always" format_string="%.2fV">
<comment>
Value of Sensor1
</comment>
</channel>
<channel id="0x2" name="Sensor2" data_type="F32" update="always">
<comment>
Value of Sensor3
</comment>
</channel>
<channel id="0x3" name="Parameter1" data_type="U32" update="on_change">
<comment>
Readback of Parameter1
</comment>
</channel>
<channel id="0x4" name="Parameter2" data_type="I16" update="on_change" low_orange="-2" low_red="-3" low_yellow="-1" high_orange="2" high_red="3" high_yellow="1">
<comment>
Readback of Parameter2
</comment>
</channel>
</telemetry>
</component>

View File

@ -6,8 +6,7 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/SendBuffComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/SendBuffApp.fpp"
"${CMAKE_CURRENT_LIST_DIR}/SendBuffComponentImpl.cpp"
"${CMAKE_CURRENT_LIST_DIR}/SendBuff_ActiveStateEnumAi.xml"
)
register_fprime_module()

View File

@ -1,258 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
SendBuffComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Ref" name="SendBuff" kind="queued">
<comment>
A rate group active component with input and output scheduler ports
</comment>
<import_enum_type>Ref/SendBuffApp/SendBuff_ActiveStateEnumAi.xml</import_enum_type>
<import_port_type>Drv/DataTypes/DataBufferPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdRegPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdResponsePortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Prm/PrmGetPortAi.xml</import_port_type>
<import_port_type>Fw/Prm/PrmSetPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_port_type>Svc/Sched/SchedPortAi.xml</import_port_type>
<ports>
<port name="CmdDisp" data_type="Fw::Cmd" kind="input" role="Cmd" max_number="1">
<comment>
Command receive port
</comment>
</port>
<port name="CmdReg" data_type="Fw::CmdReg" kind="output" role="CmdRegistration" max_number="1">
<comment>
Command registration port
</comment>
</port>
<port name="CmdStatus" data_type="Fw::CmdResponse" kind="output" role="CmdResponse" max_number="1">
<comment>
Command response port
</comment>
</port>
<port name="Data" data_type="Drv::DataBuffer" kind="output" max_number="1">
<comment>
The data buffer output
</comment>
</port>
<port name="Log" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Event port
</comment>
</port>
<port name="LogText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Text event port
</comment>
</port>
<port name="ParamGet" data_type="Fw::PrmGet" kind="output" role="ParamGet" max_number="1">
<comment>
Param get port
</comment>
</port>
<port name="ParamSet" data_type="Fw::PrmSet" kind="output" role="ParamSet" max_number="1">
<comment>
Param set port
</comment>
</port>
<port name="SchedIn" data_type="Svc::Sched" kind="sync_input" max_number="1">
<comment>
The rate group scheduler input
</comment>
</port>
<port name="Time" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Time get port
</comment>
</port>
<port name="Tlm" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
<comment>
Telemetry port
</comment>
</port>
</ports>
<commands>
<command kind="async" opcode="0x0" mnemonic="SB_START_PKTS" full="assert">
<comment>
Command to start sending packets
</comment>
</command>
<command kind="async" opcode="0x1" mnemonic="SB_INJECT_PKT_ERROR" full="assert">
<comment>
Send a bad packet
</comment>
</command>
<command kind="async" opcode="0x2" mnemonic="SB_GEN_FATAL" full="assert">
<comment>
Generate a FATAL EVR
</comment>
<args>
<arg name="arg1" type="U32">
<comment>
First FATAL Argument
</comment>
</arg>
<arg name="arg2" type="U32">
<comment>
Second FATAL Argument
</comment>
</arg>
<arg name="arg3" type="U32">
<comment>
Third FATAL Argument
</comment>
</arg>
</args>
</command>
<command kind="async" opcode="0x3" mnemonic="SB_GEN_ASSERT" full="assert">
<comment>
Generate an ASSERT
</comment>
<args>
<arg name="arg1" type="U32">
<comment>
First ASSERT Argument
</comment>
</arg>
<arg name="arg2" type="U32">
<comment>
Second ASSERT Argument
</comment>
</arg>
<arg name="arg3" type="U32">
<comment>
Third ASSERT Argument
</comment>
</arg>
<arg name="arg4" type="U32">
<comment>
Fourth ASSERT Argument
</comment>
</arg>
<arg name="arg5" type="U32">
<comment>
Fifth ASSERT Argument
</comment>
</arg>
<arg name="arg6" type="U32">
<comment>
Sixth ASSERT Argument
</comment>
</arg>
</args>
</command>
</commands>
<events>
<event id="0x0" name="FirstPacketSent" severity="ACTIVITY_HI" format_string="First packet ID %u received">
<comment>
First packet send
</comment>
<args>
<arg name="id" type="U32">
<comment>
The ID argument
</comment>
</arg>
</args>
</event>
<event id="0x1" name="PacketErrorInserted" severity="WARNING_HI" format_string="Inserted error in packet ID %u">
<comment>
Packet checksum error
</comment>
<args>
<arg name="id" type="U32">
<comment>
The ID argument
</comment>
</arg>
</args>
</event>
<event id="0x2" name="BuffSendParameterUpdated" severity="ACTIVITY_LO" format_string="BuffSend Parameter %u was updated">
<comment>
Report parameter update
</comment>
<args>
<arg name="id" type="U32">
<comment>
The ID argument
</comment>
</arg>
</args>
</event>
<event id="0x3" name="SendBuffFatal" severity="FATAL" format_string="Test Fatal: %u %u %u">
<comment>
A test FATAL
</comment>
<args>
<arg name="arg1" type="U32">
<comment>
First FATAL argument
</comment>
</arg>
<arg name="arg2" type="U32">
<comment>
Second FATAL argument
</comment>
</arg>
<arg name="arg3" type="U32">
<comment>
Second FATAL argument
</comment>
</arg>
</args>
</event>
</events>
<parameters>
<parameter id="0x0" set_opcode="0xA" save_opcode="0xB" name="parameter3" data_type="U8" default="12">
<comment>
A test parameter
</comment>
</parameter>
<parameter id="0x1" set_opcode="0xC" save_opcode="0xD" name="parameter4" data_type="F32" default="13.14">
<comment>
A test parameter
</comment>
</parameter>
</parameters>
<telemetry>
<channel id="0x0" name="PacketsSent" data_type="U64" update="always">
<comment>
Number of packets sent
</comment>
</channel>
<channel id="0x1" name="NumErrorsInjected" data_type="U32" update="on_change">
<comment>
Number of errors injected
</comment>
</channel>
<channel id="0x2" name="Parameter3" data_type="U8" update="on_change">
<comment>
Readback of Parameter3
</comment>
</channel>
<channel id="0x3" name="Parameter4" data_type="F32" update="on_change">
<comment>
Readback of Parameter4
</comment>
</channel>
<channel id="0x4" name="SendState" data_type="Ref::SendBuff_ActiveState" update="always">
<comment>
Readback of Parameter4
</comment>
</channel>
</telemetry>
</component>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
SendBuff_ActiveStateEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Ref" name="SendBuff_ActiveState" serialize_type="I32" default="SEND_IDLE">
<comment>
Active state
</comment>
<item name="SEND_IDLE" value="0"/>
<item name="SEND_ACTIVE" value="1"/>
</enum>

View File

@ -6,19 +6,14 @@
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/SignalTypeEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/SignalSetArrayAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/SignalPairSerializableAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/SignalPairSetArrayAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/SignalInfoSerializableAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/SignalGenComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/SignalGen.fpp"
"${CMAKE_CURRENT_LIST_DIR}/SignalGen.cpp"
)
register_fprime_module()
### UTs ###
set(UT_SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/SignalGenComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/SignalGen.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/TestMain.cpp"
)

View File

@ -1,137 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
SignalGenComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Ref" name="SignalGen" kind="queued">
<comment>
A component for generating periodic signals
</comment>
<import_array_type>Ref/SignalGen/SignalPairSetArrayAi.xml</import_array_type>
<import_array_type>Ref/SignalGen/SignalSetArrayAi.xml</import_array_type>
<import_enum_type>Ref/SignalGen/SignalTypeEnumAi.xml</import_enum_type>
<import_port_type>Fw/Cmd/CmdPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdRegPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdResponsePortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_port_type>Svc/Sched/SchedPortAi.xml</import_port_type>
<import_serializable_type>Ref/SignalGen/SignalInfoSerializableAi.xml</import_serializable_type>
<import_serializable_type>Ref/SignalGen/SignalPairSerializableAi.xml</import_serializable_type>
<ports>
<port name="cmdIn" data_type="Fw::Cmd" kind="input" role="Cmd" max_number="1">
<comment>
Command received port
</comment>
</port>
<port name="cmdRegOut" data_type="Fw::CmdReg" kind="output" role="CmdRegistration" max_number="1">
<comment>
Command registration port
</comment>
</port>
<port name="cmdResponseOut" data_type="Fw::CmdResponse" kind="output" role="CmdResponse" max_number="1">
<comment>
Command response port
</comment>
</port>
<port name="logOut" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Event port
</comment>
</port>
<port name="logTextOut" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Text event port
</comment>
</port>
<port name="schedIn" data_type="Svc::Sched" kind="sync_input" max_number="1"/>
<port name="timeCaller" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Time get port
</comment>
</port>
<port name="tlmOut" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
<comment>
Telemetry port
</comment>
</port>
</ports>
<commands>
<command kind="async" opcode="0x0" mnemonic="SignalGen_Settings" full="assert">
<comment>
Signal Generator Settings
</comment>
<args>
<arg name="Frequency" type="U32"/>
<arg name="Amplitude" type="F32"/>
<arg name="Phase" type="F32"/>
<arg name="SigType" type="Ref::SignalType"/>
</args>
</command>
<command kind="async" opcode="0x1" mnemonic="SignalGen_Toggle" full="assert">
<comment>
Toggle Signal Generator On/Off.
</comment>
</command>
<command kind="async" opcode="0x2" mnemonic="SignalGen_Skip" full="assert">
<comment>
Skip next sample
</comment>
</command>
</commands>
<events>
<event id="0x0" name="SignalGen_SettingsChanged" severity="ACTIVITY_LO" format_string="Set Frequency(Hz) %u, Amplitude %f, Phase %f, Signal Type %s">
<comment>
Signal Generator Settings Changed
</comment>
<args>
<arg name="Frequency" type="U32"/>
<arg name="Amplitude" type="F32"/>
<arg name="Phase" type="F32"/>
<arg name="SignalType" type="Ref::SignalType"/>
</args>
</event>
</events>
<telemetry>
<channel id="0x0" name="Type" data_type="Ref::SignalType" update="always">
<comment>
Type of the output signal: SINE, TRIANGLE, etc.
</comment>
</channel>
<channel id="0x1" name="Output" data_type="F32" update="always" format_string="%.4f">
<comment>
Single Y value of the output
</comment>
</channel>
<channel id="0x2" name="PairOutput" data_type="Ref::SignalPair" update="always">
<comment>
Single (time, value) pair of the signal
</comment>
</channel>
<channel id="0x3" name="History" data_type="Ref::SignalSet" update="always">
<comment>
Last 10 Y values of the signal
</comment>
</channel>
<channel id="0x4" name="PairHistory" data_type="Ref::SignalPairSet" update="always">
<comment>
Last 10 (time, value) pairs of the signal
</comment>
</channel>
<channel id="0x5" name="Info" data_type="Ref::SignalInfo" update="always">
<comment>
Composite field of signal information, containing histories, pairs etc
</comment>
</channel>
</telemetry>
</component>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
SignalInfoSerializableAi.xml
Generated by fpp-to-xml
====================================================================== -->
<serializable namespace="Ref" name="SignalInfo">
<import_array_type>Ref/SignalGen/SignalPairSetArrayAi.xml</import_array_type>
<import_array_type>Ref/SignalGen/SignalSetArrayAi.xml</import_array_type>
<import_enum_type>Ref/SignalGen/SignalTypeEnumAi.xml</import_enum_type>
<members>
<member name="type" type="Ref::SignalType" format="%s">
<default>Ref::SignalType::TRIANGLE</default>
</member>
<member name="history" type="Ref::SignalSet" format="%s">
<default>Ref::SignalSet(0.0, 0.0, 0.0, 0.0)</default>
</member>
<member name="pairHistory" type="Ref::SignalPairSet" format="%s">
<default>Ref::SignalPairSet(Ref::SignalPair(0.0, 0.0), Ref::SignalPair(0.0, 0.0), Ref::SignalPair(0.0, 0.0), Ref::SignalPair(0.0, 0.0))</default>
</member>
</members>
</serializable>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
SignalPairSerializableAi.xml
Generated by fpp-to-xml
====================================================================== -->
<serializable namespace="Ref" name="SignalPair">
<members>
<member name="time" type="F32" format="%f">
<default>0.0</default>
</member>
<member name="value" type="F32" format="%f">
<default>0.0</default>
</member>
</members>
</serializable>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
SignalPairSetArrayAi.xml
Generated by fpp-to-xml
====================================================================== -->
<array namespace="Ref" name="SignalPairSet">
<import_serializable_type>Ref/SignalGen/SignalPairSerializableAi.xml</import_serializable_type>
<type>Ref::SignalPair</type>
<size>4</size>
<format>%s</format>
<default>
<value>Ref::SignalPair(0.0, 0.0)</value>
<value>Ref::SignalPair(0.0, 0.0)</value>
<value>Ref::SignalPair(0.0, 0.0)</value>
<value>Ref::SignalPair(0.0, 0.0)</value>
</default>
</array>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
SignalSetArrayAi.xml
Generated by fpp-to-xml
====================================================================== -->
<array namespace="Ref" name="SignalSet">
<type>F32</type>
<size>4</size>
<format>%f</format>
<default>
<value>0.0</value>
<value>0.0</value>
<value>0.0</value>
<value>0.0</value>
</default>
</array>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
SignalTypeEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Ref" name="SignalType" serialize_type="I32" default="TRIANGLE">
<item name="TRIANGLE" value="0"/>
<item name="SQUARE" value="1"/>
<item name="SINE" value="2"/>
<item name="NOISE" value="3"/>
</enum>

View File

@ -6,8 +6,10 @@
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/Main.cpp"
"${CMAKE_CURRENT_LIST_DIR}/RefTopologyAc.cpp"
"${CMAKE_CURRENT_LIST_DIR}/RefTopologyAppAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/instances.fpp"
"${CMAKE_CURRENT_LIST_DIR}/topology.fpp"
# "${CMAKE_CURRENT_LIST_DIR}/RefTopologyAc.cpp"
# "${CMAKE_CURRENT_LIST_DIR}/RefTopologyAppAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/RefTopologyDefs.cpp"
)
set(MOD_DEPS

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
CmdDispatcherEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Ref::Ports" name="CmdDispatcher">
<item name="sequencer" value="0"/>
<item name="uplink" value="1"/>
</enum>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
RateGroupsEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Ref::Ports" name="RateGroups" serialize_type="I32" default="rateGroup1">
<item name="rateGroup1" value="0"/>
<item name="rateGroup2" value="1"/>
<item name="rateGroup3" value="2"/>
</enum>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
StaticMemoryEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Ref::Ports" name="StaticMemory" serialize_type="I32" default="downlink">
<item name="downlink" value="0"/>
<item name="uplink" value="1"/>
</enum>

View File

@ -4,21 +4,17 @@ module Ref {
# Symbolic constants for port numbers
# ----------------------------------------------------------------------
module Ports {
enum RateGroups {
enum Ports_RateGroups {
rateGroup1
rateGroup2
rateGroup3
}
enum StaticMemory {
enum Ports_StaticMemory {
downlink
uplink
}
}
topology Ref {
# ----------------------------------------------------------------------
@ -85,11 +81,11 @@ module Ref {
eventLogger.PktSend -> downlink.comIn
fileDownlink.bufferSendOut -> downlink.bufferIn
downlink.framedAllocate -> staticMemory.bufferAllocate[Ports.StaticMemory.downlink]
downlink.framedAllocate -> staticMemory.bufferAllocate[Ports_StaticMemory.downlink]
downlink.framedOut -> comm.send
downlink.bufferDeallocate -> fileDownlink.bufferReturn
comm.deallocate -> staticMemory.bufferDeallocate[Ports.StaticMemory.downlink]
comm.deallocate -> staticMemory.bufferDeallocate[Ports_StaticMemory.downlink]
}
@ -103,21 +99,21 @@ module Ref {
blockDrv.CycleOut -> rateGroupDriverComp.CycleIn
# Rate group 1
rateGroupDriverComp.CycleOut[Ports.RateGroups.rateGroup1] -> rateGroup1Comp.CycleIn
rateGroupDriverComp.CycleOut[Ports_RateGroups.rateGroup1] -> rateGroup1Comp.CycleIn
rateGroup1Comp.RateGroupMemberOut[0] -> SG1.schedIn
rateGroup1Comp.RateGroupMemberOut[1] -> SG2.schedIn
rateGroup1Comp.RateGroupMemberOut[2] -> chanTlm.Run
rateGroup1Comp.RateGroupMemberOut[3] -> fileDownlink.Run
# Rate group 2
rateGroupDriverComp.CycleOut[Ports.RateGroups.rateGroup2] -> rateGroup2Comp.CycleIn
rateGroupDriverComp.CycleOut[Ports_RateGroups.rateGroup2] -> rateGroup2Comp.CycleIn
rateGroup2Comp.RateGroupMemberOut[0] -> cmdSeq.schedIn
rateGroup2Comp.RateGroupMemberOut[1] -> sendBuffComp.SchedIn
rateGroup2Comp.RateGroupMemberOut[2] -> SG3.schedIn
rateGroup2Comp.RateGroupMemberOut[3] -> SG4.schedIn
# Rate group 3
rateGroupDriverComp.CycleOut[Ports.RateGroups.rateGroup3] -> rateGroup3Comp.CycleIn
rateGroupDriverComp.CycleOut[Ports_RateGroups.rateGroup3] -> rateGroup3Comp.CycleIn
rateGroup3Comp.RateGroupMemberOut[0] -> $health.Run
rateGroup3Comp.RateGroupMemberOut[1] -> SG5.schedIn
rateGroup3Comp.RateGroupMemberOut[2] -> blockDrv.Sched
@ -137,9 +133,9 @@ module Ref {
connections Uplink {
comm.allocate -> staticMemory.bufferAllocate[Ports.StaticMemory.uplink]
comm.allocate -> staticMemory.bufferAllocate[Ports_StaticMemory.uplink]
comm.$recv -> uplink.framedIn
uplink.framedDeallocate -> staticMemory.bufferDeallocate[Ports.StaticMemory.uplink]
uplink.framedDeallocate -> staticMemory.bufferDeallocate[Ports_StaticMemory.uplink]
uplink.comOut -> cmdDisp.seqCmdBuff
cmdDisp.seqCmdStatus -> uplink.cmdResponseIn

View File

@ -1,218 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ActiveLoggerComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Svc" name="ActiveLogger" kind="active">
<comment>
A component for logging events
</comment>
<import_enum_type>Fw/Log/LogSeverityEnumAi.xml</import_enum_type>
<import_enum_type>Svc/ActiveLogger/ActiveLogger_EnabledEnumAi.xml</import_enum_type>
<import_enum_type>Svc/ActiveLogger/ActiveLogger_FilterSeverityEnumAi.xml</import_enum_type>
<import_port_type>Fw/Cmd/CmdPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdRegPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdResponsePortAi.xml</import_port_type>
<import_port_type>Fw/Com/ComPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Svc/Fatal/FatalEventPortAi.xml</import_port_type>
<import_port_type>Svc/Ping/PingPortAi.xml</import_port_type>
<include_header>Fw/Log/LogBuffer.hpp</include_header>
<include_header>Fw/Time/Time.hpp</include_header>
<ports>
<port name="CmdDisp" data_type="Fw::Cmd" kind="input" role="Cmd" max_number="1">
<comment>
Port for receiving commands
</comment>
</port>
<port name="CmdReg" data_type="Fw::CmdReg" kind="output" role="CmdRegistration" max_number="1">
<comment>
Port for sending command registration requests
</comment>
</port>
<port name="CmdStatus" data_type="Fw::CmdResponse" kind="output" role="CmdResponse" max_number="1">
<comment>
Port for sending command responses
</comment>
</port>
<port name="FatalAnnounce" data_type="Svc::FatalEvent" kind="output" max_number="1">
<comment>
FATAL event announce port
</comment>
</port>
<port name="Log" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Port for emitting events
</comment>
</port>
<port name="LogRecv" data_type="Fw::Log" kind="sync_input" max_number="1">
<comment>
Event input port
</comment>
</port>
<port name="LogText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Port for emitting text events
</comment>
</port>
<port name="PktSend" data_type="Fw::Com" kind="output" max_number="1">
<comment>
Packet send port
</comment>
</port>
<port name="Time" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Port for getting the time
</comment>
</port>
<port name="pingIn" data_type="Svc::Ping" kind="async_input" max_number="1" full="assert">
<comment>
Ping input port
</comment>
</port>
<port name="pingOut" data_type="Svc::Ping" kind="output" max_number="1">
<comment>
Ping output port
</comment>
</port>
</ports>
<internal_interfaces>
<internal_interface name="loqQueue" priority="1" full="drop">
<comment>
Internal interface to send log messages to component thread
</comment>
<args>
<arg name="id" type="FwEventIdType">
<comment>
Log ID
</comment>
</arg>
<arg name="timeTag" type="Fw::Time" pass_by="reference">
<comment>
Time Tag
</comment>
</arg>
<arg name="severity" type="Fw::LogSeverity">
<comment>
The severity argument
</comment>
</arg>
<arg name="args" type="Fw::LogBuffer" pass_by="reference">
<comment>
Buffer containing serialized log entry
</comment>
</arg>
</args>
</internal_interface>
</internal_interfaces>
<commands>
<command kind="sync" opcode="0x0" mnemonic="SET_EVENT_FILTER">
<comment>
Set filter for reporting events. Events are not stored in component.
</comment>
<args>
<arg name="filterLevel" type="Svc::ActiveLogger_FilterSeverity">
<comment>
Filter level
</comment>
</arg>
<arg name="filterEnabled" type="Svc::ActiveLogger_Enabled">
<comment>
Filter state
</comment>
</arg>
</args>
</command>
<command kind="async" opcode="0x2" mnemonic="SET_ID_FILTER" full="assert">
<comment>
Filter a particular ID
</comment>
<args>
<arg name="ID" type="U32"/>
<arg name="idFilterEnabled" type="Svc::ActiveLogger_Enabled">
<comment>
ID filter state
</comment>
</arg>
</args>
</command>
<command kind="async" opcode="0x3" mnemonic="DUMP_FILTER_STATE" full="assert">
<comment>
Dump the filter states via events
</comment>
</command>
</commands>
<events>
<event id="0x0" name="SEVERITY_FILTER_STATE" severity="ACTIVITY_LO" format_string="%s filter state. %d">
<comment>
Dump severity filter state
</comment>
<args>
<arg name="severity" type="Svc::ActiveLogger_FilterSeverity">
<comment>
The severity level
</comment>
</arg>
<arg name="enabled" type="bool"/>
</args>
</event>
<event id="0x1" name="ID_FILTER_ENABLED" severity="ACTIVITY_HI" format_string="ID %u is filtered.">
<comment>
Indicate ID is filtered
</comment>
<args>
<arg name="ID" type="U32">
<comment>
The ID filtered
</comment>
</arg>
</args>
</event>
<event id="0x2" name="ID_FILTER_LIST_FULL" severity="WARNING_LO" format_string="ID filter list is full. Cannot filter %u .">
<comment>
Attempted to add ID to full ID filter ID
</comment>
<args>
<arg name="ID" type="U32">
<comment>
The ID filtered
</comment>
</arg>
</args>
</event>
<event id="0x3" name="ID_FILTER_REMOVED" severity="ACTIVITY_HI" format_string="ID filter ID %u removed.">
<comment>
Removed an ID from the filter
</comment>
<args>
<arg name="ID" type="U32">
<comment>
The ID removed
</comment>
</arg>
</args>
</event>
<event id="0x4" name="ID_FILTER_NOT_FOUND" severity="WARNING_LO" format_string="ID filter ID %u not found.">
<comment>
ID not in filter
</comment>
<args>
<arg name="ID" type="U32">
<comment>
The ID removed
</comment>
</arg>
</args>
</event>
</events>
</component>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ActiveLogger_EnabledEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Svc" name="ActiveLogger_Enabled" serialize_type="I32" default="ENABLED">
<comment>
Enabled and disabled state
</comment>
<item name="ENABLED" value="0" comment="Enabled state"/>
<item name="DISABLED" value="1" comment="Disabled state"/>
</enum>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ActiveLogger_FilterSeverityEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Svc" name="ActiveLogger_FilterSeverity" serialize_type="I32" default="WARNING_HI">
<comment>
Severity level for event filtering
Similar to Fw::LogSeverity, but no FATAL event
</comment>
<item name="WARNING_HI" value="0" comment="Filter WARNING_HI events"/>
<item name="WARNING_LO" value="1" comment="Filter WARNING_LO events"/>
<item name="COMMAND" value="2" comment="Filter COMMAND events"/>
<item name="ACTIVITY_HI" value="3" comment="Filter ACTIVITY_HI events"/>
<item name="ACTIVITY_LO" value="4" comment="Filter ACTIVITY_LO events"/>
<item name="DIAGNOSTIC" value="5" comment="Filter DIAGNOSTIC events"/>
</enum>

View File

@ -7,10 +7,8 @@
# Note: using PROJECT_NAME as EXECUTABLE_NAME
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/ActiveLoggerComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/ActiveLogger.fpp"
"${CMAKE_CURRENT_LIST_DIR}/ActiveLoggerImpl.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ActiveLogger_EnabledEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/ActiveLogger_FilterSeverityEnumAi.xml"
)
register_fprime_module()
@ -19,7 +17,7 @@ set(UT_MOD_DEPS
Os_Stubs
)
set(UT_SOURCE_FILES
"${FPRIME_FRAMEWORK_PATH}/Svc/ActiveLogger/ActiveLoggerComponentAi.xml"
"${FPRIME_FRAMEWORK_PATH}/Svc/ActiveLogger/ActiveLogger.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/ActiveLoggerTester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/ActiveLoggerImplTester.cpp"
)

View File

@ -1,97 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ActiveRateGroupComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Svc" name="ActiveRateGroup" kind="active">
<comment>
A rate group active component with input and output scheduler ports
</comment>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_port_type>Svc/Cycle/CyclePortAi.xml</import_port_type>
<import_port_type>Svc/Ping/PingPortAi.xml</import_port_type>
<import_port_type>Svc/Sched/SchedPortAi.xml</import_port_type>
<ports>
<port name="CycleIn" data_type="Svc::Cycle" kind="async_input" max_number="1" full="drop">
<comment>
The rate group cycle input
</comment>
</port>
<port name="Log" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Event port for emitting events
</comment>
</port>
<port name="LogText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Event port for emitting text events
</comment>
</port>
<port name="PingIn" data_type="Svc::Ping" kind="async_input" max_number="1" full="assert">
<comment>
Ping input port for health
</comment>
</port>
<port name="PingOut" data_type="Svc::Ping" kind="output" max_number="1">
<comment>
Ping output port for health
</comment>
</port>
<port name="RateGroupMemberOut" data_type="Svc::Sched" kind="output" max_number="$ActiveRateGroupOutputPorts">
<comment>
Scheduler output port to rate group members
</comment>
</port>
<port name="Time" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
A port for getting the time
</comment>
</port>
<port name="Tlm" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
<comment>
A port for emitting telemetry
</comment>
</port>
</ports>
<events>
<event id="0x0" name="RateGroupStarted" severity="DIAGNOSTIC" format_string="Rate group started.">
<comment>
Informational event that rate group has started
</comment>
</event>
<event id="0x1" name="RateGroupCycleSlip" severity="WARNING_HI" format_string="Rate group cycle slipped on cycle %u">
<comment>
Warning event that rate group has had a cycle slip
</comment>
<args>
<arg name="cycle" type="U32">
<comment>
The cycle where the cycle occurred
</comment>
</arg>
</args>
</event>
</events>
<telemetry>
<channel id="0x0" name="RgMaxTime" data_type="U32" update="on_change" format_string="%u us">
<comment>
Max execution time rate group
</comment>
</channel>
<channel id="0x1" name="RgCycleSlips" data_type="U32" update="on_change">
<comment>
Cycle slips for rate group
</comment>
</channel>
</telemetry>
</component>

View File

@ -7,14 +7,14 @@
# Note: using PROJECT_NAME as EXECUTABLE_NAME
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/ActiveRateGroupComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/ActiveRateGroup.fpp"
"${CMAKE_CURRENT_LIST_DIR}/ActiveRateGroupImpl.cpp"
)
register_fprime_module()
### UTs ###
set(UT_SOURCE_FILES
"${FPRIME_FRAMEWORK_PATH}/Svc/ActiveRateGroup/ActiveRateGroupComponentAi.xml"
"${FPRIME_FRAMEWORK_PATH}/Svc/ActiveRateGroup/ActiveRateGroup.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/ActiveRateGroupTester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/ActiveRateGroupImplTester.cpp"
)

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
ActiveTextLoggerComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Svc" name="ActiveTextLogger" kind="active">
<comment>
A component for printing text logs to the console and optionally a file
</comment>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<ports>
<port name="TextLogger" data_type="Fw::LogText" kind="sync_input" max_number="1">
<comment>
Logging port
</comment>
</port>
</ports>
<internal_interfaces>
<internal_interface name="TextQueue" priority="1" full="drop">
<comment>
Internal interface to send log text messages to component thread
</comment>
<args>
<arg name="text" type="string" size="256" pass_by="reference">
<comment>
The text string
</comment>
</arg>
</args>
</internal_interface>
</internal_interfaces>
</component>

View File

@ -7,7 +7,7 @@
# Note: using PROJECT_NAME as EXECUTABLE_NAME
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/ActiveTextLoggerComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/ActiveTextLogger.fpp"
"${CMAKE_CURRENT_LIST_DIR}/ActiveTextLoggerImpl.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogFile.cpp"
)
@ -18,8 +18,8 @@ set(UT_MOD_DEPS
Os_Stubs
)
set(UT_SOURCE_FILES
"${FPRIME_FRAMEWORK_PATH}/Svc/ActiveTextLogger/ActiveTextLoggerComponentAi.xml"
"${FPRIME_FRAMEWORK_PATH}/Svc/ActiveTextLogger/ActiveTextLogger.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/ActiveTextLoggerTester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
)
register_fprime_ut()
register_fprime_ut()

View File

@ -1,284 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
AssertFatalAdapterComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Svc" name="AssertFatalAdapter" kind="passive">
<comment>
A component for turning FW_ASSERTs into FATALs
</comment>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<ports>
<port name="Log" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Port for emitting events
</comment>
</port>
<port name="LogText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Port for emitting text events
</comment>
</port>
<port name="Time" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Port for getting the time
</comment>
</port>
</ports>
<events>
<event id="0x0" name="AF_ASSERT_0" severity="FATAL" format_string="Assert in file %s, line %u">
<comment>
An assert happened
</comment>
<args>
<arg name="file" type="string" size="80">
<comment>
The source file of the assert
</comment>
</arg>
<arg name="line" type="U32">
<comment>
Line number of the assert
</comment>
</arg>
</args>
</event>
<event id="0x1" name="AF_ASSERT_1" severity="FATAL" format_string="Assert in file %s, line %u: %u">
<comment>
An assert happened
</comment>
<args>
<arg name="file" type="string" size="80">
<comment>
The source file of the assert
</comment>
</arg>
<arg name="line" type="U32">
<comment>
Line number of the assert
</comment>
</arg>
<arg name="arg1" type="U32">
<comment>
First assert argument
</comment>
</arg>
</args>
</event>
<event id="0x2" name="AF_ASSERT_2" severity="FATAL" format_string="Assert in file %s, line %u: %u %u">
<comment>
An assert happened
</comment>
<args>
<arg name="file" type="string" size="80">
<comment>
The source file of the assert
</comment>
</arg>
<arg name="line" type="U32">
<comment>
Line number of the assert
</comment>
</arg>
<arg name="arg1" type="U32">
<comment>
First assert argument
</comment>
</arg>
<arg name="arg2" type="U32">
<comment>
Second assert argument
</comment>
</arg>
</args>
</event>
<event id="0x3" name="AF_ASSERT_3" severity="FATAL" format_string="Assert in file %s, line %u: %u %u %u">
<comment>
An assert happened
</comment>
<args>
<arg name="file" type="string" size="80">
<comment>
The source file of the assert
</comment>
</arg>
<arg name="line" type="U32">
<comment>
Line number of the assert
</comment>
</arg>
<arg name="arg1" type="U32">
<comment>
First assert argument
</comment>
</arg>
<arg name="arg2" type="U32">
<comment>
Second assert argument
</comment>
</arg>
<arg name="arg3" type="U32">
<comment>
Third assert argument
</comment>
</arg>
</args>
</event>
<event id="0x4" name="AF_ASSERT_4" severity="FATAL" format_string="Assert in file %s, line %u: %u %u %u %u">
<comment>
An assert happened
</comment>
<args>
<arg name="file" type="string" size="80">
<comment>
The source file of the assert
</comment>
</arg>
<arg name="line" type="U32">
<comment>
Line number of the assert
</comment>
</arg>
<arg name="arg1" type="U32">
<comment>
First assert argument
</comment>
</arg>
<arg name="arg2" type="U32">
<comment>
Second assert argument
</comment>
</arg>
<arg name="arg3" type="U32">
<comment>
Third assert argument
</comment>
</arg>
<arg name="arg4" type="U32">
<comment>
Fourth assert argument
</comment>
</arg>
</args>
</event>
<event id="0x5" name="AF_ASSERT_5" severity="FATAL" format_string="Assert in file %s, line %u: %u %u %u %u %u">
<comment>
An assert happened
</comment>
<args>
<arg name="file" type="string" size="80">
<comment>
The source file of the assert
</comment>
</arg>
<arg name="line" type="U32">
<comment>
Line number of the assert
</comment>
</arg>
<arg name="arg1" type="U32">
<comment>
First assert argument
</comment>
</arg>
<arg name="arg2" type="U32">
<comment>
Second assert argument
</comment>
</arg>
<arg name="arg3" type="U32">
<comment>
Third assert argument
</comment>
</arg>
<arg name="arg4" type="U32">
<comment>
Fourth assert argument
</comment>
</arg>
<arg name="arg5" type="U32">
<comment>
Fifth assert argument
</comment>
</arg>
</args>
</event>
<event id="0x6" name="AF_ASSERT_6" severity="FATAL" format_string="Assert in file %s, line %u: %u %u %u %u %u %u">
<comment>
An assert happened
</comment>
<args>
<arg name="file" type="string" size="80">
<comment>
The source file of the assert
</comment>
</arg>
<arg name="line" type="U32">
<comment>
Line number of the assert
</comment>
</arg>
<arg name="arg1" type="U32">
<comment>
First assert argument
</comment>
</arg>
<arg name="arg2" type="U32">
<comment>
Second assert argument
</comment>
</arg>
<arg name="arg3" type="U32">
<comment>
Third assert argument
</comment>
</arg>
<arg name="arg4" type="U32">
<comment>
Fourth assert argument
</comment>
</arg>
<arg name="arg5" type="U32">
<comment>
Fifth assert argument
</comment>
</arg>
<arg name="arg6" type="U32">
<comment>
Sixth assert argument
</comment>
</arg>
</args>
</event>
<event id="0x7" name="AF_UNEXPECTED_ASSERT" severity="FATAL" format_string="Unexpected assert in file %s, line %u, args %u">
<comment>
An unexpected assert happened
</comment>
<args>
<arg name="file" type="string" size="80">
<comment>
The source file of the assert
</comment>
</arg>
<arg name="line" type="U32">
<comment>
Line number of the assert
</comment>
</arg>
<arg name="numArgs" type="U32">
<comment>
Number of unexpected arguments
</comment>
</arg>
</args>
</event>
</events>
</component>

View File

@ -7,7 +7,7 @@
# Note: using PROJECT_NAME as EXECUTABLE_NAME
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/AssertFatalAdapterComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/AssertFatalAdapter.fpp"
"${CMAKE_CURRENT_LIST_DIR}/AssertFatalAdapterComponentImpl.cpp"
)
@ -15,7 +15,7 @@ set(SOURCE_FILES
register_fprime_module()
# UTs ###
set(UT_SOURCE_FILES
"${FPRIME_FRAMEWORK_PATH}/Svc/AssertFatalAdapter/AssertFatalAdapterComponentAi.xml"
"${FPRIME_FRAMEWORK_PATH}/Svc/AssertFatalAdapter/AssertFatalAdapter.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/main.cpp"
)

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="BufferAccumulator" kind="active" namespace="Svc" modeler="true">
<import_port_type>Fw/Buffer/BufferSendPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdRegPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdResponsePortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Svc/Ping/PingPortAi.xml</import_port_type>
<import_port_type>Svc/Sched/SchedPortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_dictionary>Svc/BufferAccumulator/Commands.xml</import_dictionary>
<import_dictionary>Svc/BufferAccumulator/Events.xml</import_dictionary>
<import_dictionary>Svc/BufferAccumulator/Telemetry.xml</import_dictionary>
<ports>
<port name="bufferSendInFill" kind="async_input" data_type="Fw::BufferSend" max_number="1"></port>
<port name="bufferSendInReturn" kind="async_input" data_type="Fw::BufferSend" max_number="1"></port>
<port name="bufferSendOutDrain" kind="output" data_type="Fw::BufferSend" max_number="1"></port>
<port name="bufferSendOutReturn" kind="output" data_type="Fw::BufferSend" max_number="1"></port>
<port name="cmdIn" kind="input" data_type="Fw::Cmd" max_number="1" role="Cmd"></port>
<port name="cmdRegOut" kind="output" data_type="Fw::CmdReg" max_number="1" role="CmdRegistration"></port>
<port name="cmdResponseOut" kind="output" data_type="Fw::CmdResponse" max_number="1" role="CmdResponse"></port>
<port name="eventOut" kind="output" data_type="Fw::Log" max_number="1" role="LogEvent"></port>
<port name="eventOutText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1"></port>
<port name="pingIn" kind="async_input" data_type="Svc::Ping" max_number="1"></port>
<port name="pingOut" kind="output" data_type="Svc::Ping" max_number="1"></port>
<port name="timeCaller" kind="output" data_type="Fw::Time" max_number="1" role="TimeGet"></port>
<port name="schedIn" data_type="Svc::Sched" kind="async_input" max_number="1"></port>
<port name="tlmOut" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1"></port>
</ports>
</component>

View File

@ -1,214 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
BufferLoggerComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Svc" name="BufferLogger" kind="active">
<import_enum_type>Svc/BufferLogger/BufferLogger_LogStateEnumAi.xml</import_enum_type>
<import_port_type>Fw/Buffer/BufferSendPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdRegPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdResponsePortAi.xml</import_port_type>
<import_port_type>Fw/Com/ComPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_port_type>Svc/Ping/PingPortAi.xml</import_port_type>
<import_port_type>Svc/Sched/SchedPortAi.xml</import_port_type>
<ports>
<port name="bufferSendIn" data_type="Fw::BufferSend" kind="async_input" max_number="1" full="assert">
<comment>
Buffer input port
</comment>
</port>
<port name="bufferSendOut" data_type="Fw::BufferSend" kind="output" max_number="1">
<comment>
Buffer output port
</comment>
</port>
<port name="cmdIn" data_type="Fw::Cmd" kind="input" role="Cmd" max_number="1">
<comment>
Port for receiving commands
</comment>
</port>
<port name="cmdRegOut" data_type="Fw::CmdReg" kind="output" role="CmdRegistration" max_number="1">
<comment>
Port for sending command registration requests
</comment>
</port>
<port name="cmdResponseOut" data_type="Fw::CmdResponse" kind="output" role="CmdResponse" max_number="1">
<comment>
Port for sending command response
</comment>
</port>
<port name="comIn" data_type="Fw::Com" kind="async_input" max_number="1" full="assert">
<comment>
Packet input port
</comment>
</port>
<port name="eventOut" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Port for emitting events
</comment>
</port>
<port name="eventOutText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Port for emitting text events
</comment>
</port>
<port name="pingIn" data_type="Svc::Ping" kind="async_input" max_number="1" full="assert">
<comment>
Ping input port
</comment>
</port>
<port name="pingOut" data_type="Svc::Ping" kind="output" max_number="1">
<comment>
Ping output port
</comment>
</port>
<port name="schedIn" data_type="Svc::Sched" kind="async_input" max_number="1" full="assert"/>
<port name="timeCaller" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Port for getting the time
</comment>
</port>
<port name="tlmOut" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
<comment>
Port for emitting telemetry
</comment>
</port>
</ports>
<commands>
<command kind="async" opcode="0x0" mnemonic="BL_OpenFile" full="assert">
<comment>
Open a new log file with specified name; also resets unique file counter to 0
</comment>
<args>
<arg name="file" type="string" size="40"/>
</args>
</command>
<command kind="async" opcode="0x1" mnemonic="BL_CloseFile" full="assert">
<comment>
Close the currently open log file, if any
</comment>
</command>
<command kind="async" opcode="0x2" mnemonic="BL_SetLogging" full="assert">
<comment>
Sets the volatile logging state
</comment>
<args>
<arg name="state" type="Svc::BufferLogger_LogState"/>
</args>
</command>
<command kind="async" opcode="0x3" mnemonic="BL_FlushFile" full="assert">
<comment>
Flushes the current open log file to disk; a no-op with fprime's unbuffered file I/O, so always returns success
</comment>
</command>
</commands>
<events>
<event id="0x0" name="BL_LogFileClosed" severity="DIAGNOSTIC" format_string="File %s closed">
<comment>
The Buffer Logger closed a log file
</comment>
<args>
<arg name="file" type="string" size="256">
<comment>
The file
</comment>
</arg>
</args>
</event>
<event id="0x1" name="BL_LogFileOpenError" severity="WARNING_HI" format_string="Error %u opening file %s">
<comment>
The Buffer Logger encountered an error opening a log file
</comment>
<args>
<arg name="errornum" type="U32">
<comment>
The error number returned from the open operation
</comment>
</arg>
<arg name="file" type="string" size="256">
<comment>
The file
</comment>
</arg>
</args>
</event>
<event id="0x2" name="BL_LogFileValidationError" severity="WARNING_HI" format_string="Failed creating validation file %s with status %u">
<comment>
The Buffer Logger encountered an error writing a validation file
</comment>
<args>
<arg name="validationFile" type="string" size="256">
<comment>
The validation file
</comment>
</arg>
<arg name="status" type="U32">
<comment>
The Os::Validate::Status return
</comment>
</arg>
</args>
</event>
<event id="0x3" name="BL_LogFileWriteError" severity="WARNING_HI" format_string="Error %u while writing %u of %u bytes to %s">
<comment>
The Buffer Logger encountered an error writing to a log file
</comment>
<args>
<arg name="errornum" type="U32">
<comment>
The error number returned from the write operation
</comment>
</arg>
<arg name="bytesWritten" type="U32">
<comment>
The number of bytes successfully written
</comment>
</arg>
<arg name="bytesToWrite" type="U32">
<comment>
The number of bytes attempted
</comment>
</arg>
<arg name="file" type="string" size="256">
<comment>
The file
</comment>
</arg>
</args>
</event>
<event id="0x4" name="BL_Activated" severity="ACTIVITY_LO" format_string="Buffer logger was activated">
<comment>
Buffer logger was activated
</comment>
</event>
<event id="0x5" name="BL_Deactivated" severity="ACTIVITY_LO" format_string="Buffer logger was deactivated">
<comment>
Buffer logger was deactivated
</comment>
</event>
<event id="0x6" name="BL_NoLogFileOpenInitError" severity="WARNING_HI" format_string="No log file open command">
<comment>
No log file open command was received by BufferLogger
</comment>
</event>
</events>
<telemetry>
<channel id="0x0" name="BufferLogger_NumLoggedBuffers" data_type="U32" update="always">
<comment>
The number of buffers logged
</comment>
</channel>
</telemetry>
</component>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
BufferLogger_LogStateEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Svc" name="BufferLogger_LogState" serialize_type="I32" default="LOGGING_ON">
<item name="LOGGING_ON" value="0"/>
<item name="LOGGING_OFF" value="1"/>
</enum>

View File

@ -7,17 +7,16 @@
# Note: using PROJECT_NAME as EXECUTABLE_NAME
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/BufferLoggerComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/BufferLogger.fpp"
"${CMAKE_CURRENT_LIST_DIR}/BufferLogger.cpp"
"${CMAKE_CURRENT_LIST_DIR}/BufferLoggerFile.cpp"
"${CMAKE_CURRENT_LIST_DIR}/BufferLogger_LogStateEnumAi.xml"
)
register_fprime_module()
### UTS ###
set(UT_SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/BufferLoggerComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/BufferLogger.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Logging.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Errors.cpp"

View File

@ -1,107 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
BufferManagerComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Svc" name="BufferManager" kind="passive">
<comment>
A component for managing memory buffers
</comment>
<import_port_type>Fw/Buffer/BufferGetPortAi.xml</import_port_type>
<import_port_type>Fw/Buffer/BufferSendPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_port_type>Svc/Sched/SchedPortAi.xml</import_port_type>
<ports>
<port name="bufferGetCallee" data_type="Fw::BufferGet" kind="guarded_input" max_number="1">
<comment>
Mutex locked Buffer callee input port
</comment>
</port>
<port name="bufferSendIn" data_type="Fw::BufferSend" kind="guarded_input" max_number="1">
<comment>
Mutex locked Buffer send in input port
</comment>
</port>
<port name="eventOut" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Port for emitting events
</comment>
</port>
<port name="schedIn" data_type="Svc::Sched" kind="sync_input" max_number="1">
<comment>
Schedule input port
</comment>
</port>
<port name="textEventOut" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Port for emitting text events
</comment>
</port>
<port name="timeCaller" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Port for getting the time
</comment>
</port>
<port name="tlmOut" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
<comment>
Port for emitting Telemetry
</comment>
</port>
</ports>
<events>
<event id="0x0" name="NoBuffsAvailable" severity="WARNING_HI" format_string="No available buffers of size %u" throttle="10">
<comment>
The BufferManager was unable to allocate a requested buffer
</comment>
<args>
<arg name="size" type="U32">
<comment>
The requested size
</comment>
</arg>
</args>
</event>
<event id="0x1" name="ZeroSizeBuffer" severity="WARNING_HI" format_string="Received zero size buffer" throttle="10">
<comment>
The buffer manager received a zero-sized buffer as a return. Probably undetected empty buffer allocation
</comment>
</event>
</events>
<telemetry>
<channel id="0x0" name="TotalBuffs" data_type="U32" update="on_change">
<comment>
The total buffers allocated
</comment>
</channel>
<channel id="0x1" name="CurrBuffs" data_type="U32" update="on_change">
<comment>
The current number of allocated buffers
</comment>
</channel>
<channel id="0x2" name="HiBuffs" data_type="U32" update="on_change">
<comment>
The high water mark of allocated buffers
</comment>
</channel>
<channel id="0x3" name="NoBuffs" data_type="U32" update="on_change" high_red="1">
<comment>
The number of requests that couldn't return a buffer
</comment>
</channel>
<channel id="0x4" name="EmptyBuffs" data_type="U32" update="on_change" high_red="1">
<comment>
The number of empty buffers returned
</comment>
</channel>
</telemetry>
</component>

View File

@ -7,7 +7,7 @@
# Note: using PROJECT_NAME as EXECUTABLE_NAME
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/BufferManagerComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/BufferManager.fpp"
"${CMAKE_CURRENT_LIST_DIR}/BufferManagerComponentImpl.cpp"
)
@ -15,7 +15,7 @@ register_fprime_module()
### UTS ###
set(UT_SOURCE_FILES
"${FPRIME_FRAMEWORK_PATH}/Svc/BufferManager/BufferManagerComponentAi.xml"
"${FPRIME_FRAMEWORK_PATH}/Svc/BufferManager/BufferManager.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Tester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/TestMain.cpp"
)

View File

@ -1,3 +1,4 @@
####
# F prime CMakeLists.txt:
#
@ -7,15 +8,15 @@
# Note: using PROJECT_NAME as EXECUTABLE_NAME
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/CommandDispatcherComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/CmdDispatcher.fpp"
"${CMAKE_CURRENT_LIST_DIR}/CommandDispatcherImpl.cpp"
)
register_fprime_module()
### UTs ###
set(UT_SOURCE_FILES
"${FPRIME_FRAMEWORK_PATH}/Svc/CmdDispatcher/CommandDispatcherComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/CmdDispatcher.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandDispatcherTester.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandDispatcherImplTester.cpp"
)
register_fprime_ut()
register_fprime_ut()

View File

@ -1,3 +1,4 @@
module Svc {
@ A component for dispatching commands

View File

@ -1,318 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
CommandDispatcherComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Svc" name="CommandDispatcher" kind="active">
<comment>
A component for dispatching commands
</comment>
<import_enum_type>Fw/Cmd/CmdResponseEnumAi.xml</import_enum_type>
<import_enum_type>Fw/Types/DeserialStatusEnumAi.xml</import_enum_type>
<import_port_type>Fw/Cmd/CmdPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdRegPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdResponsePortAi.xml</import_port_type>
<import_port_type>Fw/Com/ComPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_port_type>Svc/Ping/PingPortAi.xml</import_port_type>
<ports>
<port name="CmdDisp" data_type="Fw::Cmd" kind="input" role="Cmd" max_number="1">
<comment>
Command receive port
</comment>
</port>
<port name="CmdReg" data_type="Fw::CmdReg" kind="output" role="CmdRegistration" max_number="1">
<comment>
Command registration port
</comment>
</port>
<port name="CmdStatus" data_type="Fw::CmdResponse" kind="output" role="CmdResponse" max_number="1">
<comment>
Command response port
</comment>
</port>
<port name="Log" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Event port
</comment>
</port>
<port name="LogText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Text event port
</comment>
</port>
<port name="Time" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Time get port
</comment>
</port>
<port name="Tlm" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
<comment>
Telemetry port
</comment>
</port>
<port name="compCmdReg" data_type="Fw::CmdReg" kind="guarded_input" max_number="$CmdDispatcherComponentCommandPorts">
<comment>
Command Registration Port. max_number should match dispatch port.
</comment>
</port>
<port name="compCmdSend" data_type="Fw::Cmd" kind="output" max_number="$CmdDispatcherComponentCommandPorts">
<comment>
Command dispatch port
</comment>
</port>
<port name="compCmdStat" data_type="Fw::CmdResponse" kind="async_input" max_number="1" full="assert">
<comment>
Input Command Status Port
</comment>
</port>
<port name="pingIn" data_type="Svc::Ping" kind="async_input" max_number="1" full="assert">
<comment>
Ping input port
</comment>
</port>
<port name="pingOut" data_type="Svc::Ping" kind="output" max_number="1">
<comment>
Ping output port
</comment>
</port>
<port name="seqCmdBuff" data_type="Fw::Com" kind="async_input" max_number="$CmdDispatcherSequencePorts" full="assert">
<comment>
Command buffer input port for sequencers or other sources of command buffers
</comment>
</port>
<port name="seqCmdStatus" data_type="Fw::CmdResponse" kind="output" max_number="$CmdDispatcherSequencePorts">
<comment>
Output Command Status Port
</comment>
</port>
</ports>
<commands>
<command kind="async" opcode="0x0" mnemonic="CMD_NO_OP" full="assert">
<comment>
No-op command
</comment>
</command>
<command kind="async" opcode="0x1" mnemonic="CMD_NO_OP_STRING" full="assert">
<comment>
No-op string command
</comment>
<args>
<arg name="arg1" type="string" size="40">
<comment>
The String command argument
</comment>
</arg>
</args>
</command>
<command kind="async" opcode="0x2" mnemonic="CMD_TEST_CMD_1" full="assert">
<comment>
No-op command
</comment>
<args>
<arg name="arg1" type="I32">
<comment>
The I32 command argument
</comment>
</arg>
<arg name="arg2" type="F32">
<comment>
The F32 command argument
</comment>
</arg>
<arg name="arg3" type="U8">
<comment>
The U8 command argument
</comment>
</arg>
</args>
</command>
<command kind="async" opcode="0x3" mnemonic="CMD_CLEAR_TRACKING" full="assert">
<comment>
Clear command tracking info to recover from components not returning status
</comment>
</command>
</commands>
<events>
<event id="0x0" name="OpCodeRegistered" severity="DIAGNOSTIC" format_string="Opcode 0x%x registered to port %d slot %d">
<args>
<arg name="Opcode" type="U32">
<comment>
The opcode to register
</comment>
</arg>
<arg name="port" type="I32">
<comment>
The registration port
</comment>
</arg>
<arg name="slot" type="I32">
<comment>
The dispatch slot it was placed in
</comment>
</arg>
</args>
</event>
<event id="0x1" name="OpCodeDispatched" severity="COMMAND" format_string="Opcode 0x%x dispatched to port %d">
<comment>
Op code dispatched event
</comment>
<args>
<arg name="Opcode" type="U32">
<comment>
The opcode dispatched
</comment>
</arg>
<arg name="port" type="I32">
<comment>
The port dispatched to
</comment>
</arg>
</args>
</event>
<event id="0x2" name="OpCodeCompleted" severity="COMMAND" format_string="Opcode 0x%x completed">
<comment>
Op code completed event
</comment>
<args>
<arg name="Opcode" type="U32">
<comment>
The I32 command argument
</comment>
</arg>
</args>
</event>
<event id="0x3" name="OpCodeError" severity="WARNING_HI" format_string="Opcode 0x%x completed with error %s">
<comment>
Op code completed with error event
</comment>
<args>
<arg name="Opcode" type="U32">
<comment>
The opcode with the error
</comment>
</arg>
<arg name="error" type="Fw::CmdResponse">
<comment>
The error value
</comment>
</arg>
</args>
</event>
<event id="0x4" name="MalformedCommand" severity="WARNING_HI" format_string="Received malformed command packet. Status: %s">
<comment>
Received a malformed command packet
</comment>
<args>
<arg name="Status" type="Fw::DeserialStatus">
<comment>
The deserialization error
</comment>
</arg>
</args>
</event>
<event id="0x5" name="InvalidCommand" severity="WARNING_HI" format_string="Invalid opcode 0x%x received">
<comment>
Received an invalid opcode
</comment>
<args>
<arg name="Opcode" type="U32">
<comment>
Invalid opcode
</comment>
</arg>
</args>
</event>
<event id="0x6" name="TooManyCommands" severity="WARNING_HI" format_string="Too many outstanding commands. opcode=0x%x">
<comment>
Exceeded the number of commands that can be simultaneously executed
</comment>
<args>
<arg name="Opcode" type="U32">
<comment>
The opcode that overflowed the list
</comment>
</arg>
</args>
</event>
<event id="0x7" name="NoOpReceived" severity="ACTIVITY_HI" format_string="Received a NO-OP command">
<comment>
The command dispatcher has successfully received a NO-OP command
</comment>
</event>
<event id="0x8" name="NoOpStringReceived" severity="ACTIVITY_HI" format_string="Received a NO-OP string=%s">
<comment>
The command dispatcher has successfully received a NO-OP command from GUI with a string
</comment>
<args>
<arg name="message" type="string" size="40">
<comment>
The NO-OP string that is generated
</comment>
</arg>
</args>
</event>
<event id="0x9" name="TestCmd1Args" severity="ACTIVITY_HI" format_string="TEST_CMD_1 args: I32: %d, F32: %f, U8: %u">
<comment>
This log event message returns the TEST_CMD_1 arguments.
</comment>
<args>
<arg name="arg1" type="I32">
<comment>
Arg1
</comment>
</arg>
<arg name="arg2" type="F32">
<comment>
Arg2
</comment>
</arg>
<arg name="arg3" type="U8">
<comment>
Arg3
</comment>
</arg>
</args>
</event>
<event id="0xA" name="OpCodeReregistered" severity="DIAGNOSTIC" format_string="Opcode 0x%x is already registered to port %d">
<comment>
Op code reregistered event
</comment>
<args>
<arg name="Opcode" type="U32">
<comment>
The opcode reregistered
</comment>
</arg>
<arg name="port" type="I32">
<comment>
The reregistration port
</comment>
</arg>
</args>
</event>
</events>
<telemetry>
<channel id="0x0" name="CommandsDispatched" data_type="U32" update="on_change">
<comment>
Number of commands dispatched
</comment>
</channel>
<channel id="0x1" name="CommandErrors" data_type="U32" update="on_change">
<comment>
Number of command errors
</comment>
</channel>
</telemetry>
</component>

View File

@ -7,21 +7,18 @@
# Note: using PROJECT_NAME as EXECUTABLE_NAME
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/CmdSequencerComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/CmdSequencer.fpp"
"${CMAKE_CURRENT_LIST_DIR}/CmdSequencerImpl.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Events.cpp"
"${CMAKE_CURRENT_LIST_DIR}/FPrimeSequence.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Sequence.cpp"
"${CMAKE_CURRENT_LIST_DIR}/formats/AMPCSSequence.cpp"
"${CMAKE_CURRENT_LIST_DIR}/CmdSequencer_FileReadStageEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/CmdSequencer_BlockStateEnumAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/CmdSequencer_SeqModeEnumAi.xml"
)
register_fprime_module()
### UTs ###
set(UT_SOURCE_FILES
"${FPRIME_FRAMEWORK_PATH}/Svc/CmdSequencer/CmdSequencerComponentAi.xml"
"${FPRIME_FRAMEWORK_PATH}/Svc/CmdSequencer/CmdSequencer.fpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/AMPCS.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandBuffers.cpp"
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Health.cpp"

View File

@ -1,557 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
CmdSequencerComponentAi.xml
Generated by fpp-to-xml
====================================================================== -->
<component namespace="Svc" name="CmdSequencer" kind="active">
<comment>
A component for running command sequences
</comment>
<import_enum_type>Svc/CmdSequencer/CmdSequencer_BlockStateEnumAi.xml</import_enum_type>
<import_enum_type>Svc/CmdSequencer/CmdSequencer_FileReadStageEnumAi.xml</import_enum_type>
<import_enum_type>Svc/CmdSequencer/CmdSequencer_SeqModeEnumAi.xml</import_enum_type>
<import_port_type>Fw/Cmd/CmdPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdRegPortAi.xml</import_port_type>
<import_port_type>Fw/Cmd/CmdResponsePortAi.xml</import_port_type>
<import_port_type>Fw/Com/ComPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogPortAi.xml</import_port_type>
<import_port_type>Fw/Log/LogTextPortAi.xml</import_port_type>
<import_port_type>Fw/Time/TimePortAi.xml</import_port_type>
<import_port_type>Fw/Tlm/TlmPortAi.xml</import_port_type>
<import_port_type>Svc/Ping/PingPortAi.xml</import_port_type>
<import_port_type>Svc/Sched/SchedPortAi.xml</import_port_type>
<import_port_type>Svc/Seq/CmdSeqCancelPortAi.xml</import_port_type>
<import_port_type>Svc/Seq/CmdSeqInPortAi.xml</import_port_type>
<ports>
<port name="LogText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1">
<comment>
Text event port
</comment>
</port>
<port name="cmdIn" data_type="Fw::Cmd" kind="input" role="Cmd" max_number="1">
<comment>
Command receive port
</comment>
</port>
<port name="cmdRegOut" data_type="Fw::CmdReg" kind="output" role="CmdRegistration" max_number="1">
<comment>
Command registration port
</comment>
</port>
<port name="cmdResponseIn" data_type="Fw::CmdResponse" kind="async_input" max_number="1" full="assert">
<comment>
Command response in port
</comment>
</port>
<port name="cmdResponseOut" data_type="Fw::CmdResponse" kind="output" role="CmdResponse" max_number="1">
<comment>
Command response port
</comment>
</port>
<port name="comCmdOut" data_type="Fw::Com" kind="output" max_number="1">
<comment>
Port for sending sequence commands
</comment>
</port>
<port name="logOut" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
<comment>
Event port
</comment>
</port>
<port name="pingIn" data_type="Svc::Ping" kind="async_input" max_number="1" full="assert">
<comment>
Ping in port
</comment>
</port>
<port name="pingOut" data_type="Svc::Ping" kind="output" max_number="1">
<comment>
Ping out port
</comment>
</port>
<port name="schedIn" data_type="Svc::Sched" kind="async_input" max_number="1" full="assert">
<comment>
Schedule in port
</comment>
</port>
<port name="seqCancelIn" data_type="Svc::CmdSeqCancel" kind="async_input" max_number="1" full="assert">
<comment>
Sequence cancel port
</comment>
</port>
<port name="seqDone" data_type="Fw::CmdResponse" kind="output" max_number="1">
<comment>
Port for indicating sequence done
</comment>
</port>
<port name="seqRunIn" data_type="Svc::CmdSeqIn" kind="async_input" max_number="1" full="assert">
<comment>
Port for requests to run sequences
</comment>
</port>
<port name="timeCaller" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
<comment>
Time get port
</comment>
</port>
<port name="tlmOut" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
<comment>
Telemetry port
</comment>
</port>
</ports>
<commands>
<command kind="async" opcode="0x0" mnemonic="CS_RUN" full="assert">
<comment>
Run a command sequence file
</comment>
<args>
<arg name="fileName" type="string" size="240">
<comment>
The name of the sequence file
</comment>
</arg>
<arg name="block" type="Svc::CmdSequencer_BlockState">
<comment>
Return command status when complete or not
</comment>
</arg>
</args>
</command>
<command kind="async" opcode="0x1" mnemonic="CS_VALIDATE" full="assert">
<comment>
Validate a command sequence file
</comment>
<args>
<arg name="fileName" type="string" size="240">
<comment>
The name of the sequence file
</comment>
</arg>
</args>
</command>
<command kind="async" opcode="0x2" mnemonic="CS_CANCEL" full="assert">
<comment>
Cancel a command sequence
</comment>
</command>
<command kind="async" opcode="0x3" mnemonic="CS_START" full="assert">
<comment>
Start running a command sequence
</comment>
</command>
<command kind="async" opcode="0x4" mnemonic="CS_STEP" full="assert">
<comment>
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode.
</comment>
</command>
<command kind="async" opcode="0x5" mnemonic="CS_AUTO" full="assert">
<comment>
Set the run mode to AUTO.
</comment>
</command>
<command kind="async" opcode="0x6" mnemonic="CS_MANUAL" full="assert">
<comment>
Set the run mode to MANUAL.
</comment>
</command>
</commands>
<events>
<event id="0x0" name="CS_SequenceLoaded" severity="ACTIVITY_LO" format_string="Loaded sequence %s">
<comment>
Sequence file was successfully loaded.
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
</args>
</event>
<event id="0x1" name="CS_SequenceCanceled" severity="ACTIVITY_HI" format_string="Sequence file %s canceled">
<comment>
A command sequence was successfully canceled.
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
</args>
</event>
<event id="0x2" name="CS_FileReadError" severity="WARNING_HI" format_string="Error reading sequence file %s">
<comment>
The Sequence File Loader could not read the sequence file.
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
</args>
</event>
<event id="0x3" name="CS_FileInvalid" severity="WARNING_HI" format_string="Sequence file %s invalid. Stage: %s Error: %d">
<comment>
The sequence file format was invalid.
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
<arg name="stage" type="Svc::CmdSequencer_FileReadStage">
<comment>
The read stage
</comment>
</arg>
<arg name="error" type="I32">
<comment>
The error code
</comment>
</arg>
</args>
</event>
<event id="0x4" name="CS_RecordInvalid" severity="WARNING_HI" format_string="Sequence file %s: Record %u invalid. Err: %d">
<comment>
The format of a command record was invalid.
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
<arg name="recordNumber" type="U32">
<comment>
The record number
</comment>
</arg>
<arg name="error" type="I32">
<comment>
The error code
</comment>
</arg>
</args>
</event>
<event id="0x5" name="CS_FileSizeError" severity="WARNING_HI" format_string="Sequence file %s too large. Size: %u">
<comment>
The sequence file was too large.
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
<arg name="size" type="U32">
<comment>
Invalid size
</comment>
</arg>
</args>
</event>
<event id="0x6" name="CS_FileNotFound" severity="WARNING_HI" format_string="Sequence file %s not found.">
<comment>
The sequence file was not found
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The sequence file
</comment>
</arg>
</args>
</event>
<event id="0x7" name="CS_FileCrcFailure" severity="WARNING_HI" format_string="Sequence file %s had invalid CRC. Stored 0x%x, Computed 0x%x.">
<comment>
The sequence file validation failed
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The sequence file
</comment>
</arg>
<arg name="storedCRC" type="U32">
<comment>
The CRC stored in the file
</comment>
</arg>
<arg name="computedCRC" type="U32">
<comment>
The CRC computed over the file
</comment>
</arg>
</args>
</event>
<event id="0x8" name="CS_CommandComplete" severity="ACTIVITY_LO" format_string="Sequence file %s: Command %u (opcode %u) complete">
<comment>
The Command Sequencer issued a command and received a success status in return.
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
<arg name="recordNumber" type="U32">
<comment>
The record number of the command
</comment>
</arg>
<arg name="opCode" type="U32">
<comment>
The command opcode
</comment>
</arg>
</args>
</event>
<event id="0x9" name="CS_SequenceComplete" severity="ACTIVITY_HI" format_string="Sequence file %s complete">
<comment>
A command sequence successfully completed.
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
</args>
</event>
<event id="0xA" name="CS_CommandError" severity="WARNING_HI" format_string="Sequence file %s: Command %u (opcode %u) completed with error %u">
<comment>
The Command Sequencer issued a command and received an error status in return.
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
<arg name="recordNumber" type="U32">
<comment>
The record number
</comment>
</arg>
<arg name="opCode" type="U32">
<comment>
The opcode
</comment>
</arg>
<arg name="errorStatus" type="U32">
<comment>
The error status
</comment>
</arg>
</args>
</event>
<event id="0xB" name="CS_InvalidMode" severity="WARNING_HI" format_string="Invalid mode">
<comment>
The Command Sequencer received a command that was invalid for its current mode.
</comment>
</event>
<event id="0xC" name="CS_RecordMismatch" severity="WARNING_HI" format_string="Sequence file %s header records mismatch: %u in header, found %u extra bytes.">
<comment>
Number of records in header doesn't match number in file
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
<arg name="header_records" type="U32">
<comment>
The number of records in the header
</comment>
</arg>
<arg name="extra_bytes" type="U32">
<comment>
The number of bytes beyond last record
</comment>
</arg>
</args>
</event>
<event id="0xD" name="CS_TimeBaseMismatch" severity="WARNING_HI" format_string="Sequence file %s: Current time base doesn't match sequence time: base: %u seq: %u">
<comment>
The running time base doesn't match the time base in the sequence files
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
<arg name="time_base" type="U16">
<comment>
The current time
</comment>
</arg>
<arg name="seq_time_base" type="U16">
<comment>
The sequence time base
</comment>
</arg>
</args>
</event>
<event id="0xE" name="CS_TimeContextMismatch" severity="WARNING_HI" format_string="Sequence file %s: Current time context doesn't match sequence context: base: %u seq: %u">
<comment>
The running time base doesn't match the time base in the sequence files
</comment>
<args>
<arg name="fileName" type="string" size="60">
<comment>
The name of the sequence file
</comment>
</arg>
<arg name="currTimeBase" type="U8">
<comment>
The current time base
</comment>
</arg>
<arg name="seqTimeBase" type="U8">
<comment>
The sequence time base
</comment>
</arg>
</args>
</event>
<event id="0xF" name="CS_PortSequenceStarted" severity="ACTIVITY_HI" format_string="Local request for sequence %s started.">
<comment>
A local port request to run a sequence was started
</comment>
<args>
<arg name="filename" type="string" size="60">
<comment>
The sequence file
</comment>
</arg>
</args>
</event>
<event id="0x10" name="CS_UnexpectedCompletion" severity="WARNING_HI" format_string="Command complete status received while no sequences active. Opcode: %u">
<comment>
A command status came back when no sequence was running
</comment>
<args>
<arg name="opcode" type="U32">
<comment>
The reported opcode
</comment>
</arg>
</args>
</event>
<event id="0x11" name="CS_ModeSwitched" severity="ACTIVITY_HI" format_string="Sequencer switched to %s step mode">
<comment>
Switched step mode
</comment>
<args>
<arg name="mode" type="Svc::CmdSequencer_SeqMode">
<comment>
The new mode
</comment>
</arg>
</args>
</event>
<event id="0x12" name="CS_NoSequenceActive" severity="WARNING_LO" format_string="No sequence active.">
<comment>
A sequence related command came with no active sequence
</comment>
</event>
<event id="0x13" name="CS_SequenceValid" severity="ACTIVITY_HI" format_string="Sequence %s is valid.">
<comment>
A sequence passed validation
</comment>
<args>
<arg name="filename" type="string" size="60">
<comment>
The sequence file
</comment>
</arg>
</args>
</event>
<event id="0x14" name="CS_SequenceTimeout" severity="WARNING_HI" format_string="Sequence %s timed out on command %u">
<comment>
A sequence passed validation
</comment>
<args>
<arg name="filename" type="string" size="60">
<comment>
The sequence file
</comment>
</arg>
<arg name="command" type="U32">
<comment>
The command that timed out
</comment>
</arg>
</args>
</event>
<event id="0x15" name="CS_CmdStepped" severity="ACTIVITY_HI" format_string="Sequence %s command %u stepped">
<comment>
A command in a sequence was stepped through
</comment>
<args>
<arg name="filename" type="string" size="60">
<comment>
The sequence file
</comment>
</arg>
<arg name="command" type="U32">
<comment>
The command that was stepped
</comment>
</arg>
</args>
</event>
<event id="0x16" name="CS_CmdStarted" severity="ACTIVITY_HI" format_string="Sequence %s started">
<comment>
A manual sequence was started
</comment>
<args>
<arg name="filename" type="string" size="60">
<comment>
The sequence file
</comment>
</arg>
</args>
</event>
</events>
<telemetry>
<channel id="0x0" name="CS_LoadCommands" data_type="U32" update="always">
<comment>
The number of Load commands executed
</comment>
</channel>
<channel id="0x1" name="CS_CancelCommands" data_type="U32" update="always">
<comment>
The number of Cancel commands executed
</comment>
</channel>
<channel id="0x2" name="CS_Errors" data_type="U32" update="always">
<comment>
The number of errors that have occurred
</comment>
</channel>
<channel id="0x3" name="CS_CommandsExecuted" data_type="U32" update="always">
<comment>
The number of commands executed across all sequences.
</comment>
</channel>
<channel id="0x4" name="CS_SequencesCompleted" data_type="U32" update="always">
<comment>
The number of sequences completed.
</comment>
</channel>
</telemetry>
</component>

Some files were not shown because too many files have changed in this diff Show More