Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
cac874e
Revise GenericHub model
bocchino Sep 17, 2025
69f9546
Revise GenericHub model
bocchino Sep 17, 2025
3656aed
Revise GenericHub model
bocchino Sep 17, 2025
4c0d92e
Merge branch 'issue-4156-generic-hub' of github.com:bocchino/fprime i…
bocchino Sep 17, 2025
fad7adc
Update spelling
bocchino Sep 17, 2025
5db9b4f
Revise annotations
bocchino Sep 17, 2025
36202fb
Merge branch 'devel' into issue-4156-generic-hub
bocchino Sep 17, 2025
ea01321
Revise annotations for GenericHub model
bocchino Sep 17, 2025
d3e0a69
Revise annotations in GenericHub model
bocchino Sep 17, 2025
daf2045
Merge branch 'devel' into issue-4156-generic-hub
bocchino Sep 30, 2025
ea53159
Revise GenericHub model
bocchino Oct 2, 2025
f4f2eac
Revise GenericHub model
bocchino Oct 2, 2025
b6c5b90
Revise GenericHub model
bocchino Oct 2, 2025
7d528f6
Revise GenericHub
bocchino Oct 2, 2025
cdf3ff5
Revise GenericHub
bocchino Oct 2, 2025
efbd48c
Revise GenericHub model
bocchino Oct 2, 2025
7f2a9b4
Revise GenericHub model
bocchino Oct 2, 2025
7ba443d
Revise GenericHub config
bocchino Oct 2, 2025
6dd6b70
Revise GenericHub model
bocchino Oct 2, 2025
bb024f8
Revise GenericHub model
bocchino Oct 2, 2025
7ca1991
Clean up naming in GenericHub implementation
bocchino Oct 2, 2025
1d13d84
Revise GenericHub port names
bocchino Oct 2, 2025
7c5ef61
Revise annotations in GenericHub model
bocchino Oct 2, 2025
e299c4f
Revise annotations in GenericHub model
bocchino Oct 2, 2025
aca0e95
Revise annotations in GenericHub model
bocchino Oct 2, 2025
cf70e9f
Add ByteStreamDriverClient
bocchino Oct 2, 2025
86ca5b4
Revise ByteStreamDriverClient
bocchino Oct 2, 2025
212a2f6
Revise ByteStreamDriverClient
bocchino Oct 2, 2025
baea456
Revise driver interfaces
bocchino Oct 2, 2025
dcfd4f4
Add PassiveByteStreamDriverClientSendAsync interface
bocchino Oct 2, 2025
97ad468
Add PassiveAsyncByteStreamDriverClient interface
bocchino Oct 2, 2025
922daaf
Add PassiveBufferDriver
bocchino Oct 2, 2025
bf6ae4f
Revise PassiveByteStreamDriverClient interfaces
bocchino Oct 2, 2025
210413f
Revise PassiveBufferDriver
bocchino Oct 2, 2025
e6ab505
Revise Drv interfaces
bocchino Oct 2, 2025
57e0471
Revise PassiveBufferDriver
bocchino Oct 2, 2025
09630a9
Add PassiveBufferDriverClient
bocchino Oct 2, 2025
362c730
Revise GenericHub model
bocchino Oct 2, 2025
c933cb9
Revise annotations in GenericHub model
bocchino Oct 2, 2025
3c7b9f2
Revise FPP models
bocchino Oct 2, 2025
c587416
Add ByteStreamBufferAdapter
bocchino Oct 3, 2025
bc3de16
Revise ByteStreamBufferAdapter model
bocchino Oct 3, 2025
f49f5c0
Revise ByteStreamBufferAdapter
bocchino Oct 3, 2025
30d2d67
Revise ByteStreamBufferAdapter
bocchino Oct 3, 2025
08b161a
Add AsyncByteStreamBufferAdapter
bocchino Oct 3, 2025
c0caf5f
Revise AsyncByteStreamBufferAdapter
bocchino Oct 3, 2025
b8afe4a
Revsie AsyncByteStreamBufferAdapter
bocchino Oct 3, 2025
7a41f95
Revise AsyncByteStreamBufferAdapter
bocchino Oct 3, 2025
27a270f
Revise annotations in FPP model
bocchino Oct 3, 2025
2ffc514
Revise ByteStreamBufferAdapter
bocchino Oct 3, 2025
26d8769
Merge branch 'devel' into issue-4156-generic-hub
bocchino Oct 6, 2025
18c13a2
Bump fpp version
bocchino Oct 6, 2025
f6016cc
Revise GenericHub model
bocchino Oct 7, 2025
a248b07
Revise GenericHub interface
bocchino Oct 7, 2025
2d6b97d
Revise GenericHub interface
bocchino Oct 7, 2025
7314b28
Merge branch 'devel' into issue-4156-generic-hub
bocchino Oct 7, 2025
4c8c8ee
Fix typo in FPP annotations
bocchino Oct 7, 2025
573762d
Merge branch 'devel' into issue-4156-generic-hub
bocchino Oct 10, 2025
59651e1
Merge branch 'devel' into issue-4156-generic-hub
bocchino Oct 16, 2025
2f039c3
Revise Generic Hub model
bocchino Oct 17, 2025
ed36d0a
Merge branch 'devel' into issue-4156-generic-hub
bocchino Oct 17, 2025
8002b83
Reference #4247: Minor changes to Generic Hub implementation and unit…
mshahabn Nov 13, 2025
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
3 changes: 2 additions & 1 deletion .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ arduino
ARef
argcomplete
ARGN
binaryfile
ARINC
arpa
ASize
Expand All @@ -36,13 +35,15 @@ bfree
BHn
bibtex
Bies
binaryfile
BINDIR
bitmaps
bitshifts
bitwidth
bocchino
boolt
bsd
BSDI
bst
BUFFERALLOCATE
BUFFERALLOCATIONFAILED
Expand Down
52 changes: 52 additions & 0 deletions Drv/AsyncByteStreamBufferAdapter/AsyncByteStreamBufferAdapter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// ======================================================================
// \title AsyncByteStreamBufferAdapter.cpp
// \author bocchino
// \brief cpp file for AsyncByteStreamBufferAdapter component implementation class
// ======================================================================

#include "Drv/AsyncByteStreamBufferAdapter/AsyncByteStreamBufferAdapter.hpp"

namespace Drv {

// ----------------------------------------------------------------------
// Component construction and destruction
// ----------------------------------------------------------------------

AsyncByteStreamBufferAdapter::AsyncByteStreamBufferAdapter(const char* const compName)
: AsyncByteStreamBufferAdapterComponentBase(compName) {}

AsyncByteStreamBufferAdapter::~AsyncByteStreamBufferAdapter() {}

// ----------------------------------------------------------------------
// Handler implementations for typed input ports
// ----------------------------------------------------------------------

void AsyncByteStreamBufferAdapter::bufferIn_handler(FwIndexType portNum, Fw::Buffer& fwBuffer) {
// TODO: If m_driverIsReady then send fwBuffer on toByteStreamDriver_out
// TODO: Otherwise
// TODO: Log the error
// TODO: Send fwBuffer on bufferInReturn_out
}

void AsyncByteStreamBufferAdapter::bufferOutReturn_handler(FwIndexType portNum, Fw::Buffer& fwBuffer) {
// TODO: Send fwBuffer on fromByteStreamDriverReturn_out
}

void AsyncByteStreamBufferAdapter::byteStreamDriverReady_handler(FwIndexType portNum) {
this->m_driverIsReady = true;
}

void AsyncByteStreamBufferAdapter::fromByteStreamDriver_handler(FwIndexType portNum,
Fw::Buffer& buffer,
const Drv::ByteStreamStatus& status) {
// TODO: If the status is OK, then send buffer on toByteStreamDriver_out
// TODO: Otherwise log the error and send buffer on fromByteStreamDriverReturn_out
}

void AsyncByteStreamBufferAdapter::toByteStreamDriverReturn_handler(FwIndexType portNum,
Fw::Buffer& buffer,
const Drv::ByteStreamStatus& status) {
// TODO: Send fwBuffer on bufferInReturn_out
}

} // namespace Drv
33 changes: 33 additions & 0 deletions Drv/AsyncByteStreamBufferAdapter/AsyncByteStreamBufferAdapter.fpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module Drv {

@ A passive component for mediating between the AsyncByteStreamDriver
@ interface and the PassiveBufferDriver interface
@
@ Sample topology:
@
@ -----------------------------------------------------------
@ | |
@ | AsyncByteStreamDriver <--> AsyncByteStreamBufferAdapter | <--> PassiveBufferDriverClient
@ | |
@ -----------------------------------------------------------
@
@ The two components in the box function together as a PassiveBufferDriver:
@
@ -------------------------------------------------
@ | |
@ | PassiveBufferDriver | <--> PassiveBufferDriverClient
@ | |
@ -------------------------------------------------
@
passive component AsyncByteStreamBufferAdapter {

@ AsyncByteStreamBufferAdapter is a passive client of the
@ AsyncByteStreamDriver interface
import PassiveAsyncByteStreamDriverClient

@ AsyncByteStreamBufferAdapter is a PassiveBufferDriver
import PassiveBufferDriver

}

}
80 changes: 80 additions & 0 deletions Drv/AsyncByteStreamBufferAdapter/AsyncByteStreamBufferAdapter.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// ======================================================================
// \title AsyncByteStreamBufferAdapter.hpp
// \author bocchino
// \brief hpp file for AsyncByteStreamBufferAdapter component implementation class
// ======================================================================

#ifndef Drv_AsyncByteStreamBufferAdapter_HPP
#define Drv_AsyncByteStreamBufferAdapter_HPP

#include "Drv/AsyncByteStreamBufferAdapter/AsyncByteStreamBufferAdapterComponentAc.hpp"

namespace Drv {

class AsyncByteStreamBufferAdapter final : public AsyncByteStreamBufferAdapterComponentBase {
public:
// ----------------------------------------------------------------------
// Component construction and destruction
// ----------------------------------------------------------------------

//! Construct AsyncByteStreamBufferAdapter object
AsyncByteStreamBufferAdapter(const char* const compName //!< The component name
);

//! Destroy AsyncByteStreamBufferAdapter object
~AsyncByteStreamBufferAdapter();

private:
// ----------------------------------------------------------------------
// Handler implementations for typed input ports
// ----------------------------------------------------------------------

//! Handler implementation for bufferIn
//!
//! Port for receiving buffers
void bufferIn_handler(FwIndexType portNum, //!< The port number
Fw::Buffer& fwBuffer //!< The buffer
) override;

//! Handler implementation for bufferOutReturn
//!
//! Port for receiving buffers sent on bufferOut and then returned
void bufferOutReturn_handler(FwIndexType portNum, //!< The port number
Fw::Buffer& fwBuffer //!< The buffer
) override;

//! Handler implementation for byteStreamDriver
//!
//! Port for receiving ready signals from the driver
//! Sample connection: byteStreamDriver.ready -> byteStreamDriverClient.byteStreamReady
void byteStreamDriverReady_handler(FwIndexType portNum //!< The port number
) override;

//! Handler implementation for fromByteStreamDriver
//!
//! Port for receiving data from the driver
//! Sample connection: byteStreamDriver.$recv -> byteStreamDriverClient.fromDriver
void fromByteStreamDriver_handler(FwIndexType portNum, //!< The port number
Fw::Buffer& buffer,
const Drv::ByteStreamStatus& status) override;

//! Handler implementation for toByteStreamDriverReturn
//!
//! Port for receiving buffers sent on toByteStreamDriver and then returned
//! Sample connection: driver.sendReturnOut -> client.toByteStreamDriverReturn
void toByteStreamDriverReturn_handler(FwIndexType portNum, //!< The port number
Fw::Buffer& buffer,
const Drv::ByteStreamStatus& status) override;

private:
// ----------------------------------------------------------------------
// Private member variables
// ----------------------------------------------------------------------

//! Whether the driver is ready
bool m_driverIsReady = false;
};

} // namespace Drv

#endif
10 changes: 10 additions & 0 deletions Drv/AsyncByteStreamBufferAdapter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/AsyncByteStreamBufferAdapter.fpp"
"${CMAKE_CURRENT_LIST_DIR}/AsyncByteStreamBufferAdapter.cpp"
)

set(MOD_DEPS
"Fw/Logger"
)

register_fprime_module()
47 changes: 47 additions & 0 deletions Drv/ByteStreamBufferAdapter/ByteStreamBufferAdapter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// ======================================================================
// \title ByteStreamBufferAdapter.cpp
// \author bocchino
// \brief cpp file for ByteStreamBufferAdapter component implementation class
// ======================================================================

#include "Drv/ByteStreamBufferAdapter/ByteStreamBufferAdapter.hpp"

namespace Drv {

// ----------------------------------------------------------------------
// Component construction and destruction
// ----------------------------------------------------------------------

ByteStreamBufferAdapter::ByteStreamBufferAdapter(const char* const compName)
: ByteStreamBufferAdapterComponentBase(compName) {}

ByteStreamBufferAdapter::~ByteStreamBufferAdapter() {}

// ----------------------------------------------------------------------
// Handler implementations for typed input ports
// ----------------------------------------------------------------------

void ByteStreamBufferAdapter::bufferIn_handler(FwIndexType portNum, Fw::Buffer& fwBuffer) {
// TODO: If m_driverIsReady then
// TODO: Send fwBuffer on toByteStreamDriver_out
// TODO: Check the return status. If there is an error, then log it to the Logger.
// TODO: Otherwise log the error
// TODO: Send fwBuffer on bufferInReturn_out
}

void ByteStreamBufferAdapter::bufferOutReturn_handler(FwIndexType portNum, Fw::Buffer& fwBuffer) {
// TODO: Send fwBuffer on fromByteStreamDriverReturn_out
}

void ByteStreamBufferAdapter::fromByteStreamDriver_handler(FwIndexType portNum,
Fw::Buffer& buffer,
const Drv::ByteStreamStatus& status) {
// TODO: If the status is OK, then send buffer on toByteStreamDriver_out
// TODO: Otherwise log the error and send buffer on fromByteStreamDriverReturn_out
}

void ByteStreamBufferAdapter::byteStreamDriverReady_handler(FwIndexType portNum) {
this->m_driverIsReady = true;
}

} // namespace Drv
33 changes: 33 additions & 0 deletions Drv/ByteStreamBufferAdapter/ByteStreamBufferAdapter.fpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module Drv {

@ A passive component for mediating between the ByteStreamDriver
@ interface and the PassiveBufferDriver interface
@
@ Sample topology:
@
@ -------------------------------------------------
@ | |
@ | ByteStreamDriver <--> ByteStreamBufferAdapter | <--> PassiveBufferDriverClient
@ | |
@ -------------------------------------------------
@
@ The two components in the box function together as a PassiveBufferDriver:
@
@ -------------------------------------------------
@ | |
@ | PassiveBufferDriver | <--> PassiveBufferDriverClient
@ | |
@ -------------------------------------------------
@
passive component ByteStreamBufferAdapter {

@ ByteStreamBufferAdapter is a passive client of the ByteStreamDriver
@ interface
import PassiveByteStreamDriverClient

@ ByteStreamBufferAdapter is a PassiveBufferDriver
import PassiveBufferDriver

}

}
72 changes: 72 additions & 0 deletions Drv/ByteStreamBufferAdapter/ByteStreamBufferAdapter.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// ======================================================================
// \title ByteStreamBufferAdapter.hpp
// \author bocchino
// \brief hpp file for ByteStreamBufferAdapter component implementation class
// ======================================================================

#ifndef Drv_ByteStreamBufferAdapter_HPP
#define Drv_ByteStreamBufferAdapter_HPP

#include "Drv/ByteStreamBufferAdapter/ByteStreamBufferAdapterComponentAc.hpp"

namespace Drv {

class ByteStreamBufferAdapter final : public ByteStreamBufferAdapterComponentBase {
public:
// ----------------------------------------------------------------------
// Component construction and destruction
// ----------------------------------------------------------------------

//! Construct ByteStreamBufferAdapter object
ByteStreamBufferAdapter(const char* const compName //!< The component name
);

//! Destroy ByteStreamBufferAdapter object
~ByteStreamBufferAdapter();

private:
// ----------------------------------------------------------------------
// Handler implementations for typed input ports
// ----------------------------------------------------------------------

//! Handler implementation for bufferIn
//!
//! Port for receiving buffers
void bufferIn_handler(FwIndexType portNum, //!< The port number
Fw::Buffer& fwBuffer //!< The buffer
) override;

//! Handler implementation for bufferOutReturn
//!
//! Port for receiving buffers sent on bufferOut and then returned
void bufferOutReturn_handler(FwIndexType portNum, //!< The port number
Fw::Buffer& fwBuffer //!< The buffer
) override;

//! Handler implementation for byteStreamIn
//!
//! Port for receiving data from the driver
//! Sample connection: byteStreamDriver.$recv -> byteStreamDriverClient.byteStreamIn
void fromByteStreamDriver_handler(FwIndexType portNum, //!< The port number
Fw::Buffer& buffer,
const Drv::ByteStreamStatus& status) override;

//! Handler implementation for byteStreamReady
//!
//! Port for receiving ready signals from the driver
//! Sample connection: byteStreamDriver.ready -> byteStreamDriverClient.byteStreamDriverReady
void byteStreamDriverReady_handler(FwIndexType portNum //!< The port number
) override;

private:
// ----------------------------------------------------------------------
// Private member variables
// ----------------------------------------------------------------------

//! Whether the driver is ready
bool m_driverIsReady = false;
};

} // namespace Drv

#endif
10 changes: 10 additions & 0 deletions Drv/ByteStreamBufferAdapter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/ByteStreamBufferAdapter.fpp"
"${CMAKE_CURRENT_LIST_DIR}/ByteStreamBufferAdapter.cpp"
)

set(MOD_DEPS
"Fw/Logger"
)

register_fprime_module()
6 changes: 4 additions & 2 deletions Drv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Interfaces/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Ports/")

# Components
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/AsyncByteStreamBufferAdapter/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ByteStreamBufferAdapter/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ByteStreamDriverModel/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriver/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxUartDriver/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriver/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxI2cDriver/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriver/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxUartDriver/")

add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Ip/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/TcpClient/")
Expand Down
5 changes: 5 additions & 0 deletions Drv/Interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ register_fprime_module(
"${CMAKE_CURRENT_LIST_DIR}/ByteStreamDriver.fpp"
"${CMAKE_CURRENT_LIST_DIR}/Gpio.fpp"
"${CMAKE_CURRENT_LIST_DIR}/I2c.fpp"
"${CMAKE_CURRENT_LIST_DIR}/PassiveAsyncByteStreamDriverClient.fpp"
"${CMAKE_CURRENT_LIST_DIR}/PassiveBufferDriver.fpp"
"${CMAKE_CURRENT_LIST_DIR}/PassiveBufferDriverClient.fpp"
"${CMAKE_CURRENT_LIST_DIR}/PassiveByteStreamDriverClient.fpp"
"${CMAKE_CURRENT_LIST_DIR}/PassiveByteStreamDriverClientReadyRecv.fpp"
"${CMAKE_CURRENT_LIST_DIR}/Spi.fpp"
"${CMAKE_CURRENT_LIST_DIR}/Tick.fpp"
INTERFACE
Expand Down
Loading
Loading