Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions compiler/install
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ else
fi
util=lib/src/main/scala/util
echo "Updating version to $version"
sed -i.bak -e "s/val v = .*/val v = \"$version\"/" \
sed -i.update.bak -e "s/val v = .*/val v = \"$version\"/" \
$util/Version.scala

echo "Building jar files"
Expand All @@ -86,7 +86,8 @@ echo $cmd
$cmd

echo "Restoring Version.scala"
cp $util/Version.scala.bak $util/Version.scala
sed -i.restore.bak -e "s/val v = .*/val v = \"[unknown version]\"/" \
$util/Version.scala

mkdir -p $dest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,13 @@ case class ComponentDataProducts (
Some("The component base id")
)
),
List("Fw::DpContainer(id, buffer)", "baseId(baseId)"),
List("Fw::DpContainer(id, buffer)", "m_baseId(baseId)"),
Nil
),
constructorClassMember(
Some("Constructor with default initialization"),
Nil,
List("Fw::DpContainer()", "baseId(0)"),
List("Fw::DpContainer()", "m_baseId(0)"),
Nil
),
)
Expand Down Expand Up @@ -437,7 +437,7 @@ case class ComponentDataProducts (
s"""|$computeSizeDelta
|Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
|if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) {
| const FwDpIdType id = this->baseId + RecordId::$name;
| const FwDpIdType id = this->m_baseId + RecordId::$name;
| status = this->m_dataBuffer.serialize(id);
| FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
| status = $serialExpr;
Expand Down Expand Up @@ -524,7 +524,7 @@ case class ComponentDataProducts (
|// Serialize the elements if they will fit
|Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
|if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
| const FwDpIdType id = this->baseId + RecordId::$name;
| const FwDpIdType id = this->m_baseId + RecordId::$name;
| status = this->m_dataBuffer.serialize(id);
| FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
| status = this->m_dataBuffer.serializeSize(size);
Expand Down Expand Up @@ -575,9 +575,9 @@ case class ComponentDataProducts (
private val getAccessFunctionsMember = linesClassMember(
lines(
raw"""|
|FwDpIdType getBaseId() const { return this->baseId; }
|FwDpIdType getBaseId() const { return this->m_baseId; }
|
|void setBaseId(FwDpIdType baseId) { this->baseId = baseId; }"""
|void setBaseId(FwDpIdType baseId) { this->m_baseId = baseId; }"""
)
)

Expand All @@ -589,7 +589,7 @@ case class ComponentDataProducts (
linesClassMember(
CppDocHppWriter.writeAccessTag("PRIVATE") ++
CppDocWriter.writeDoxygenComment("The component base id") ++
lines("FwDpIdType baseId;")
lines("FwDpIdType m_baseId;")
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ case class ComponentExternalStateMachines(
private val writeDeserializeSmVars = lines(
"""|// Deserialize the state machine ID to an FwEnumStoreType
|FwEnumStoreType enumStoreSmId = 0;
|Fw::SerializeStatus deserStatus = msg.deserialize(enumStoreSmId);
|deserStatus = msg.deserialize(enumStoreSmId);
|FW_ASSERT(
| deserStatus == Fw::FW_SERIALIZE_OK,
| static_cast<FwAssertArgType>(deserStatus)
Expand Down
13 changes: 11 additions & 2 deletions compiler/scripts/fprime-gcc
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,21 @@ then
exit 1
fi

flags="
-Wall
-Werror
-Wextra
-Wold-style-cast
-Wshadow
-pedantic
"

unset os_flags
os=`uname`
case "$os" in
Darwin)
os_type=DARWIN
os_flags='-Wno-nullability-completeness -Wpedantic -ferror-limit=1'
os_flags='-Wno-nullability-completeness -ferror-limit=1'
;;
Linux)
os_type=LINUX
Expand All @@ -33,4 +42,4 @@ case "$os" in
esac

# Removing -Wconversion because of many implicit casts of size type in F Prime
g++ --std=c++11 -Wall -Wextra $os_flags -DTGT_OS_TYPE_$os_type -I $FPRIME -I $FPRIME/config -I $FPRIME/cmake/platform/types -I . $FPRIME_GCC_FLAGS $@
g++ --std=c++11 $flags $os_flags -DTGT_OS_TYPE_$os_type -I $FPRIME -I $FPRIME/config -I $FPRIME/cmake/platform/types -I . $FPRIME_GCC_FLAGS $@
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ ActiveAsyncProductsComponentBase::DpContainer ::
FwDpIdType baseId
) :
Fw::DpContainer(id, buffer),
baseId(baseId)
m_baseId(baseId)
{

}

ActiveAsyncProductsComponentBase::DpContainer ::
DpContainer() :
Fw::DpContainer(),
baseId(0)
m_baseId(0)
{

}
Expand All @@ -108,7 +108,7 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::DataArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::DataArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand All @@ -133,7 +133,7 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer ::
ActiveAsyncProducts_Data::SERIALIZED_SIZE;
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::DataRecord;
const FwDpIdType id = this->m_baseId + RecordId::DataRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serialize(elt);
Expand Down Expand Up @@ -166,7 +166,7 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::StringArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::StringArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand Down Expand Up @@ -194,7 +194,7 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer ::
elt.serializedTruncatedSize(stringSize);
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::StringRecord;
const FwDpIdType id = this->m_baseId + RecordId::StringRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = elt.serialize(this->m_dataBuffer, stringSize);
Expand Down Expand Up @@ -222,7 +222,7 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::U32ArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand All @@ -247,7 +247,7 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer ::
sizeof(U32);
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::U32Record;
const FwDpIdType id = this->m_baseId + RecordId::U32Record;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serialize(elt);
Expand Down Expand Up @@ -275,7 +275,7 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::U8ArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,14 @@ class ActiveAsyncProductsComponentBase :
FwSizeType size //!< The array size
);

FwDpIdType getBaseId() const { return this->baseId; }
FwDpIdType getBaseId() const { return this->m_baseId; }

void setBaseId(FwDpIdType baseId) { this->baseId = baseId; }
void setBaseId(FwDpIdType baseId) { this->m_baseId = baseId; }

PRIVATE:

//! The component base id
FwDpIdType baseId;
FwDpIdType m_baseId;

};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ namespace ExternalSm {

// Deserialize the state machine ID to an FwEnumStoreType
FwEnumStoreType enumStoreSmId = 0;
Fw::SerializeStatus deserStatus = msg.deserialize(enumStoreSmId);
deserStatus = msg.deserialize(enumStoreSmId);
FW_ASSERT(
deserStatus == Fw::FW_SERIALIZE_OK,
static_cast<FwAssertArgType>(deserStatus)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ ActiveGetProductsComponentBase::DpContainer ::
FwDpIdType baseId
) :
Fw::DpContainer(id, buffer),
baseId(baseId)
m_baseId(baseId)
{

}

ActiveGetProductsComponentBase::DpContainer ::
DpContainer() :
Fw::DpContainer(),
baseId(0)
m_baseId(0)
{

}
Expand All @@ -106,7 +106,7 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::DataArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::DataArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand All @@ -131,7 +131,7 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer ::
ActiveGetProducts_Data::SERIALIZED_SIZE;
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::DataRecord;
const FwDpIdType id = this->m_baseId + RecordId::DataRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serialize(elt);
Expand Down Expand Up @@ -164,7 +164,7 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::StringArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::StringArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand Down Expand Up @@ -192,7 +192,7 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer ::
elt.serializedTruncatedSize(stringSize);
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::StringRecord;
const FwDpIdType id = this->m_baseId + RecordId::StringRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = elt.serialize(this->m_dataBuffer, stringSize);
Expand Down Expand Up @@ -220,7 +220,7 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::U32ArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand All @@ -245,7 +245,7 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer ::
sizeof(U32);
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::U32Record;
const FwDpIdType id = this->m_baseId + RecordId::U32Record;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serialize(elt);
Expand Down Expand Up @@ -273,7 +273,7 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::U8ArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ class ActiveGetProductsComponentBase :
FwSizeType size //!< The array size
);

FwDpIdType getBaseId() const { return this->baseId; }
FwDpIdType getBaseId() const { return this->m_baseId; }

void setBaseId(FwDpIdType baseId) { this->baseId = baseId; }
void setBaseId(FwDpIdType baseId) { this->m_baseId = baseId; }

PRIVATE:

//! The component base id
FwDpIdType baseId;
FwDpIdType m_baseId;

};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ ActiveGuardedProductsComponentBase::DpContainer ::
FwDpIdType baseId
) :
Fw::DpContainer(id, buffer),
baseId(baseId)
m_baseId(baseId)
{

}

ActiveGuardedProductsComponentBase::DpContainer ::
DpContainer() :
Fw::DpContainer(),
baseId(0)
m_baseId(0)
{

}
Expand All @@ -106,7 +106,7 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::DataArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::DataArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand All @@ -131,7 +131,7 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer ::
ActiveGuardedProducts_Data::SERIALIZED_SIZE;
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::DataRecord;
const FwDpIdType id = this->m_baseId + RecordId::DataRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serialize(elt);
Expand Down Expand Up @@ -164,7 +164,7 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::StringArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::StringArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand Down Expand Up @@ -192,7 +192,7 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer ::
elt.serializedTruncatedSize(stringSize);
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::StringRecord;
const FwDpIdType id = this->m_baseId + RecordId::StringRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = elt.serialize(this->m_dataBuffer, stringSize);
Expand Down Expand Up @@ -220,7 +220,7 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::U32ArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand All @@ -245,7 +245,7 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer ::
sizeof(U32);
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::U32Record;
const FwDpIdType id = this->m_baseId + RecordId::U32Record;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serialize(elt);
Expand Down Expand Up @@ -273,7 +273,7 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer ::
// Serialize the elements if they will fit
Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK;
if ((this->m_dataBuffer.getBuffLength() + sizeDelta) <= this->m_dataBuffer.getBuffCapacity()) {
const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord;
const FwDpIdType id = this->m_baseId + RecordId::U8ArrayRecord;
status = this->m_dataBuffer.serialize(id);
FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);
status = this->m_dataBuffer.serializeSize(size);
Expand Down
Loading