ichiro-its / musen Goto Github PK
View Code? Open in Web Editor NEWUDP and TCP socket communication package for ROS 2 project
Home Page: https://ichiro-its.github.io/musen/
License: MIT License
UDP and TCP socket communication package for ROS 2 project
Home Page: https://ichiro-its.github.io/musen/
License: MIT License
Add a GitHub workflows to build and test this project using ROS 2 CI.
Move the currently broadcaster and listener program into a reuseable class. Those class must have a bool connect(int port)
function that used to start the UDP connection, a void send(std::string data)
function for the Broadcaster
class and a std::string recover()
function for the Listener
class.
For some consideration, it's concluded to rename the project from previously housou
(放送, hōsō, broadcast) into musen
(無線, wireless). Changes should apply to everything from repository name, milestones, information, library name, namespace, etc.
Add support to use the TCP communication instead of just the UDP communication.
Add a simple broadcaster node that broadcast a message to another listener node. Makes sure the message could be received by multiple instances of listener node on different host.
Add support to enable/disable communication to broadcast address, and add support to use custom addresses during communication.
Rename the current musen
package into musen_cpp
(as a c++ implementation of Musenproject) and move it to the sub directory of this project. And add a new package named musen_py
that will be used as a Python implementation of Musen project.
This issue suggests to add a Dependabot configuration in this project to check for a new update on GitHub Actions dependencies.
Add a vector of string support in the StringBroadcaster
's send()
function. When the send()
function is called using vector of string and optional delimiter (default is comma, ,
), the sent message will be the concatenation of the vector of string, separated by the delimiter. For example, with a vector of string {'foo', 'goo', '123'}
and delimiter -
, the broadcaster will send foo-goo-123
.
Just like ichiro-its/keisan#51, change this project from ROS 2 package into a pure C++ library (still using CMake, but without ament_cmake).
This change is necessary because ROS 2 build dependency make it hard to implement a newer C++ version (C++17), custom format/lint rules, binary deployment, multi-platform support, etc.
Use std::optional
instead of std::shared_ptr
in the broadcaster
, listener
, server
, and client
.
As in the latest addition of base_server.cpp
, it seems the server will only be able to handle one client during connect process.
musen/src/server/base_server.cpp
Lines 68 to 75 in bf3d57a
The solution is to make the accept process called by different function (could be accept()
), or automatically run it on different thread, and then save the accepted client as a list.
This issue suggests to merge all workflows into a single CI workflow in ci.yaml
workflow file.
As in this code snippet:
musen/src/listener/string_listener.cpp
Lines 34 to 44 in 611efca
The string listener just casting the buffer result into std::string
without considering the received bytes size. This problem caused the returned data to be wrong if the received bytes is smaller than the requested length.
It's better to resize the message according to the received bytes size before returning the data.
Update information in this package to prepare for Version 1.0.0 release.
Specify the data type to be used in send
and receive
functions instead of in separate classes (e.g. BaseBroadcaster
, Broadcaster<T>
, and StringBroadcaster
).
In the end, specifying the data type could be done as follow:
BaseBroadcaster
Broadcaster broadcaster;
broadcaster.send_raw(...);
Broadcaster<T>
.
Broadcaster broadcaster;
broadcaster.send<T>(...);
StringBroadcaster
.
Broadcaster broadcaster;
broadcaster.send_string(...);
Add master header (housou/housou.hpp
) that will be used by other project to include every public class which is available in this package.
Add a Multicast
object that broadcast data into a specific address (just like a Broadcaster
object but instead of send data into a broadcast IP, it will send data into a specific IP). The add_target_host()
and the enable_broadcast
functions in the Broadcaster
object should be removed too as the Broadcaster
object will be purely only handle a broadcast communication.
Add a delimiter support in the StringListener
's receive()
function. When using delimiter, the receive()
function will separate the received string by some delimiters (could be a single char
, const char *
, or std:: string
) so it will return a vector of string (std::vector<std::string>
).
This issue suggests to remove support on building Debian in this module using CPack because of the same reason as #44.
This issue proposes to remove support for Debian deployment in this project since Debian is no longer being used to distribute this module.
This issue suggests to use Deploy GitHub Pages site action to Deploy documentation to GitHub Pages, replacing previous method that push documentation to gh-pages
branch to deploy the documentation.
Add support to receive full data in listener
, client
, and server
. This feature could be achieved by separating receive
function into receive
and receive_up_to
where receive_up_to
will wait for data up to the requested size (non-blocking mode) while the receive
function will wait for data until the requested size is achieved (blocking).
Add support for template broadcaster (Broadcaster<T>
) and template listener (Listener<T>
) that work just like the standard broadcaster and listener but instead of send/receive a std::string
data, it send/receive a T
data (intended for struct).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.