lestarch: updating .hpp and .md files for clean doxygen run (#676)

This commit is contained in:
M Starch 2021-06-07 21:10:09 -07:00 committed by GitHub
parent 5ff62bdffd
commit eebef10711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
51 changed files with 266 additions and 189 deletions

View File

@ -1,7 +1,12 @@
FROM nasafprime/fprime-base:latest
# Copies your code file from your action repository to the filesystem path `/` of the container
USER root
RUN apt-get update && apt-get install -y --no-install-recommends doxygen && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && pip3 --no-cache-dir install fprime-tools fprime-gds
COPY entrypoint.sh /entrypoint.sh
COPY autodoc.bash /autodoc.bash
USER fprime
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]

20
.github/actions/autodoc.bash vendored Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
# Exit when any command fails
set -e
set -x
cd "$GITHUB_WORKSPACE"
REMOTE="${1:-origin}"
git config --local user.email "nasa-fprime[bot]@users.noreply.github.com"
git config --local user.name "nasa-fprime[bot]"
git fetch "${REMOTE}" release/documentation
git fetch "${REMOTE}" devel
git checkout release/documentation
git merge "${REMOTE}"/devel
${GITHUB_WORKSPACE}/docs/doxygen/generate_docs.bash
git add -Af "${GITHUB_WORKSPACE}/docs"
git commit -m "Autodoc on $(date)" 1>/dev/null
git push "${REMOTE}"

View File

@ -2,7 +2,12 @@
# Exit when any command fails
set -e
set -x
cd "$GITHUB_WORKSPACE"
"$GITHUB_WORKSPACE/ci/master.bash" QUICK
"$GITHUB_WORKSPACE/ci/master.bash" STATIC
if [ "$GITHUB_WORKFLOW" != "Autodocs" ]
then
"$GITHUB_WORKSPACE/ci/master.bash" QUICK
"$GITHUB_WORKSPACE/ci/master.bash" STATIC
else
/autodoc.bash
fi

9
.github/actions/github-autodocs.yml vendored Normal file
View File

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

View File

@ -616,7 +616,6 @@ gcgandhi
gcov
gdiplus
gencode
gendoc
genfile
GENHUB
GENREP
@ -882,7 +881,6 @@ LCHILD
ldl
lemstarch
len
leq
lestarch
levelname
lflag
@ -1332,7 +1330,7 @@ Rcv
rcvd
RCVTIMEO
RDONLY
RDWR
rdwr
Readback
readdir
READERROR
@ -1818,6 +1816,7 @@ vals
valud
ve
venv
VERSIONED
versioning
VFILE
vhd

17
.github/workflows/autodocs.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: Autodocs
on:
push:
branches:
- "devel"
jobs:
build:
name: Autodocumentation
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2.0.0
with:
fetch-depth: 5
- uses: ./.github/actions/
id: github-autodocs

View File

@ -63,9 +63,9 @@ namespace CFDP {
//! Update the checksum value by accumulating the words in the data
void update(
const U8 *const data, //! The data
const U32 offset, //! The offset of the start of the data, relative to the start of the file
const U32 length //! The length of the data in bytes
const U8 *const data, //!< The data
const U32 offset, //!< The offset of the start of the data, relative to the start of the file
const U32 length //!< The length of the data in bytes
);
//! Get the checksum value

View File

@ -3,7 +3,7 @@
## 1. Introduction
The `Drv::BlockDriver` is a demonstration component that loops back data buffers from `Ref::SendBuffApp` [HTML](../../../Ref/SendBuffApp/docs/sdd.html) [MD](../../../Ref/SendBuffApp/docs/sdd.md) to `Ref::RecvBuffApp` [HTML](../../../Ref/RecvBuffApp/docs/sdd.html) [MD](../../../Ref/RecvBuffApp/docs/sdd.md) It also emulates a timing interrupt driven by the public method `void callIsr(void)`.
The `Drv::BlockDriver` is a demonstration component that loops back data buffers. It also emulates a timing interrupt driven by the public method `void callIsr(void)`.
## 2. Requirements
@ -26,7 +26,7 @@ The `Drv::BlockDriver` component has the following component diagram:
## 4. Dictionaries
Dictionaries [HTML](BlockDriver.html) [MD](BlockDriver.md)
TBD
## 5. Module Checklists

View File

@ -46,6 +46,7 @@ class SocketReadTask {
* \param name: name of the task
* \param priority: priority of the started task. See: Os::Task::start.
* \param stack: stack size provided to the task. See: Os::Task::start.
* \param reconnect: automatically reconnect socket when closed. Default: true.
* \param cpuAffinity: cpu affinity provided to task. See: Os::Task::start.
*/
void startSocketTask(const Fw::StringBase &name,

View File

@ -71,8 +71,6 @@ class UdpSocket : public IpSocket {
*
* \param hostname: socket uses for incoming transmissions. Must be of form x.x.x.x
* \param port: port socket uses for incoming transmissions. Must NOT be 0.
* \param send_timeout_seconds: send timeout seconds portion
* \param send_timeout_microseconds: send timeout microseconds portion. Must be less than 1000000
* \return status of configure
*/
SocketIpStatus configureRecv(const char* hostname, const U16 port);
@ -81,8 +79,7 @@ class UdpSocket : public IpSocket {
/**
* \brief bind the UDP to a port such that it can receive packets at the previously configured port
* \param address: address in x.x.x.x notation
* \param port: port to bind to
* \param fd: socket file descriptor used in bind
* \return status of the bind
*/
SocketIpStatus bind(NATIVE_INT_TYPE fd);

View File

@ -60,8 +60,8 @@ namespace Drv {
//! Open up the socket port, ready for communications
//!
SocketIpStatus configure(
const char* hostname,
U16 port,
const char* hostname, /*!< Hostname of remote server */
U16 port, /*!< Port of remote server */
const bool send_udp = SOCKET_SEND_UDP, /*!< Send down using UDP. Default: read from configuration HPP*/
const U32 timeout_seconds = SOCKET_TIMEOUT_SECONDS, /*!< Timeout(S). Default: from configuration HPP*/
const U32 timeout_microseconds = SOCKET_TIMEOUT_MICROSECONDS /*!< Timeout(uS). Default: from configuration HPP*/

View File

@ -109,7 +109,7 @@ public:
//! deserializes the pointer to said data, the size, and context. This is done for efficiency in moving around data,
//! and is the primary usage of Fw::Buffer. To deserialize the wrapped data, use either the data pointer accessor
//! or the serialize buffer base representation and deserialize from that.
//! \param serialBuffer: serialize buffer to read data into
//! \param buffer: serialize buffer to read data into
//! \return: status of serialization
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase& buffer);

View File

@ -1,5 +1,5 @@
\page FwCmdFwCmdResponseCmdReg Fw::Cmd / Fw::CmdResponse /Fw::CmdReg Ports
# Fw::Cmd / Fw::CmdResponse /Fw::CmdReg Ports
\page FwCmdFwCmdResponseFwCmdReg Fw::Cmd / Fw::CmdResponse / Fw::CmdReg Ports
# Fw::Cmd / Fw::CmdResponse / Fw::CmdReg Ports
## 1. Introduction

View File

@ -1,4 +1,4 @@
\page FwLogLogText Fw::Log / Fw::LogText Ports
\page FwLogLogText Fw::Log, Fw::LogText Ports
# Fw::Log / Fw::LogText Ports
## 1. Introduction

View File

@ -18,13 +18,17 @@ namespace Fw {
* Function called on the logger to log a message. This is abstract virtual method and
* must be supplied by the subclass. This logger object should be registered with the
* Fw::Log::registerLogger function.
* \param const char* fmt: format string in which to place arguments
* \param POINTER_CAST a1: first argument. (Default: 0)
* \param POINTER_CAST a2: second argument. (Default: 0)
* \param POINTER_CAST a3: third argument. (Default: 0)
* \param POINTER_CAST a4: forth argument. (Default: 0)
* \param POINTER_CAST a5: fifth argument. (Default: 0)
* \param POINTER_CAST a6: sixth argument. (Default: 0)
* \param fmt: format string in which to place arguments
* \param a0: zeroth argument. (Default: 0)
* \param a1: first argument. (Default: 0)
* \param a2: second argument. (Default: 0)
* \param a3: third argument. (Default: 0)
* \param a4: forth argument. (Default: 0)
* \param a5: fifth argument. (Default: 0)
* \param a6: sixth argument. (Default: 0)
* \param a7: seventh argument. (Default: 0)
* \param a8: eight argument. (Default: 0)
* \param a9: ninth argument. (Default: 0)
*/
virtual void log(
const char* fmt,
@ -43,13 +47,17 @@ namespace Fw {
/**
* Logs a message using the currently specified static logger. If a logger is not
* registered, then the log message is dropped.
* \param const char* fmt: format string in which to place arguments
* \param POINTER_CAST a1: first argument. (Default: 0)
* \param POINTER_CAST a2: second argument. (Default: 0)
* \param POINTER_CAST a3: third argument. (Default: 0)
* \param POINTER_CAST a4: forth argument. (Default: 0)
* \param POINTER_CAST a5: fifth argument. (Default: 0)
* \param POINTER_CAST a6: sixth argument. (Default: 0)
* \param fmt: format string in which to place arguments
* \param a0: zeroth argument. (Default: 0)
* \param a1: first argument. (Default: 0)
* \param a2: second argument. (Default: 0)
* \param a3: third argument. (Default: 0)
* \param a4: forth argument. (Default: 0)
* \param a5: fifth argument. (Default: 0)
* \param a6: sixth argument. (Default: 0)
* \param a7: seventh argument. (Default: 0)
* \param a8: eight argument. (Default: 0)
* \param a9: ninth argument. (Default: 0)
*/
static void logMsg(
const char* fmt,
@ -68,7 +76,7 @@ namespace Fw {
/**
* Registers the static logger for use with the Fw::Log::logMsg function. This must be
* a subclass of Fw::Log.
* Log* logger: logger to log to when Fw::Log::logMsg is called.
* \param logger: logger to log to when Fw::Log::logMsg is called.
*/
static void registerLogger(Logger* logger);

View File

@ -19,7 +19,7 @@ namespace Fw {
* Handles the incoming trap.
* Note: if user does not supply an implementer of this
* function, a do-nothing version will be run.
* \param U32 trap: trap number
* \param trap: trap number
*/
virtual void doTrap(U32 trap) = 0;
};

View File

@ -44,7 +44,7 @@ namespace Fw {
//! Deallocate memory
/*!
* \param identifier the memory segment identifier (not used)
* \ptr the pointer to memory returned by allocate()
* \param ptr the pointer to memory returned by allocate()
*/
void deallocate(
const NATIVE_UINT_TYPE identifier,

View File

@ -57,7 +57,7 @@ namespace Fw {
//! Deallocate memory
/*!
* \param identifier the memory segment identifier (if needed)
* \ptr the pointer to memory returned by allocate()
* \param ptr the pointer to memory returned by allocate()
*/
virtual void deallocate(
const NATIVE_UINT_TYPE identifier,

View File

@ -17,11 +17,25 @@
namespace Fw {
//! Fw::MmapAllocator is an implementation of the Fw::MemAllocator interface that back memory with a read and write
//! capable anonymous memory mapped region. This class is currently not useful for mapping to a file.
class MmapAllocator: public MemAllocator {
public:
//! Constructor with no arguments
//!
MmapAllocator();
//! Destructor with no arguments
virtual ~MmapAllocator();
//! Allocate memory using the mmap allocator
//! \param identifier: identifier to use with allocation
//! \param size: size of memory to be allocated
//! \param recoverable: (output) is this memory recoverable after a reset. Always false for mmap.
void *allocate(const NATIVE_UINT_TYPE identifier, NATIVE_UINT_TYPE &size, bool& recoverable);
//! Deallocation of memory using the mmap allocator
//! \param identifier: identifier used at allocation
//! \param ptr: pointer to memory being deallocated
void deallocate(const NATIVE_UINT_TYPE identifier, void* ptr);
private:

View File

@ -33,21 +33,11 @@ class BareQueueHandle {
//!< Actual queue used to store
BufferQueue m_queue;
};
/**
* Queue should be initialized with a NULL handle
*/
Queue::Queue() :
m_handle(static_cast<POINTER_CAST>(NULL))
{ }
/**
* Create a new queue. The will also recreate the queue if it exists.
* WARNING: this must be called only during initialization.
* \param const Fw::StringBase &name: name of the queue
* \param NATIVE_INT_TYPE depth: depth of the queue
* \param NATIVE_INT_TYPE msgSize: message size
* \return Queue::QueueStatus
*/
Queue::QueueStatus Queue::createInternal(const Fw::StringBase &name, NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize) {
BareQueueHandle* handle = reinterpret_cast<BareQueueHandle*>(this->m_handle);
// Queue has already been created... remove it and try again:
@ -70,9 +60,7 @@ Queue::QueueStatus Queue::createInternal(const Fw::StringBase &name, NATIVE_INT_
#endif
return QUEUE_OK;
}
/**
* Cleans up the dynamic memory of this queue
*/
Queue::~Queue() {
// Clean up the queue handle:
BareQueueHandle* handle = reinterpret_cast<BareQueueHandle*>(this->m_handle);
@ -81,9 +69,7 @@ Queue::~Queue() {
}
this->m_handle = static_cast<POINTER_CAST>(NULL);
}
/**
* Helper function for sending non-blocking requests.
*/
Queue::QueueStatus bareSendNonBlock(BareQueueHandle& handle, const U8* buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority) {
FW_ASSERT(handle.m_init);
BufferQueue& queue = handle.m_queue;
@ -95,10 +81,7 @@ Queue::QueueStatus bareSendNonBlock(BareQueueHandle& handle, const U8* buffer, N
}
return status;
}
/**
* Helper function for sending blocking requests.
* WARNING: since this is for baremetal, this *always* ASSERTS
*/
Queue::QueueStatus bareSendBlock(BareQueueHandle& handle, const U8* buffer, NATIVE_INT_TYPE size, NATIVE_INT_TYPE priority) {
FW_ASSERT(handle.m_init);
BufferQueue& queue = handle.m_queue;

View File

@ -20,20 +20,13 @@ TaskRunner::TaskRunner() :
Task::registerTaskRegistry(this);
}
TaskRunner::~TaskRunner() {}
/**
* Add a task to the registry. These tasks will be run on a bare-metal
* loop. The function used in this task may be overridden.
* \param Task* task: task to be added
*/
void TaskRunner::addTask(Task* task) {
FW_ASSERT(m_index < TASK_REGISTRY_CAP);
this->m_task_table[m_index] = task;
m_index++;
}
/**
* Remove a task to the registry. These tasks will no-longer be run.
* \param Task* task: task to be removed
*/
void TaskRunner::removeTask(Task* task) {
bool found = false;
//Squash that existing task
@ -53,15 +46,11 @@ void TaskRunner::removeTask(Task* task) {
}
}
}
/**
* Stop the task runner
*/
void TaskRunner::stop() {
m_cont = false;
}
/**
* Run once through list of tasks
*/
void TaskRunner::run() {
U32 i = 0;
if (!m_cont) {

View File

@ -25,12 +25,12 @@ class TaskRunner : TaskRegistry {
/**
* Add a task to the registry. These tasks will be run on a bare-metal
* loop. The function used in this task may be overridden.
* \param Task* task: task to be added
* \param task: task to be added
*/
void addTask(Task* task);
/**
* Remove a task to the registry. These tasks will no-longer be run.
* \param Task* task: task to be removed
* \param task: task to be removed
*/
void removeTask(Task* task);
/**

View File

@ -21,13 +21,17 @@ namespace Os {
* Function called on the logger to log a message. This is abstract virtual method and
* must be supplied by the subclass. This logger object should be registered with the
* Fw::Log::registerLogger function.
* \param const char* fmt: format string in which to place arguments
* \param POINTER_CAST a1: first argument. (Default: 0)
* \param POINTER_CAST a2: second argument. (Default: 0)
* \param POINTER_CAST a3: third argument. (Default: 0)
* \param POINTER_CAST a4: forth argument. (Default: 0)
* \param POINTER_CAST a5: fifth argument. (Default: 0)
* \param POINTER_CAST a6: sixth argument. (Default: 0)
* \param fmt: format string in which to place arguments
* \param a0: zeroth argument. (Default: 0)
* \param a1: first argument. (Default: 0)
* \param a2: second argument. (Default: 0)
* \param a3: third argument. (Default: 0)
* \param a4: forth argument. (Default: 0)
* \param a5: fifth argument. (Default: 0)
* \param a6: sixth argument. (Default: 0)
* \param a7: seventh argument. (Default: 0)
* \param a8: eight argument. (Default: 0)
* \param a9: ninth argument. (Default: 0)
*/
void log(
const char* fmt,

View File

@ -65,6 +65,12 @@ namespace Os {
#endif
protected:
//! Internal method used for creating allowing alternate implementations to implement different creation
//! behavior without needing to duplicate the majority of the creation functionality.
//! \param name: name of queue
//! \param depth: depth of queue
//! \param msgSize: size of a message stored on queue
//! \return queue creation status
QueueStatus createInternal(const Fw::StringBase &name, NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize); //!< create a message queue
POINTER_CAST m_handle; //!< handle for implementation specific queue
QueueString m_name; //!< queue name

View File

@ -20,12 +20,12 @@ namespace Os {
virtual ~WatchdogTimer();
WatchdogStatus startTicks( I32 delayInTicks, //!< number of ticks to delay. OS/timing dependent
WatchdogCb p_callback, //!< routine to call on time-out
void* parameter); //!< parameter with which to call routine);
void* parameter //!< parameter with which to call routine
);
WatchdogStatus startMs( I32 delayInMs, //!< number of ms to delay.
WatchdogCb p_callback, //!< routine to call on time-out
void* parameter); //!< parameter with which to call routine);
void* parameter //!< parameter with which to call routine
);
WatchdogStatus restart(void); //!< restart timer with previous value

View File

@ -1,3 +1,4 @@
\page SvcActiveLoggerComponent Svc::ActiveLogger Component
# Svc::ActiveLogger Component
## 1. Introduction
@ -89,7 +90,7 @@ The `Svc::ActiveLogger` component accepts events from other components.
## 4. Dictionaries
Dictionaries: [HTML](ActiveLogger.html) [MD](ActiveLogger.md)
TBD
## 5. Module Checklists

View File

@ -1,10 +1,11 @@
\page SvcRateGroupDriverComponent Svc::RateGroupDriver Component
# Svc::RateGroupDriver Component
\page SvcActiveRateGroupComponent Svc::ActiveRateGroup Component
# Svc::ActiveRateGroup Component
## 1. Introduction
`Svc::ActiveRateGroup` is an active component that drives a set of components connected to `Svc::Sched` output ports.
It contains an asynchronous input `Svc::Cycle` port. This port sends a message which wakes the component task.
It contains an asynchronous input `Svc::Cycle` port. This port sends a message which wakes the component task.
The task invokes each output port in order, passing an argument indicating the order. It tracks execution time and detects overruns.
## 2. Requirements
@ -65,7 +66,7 @@ As described in the Functional Description section, the `Svc::ActiveRateGroup` c
## 4. Dictionaries
Dictionaries: [HTML](ActiveRateGroup.html) [MD](ActiveRateGroup.md)
TBD
## 5. Module Checklists

View File

@ -45,6 +45,7 @@ namespace Svc {
//! routine for the base class.
//!
//! \param queueDepth the depth of the message queue for the component
//! \param instance: instance identifier. Default: 0.
void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance = 0);
//! \brief Set log file and max size
@ -54,6 +55,7 @@ namespace Svc {
//!
//! \param fileName The name of the file to create. Must be less than 80 characters.
//! \param maxSize The max size of the file
//! \param maxBackups The maximum backups of the log file. Default: 10
//!
//! \return true if creating the file was successful, false otherwise
bool set_log_file(const char* fileName, const U32 maxSize, const U32 maxBackups = 10);

View File

@ -37,6 +37,7 @@ namespace Svc {
//!
//! \param fileName The name of the file to create. Must be less than 80 characters.
//! \param maxSize The max size of the file
//! \param maxBackups The max backups for the file. Default: 10
//!
//! \return true if creating the file was successful, false otherwise
bool set_log_file(const char* fileName, const U32 maxSize, const U32 maxBackups = 10);

View File

@ -38,9 +38,6 @@ The `Svc::AssertFatalAdapter` component contains a private implementation of the
#### 3.3.1 FW_ASSERT calls
As described in the Functional Description section, the `Svc::ActiveRateGroup` component accepts calls to the CycleIn and invokes the RateGroupMemberOut ports:
![System Tick Port Call](img/RateGroupCall.jpg)
### 3.4 State
@ -50,26 +47,7 @@ As described in the Functional Description section, the `Svc::ActiveRateGroup` c
`Svc::AssertFatalAdapter` has no significant algorithms.
## 4. Dictionaries
Dictionaries: [HTML](AssertFatalAdapter.html) [MD](AssertFatalAdapter.md)
## 5. Module Checklists
Document | Link
-------- | ----
None yet
## 6. Unit Testing
The unit test results are as follows:
Log|Link
---|----
Test Output|[Link](../test/ut/output/test.txt)
Coverage Output|[Link](../test/ut/output/AssertFatalAdapterComponentImpl.cpp.gcov)
## 7. Change Log
## 4. Change Log
Date | Description
---- | -----------

View File

@ -116,8 +116,8 @@ namespace Svc {
//! Give the class a memory buffer. Should be called after constructor
//! and init, but before task is spawned.
void allocateQueue(
NATIVE_INT_TYPE identifier,
Fw::MemAllocator& allocator,
NATIVE_INT_TYPE identifier, //!< Identifier for queue allocation and saved for deallocation
Fw::MemAllocator& allocator, //!< Memory allocator used to allocate memory
NATIVE_UINT_TYPE maxNumBuffers //!< The maximum number of buffers
);

View File

@ -48,26 +48,23 @@ Name | Type | Role
Name | Type | Kind | Purpose
---- | ---- | ---- | ----
<a name="bufferSendIn">`bufferSendIn`</a> | [`Fw::BufferSend`](../../../Fw/Buffer/docs/sdd.html) | guarded input | Receives buffers for deallocation
<a name="bufferGetCallee">`bufferGetCallee`</a> | [`Fw::BufferGet`](../../../Fw/Buffer/docs/sdd.html) | guarded input (callee) | Receives requests for allocated buffers and returns the buffers
<a name="schedIn">`schedIn`</a> | [`Svc::Sched`](../../../Svc/Sched/docs/sdd.html) | sync input (callee) | writes telemetry values (optional, if the user doesn't need BufferManager telemetry)
`bufferSendIn` | [`Fw::BufferSend`](../../../Fw/Buffer/docs/sdd.html) | guarded input | Receives buffers for deallocation
`bufferGetCallee` | [`Fw::BufferGet`](../../../Fw/Buffer/docs/sdd.html) | guarded input (callee) | Receives requests for allocated buffers and returns the buffers
`schedIn` | [`Svc::Sched`](../../../Svc/Sched/docs/sdd.html) | sync input (callee) | writes telemetry values (optional, if the user doesn't need BufferManager telemetry)
### 3.4 Constants
`BufferManager` maintains the following constants:
* <a name="BUFFERMGR_MAX_NUM_BINS">*BUFFERMGR_MAX_NUM_BINS*</a>:
The maximum number of bins (i.e. buffers pool of different sizes)
* *BUFFERMGR_MAX_NUM_BINS*: The maximum number of bins (i.e. buffers pool of different sizes)
### 3.5 State
`BufferManager` maintains the following state:
* <a name="m_buffers">*m_buffers*</a>:
A set of buffers to allocate to users.
* *m_buffers*: A set of buffers to allocate to users.
* <a name="AllocatedBuffer::allocated">*AllocatedBuffer::allocated*</a>:
Indicates whether a particular buffer in the pool has been allocated to the user.
* *AllocatedBuffer::allocated*: Indicates whether a particular buffer in the pool has been allocated to the user.
### 3.6 Port Behavior

View File

@ -74,7 +74,7 @@ The `Svc::CmdDispatcher` component dispatches commands to other components:
## 4. Dictionary
Dictionaries: [HTML](CmdDispatcher.html) [MD](CmdDispatcher.md)
Dictionaries: [HTML](CmdDispatcher.html)
## 4. Module Checklists

View File

@ -18,7 +18,7 @@ Record Field | Size in Bytes | Description
Time Flag | 1 | Either 0x0 denoting absolute time or 0xFF denoting relative time
Time | 4 | The time in seconds
CMD Length | 2 | The size in bytes of the Command field
Command | &leq; 1017 | A serialized command in F Prime format, with a 16-bit opcode
Command | < 1017 | A serialized command in F Prime format, with a 16-bit opcode
## 2 Implementation

View File

@ -304,7 +304,7 @@ The `CmdSequencer` does not have any significant state machines.
### 3.5 Component Dictionary
Dictionaries: [HTML](CmdSequencer.html) [MD](CmdSequencer.md)
TBD
### 3.6 Component Sequences

View File

@ -1,5 +0,0 @@
<title>ComSplitter Component Dictionary</title>
# ComSplitter Component Dictionary

View File

@ -55,7 +55,7 @@ The `Svc::FatalHandler` handles FATAL notifications:
## 4. Dictionary
Dictionaries: [HTML](FatalHandler.html) [MD](FatalHandler.md)
TBD
## 4. Module Checklists

View File

@ -258,10 +258,10 @@ namespace Svc {
//! Configure FileDownlink component
//!
void configure(
U32 timeout, //! Timeout threshold (milliseconds) while in WAIT state
U32 cooldown, //! Cooldown (in ms) between finishing a downlink and starting the next file.
U32 cycleTime, //! Rate at which we are running
U32 fileQueueDepth //! Max number of items in file downlink queue
U32 timeout, //!< Timeout threshold (milliseconds) while in WAIT state
U32 cooldown, //!< Cooldown (in ms) between finishing a downlink and starting the next file.
U32 cycleTime, //!< Rate at which we are running
U32 fileQueueDepth //!< Max number of items in file downlink queue
);
//! Start FileDownlink component

View File

@ -19,7 +19,7 @@ TBD
## 4. Dictionaries
Dictionaries: [HTML](FileManager.html) [MD](FileManager.md)
TBD
## 5. Module Checklists

View File

@ -165,7 +165,7 @@ Upon receipt of a cancel packet *P*, `FileUplink` does the following:
## 4 Dictionary
Dictionaries: [HTML](FileUplink.html) [MD](FileUplink.md)
TBD
## 5 Checklists

View File

@ -75,7 +75,7 @@ The `Svc::Health` component pings other components and checks for their response
## 4. Dictionaries
Dictionaries: [HTML](Health.html) [MD](Health.md)
TBD
## 5. Module Checklists

View File

@ -90,7 +90,7 @@ Unit Test Checklist | [Link](Checklist_Unit_Test.xlsx)
## 5. Dictionary
Dictionaries: [HTML](PrmDb.html) [MD](PrmDb.md)
TBD
## 6. Unit Testing

View File

@ -73,7 +73,7 @@ A configuration value in `TlmChanImplCfg.h` defines a set of hash buckets to sto
## 4. Dictionaries
Dictionaries: [HTML](TlmChan.html) [MD](TlmChan.md)
TBD
## 5. Module Checklists

View File

@ -44,11 +44,13 @@ namespace Utils {
// ----------------------------------------------------------------------
//! Create a hash value all at once from raw data
//!
//! \param data: pointer to start of data
//! \param len: length of the data
//! \param buffer: filled with resulting hash value
static void hash(
const void *data, //! Pointer to start of data
const NATIVE_INT_TYPE len, //! Length of the data
HashBuffer& buffer //! Resulting hash value
const void *data,
const NATIVE_INT_TYPE len,
HashBuffer& buffer
);
public:
@ -68,10 +70,11 @@ namespace Utils {
);
//! Update an incremental computation with new data
//!
//! \param data: pointer to start of data to add to hash calculation
//! \param len: length of data to add to hash calculation
void update(
const void *const data, //! Pointer to start of data
const NATIVE_INT_TYPE len //! Length of the data
const void *const data,
const NATIVE_INT_TYPE len
);
//! Finalize an incremental computation and return the result

View File

@ -36,57 +36,69 @@ class CircularBuffer {
*
* Note: ownership of the supplied buffer is held until the circular buffer is destructed.
*
* \param const U8* buffer: supplied buffer used as a data store.
* \param NATIVE_UINT_TYPE size: size of the supplied data store.
* \param buffer: supplied buffer used as a data store.
* \param size: size of the supplied data store.
*/
CircularBuffer(U8* const buffer, const NATIVE_UINT_TYPE size);
/**
* Serialize a given buffer into this this circular buffer. Will not accept more data then
* space available. This means it will not overwrite existing data.
* \param const U8* buffer: supplied buffer to be serialized.
* \param NATIVE_UINT_TYPE size: size of the supplied buffer.
* \param buffer: supplied buffer to be serialized.
* \param size: size of the supplied buffer.
* \return Fw::FW_SERIALIZE_OK on success or something else on error
*/
Fw::SerializeStatus serialize(const U8* const buffer, const NATIVE_UINT_TYPE size);
/**
* Deserialize data into the given variable without moving the head pointer
* \param U8& value: value to fill
* \param value: value to fill
* \param offset: offset from head to start peak. Default: 0
* \return Fw::FW_SERIALIZE_OK on success or something else on error
*/
Fw::SerializeStatus peek(char& value, NATIVE_UINT_TYPE offset = 0);
/**
* Deserialize data into the given variable without moving the head pointer
* \param U8& value: value to fill
* \param value: value to fill
* \param offset: offset from head to start peak. Default: 0
* \return Fw::FW_SERIALIZE_OK on success or something else on error
*/
Fw::SerializeStatus peek(U8& value, NATIVE_UINT_TYPE offset = 0);
/**
* Deserialize data into the given variable without moving the head pointer
* \param U32& value: value to fill
* \param value: value to fill
* \param offset: offset from head to start peak. Default: 0
* \return Fw::FW_SERIALIZE_OK on success or something else on error
*/
Fw::SerializeStatus peek(U32& value, NATIVE_UINT_TYPE offset = 0);
/**
* Deserialize data into the given buffer without moving the head variable.
* \param U32& value: value to fill
* \param buffer: buffer to fill with data of the peek
* \param size: size in bytes to peek at
* \param offset: offset from head to start peak. Default: 0
* \return Fw::FW_SERIALIZE_OK on success or something else on error
*/
Fw::SerializeStatus peek(U8* buffer, NATIVE_UINT_TYPE size, NATIVE_UINT_TYPE offset = 0);
/**
* Rotate the head pointer effectively erasing data from the circular buffer and making
* space. Cannot rotate more than the available space.
* \param NATIVE_UINT_TYPE amount: amount to rotate by (in bytes)
* \param amount: amount to rotate by (in bytes)
* \return Fw::FW_SERIALIZE_OK on success or something else on error
*/
Fw::SerializeStatus rotate(NATIVE_UINT_TYPE amount);
/**
* Get the remaining size in this circular buffer.
* \param bool serialization: is this serialization (opposed to deserialization)
* \param serialization: is this serialization (opposed to deserialization)
* \return remaining size for serialization/deserialization
*/
NATIVE_UINT_TYPE get_remaining_size(bool serialization = false);
/**
* Get the max size of buffer, not remaining.
* \return
* \return capacity total of the buffer
*/
NATIVE_UINT_TYPE get_capacity();
@ -96,8 +108,8 @@ class CircularBuffer {
private:
/**
* Returns a wrap-incremented pointer.
* \param const U8* pointer: pointer to increment and wrap.
* \param NATIVE_UINT_TYPE amount: amount to increment
* \param pointer: pointer to increment and wrap.
* \param amount: amount to increment
* \return: new pointer value
*/
U8* increment(U8* const pointer, NATIVE_UINT_TYPE amount = 1);

View File

@ -158,7 +158,7 @@
// Turn asserts on or off
#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_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
#ifndef FW_ASSERT_LEVEL

View File

@ -2161,7 +2161,7 @@ ENABLE_PREPROCESSING = YES
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
MACRO_EXPANSION = NO
MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and
@ -2169,7 +2169,7 @@ MACRO_EXPANSION = NO
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_ONLY_PREDEF = NO
EXPAND_ONLY_PREDEF = YES
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
# INCLUDE_PATH will be searched if a #include is found.
@ -2201,7 +2201,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED =
PREDEFINED = "PROTECTED:=protected" "PRIVATE:=private"
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The

View File

@ -11,7 +11,9 @@ DOXY_OUTPUT="${FPRIME}/docs/UsersGuide/api/c++"
CMAKE_OUTPUT="${FPRIME}/docs/UsersGuide/api/cmake"
PY_OUTPUT="${FPRIME}/docs/UsersGuide/api/python"
DOXYGEN="${1:-$(which doxygen)}"
VERSIONED_OUTPUT="${1:-}"
DOXYGEN="${2:-$(which doxygen)}"
if [ ! -x "${DOXYGEN}" ]
then
echo "[ERROR] Could not find doxygen, please supply it as first argument"
@ -41,20 +43,37 @@ function clobber
echo "[ERROR] Cannot clobber ${DIRECTORY} as it is not a child of ${APIDOCS}"
exit 233
fi
read -p "[ENTER] Clobbering ${DIRECTORY}. CTRL-C to abort." tmp
rm -r "${DIRECTORY}"
}
function make_version
{
VERSION="${1}"
if [[ "$VERSION" != "" ]]
then
mkdir "${FPRIME}/docs/${VERSION}"
cp "${FPRIME}/docs/latest.md" "${FPRIME}/docs/${VERSION}/index.md"
cp -r "${FPRIME}/docs/INSTALL.md" "${FPRIME}/docs/Tutorials" "${FPRIME}/docs/UsersGuide" "${FPRIME}/docs/${VERSION}"
REPLACE='| ['$VERSION' Documentation](https:\/\/nasa.github.io\/fprime\/'$VERSION') |\n'
else
echo "No version specified, updating local only"
fi
sed -i 's/\(| \[Latest Documentation\](.\/latest.md)\)[^|]*|/'"$REPLACE"'\1 '"As of: $(date)"' |/' "${FPRIME}/docs/index.md"
}
# Doxygen generation
(
cd "${FPRIME}"
clobber "${DOXY_OUTPUT}"
echo "[INFO] Building fprime"
(
mkdir -p "${FPRIME}/build-fprime-automatic-docs"
cd "${FPRIME}/build-fprime-automatic-docs"
cmake "${FPRIME}" -DCMAKE_BUILD_TYPE=Release
cmake "${FPRIME}" -DCMAKE_BUILD_TYPE=Release 1>/dev/null
)
fprime-util build "docs" --all -j32
fprime-util build "docs" --all -j32 1> /dev/null
if (( $? != 0 ))
then
echo "[ERROR] Failed to build fprime please generate build cache"
@ -75,3 +94,6 @@ function clobber
# Fix for github pages
github_page_adjustment "${DOXY_OUTPUT}/html"
make_version "${VERSIONED_OUTPUT}"

View File

@ -1,7 +1,7 @@
\mainpage
This is the F´ automatically generated documentation. The below guides represent the software
description documentation for the F´ components. Included in the Namespace and Classes sections
description documentation (SDD) for the F´ components. Included in the Namespace and Classes sections
is the documentation of the C++ code.
@ -13,7 +13,7 @@ are built. Finally, of specific interest is Fw::Types providing the cored types
\subpage FwBufferSerializableBufferGetBufferSend
\subpage FwCmdFwCmdResponseCmdReg
\subpage FwCmdFwCmdResponseFwCmdReg
\subpage FwComPort

View File

@ -16,25 +16,21 @@ F´ has the following features:
- A standard library of flight-worthy components
- Testing tools for unit and system-level testing
| F´ Resources | |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------- |
| Features | [Features](./features.md) |
| Projects | [Projects](./projects.md) |
| Installation | [INSTALL.md](./INSTALL.md) |
| Tutorials | [Tutorials](./Tutorials/README.md) |
| User Guide | [User Guide](./UsersGuide/guide.md) |
| Repository | [https://github.com/nasa/fprime](https://github.com/nasa/fprime) |
| Community Forum and Mailing List | [https://groups.google.com/d/forum/fprime-community](https://groups.google.com/d/forum/fprime-community) |
| Community GitHub Organization | [https://github.com/fprime-community](https://github.com/fprime-community) |
| Standard Reference Application | [Ref](https://github.com/nasa/fprime/blob/master/Ref/README.md) |
| Raspberry PI Reference Application | [RPI](https://github.com/nasa/fprime/blob/master/RPI/README.md) |
| Architecture Overview | [Architecture](./Architecture/FPrimeArchitectureShort.pdf) |
| F´ Information and External Resources | |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| Features | [Features](./features.md) |
| Projects | [Projects](./projects.md) |
| Repository | [https://github.com/nasa/fprime](https://github.com/nasa/fprime) |
| Community Forum and Mailing List | [https://groups.google.com/d/forum/fprime-community](https://groups.google.com/d/forum/fprime-community) |
| Community GitHub Organization | [https://github.com/fprime-community](https://github.com/fprime-community) |
| Architecture Overview | [Architecture](./Architecture/FPrimeArchitectureShort.pdf) |
## Documentation of Previous F´ Releases
## F´ Documentation
| F´ Release |
|-------------------------------------|
| [v1.5 Series Documentation](./v1.5) |
| [v1.5 Series Documentation](https://nasa.github.io/fprime/v1.5) |
| [Latest Documentation](./latest.md) |
## F´ System Requirements

12
docs/latest.md Normal file
View File

@ -0,0 +1,12 @@
---
title: "F´ Latest Documentation"
layout: default
---
This is the documentation for the latest F´ framework. It is kept consistent with the `devel` branch.
| F´ Resources | |
|---|---|
| Installation | [INSTALL.md](./INSTALL.md) |
| Tutorials | [Tutorials](./Tutorials/README.md) |
| User Guide | [User Guide](./UsersGuide/guide.md) |