diff --git a/README.md b/README.md index fd90fb1ccadc2c07cac2aae4e64869fde07468b6..bd61f003d969c821f2953ea3aed4a70017da6d32 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -### DAQ to SoC communication package - PROTOTYPE +### DAQ to SoC communication package - PROTOTYPE v 0.0.1 #### Introduction The prototype is based on implementation of **`HTTP`** protocol, which allows to send commands and payload to a server using HTTP POST requests, and get back a response including a response code plus arbitrary (text, binary) response body. diff --git a/client/cpp/README.md b/client/cpp/README.md index b4cfd64ffe12a7cbb281955a938358dc9aa0bbae..e6e7fcf93405c6066c4bf29e28ae95a47d028802 100644 --- a/client/cpp/README.md +++ b/client/cpp/README.md @@ -2,7 +2,7 @@ #### Introduction to API This single-file library provides an interface for sending commands to a DAQ2SoC server application (e.g. nginx server loading a module with user server-side code), in either syncronous or asyncrounous manner. There are two classes exposed to user: `Sender` and `AsyncHandler`. `Sender` allows you to create a connection to the SoC server side and to send commands to it, including some payload. Commands can be send in syncronous manner, blocking until the result is received from the server (which may take time, depending on the processing there) or in asyncronous way, returning immediately an instance of `AsyncHandler` (featuring `C++-11 future<>`) which can be stored and used at any moment to check if the result is retreived and to get it. -Internally, user calls are converted into `HTTP` calls to the nginx server, using `Boost/beast` `HTTP` implementation. +Internally, user calls are converted into `HTTP` calls to the nginx server, using `Boost/beast` `HTTP` one-header library. #### Compiling sources and an example To compile the daq2soc client code and the example, you need to install boost-1.69 development package. For CC7 systems, this is available in standard epel repo and can be installed like @@ -22,3 +22,6 @@ make -j2 all ./run localhost reset_counter ``` +##### Doxygen +[AsyncHandler](https://atlas-tdaq-sw.web.cern.ch/atlas-tdaq-sw/daq2soc/doxygen/0.0.1/classtdaq_1_1soc_1_1_async_handler.html) +[Sender](https://atlas-tdaq-sw.web.cern.ch/atlas-tdaq-sw/daq2soc/doxygen/0.0.1/classtdaq_1_1soc_1_1_sender.html) diff --git a/server/nginx-module/UserData.cpp b/server/nginx-module/UserData.cpp index d7410ffe7cfcb20774b89dadb45b1ab769bf99ff..fe2978a946667a230a94b8455a3e79619d3c4911 100644 --- a/server/nginx-module/UserData.cpp +++ b/server/nginx-module/UserData.cpp @@ -34,11 +34,12 @@ UserData::~UserData() { } /** - * @brief User function to execut a code in separate thread + * @brief User function to execute a code in separate thread * * This function should be fully customized by users. The code is executed independently from other user (http) requests. * Handling of concurrent access to class members need to be implemented by users. - * If this function exits, thread can be restarted by sending the same 'start_thread' command from the client. + * The thread is started upon receiving 'start_thread' command from the client. + * After the function exits, thread is finished and can be restarted by sending the same 'start_thread' command from the client. */ void UserData::thread_function() { while (1) { @@ -157,4 +158,4 @@ outf.close() ; return ret ; } -} } \ No newline at end of file +} } diff --git a/server/nginx-module/UserData.hpp b/server/nginx-module/UserData.hpp index 53c10b02026360e61e73bbb4620f1707aff59e43..e75fbf90634acfa0755ddd85b6c7351da5e9f82c 100644 --- a/server/nginx-module/UserData.hpp +++ b/server/nginx-module/UserData.hpp @@ -13,7 +13,7 @@ namespace daq2soc { * @brief class UserData: to be extended by users to keep user data across requests to daq2soc module * * Define needed attributes and initialize them in @see UserData() construtor - * Attributes can be accessed from the member daq_request_user_function() which is called for every request from the daq2soc client + * Attributes can be accessed from the daq_request_function() member which is called for every request from the daq2soc client */ class UserData { @@ -41,4 +41,4 @@ void thread_function() ; } ; -} } \ No newline at end of file +} }