19 Commits

Author SHA1 Message Date
Thomas Boyer-Chammard
c3b2e04880
Use data return pattern on Uplink and standardize port names (#3546)
* First pass at Svc + TcpClient implementation

* Revert FileUplink changes

* Add copy (with allocation/deallocation) to FprimeRouter to simplify buffer management

* Update FprimeRouter UTs

* Update FprimeDeframer UTs

* Update FrameAccumulator UTs

* Update ComStub UTs

* Update missing Drv and UTs

* Update ComInterface to use ComDataWithContext on output

* Update Ref/RPI topology

* Fix spelling

* Fix test typo

* Update Udp component and UTs

* Rename data ports and standardize "Return" naming pattern

* Fix variable name

* Adapt UTs

* Update Communication Adapter Interface docs

* Full SDD updates

* Spelling &  nits and details

* Put formatting back to original

* Update Deframer interface to include bufferReturn

* Address review comments
2025-05-08 10:54:54 -07:00
Thomas Boyer-Chammard
d0246f148b
Add Framer FPP interface, implement FprimeFramer and adapt ComQueue (#3486)
* Initial FprimeFramer and FprimePacketizer

* Code clarity + set up UTs

* Rework ComQueue and ComStub to use DataWithContext

* Add packets to RefPackets.fppi

* Fix ComQueue tests

* Add hotfix to FileDownlink instead of ComQueue

* Fix cancelPacket as well

* Fix ComQueue UTs by removing hotfix

* Refactor DataWithContext to use an FPP object for context instead of Fw.Buffer

* Touch up testing

* Add docs

* more docs

* More docs

* Rework buffer deallocation pattern to pass-through ComQueue

* Update ComStub UTs

* Restore original FileDownlink.cpp

* Formatting tweak

* Update deprecated getSerializeRepr() calls

* deserialization methods

* Fix spelling

* add cast for safety

* CMakefile change

* Bump ComQueue depth

* Update RPI deployment with new Downlink stack

* Rename comQueueIn port to comPktQueueIn

* Fix comQueueIn to comPktQueueIn change

* Remove legacy Svc.Framer

* Fix CMake UTs

* Fix RPI topology config

* Fix FprimeProtocol.fpp module

* Fix namespacing

* Use const reference for FrameContext port

* Review comments EXCEPT port passback refactor

* Rework ComStub with new ByteStream

* New ByteStream - ComInterface model

* Rework TcpClient / TcpServer with new bytestream

* Adapt UDP component for new ByteStream

* Adapt FrameAccumulator for new ByteStream

* Adapt FprimeFramer for new ByteStream

* Update Ref topology with new ByteStream model

* Remove all legacy deallocates from Drivers; reintroduce DEPRECATED model types

* Fix spelling and include error

* More spelling....

* RPI and RpiDemo fixes

* Fix conversion warning on RPI

* static_cast for short int on RPI

* Standardize port names

* Remove legacy Drv types and merge RECV/SEND enum type, delete StreamCrossover

* Update SDDs

* Update SDDs

* Fix ComInterface <-> Framer interfaction, clarify comments and fix annotations

* Switch ComStub from ASSERT to log failure and return buffer

* Add history size check + clarify test handler overrides

* Fix RPI topology to wire comStub on Uplink

* Rename comm to comDriver in RPI topology

* Update communication adapter interface docs
2025-04-29 16:40:36 -07:00
Justine West
e13d0303b1
Add final to component impl classes (#3292) 2025-02-28 15:05:15 -08:00
M Starch
a5c853b9cf
NATIVE_INT_TYPE portNum to FwIndexType portNum (#3236) 2025-02-14 12:25:12 -08:00
M Starch
e9ea56d41a
UDP does not bind on send only port. Fixes: #3127 (#3143)
* UDP does not bind on send only port. Fixes: #3127

* Refining autoconnection behavior. Fixes: #3144

* Simplifying read loop

* I should probably at least build before pushing...

* sp

* Adding UTs to catch UDP send only

* Adding auto-connect disabled UTs

* Disabling UDP configure, reconnect -> private, and SDD fixes

* Renaming reconnect to reopen

* Fixing deployment examples

* Add links to SDD

* sp
2025-01-28 09:12:22 -08:00
M Starch
00c5c8e11d
Fixes comments in TcpServer. Fixes: #3029 (#3031) 2024-11-18 10:34:42 -08:00
bdshenker
0acc49ca0c
#2074 Parameterize buffer size in UDP and TCP Server. (#2998)
* #2074 Parameterize buffer size in UDP and TCP Server.

* Fixing m_allocate pssing

* Fixing cast

---------

Co-authored-by: bdshenker <boris.shenker@jpl.nasa.gov>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2024-11-06 09:39:34 -08:00
M Starch
9ed68fdd06
Correcting shutdown/close usage; refactoring TcpServer (#2950)
* Correcting shutdown/close usage; refactoring TcpServer

* Fixing Tcp

* Review and CI fixes

* ...and the other half of the fixes
2024-10-16 09:36:34 -07:00
Celeste
e0c5a892b3
Add Open Port Request on Sending Side of IpSocket (#2683)
* remove thread specific behavior from the library level of IpSocket. Moved behavior to the component level by placing thread protection behavior to SocketReadTask, now called SocketComponentHelper. Calls to socket functionality from TcpClient/TcpServer/Udp will go through SocketComponentHelper rather than directly to the library. This also implemented the original desired functionality of reopening a client socket on a send call rather than only in receive

* merge new logger name

* update unit tests for new structuring and update smake to allow unit tests whos name includes more than the module name

* updates and fixes for TcpClient's unit tests

* fix/work around for an interesting issue where the TcpClient receive buffer equality check would fail because the size of the original buffer (owned by the unit test) gets set to 0, sometimes. Maybe 1/10 runs. I changed it to save the size of that buffer before it does the send and use that saved value in the equality check

* fix tcp server and tcp client unit tests (hopefully)

* update UDP uts

* fix startup function change

* fix reference argument and mutex locking to take care of issues uncovered in integration testing

* updating docs

* updates to remove dead code and comments

---------

Co-authored-by: crsmith <celeste.r.smith@jpl.nasa.gov>
2024-09-25 10:23:56 -07:00
M Starch
e55ebca49b
Fixing port selection in TCP UTs (#2739)
* Fixing port selection in TCP UTs

* Fixing CI issues, UDP on port 0 test, and spelling

* Unused variable

* Fixing UDP port collisions; 2sp -> 1sp

* Fixing port search initial conditions
2024-05-22 19:13:03 -07:00
M Starch
5e0b388268
Added startup, shutdown methods to IpSocket and added startup as a re… (#2261)
* Added startup, shutdown methods to IpSocket and added startup as a retry step

* Review fixes I

* Fixing static analysis checks

* Fixing spelling
2023-10-24 14:14:37 -07:00
M Starch
a56426adbb
Converting ByteStreamDriverModel into an interface (#2252)
* Converting ByteStreamDriverModel into an interface

* Fixing Tcp unit tests

* Make reusable builder use pr-check ref as default

* Reusable workflows now build on devel as default

* Review fixes I
2023-08-29 08:39:59 -07:00
M Starch
c263a81132 mstarch: merging devel into v3.0.0 2021-10-04 18:19:29 -07:00
Avi
de1a4e7bfd Fix minor typos in code comments/messages etc. 2021-09-21 09:31:13 -07:00
M Starch
cf29d12956 mstarch: fixing check --all 2021-08-23 19:11:41 -07:00
Joshua Anderson
c875ab3b17
Resolve merge conflicts merging from devel branch 2021-08-02 12:14:15 -07:00
M Starch
79cf2c3d08
lestarch: adding a ready port to bytestreamdriver and the tcp implmentors (#853) 2021-07-20 10:47:09 -07:00
Joshua Anderson
1b9c785ce6
Remove void from parameterless functions (#811) 2021-07-14 12:54:01 -07:00
Michael D Starch
8b4e870082 lestarch: refactored IPv4 drivers
lestarch: correcting UT failures and reconnections

lestarch: refactored IPv4 drivers

Update Drv/Ip/test/ut/SocketTestHelper.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/Ip/IpSocket.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/Ip/SocketReadTask.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/Ip/test/ut/TestTcp.cpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/Ip/test/ut/TestUdp.cpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/TcpClient/TcpClientComponentImpl.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/TcpServer/TcpServerComponentImpl.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/Udp/UdpComponentImpl.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/Udp/UdpComponentImpl.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/Ip/IpSocket.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/Ip/UdpSocket.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/Ip/UdpSocket.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/TcpServer/TcpServerComponentImpl.hpp

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>

Update Drv/TcpServer/docs/sdd.md

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-03-09 08:00:59 -08:00