mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
Finished Svc/FileUplink Component
This commit is contained in:
parent
ddfb42f546
commit
483c9a37d3
78
Svc/FileUplink/Events.fppi
Normal file
78
Svc/FileUplink/Events.fppi
Normal file
@ -0,0 +1,78 @@
|
||||
@ During receipt of a file, the computed checksum value did not match the stored value
|
||||
event BadChecksum(
|
||||
fileName: string size 40 @< The file name
|
||||
computed: U32 @< The computed value
|
||||
read: U32 @< The value read
|
||||
) \
|
||||
severity warning high \
|
||||
id 0 \
|
||||
format "Bad checksum value during receipt of file {}: computed {}, read {}"
|
||||
|
||||
@ An error occurred opening a file
|
||||
event FileOpenError(
|
||||
fileName: string size 40 @< The name of the file
|
||||
) \
|
||||
severity warning high \
|
||||
id 1 \
|
||||
format "Could not open file {}"
|
||||
|
||||
@ The File Uplink component successfully received a file
|
||||
event FileReceived(
|
||||
fileName: string size 40 @< The name of the file
|
||||
) \
|
||||
severity activity high \
|
||||
id 2 \
|
||||
format "Received file {}"
|
||||
|
||||
@ An error occurred writing to a file
|
||||
event FileWriteError(
|
||||
fileName: string size 40 @< The name of the file
|
||||
) \
|
||||
severity warning high \
|
||||
id 3 \
|
||||
format "Could not write to file {}" \
|
||||
throttle 5
|
||||
|
||||
@ The File Uplink component received a packet with a type that was invalid for the current receive mode
|
||||
event InvalidReceiveMode(
|
||||
packetType: U32 @< The type of the packet received
|
||||
mode: U32 @< The receive mode
|
||||
) \
|
||||
severity warning high \
|
||||
id 4 \
|
||||
format "Packet type {} received in mode {}" \
|
||||
throttle 5
|
||||
|
||||
@ During receipt of a file, the File Uplink component encountered a packet with offset and size out of bounds for the current file
|
||||
event PacketOutOfBounds(
|
||||
packetIndex: U32 @< The sequence index of the packet
|
||||
fileName: string size 40 @< The name of the file
|
||||
) \
|
||||
severity warning high \
|
||||
id 5 \
|
||||
format "Packet {} out of bounds for file {}" \
|
||||
throttle 5
|
||||
|
||||
@ The File Uplink component encountered an out-of-order packet during file receipt
|
||||
event PacketOutOfOrder(
|
||||
packetIndex: U32 @< The sequence index of the out-of-order packet
|
||||
lastPacketIndex: U32 @< The sequence index of the last packet received before the out-of-order packet
|
||||
) \
|
||||
severity warning high \
|
||||
id 6 \
|
||||
format "Received packet {} after packet {}" \
|
||||
throttle 20
|
||||
|
||||
@ The File Uplink component received a CANCEL packet
|
||||
event UplinkCanceled \
|
||||
severity activity high \
|
||||
id 7 \
|
||||
format "Received CANCEL packet"
|
||||
|
||||
@ Error decoding file packet
|
||||
event DecodeError(
|
||||
status: I32 @< The sequence index of the out-of-order packet
|
||||
) \
|
||||
severity warning high \
|
||||
id 8 \
|
||||
format "Unable to decode file packet. Status: {}"
|
||||
31
Svc/FileUplink/FileUplink.fpp
Normal file
31
Svc/FileUplink/FileUplink.fpp
Normal file
@ -0,0 +1,31 @@
|
||||
module Svc {
|
||||
|
||||
active component FileUplink {
|
||||
|
||||
@ FPP from XML: original path was Svc/FileUplink/Telemetry.xml
|
||||
include "Telemetry.fppi"
|
||||
|
||||
@ FPP from XML: original path was Svc/FileUplink/Events.xml
|
||||
include "Events.fppi"
|
||||
|
||||
async input port bufferSendIn: [1] Fw.BufferSend
|
||||
|
||||
time get port timeCaller
|
||||
|
||||
output port bufferSendOut: [1] Fw.BufferSend
|
||||
|
||||
telemetry port tlmOut
|
||||
|
||||
event port eventOut
|
||||
|
||||
text event port LogText
|
||||
|
||||
async input port pingIn: [1] Svc.Ping
|
||||
|
||||
output port pingOut: [1] Svc.Ping
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,45 +1,175 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<component name="FileUplink" kind="active" namespace="Svc" modeler="true">
|
||||
<!-- =====================================================================
|
||||
FileUplinkComponentAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<component namespace="Svc" name="FileUplink" kind="active">
|
||||
|
||||
<import_port_type>Fw/Buffer/BufferSendPortAi.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>Fw/Log/LogPortAi.xml</import_port_type>
|
||||
<import_dictionary>Svc/FileUplink/Telemetry.xml</import_dictionary>
|
||||
<import_dictionary>Svc/FileUplink/Events.xml</import_dictionary>
|
||||
<import_port_type>Svc/Ping/PingPortAi.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/Ping/PingPortAi.xml</import_port_type>
|
||||
|
||||
<ports>
|
||||
<ports>
|
||||
<port name="LogText" data_type="Fw::LogText" kind="output" role="LogTextEvent" max_number="1"/>
|
||||
<port name="bufferSendIn" data_type="Fw::BufferSend" kind="async_input" max_number="1" full="assert"/>
|
||||
<port name="bufferSendOut" data_type="Fw::BufferSend" kind="output" max_number="1"/>
|
||||
<port name="eventOut" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1"/>
|
||||
<port name="pingIn" data_type="Svc::Ping" kind="async_input" max_number="1" full="assert"/>
|
||||
<port name="pingOut" data_type="Svc::Ping" kind="output" max_number="1"/>
|
||||
<port name="timeCaller" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1"/>
|
||||
<port name="tlmOut" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1"/>
|
||||
</ports>
|
||||
|
||||
<port name="bufferSendIn" data_type="Fw::BufferSend" kind="async_input" max_number="1">
|
||||
<events>
|
||||
<event id="0x0" name="BadChecksum" severity="WARNING_HI" format_string="Bad checksum value during receipt of file %s: computed %u, read %u">
|
||||
<comment>
|
||||
FPP from XML: could not translate format string "Bad checksum value during receipt of file %s: computed 0x%08X, read 0x%08X"
|
||||
During receipt of a file, the computed checksum value did not match the stored value
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="fileName" type="string" size="40">
|
||||
<comment>
|
||||
The file name
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="computed" type="U32">
|
||||
<comment>
|
||||
The computed value
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="read" type="U32">
|
||||
<comment>
|
||||
The value read
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</event>
|
||||
<event id="0x1" name="FileOpenError" severity="WARNING_HI" format_string="Could not open file %s">
|
||||
<comment>
|
||||
An error occurred opening a file
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="fileName" type="string" size="40">
|
||||
<comment>
|
||||
The name of the file
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</event>
|
||||
<event id="0x2" name="FileReceived" severity="ACTIVITY_HI" format_string="Received file %s">
|
||||
<comment>
|
||||
The File Uplink component successfully received a file
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="fileName" type="string" size="40">
|
||||
<comment>
|
||||
The name of the file
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</event>
|
||||
<event id="0x3" name="FileWriteError" severity="WARNING_HI" format_string="Could not write to file %s" throttle="5">
|
||||
<comment>
|
||||
An error occurred writing to a file
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="fileName" type="string" size="40">
|
||||
<comment>
|
||||
The name of the file
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</event>
|
||||
<event id="0x4" name="InvalidReceiveMode" severity="WARNING_HI" format_string="Packet type %u received in mode %u" throttle="5">
|
||||
<comment>
|
||||
The File Uplink component received a packet with a type that was invalid for the current receive mode
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="packetType" type="U32">
|
||||
<comment>
|
||||
The type of the packet received
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="mode" type="U32">
|
||||
<comment>
|
||||
The receive mode
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</event>
|
||||
<event id="0x5" name="PacketOutOfBounds" severity="WARNING_HI" format_string="Packet %u out of bounds for file %s" throttle="5">
|
||||
<comment>
|
||||
During receipt of a file, the File Uplink component encountered a packet with offset and size out of bounds for the current file
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="packetIndex" type="U32">
|
||||
<comment>
|
||||
The sequence index of the packet
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="fileName" type="string" size="40">
|
||||
<comment>
|
||||
The name of the file
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</event>
|
||||
<event id="0x6" name="PacketOutOfOrder" severity="WARNING_HI" format_string="Received packet %u after packet %u" throttle="20">
|
||||
<comment>
|
||||
The File Uplink component encountered an out-of-order packet during file receipt
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="packetIndex" type="U32">
|
||||
<comment>
|
||||
The sequence index of the out-of-order packet
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="lastPacketIndex" type="U32">
|
||||
<comment>
|
||||
The sequence index of the last packet received before the out-of-order packet
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</event>
|
||||
<event id="0x7" name="UplinkCanceled" severity="ACTIVITY_HI" format_string="Received CANCEL packet">
|
||||
<comment>
|
||||
The File Uplink component received a CANCEL packet
|
||||
</comment>
|
||||
</event>
|
||||
<event id="0x8" name="DecodeError" severity="WARNING_HI" format_string="Unable to decode file packet. Status: %d">
|
||||
<comment>
|
||||
Error decoding file packet
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="status" type="I32">
|
||||
<comment>
|
||||
The sequence index of the out-of-order packet
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</event>
|
||||
</events>
|
||||
|
||||
</port>
|
||||
|
||||
<port name="timeCaller" data_type="Fw::Time" kind="output" role="TimeGet" max_number="1">
|
||||
|
||||
</port>
|
||||
|
||||
<port name="bufferSendOut" data_type="Fw::BufferSend" kind="output" max_number="1">
|
||||
|
||||
</port>
|
||||
|
||||
<port name="tlmOut" data_type="Fw::Tlm" kind="output" role="Telemetry" max_number="1">
|
||||
|
||||
</port>
|
||||
|
||||
<port name="eventOut" data_type="Fw::Log" kind="output" role="LogEvent" max_number="1">
|
||||
|
||||
</port>
|
||||
|
||||
<port name="pingIn" data_type="Svc::Ping" kind="async_input" max_number = "1">
|
||||
|
||||
</port>
|
||||
|
||||
<port name="pingOut" data_type="Svc::Ping" kind="output" max_number = "1">
|
||||
|
||||
</port>
|
||||
|
||||
</ports>
|
||||
<telemetry>
|
||||
<channel id="0x0" name="FilesReceived" data_type="U32" update="always">
|
||||
<comment>
|
||||
The total number of complete files received
|
||||
</comment>
|
||||
</channel>
|
||||
<channel id="0x1" name="PacketsReceived" data_type="U32" update="always">
|
||||
<comment>
|
||||
The total number of packets received
|
||||
</comment>
|
||||
</channel>
|
||||
<channel id="0x2" name="Warnings" data_type="U32" update="always">
|
||||
<comment>
|
||||
The total number of warnings issued
|
||||
</comment>
|
||||
</channel>
|
||||
</telemetry>
|
||||
|
||||
</component>
|
||||
|
||||
8
Svc/FileUplink/Telemetry.fppi
Normal file
8
Svc/FileUplink/Telemetry.fppi
Normal file
@ -0,0 +1,8 @@
|
||||
@ The total number of complete files received
|
||||
telemetry FilesReceived: U32 id 0
|
||||
|
||||
@ The total number of packets received
|
||||
telemetry PacketsReceived: U32 id 1
|
||||
|
||||
@ The total number of warnings issued
|
||||
telemetry Warnings: U32 id 2
|
||||
6
Svc/FileUplink/all.do
Normal file
6
Svc/FileUplink/all.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-ifchange xml
|
||||
update xml/*.xml
|
||||
5
Svc/FileUplink/clean.do
Normal file
5
Svc/FileUplink/clean.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
clean_do
|
||||
6
Svc/FileUplink/defs.sh
Normal file
6
Svc/FileUplink/defs.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
export FPRIME_ROOT=../..
|
||||
export FPP_FILES=`basename $PWD`.fpp
|
||||
|
||||
. $FPRIME_ROOT/defs-root.sh
|
||||
5
Svc/FileUplink/depend.do
Normal file
5
Svc/FileUplink/depend.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
depend_do "$@"
|
||||
6
Svc/FileUplink/locate-uses.do
Normal file
6
Svc/FileUplink/locate-uses.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-always
|
||||
locate_uses_do "$@" 1>&2
|
||||
5
Svc/FileUplink/xml.do
Normal file
5
Svc/FileUplink/xml.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
xml_do "$@"
|
||||
Loading…
x
Reference in New Issue
Block a user