mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
mstarch: merge latest v3.0.0
This commit is contained in:
commit
3b8769ab89
2
.clang-tidy
Normal file
2
.clang-tidy
Normal file
@ -0,0 +1,2 @@
|
||||
Checks: "-clang-analyzer-security.insecureAPI.rand"
|
||||
WarningsAsErrors: '*'
|
||||
1
.github/actions/spelling/expect.txt
vendored
1
.github/actions/spelling/expect.txt
vendored
@ -328,6 +328,7 @@ deserializing
|
||||
dest
|
||||
DEVNULL
|
||||
dfdc
|
||||
DFL
|
||||
DFPRIME
|
||||
DGRAM
|
||||
DHTML
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -81,7 +81,5 @@ fprime-venv
|
||||
xml
|
||||
depend
|
||||
|
||||
.*
|
||||
|
||||
/.idea/
|
||||
/venv/
|
||||
|
||||
@ -171,7 +171,7 @@ namespace ${namespace} {
|
||||
}
|
||||
|
||||
|
||||
const ${name}& ${name} ::
|
||||
${name}& ${name} ::
|
||||
operator=(const ${name}& other)
|
||||
{
|
||||
for(U32 index = 0; index < SIZE; index++) {
|
||||
@ -180,7 +180,7 @@ namespace ${namespace} {
|
||||
return *this;
|
||||
}
|
||||
|
||||
const ${name}& ${name} ::
|
||||
${name}& ${name} ::
|
||||
operator=(const ElementType (&a)[SIZE])
|
||||
{
|
||||
for(U32 index = 0; index < SIZE; index++) {
|
||||
@ -189,7 +189,7 @@ namespace ${namespace} {
|
||||
return *this;
|
||||
}
|
||||
|
||||
const ${name}& ${name} ::
|
||||
${name}& ${name} ::
|
||||
operator=(const ElementType& e)
|
||||
{
|
||||
for(U32 index = 0; index < SIZE; index++) {
|
||||
|
||||
@ -155,17 +155,17 @@ namespace ${namespace} {
|
||||
) const;
|
||||
|
||||
//! Assignment operator
|
||||
const ${name}& operator=(
|
||||
${name}& operator=(
|
||||
const ${name}& other //!< The other object
|
||||
);
|
||||
|
||||
//! Assignment operator from array
|
||||
const ${name}& operator=(
|
||||
${name}& operator=(
|
||||
const ElementType (&a)[SIZE] //!< The array
|
||||
);
|
||||
|
||||
//! Assignment operator from element
|
||||
const ${name}& operator=(
|
||||
${name}& operator=(
|
||||
const ElementType& e //!< The element
|
||||
);
|
||||
|
||||
|
||||
@ -56,13 +56,13 @@ namespace ${namespace} {
|
||||
// Instance methods
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const ${name}& ${name} :: operator=(const ${name}& other)
|
||||
${name}& ${name} :: operator=(const ${name}& other)
|
||||
{
|
||||
this->e = other.e;
|
||||
return *this;
|
||||
}
|
||||
|
||||
const ${name}& ${name} :: operator=(const NATIVE_INT_TYPE a)
|
||||
${name}& ${name} :: operator=(const NATIVE_INT_TYPE a)
|
||||
{
|
||||
#for $item_name,$item_value,$item_comment in $items_list:
|
||||
#if not $item_value == ""
|
||||
@ -90,7 +90,7 @@ a == $item_value#slurp
|
||||
return *this;
|
||||
}
|
||||
|
||||
const ${name}& ${name} :: operator=(const NATIVE_UINT_TYPE a)
|
||||
${name}& ${name} :: operator=(const NATIVE_UINT_TYPE a)
|
||||
{
|
||||
#for $item_name,$item_value,$item_comment in $items_list:
|
||||
#if not $item_value == ""
|
||||
|
||||
@ -102,17 +102,17 @@ namespace ${namespace} {
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
//! Assignment operator
|
||||
const ${name}& operator=(
|
||||
${name}& operator=(
|
||||
const ${name}& other //!< The other object
|
||||
);
|
||||
|
||||
//! Assignment operator
|
||||
const ${name}& operator=(
|
||||
${name}& operator=(
|
||||
const NATIVE_INT_TYPE a //!< The integer to copy
|
||||
);
|
||||
|
||||
//! Assignment operator
|
||||
const ${name}& operator=(
|
||||
${name}& operator=(
|
||||
const NATIVE_UINT_TYPE a //!< The integer to copy
|
||||
);
|
||||
|
||||
|
||||
@ -40,9 +40,9 @@ ${name}::${name}(${args_scalar_array_string}) : Serializable() {
|
||||
|
||||
#end if
|
||||
|
||||
const ${name}& ${name}::operator=(const ${name}& src) {
|
||||
${name}& ${name}::operator=(const ${name}& src) {
|
||||
this->set(${args_mstring});
|
||||
return src;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool ${name}::operator==(const ${name}& src) const {
|
||||
|
||||
@ -32,7 +32,7 @@ public:
|
||||
#if $args_proto_scalar_init:
|
||||
${name}($args_proto_scalar_init); //!< constructor with arguments with scalars for array arguments
|
||||
#end if
|
||||
const ${name}& operator=(const ${name}& src); //!< equal operator
|
||||
${name}& operator=(const ${name}& src); //!< equal operator
|
||||
bool operator==(const ${name}& src) const; //!< equality operator
|
||||
#ifdef BUILD_UT
|
||||
// to support GoogleTest framework in unit tests
|
||||
|
||||
@ -20,9 +20,9 @@ mytype::mytype(U32 val) : Serializable() {
|
||||
this->setVal(val);
|
||||
}
|
||||
|
||||
const mytype& mytype::operator=(const mytype& src) {
|
||||
mytype& mytype::operator=(const mytype& src) {
|
||||
this->setVal(src.m_val);
|
||||
return src;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool mytype::operator==(const mytype& src) const {
|
||||
|
||||
@ -24,7 +24,7 @@ namespace ANameSpace {
|
||||
mytype(const mytype* src); // copy constructor
|
||||
mytype(const mytype& src); // copy constructor
|
||||
mytype(U32 arg); // constructor with arguments
|
||||
const mytype& operator=(const mytype& src); // Equal operator
|
||||
mytype& operator=(const mytype& src); // Equal operator
|
||||
bool operator==(const mytype& src) const;
|
||||
|
||||
void setVal(U32 arg); // set values
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include <Autocoders/Python/test/array_xml/ExampleArrayImpl.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
|
||||
@ -19,7 +20,7 @@ namespace Example {
|
||||
}
|
||||
|
||||
void ExampleArrayImpl::ExArrayIn_handler(NATIVE_INT_TYPE portNum, Example::ArrayType array1, Example::ArrSerial serial1) {
|
||||
Fw::EightyCharString s;
|
||||
Fw::String s;
|
||||
array1.toString(s);
|
||||
|
||||
printf("%s Invoked ExArrayIn_handler();\n%s", this->getObjName(), s.toChar());
|
||||
@ -27,7 +28,7 @@ namespace Example {
|
||||
}
|
||||
|
||||
void ExampleArrayImpl::ArrayIn_handler(NATIVE_INT_TYPE portNum, Example::ArrayType array1, Example::ArrSerial serial1) {
|
||||
Fw::EightyCharString s;
|
||||
Fw::String s;
|
||||
array1.toString(s);
|
||||
|
||||
printf("%s Invoked ArrayIn_handler(%d);\n%s", this->getObjName(), portNum, s.toChar());
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#ifndef EXAMPLE_ARRAY_IMPL_HPP
|
||||
#define EXAMPLE_ARRAY_IMPL_HPP
|
||||
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Autocoders/Python/test/array_xml/Component1ComponentAc.hpp>
|
||||
|
||||
namespace Example {
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include <Fw/Obj/SimpleObjRegistry.hpp>
|
||||
#include <Fw/Types/SerialBuffer.hpp>
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
|
||||
#include <bitset>
|
||||
@ -45,18 +45,18 @@ int main(int argc, char* argv[]) {
|
||||
InternalType array1 = InternalType(6,7,120,444);
|
||||
Example::ArrayType array2 = Example::ArrayType(array1);
|
||||
// Create string array for serializable
|
||||
Fw::EightyCharString mem1 = "Member 1";
|
||||
Fw::EightyCharString mem2 = "Member 2";
|
||||
Fw::EightyCharString mem3 = "Member 3";
|
||||
Fw::String mem1 = "Member 1";
|
||||
Fw::String mem2 = "Member 2";
|
||||
Fw::String mem3 = "Member 3";
|
||||
StringArray array3 = StringArray(mem1, mem2, mem3);
|
||||
Example::ArrSerial serial1;
|
||||
|
||||
// Print toString outputs for each array
|
||||
cout << "Print toString for arrays" << endl;
|
||||
|
||||
Fw::EightyCharString tostring1;
|
||||
Fw::EightyCharString tostring2;
|
||||
Fw::EightyCharString tostring3;
|
||||
Fw::String tostring1;
|
||||
Fw::String tostring2;
|
||||
Fw::String tostring3;
|
||||
array1.toString(tostring1);
|
||||
array2.toString(tostring2);
|
||||
array3.toString(tostring3);
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
#include <Autocoders/Python/test/ext_dict/ExampleType.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#endif
|
||||
|
||||
namespace ANameSpace {
|
||||
|
||||
mytype::mytype(): Serializable() {
|
||||
@ -22,9 +20,9 @@ mytype::mytype(U32 val) : Serializable() {
|
||||
this->setVal(val);
|
||||
}
|
||||
|
||||
const mytype& mytype::operator=(const mytype& src) {
|
||||
mytype& mytype::operator=(const mytype& src) {
|
||||
this->setVal(src.m_val);
|
||||
return src;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool mytype::operator==(const mytype& src) const {
|
||||
|
||||
@ -24,7 +24,7 @@ namespace ANameSpace {
|
||||
mytype(const mytype* src); // copy constructor
|
||||
mytype(const mytype& src); // copy constructor
|
||||
mytype(U32 arg); // constructor with arguments
|
||||
const mytype& operator=(const mytype& src); // Equal operator
|
||||
mytype& operator=(const mytype& src); // Equal operator
|
||||
bool operator==(const mytype& src) const; // equality operator
|
||||
|
||||
void setVal(U32 arg); // set values
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#endif
|
||||
|
||||
namespace ANameSpace {
|
||||
|
||||
UserSerializer::UserSerializer(): Serializable() {
|
||||
@ -25,9 +21,9 @@ UserSerializer::UserSerializer(SomeUserStruct val) : Serializable() {
|
||||
this->setVal(val);
|
||||
}
|
||||
|
||||
const SomeUserStruct& UserSerializer::operator=(const SomeUserStruct& src) {
|
||||
SomeUserStruct& UserSerializer::operator=(const SomeUserStruct& src) {
|
||||
this->setVal(src);
|
||||
return src;
|
||||
return this->m_struct;
|
||||
}
|
||||
|
||||
void UserSerializer::getVal(SomeUserStruct& arg) {
|
||||
|
||||
@ -23,7 +23,7 @@ namespace ANameSpace {
|
||||
UserSerializer(const SomeUserStruct* src); // copy constructor
|
||||
UserSerializer(const SomeUserStruct& src); // copy constructor
|
||||
UserSerializer(SomeUserStruct arg); // constructor with arguments
|
||||
const SomeUserStruct& operator=(const SomeUserStruct& src); // Equal operator
|
||||
SomeUserStruct& operator=(const SomeUserStruct& src); // Equal operator
|
||||
|
||||
void setVal(const SomeUserStruct& arg); // set values
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ namespace Duck {
|
||||
|
||||
// Internal call - implemented by hand.
|
||||
// downcall for input port externInputPort1
|
||||
I32 DuckImpl::externInputPort1_Msg1_handler(U32 cmd, Fw::EightyCharString str) {
|
||||
I32 DuckImpl::externInputPort1_Msg1_handler(U32 cmd, Fw::String str) {
|
||||
// User code is written here.
|
||||
printf("\n\t*** %s: externInputPort1_Msg1_handler down-call\n", this->m_objName);
|
||||
this->outputPort1_Msg1_out(cmd, str);
|
||||
@ -33,13 +33,13 @@ namespace Duck {
|
||||
}
|
||||
|
||||
// downcall for input port inputPort1
|
||||
I32 DuckImpl::inputPort1_Msg1_handler(U32 cmd, Fw::EightyCharString str) {
|
||||
I32 DuckImpl::inputPort1_Msg1_handler(U32 cmd, Fw::String str) {
|
||||
// User code is written here.
|
||||
return 0;
|
||||
}
|
||||
|
||||
// downcall for input port inputPort2
|
||||
I32 DuckImpl::inputPort2_Msg1_handler(U32 cmd, Fw::EightyCharString str) {
|
||||
I32 DuckImpl::inputPort2_Msg1_handler(U32 cmd, Fw::String str) {
|
||||
// User code is written here.
|
||||
printf("\n\t*** %s: inputPort2_Msg1_handler(%d, %s) down-call\n", this->m_objName, cmd, str.toChar());
|
||||
return 0;
|
||||
|
||||
@ -14,10 +14,10 @@ namespace Duck {
|
||||
|
||||
private:
|
||||
// downcall for input ports
|
||||
I32 externInputPort1_Msg1_handler(U32 cmd, Fw::EightyCharString str);
|
||||
I32 externInputPort1_Msg1_handler(U32 cmd, Fw::String str);
|
||||
I32 externInputPort3_Msg3_handler(U32 cmd);
|
||||
I32 inputPort1_Msg1_handler(U32 cmd, Fw::EightyCharString str);
|
||||
I32 inputPort2_Msg1_handler(U32 cmd, Fw::EightyCharString str);
|
||||
I32 inputPort1_Msg1_handler(U32 cmd, Fw::String str);
|
||||
I32 inputPort2_Msg1_handler(U32 cmd, Fw::String str);
|
||||
I32 inputPort3_Msg3_handler(U32 cmd);
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface name="Msg1" namespace="Ports">
|
||||
<include_header>Fw/Types/FwStringType</include_header>
|
||||
<include_header>Fw/Types/FwEightyCharString</include_header>
|
||||
<include_header>Fw/Types/String.hpp</include_header>
|
||||
<comment>
|
||||
Msg 1 Interface to send cmd and stat arguments.
|
||||
</comment>
|
||||
@ -9,9 +8,8 @@
|
||||
<arg name="cmd" type="U32">
|
||||
<comment>The U32 cmd argument</comment>
|
||||
</arg>
|
||||
<arg name="str" type="Fw::EightyCharString">
|
||||
<arg name="str" type="Fw::String">
|
||||
<comment>The 80 character string str argument</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</interface>
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ int main(int argc, char* argv[]) {
|
||||
// Ask for input to huey or duey here.
|
||||
char in[80];
|
||||
U32 cmd;
|
||||
Fw::EightyCharString *str;
|
||||
Fw::String *str;
|
||||
char str2[80];
|
||||
//
|
||||
while ( strcmp(in,"quit") != 0) {
|
||||
@ -101,7 +101,7 @@ int main(int argc, char* argv[]) {
|
||||
cout << "Enter short string: ";
|
||||
cin >> str2;
|
||||
cout << "The string 2 is: " << str2 << endl;
|
||||
str = new Fw::EightyCharString(str2);
|
||||
str = new Fw::String(str2);
|
||||
cout << "hueyComp_ptr->getexternInputPort1InputPort()->msg_in(" << cmd << "," << str2 << ")" << endl;
|
||||
hueyComp_ptr->getexternInputPort1Msg1InputPort()->msg_in(cmd,*str);
|
||||
} else if (in[0] == '3') {
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
#include <Autocoders/Python/templates/ExampleType.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#endif
|
||||
|
||||
namespace ANameSpace {
|
||||
|
||||
mytype::mytype(): Serializable() {
|
||||
@ -22,9 +20,9 @@ mytype::mytype(U32 val) : Serializable() {
|
||||
this->setVal(val);
|
||||
}
|
||||
|
||||
const mytype& mytype::operator=(const mytype& src) {
|
||||
mytype& mytype::operator=(const mytype& src) {
|
||||
this->setVal(src.m_val);
|
||||
return src;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool mytype::operator==(const mytype& src) const {
|
||||
|
||||
@ -24,7 +24,7 @@ namespace ANameSpace {
|
||||
mytype(const mytype* src); // copy constructor
|
||||
mytype(const mytype& src); // copy constructor
|
||||
mytype(U32 arg); // constructor with arguments
|
||||
const mytype& operator=(const mytype& src); // Equal operator
|
||||
mytype& operator=(const mytype& src); // Equal operator
|
||||
bool operator==(const mytype& src) const;
|
||||
|
||||
void setVal(U32 arg); // set values
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
#include <Autocoders/Python/test/port_nogen/ExampleType.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#endif
|
||||
|
||||
namespace ANameSpace {
|
||||
|
||||
mytype::mytype(): Serializable() {
|
||||
@ -22,9 +20,9 @@ mytype::mytype(U32 val) : Serializable() {
|
||||
this->setVal(val);
|
||||
}
|
||||
|
||||
const mytype& mytype::operator=(const mytype& src) {
|
||||
mytype& mytype::operator=(const mytype& src) {
|
||||
this->setVal(src.m_val);
|
||||
return src;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool mytype::operator==(const mytype& src) const {
|
||||
|
||||
@ -24,7 +24,7 @@ namespace ANameSpace {
|
||||
mytype(const mytype* src); // copy constructor
|
||||
mytype(const mytype& src); // copy constructor
|
||||
mytype(U32 arg); // constructor with arguments
|
||||
const mytype& operator=(const mytype& src); // Equal operator
|
||||
mytype& operator=(const mytype& src); // Equal operator
|
||||
bool operator==(const mytype& src) const; // equality operator
|
||||
void setVal(U32 arg); // set values
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <Autocoders/Python/test/serialize_user/ExampleComponentImpl.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
#if FW_OBJECT_NAMES == 1
|
||||
@ -26,7 +26,7 @@ ExampleComponentImpl::~ExampleComponentImpl() {
|
||||
|
||||
void ExampleComponentImpl::exampleInput_handler(NATIVE_INT_TYPE portNum, I32 arg1, ANameSpace::UserSerializer arg2) {
|
||||
|
||||
Fw::EightyCharString str;
|
||||
Fw::String str;
|
||||
arg2.toString(str);
|
||||
printf("ARG: %s\n",str.toChar());
|
||||
}
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#endif
|
||||
|
||||
namespace ANameSpace {
|
||||
|
||||
UserSerializer::UserSerializer(): Serializable() {
|
||||
@ -25,9 +21,9 @@ UserSerializer::UserSerializer(SomeUserStruct val) : Serializable() {
|
||||
this->setVal(val);
|
||||
}
|
||||
|
||||
const SomeUserStruct& UserSerializer::operator=(const SomeUserStruct& src) {
|
||||
SomeUserStruct& UserSerializer::operator=(const SomeUserStruct& src) {
|
||||
this->setVal(src);
|
||||
return src;
|
||||
return this->m_struct;
|
||||
}
|
||||
|
||||
void UserSerializer::getVal(SomeUserStruct& arg) {
|
||||
|
||||
@ -23,7 +23,7 @@ namespace ANameSpace {
|
||||
UserSerializer(const SomeUserStruct* src); // copy constructor
|
||||
UserSerializer(const SomeUserStruct& src); // copy constructor
|
||||
UserSerializer(SomeUserStruct arg); // constructor with arguments
|
||||
const SomeUserStruct& operator=(const SomeUserStruct& src); // Equal operator
|
||||
SomeUserStruct& operator=(const SomeUserStruct& src); // Equal operator
|
||||
|
||||
void setVal(const SomeUserStruct& arg); // set values
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <Autocoders/Python/test/stress/TestCommandImpl.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <stdio.h>
|
||||
|
||||
#if FW_OBJECT_NAMES == 1
|
||||
@ -29,7 +29,7 @@ void TestCommand1Impl::aport_handler(NATIVE_INT_TYPE portNum, I32 arg4, F32 arg5
|
||||
}
|
||||
|
||||
void TestCommand1Impl::aport2_handler(NATIVE_INT_TYPE portNum, I32 arg4, F32 arg5, Ref::Gnc::Quaternion arg6) {
|
||||
Fw::EightyCharString str;
|
||||
Fw::String str;
|
||||
arg6.toString(str);
|
||||
printf("Received aport2_Test2_handler call with %i %f %s\n",arg4,arg5,str.toChar());
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <Autocoders/Python/test/stress/TestTelemRecvImpl.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <Autocoders/Python/test/stress/QuaternionSerializableAc.hpp>
|
||||
#include <stdio.h>
|
||||
|
||||
@ -25,7 +25,7 @@ TestTelemRecvImpl::~TestTelemRecvImpl() {
|
||||
void TestTelemRecvImpl::tlmRecvPort_handler(NATIVE_INT_TYPE portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) {
|
||||
Ref::Gnc::Quaternion tlmVal;
|
||||
val.deserialize(tlmVal);
|
||||
Fw::EightyCharString str;
|
||||
Fw::String str;
|
||||
#if FW_SERIALIZABLE_TO_STRING
|
||||
tlmVal.toString(str);
|
||||
#endif
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <Autocoders/Python/test/tlm2/TestTelemRecvImpl.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <Autocoders/Python/test/tlm2/QuaternionSerializableAc.hpp>
|
||||
#include <stdio.h>
|
||||
|
||||
@ -25,7 +25,7 @@ TestTelemRecvImpl::~TestTelemRecvImpl() {
|
||||
void TestTelemRecvImpl::tlmRecvPort_handler(NATIVE_INT_TYPE portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) {
|
||||
Ref::Gnc::Quaternion tlmVal;
|
||||
val.deserialize(tlmVal);
|
||||
Fw::EightyCharString str;
|
||||
Fw::String str;
|
||||
tlmVal.toString(str);
|
||||
printf("ID: %d TLM value is %s. Time is %d:%d base: %d\n",id,str.toChar(),timeTag.getSeconds(),timeTag.getUSeconds(),timeTag.getTimeBase());
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ namespace CFDP {
|
||||
|
||||
}
|
||||
|
||||
const Checksum& Checksum ::
|
||||
Checksum& Checksum ::
|
||||
operator=(const Checksum& checksum)
|
||||
{
|
||||
this->value = checksum.value;
|
||||
|
||||
@ -53,7 +53,7 @@ namespace CFDP {
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
//! Assign checksum to this
|
||||
const Checksum& operator=(const Checksum& checksum);
|
||||
Checksum& operator=(const Checksum& checksum);
|
||||
|
||||
//! Compare checksum and this for equality
|
||||
bool operator==(const Checksum& checksum) const;
|
||||
|
||||
@ -19,7 +19,7 @@ namespace Drv {
|
||||
FW_ASSERT(Fw::FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
}
|
||||
|
||||
const DataBuffer& DataBuffer::operator=(const DataBuffer& other) {
|
||||
DataBuffer& DataBuffer::operator=(const DataBuffer& other) {
|
||||
Fw::SerializeStatus stat = Fw::SerializeBufferBase::setBuff(other.m_data,other.getBuffLength());
|
||||
FW_ASSERT(Fw::FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
return *this;
|
||||
|
||||
@ -19,7 +19,7 @@ namespace Drv {
|
||||
DataBuffer();
|
||||
DataBuffer(const DataBuffer& other);
|
||||
virtual ~DataBuffer();
|
||||
const DataBuffer& operator=(const DataBuffer& other);
|
||||
DataBuffer& operator=(const DataBuffer& other);
|
||||
|
||||
NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
|
||||
U8* getBuffAddr();
|
||||
|
||||
@ -49,8 +49,8 @@ void fill_random_buffer(Fw::Buffer &buffer) {
|
||||
|
||||
void send_recv(Drv::IpSocket& sender, Drv::IpSocket& receiver) {
|
||||
I32 size = MAX_DRV_TEST_MESSAGE_SIZE;
|
||||
U8 buffer_out[MAX_DRV_TEST_MESSAGE_SIZE];
|
||||
U8 buffer_in[MAX_DRV_TEST_MESSAGE_SIZE];
|
||||
U8 buffer_out[MAX_DRV_TEST_MESSAGE_SIZE] = {0};
|
||||
U8 buffer_in[MAX_DRV_TEST_MESSAGE_SIZE] = {0};
|
||||
|
||||
// Send receive validate block
|
||||
Drv::Test::fill_random_data(buffer_out, MAX_DRV_TEST_MESSAGE_SIZE);
|
||||
@ -71,4 +71,4 @@ bool wait_on_change(Drv::IpSocket &socket, bool open, U32 iterations) {
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
#include <Drv/Ip/TcpClientSocket.hpp>
|
||||
#include <Drv/Ip/TcpServerSocket.hpp>
|
||||
#include <Drv/Ip/IpSocket.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Os/Log.hpp>
|
||||
#include <Fw/Logger/Logger.hpp>
|
||||
#include <Drv/Ip/test/ut/PortSelector.hpp>
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <Drv/Ip/UdpSocket.hpp>
|
||||
#include <Drv/Ip/IpSocket.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Os/Log.hpp>
|
||||
#include <Fw/Logger/Logger.hpp>
|
||||
#include <Drv/Ip/test/ut/PortSelector.hpp>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include <Tester.hpp>
|
||||
#include <Fw/Types/StringUtils.hpp>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -29,7 +30,7 @@ int main(int argc, char* argv[]) {
|
||||
addr = strtoul(optarg,0,0);
|
||||
break;
|
||||
case 'd':
|
||||
strcpy(device,optarg);
|
||||
Fw::StringUtils::string_copy(device, optarg, sizeof(device));
|
||||
break;
|
||||
default:
|
||||
printf("test_ut %s\n",argv[0],help);
|
||||
|
||||
@ -19,7 +19,7 @@ namespace Fw {
|
||||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
}
|
||||
|
||||
const CmdArgBuffer& CmdArgBuffer::operator=(const CmdArgBuffer& other) {
|
||||
CmdArgBuffer& CmdArgBuffer::operator=(const CmdArgBuffer& other) {
|
||||
SerializeStatus stat = this->setBuff(other.m_bufferData,other.getBuffLength());
|
||||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
return *this;
|
||||
|
||||
@ -31,7 +31,7 @@ namespace Fw {
|
||||
CmdArgBuffer(); //!< default constructor
|
||||
CmdArgBuffer(const CmdArgBuffer& other); //!< other arg buffer constructor
|
||||
virtual ~CmdArgBuffer(); //!< destructor
|
||||
const CmdArgBuffer& operator=(const CmdArgBuffer& other); //!< Equal operator
|
||||
CmdArgBuffer& operator=(const CmdArgBuffer& other); //!< Equal operator
|
||||
|
||||
NATIVE_UINT_TYPE getBuffCapacity() const; //!< return capacity of buffer (how much it can hold)
|
||||
U8* getBuffAddr(); //!< return address of buffer (non const version)
|
||||
|
||||
@ -19,7 +19,7 @@ namespace Fw {
|
||||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
}
|
||||
|
||||
const ComBuffer& ComBuffer::operator=(const ComBuffer& other) {
|
||||
ComBuffer& ComBuffer::operator=(const ComBuffer& other) {
|
||||
SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength());
|
||||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
return *this;
|
||||
|
||||
@ -30,7 +30,7 @@ namespace Fw {
|
||||
ComBuffer();
|
||||
ComBuffer(const ComBuffer& other);
|
||||
virtual ~ComBuffer();
|
||||
const ComBuffer& operator=(const ComBuffer& other);
|
||||
ComBuffer& operator=(const ComBuffer& other);
|
||||
|
||||
NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
|
||||
U8* getBuffAddr();
|
||||
|
||||
@ -19,7 +19,7 @@ namespace Fw {
|
||||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
}
|
||||
|
||||
const LogBuffer& LogBuffer::operator=(const LogBuffer& other) {
|
||||
LogBuffer& LogBuffer::operator=(const LogBuffer& other) {
|
||||
SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength());
|
||||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
return *this;
|
||||
|
||||
@ -31,7 +31,7 @@ namespace Fw {
|
||||
LogBuffer();
|
||||
LogBuffer(const LogBuffer& other);
|
||||
virtual ~LogBuffer();
|
||||
const LogBuffer& operator=(const LogBuffer& other);
|
||||
LogBuffer& operator=(const LogBuffer& other);
|
||||
|
||||
NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
|
||||
U8* getBuffAddr();
|
||||
|
||||
@ -102,7 +102,7 @@ namespace Fw {
|
||||
this->m_buf[size < sizeof(this->m_buf)?size:sizeof(this->m_buf)-1] = 0;
|
||||
}
|
||||
|
||||
const LogStringArg& LogStringArg::operator=(const LogStringArg& other) {
|
||||
LogStringArg& LogStringArg::operator=(const LogStringArg& other) {
|
||||
Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ namespace Fw {
|
||||
// This method is set by the autocode to the max length specified in the XML declaration for a particular event.
|
||||
void setMaxSerialize(NATIVE_UINT_TYPE size); // limit amount serialized
|
||||
|
||||
const LogStringArg& operator=(const LogStringArg& other); //!< equal operator for other strings
|
||||
LogStringArg& operator=(const LogStringArg& other); //!< equal operator for other strings
|
||||
|
||||
SerializeStatus serialize(SerializeBufferBase& buffer) const;
|
||||
SerializeStatus deserialize(SerializeBufferBase& buffer);
|
||||
|
||||
@ -67,7 +67,7 @@ namespace Fw {
|
||||
|
||||
}
|
||||
|
||||
void LogAssertHook::printAssert(const I8* msg) {
|
||||
void LogAssertHook::printAssert(const CHAR* msg) {
|
||||
// do nothing since reportAssert() sends message
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ namespace Fw {
|
||||
AssertArg arg5,
|
||||
AssertArg arg6
|
||||
);
|
||||
void printAssert(const I8* msg);
|
||||
void printAssert(const CHAR* msg);
|
||||
void doAssert();
|
||||
};
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
namespace LoggerRules {
|
||||
|
||||
// Constructor
|
||||
Register::Register(const Fw::EightyCharString& name) : STest::Rule<MockLogging::FakeLogger>(name.toChar()) {}
|
||||
Register::Register(const Fw::String& name) : STest::Rule<MockLogging::FakeLogger>(name.toChar()) {}
|
||||
|
||||
// Check for registration, always allowed
|
||||
bool Register::precondition(const MockLogging::FakeLogger& truth) {
|
||||
@ -40,7 +40,7 @@ namespace LoggerRules {
|
||||
}
|
||||
|
||||
// Constructor
|
||||
LogGood::LogGood(const Fw::EightyCharString& name) : STest::Rule<MockLogging::FakeLogger>(name.toChar()) {}
|
||||
LogGood::LogGood(const Fw::String& name) : STest::Rule<MockLogging::FakeLogger>(name.toChar()) {}
|
||||
|
||||
// Check for logging, only when not NULL
|
||||
bool LogGood::precondition(const MockLogging::FakeLogger& truth) {
|
||||
@ -113,7 +113,7 @@ namespace LoggerRules {
|
||||
}
|
||||
|
||||
// Constructor
|
||||
LogBad::LogBad(const Fw::EightyCharString& name) : STest::Rule<MockLogging::FakeLogger>(name.toChar()) {}
|
||||
LogBad::LogBad(const Fw::String& name) : STest::Rule<MockLogging::FakeLogger>(name.toChar()) {}
|
||||
|
||||
// Check for logging, only when not NULL
|
||||
bool LogBad::precondition(const MockLogging::FakeLogger& truth) {
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#define FPRIME_LOGGERRULES_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <Fw/Logger/test/ut/FakeLogger.hpp>
|
||||
#include <STest/STest/Rule/Rule.hpp>
|
||||
#include <STest/STest/Pick/Pick.hpp>
|
||||
@ -32,7 +32,7 @@ namespace LoggerRules {
|
||||
*/
|
||||
struct Register : public STest::Rule<MockLogging::FakeLogger> {
|
||||
// Constructor
|
||||
Register(const Fw::EightyCharString& name);
|
||||
Register(const Fw::String& name);
|
||||
|
||||
// Check for registration, always allowed
|
||||
bool precondition(const MockLogging::FakeLogger& truth);
|
||||
@ -47,7 +47,7 @@ namespace LoggerRules {
|
||||
*/
|
||||
struct LogGood : public STest::Rule<MockLogging::FakeLogger> {
|
||||
// Constructor
|
||||
LogGood(const Fw::EightyCharString& name);
|
||||
LogGood(const Fw::String& name);
|
||||
|
||||
// Check for logging, only when not NULL
|
||||
bool precondition(const MockLogging::FakeLogger& truth);
|
||||
@ -63,7 +63,7 @@ namespace LoggerRules {
|
||||
*/
|
||||
struct LogBad : public STest::Rule<MockLogging::FakeLogger> {
|
||||
// Constructor
|
||||
LogBad(const Fw::EightyCharString& name);
|
||||
LogBad(const Fw::String& name);
|
||||
|
||||
// Check for logging, only when not NULL
|
||||
bool precondition(const MockLogging::FakeLogger& truth);
|
||||
|
||||
@ -19,11 +19,11 @@ namespace Fw {
|
||||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
}
|
||||
|
||||
const ParamBuffer& ParamBuffer::operator=(const ParamBuffer& other) {
|
||||
SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength());
|
||||
ParamBuffer& ParamBuffer::operator=(const ParamBuffer& other) {
|
||||
SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength());
|
||||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
NATIVE_UINT_TYPE ParamBuffer::getBuffCapacity() const {
|
||||
return sizeof(this->m_bufferData);
|
||||
|
||||
@ -31,7 +31,7 @@ namespace Fw {
|
||||
ParamBuffer();
|
||||
ParamBuffer(const ParamBuffer& other);
|
||||
virtual ~ParamBuffer();
|
||||
const ParamBuffer& operator=(const ParamBuffer& other);
|
||||
ParamBuffer& operator=(const ParamBuffer& other);
|
||||
|
||||
NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
|
||||
U8* getBuffAddr();
|
||||
|
||||
@ -40,7 +40,7 @@ namespace Fw {
|
||||
this->m_seconds = seconds;
|
||||
}
|
||||
|
||||
const Time& Time::operator=(const Time& other) {
|
||||
Time& Time::operator=(const Time& other) {
|
||||
this->m_timeBase = other.m_timeBase;
|
||||
this->m_timeContext = other.m_timeContext;
|
||||
this->m_useconds = other.m_useconds;
|
||||
|
||||
@ -39,7 +39,7 @@ namespace Fw {
|
||||
bool operator<(const Time& other) const;
|
||||
bool operator>=(const Time& other) const;
|
||||
bool operator<=(const Time& other) const;
|
||||
const Time& operator=(const Time& other);
|
||||
Time& operator=(const Time& other);
|
||||
|
||||
// Static methods:
|
||||
//! The type of a comparison result
|
||||
|
||||
@ -19,7 +19,7 @@ namespace Fw {
|
||||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
}
|
||||
|
||||
const TlmBuffer& TlmBuffer::operator=(const TlmBuffer& other) {
|
||||
TlmBuffer& TlmBuffer::operator=(const TlmBuffer& other) {
|
||||
SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength());
|
||||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
return *this;
|
||||
|
||||
@ -30,7 +30,7 @@ namespace Fw {
|
||||
TlmBuffer();
|
||||
TlmBuffer(const TlmBuffer& other);
|
||||
virtual ~TlmBuffer();
|
||||
const TlmBuffer& operator=(const TlmBuffer& other);
|
||||
TlmBuffer& operator=(const TlmBuffer& other);
|
||||
|
||||
NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
|
||||
U8* getBuffAddr();
|
||||
|
||||
@ -91,7 +91,7 @@ namespace Fw {
|
||||
this->m_buf[size < sizeof(this->m_buf)?size:sizeof(this->m_buf)-1] = 0;
|
||||
}
|
||||
|
||||
const TlmString& TlmString::operator=(const TlmString& other) {
|
||||
TlmString& TlmString::operator=(const TlmString& other) {
|
||||
Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ namespace Fw {
|
||||
NATIVE_UINT_TYPE length() const;
|
||||
void setMaxSerialize(NATIVE_UINT_TYPE size); // limit amount serialized
|
||||
|
||||
const TlmString& operator=(const TlmString& other); //!< equal operator for other strings
|
||||
TlmString& operator=(const TlmString& other); //!< equal operator for other strings
|
||||
|
||||
SerializeStatus serialize(SerializeBufferBase& buffer) const;
|
||||
SerializeStatus deserialize(SerializeBufferBase& buffer);
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
#include <taskLib.h>
|
||||
#endif
|
||||
|
||||
#define FW_ASSERT_DFL_MSG_LEN 256
|
||||
|
||||
#if FW_ASSERT_LEVEL == FW_NO_ASSERT
|
||||
|
||||
#else
|
||||
@ -19,8 +21,8 @@
|
||||
|
||||
namespace Fw {
|
||||
|
||||
void defaultPrintAssert(const I8* msg) {
|
||||
(void)fprintf(stderr,"%s\n",reinterpret_cast<const char*>(msg));
|
||||
void defaultPrintAssert(const CHAR* msg) {
|
||||
(void)fprintf(stderr,"%s\n", msg);
|
||||
}
|
||||
|
||||
void defaultReportAssert
|
||||
@ -34,36 +36,36 @@ namespace Fw {
|
||||
AssertArg arg4,
|
||||
AssertArg arg5,
|
||||
AssertArg arg6,
|
||||
I8* destBuffer,
|
||||
CHAR* destBuffer,
|
||||
NATIVE_INT_TYPE buffSize
|
||||
) {
|
||||
|
||||
switch (numArgs) {
|
||||
case 0:
|
||||
(void)snprintf((char*)destBuffer,buffSize,fileIdFs,file,lineNo);
|
||||
(void)snprintf(destBuffer,buffSize,fileIdFs,file,lineNo);
|
||||
break;
|
||||
case 1:
|
||||
(void)snprintf((char*)destBuffer,buffSize,fileIdFs "%d",file,lineNo,
|
||||
(void)snprintf(destBuffer,buffSize,fileIdFs "%d",file,lineNo,
|
||||
arg1);
|
||||
break;
|
||||
case 2:
|
||||
(void)snprintf((char*)destBuffer,buffSize,fileIdFs "%d %d",file,lineNo,
|
||||
(void)snprintf(destBuffer,buffSize,fileIdFs "%d %d",file,lineNo,
|
||||
arg1,arg2);
|
||||
break;
|
||||
case 3:
|
||||
(void)snprintf((char*)destBuffer,buffSize,fileIdFs "%d %d %d",file,lineNo,
|
||||
(void)snprintf(destBuffer,buffSize,fileIdFs "%d %d %d",file,lineNo,
|
||||
arg1,arg2,arg3);
|
||||
break;
|
||||
case 4:
|
||||
(void)snprintf((char*)destBuffer,buffSize,fileIdFs "%d %d %d %d",file,lineNo,
|
||||
(void)snprintf(destBuffer,buffSize,fileIdFs "%d %d %d %d",file,lineNo,
|
||||
arg1,arg2,arg3,arg4);
|
||||
break;
|
||||
case 5:
|
||||
(void)snprintf((char*)destBuffer,buffSize,fileIdFs "%d %d %d %d %d",file,lineNo,
|
||||
(void)snprintf(destBuffer,buffSize,fileIdFs "%d %d %d %d %d",file,lineNo,
|
||||
arg1,arg2,arg3,arg4,arg5);
|
||||
break;
|
||||
case 6:
|
||||
(void)snprintf((char*)destBuffer,buffSize,fileIdFs "%d %d %d %d %d %d",file,lineNo,
|
||||
(void)snprintf(destBuffer,buffSize,fileIdFs "%d %d %d %d %d %d",file,lineNo,
|
||||
arg1,arg2,arg3,arg4,arg5,arg6);
|
||||
break;
|
||||
default: // in an assert already, what can we do?
|
||||
@ -75,7 +77,7 @@ namespace Fw {
|
||||
|
||||
}
|
||||
|
||||
void AssertHook::printAssert(const I8* msg) {
|
||||
void AssertHook::printAssert(const CHAR* msg) {
|
||||
defaultPrintAssert(msg);
|
||||
}
|
||||
|
||||
@ -92,7 +94,7 @@ namespace Fw {
|
||||
AssertArg arg6
|
||||
)
|
||||
{
|
||||
I8 destBuffer[256];
|
||||
CHAR destBuffer[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert
|
||||
(
|
||||
file,
|
||||
@ -128,7 +130,7 @@ namespace Fw {
|
||||
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo) {
|
||||
if (NULL == s_assertHook) {
|
||||
I8 assertMsg[256];
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
file,
|
||||
lineNo,
|
||||
@ -153,7 +155,7 @@ namespace Fw {
|
||||
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
|
||||
AssertArg arg1) {
|
||||
if (NULL == s_assertHook) {
|
||||
I8 assertMsg[256];
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
file,
|
||||
lineNo,
|
||||
@ -179,7 +181,7 @@ namespace Fw {
|
||||
AssertArg arg1,
|
||||
AssertArg arg2) {
|
||||
if (NULL == s_assertHook) {
|
||||
I8 assertMsg[256];
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
file,
|
||||
lineNo,
|
||||
@ -205,7 +207,7 @@ namespace Fw {
|
||||
AssertArg arg2,
|
||||
AssertArg arg3) {
|
||||
if (NULL == s_assertHook) {
|
||||
I8 assertMsg[256];
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
file,
|
||||
lineNo,
|
||||
@ -232,7 +234,7 @@ namespace Fw {
|
||||
AssertArg arg3,
|
||||
AssertArg arg4) {
|
||||
if (NULL == s_assertHook) {
|
||||
I8 assertMsg[256];
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
file,
|
||||
lineNo,
|
||||
@ -260,7 +262,7 @@ namespace Fw {
|
||||
AssertArg arg4,
|
||||
AssertArg arg5) {
|
||||
if (NULL == s_assertHook) {
|
||||
I8 assertMsg[256];
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
file,
|
||||
lineNo,
|
||||
@ -289,7 +291,7 @@ namespace Fw {
|
||||
AssertArg arg5,
|
||||
AssertArg arg6) {
|
||||
if (NULL == s_assertHook) {
|
||||
I8 assertMsg[256];
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
defaultReportAssert(
|
||||
file,
|
||||
lineNo,
|
||||
@ -318,7 +320,7 @@ extern "C" {
|
||||
|
||||
NATIVE_INT_TYPE CAssert0(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo) {
|
||||
if (NULL == Fw::s_assertHook) {
|
||||
I8 assertMsg[256];
|
||||
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
|
||||
Fw::defaultReportAssert(
|
||||
file,
|
||||
lineNo,
|
||||
|
||||
@ -21,10 +21,10 @@
|
||||
((void) ((cond) ? (0) : \
|
||||
(Fw::SwAssert(ASSERT_FILE_ID, __LINE__, ##__VA_ARGS__))))
|
||||
#else
|
||||
#define FILE_NAME_ARG const U8*
|
||||
#define FILE_NAME_ARG const CHAR*
|
||||
#define FW_ASSERT(cond, ...) \
|
||||
((void) ((cond) ? (0) : \
|
||||
(Fw::SwAssert((U8*)__FILE__, __LINE__, ##__VA_ARGS__))))
|
||||
(Fw::SwAssert(__FILE__, __LINE__, ##__VA_ARGS__))))
|
||||
#endif
|
||||
|
||||
// F' Assertion functions can technically return even though the intention is for the assertion to terminate the program.
|
||||
@ -75,7 +75,7 @@ namespace Fw {
|
||||
);
|
||||
// default reportAssert() will call this when the message is built
|
||||
// override it to do another kind of print. printf by default
|
||||
virtual void printAssert(const I8* msg);
|
||||
virtual void printAssert(const CHAR* msg);
|
||||
// do assert action. By default, calls assert.
|
||||
// Called after reportAssert()
|
||||
virtual void doAssert();
|
||||
|
||||
@ -90,12 +90,14 @@ typedef U8 BYTE; //!< byte type
|
||||
typedef int64_t I64; //!< 64-bit signed integer
|
||||
typedef uint64_t U64; //!< 64-bit unsigned integer
|
||||
#endif
|
||||
|
||||
|
||||
typedef float F32; //!< 32-bit floating point
|
||||
#if FW_HAS_F64
|
||||
typedef double F64; //!< 64-bit floating point
|
||||
#endif
|
||||
|
||||
typedef char CHAR;
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL (0) //!< NULL
|
||||
#endif
|
||||
|
||||
@ -348,7 +348,7 @@ namespace Fw {
|
||||
PolyType::~PolyType() {
|
||||
}
|
||||
|
||||
const PolyType& PolyType::operator=(const PolyType &src) {
|
||||
PolyType& PolyType::operator=(const PolyType &src) {
|
||||
this->m_dataType = src.m_dataType;
|
||||
this->m_val = src.m_val;
|
||||
return *this;
|
||||
|
||||
@ -98,7 +98,7 @@ namespace Fw {
|
||||
void toString(StringBase& dest) const; //!< get string representation
|
||||
#endif
|
||||
|
||||
const PolyType& operator=(const PolyType &src); //!< PolyType operator=
|
||||
PolyType& operator=(const PolyType &src); //!< PolyType operator=
|
||||
bool operator<(const PolyType &other) const; //!< PolyType operator<
|
||||
bool operator>(const PolyType &other) const; //!< PolyType operator>
|
||||
bool operator>=(const PolyType &other) const; //!< PolyType operator>=
|
||||
|
||||
@ -57,7 +57,7 @@ namespace Fw {
|
||||
|
||||
// Copy constructor doesn't make sense in this virtual class as there is nothing to copy. Derived classes should
|
||||
// call the empty constructor and then call their own copy function
|
||||
const SerializeBufferBase& SerializeBufferBase::operator=(const SerializeBufferBase &src) { // lgtm[cpp/rule-of-two]
|
||||
SerializeBufferBase& SerializeBufferBase::operator=(const SerializeBufferBase &src) { // lgtm[cpp/rule-of-two]
|
||||
this->copyFrom(src);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ namespace Fw {
|
||||
class SerializeBufferBase {
|
||||
public:
|
||||
|
||||
const SerializeBufferBase& operator=(const SerializeBufferBase &src); //!< equal operator
|
||||
SerializeBufferBase& operator=(const SerializeBufferBase &src); //!< equal operator
|
||||
|
||||
virtual ~SerializeBufferBase(); //!< destructor
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
#include <Os/IntervalTimer.hpp>
|
||||
#include <Os/InterruptLock.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <Fw/Types/InternalInterfaceString.hpp>
|
||||
#include <Fw/Types/PolyType.hpp>
|
||||
#include <Fw/Types/MallocAllocator.hpp>
|
||||
@ -559,8 +559,8 @@ TEST(SerializationTest,Serialization1) {
|
||||
ASSERT_EQ(boolt1,boolt2);
|
||||
|
||||
// serialize string
|
||||
Fw::EightyCharString str1;
|
||||
Fw::EightyCharString str2;
|
||||
Fw::String str1;
|
||||
Fw::String str2;
|
||||
|
||||
str1 = "Foo";
|
||||
str2 = "BarBlat";
|
||||
@ -787,16 +787,16 @@ void AssertTest() {
|
||||
|
||||
private:
|
||||
|
||||
FILE_NAME_ARG m_file;
|
||||
NATIVE_UINT_TYPE m_lineNo;
|
||||
NATIVE_UINT_TYPE m_numArgs;
|
||||
AssertArg m_arg1;
|
||||
AssertArg m_arg2;
|
||||
AssertArg m_arg3;
|
||||
AssertArg m_arg4;
|
||||
AssertArg m_arg5;
|
||||
AssertArg m_arg6;
|
||||
bool m_asserted;
|
||||
FILE_NAME_ARG m_file = nullptr;
|
||||
NATIVE_UINT_TYPE m_lineNo = 0;
|
||||
NATIVE_UINT_TYPE m_numArgs = 0;
|
||||
AssertArg m_arg1 = 0;
|
||||
AssertArg m_arg2 = 0;
|
||||
AssertArg m_arg3 = 0;
|
||||
AssertArg m_arg4 = 0;
|
||||
AssertArg m_arg5 = 0;
|
||||
AssertArg m_arg6 = 0;
|
||||
bool m_asserted = false;
|
||||
|
||||
};
|
||||
|
||||
@ -874,7 +874,7 @@ TEST(TypesTest, CheckAssertTest) {
|
||||
}
|
||||
|
||||
TEST(TypesTest,PolyTest) {
|
||||
Fw::EightyCharString str;
|
||||
Fw::String str;
|
||||
|
||||
// U8 Type ===============================================================
|
||||
U8 in8 = 13;
|
||||
@ -1064,16 +1064,16 @@ TEST(TypesTest,PolyTest) {
|
||||
|
||||
TEST(TypesTest,EightyCharTest) {
|
||||
|
||||
Fw::EightyCharString str;
|
||||
Fw::String str;
|
||||
str = "foo";
|
||||
Fw::EightyCharString str2;
|
||||
Fw::String str2;
|
||||
str2 = "foo";
|
||||
ASSERT_EQ(str,str2);
|
||||
ASSERT_EQ(str,"foo");
|
||||
str2 = "doodie";
|
||||
ASSERT_NE(str,str2);
|
||||
|
||||
Fw::EightyCharString str3 = str;
|
||||
Fw::String str3 = str;
|
||||
str3 += str2;
|
||||
ASSERT_EQ(str3,"foodoodie");
|
||||
|
||||
@ -1081,15 +1081,15 @@ TEST(TypesTest,EightyCharTest) {
|
||||
ASSERT_EQ(str3,"foodoodiehoo");
|
||||
|
||||
|
||||
Fw::EightyCharString copyStr("ASTRING");
|
||||
Fw::String copyStr("ASTRING");
|
||||
ASSERT_EQ(copyStr,"ASTRING");
|
||||
Fw::EightyCharString copyStr2 = "ASTRING";
|
||||
Fw::String copyStr2 = "ASTRING";
|
||||
ASSERT_EQ(copyStr2,"ASTRING");
|
||||
Fw::EightyCharString copyStr3(copyStr2);
|
||||
Fw::String copyStr3(copyStr2);
|
||||
ASSERT_EQ(copyStr3,"ASTRING");
|
||||
|
||||
Fw::InternalInterfaceString ifstr("IfString");
|
||||
Fw::EightyCharString if2(ifstr);
|
||||
Fw::String if2(ifstr);
|
||||
|
||||
ASSERT_EQ(ifstr,if2);
|
||||
ASSERT_EQ(if2,"IfString");
|
||||
@ -1103,7 +1103,7 @@ TEST(TypesTest,EightyCharTest) {
|
||||
}
|
||||
|
||||
TEST(TypesTest,StringFormatTest) {
|
||||
Fw::EightyCharString str;
|
||||
Fw::String str;
|
||||
str.format("Int %d String %s",10,"foo");
|
||||
ASSERT_STREQ(str.toChar(), "Int 10 String foo");
|
||||
}
|
||||
|
||||
@ -73,14 +73,18 @@ namespace Os {
|
||||
return false;
|
||||
}
|
||||
if( !heap->create(depth) ) {
|
||||
delete heap;
|
||||
return false;
|
||||
}
|
||||
U8* data = new(std::nothrow) U8[depth*(sizeof(msgSize) + msgSize)];
|
||||
if (NULL == data) {
|
||||
delete heap;
|
||||
return false;
|
||||
}
|
||||
NATIVE_UINT_TYPE* indexes = new(std::nothrow) NATIVE_UINT_TYPE[depth];
|
||||
if (NULL == indexes) {
|
||||
delete heap;
|
||||
delete[] data;
|
||||
return false;
|
||||
}
|
||||
for(NATIVE_UINT_TYPE ii = 0; ii < depth; ++ii) {
|
||||
@ -88,6 +92,9 @@ namespace Os {
|
||||
}
|
||||
PriorityQueue* priorityQueue = new(std::nothrow) PriorityQueue;
|
||||
if (NULL == priorityQueue) {
|
||||
delete heap;
|
||||
delete[] data;
|
||||
delete[] indexes;
|
||||
return false;
|
||||
}
|
||||
priorityQueue->heap = heap;
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
#include <Os/Queue.hpp>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Fw/Types/Assert.hpp>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
@ -37,7 +36,7 @@ class MyTestSerializedBuffer : public Fw::SerializeBufferBase {
|
||||
|
||||
Os::Queue* createTestQueue(char *name, U32 size, I32 depth) {
|
||||
Os::Queue* testQueue = new Os::Queue();
|
||||
Os::Queue::QueueStatus stat = testQueue->create(Fw::EightyCharString(name), depth, size);
|
||||
Os::Queue::QueueStatus stat = testQueue->create(Os::QueueString(name), depth, size);
|
||||
EXPECT_EQ(stat,Os::Queue::QUEUE_OK);
|
||||
|
||||
// Make sure the queue is of the correct size:
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include <Os/Task.hpp>
|
||||
#include <stdio.h>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
|
||||
extern "C" {
|
||||
void startTestTask();
|
||||
@ -15,7 +14,7 @@ void someTask(void* ptr) {
|
||||
void startTestTask() {
|
||||
volatile bool taskRan = false;
|
||||
Os::Task testTask;
|
||||
Fw::EightyCharString name("ATestTask");
|
||||
Os::TaskString name("ATestTask");
|
||||
Os::Task::TaskStatus stat = testTask.start(name,12,100,10*1024,someTask,(void*) &taskRan);
|
||||
ASSERT_EQ(stat, Os::Task::TASK_OK);
|
||||
testTask.join(NULL);
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
// acknowledged.
|
||||
|
||||
#include "Tester.hpp"
|
||||
#include "Fw/Types/StringUtils.hpp"
|
||||
#include <fstream>
|
||||
|
||||
|
||||
@ -111,7 +112,7 @@ namespace Svc {
|
||||
"EVENT: (%d) (%d:%d,%d) %s: %s",
|
||||
id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severityString,text.toChar());
|
||||
ASSERT_EQ(0,strcmp(textStr,buf));
|
||||
strcpy(oldLine,buf);
|
||||
Fw::StringUtils::string_copy(oldLine, buf, sizeof(oldLine));
|
||||
}
|
||||
}
|
||||
stream1.close();
|
||||
@ -214,7 +215,7 @@ namespace Svc {
|
||||
"EVENT: (%d) (%d:%d,%d) %s: %s",
|
||||
id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severityString,text.toChar());
|
||||
ASSERT_EQ(0,strcmp(textStr,buf));
|
||||
strcpy(oldLine,buf);
|
||||
Fw::StringUtils::string_copy(oldLine, buf, sizeof(oldLine));
|
||||
}
|
||||
}
|
||||
stream1.close();
|
||||
@ -293,8 +294,7 @@ namespace Svc {
|
||||
// Verify file not made:
|
||||
ASSERT_FALSE(stat);
|
||||
ASSERT_FALSE(this->component.m_log_file.m_openFile);
|
||||
char longFileNameDupS[81];
|
||||
strcat(longFileNameDupS,"0");
|
||||
char longFileNameDupS[81] = "0";
|
||||
ASSERT_NE(Os::FileSystem::OP_OK,
|
||||
Os::FileSystem::getFileSize(longFileNameDupS,tmp));
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ namespace Fw {
|
||||
AssertArg arg4,
|
||||
AssertArg arg5,
|
||||
AssertArg arg6,
|
||||
I8* destBuffer,
|
||||
CHAR* destBuffer,
|
||||
NATIVE_INT_TYPE buffSize
|
||||
);
|
||||
|
||||
@ -121,12 +121,12 @@ namespace Svc {
|
||||
Fw::LogStringArg fileArg;
|
||||
fileArg.format("0x%08X",file);
|
||||
#else
|
||||
Fw::LogStringArg fileArg((const char*)file);
|
||||
Fw::LogStringArg fileArg(file);
|
||||
#endif
|
||||
|
||||
I8 msg[FW_ASSERT_TEXT_SIZE] = {0};
|
||||
CHAR msg[FW_ASSERT_TEXT_SIZE] = {0};
|
||||
Fw::defaultReportAssert(file,lineNo,numArgs,arg1,arg2,arg3,arg4,arg5,arg6,msg,sizeof(msg));
|
||||
fprintf(stderr, "%s\n",(const char*)msg);
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
|
||||
switch (numArgs) {
|
||||
case 0:
|
||||
|
||||
@ -92,7 +92,7 @@ namespace Svc {
|
||||
ASSERT_EVENTS_AF_ASSERT_6(0,file,lineNo,1,2,3,4,5,6);
|
||||
|
||||
// Test unexpected assert
|
||||
this->component.reportAssert((U8*)"foo",1000,10,1,2,3,4,5,6);
|
||||
this->component.reportAssert("foo",1000,10,1,2,3,4,5,6);
|
||||
ASSERT_EVENTS_AF_UNEXPECTED_ASSERT_SIZE(1);
|
||||
ASSERT_EVENTS_AF_UNEXPECTED_ASSERT(0,"foo",1000,10);
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// ======================================================================
|
||||
// ======================================================================
|
||||
// \title CRCs.hpp
|
||||
// \author Rob Bocchino
|
||||
// \brief AMPCS CRC files
|
||||
@ -7,10 +7,10 @@
|
||||
// Copyright (C) 2018 California Institute of Technology.
|
||||
// ALL RIGHTS RESERVED. United States Government Sponsorship
|
||||
// acknowledged.
|
||||
//
|
||||
// ======================================================================
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "Fw/Types/EightyCharString.hpp"
|
||||
#include "Fw/Types/String.hpp"
|
||||
#include "Fw/Types/SerialBuffer.hpp"
|
||||
#include "Os/File.hpp"
|
||||
#include "Os/FileSystem.hpp"
|
||||
@ -35,7 +35,7 @@ namespace Svc {
|
||||
const char *const fileName, //!< The file name
|
||||
const Os::File::Mode mode //!< The mode
|
||||
) {
|
||||
const Os::File::Status fileStatus =
|
||||
const Os::File::Status fileStatus =
|
||||
file.open(fileName, mode);
|
||||
ASSERT_EQ(Os::File::OP_OK, fileStatus);
|
||||
}
|
||||
@ -48,8 +48,8 @@ namespace Svc {
|
||||
) {
|
||||
NATIVE_INT_TYPE sizeThenActualSize = size;
|
||||
const Os::File::Status status = file.write(
|
||||
buffer,
|
||||
sizeThenActualSize,
|
||||
buffer,
|
||||
sizeThenActualSize,
|
||||
false
|
||||
);
|
||||
ASSERT_EQ(Os::File::OP_OK, status);
|
||||
@ -82,7 +82,7 @@ namespace Svc {
|
||||
void removeFile(
|
||||
const char *const fileName
|
||||
) {
|
||||
Fw::EightyCharString s("rm -f ");
|
||||
Fw::String s("rm -f ");
|
||||
s += fileName;
|
||||
s += ".CRC32";
|
||||
int status = system(s.toChar());
|
||||
@ -98,7 +98,7 @@ namespace Svc {
|
||||
Fw::SerialBuffer serialBuffer(buffer, sizeof(buffer));
|
||||
serialBuffer.serialize(crc);
|
||||
const U8 *const addr = serialBuffer.getBuffAddr();
|
||||
Fw::EightyCharString hashFileName(fileName);
|
||||
Fw::String hashFileName(fileName);
|
||||
hashFileName += ".CRC32";
|
||||
openFile(file, hashFileName.toChar(), Os::File::OPEN_WRITE);
|
||||
writeFile(file, addr, sizeof(crc));
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "Fw/Types/EightyCharString.hpp"
|
||||
#include "Fw/Types/String.hpp"
|
||||
#include "Svc/CmdSequencer/test/ut/SequenceFiles/AMPCS/AMPCS.hpp"
|
||||
#include "Svc/CmdSequencer/test/ut/SequenceFiles/Buffers.hpp"
|
||||
#include "Svc/CmdSequencer/test/ut/SequenceFiles/File.hpp"
|
||||
@ -112,7 +112,7 @@ namespace Svc {
|
||||
void File ::
|
||||
remove()
|
||||
{
|
||||
Fw::EightyCharString s("rm -f ");
|
||||
Fw::String s("rm -f ");
|
||||
s += this->getName();
|
||||
int status = system(s.toChar());
|
||||
ASSERT_EQ(0, status);
|
||||
|
||||
@ -25,9 +25,10 @@ namespace Svc {
|
||||
this->m_timerVal.lower = other.m_timerVal.lower;
|
||||
}
|
||||
|
||||
void TimerVal::operator=(const TimerVal& other) {
|
||||
TimerVal& TimerVal::operator=(const TimerVal& other) {
|
||||
this->m_timerVal.upper = other.m_timerVal.upper;
|
||||
this->m_timerVal.lower = other.m_timerVal.lower;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Os::IntervalTimer::RawTime TimerVal::getTimerVal() const {
|
||||
|
||||
@ -42,7 +42,7 @@ namespace Svc {
|
||||
//!
|
||||
//! \param other source timer value
|
||||
|
||||
void operator=(const TimerVal& other); //!< equal operator
|
||||
TimerVal& operator=(const TimerVal& other); //!< equal operator
|
||||
|
||||
//! \brief Destructor
|
||||
//!
|
||||
|
||||
@ -399,9 +399,9 @@ namespace Svc {
|
||||
Fw::Buffer& buffer
|
||||
)
|
||||
{
|
||||
ASSERT_LT(buffers_index, FW_NUM_ARRAY_ELEMENTS(this->buffers));
|
||||
// Copy buffer before recycling
|
||||
U8* data = new U8[buffer.getSize()];
|
||||
ASSERT_LT(buffers_index, FW_NUM_ARRAY_ELEMENTS(this->buffers));
|
||||
this->buffers[buffers_index] = data;
|
||||
buffers_index++;
|
||||
::memcpy(data, buffer.getData(), buffer.getSize());
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
namespace Svc {
|
||||
// Constructor
|
||||
RandomizeRule :: RandomizeRule(const Fw::EightyCharString& name) : STest::Rule<Tester>(name.toChar()) {}
|
||||
RandomizeRule :: RandomizeRule(const Fw::String& name) : STest::Rule<Tester>(name.toChar()) {}
|
||||
|
||||
// Can always randomize
|
||||
bool RandomizeRule :: precondition(const Svc::Tester &state) {
|
||||
@ -39,7 +39,7 @@ namespace Svc {
|
||||
|
||||
|
||||
// Constructor
|
||||
DownlinkRule :: DownlinkRule(const Fw::EightyCharString& name) : STest::Rule<Tester>(name.toChar()) {}
|
||||
DownlinkRule :: DownlinkRule(const Fw::String& name) : STest::Rule<Tester>(name.toChar()) {}
|
||||
|
||||
// Can always downlink
|
||||
bool DownlinkRule :: precondition(const Svc::Tester &state) {
|
||||
@ -57,7 +57,7 @@ namespace Svc {
|
||||
}
|
||||
|
||||
// Constructor
|
||||
FileDownlinkRule :: FileDownlinkRule(const Fw::EightyCharString& name) : STest::Rule<Tester>(name.toChar()) {}
|
||||
FileDownlinkRule :: FileDownlinkRule(const Fw::String& name) : STest::Rule<Tester>(name.toChar()) {}
|
||||
|
||||
// Can always downlink
|
||||
bool FileDownlinkRule :: precondition(const Svc::Tester &state) {
|
||||
@ -80,7 +80,7 @@ namespace Svc {
|
||||
}
|
||||
|
||||
// Constructor
|
||||
SendAvailableRule :: SendAvailableRule(const Fw::EightyCharString& name) : STest::Rule<Tester>(name.toChar()) {}
|
||||
SendAvailableRule :: SendAvailableRule(const Fw::String& name) : STest::Rule<Tester>(name.toChar()) {}
|
||||
|
||||
// Can always downlink
|
||||
bool SendAvailableRule :: precondition(const Svc::Tester &state) {
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#define FPRIME_SVC_GROUND_INTERFACE_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <Svc/GroundInterface/test/ut/Tester.hpp>
|
||||
#include <STest/STest/Rule/Rule.hpp>
|
||||
#include <STest/STest/Pick/Pick.hpp>
|
||||
@ -31,7 +31,7 @@ namespace Svc {
|
||||
*/
|
||||
struct RandomizeRule : public STest::Rule<Tester> {
|
||||
// Constructor
|
||||
RandomizeRule(const Fw::EightyCharString& name);
|
||||
RandomizeRule(const Fw::String& name);
|
||||
|
||||
// Always valid
|
||||
bool precondition(const Tester& state);
|
||||
@ -42,7 +42,7 @@ namespace Svc {
|
||||
|
||||
struct DownlinkRule : public STest::Rule<Tester> {
|
||||
// Constructor
|
||||
DownlinkRule(const Fw::EightyCharString& name);
|
||||
DownlinkRule(const Fw::String& name);
|
||||
|
||||
// Always valid
|
||||
bool precondition(const Tester& state);
|
||||
@ -53,7 +53,7 @@ namespace Svc {
|
||||
|
||||
struct FileDownlinkRule : public STest::Rule<Tester> {
|
||||
// Constructor
|
||||
FileDownlinkRule(const Fw::EightyCharString& name);
|
||||
FileDownlinkRule(const Fw::String& name);
|
||||
|
||||
// Always valid
|
||||
bool precondition(const Tester& state);
|
||||
@ -64,7 +64,7 @@ namespace Svc {
|
||||
|
||||
struct SendAvailableRule : public STest::Rule<Tester> {
|
||||
// Constructor
|
||||
SendAvailableRule(const Fw::EightyCharString& name);
|
||||
SendAvailableRule(const Fw::String& name);
|
||||
|
||||
// Always valid
|
||||
bool precondition(const Tester& state);
|
||||
|
||||
@ -244,7 +244,7 @@ namespace Svc {
|
||||
" id: 0x%08X"
|
||||
" bucket: %d"
|
||||
" next: %p\n",
|
||||
entry,entry->id,entry->bucketNo,entry->next
|
||||
static_cast<void *>(entry),entry->id,entry->bucketNo,static_cast<void *>(entry->next)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -220,9 +220,10 @@ namespace Svc {
|
||||
}
|
||||
|
||||
#ifdef BUILD_UT
|
||||
void UdpReceiverComponentImpl::UdpSerialBuffer::operator=(const UdpReceiverComponentImpl::UdpSerialBuffer& other) {
|
||||
UdpReceiverComponentImpl::UdpSerialBuffer& UdpReceiverComponentImpl::UdpSerialBuffer::operator=(const UdpReceiverComponentImpl::UdpSerialBuffer& other) {
|
||||
this->resetSer();
|
||||
this->serialize(other.getBuffAddr(),other.getBuffLength(),true);
|
||||
return *this;
|
||||
}
|
||||
|
||||
UdpReceiverComponentImpl::UdpSerialBuffer::UdpSerialBuffer(
|
||||
|
||||
@ -83,7 +83,7 @@ namespace Svc {
|
||||
public:
|
||||
|
||||
#ifdef BUILD_UT
|
||||
void operator=(const UdpSerialBuffer& other);
|
||||
UdpSerialBuffer& operator=(const UdpSerialBuffer& other);
|
||||
UdpSerialBuffer(const Fw::SerializeBufferBase& other);
|
||||
UdpSerialBuffer(const UdpSerialBuffer& other);
|
||||
UdpSerialBuffer();
|
||||
|
||||
@ -147,9 +147,10 @@ namespace Svc {
|
||||
}
|
||||
|
||||
#ifdef BUILD_UT
|
||||
void UdpSenderComponentImpl::UdpSerialBuffer::operator=(const Svc::UdpSenderComponentImpl::UdpSerialBuffer& other) {
|
||||
UdpSerialBuffer& UdpSenderComponentImpl::UdpSerialBuffer::operator=(const Svc::UdpSenderComponentImpl::UdpSerialBuffer& other) {
|
||||
this->resetSer();
|
||||
this->serialize(other.getBuffAddr(),other.getBuffLength(),true);
|
||||
return *this;
|
||||
}
|
||||
|
||||
UdpSenderComponentImpl::UdpSerialBuffer::UdpSerialBuffer(
|
||||
|
||||
@ -97,7 +97,7 @@ namespace Svc {
|
||||
public:
|
||||
|
||||
#ifdef BUILD_UT
|
||||
void operator=(const UdpSerialBuffer& other);
|
||||
UdpSerialBuffer& operator=(const UdpSerialBuffer& other);
|
||||
UdpSerialBuffer(const Fw::SerializeBufferBase& other);
|
||||
UdpSerialBuffer(const UdpSerialBuffer& other);
|
||||
UdpSerialBuffer();
|
||||
|
||||
@ -45,7 +45,7 @@ namespace Utils {
|
||||
|
||||
//! Assign a hash buffer from another hash buffer
|
||||
//!
|
||||
const HashBuffer& operator=(const HashBuffer& other);
|
||||
HashBuffer& operator=(const HashBuffer& other);
|
||||
|
||||
//! Compare two hash buffers for equality
|
||||
//!
|
||||
|
||||
@ -19,7 +19,7 @@ namespace Utils {
|
||||
FW_ASSERT(Fw::FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
}
|
||||
|
||||
const HashBuffer& HashBuffer::operator=(const HashBuffer& other) {
|
||||
HashBuffer& HashBuffer::operator=(const HashBuffer& other) {
|
||||
Fw::SerializeStatus stat = Fw::SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength());
|
||||
FW_ASSERT(Fw::FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat));
|
||||
return *this;
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
namespace Types {
|
||||
|
||||
|
||||
RandomizeRule::RandomizeRule(const Fw::EightyCharString& name)
|
||||
RandomizeRule::RandomizeRule(const Fw::String& name)
|
||||
: STest::Rule<MockTypes::CircularState>(name.toChar()) {}
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ namespace Types {
|
||||
|
||||
|
||||
|
||||
SerializeOkRule::SerializeOkRule(const Fw::EightyCharString& name)
|
||||
SerializeOkRule::SerializeOkRule(const Fw::String& name)
|
||||
: STest::Rule<MockTypes::CircularState>(name.toChar()) {}
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ namespace Types {
|
||||
|
||||
|
||||
|
||||
SerializeOverflowRule::SerializeOverflowRule(const Fw::EightyCharString& name)
|
||||
SerializeOverflowRule::SerializeOverflowRule(const Fw::String& name)
|
||||
: STest::Rule<MockTypes::CircularState>(name.toChar()) {}
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ namespace Types {
|
||||
}
|
||||
|
||||
|
||||
PeekOkRule::PeekOkRule(const Fw::EightyCharString& name)
|
||||
PeekOkRule::PeekOkRule(const Fw::String& name)
|
||||
: STest::Rule<MockTypes::CircularState>(name.toChar()) {}
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@ namespace Types {
|
||||
}
|
||||
|
||||
|
||||
PeekBadRule::PeekBadRule(const Fw::EightyCharString& name)
|
||||
PeekBadRule::PeekBadRule(const Fw::String& name)
|
||||
: STest::Rule<MockTypes::CircularState>(name.toChar()) {}
|
||||
|
||||
|
||||
@ -174,7 +174,7 @@ namespace Types {
|
||||
}
|
||||
|
||||
|
||||
RotateOkRule::RotateOkRule(const Fw::EightyCharString& name)
|
||||
RotateOkRule::RotateOkRule(const Fw::String& name)
|
||||
: STest::Rule<MockTypes::CircularState>(name.toChar()) {}
|
||||
|
||||
|
||||
@ -189,7 +189,7 @@ namespace Types {
|
||||
}
|
||||
|
||||
|
||||
RotateBadRule::RotateBadRule(const Fw::EightyCharString& name)
|
||||
RotateBadRule::RotateBadRule(const Fw::String& name)
|
||||
: STest::Rule<MockTypes::CircularState>(name.toChar()) {}
|
||||
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
#define FPRIME_GROUNDINTERFACERULES_HPP
|
||||
|
||||
#include <Fw/Types/BasicTypes.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
#include <Fw/Types/String.hpp>
|
||||
#include <Utils/Types/test/ut/CircularBuffer/CircularState.hpp>
|
||||
#include <STest/STest/Rule/Rule.hpp>
|
||||
#include <STest/STest/Pick/Pick.hpp>
|
||||
@ -35,7 +35,7 @@ namespace Types {
|
||||
*/
|
||||
struct RandomizeRule : public STest::Rule<MockTypes::CircularState> {
|
||||
// Constructor
|
||||
RandomizeRule(const Fw::EightyCharString& name);
|
||||
RandomizeRule(const Fw::String& name);
|
||||
|
||||
// Always valid
|
||||
bool precondition(const MockTypes::CircularState& state);
|
||||
@ -51,7 +51,7 @@ namespace Types {
|
||||
*/
|
||||
struct SerializeOkRule : public STest::Rule<MockTypes::CircularState> {
|
||||
// Constructor
|
||||
SerializeOkRule(const Fw::EightyCharString& name);
|
||||
SerializeOkRule(const Fw::String& name);
|
||||
|
||||
// Valid precondition for when the buffer should accept data
|
||||
bool precondition(const MockTypes::CircularState& state);
|
||||
@ -67,7 +67,7 @@ namespace Types {
|
||||
*/
|
||||
struct SerializeOverflowRule : public STest::Rule<MockTypes::CircularState> {
|
||||
// Constructor
|
||||
SerializeOverflowRule(const Fw::EightyCharString& name);
|
||||
SerializeOverflowRule(const Fw::String& name);
|
||||
|
||||
// Valid precondition for when the buffer should reject data
|
||||
bool precondition(const MockTypes::CircularState& state);
|
||||
@ -83,7 +83,7 @@ namespace Types {
|
||||
*/
|
||||
struct PeekOkRule : public STest::Rule<MockTypes::CircularState> {
|
||||
// Constructor
|
||||
PeekOkRule(const Fw::EightyCharString& name);
|
||||
PeekOkRule(const Fw::String& name);
|
||||
|
||||
// Peek ok available for when buffer size - remaining size - 1 <= peek size
|
||||
bool precondition(const MockTypes::CircularState& state);
|
||||
@ -99,7 +99,7 @@ namespace Types {
|
||||
*/
|
||||
struct PeekBadRule : public STest::Rule<MockTypes::CircularState> {
|
||||
// Constructor
|
||||
PeekBadRule(const Fw::EightyCharString& name);
|
||||
PeekBadRule(const Fw::String& name);
|
||||
|
||||
// Peek bad available for when buffer size - remaining size - 1 > peek size
|
||||
bool precondition(const MockTypes::CircularState& state);
|
||||
@ -115,7 +115,7 @@ namespace Types {
|
||||
*/
|
||||
struct RotateOkRule : public STest::Rule<MockTypes::CircularState> {
|
||||
// Constructor
|
||||
RotateOkRule(const Fw::EightyCharString& name);
|
||||
RotateOkRule(const Fw::String& name);
|
||||
|
||||
// Rotate is ok when there is more data then rotational size
|
||||
bool precondition(const MockTypes::CircularState& state);
|
||||
@ -131,7 +131,7 @@ namespace Types {
|
||||
*/
|
||||
struct RotateBadRule : public STest::Rule<MockTypes::CircularState> {
|
||||
// Constructor
|
||||
RotateBadRule(const Fw::EightyCharString& name);
|
||||
RotateBadRule(const Fw::String& name);
|
||||
|
||||
// Rotate is bad when there is less data then rotational size
|
||||
bool precondition(const MockTypes::CircularState& state);
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
#include "LockGuardTester.hpp"
|
||||
#include <time.h>
|
||||
#include <Os/Task.hpp>
|
||||
#include <Fw/Types/EightyCharString.hpp>
|
||||
|
||||
namespace Utils {
|
||||
|
||||
@ -55,7 +54,7 @@ namespace Utils {
|
||||
data.i = 0;
|
||||
Os::Task testTask;
|
||||
Os::Task::TaskStatus stat;
|
||||
Fw::EightyCharString name("TestTask");
|
||||
Os::TaskString name("TestTask");
|
||||
|
||||
{
|
||||
LockGuard guard(data.mutex);
|
||||
|
||||
@ -160,6 +160,7 @@
|
||||
#define FW_NO_ASSERT 1 //!< Asserts turned off
|
||||
#define FW_FILEID_ASSERT 2 //!< File ID used - requires -DASSERT_FILE_ID=somevalue to be set on the compile command line
|
||||
#define FW_FILENAME_ASSERT 3 //!< Uses the file name in the assert - image stores filenames
|
||||
#define FW_ASSERT_DFL_MSG_LEN 256 //!< Maximum assert message length when using the default assert handler
|
||||
|
||||
#ifndef FW_ASSERT_LEVEL
|
||||
#define FW_ASSERT_LEVEL FW_FILENAME_ASSERT //!< Defines the type of assert used
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user