lestarch: merged latest nasa/devel (#964)

* lestarch: merged latest nasa/devel

* lestarch: fixing coverage on macOs

* lestarch: correcting UTs for merging latest devel

* lestarch: integration tests

* lestarch: build error correction
This commit is contained in:
M Starch 2021-08-25 18:50:45 -07:00 committed by GitHub
parent a7e73ad7ff
commit 052bbdb8c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
145 changed files with 6063 additions and 2763 deletions

View File

@ -8,6 +8,5 @@ if [ "$GITHUB_WORKFLOW" == "Autodocs" ]
then
/autodoc.bash
else
#echo "$INPUT_TEST1"
"$GITHUB_WORKSPACE/ci/master.bash" $INPUT_TEST
"$GITHUB_WORKSPACE/ci/tests/$INPUT_TEST.bash"
fi

View File

@ -1,9 +0,0 @@
name: 'fprime Automatic Documentation'
description: 'Runs continuous documentation updates on fprime'
runs:
using: 'docker'
image: 'Dockerfile'
entrypoint: '/autodoc.bash'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,12 +0,0 @@
name: 'F prime CI'
description: 'Runs continuous integration testing on F prime'
inputs:
test:
description: Test number to run
required: true
default: ''
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.test }}

View File

@ -238,12 +238,15 @@ config
configparser
configurability
configurator
Connectedoutput
cookiecutter
cooldown
coor
coravy
cosmosgen
cout
cov
Coverity
CPHA
Cpkt
cplusplus
@ -433,6 +436,7 @@ EMSGSIZE
ENAMETOOLONG
endcode
endcond
endfor
endforeach
endfunction
endian
@ -518,6 +522,7 @@ findall
fio
Firefox
FIXME
Fixme
flist
FNDELAY
fnmatch
@ -538,6 +543,7 @@ FPGA
fpl
fpp
fppi
FPL
FPport
fprim
fprime
@ -832,6 +838,7 @@ len
lestarch
levelname
lflag
lgcov
lgtm
lhash
libc
@ -1096,7 +1103,10 @@ outdir
outout
overridable
packetization
packetize
packetized
packetizer
Packetizing
Paetz
Pandian
PARAMDOC
@ -1189,6 +1199,7 @@ ptbool
ptestrun
ptf
pthread
PTLM
ptmcg
pton
ptr
@ -1586,6 +1597,9 @@ TLMCHANIMPLCFG
TLMCHANIMPLTESTER
tlmname
TLMPACKET
TLMPACKETIZER
TLMPACKETIZERCOMPONENTIMPLCFG
TLMPACKETIZERTYPES
tlmval
TLOG
TML
@ -1698,6 +1712,7 @@ ve
venv
VERSIONED
versioning
vfd
VFILE
vhd
vhdl

View File

@ -7,11 +7,14 @@ on:
jobs:
build:
name: Autodocumentation
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2.0.0
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: ./.github/actions/
id: github-autodocs
fetch-depth: 0
- name: Install fprime tools
run: pip3 install fprime-tools fprime-gds
- name: Setup Dependencies
run: sudo apt-get install doxygen
- name: Autodocs
run: .github/actions/autodoc.bash

View File

@ -12,21 +12,15 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains 4 jobs. One for every CI test."
Framework:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs the CI action internal to the repository
- name: Install fprime tools
run: pip3 install fprime-tools fprime-gds
- name: F prime CI step
uses: ./.github/actions/
id: github-ci-action
with:
test: Framework
run: ./ci/tests/Framework.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v2
@ -37,19 +31,14 @@ jobs:
retention-days: 5
Ref:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs the CI action internal to the repository
- name: Install fprime tools
run: pip3 install fprime-tools fprime-gds
- name: F prime CI step
uses: ./.github/actions/
id: github-ci-action
with:
test: 'Ref'
run: ./ci/tests/Ref.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v2
@ -60,19 +49,16 @@ jobs:
retention-days: 5
RPI:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs the CI action internal to the repository
- name: Install fprime tools
run: pip3 install fprime-tools fprime-gds
- name: Install RPI Toolchain
run: sudo git clone https://github.com/raspberrypi/tools.git /opt/rpi/tools
- name: F prime CI step
uses: ./.github/actions/
id: github-ci-action
with:
test: 'RPI'
run: ./ci/tests/RPI.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v2
@ -83,19 +69,16 @@ jobs:
retention-days: 5
Integration:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs the CI action internal to the repository
- name: Install fprime tools
run: pip3 install fprime-tools fprime-gds
- name: Setup Dependencies
run: sudo apt-get install valgrind
- name: F prime CI step
uses: ./.github/actions/
id: github-ci-action
with:
test: '30-ints'
run: ./ci/tests/30-ints.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v2
@ -103,4 +86,15 @@ jobs:
with:
name: ci-int-logs
path: ci-logs.tar.gz
retention-days: 5
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

View File

@ -0,0 +1,640 @@
#!/usr/bin/env python
# ===============================================================================
# NAME: tlm_packet_gen.py
#
# DESCRIPTION: A tool for generating telemetry packet data structures for use with Svc/TlmPacketizer.
# Logic borrowed from gds_dictgen.py
#
# AUTHOR: Tim Canham
# EMAIL: timothy.canham@jpl.nasa.gov
# DATE CREATED: September 8, 2019
#
# Copyright 2019, California Institute of Technology.
# ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledged.
# ===============================================================================
import os
import sys
import logging
from optparse import OptionParser
# Meta-model for Component only generation
from fprime_ac.models import TopoFactory
from fprime_ac.parsers import XmlSerializeParser
from fprime_ac.parsers import XmlEnumParser
from fprime_ac.parsers import XmlArrayParser
# Parsers to read the XML
from fprime_ac.parsers import XmlTopologyParser
from lxml import etree
from Cheetah.Template import Template
from fprime_ac.utils.buildroot import (
search_for_file,
set_build_roots,
get_nearest_build_root,
)
header_file_template = """
\#ifndef ${packet_list_name}_header_h
\#define ${packet_list_name}_header_h
\#include <Svc/TlmPacketizer/TlmPacketizerTypes.hpp>
namespace ${packet_list_namespace} {
// set of packets to send
extern const Svc::TlmPacketizerPacketList ${packet_list_name}Pkts;
// set of channels to ignore
extern const Svc::TlmPacketizerPacket ${packet_list_name}Ignore;
}
\#endif // ${packet_list_name}_header_h
"""
impl_file_template = """
\#include <Svc/TlmPacketizer/TlmPacketizerTypes.hpp>
\#include <${output_header}>
\#include <FpConfig.hpp>
\#include <Fw/Types/BasicTypes.hpp>
\#include <Fw/Time/Time.hpp>
// Verify packets not too large for ComBuffer
// if this macro gives a compile error, that means the packets are too large
void check_func(void) {
COMPILE_TIME_ASSERT((${max_size} <= (FW_COM_BUFFER_MAX_SIZE - Fw::Time::SERIALIZED_SIZE - sizeof(FwTlmPacketizeIdType) - sizeof(FwPacketDescriptorType))),PacketsTooBig);
}
namespace ${packet_list_namespace} {
#for $packet,$id,$level,$channel_list in $packet_list
static const Svc::TlmPacketizerChannelEntry ${packet}List[] = {
#for $channel_id,$channel_size,$channel_name in $channel_list:
{$channel_id, $channel_size}, // $channel_name
#end for
};
static const Svc::TlmPacketizerPacket ${packet} = { ${packet}List, $id, $level, FW_NUM_ARRAY_ELEMENTS(${packet}List) };
#end for
const Svc::TlmPacketizerPacketList ${packet_list_name}Pkts = {
{
#for $packet,$id,$level,$channel_list in $packet_list
&${packet},
#end for
},
$len($packet_list)
};
static const Svc::TlmPacketizerChannelEntry ignoreList[] = {
#for $channel_id,$channel_name in $ignore_list:
{$channel_id, 0}, // $channel_name
#end for
};
const Svc::TlmPacketizerPacket ${packet_list_name}Ignore = { ignoreList, 0, 0, FW_NUM_ARRAY_ELEMENTS(ignoreList) };
} // end namespace ${packet_list_namespace}
"""
# Global logger init. below.
PRINT = logging.getLogger("output")
DEBUG = logging.getLogger("debug")
class TlmPacketParseValueError(ValueError):
pass
class TlmPacketParseIOError(ValueError):
pass
class TlmPacketParser(object):
def __init__(self, verbose=False, dependency=None):
self.verbose = verbose
self.dependency = dependency
self.size_dict = dict()
def add_type_size(self, type, size):
PRINT.debug("Type: %s size: %d" % (type, size))
self.size_dict[type] = size
def get_type_size(self, type_name, size):
# switch based on type
if type == "string":
return size
elif type_name == "I8":
return 1
elif type_name == "I16":
return 2
elif type_name == "I32":
return 4
elif type_name == "I64":
return 8
elif type_name == "U8":
return 1
elif type_name == "U16":
return 2
elif type_name == "U32":
return 4
elif type_name == "U64":
return 8
elif type_name == "F32":
return 4
elif type_name == "F64":
return 8
elif type_name == "bool":
return 1
else:
return None
# def search_for_file(self,file_type, file_path):
# '''
# Searches for a given included port or serializable by looking in three places:
# - The specified BUILD_ROOT
# - The F Prime core
# - The exact specified path
# @param file_type: type of file searched for
# @param file_path: path to look for based on offset
# @return: full path of file
# '''
# core = os.environ.get("FPRIME_CORE_DIR", BUILD_ROOT)
# for possible in [BUILD_ROOT, core, None]:
# if not possible is None:
# checker = os.path.join(possible, file_path)
# else:
# checker = file_path
# if os.path.exists(checker):
# DEBUG.debug("%s xml type description file: %s" % (file_type,file_path))
# return checker
# else:
# return None
def generate_channel_size_dict(self, the_parsed_topology_xml, xml_filename):
"""
Generates GDS XML dictionary from parsed topology XML
"""
if self.verbose:
print("Topology xml type description file: %s" % xml_filename)
model = TopoFactory.TopoFactory.getInstance()
topology_model = model.create(the_parsed_topology_xml, generate_list_file=False)
# uses the topology model to process the items
# create list of used parsed component xmls
parsed_xml_dict = {}
for comp in the_parsed_topology_xml.get_instances():
if comp.get_type() in topology_model.get_base_id_dict():
parsed_xml_dict[comp.get_type()] = comp.get_comp_xml()
else:
PRINT.info(
"Components with type {} aren't in the topology model.".format(
comp.get_type()
)
)
xml_list = []
for parsed_xml_type in parsed_xml_dict:
if parsed_xml_dict[parsed_xml_type] is None:
print(
"ERROR: XML of type {} is being used, but has not been parsed correctly. Check if file exists or add xml file with the 'import_component_type' tag to the Topology file.".format(
parsed_xml_type
)
)
raise Exception()
xml_list.append(parsed_xml_dict[parsed_xml_type])
topology_model.set_instance_xml_list(xml_list)
ch_size_dict = dict()
for comp in the_parsed_topology_xml.get_instances():
comp_name = comp.get_name()
comp_id = int(comp.get_base_id())
comp_type = comp.get_type()
if self.verbose:
PRINT.debug("Processing %s" % comp_name)
# check for included XML types
self.process_enum_files(parsed_xml_dict[comp_type].get_enum_type_files())
self.process_array_files(parsed_xml_dict[comp_type].get_array_type_files())
self.process_serializable_files(
parsed_xml_dict[comp_type].get_serializable_type_files()
)
# check for channels
if parsed_xml_dict[comp_type].get_channels() is not None:
for chan in parsed_xml_dict[comp_type].get_channels():
channel_name = comp_name + "." + chan.get_name()
if self.verbose:
print("Processing Channel %s" % channel_name)
chan_type = chan.get_type()
# if channel is enum
if type(chan_type) == type(tuple()):
chan_size = 4
# if channel is serializable
elif chan_type in self.size_dict:
chan_size = self.size_dict[chan_type]
else:
chan_size = self.get_type_size(chan_type, chan.get_size())
if chan_size is None:
print(
'Component %s channel %s type "%s" not found!'
% (comp_name, channel_name, chan_type)
)
sys.exit(-1)
chan_id = int(chan.get_ids()[0], 0) + comp_id
if self.verbose:
print("Channel %s size %d" % (channel_name, chan_size))
ch_size_dict[channel_name] = (chan_id, chan_size)
return ch_size_dict
def gen_packet_file(self, xml_filename):
view_path = "./Views"
if not os.path.exists(view_path):
os.mkdir(view_path)
# Make sure files
if not os.path.isfile(xml_filename):
raise TlmPacketParseIOError("File %s does not exist!" % xml_filename)
if not "PacketsAi" in xml_filename:
raise IOError(
"ERROR: Missing PacketsAi at end of file name %s" % xml_filename
)
fd = open(xml_filename, "r")
xml_parser = etree.XMLParser(remove_comments=True)
element_tree = etree.parse(fd, parser=xml_parser)
channel_size_dict = None
ht = Template(header_file_template)
it = Template(impl_file_template)
if element_tree.getroot().tag == "packets":
list_name = element_tree.getroot().attrib["name"]
list_namespace = element_tree.getroot().attrib["namespace"]
max_size = int(element_tree.getroot().attrib["size"])
# fill in template fields for header
ht.packet_list_name = list_name
ht.packet_list_namespace = list_namespace
# fill in template fields for implementation file
it.packet_list_name = list_name
it.packet_list_namespace = list_namespace
it.max_size = max_size
packet_list_container = list()
packetized_channel_list = list()
it.ignore_list = list()
id_list = list() # check for duplicates
ignore_name_list = list()
size_dict = dict()
ht.num_packets = 0
total_packet_size = 0
levels = list()
view_path = "./Views"
# find the topology import
for entry in element_tree.getroot():
# read in topology file
if entry.tag == "import_topology":
top_file = search_for_file("Packet", entry.text)
if top_file is None:
raise TlmPacketParseIOError(
"import file %s not found" % entry.text
)
the_parsed_topology_xml = XmlTopologyParser.XmlTopologyParser(
top_file
)
deployment = the_parsed_topology_xml.get_deployment()
if self.verbose:
print("Found assembly or deployment named: %s\n" % deployment)
channel_size_dict = self.generate_channel_size_dict(
the_parsed_topology_xml, xml_filename
)
elif entry.tag == "packet":
if channel_size_dict is None:
raise TlmPacketParseValueError(
"%s: Topology import must be before packet definitions"
% xml_filename
)
packet_size = 0
packet_name = entry.attrib["name"]
# Open a text file for a GDS view
vfd = open("%s/%s.txt" % (view_path, packet_name), "w")
packet_id = entry.attrib["id"]
packet_level = entry.attrib["level"]
print("Packetizing %s (%s)" % (packet_name, packet_id))
if packet_id in id_list:
raise TlmPacketParseValueError(
"Duplicate packet id %s" % packet_id
)
else:
id_list.append(packet_id)
channel_list = list()
for channel in entry:
channel_name = channel.attrib["name"]
if not channel_name in channel_size_dict:
raise TlmPacketParseValueError(
"Channel %s does not exist" % channel_name
)
(channel_id, channel_size) = channel_size_dict[channel_name]
packet_size += channel_size
if self.verbose:
print(
" -Channel %s ID %d size %d"
% (channel_name, channel_id, channel_size)
)
channel_list.append((channel_id, channel_size, channel_name))
packetized_channel_list.append(channel_name)
vfd.write("%s\n" % channel_name)
packet_list_container.append(
(packet_name, packet_id, packet_level, channel_list)
)
ht.num_packets += 1
packet_size += (
11 + 2 + 4
) # raw packet size + time tag + packet id + packet descriptor
if packet_size > max_size:
raise TlmPacketParseValueError(
"Packet %s is too large. Size: %d max: %d"
% (packet_name, packet_size, max_size)
)
print("Packet %s size %d/%d" % (packet_name, packet_size, max_size))
total_packet_size += packet_size
if packet_level in size_dict:
size_dict[packet_level] = size_dict[packet_level] + packet_size
else:
size_dict[packet_level] = packet_size
if not packet_level in levels:
levels.append(packet_level)
vfd.close()
elif entry.tag == "ignore":
if channel_size_dict is None:
raise TlmPacketParseValueError(
"%s: Topology import must be before packet definitions"
% xml_filename
)
for channel in entry:
channel_name = channel.attrib["name"]
if not channel_name in channel_size_dict:
raise TlmPacketParseValueError(
"Channel %s does not exist" % channel_name
)
(channel_id, channel_size) = channel_size_dict[channel_name]
it.ignore_list.append((channel_id, channel_name))
if self.verbose:
print(
"Channel %s (%d) ignored" % (channel_name, channel_id)
)
ignore_name_list.append(channel_name)
else:
raise TlmPacketParseValueError("Invalid packet tag %s" % entry.tag)
if self.verbose:
print("Entry: %s" % entry.tag)
else:
raise TlmPacketParseValueError(
"Invalid xml type %s" % element_tree.getroot().tag
)
output_file_base = os.path.splitext(os.path.basename(xml_filename))[0].replace(
"Ai", ""
)
file_dir = os.path.dirname(xml_filename).replace(
get_nearest_build_root(xml_filename) + os.sep, ""
)
missing_channels = False
for channel in channel_size_dict:
if (
not channel in packetized_channel_list
and not channel in ignore_name_list
):
(channel_id, channel_size) = channel_size_dict[channel]
print(
"Channel %s (%d) not packetized or ignored." % (channel, channel_id)
)
missing_channels = True
if missing_channels:
raise TlmPacketParseValueError("Channels missing from packets")
header = "%sAc.hpp" % output_file_base
source = "%sAc.cpp" % output_file_base
print("Generating %s and %s" % (header, source))
levels.sort()
for level in levels:
print(
"Level: %s Bytes: %d bits: %d"
% (level, size_dict[level], size_dict[level] * 8)
)
print(
"Number of packets: %d\nTotal packet bytes: %d bits: %d"
% (ht.num_packets, total_packet_size, total_packet_size * 8)
)
it.packet_list = packet_list_container
it.output_header = "%s/%sAc.hpp" % (file_dir, output_file_base)
open(header, "w").write(str(ht))
open(source, "w").write(str(it))
target_directory = os.getcwd().replace("\\", os.sep)
header_target = target_directory + os.sep + header
source_target = target_directory + os.sep + source
# write dependency file
if self.dependency is not None:
dependency_file_txt = "\n%s %s: %s\n" % (
source_target,
header_target,
top_file,
)
open(self.dependency, "w").write(dependency_file_txt)
def process_serializable_files(self, serializable_file_list):
for serializable_file in serializable_file_list:
serializable_file = search_for_file("Serializable", serializable_file)
serializable_model = XmlSerializeParser.XmlSerializeParser(
serializable_file
)
# process XML includes
self.process_enum_files(serializable_model.get_include_enums())
self.process_array_files(serializable_model.get_include_arrays())
self.process_serializable_files(serializable_model.get_includes())
serializable_type = (
serializable_model.get_namespace()
+ "::"
+ serializable_model.get_name()
)
serializable_size = 0
for (
member_name,
member_type,
member_size,
member_format_specifier,
member_comment,
_,
) in serializable_model.get_members():
# if enumeration
if type(member_type) == type(tuple()):
type_size = 4 # Fixme: can we put this in a constant somewhere?
elif (
member_type in self.size_dict.keys()
): # See if it is a registered type
type_size = self.size_dict[member_type]
else:
type_size = self.get_type_size(member_type, member_size)
if type_size is None:
print(
"Illegal type %s in serializable %s"
% (member_type, serializable_type)
)
sys.exit(-1)
serializable_size += type_size
self.add_type_size(serializable_type, serializable_size)
if self.verbose:
print(
"Serializable %s size %d" % (serializable_type, serializable_size)
)
def process_enum_files(self, enum_file_list):
for enum_file in enum_file_list:
enum_file = search_for_file("Enumeration", enum_file)
enum_model = XmlEnumParser.XmlEnumParser(enum_file)
enum_type = enum_model.get_namespace() + "::" + enum_model.get_name()
self.add_type_size(
enum_type, 4
) # Fixme: can we put this in a constant somewhere?
def process_array_files(self, array_file_list):
for array_file in array_file_list:
array_file = search_for_file("Array", array_file)
array_model = XmlArrayParser.XmlArrayParser(array_file)
# process any XML includes
self.process_enum_files(array_model.get_include_enum_files())
self.process_array_files(array_model.get_include_array_files())
self.process_serializable_files(array_model.get_includes())
array_type = array_model.get_namespace() + "::" + array_model.get_name()
array_size = int(array_model.get_size())
elem_type = array_model.get_type()
elem_type_size = None
if type(elem_type) == type(tuple()):
elem_type_size = 4 # Fixme: can we put this in a constant somewhere?
elif elem_type in self.size_dict.keys(): # See if it is a registered type
elem_type_size = self.size_dict[elem_type]
else:
elem_type_size = self.get_type_size(elem_type, 1) # Fixme: strings?
if elem_type_size is None:
print("Illegal type %s in array %s" % (elem_type, array_type))
sys.exit(-1)
self.add_type_size(array_type, elem_type_size * array_size)
def pinit():
"""
Initialize the option parser and return it.
"""
usage = "usage: %prog [options] [xml_topology_filename]"
parser = OptionParser(usage)
parser.add_option(
"-b",
"--build_root",
dest="build_root_overwrite",
type="string",
help="Overwrite environment variable BUILD_ROOT",
default=None,
)
parser.add_option(
"-v",
"--verbose",
dest="verbose_flag",
help="Enable verbose mode showing more runtime detail (def: False)",
action="store_true",
default=False,
)
parser.add_option(
"-d",
"--dependency-file",
dest="dependency_file",
type="string",
help="Generate dependency file for make",
default=None,
)
return parser
def main():
"""
Main program.
"""
global VERBOSE # prevent local creation of variable
global BUILD_ROOT # environmental variable if set
Parser = pinit()
(opt, args) = Parser.parse_args()
# opt.verbose_flag = True
#
# Parse the input Topology XML filename
#
if len(args) == 0:
print("Usage: %s [options] xml_filename" % sys.argv[0])
return
elif len(args) == 1:
xml_filename = args[0]
else:
print("ERROR: Too many filenames, should only have one")
return
print("Processing packet file %s" % xml_filename)
set_build_roots(os.environ.get("BUILD_ROOT"))
packet_parser = TlmPacketParser(opt.verbose_flag, opt.dependency_file)
try:
packet_parser.gen_packet_file(xml_filename)
except TlmPacketParseValueError as e:
print("Packet XML parsing error: %s" % e)
sys.exit(-1)
except TlmPacketParseIOError as e:
print("Packet XML file error: %s" % e)
sys.exit(-1)
sys.exit(0)
if __name__ == "__main__":
main()

View File

@ -177,7 +177,7 @@ def ParseTypedefEnum(typename, filename, loadfile=True):
#
# Configure a parser to pickoff a typedef enumeration. This only works
# for named typedefs of enumerations. We are looking for 'typedef enum'
# followd by the typename.
# followed by the typename.
_ = Forward()

View File

@ -12,7 +12,11 @@ set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/UdpSocket.cpp"
"${CMAKE_CURRENT_LIST_DIR}/SocketReadTask.cpp"
)
set(MOD_DEPS Os)
set(MOD_DEPS
Os
Fw/Buffer
)
register_fprime_module()

View File

@ -10,6 +10,11 @@ set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/BufferSendPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/Buffer.cpp"
)
set(MOD_DEPS
Fw/Types
)
register_fprime_module()
set(UT_SOURCE_FILES

View File

@ -153,7 +153,7 @@ int main() {
printf("Testing mixed priority...\n");
// For this test we expect things to come in fifo order
// for things of the same priority and in priority
// order for things of differend priorities.
// order for things of different priorities.
NATIVE_INT_TYPE pries[DEPTH] = {1, 7, 100, 1, 7};
NATIVE_INT_TYPE data2[DEPTH] = {4, 22, 99, 12344, 33};
NATIVE_INT_TYPE orderedPries[DEPTH] = {100, 7, 7, 1, 1};

122
Ref/Top/RefPacketsAi.xml Normal file
View File

@ -0,0 +1,122 @@
<packets name="RefPackets" namespace="Ref" size="111">
<import_topology>Ref/Top/RefTopologyAppAi.xml</import_topology>
<packet name="CDH" id="1" level="1">
<channel name="cmdDisp.CommandsDispatched"/>
<channel name="rateGroup1Comp.RgMaxTime"/>
<channel name="rateGroup2Comp.RgMaxTime"/>
<channel name="rateGroup3Comp.RgMaxTime"/>
<channel name="cmdSeq.CS_LoadCommands"/>
<channel name="cmdSeq.CS_CancelCommands"/>
<channel name="cmdSeq.CS_CommandsExecuted"/>
<channel name="cmdSeq.CS_SequencesCompleted"/>
<channel name="fileUplink.FilesReceived"/>
<channel name="fileUplink.PacketsReceived"/>
<channel name="fileUplinkBufferManager.TotalBuffs"/>
<channel name="fileUplinkBufferManager.CurrBuffs"/>
<channel name="fileUplinkBufferManager.HiBuffs"/>
<channel name="fileDownlink.FilesSent"/>
<channel name="fileDownlink.PacketsSent"/>
<channel name="pktTlm.TPK_SendLevel"/>
<channel name="fileManager.CommandsExecuted"/>
</packet>
<packet name="CDHErrors" id="2" level="1">
<channel name="rateGroup1Comp.RgCycleSlips"/>
<channel name="rateGroup2Comp.RgCycleSlips"/>
<channel name="rateGroup3Comp.RgCycleSlips"/>
<channel name="cmdSeq.CS_Errors"/>
<channel name="fileUplink.Warnings"/>
<channel name="fileDownlink.Warnings"/>
<channel name="health.PingLateWarnings"/>
<channel name="fileManager.Errors"/>
<channel name="fileUplinkBufferManager.NoBuffs"/>
<channel name="fileUplinkBufferManager.EmptyBuffs"/>
<channel name="fileManager.Errors"/>
</packet>
<packet name="DriveTlm" id="3" level="1">
<channel name="pingRcvr.PR_NumPings"/>
<channel name="sendBuffComp.PacketsSent"/>
<channel name="sendBuffComp.NumErrorsInjected"/>
<channel name="sendBuffComp.Parameter3"/>
<channel name="sendBuffComp.Parameter4"/>
<channel name="sendBuffComp.SendState"/>
<channel name="recvBuffComp.PktState"/>
<channel name="recvBuffComp.Sensor1"/>
<channel name="recvBuffComp.Sensor2"/>
<channel name="recvBuffComp.Parameter1"/>
<channel name="recvBuffComp.Parameter2"/>
<channel name="blockDrv.BD_Cycles"/>
</packet>
<packet name="SigGenSum" id="4" level="1">
<channel name="SG1.Output"/>
<channel name="SG1.Type"/>
<channel name="SG2.Output"/>
<channel name="SG2.Type"/>
<channel name="SG3.Output"/>
<channel name="SG3.Type"/>
<channel name="SG4.Output"/>
<channel name="SG4.Type"/>
<channel name="SG5.Output"/>
<channel name="SG5.Type"/>
</packet>
<packet name="SigGen1Info" id="5" level="2">
<channel name="SG1.Info"/>
</packet>
<packet name="SigGen2Info" id="6" level="2">
<channel name="SG2.Info"/>
</packet>
<packet name="SigGen3Info" id="7" level="2">
<channel name="SG3.Info"/>
</packet>
<packet name="SigGen4Info" id="8" level="2">
<channel name="SG4.Info"/>
</packet>
<packet name="SigGen5Info" id="9" level="2">
<channel name="SG5.Info"/>
</packet>
<packet name="SigGen1" id="10" level="3">
<channel name="SG1.PairOutput"/>
<channel name="SG1.History"/>
<channel name="SG1.PairHistory"/>
</packet>
<packet name="SigGen2" id="11" level="3">
<channel name="SG2.PairOutput"/>
<channel name="SG2.History"/>
<channel name="SG2.PairHistory"/>
</packet>
<packet name="SigGen3" id="12" level="3">
<channel name="SG3.PairOutput"/>
<channel name="SG3.History"/>
<channel name="SG3.PairHistory"/>
</packet>
<packet name="SigGen4" id="13" level="3">
<channel name="SG4.PairOutput"/>
<channel name="SG4.History"/>
<channel name="SG4.PairHistory"/>
</packet>
<packet name="SigGen5" id="14" level="3">
<channel name="SG5.PairOutput"/>
<channel name="SG5.History"/>
<channel name="SG5.PairHistory"/>
</packet>
<!-- Ignored packets -->
<ignore>
<channel name="cmdDisp.CommandErrors"/>
</ignore>
</packets>

View File

@ -279,5 +279,5 @@ class TestRefAppClass(object):
== 0
), "Failed to run fprime-seqgen"
self.assert_command(
"cmdSeq.CS_RUN", args=["/tmp/ref_test_int.bin"], max_delay=5
"cmdSeq.CS_RUN", args=["/tmp/ref_test_int.bin", "BLOCK"], max_delay=5
)

View File

@ -38,9 +38,9 @@ add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/RateGroupDriver/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/StaticMemory/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Time/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/TlmChan/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/TlmPacketizer/")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxTime/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxTimer/")
endif()

View File

@ -14,6 +14,7 @@ set(SOURCE_FILES
"${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"
)

View File

@ -13,6 +13,13 @@ module Svc {
AUTO = 1
}
@ Sequencer blocking state
enum BlockState {
BLOCK = 0
NO_BLOCK = 1
}
@ The stage of the file read operation
enum FileReadStage {
READ_HEADER
@ -55,6 +62,9 @@ module Svc {
# General ports
# ----------------------------------------------------------------------
@ Sequence cancel port
async input port seqCancelIn: Svc.CmdSeqCancel
@ Command response in port
async input port cmdResponseIn: Fw.CmdResponse

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,7 @@ Generated by fpp-to-xml
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>
@ -22,6 +23,7 @@ Generated by fpp-to-xml
<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>
@ -75,6 +77,11 @@ Generated by fpp-to-xml
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
@ -108,6 +115,11 @@ Generated by fpp-to-xml
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">

View File

@ -3,12 +3,9 @@
// \author Bocchino/Canham
// \brief cpp file for CmdDispatcherComponentBase component implementation class
//
// \copyright
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include <Fw/Types/Assert.hpp>
#include <Fw/Types/SerialBuffer.hpp>
@ -38,7 +35,10 @@ namespace Svc {
m_executedCount(0),
m_totalExecutedCount(0),
m_sequencesCompletedCount(0),
m_timeout(0)
m_timeout(0),
m_blockState(Svc::CmdSequencer_BlockState::NO_BLOCK),
m_opCode(0),
m_cmdSeq(0)
{
}
@ -48,7 +48,7 @@ namespace Svc {
CmdSequencerComponentBase::init(queueDepth, instance);
}
void CmdSequencerComponentImpl::setTimeout(NATIVE_UINT_TYPE timeout) {
void CmdSequencerComponentImpl::setTimeout(const NATIVE_UINT_TYPE timeout) {
this->m_timeout = timeout;
}
@ -94,13 +94,18 @@ namespace Svc {
void CmdSequencerComponentImpl::CS_RUN_cmdHandler(
FwOpcodeType opCode,
U32 cmdSeq,
const Fw::CmdStringArg& fileName) {
const Fw::CmdStringArg& fileName,
Svc::CmdSequencer_BlockState block) {
if (not this->requireRunMode(STOPPED)) {
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
return;
}
this->m_blockState = block.e;
this->m_cmdSeq = cmdSeq;
this->m_opCode = opCode;
// load commands
if (not this->loadFile(fileName)) {
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
@ -115,7 +120,9 @@ namespace Svc {
this->performCmd_Step();
}
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
if (Svc::CmdSequencer_BlockState::NO_BLOCK == this->m_blockState) {
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
}
}
void CmdSequencerComponentImpl::CS_VALIDATE_cmdHandler(
@ -184,6 +191,20 @@ namespace Svc {
this->log_ACTIVITY_HI_CS_PortSequenceStarted(this->m_sequence->getLogFileName());
}
void CmdSequencerComponentImpl ::
seqCancelIn_handler(
const NATIVE_INT_TYPE portNum
) {
if (RUNNING == this->m_runMode) {
this->performCmd_Cancel();
this->log_ACTIVITY_HI_CS_SequenceCanceled(this->m_sequence->getLogFileName());
++this->m_cancelCmdCount;
this->tlmWrite_CS_CancelCommands(this->m_cancelCmdCount);
} else {
this->log_WARNING_LO_CS_NoSequenceActive();
}
}
void CmdSequencerComponentImpl::CS_CANCEL_cmdHandler(
FwOpcodeType opCode, U32 cmdSeq) {
if (RUNNING == this->m_runMode) {
@ -230,6 +251,11 @@ namespace Svc {
this->seqDone_out(0,0,0,Fw::CmdResponse::EXECUTION_ERROR);
}
if (Svc::CmdSequencer_BlockState::BLOCK == this->m_blockState) {
this->cmdResponse_out(this->m_opCode, this->m_cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
}
this->m_blockState = Svc::CmdSequencer_BlockState::NO_BLOCK;
}
void CmdSequencerComponentImpl ::
@ -304,6 +330,8 @@ namespace Svc {
this->cmdResponse_out(opcode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
return;
}
this->m_blockState = Svc::CmdSequencer_BlockState::NO_BLOCK;
this->m_runMode = RUNNING;
this->performCmd_Step();
this->log_ACTIVITY_HI_CS_CmdStarted(this->m_sequence->getLogFileName());
@ -417,6 +445,13 @@ namespace Svc {
if (this->isConnected_seqDone_OutputPort(0)) {
this->seqDone_out(0,0,0,Fw::CmdResponse::OK);
}
if (Svc::CmdSequencer_BlockState::BLOCK == this->m_blockState) {
this->cmdResponse_out(this->m_opCode, this->m_cmdSeq, Fw::CmdResponse::OK);
}
this->m_blockState = Svc::CmdSequencer_BlockState::NO_BLOCK;
}
void CmdSequencerComponentImpl::commandComplete(const U32 opcode) {

View File

@ -3,11 +3,9 @@
// \author Bocchino/Canham
// \brief hpp file for CmdSequencer component implementation class
//
// \copyright
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_CmdSequencerImpl_HPP
@ -103,14 +101,14 @@ namespace Svc {
//! Time base mismatch
void timeBaseMismatch(
const FwTimeBaseStoreType currTimeBase, //!< The current time base
const FwTimeBaseStoreType seqTimeBase //!< The sequence file time base
const U32 currTimeBase, //!< The current time base
const U32 seqTimeBase //!< The sequence file time base
);
//! Time context mismatch
void timeContextMismatch(
const FwTimeContextStoreType currTimeContext, //!< The current time context
const FwTimeContextStoreType seqTimeContext //!< The sequence file time context
const U32 currTimeContext, //!< The current time context
const U32 seqTimeContext //!< The sequence file time context
);
PRIVATE:
@ -216,9 +214,9 @@ namespace Svc {
//! Give the sequence representation a memory buffer
void allocateBuffer(
const NATIVE_INT_TYPE identifier, //!< The identifier
NATIVE_INT_TYPE identifier, //!< The identifier
Fw::MemAllocator& allocator, //!< The allocator
const NATIVE_UINT_TYPE bytes //!< The number of bytes
NATIVE_UINT_TYPE bytes //!< The number of bytes
);
//! Deallocate the buffer
@ -527,7 +525,7 @@ namespace Svc {
//! Sequence will quit if a command takes longer than the number of
//! seconds in the timeout value.
void setTimeout(
NATIVE_UINT_TYPE seconds //!< The number of seconds
const NATIVE_UINT_TYPE seconds //!< The number of seconds
);
//! (Optional) Set the sequence format.
@ -593,6 +591,12 @@ namespace Svc {
U32 key //!< Value to return to pinger
);
//! Handler implementation for seqCancelIn
//!
void seqCancelIn_handler(
const NATIVE_INT_TYPE portNum /*!< The port number*/
);
PRIVATE:
// ----------------------------------------------------------------------
@ -624,7 +628,8 @@ namespace Svc {
void CS_RUN_cmdHandler(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
const Fw::CmdStringArg& fileName //!< The file name
const Fw::CmdStringArg& fileName, //!< The file name
Svc::CmdSequencer_BlockState block /*!< Return command status when complete or not*/
);
//! Handler for command CS_START
@ -755,6 +760,11 @@ namespace Svc {
//! timeout timer
Timer m_cmdTimeoutTimer;
//! Block mode for command status
Svc::CmdSequencer_BlockState::t m_blockState;
FwOpcodeType m_opCode;
U32 m_cmdSeq;
};
};

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- =====================================================================
CmdSequencer_BlockStateEnumAi.xml
Generated by fpp-to-xml
====================================================================== -->
<enum namespace="Svc" name="CmdSequencer_BlockState" serialize_type="I32" default="BLOCK">
<comment>
Sequencer blocking state
</comment>
<item name="BLOCK" value="0"/>
<item name="NO_BLOCK" value="1"/>
</enum>

View File

@ -1,6 +1,9 @@
@ Run a command sequence file
async command CS_RUN(
fileName: string size 240 @< The name of the sequence file
$block: BlockState @< Return command status when complete or not
) \
opcode 0

View File

@ -3,11 +3,9 @@
// \author Bocchino
// \brief Implementation for CmdSequencerComponentImpl::Sequence::Events
//
// \copyright
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Fw/Types/Assert.hpp"
@ -105,7 +103,7 @@ namespace Svc {
}
void CmdSequencerComponentImpl::Sequence::Events ::
timeBaseMismatch(const FwTimeBaseStoreType currTimeBase, const FwTimeBaseStoreType seqTimeBase)
timeBaseMismatch(const U32 currTimeBase, const U32 seqTimeBase)
{
Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();
CmdSequencerComponentImpl& component = this->m_sequence.m_component;
@ -119,8 +117,8 @@ namespace Svc {
void CmdSequencerComponentImpl::Sequence::Events ::
timeContextMismatch(
const FwTimeContextStoreType currTimeContext,
const FwTimeContextStoreType seqTimeContext
const U32 currTimeContext,
const U32 seqTimeContext
)
{
Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();

View File

@ -3,11 +3,9 @@
// \author Bocchino/Canham
// \brief CmdSequencerComponentImpl::FPrimeSequence implementation
//
// \copyright
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Fw/Types/Assert.hpp"

View File

@ -3,11 +3,9 @@
// \author Bocchino/Canham
// \brief Implementation file for CmdSequencer::Sequence
//
// \copyright
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include <Fw/Types/Assert.hpp>
@ -77,22 +75,18 @@ namespace Svc {
void CmdSequencerComponentImpl::Sequence ::
allocateBuffer(
const NATIVE_INT_TYPE identifier,
NATIVE_INT_TYPE identifier,
Fw::MemAllocator& allocator,
const NATIVE_UINT_TYPE bytes
NATIVE_UINT_TYPE bytes
)
{
// has to be at least as big as a header
FW_ASSERT(bytes >= Sequence::Header::SERIALIZED_SIZE);
bool recoverable; // don't care, since sequencer buffers don't need to survive reboot
bool recoverable;
this->m_allocatorId = identifier;
NATIVE_UINT_TYPE actualSize = bytes; // set size to requested size
U8* mem = static_cast<U8*>(allocator.allocate(identifier,actualSize,recoverable));
FW_ASSERT(mem);
this->m_buffer.setExtBuffer(
mem,
actualSize
static_cast<U8*>(allocator.allocate(identifier,bytes,recoverable)),
bytes
);
}

View File

@ -4,10 +4,9 @@
// \brief AMPCS-specific tests
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Os/FileSystem.hpp"
@ -40,7 +39,7 @@ namespace Svc {
const char *const fileName = file.getName().toChar();
file.write();
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert no response on seqDone
ASSERT_from_seqDone_SIZE(0);
@ -71,7 +70,7 @@ namespace Svc {
file.write();
file.remove();
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert command response
ASSERT_CMD_RESPONSE_SIZE(1);

View File

@ -4,10 +4,9 @@
// \brief AMPCS-specific tests
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_AMPCS_HPP

View File

@ -4,11 +4,9 @@
// \brief Command buffers for testing sequences
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Fw/Com/ComPacket.hpp"
#include "Svc/CmdSequencer/test/ut/CommandBuffers.hpp"

View File

@ -4,11 +4,9 @@
// \brief Command buffers for testing sequences
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_CommandBuffers_HPP
#define Svc_CommandBuffers_HPP

View File

@ -4,10 +4,9 @@
// \brief Test health pings
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/Health.hpp"

View File

@ -4,10 +4,9 @@
// \brief Test health pings
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_Health_HPP

View File

@ -4,10 +4,9 @@
// \brief Test immediate command sequences with record
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/CommandBuffers.hpp"

View File

@ -4,10 +4,9 @@
// \brief Test immediate command sequences with record
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_Immediate_HPP

View File

@ -4,7 +4,7 @@
// \brief Base class for Immediate and ImmediateEOS
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//

View File

@ -4,11 +4,9 @@
// \brief Base class for Immediate and ImmediateEOS
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_ImmediateBase_HPP
#define Svc_ImmediateBase_HPP

View File

@ -4,10 +4,9 @@
// \brief Test immediate command sequences with EOS record
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/CommandBuffers.hpp"

View File

@ -4,10 +4,9 @@
// \brief Test immediate command sequences with EOS record
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_ImmediateEOS_HPP

View File

@ -4,10 +4,9 @@
// \brief Implementation for Tester::Interceptors
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Os/Stubs/FileStubs.hpp"

View File

@ -4,10 +4,9 @@
// \brief Test immediate command sequences with EOS record
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Os/FileSystem.hpp"
@ -47,7 +46,7 @@ namespace Svc {
const char *const fileName = file.getName().toChar();
file.write();
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert command response
ASSERT_CMD_RESPONSE_SIZE(1);
@ -103,7 +102,7 @@ namespace Svc {
Fw::FW_DESERIALIZE_FORMAT_ERROR
);
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert command response
ASSERT_CMD_RESPONSE_SIZE(1);
@ -192,7 +191,7 @@ namespace Svc {
const char *const fileName = file.getName().toChar();
file.write();
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert command response
ASSERT_CMD_RESPONSE_SIZE(1);
@ -258,7 +257,7 @@ namespace Svc {
Fw::Time testTime(TB_WORKSTATION_TIME, 0, 0);
this->setTestTime(testTime);
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert command response
ASSERT_CMD_RESPONSE_SIZE(1);
@ -285,7 +284,7 @@ namespace Svc {
const char *const fileName = file.getName().toChar();
file.write();
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert no response on seqDone
ASSERT_from_seqDone_SIZE(0);
@ -360,7 +359,7 @@ namespace Svc {
const char *const fileName = file.getName().toChar();
file.remove();
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert command response
ASSERT_CMD_RESPONSE_SIZE(1);
@ -408,7 +407,7 @@ namespace Svc {
Fw::FW_DESERIALIZE_SIZE_MISMATCH
);
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert command response
ASSERT_CMD_RESPONSE_SIZE(1);
@ -459,7 +458,7 @@ namespace Svc {
Fw::FW_DESERIALIZE_SIZE_MISMATCH
);
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert command response
ASSERT_CMD_RESPONSE_SIZE(1);
@ -510,7 +509,7 @@ namespace Svc {
Fw::FW_DESERIALIZE_SIZE_MISMATCH
);
// Run the sequence
this->sendCmd_CS_RUN(0, 0, fileName);
this->sendCmd_CS_RUN(0, 0, fileName,Svc::CmdSequencer_BlockState::NO_BLOCK);
this->clearAndDispatch();
// Assert command response
ASSERT_CMD_RESPONSE_SIZE(1);

View File

@ -4,10 +4,9 @@
// \brief Test immediate command sequences with EOS record
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_InvalidFiles_HPP

View File

@ -1,10 +1,13 @@
// \copyright
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
// ----------------------------------------------------------------------
// Main.cpp
// ----------------------------------------------------------------------
#define ALL_TESTS 1
#include "Os/FileSystem.hpp"
#include <Os/FileSystem.hpp>
#include "Svc/CmdSequencer/test/ut/AMPCS.hpp"
#include "Svc/CmdSequencer/test/ut/Health.hpp"
#include "Svc/CmdSequencer/test/ut/Immediate.hpp"
@ -17,7 +20,6 @@
#include "Svc/CmdSequencer/test/ut/Mixed.hpp"
#include "Svc/CmdSequencer/test/ut/UnitTest.hpp"
#if ALL_TESTS
TEST(AMPCS, MissingCRC) {
Svc::AMPCS::Tester tester;
tester.MissingCRC();
@ -329,11 +331,11 @@ TEST(Mixed, Validate) {
tester.Validate();
}
TEST(Mixed, ValidateAMPCS) {
Svc::Mixed::Tester tester(Svc::SequenceFiles::File::Format::AMPCS);
tester.Validate();
}
TEST(NoFiles, Init) {
TEST_CASE(103.1.1,"Nominal Initialization");
Svc::NoFiles::Tester tester;
@ -376,11 +378,10 @@ TEST(Relative, ValidateAMPCS) {
Svc::Relative::Tester tester(Svc::SequenceFiles::File::Format::AMPCS);
tester.Validate();
}
#endif
int main(int argc, char **argv) {
///Must create the directory at initialization
Os::FileSystem::createDirectory("bin");
// Create ./bin directory for test files
Os::FileSystem::createDirectory("./bin");
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

View File

@ -4,10 +4,9 @@
// \brief Test mixed immediate, relative, and absolute commands
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/CommandBuffers.hpp"

View File

@ -4,10 +4,9 @@
// \brief Test mixed immediate, relative, and absolute commands
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_Mixed_HPP

View File

@ -4,11 +4,9 @@
// \brief Base class for Mixed and Relative
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/CommandBuffers.hpp"
#include "Svc/CmdSequencer/test/ut/MixedRelativeBase.hpp"

View File

@ -4,11 +4,9 @@
// \brief Base class for Mixed and Relative
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_MixedRelativeBase_HPP
#define Svc_MixedRelativeBase_HPP

View File

@ -4,10 +4,9 @@
// \brief Test immediate command sequences with EOS record
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/CommandBuffers.hpp"

View File

@ -4,10 +4,9 @@
// \brief Test immediate command sequences with EOS record
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_NoFiles_HPP

View File

@ -4,10 +4,9 @@
// \brief Test relative command sequences
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/CommandBuffers.hpp"

View File

@ -4,10 +4,9 @@
// \brief Test relative command sequences
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_Relative_HPP

2
Svc/CmdSequencer/test/ut/SeqF/.gitignore vendored Executable file
View File

@ -0,0 +1,2 @@
*.seq
*.CRC32

View File

@ -4,11 +4,9 @@
// \brief Interface for AMPCS sequence files
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_AMPCS_AMPCS_HPP
#define Svc_SequenceFiles_AMPCS_AMPCS_HPP

View File

@ -4,7 +4,7 @@
// \brief AMPCS CRC files
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//

View File

@ -4,11 +4,9 @@
// \brief AMPCS CRCs
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_AMPCS_CRCs_HPP
#define Svc_SequenceFiles_AMPCS_CRCs_HPP

View File

@ -4,11 +4,9 @@
// \brief AMPCS sequence file headers
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "gtest/gtest.h"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/AMPCS/Headers.hpp"

View File

@ -4,11 +4,9 @@
// \brief AMPCS sequence file headers
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_AMPCS_Headers_HPP
#define Svc_SequenceFiles_AMPCS_Headers_HPP

View File

@ -4,11 +4,9 @@
// \brief AMPCS sequence file records
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Fw/Com/ComPacket.hpp"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/AMPCS/Records.hpp"

View File

@ -4,11 +4,9 @@
// \brief AMPCS sequence file records
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_AMPCS_Records_HPP
#define Svc_SequenceFiles_AMPCS_Records_HPP

View File

@ -4,10 +4,9 @@
// \brief BadCRCFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/SequenceFiles/AMPCS/AMPCS.hpp"

View File

@ -4,10 +4,9 @@
// \brief BadCRCFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_BadCRCFile_HPP

View File

@ -4,7 +4,7 @@
// \brief BadDescriptorFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//

View File

@ -4,11 +4,9 @@
// \brief BadDescriptorFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_BadDescriptorFile_HPP
#define Svc_SequenceFiles_BadDescriptorFile_HPP

View File

@ -4,7 +4,7 @@
// \brief BadTimeBaseFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//

View File

@ -4,11 +4,9 @@
// \brief BadTimeBaseFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_BadTimeBaseFile_HPP
#define Svc_SequenceFiles_BadTimeBaseFile_HPP

View File

@ -4,7 +4,7 @@
// \brief BadTimeContextFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//

View File

@ -4,11 +4,9 @@
// \brief BadTimeContextFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_BadTimeContextFile_HPP
#define Svc_SequenceFiles_BadTimeContextFile_HPP

View File

@ -4,10 +4,9 @@
// \brief F Prime sequence file headers
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "gtest/gtest.h"

View File

@ -4,10 +4,9 @@
// \brief Sequence file buffers
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_Buffers_HPP

View File

@ -4,7 +4,7 @@
// \brief DataAfterRecordsFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//

View File

@ -4,11 +4,9 @@
// \brief DataAfterRecordsFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_DataAfterRecordsFile_HPP
#define Svc_SequenceFiles_DataAfterRecordsFile_HPP

View File

@ -4,11 +4,9 @@
// \brief EmptyFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/SequenceFiles/AMPCS/AMPCS.hpp"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/Buffers.hpp"

View File

@ -4,11 +4,9 @@
// \brief EmptyFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_EmptyFile_HPP
#define Svc_SequenceFiles_EmptyFile_HPP

View File

@ -4,11 +4,9 @@
// \brief F Prime sequence file CRCs
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "gtest/gtest.h"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/FPrime/CRCs.hpp"

View File

@ -4,11 +4,9 @@
// \brief F Prime sequence file CRCs
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_FPrime_CRCs_HPP
#define Svc_SequenceFiles_FPrime_CRCs_HPP

View File

@ -4,11 +4,9 @@
// \brief Interface for F Prime sequence files
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_FPrime_FPrime_HPP
#define Svc_SequenceFiles_FPrime_FPrime_HPP

View File

@ -4,11 +4,9 @@
// \brief F Prime sequence file headers
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "gtest/gtest.h"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/FPrime/Headers.hpp"

View File

@ -4,11 +4,9 @@
// \brief F Prime sequence file headers
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_FPrime_Headers_HPP
#define Svc_SequenceFiles_FPrime_Headers_HPP

View File

@ -4,11 +4,9 @@
// \brief F Prime sequence file records
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Fw/Com/ComPacket.hpp"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/FPrime/Records.hpp"

View File

@ -4,11 +4,9 @@
// \brief F Prime sequence file records
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_FPrime_Records_HPP
#define Svc_SequenceFiles_FPrime_Records_HPP

View File

@ -4,10 +4,9 @@
// \brief File implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Fw/Types/String.hpp"

View File

@ -4,10 +4,9 @@
// \brief File interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_File_HPP

View File

@ -4,7 +4,7 @@
// \brief ImmediateEOSFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//

View File

@ -4,11 +4,9 @@
// \brief ImmediateEOSFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_ImmediateEOSFile_HPP
#define Svc_SequenceFiles_ImmediateEOSFile_HPP

View File

@ -4,7 +4,7 @@
// \brief ImmediateFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//

View File

@ -4,11 +4,9 @@
// \brief ImmediateFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_ImmediateFile_HPP
#define Svc_SequenceFiles_ImmediateFile_HPP

View File

@ -4,11 +4,9 @@
// \brief MissingCRCFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/SequenceFiles/AMPCS/AMPCS.hpp"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/Buffers.hpp"

View File

@ -4,11 +4,9 @@
// \brief MissingCRCFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_MissingCRCFile_HPP
#define Svc_SequenceFiles_MissingCRCFile_HPP

View File

@ -4,11 +4,9 @@
// \brief MissingFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/SequenceFiles/AMPCS/AMPCS.hpp"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/MissingFile.hpp"

View File

@ -4,11 +4,9 @@
// \brief MissingFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_MissingFile_HPP
#define Svc_SequenceFiles_MissingFile_HPP

View File

@ -4,11 +4,9 @@
// \brief MixedFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/SequenceFiles/AMPCS/AMPCS.hpp"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/Buffers.hpp"

View File

@ -4,11 +4,9 @@
// \brief MixedFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_MixedFile_HPP
#define Svc_SequenceFiles_MixedFile_HPP

View File

@ -4,7 +4,7 @@
// \brief RelativeFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//

View File

@ -4,11 +4,9 @@
// \brief RelativeFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_RelativeFile_HPP
#define Svc_SequenceFiles_RelativeFile_HPP

View File

@ -4,11 +4,9 @@
// \brief Interface for F Prime sequence files
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_SequenceFiles_HPP
#define Svc_SequenceFiles_SequenceFiles_HPP

View File

@ -4,11 +4,9 @@
// \brief SizeFieldTooLargeFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/SequenceFiles/Buffers.hpp"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/FPrime/FPrime.hpp"

View File

@ -4,11 +4,9 @@
// \brief SizeFieldTooLargeFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_SizeFieldTooLargeFile_HPP
#define Svc_SequenceFiles_SizeFieldTooLargeFile_HPP

View File

@ -4,11 +4,9 @@
// \brief SizeFieldTooSmallFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/SequenceFiles/Buffers.hpp"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/FPrime/FPrime.hpp"

View File

@ -4,11 +4,9 @@
// \brief SizeFieldTooSmallFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_SizeFieldTooSmallFile_HPP
#define Svc_SequenceFiles_SizeFieldTooSmallFile_HPP

View File

@ -4,10 +4,9 @@
// \brief TooLargeFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Fw/Types/SerialBuffer.hpp"
@ -61,7 +60,6 @@ namespace Svc {
- sizeof(AMPCSSequence::Record::Time::t)
- sizeof(AMPCSSequence::Record::CmdLength::t);
U8 cmdFieldBuffer[cmdFieldSize];
memset(cmdFieldBuffer, 0, sizeof(cmdFieldBuffer));
Fw::SerialBuffer cmdField(cmdFieldBuffer, sizeof(cmdFieldBuffer));
cmdField.setBuffLen(cmdFieldSize);
AMPCS::Records::serialize(timeFlag, time, cmdField, buffer);

View File

@ -4,10 +4,9 @@
// \brief TooLargeFile interface
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef Svc_SequenceFiles_TooLargeFile_HPP

View File

@ -4,11 +4,9 @@
// \brief USecFieldTooShortFile implementation
//
// \copyright
// Copyright (C) 2018 California Institute of Technology.
// Copyright (C) 2009-2018 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Svc/CmdSequencer/test/ut/SequenceFiles/Buffers.hpp"
#include "Svc/CmdSequencer/test/ut/SequenceFiles/FPrime/FPrime.hpp"

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