forked from nasa/fprime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update FppTest for new autocoder changes
- Loading branch information
watney
committed
Aug 26, 2024
1 parent
112b60b
commit ff7b023
Showing
16 changed files
with
180 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
InitialState = OFF, Event = RTI, guard = None, action = None, TargetState = ON | ||
InitialState = ON, Event = RTI, guard = None, action = None, TargetState = OFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/home/watney/STARS/autocoder/Stars.py -namespace FppTest -backend fprime -noImpl -model DeviceSm.plantuml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# Define the source and destination directories | ||
SOURCE_DIR="/home/watney/fprime/FppTest/state_machine/dev" | ||
DEST_DIR="/home/watney/fprime/FppTest/build-fprime-automatic-native-ut/FppTest/state_machine" | ||
|
||
# List of files to copy | ||
FILES=("SmTestComponentAc.cpp" "SmTestComponentAc.hpp") | ||
|
||
# Loop through each file and copy it to the destination directory | ||
for FILE in "${FILES[@]}"; do | ||
if [ -f "$SOURCE_DIR/$FILE" ]; then | ||
cp "$SOURCE_DIR/$FILE" "$DEST_DIR/" | ||
echo "Copied $FILE to $DEST_DIR/" | ||
else | ||
echo "File not found: $SOURCE_DIR/$FILE" | ||
fi | ||
done | ||
|
||
echo "File copy operation completed." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#### | ||
# F prime CMakeLists.txt: | ||
# | ||
# SOURCE_FILES: combined list of source and autocoding files | ||
# MOD_DEPS: (optional) module dependencies | ||
# | ||
#### | ||
set(SOURCE_FILES | ||
"${CMAKE_CURRENT_LIST_DIR}/SMSignalBuffer.cpp" | ||
) | ||
register_fprime_module() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ComPortAi.xml - Port description for communication buffers | ||
ComBuffer.hpp(.cpp) - A buffer holding a serialized communication buffer | ||
ComPacket.hpp(.cpp) - A packet type that holds a communication buffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#include <Fw/SMSignal/SMSignalBuffer.hpp> | ||
#include <Fw/Types/Assert.hpp> | ||
|
||
namespace Fw { | ||
|
||
SMSignalBuffer::SMSignalBuffer(const U8 *args, NATIVE_UINT_TYPE size) { | ||
SerializeStatus stat = SerializeBufferBase::setBuff(args,size); | ||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat)); | ||
} | ||
|
||
SMSignalBuffer::SMSignalBuffer() { | ||
} | ||
|
||
SMSignalBuffer::~SMSignalBuffer() { | ||
} | ||
|
||
SMSignalBuffer::SMSignalBuffer(const SMSignalBuffer& other) : Fw::SerializeBufferBase() { | ||
SerializeStatus stat = SerializeBufferBase::setBuff(other.m_bufferData,other.getBuffLength()); | ||
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<NATIVE_INT_TYPE>(stat)); | ||
} | ||
|
||
SMSignalBuffer& SMSignalBuffer::operator=(const SMSignalBuffer& other) { | ||
if(this == &other) { | ||
return *this; | ||
} | ||
|
||
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 SMSignalBuffer::getBuffCapacity() const { | ||
return sizeof(this->m_bufferData); | ||
} | ||
|
||
const U8* SMSignalBuffer::getBuffAddr() const { | ||
return this->m_bufferData; | ||
} | ||
|
||
U8* SMSignalBuffer::getBuffAddr() { | ||
return this->m_bufferData; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* SMSignalBuffer.hpp | ||
* | ||
*/ | ||
|
||
/* | ||
* Description: | ||
* This object contains the SMSignalBuffer type, used for attaching data to state machine signals | ||
*/ | ||
#ifndef FW_SM_SIGNAL_BUFFER_HPP | ||
#define FW_SM_SIGNAL_BUFFER_HPP | ||
|
||
#include <FpConfig.hpp> | ||
#include <Fw/Types/Serializable.hpp> | ||
|
||
namespace Fw { | ||
|
||
class SMSignalBuffer : public SerializeBufferBase { | ||
public: | ||
|
||
enum { | ||
SERIALIZED_TYPE_ID = 1010, | ||
SERIALIZED_SIZE = FW_COM_BUFFER_MAX_SIZE + sizeof(FwBuffSizeType) // size of buffer + storage of size word | ||
}; | ||
|
||
SMSignalBuffer(const U8 *args, NATIVE_UINT_TYPE size); | ||
SMSignalBuffer(); | ||
SMSignalBuffer(const SMSignalBuffer& other); | ||
virtual ~SMSignalBuffer(); | ||
SMSignalBuffer& operator=(const SMSignalBuffer& other); | ||
|
||
NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer | ||
U8* getBuffAddr(); | ||
const U8* getBuffAddr() const; | ||
|
||
private: | ||
U8 m_bufferData[FW_SM_SIGNALS_BUFFER_MAX_SIZE]; // packet data buffer | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.html |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
\page FwComPort Fw::Com Port | ||
# Fw::Com Port | ||
|
||
## 1. Introduction | ||
|
||
The `Fw::Com` port is used to pass binary data to a service for transporting data out of the system. | ||
Incoming and outgoing packets are serialized into these buffers. | ||
|
||
## 2. Design | ||
|
||
### 2.1 Context | ||
|
||
#### 2.1.1 Port Diagram | ||
|
||
The `Fw::Com` port has the following port diagram: | ||
|
||
![Fw::Com Diagram](img/FwComBDD.jpg "Fw::Com Port") | ||
|
||
#### 2.1.2 Serializables | ||
|
||
##### 2.1.2.1 Fw::ComPacket | ||
|
||
The `Fw::ComPacket` class is a base class for other packet classes. It provides type identification for packet subtypes. | ||
|
||
##### 2.1.2.2 Fw::ComBuffer | ||
|
||
The `Fw::ComBuffer` class represents a buffer to store data for transmission. It is used as a destination buffer for serialization of `Fw::ComPacket` subtypes. | ||
|
||
## 3. Change Log | ||
|
||
Date | Description | ||
---- | ----------- | ||
6/22/2015 | Initial Version | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters