From d3a5866a9c0f89ed748b99e3216b7b38ee9d5859 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Tue, 7 May 2024 16:46:02 +0300 Subject: [PATCH 01/57] add ipa user end documentation --- doc/src/vpr/command_line_usage.rst | 18 + doc/src/vtr/index.rst | 1 + .../comm_telegram_body_structure.odg | Bin 0 -> 14630 bytes .../comm_telegram_body_structure.svg | 293 +++++++++ .../server_mode/comm_telegram_structure.odg | Bin 0 -> 21777 bytes .../server_mode/comm_telegram_structure.svg | 584 ++++++++++++++++++ doc/src/vtr/server_mode/index.rst | 187 ++++++ 7 files changed, 1083 insertions(+) create mode 100755 doc/src/vtr/server_mode/comm_telegram_body_structure.odg create mode 100755 doc/src/vtr/server_mode/comm_telegram_body_structure.svg create mode 100755 doc/src/vtr/server_mode/comm_telegram_structure.odg create mode 100755 doc/src/vtr/server_mode/comm_telegram_structure.svg create mode 100644 doc/src/vtr/server_mode/index.rst diff --git a/doc/src/vpr/command_line_usage.rst b/doc/src/vpr/command_line_usage.rst index 94cdb0fdb77..90a0167795e 100644 --- a/doc/src/vpr/command_line_usage.rst +++ b/doc/src/vpr/command_line_usage.rst @@ -1815,6 +1815,24 @@ The following options are used to enable power estimation in VPR. Instructions on generating this file are provided in :ref:`power_estimation`. +Server Mode Options +^^^^^^^^^^^^^^^^^^^^^^^^ +The following options are used to enable server mode in VPR. + +.. seealso:: :ref:`server_mode` for more details. + +.. option:: --server + + Run in server mode. Accept single client application connection and respond to client requests + + **Default:** ``off`` + +.. option:: --port PORT + + Server port number. + + **Default:** ``60555`` + Command-line Auto Completion ---------------------------- diff --git a/doc/src/vtr/index.rst b/doc/src/vtr/index.rst index 4978bc440bf..4b02b7fe432 100644 --- a/doc/src/vtr/index.rst +++ b/doc/src/vtr/index.rst @@ -43,6 +43,7 @@ VTR also includes a set of benchmark designs known to work with the design flow. running_vtr benchmarks power_estimation/index.rst + server_mode/index.rst tasks run_vtr_flow run_vtr_task diff --git a/doc/src/vtr/server_mode/comm_telegram_body_structure.odg b/doc/src/vtr/server_mode/comm_telegram_body_structure.odg new file mode 100755 index 0000000000000000000000000000000000000000..9459ed1e095f992ea4a4056496b7eedf9301297d GIT binary patch literal 14630 zcmb8W1yo+kvMs!DcXubaySpd2I|O$P?j9_-yL*7(1b27$;BG+!kDUAOyZ1S7@B6=7 z-&o)1USrkl?j_aLRXr7C!NAc002%G6p!5DgJ0RZ@YyqyAUENo1i-R(^b?d`2C zj18SF>}(lbZ9g*D89G@wG1%Fg*nYG#cCj(Bb!ISgG_*IjFm_V-H^4WH{}$}GlBk`n zsfC$~=;r>kz?d|Mc?0>8N4}JVQ zz276VH?%de{vY)4|E@hpJ2OWUC#U~?Po10%on8Ka^oahZMGG54GZQC95esJ^)0%mvMrd{x@dLRNYV1aO8~sC80(MqlYchfnUL3jIVder6nlk-W=Y z?NYO3JP`fi*_vMLjzdhJet;-Q!!J=(NRld6>cIL*vLusjEM zp28(@|GQiu#pzcf-4;aAduNWaHRry#0yK=2d%hr_ zu>8&F&9P74R06{dY7?PRU9*~=Hr=OTxf1%L)W51`W+&ATqhVxQ@_FeSNPxo>)~>X% zce^UUi(rfAZkF0e+gl>fR_M-j=LoAolJBQX8QI?2uBhC6YAnwfJDQm4=2s!FTjQ;+ zg)kle39Oup;dQRUFZ=dDn|B(;KrID_Yi<6dXNw!Ukvc>{%==~;H7WBhtlG2tnZ^rB z>|vp`@qG>Je&L6U22}k~sjUnSj87w}7V~JW`N&+LUhhEH@7Rov#SKn6*venxx+6No zm=RI&i+4w`hWA|RinD@0F1%=iB9gNoujS!~gzOH~bhA9$pT0t1)IT3%W?SC0&rb#j zYHZ=tfeCb*hg@Mw3cJAkGmLhb% zTHd{7$;m;1m=cONX64G95WBR@Pwwc4ArL0v8mWF{t8iP54mT??7QrqXK?&j!grMnt zbq7zmdeLShO>jpK&OF~!yiH2%u=^j7)zZ5_PIgJZr?~nNL@_ezLa!5u7P77TCB4O;^nQWus$+d8G&{5;BfC}jH0r`|fG#L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2_biROqAzYK82U=RZYDt^6PCQ5BM})_x$if zUZNoH??TLFL(KP1>!FRzP`rxfxgxEF3uNljY!S6c=)vGyG%NufU63yfLaL zUgy`DBhF&X{;joQJ+{$-&qJTrD||K8SP{y<26$9eeL(YF4bxi&-Q@Q(LDc_7sHc5* z^{@2V%c8Y?*IS5?4*ZXZ7_qNFxnW}T9}$R{cAs3W&C@~9wy}A zJMQ4Ab)|Gw6o*=>8}LIA755+TgJikco2%bz!_ksa!$^1$SRdEZL+g3r+bhSBNqH<6 zd3}vBVqNK#7HZCS)PHp$K8;nW2SFOeUFXu=QLPV$>0Z86b8&~Xb<9anR+AZ>TXO)3%MV2tI*VmSWg~31IlNr-&+_~K^6oQ9r$OO)9)|w zPx*uN^q*RPUh!W6;Xmt&Z^eIRHvN0se`@_FO6cF9{K<6se?@8k8{ zT)!3nb3}h-LjAwu(7ru^|HSz#GwPplesiP#6yv|avHv%w)ITHr`^Yl?2I;TNsei`# z&7JyF=Kcof|6)@8GuXcm4;A$PzD@tmtokpcKP<&xce4IYJp3tgZ%BVKt^Rn0|6A`b zsr%piT>q5&w|xCycD??m;$PDwzcc%Pir`yr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JOB_ID: int + + + + + + + + CMD: int + + + + + + + + OPTIONS: string + + + + + + + + STATUS: bool + + + + + + + + DATA: string + + + + + + + + {option_data_type} + + + + + + + + {option_name} + + + + + + + + {option_value} + + + + + + + + : + + + + + + + + {option_data_type} + + + + + + + + : + + + + + + + + {option_data_type} + + + + + + + + option_element2 + + + + + + + + ; + + + + + + + + option_element1 + + + + + + + + ; + + + + + + + + ... + + + + + + + + option_element_n + + + + + + + + OPTIONS + + + + + + + + n + + + + + + + + OPTION ELEMENT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/src/vtr/server_mode/comm_telegram_structure.odg b/doc/src/vtr/server_mode/comm_telegram_structure.odg new file mode 100755 index 0000000000000000000000000000000000000000..68d2872aa12bd0f91541628fd98145eda2db36b0 GIT binary patch literal 21777 zcmbTc1yCJ9w=TLj5;pGc?t$R$F2UX19fHHg-4onhg1ZEF+Yo{WcXzj!|K2*c>Q$XO zukP!bsaYdSx_f5&>(!sKJTwdz00062veQeo^PoQuG6DdA|Lp%R0UT@`EZn`FElix9 z?QP6V+-;m3S-v@%e|9o)vvK?Elf9{lE6e|#mZiOuiMz%Bt=7LVJ^p831piHh&Q8uA&i_&U zA7cFP^!`&bXA?&Y`~N|Y=)d#l>SX0=;pX;#AE}$WiMz-DhaTyF!#LB{rMa;(C z!Nl3^|1w+?GcyZ&i+}y;^k3Zp0)hV5yY$b~|0xLnBsX_&dkeSEUJmwq`g(4wZP)=9 zwVTdm{zVm8EUG)Fr!4U2Kd64*^nX!TV{J5S7_ca}UmP zY)UY8V{CC#`j~aNL3O&$kUW)wbLoB=Va#`Ge>jnKvTYlbqDjnSloUi=KoLRrg|j26 z=g)Gw;f6uu#^r2>VYv?_Qt@Kgy--GSi&K zAB<@VoGAIjX1S}nrMvvyFd254(i`pSLC0=f<<~27WAK@vNj`n-p;AOgZ zWU8~j2y0|jKh5I9;ghGiH(a{_B{01s>`98CMJy{8q7fuQM`AaVu_*f^R&7~boTJt8Hl#Lts z&C5OHVm@4A-B^~L6|wkwyC9LHx_(zd${5T~k?y)%=lhi#i9-KL=b@|R(PvWe^1FFi zCIM3WAt$%FU-H-$cFMY*k2G6DsL)x;s;M7FRlsJl=W64w7ebw!$$D1L`&6fYW1wdE zmAP@4!lh<*I<`!)#7010t$}&OUbTEcWOP?kBJtBMr>`iCb z^B1a732Jgx;bx(9<;GxH5fdJ~*V&^#3gpWeB?)j}3^Gf3ald^2(~EhovE4em*-Dzi z$?0#VxeMkhF(ztV0TK75m94EgQEDj6K_XIk4oRmFzI=b-U zat+oJO7gfEUarWvyCYe)X}ELa!^NLZE8kOS;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m_telegram_structure.svg b/doc/src/vtr/server_mode/comm_telegram_structure.svg new file mode 100755 index 00000000000..f2b4dfb313e --- /dev/null +++ b/doc/src/vtr/server_mode/comm_telegram_structure.svg @@ -0,0 +1,584 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + I + + + + + + + + P + + + + + + + + A + + + + + + + + \0 + + + + + + + + + + + + + + + ? + + + + + + + + ? + + + + + + + + ? + + + + + + + + ? + + + + + + + + + + + + + + + ? + + + + + + + + ? + + + + + + + + ? + + + + + + + + ? + + + + + + + + + + + + + + + ? + + + + + + + + BODY LENGTH + + + + + + + + BODY CHECKSUM + + + + + + + + COMPRESSOR_ID + + + + + + + + 0 + + + + + + + + 1 + + + + + + + + 2 + + + + + + + + 3 + + + + + + + + 4 + + + + + + + + 5 + + + + + + + + 6 + + + + + + + + 7 + + + + + + + + 8 + + + + + + + + 9 + + + + + + + + 10 + + + + + + + + 11 + + + + + + + + 12 + + + + + + + + TELEGRAM HEADER + + + + + + + + + + + + + + + ? + + + + + + + + ? + + + + + + + + ? + + + + + + + + ? + + + + + + + + ? + + + + + + + + ? + + + + + + + + … + + + + + + + + 13 + + + + + + + + 14 + + + + + + + + 15 + + + + + + + + 15+n + + + + + + + + 16+n + + + + + + + + 17+n + + + + + + + + n + + + + + + + + TELEGRAM BODY + + + + + + + + HEADER + + + + + + + + BODY + + + + + + + + TELEGRAM + + + + + + + + SIGNATURE + + + + + + + + + + + + + + + + + + + + + + + + + 4 bytes + + + + + + + + + + + 4 bytes + + + + + + + + + + + 4 bytes + + + + + + + + + + + 1 byte + + + + \ No newline at end of file diff --git a/doc/src/vtr/server_mode/index.rst b/doc/src/vtr/server_mode/index.rst new file mode 100644 index 00000000000..a0c881dc6ca --- /dev/null +++ b/doc/src/vtr/server_mode/index.rst @@ -0,0 +1,187 @@ +.. _server_mode: + +Server Mode +================ + +VTR provides ability to run server mode using following command line arguments + +.. code-block:: none + + --server --port_num 60555 + +Server mode may accept only single client application connection and response with two kind of requests: **get critical path list** and **highlight selected critical path elements** + +Communication telegram +------------------------- + +Telegram is a byte sequence consist from the two parts: fixed size **telegram header** and **telegram body** which could have vary size. +**telegram header** is set of helper infomation to properly extract telegram body sequence from the data flow. + +.. _fig_comm_telegram_structure: + +.. figure:: comm_telegram_structure.* + + Communication telegram structure. + + +.. _fig_comm_telegram_body_structure: + +.. figure:: comm_telegram_body_structure.* + + Communication telegram body structure. + + **telegram body** is flat json structure. + + **CMD** could have following values: + + - 0 - **get critical path** + - 1 - **highlight selected path elements** + + JOB_ID - is unique id for a task. + + .. note:: telegram body itself could be compressed with zlib, to minimize amount of data transfered over socket. + This is done for **get critical path** response. The compressor id byte in header sinalize if the telegram body is compressed. + +Telegram body examples +---------------------- + +.. option:: Get critical path timing report + + .. code-block:: json + :caption: **request** example of JSON telegram body + :linenos: + + { + "CMD": "0", + "JOB_ID": "1", + "OPTIONS": "int:path_num:1;string:path_type:setup;string:details_level:netlist;bool:is_flat_routing:0" + } + + **path_type** could have following values: + + - setup + - hold + + **details_level** could have following values: + + - netlist + - aggregated + - detailed + - debug + + .. code-block:: json + :caption: **response** example of JSON telegram body + :linenos: + + { + "JOB_ID": "1", + "CMD": "0", + "OPTIONS": "int:path_num:1;string:path_type:setup;string:details_level:netlist;bool:is_flat_routing:0", + "DATA": " + #Timing report of worst 1 path(s) + # Unit scale: 1e-09 seconds + # Output precision: 3 + + #Path 1 + Startpoint: count[1].Q[0] (dffsre clocked by clk) + Endpoint : count[13].D[0] (dffsre clocked by clk) + Path Type : setup + + Point Incr Path + ------------------------------------------------------------------------------------------ + clock clk (rise edge) 0.000 0.000 + clock source latency 0.000 0.000 + clk.inpad[0] (.input) 0.000 0.000 + count[1].C[0] (dffsre) 0.715 0.715 + count[1].Q[0] (dffsre) [clock-to-output] 0.286 1.001 + count_adder_carry_p_cout[2].p[0] (adder_carry) 0.573 1.574 + count_adder_carry_p_cout[2].cout[0] (adder_carry) 0.068 1.642 + count_adder_carry_p_cout[3].cin[0] (adder_carry) 0.043 1.685 + count_adder_carry_p_cout[3].cout[0] (adder_carry) 0.070 1.755 + count_adder_carry_p_cout[4].cin[0] (adder_carry) 0.053 1.808 + count_adder_carry_p_cout[4].cout[0] (adder_carry) 0.070 1.877 + count_adder_carry_p_cout[5].cin[0] (adder_carry) 0.043 1.921 + count_adder_carry_p_cout[5].cout[0] (adder_carry) 0.070 1.990 + count_adder_carry_p_cout[6].cin[0] (adder_carry) 0.053 2.043 + count_adder_carry_p_cout[6].cout[0] (adder_carry) 0.070 2.113 + count_adder_carry_p_cout[7].cin[0] (adder_carry) 0.043 2.156 + count_adder_carry_p_cout[7].cout[0] (adder_carry) 0.070 2.226 + count_adder_carry_p_cout[8].cin[0] (adder_carry) 0.053 2.279 + count_adder_carry_p_cout[8].cout[0] (adder_carry) 0.070 2.348 + count_adder_carry_p_cout[9].cin[0] (adder_carry) 0.043 2.391 + count_adder_carry_p_cout[9].cout[0] (adder_carry) 0.070 2.461 + count_adder_carry_p_cout[10].cin[0] (adder_carry) 0.053 2.514 + count_adder_carry_p_cout[10].cout[0] (adder_carry) 0.070 2.584 + count_adder_carry_p_cout[11].cin[0] (adder_carry) 0.043 2.627 + count_adder_carry_p_cout[11].cout[0] (adder_carry) 0.070 2.696 + count_adder_carry_p_cout[12].cin[0] (adder_carry) 0.053 2.749 + count_adder_carry_p_cout[12].cout[0] (adder_carry) 0.070 2.819 + count_adder_carry_p_cout[13].cin[0] (adder_carry) 0.043 2.862 + count_adder_carry_p_cout[13].cout[0] (adder_carry) 0.070 2.932 + count_adder_carry_p_cout[14].cin[0] (adder_carry) 0.053 2.985 + count_adder_carry_p_cout[14].sumout[0] (adder_carry) 0.040 3.025 + count_dffsre_Q_D[13].in[0] (.names) 0.564 3.589 + count_dffsre_Q_D[13].out[0] (.names) 0.228 3.818 + count[13].D[0] (dffsre) 0.000 3.818 + data arrival time 3.818 + + clock clk (rise edge) 0.000 0.000 + clock source latency 0.000 0.000 + clk.inpad[0] (.input) 0.000 0.000 + count[13].C[0] (dffsre) 0.715 0.715 + clock uncertainty 0.000 0.715 + cell setup time -0.057 0.659 + data required time 0.659 + ------------------------------------------------------------------------------------------ + data required time 0.659 + data arrival time -3.818 + ------------------------------------------------------------------------------------------ + slack (VIOLATED) -3.159 + + + #End of timing report + #RPT METADATA: + path_index/clock_launch_path_elements_num/arrival_path_elements_num + 0/2/30 + ", + "STATUS": "1" + } + +.. option:: Highlight selected critical path elements +-------------------------------------------- + + .. code-block:: json + :caption: **request** example of JSON telegram body + :linenos: + + { + "CMD": "1", + "JOB_ID": "2", + "OPTIONS": "string:path_elements:0#10,11,12,13,14,15,20,21,22,23,24,25;string:high_light_mode:crit path flylines delays;bool:draw_path_contour:1" + } + + **high_light_mode** could have following values: + + - crit path flylines + - crit path flylines delays + - crit path routing + - crit path routing delays + + .. code-block:: json + :caption: **response** exampler of JSON telegram body + :linenos: + + { + "JOB_ID": "2", + "CMD": "1", + "OPTIONS": "string:path_elements:0#10,11,12,13,14,15,20,21,22,23,24,25;string:high_light_mode:crit path flylines delays;bool:draw_path_contour:1", + "DATA": "", + "STATUS": "1" + } + + .. note:: If status is not 1, the field ***DATA*** contains error string. + + + + + From 3ff45b2309a2439e6fd0670bf4db137a790e9706 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Tue, 7 May 2024 17:14:31 +0300 Subject: [PATCH 02/57] adjust svg sizes for ipa end user doc --- doc/src/vtr/server_mode/comm_telegram_body_structure.svg | 4 ++-- doc/src/vtr/server_mode/comm_telegram_structure.svg | 4 ++-- doc/src/vtr/server_mode/index.rst | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/vtr/server_mode/comm_telegram_body_structure.svg b/doc/src/vtr/server_mode/comm_telegram_body_structure.svg index c4ec902207f..37ee174e102 100755 --- a/doc/src/vtr/server_mode/comm_telegram_body_structure.svg +++ b/doc/src/vtr/server_mode/comm_telegram_body_structure.svg @@ -1,6 +1,6 @@ - + @@ -290,4 +290,4 @@ - \ No newline at end of file + diff --git a/doc/src/vtr/server_mode/comm_telegram_structure.svg b/doc/src/vtr/server_mode/comm_telegram_structure.svg index f2b4dfb313e..25e7602152d 100755 --- a/doc/src/vtr/server_mode/comm_telegram_structure.svg +++ b/doc/src/vtr/server_mode/comm_telegram_structure.svg @@ -1,6 +1,6 @@ - + @@ -581,4 +581,4 @@ - \ No newline at end of file + diff --git a/doc/src/vtr/server_mode/index.rst b/doc/src/vtr/server_mode/index.rst index a0c881dc6ca..56389fd8a6b 100644 --- a/doc/src/vtr/server_mode/index.rst +++ b/doc/src/vtr/server_mode/index.rst @@ -34,8 +34,8 @@ Telegram is a byte sequence consist from the two parts: fixed size **telegram he **CMD** could have following values: - - 0 - **get critical path** - - 1 - **highlight selected path elements** + - 0 - command id for **get critical path** + - 1 - command id for **highlight selected path elements** JOB_ID - is unique id for a task. From 4abbf4da774401fd69b174471cf35d2e6d581a87 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Tue, 7 May 2024 23:33:36 +0300 Subject: [PATCH 03/57] refactor ServerCOntext to be a structl, in order to use it's member in doxygen. add some code comment, start filling server.rst --- doc/src/api/vpr/contexts.rst | 4 +++ doc/src/api/vpr/index.rst | 1 + doc/src/api/vpr/server.rst | 32 +++++++++++++++++++ vpr/src/base/vpr_api.cpp | 8 ++--- vpr/src/base/vpr_context.h | 55 ++++++++++----------------------- vpr/src/draw/draw.cpp | 4 +-- vpr/src/draw/draw_basic.cpp | 2 +- vpr/src/server/gateio.h | 4 +-- vpr/src/server/pathhelper.cpp | 4 +-- vpr/src/server/serverupdate.cpp | 8 ++--- vpr/src/server/taskresolver.cpp | 12 +++---- vpr/src/server/taskresolver.h | 39 +++++++++++++++++------ vpr/src/server/telegrambuffer.h | 6 ++-- vpr/src/server/telegramheader.h | 15 +++------ 14 files changed, 112 insertions(+), 82 deletions(-) create mode 100644 doc/src/api/vpr/server.rst diff --git a/doc/src/api/vpr/contexts.rst b/doc/src/api/vpr/contexts.rst index ec69aea8404..f29f48dd8b6 100644 --- a/doc/src/api/vpr/contexts.rst +++ b/doc/src/api/vpr/contexts.rst @@ -43,3 +43,7 @@ Structures .. doxygenstruct:: TimingContext :project: vpr :members: + +.. doxygenstruct:: ServerContext + :project: vpr + :members: \ No newline at end of file diff --git a/doc/src/api/vpr/index.rst b/doc/src/api/vpr/index.rst index 37410b72b9c..2ca57515464 100644 --- a/doc/src/api/vpr/index.rst +++ b/doc/src/api/vpr/index.rst @@ -11,3 +11,4 @@ VPR API netlist route_tree rr_graph + server diff --git a/doc/src/api/vpr/server.rst b/doc/src/api/vpr/server.rst new file mode 100644 index 00000000000..4ac3b8fe98f --- /dev/null +++ b/doc/src/api/vpr/server.rst @@ -0,0 +1,32 @@ +======== +Server +======== + +Classes +------- + +.. doxygenclass:: server::GateIO + :project: vpr + :members: + +.. doxygenclass:: server::Task + :project: vpr + :members: + +.. doxygenclass:: server::TaskResolver + :project: vpr + :members: + +.. doxygenclass:: comm::TelegramBuffer + :project: vpr + :members: + +.. doxygenclass:: comm::TelegramHeader + :project: vpr + :members: + +.. doxygenfunction:: try_compress + :project: vpr + +.. doxygenfunction:: try_decompress + :project: vpr \ No newline at end of file diff --git a/vpr/src/base/vpr_api.cpp b/vpr/src/base/vpr_api.cpp index 58b1f993edf..357e7b9f193 100644 --- a/vpr/src/base/vpr_api.cpp +++ b/vpr/src/base/vpr_api.cpp @@ -816,9 +816,9 @@ RouteStatus vpr_route_flow(const Netlist<>& net_list, routing_delay_calc = std::make_shared(atom_ctx.nlist, atom_ctx.lookup, net_delay, is_flat); timing_info = make_setup_hold_timing_info(routing_delay_calc, router_opts.timing_update_type); #ifndef NO_SERVER - if (g_vpr_ctx.server().gateIO().is_running()) { - g_vpr_ctx.mutable_server().set_timing_info(timing_info); - g_vpr_ctx.mutable_server().set_routing_delay_calc(routing_delay_calc); + if (g_vpr_ctx.server().gate_io.is_running()) { + g_vpr_ctx.mutable_server().timing_info = timing_info; + g_vpr_ctx.mutable_server().routing_delay_calc = routing_delay_calc; } #endif /* NO_SERVER */ } else { @@ -1069,7 +1069,7 @@ void vpr_init_server(const t_vpr_setup& vpr_setup) #ifndef NO_SERVER if (vpr_setup.ServerOpts.is_server_mode_enabled) { /* Set up a server and its callback to be triggered at 100ms intervals by the timer's timeout event. */ - server::GateIO& gate_io = g_vpr_ctx.mutable_server().mutable_gateIO(); + server::GateIO& gate_io = g_vpr_ctx.mutable_server().gate_io; if (!gate_io.is_running()) { gate_io.start(vpr_setup.ServerOpts.port_num); g_timeout_add(/*interval_ms*/ 100, server::update, &application); diff --git a/vpr/src/base/vpr_context.h b/vpr/src/base/vpr_context.h index 6a144003b7d..a3257ebdda3 100644 --- a/vpr/src/base/vpr_context.h +++ b/vpr/src/base/vpr_context.h @@ -567,39 +567,16 @@ struct NocContext : public Context { * This should contain only data structures that * related to server state. */ -class ServerContext : public Context { - public: - const server::GateIO& gateIO() const { return gate_io_; } - server::GateIO& mutable_gateIO() { return gate_io_; } - - const server::TaskResolver& task_resolver() const { return task_resolver_; } - server::TaskResolver& mutable_task_resolver() { return task_resolver_; } - - void set_crit_paths(const std::vector& crit_paths) { crit_paths_ = crit_paths; } - const std::vector& crit_paths() const { return crit_paths_; } - - void set_critical_path_num(int critical_path_num) { critical_path_num_ = critical_path_num; } - int critical_path_num() const { return critical_path_num_; } - - void set_path_type(const std::string& path_type) { path_type_ = path_type; } - const std::string& path_type() const { return path_type_; } - - void clear_crit_path_elements() { crit_path_element_indexes_.clear(); } - void set_crit_path_elements(const std::map>& crit_path_element_indexes) { crit_path_element_indexes_ = crit_path_element_indexes; } - std::map> crit_path_element_indexes() const { return crit_path_element_indexes_; } - - void set_draw_crit_path_contour(bool draw_crit_path_contour) { draw_crit_path_contour_ = draw_crit_path_contour; } - bool draw_crit_path_contour() const { return draw_crit_path_contour_; } - - void set_timing_info(const std::shared_ptr& timing_info) { timing_info_ = timing_info; } - const std::shared_ptr& timing_info() const { return timing_info_; } - - void set_routing_delay_calc(const std::shared_ptr& routing_delay_calc) { routing_delay_calc_ = routing_delay_calc; } - const std::shared_ptr& routing_delay_calc() const { return routing_delay_calc_; } +struct ServerContext : public Context { + /** + * @brief \ref server::GateIO. + */ + server::GateIO gate_io; - private: - server::GateIO gate_io_; - server::TaskResolver task_resolver_; + /** + * @brief \ref server::TaskResolver. + */ + server::TaskResolver task_resolver; /** * @brief Stores the critical path items. @@ -608,7 +585,7 @@ class ServerContext : public Context { * Once calculated upon request, it provides the value for a specific critical path * to be rendered upon user request. */ - std::vector crit_paths_; + std::vector crit_paths; /** * @brief Stores the number of critical paths items. @@ -616,7 +593,7 @@ class ServerContext : public Context { * This value is used to generate a critical path report with a certain number of items, * which will be sent back to the client upon request. */ - int critical_path_num_ = 1; + int critical_path_num = 1; /** * @brief Stores the critical path type. @@ -624,7 +601,7 @@ class ServerContext : public Context { * This value is used to generate a specific type of critical path report and send * it back to the client upon request. */ - std::string path_type_ = "setup"; + std::string path_type = "setup"; /** * @brief Stores the selected critical path elements. @@ -632,24 +609,24 @@ class ServerContext : public Context { * This value is used to render the selected critical path elements upon client request. * The std::map key plays role of path index, where the element indexes are stored as std::set. */ - std::map> crit_path_element_indexes_; + std::map> crit_path_element_indexes; /** * @brief Stores the flag indicating whether to draw the critical path contour. * * If the flag is set to true, the non-selected critical path elements will be drawn as a contour, while selected elements will be drawn as usual. */ - bool draw_crit_path_contour_ = false; + bool draw_crit_path_contour = false; /** * @brief Reference to the SetupHoldTimingInfo calculated during the routing stage. */ - std::shared_ptr timing_info_; + std::shared_ptr timing_info; /** * @brief Reference to the PostClusterDelayCalculator calculated during the routing stage. */ - std::shared_ptr routing_delay_calc_; + std::shared_ptr routing_delay_calc; }; #endif /* NO_SERVER */ diff --git a/vpr/src/draw/draw.cpp b/vpr/src/draw/draw.cpp index 0e6a95cbe60..415af956e86 100644 --- a/vpr/src/draw/draw.cpp +++ b/vpr/src/draw/draw.cpp @@ -255,9 +255,9 @@ static void draw_main_canvas(ezgl::renderer* g) { draw_placement_macros(g); #ifndef NO_SERVER - if (g_vpr_ctx.server().gateIO().is_running()) { + if (g_vpr_ctx.server().gate_io.is_running()) { const ServerContext& server_ctx = g_vpr_ctx.server(); // shortcut - draw_crit_path_elements(server_ctx.crit_paths(), server_ctx.crit_path_element_indexes(), g); + draw_crit_path_elements(server_ctx.crit_paths, server_ctx.crit_path_element_indexes, g); } else { draw_crit_path(g); } diff --git a/vpr/src/draw/draw_basic.cpp b/vpr/src/draw/draw_basic.cpp index 29077c2cd80..0f9e664ad3a 100644 --- a/vpr/src/draw/draw_basic.cpp +++ b/vpr/src/draw/draw_basic.cpp @@ -1113,7 +1113,7 @@ void draw_crit_path_elements(const std::vector& paths, const #ifndef NO_SERVER t_draw_state* draw_state = get_draw_state_vars(); const ezgl::color contour_color{0, 0, 0, 40}; - const bool draw_crit_path_contour = g_vpr_ctx.server().draw_crit_path_contour(); + const bool draw_crit_path_contour = g_vpr_ctx.server().draw_crit_path_contour; auto draw_flyline_timing_edge_helper_fn = [](ezgl::renderer* renderer, const ezgl::color& color, ezgl::line_dash line_style, int line_width, float delay, const tatum::NodeId& prev_node, const tatum::NodeId& node, bool skip_draw_delays=false) { diff --git a/vpr/src/server/gateio.h b/vpr/src/server/gateio.h index 8dfb9ce686e..6337208582e 100644 --- a/vpr/src/server/gateio.h +++ b/vpr/src/server/gateio.h @@ -161,7 +161,7 @@ class GateIO * * @param tasks A reference to a vector where the received tasks will be moved. */ - void take_received_tasks(std::vector&); + void take_received_tasks(std::vector& tasks); /** * @brief Moves tasks to the send queue. @@ -172,7 +172,7 @@ class GateIO * * @param tasks A reference to a vector containing the tasks to be moved to the send queue. */ - void move_tasks_to_send_queue(std::vector&); + void move_tasks_to_send_queue(std::vector& tasks); /** * @brief Prints log messages for the GateIO. diff --git a/vpr/src/server/pathhelper.cpp b/vpr/src/server/pathhelper.cpp index 43a6ad0e407..619a25b8a8d 100644 --- a/vpr/src/server/pathhelper.cpp +++ b/vpr/src/server/pathhelper.cpp @@ -34,8 +34,8 @@ static void collect_crit_path_metadata(std::stringstream& ss, const std::vector< */ CritPathsResult calc_critical_path(const std::string& report_type, int crit_path_num, e_timing_report_detail details_level, bool is_flat_routing) { // shortcuts - const std::shared_ptr& timing_info = g_vpr_ctx.server().timing_info(); - const std::shared_ptr& routing_delay_calc = g_vpr_ctx.server().routing_delay_calc(); + const std::shared_ptr& timing_info = g_vpr_ctx.server().timing_info; + const std::shared_ptr& routing_delay_calc = g_vpr_ctx.server().routing_delay_calc; auto& timing_ctx = g_vpr_ctx.timing(); auto& atom_ctx = g_vpr_ctx.atom(); diff --git a/vpr/src/server/serverupdate.cpp b/vpr/src/server/serverupdate.cpp index caf06d5e890..de45c45936d 100644 --- a/vpr/src/server/serverupdate.cpp +++ b/vpr/src/server/serverupdate.cpp @@ -9,12 +9,12 @@ namespace server { gboolean update(gpointer data) { - const bool is_running = g_vpr_ctx.server().gateIO().is_running(); + const bool is_running = g_vpr_ctx.server().gate_io.is_running(); if (is_running) { // shortcuts ezgl::application* app = static_cast(data); - GateIO& gate_io = g_vpr_ctx.mutable_server().mutable_gateIO(); - TaskResolver& task_resolver = g_vpr_ctx.mutable_server().mutable_task_resolver(); + GateIO& gate_io = g_vpr_ctx.mutable_server().gate_io; + TaskResolver& task_resolver = g_vpr_ctx.mutable_server().task_resolver; std::vector tasks_buff; @@ -24,7 +24,7 @@ gboolean update(gpointer data) { } tasks_buff.clear(); - const bool is_server_context_initialized = g_vpr_ctx.server().timing_info() && g_vpr_ctx.server().routing_delay_calc(); + const bool is_server_context_initialized = g_vpr_ctx.server().timing_info && g_vpr_ctx.server().routing_delay_calc; if (is_server_context_initialized) { bool has_finished_tasks = task_resolver.update(app); diff --git a/vpr/src/server/taskresolver.cpp b/vpr/src/server/taskresolver.cpp index bfe72b03363..26da76393d5 100644 --- a/vpr/src/server/taskresolver.cpp +++ b/vpr/src/server/taskresolver.cpp @@ -88,7 +88,7 @@ void TaskResolver::process_get_path_list_task(ezgl::application*, const TaskPtr& if (!options.has_errors()) { ServerContext& server_ctx = g_vpr_ctx.mutable_server(); // shortcut - server_ctx.clear_crit_path_elements(); // reset selection if path list options has changed + server_ctx.crit_path_element_indexes.clear(); // reset selection if path list options has changed // read options const int n_critical_path_num = options.get_int(comm::OPTION_PATH_NUM, 1); @@ -102,9 +102,9 @@ void TaskResolver::process_get_path_list_task(ezgl::application*, const TaskPtr& CritPathsResult crit_paths_result = calc_critical_path(path_type, n_critical_path_num, details_level_opt.value(), is_flat); // setup context - server_ctx.set_path_type(path_type); - server_ctx.set_critical_path_num(n_critical_path_num); - server_ctx.set_crit_paths(crit_paths_result.paths); + server_ctx.path_type = path_type; + server_ctx.critical_path_num = n_critical_path_num; + server_ctx.crit_paths = crit_paths_result.paths; if (crit_paths_result.is_valid()) { std::string msg{crit_paths_result.report}; @@ -136,8 +136,8 @@ void TaskResolver::process_draw_critical_path_task(ezgl::application* app, const const bool draw_path_contour = options.get_bool(comm::OPTION_DRAW_PATH_CONTOUR, false); // set critical path elements to render - server_ctx.set_crit_path_elements(path_elements); - server_ctx.set_draw_crit_path_contour(draw_path_contour); + server_ctx.crit_path_element_indexes = path_elements; + server_ctx.draw_crit_path_contour = draw_path_contour; // update gtk UI GtkComboBox* toggle_crit_path = GTK_COMBO_BOX(app->get_object("ToggleCritPath")); diff --git a/vpr/src/server/taskresolver.h b/vpr/src/server/taskresolver.h index 9ae91f5e64a..3ef180e48ba 100644 --- a/vpr/src/server/taskresolver.h +++ b/vpr/src/server/taskresolver.h @@ -28,15 +28,36 @@ class TaskResolver { int tasks_num() const { return m_tasks.size(); } - /* own task to process */ - void own_task(TaskPtr&&); - - /* process tasks */ - bool update(ezgl::application*); - - /* extract finished tasks */ - void take_finished_tasks(std::vector&); - + /** + * @brief Takes ownership of a task. + * + * This method takes ownership of a task by moving it into the TaskResolver's internal task queue. + * After calling this method, the task will be owned and managed by the TaskResolver. + * + * @param task The task to take ownership of. After calling this method, the task object will be in a valid but unspecified state. + * + * @note After calling this method, the caller should avoid accessing or modifying the task object. + */ + void own_task(TaskPtr&& task); + + /** + * @brief Resolve queued tasks. + * + * @param app A pointer to the ezgl::application object representing the application instance. + */ + bool update(ezgl::application* app); + + /** + * @brief Extracts finished tasks from the internal task queue. + * + * This function removes finished tasks from the internal task queue and appends them to the provided vector. + * After this operation, the internal task queue will no longer hold the extracted tasks. + * + * @param tasks A reference to a vector where the finished tasks will be appended. + */ + void take_finished_tasks(std::vector& tasks); + + // helper method used in tests const std::vector& tasks() const { return m_tasks; } private: diff --git a/vpr/src/server/telegrambuffer.h b/vpr/src/server/telegrambuffer.h index c781ab6dccd..6e7db29b2a1 100644 --- a/vpr/src/server/telegrambuffer.h +++ b/vpr/src/server/telegrambuffer.h @@ -44,14 +44,14 @@ class TelegramBuffer * * @param data The byte array whose contents will be appended to internal byte buffer. */ - void append(const ByteArray&); + void append(const ByteArray& data); /** * @brief Extracts well-formed telegram frames from the internal byte buffer. * * @param frames A reference to a vector where the extracted telegram frames will be stored. */ - void take_telegram_frames(std::vector&); + void take_telegram_frames(std::vector& frames); /** * @brief Extracts well-formed telegram frames from the internal byte buffer. @@ -70,7 +70,7 @@ class TelegramBuffer * * @note After calling this function, the internal error storage will be cleared. */ - void take_errors(std::vector&); + void take_errors(std::vector& errors); /** * @brief Retrieves a constant reference to the internal byte buffer. diff --git a/vpr/src/server/telegramheader.h b/vpr/src/server/telegramheader.h index c666d4c2dc7..422927c9c5e 100644 --- a/vpr/src/server/telegramheader.h +++ b/vpr/src/server/telegramheader.h @@ -11,19 +11,14 @@ namespace comm { /** - * @brief The fixed size bytes sequence where the metadata of a telegram message is stored. + * @brief The fixed size byte sequence where the metadata of a telegram message is stored. * * This structure is used to describe the message frame sequence in order to successfully extract it. * The TelegramHeader structure follows this format: - * ------------------------------------------------------ - * [ 4 bytes ][ 4 bytes ][ 4 bytes ][ 1 byte ] - * [SIGNATURE][DATA_LENGTH][DATA_CHECKSUM][COMPRESSOR_ID] - * ------------------------------------------------------ - * - * The SIGNATURE is a 4-byte constant sequence "I", "P", "A", "\0" which indicates the valid start of a TelegramHeader. - * The DATA_LENGTH is a 4-byte field where the data length is stored, allowing for proper identification of the start and end of the TelegramFrame sequence. - * The DATA_CHECKSUM is a 4-byte field where the data checksum is stored to validate the attached data. - * The COMPRESSOR_ID is a 1-byte field where the compressor id is stored. If it's NULL, it means the data is not compressed (in text/json format). + * - [ 4 bytes ]: SIGNATURE - A 4-byte constant sequence "I", "P", "A", "\0" which indicates the valid start of a TelegramHeader. + * - [ 4 bytes ]: DATA_LENGTH - A 4-byte field where the data length is stored, allowing for proper identification of the start and end of the TelegramFrame sequence. + * - [ 4 bytes ]: DATA_CHECKSUM - A 4-byte field where the data checksum is stored to validate the attached data. + * - [ 1 byte ]: COMPRESSOR_ID - A 1-byte field where the compressor id is stored. If it's \0, it means the data is not compressed (in text/json format). */ class TelegramHeader { public: From 55139ed547a8a3c02b77a4d7fd2064e2b48616c5 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 15:00:35 +0300 Subject: [PATCH 04/57] correct and add comments to telegramparser.h --- doc/src/api/vpr/server.rst | 4 +++ vpr/src/server/telegramparser.h | 60 +++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/doc/src/api/vpr/server.rst b/doc/src/api/vpr/server.rst index 4ac3b8fe98f..0ded4dffdb8 100644 --- a/doc/src/api/vpr/server.rst +++ b/doc/src/api/vpr/server.rst @@ -25,6 +25,10 @@ Classes :project: vpr :members: +.. doxygenclass:: comm::TelegramParser + :project: vpr + :members: + .. doxygenfunction:: try_compress :project: vpr diff --git a/vpr/src/server/telegramparser.h b/vpr/src/server/telegramparser.h index 8ebb49955f2..8c623ef092a 100644 --- a/vpr/src/server/telegramparser.h +++ b/vpr/src/server/telegramparser.h @@ -9,17 +9,71 @@ namespace comm { /** - * @brief Dummy JSON parser using regular expressions. + * @brief Dummy JSON parser. * - * This module provides helper methods to extract values for a keys as "JOB_ID", "CMD", or "OPTIONS" - * from a JSON schema structured as follows: {JOB_ID:num, CMD:enum, OPTIONS:string}. + * This module provides helper methods to extract values for a keys as "JOB_ID", "CMD", "OPTIONS", "DATA", or "STATUS + * from a JSON schema structured as follows: {JOB_ID:num, CMD:enum, OPTIONS:string, DATA:string, STATUS:num}. */ class TelegramParser { public: + /** + * @brief Attempts to extract the JOB_ID field from a given message. + * + * This function parses the provided message and attempts to extract the JOB_ID field from it. + * If the JOB_ID field is found and successfully extracted, it is returned as an optional integer. + * If the JOB_ID field is not found or cannot be parsed as an integer, an empty optional is returned. + * + * @param message The message from which to extract the JOB_ID field. + * @return An optional integer containing the extracted JOB_ID if successful, otherwise an empty optional. + */ static std::optional try_extract_field_job_id(const std::string& message); + + /** + * @brief Attempts to extract the CMD field from a given message. + * + * This function parses the provided message and attempts to extract the CMD field from it. + * If the CMD field is found and successfully extracted, it is returned as an optional integer. + * If the CMD field is not found or cannot be parsed as an integer, an empty optional is returned. + * + * @param message The message from which to extract the CMD field. + * @return An optional integer containing the extracted CMD if successful, otherwise an empty optional. + */ static std::optional try_extract_field_cmd(const std::string& message); + + /** + * @brief Attempts to extract the OPTIONS field from a given message. + * + * This function parses the provided message and attempts to extract the OPTIONS field from it. + * If the OPTIONS field is found and successfully extracted, it is returned as an optional string. + * If the OPTIONS field is not found an empty optional is returned. + * + * @param message The message from which to extract the OPTIONS field. + * @return An optional string containing the extracted OPTIONS if successful, otherwise an empty optional. + */ static std::optional try_extract_field_options(const std::string& message); + + /** + * @brief Attempts to extract the DATA field from a given message. + * + * This function parses the provided message and attempts to extract the DATA field from it. + * If the DATA field is found and successfully extracted, it is returned as an optional string. + * If the DATA field is not found an empty optional is returned. + * + * @param message The message from which to extract the DATA field. + * @return An optional string containing the extracted DATA if successful, otherwise an empty optional. + */ static std::optional try_extract_field_data(const std::string& message); + + /** + * @brief Attempts to extract the STATUS field from a given message. + * + * This function parses the provided message and attempts to extract the STATUS field from it. + * If the STATUS field is found and successfully extracted, it is returned as an optional integer. + * If the STATUS field is not found or cannot be parsed as an integer, an empty optional is returned. + * + * @param message The message from which to extract the STATUS field. + * @return An optional integer containing the extracted STATUS if successful, otherwise an empty optional. + */ static std::optional try_extract_field_status(const std::string& message); private: From cbe3eadbab38f799973957848c5a2588db2c3876 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 16:09:22 +0300 Subject: [PATCH 05/57] minor changes for server mode code commenting --- doc/src/api/vpr/server.rst | 27 +++++++++++++++++++++++++++ vpr/src/server/gateio.h | 2 +- vpr/src/server/telegramparser.h | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/doc/src/api/vpr/server.rst b/doc/src/api/vpr/server.rst index 0ded4dffdb8..0360adaa782 100644 --- a/doc/src/api/vpr/server.rst +++ b/doc/src/api/vpr/server.rst @@ -5,6 +5,9 @@ Server Classes ------- +.. doxygenfunction:: try_compress + :project: vpr + .. doxygenclass:: server::GateIO :project: vpr :members: @@ -17,6 +20,26 @@ Classes :project: vpr :members: +.. doxygenclass:: server::TelegramOptions + :project: vpr + :members: + +.. doxygenfunction:: server::update + :project: vpr + :members: + +.. doxygenstruct:: server::CritPathsResult + :project: vpr + :members: + +.. doxygenfunction:: server::calc_critical_path + :project: vpr + :members: + +.. doxygenclass:: comm::ByteArray + :project: vpr + :members: + .. doxygenclass:: comm::TelegramBuffer :project: vpr :members: @@ -29,6 +52,10 @@ Classes :project: vpr :members: +.. doxygenstruct:: comm::TelegramFrame + :project: vpr + :members: + .. doxygenfunction:: try_compress :project: vpr diff --git a/vpr/src/server/gateio.h b/vpr/src/server/gateio.h index 6337208582e..f29b2a80dca 100644 --- a/vpr/src/server/gateio.h +++ b/vpr/src/server/gateio.h @@ -31,7 +31,7 @@ namespace server { * Once the tasks are resolved by the TaskResolver, they are returned * to be sent back to the client as a response. * - * @note: + * @note * - The GateIO instance should be created and managed from the main thread, while its internal processing * and IO operations are performed asynchronously in a separate thread. This separation ensures smooth IO behavior * and responsiveness of the application. diff --git a/vpr/src/server/telegramparser.h b/vpr/src/server/telegramparser.h index 8c623ef092a..23e942f1d9d 100644 --- a/vpr/src/server/telegramparser.h +++ b/vpr/src/server/telegramparser.h @@ -11,7 +11,7 @@ namespace comm { /** * @brief Dummy JSON parser. * - * This module provides helper methods to extract values for a keys as "JOB_ID", "CMD", "OPTIONS", "DATA", or "STATUS + * This class provides helper methods to extract values for a keys as "JOB_ID", "CMD", "OPTIONS", "DATA", or "STATUS * from a JSON schema structured as follows: {JOB_ID:num, CMD:enum, OPTIONS:string, DATA:string, STATUS:num}. */ class TelegramParser { From df9ef42163edd903baebf23d4f64d04999688560 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 16:10:14 +0300 Subject: [PATCH 06/57] add doc for bytearray.h --- vpr/src/server/bytearray.h | 93 +++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/vpr/src/server/bytearray.h b/vpr/src/server/bytearray.h index 0af8de5bdb2..e0f014cf9e1 100644 --- a/vpr/src/server/bytearray.h +++ b/vpr/src/server/bytearray.h @@ -17,31 +17,93 @@ class ByteArray : public std::vector { public: static const std::size_t DEFAULT_SIZE_HINT = 1024; - ByteArray(const char* data) + /** + * @brief Constructs a ByteArray from a null-terminated C string. + * + * Constructs a ByteArray object from the specified null-terminated C string. + * The constructor interprets the input string as a sequence of bytes until the + * null terminator '\0' is encountered, and initializes the ByteArray with those bytes. + * + * @param data A pointer to the null-terminated C string from which to construct the ByteArray. + */ + explicit ByteArray(const char* data) : std::vector(reinterpret_cast(data), reinterpret_cast(data + std::strlen(data))) {} + /** + * @brief Constructs a ByteArray from a raw character array. + * + * Constructs a ByteArray object from the specified raw character array, + * with the given size. This constructor interprets the input data as a sequence + * of bytes and initializes the ByteArray with those bytes. + * + * @param data A pointer to the raw character array from which to construct the ByteArray. + * @param size The size of the raw character array, in bytes. + */ ByteArray(const char* data, std::size_t size) : std::vector(reinterpret_cast(data), reinterpret_cast(data + size)) {} - ByteArray(std::size_t size_hint = DEFAULT_SIZE_HINT) { + /** + * @brief Constructs a byte array with the specified size hint. + * + * This constructor initializes the byte array with an initial capacity determined by the size hint. + * + * @param size_hint The initial capacity hint for the byte array. + */ + explicit ByteArray(std::size_t size_hint = DEFAULT_SIZE_HINT) { reserve(size_hint); } + /** + * @brief Constructs a byte array from the elements in the range [first, last). + * + * This constructor initializes the byte array with the elements in the range [first, last), + * where `first` and `last` are iterators defining the range. + * + * @tparam Iterator The type of iterator used to specify the range. + * @param first An iterator to the first element in the range. + * @param last An iterator to the last element in the range. + */ template ByteArray(Iterator first, Iterator last): std::vector(first, last) {} + /** + * @brief Appends the content of another byte array to the end of this byte array. + * + * This function adds all the bytes from the specified byte array `appendix` + * to the end of this byte array. + * + * @param appendix The byte array whose content is to be appended. + */ void append(const ByteArray& appendix) { insert(end(), appendix.begin(), appendix.end()); } + /** + * @brief Appends a byte to the end of the byte array. + * + * This function adds the specified byte to the end of the byte array. + * + * @param b The byte to append to the byte array. + */ void append(uint8_t b) { push_back(b); } + /** + * @brief Finds the position of the specified sequence in the byte array. + * + * This function searches for the specified sequence of characters within the byte array. + * If the sequence is found, the function returns the position of its first occurrence. + * If the sequence is not found, it returns `std::size_t(-1)`. + * + * @param sequence A pointer to the sequence of characters to search for. + * @param sequence_size The size of the sequence to search for. + * @return The position of the first occurrence of the sequence, or `std::size_t(-1)` if not found. + */ std::size_t find_sequence(const char* sequence, std::size_t sequence_size) { const std::size_t ssize = size(); if (ssize >= sequence_size) { @@ -61,14 +123,41 @@ class ByteArray : public std::vector { return std::size_t(-1); } + /** + * @brief Converts the byte array to a string. + * + * This function creates a string by interpreting the byte array as a sequence of characters. + * It returns the resulting string. + * + * @return A string representation of the byte array. + */ std::string to_string() const { return std::string(reinterpret_cast(this->data()), this->size()); } + /** + * @brief Calculates the checksum of the elements in the container. + * + * This function iterates over each element in the container and adds their unsigned integer representations + * to the sum. The result is returned as a 32-bit unsigned integer. + * + * @return The checksum of the elements in the container. + */ uint32_t calc_check_sum() { return calc_check_sum(*this); } + /** + * @brief Calculates the checksum of the elements in the given iterable container. + * + * This function template calculates the checksum of the elements in the provided iterable container. + * It iterates over each element in the container and adds their unsigned integer representations to the sum. + * The result is returned as a 32-bit unsigned integer. + * + * @tparam T The type of the iterable container. + * @param iterable The iterable container whose elements checksum is to be calculated. + * @return The checksum of the elements in the iterable container. + */ template static uint32_t calc_check_sum(const T& iterable) { uint32_t sum = 0; From 81b34e5bd549468581d0f32f04655faee3ab338e Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 16:38:09 +0300 Subject: [PATCH 07/57] add more comments for server mode --- doc/src/api/vpr/server.rst | 4 ---- vpr/src/server/gateio.h | 8 +++++++- vpr/src/server/pathhelper.h | 27 ++++++++++++++++++++++----- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/doc/src/api/vpr/server.rst b/doc/src/api/vpr/server.rst index 0360adaa782..402306d0efd 100644 --- a/doc/src/api/vpr/server.rst +++ b/doc/src/api/vpr/server.rst @@ -5,9 +5,6 @@ Server Classes ------- -.. doxygenfunction:: try_compress - :project: vpr - .. doxygenclass:: server::GateIO :project: vpr :members: @@ -26,7 +23,6 @@ Classes .. doxygenfunction:: server::update :project: vpr - :members: .. doxygenstruct:: server::CritPathsResult :project: vpr diff --git a/vpr/src/server/gateio.h b/vpr/src/server/gateio.h index f29b2a80dca..f32bc272a9d 100644 --- a/vpr/src/server/gateio.h +++ b/vpr/src/server/gateio.h @@ -150,7 +150,13 @@ class GateIO GateIO(GateIO&&) = delete; GateIO& operator=(GateIO&&) = delete; - // Check if the port listening process is currently running + /** + * @brief Checks if the port listening process is currently running. + * + * This method returns a boolean indicating whether the port listening process is currently running. + * + * @return True if the port listening process is running, false otherwise. + */ bool is_running() const { return m_is_running.load(); } /** diff --git a/vpr/src/server/pathhelper.h b/vpr/src/server/pathhelper.h index 8bf5fcaf9a8..78e9b21dbb5 100644 --- a/vpr/src/server/pathhelper.h +++ b/vpr/src/server/pathhelper.h @@ -13,18 +13,35 @@ namespace server { /** * @brief Structure to retain the calculation result of the critical path. - * - * It contains the critical path list and the generated report as a string. */ struct CritPathsResult { + /** + * @brief Checks if the CritPathsResult contains report. + * @return True if contains report, false otherwise. + */ bool is_valid() const { return !report.empty(); } + + /** + * @brief Vector containing timing paths. + */ std::vector paths; + + /** + * @brief String containing the generated report. + */ std::string report; }; -/** - * @brief Helper function to calculate critical path timing report with specified parameters. - */ +/** +* @brief Calculates the critical path. + +* This function calculates the critical path based on the provided parameters. +* @param type The type of the critical path. +* @param crit_path_num The max number of the critical path. +* @param details_level The level of detail for the timing report. +* @param is_flat_routing Indicates whether flat routing should be used. +* @return The result of the critical path calculation. @see CritPathsResult +*/ CritPathsResult calc_critical_path(const std::string& type, int crit_path_num, e_timing_report_detail details_level, bool is_flat_routing); } // namespace server From 1e5880353fc647c1950c449207d3b6977ac6360d Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 19:38:11 +0300 Subject: [PATCH 08/57] cover server/task.h with comments --- vpr/src/server/task.cpp | 2 +- vpr/src/server/task.h | 129 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 126 insertions(+), 5 deletions(-) diff --git a/vpr/src/server/task.cpp b/vpr/src/server/task.cpp index 985444663fe..b6e66161b51 100644 --- a/vpr/src/server/task.cpp +++ b/vpr/src/server/task.cpp @@ -27,7 +27,7 @@ void Task::chop_num_sent_bytes_from_response_buffer(std::size_t bytes_sent_num) } } -bool Task::options_match(const class std::unique_ptr& other) { +bool Task::options_match(const std::unique_ptr& other) { if (other->options().size() != m_options.size()) { return false; } diff --git a/vpr/src/server/task.h b/vpr/src/server/task.h index 4d4510bbaf3..18e509fa94d 100644 --- a/vpr/src/server/task.h +++ b/vpr/src/server/task.h @@ -19,35 +19,156 @@ namespace server { */ class Task { public: + /** + * @brief Constructs a new Task object. + * + * @param job_id The ID of the job associated with the task. + * @param cmd The command associated with the task. + * @param options Additional options for the task (default: empty string). + */ Task(int job_id, int cmd, const std::string& options = ""); Task(const Task&) = delete; Task& operator=(const Task&) = delete; + /** + * @brief Gets the job ID associated with the task. + * + * @return The job ID. + */ int job_id() const { return m_job_id; } - int cmd() const { return m_cmd; } - - void chop_num_sent_bytes_from_response_buffer(std::size_t bytesSentNum); - bool options_match(const class std::unique_ptr& other); + /** + * @brief Gets the command associated with the task. + * + * @return The command. + */ + int cmd() const { return m_cmd; } + /** + * @brief Removes the specified number of bytes from the response buffer. + * + * This method removes the specified number of bytes from the beginning of the response buffer. + * It is typically used after sending a response to discard the bytes that have been sent. + * + * @param bytes_sent_num The number of bytes to remove from the response buffer. + */ + void chop_num_sent_bytes_from_response_buffer(std::size_t bytes_sent_num); + + /** + * @brief Checks if the options of this task match the options of another task. + * + * This method compares the options of this task with the options of another task + * and returns true if they match, otherwise returns false. + * + * @param other The other task to compare options with. + * @return True if the options match, false otherwise. + */ + bool options_match(const std::unique_ptr& other); + + /** + * @brief Retrieves the response buffer. + * + * This method returns a constant reference to the response buffer, which contains the data after task execution. + * + * @return A constant reference to the response buffer. + */ const std::string& response_buffer() const { return m_response_buffer; } + /** + * @brief Checks if the task has finished execution. + * + * This method returns true if the task has finished execution; otherwise, it returns false. + * + * @return True if the task has finished execution, false otherwise. + */ bool is_finished() const { return m_is_finished; } + + /** + * @brief Checks if the task has encountered an error. + * + * This method returns true if the task has encountered an error; otherwise, it returns false. + * + * @return True if the task has encountered an error, false otherwise. + */ bool has_error() const { return !m_error.empty(); } + + /** + * @brief Retrieves the error message associated with the task. + * + * This method returns the error message associated with the task, if any. + * + * @return A constant reference to the error message string. + */ const std::string& error() const { return m_error; } + /** + * @brief Retrieves the original number of response bytes. + * + * This method returns the original number of response bytes before any chopping operation. + * + * @return The original number of response bytes. + */ std::size_t orig_reponse_bytes_num() const { return m_orig_reponse_bytes_num; } + /** + * @brief Checks if the response has been fully sent. + * + * This method returns true if the entire response has been successfully sent, + * otherwise it returns false. + * + * @return True if the response has been fully sent, false otherwise. + */ bool is_response_fully_sent() const { return m_is_response_fully_sent; } + /** + * @brief Marks the task as failed with the specified error message. + * + * This method sets the task's error message to the provided error string, + * indicating that the task has failed. + * + * @param error The error message describing the reason for the task's failure. + */ void fail(const std::string& error); + + /** + * @brief Marks the task as successfully completed with the specified result. + * + * This method marks the task as successfully completed. Optionally, it can + * include a result string to describe the outcome of the task execution. + * + * @param result An optional string describing the result of the task execution. + */ void success(const std::string& result = ""); + /** + * @brief Generates a string containing information about the task. + * + * This method generates a string containing information about the task, + * including its identifier, command, options, and optionally its duration. + * + * @param skip_duration If true, the duration information will be omitted from the string. + * + * @return A string containing information about the task. + */ std::string info(bool skip_duration = false) const; + /** + * @brief Retrieves the TelegramHeader associated with the task. + * + * This method returns a reference to the TelegramHeader associated with the task. + * + * @return A reference to the TelegramHeader associated with the task. + */ const comm::TelegramHeader& telegram_header() const { return m_telegram_header; } + /** + * @brief Retrieves the options associated with the task. + * + * This method returns a reference to the options string associated with the task. + * + * @return A reference to the options string associated with the task. + */ const std::string& options() const { return m_options; } private: From af2f59771f34ef6afe3a8c1b4021c944c1f5fb46 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 20:17:27 +0300 Subject: [PATCH 09/57] add comments to server/telegramoptions.h --- vpr/src/server/telegramoptions.h | 82 ++++++++++++++++++++++++++++---- 1 file changed, 73 insertions(+), 9 deletions(-) diff --git a/vpr/src/server/telegramoptions.h b/vpr/src/server/telegramoptions.h index 2d3a00b8952..afa37e1478a 100644 --- a/vpr/src/server/telegramoptions.h +++ b/vpr/src/server/telegramoptions.h @@ -13,7 +13,7 @@ namespace server { /** * @brief Option class Parser - * + * * Parse the string of options in the format "TYPE:KEY1:VALUE1;TYPE:KEY2:VALUE2", * for example "int:path_num:11;string:path_type:debug;int:details_level:3;bool:is_flat_routing:0". * It provides a simple interface to check value presence and access them. @@ -34,19 +34,83 @@ class TelegramOptions { }; public: + /** + * @brief Constructs a TelegramOptions object with the provided data and expected keys. + * + * This constructor initializes a TelegramOptions object with the given data string + * and a vector of expected keys. It parse data string and validate that such data has all required keys. + * If some keys are absent, it collects the errors. + * + * @param data The data string containing the options. + * @param expected_keys A vector of strings representing the expected keys in the options. + */ TelegramOptions(const std::string& data, const std::vector& expected_keys); ~TelegramOptions()=default; + /** + * @brief Checks if there are any errors present. + * + * This function returns true if there are errors present in the error container, + * otherwise it returns false. + * + * @return True if there are errors present, false otherwise. + */ bool has_errors() const { return !m_errors.empty(); } - std::map> get_map_of_sets(const std::string& name); - - std::string get_string(const std::string& name); - - int get_int(const std::string& name, int fail_value); - - bool get_bool(const std::string& name, bool fail_value); - + /** + * @brief Retrieves a map of sets associated with the specified key. + * + * This function retrieves a map of sets associated with the specified key. + * + * @param key The key of the map of sets to retrieve. + * @return The map of sets associated with the specified key. + */ + std::map> get_map_of_sets(const std::string& key); + + /** + * @brief Retrieves the string associated with the specified key. + * + * This function retrieves the string associated with the specified key. + * The key is used to identify the desired string value. + * + * @param key The key of the string to retrieve. + * @return The string associated with the specified key. + */ + std::string get_string(const std::string& key); + + /** + * @brief Retrieves the integer value associated with the specified key. + * + * This function retrieves the integer value associated with the specified key. + * If the key is found, its corresponding integer value is returned. + * If the key is not found, the specified fail_value is returned instead. + * + * @param key The key whose associated integer value is to be retrieved. + * @param fail_value The value to return if the key is not found. + * @return The integer value associated with the specified key, or fail_value if the key is not found. + */ + int get_int(const std::string& key, int fail_value); + + /** + * @brief Retrieves the boolean value associated with the specified key. + * + * This function retrieves the boolean value associated with the specified key. + * + * @param key The key whose associated boolean value is to be retrieved. + * @param fail_value The value to return if the key is not found. + * @return The boolean value associated with the specified key, or fail_value if the key is not found. + */ + bool get_bool(const std::string& key, bool fail_value); + + /** + * @brief Retrieves a concatenated string of all errors stored in the container. + * + * This function retrieves a concatenated string of all errors stored in the container. + * It concatenates all error strings stored in the container and returns the result. + * If there are no errors stored in the container, an empty string is returned. + * + * @return A concatenated string of all errors stored in the container. + */ std::string errors_str() const; private: From 84881e642e3342e49dddd3d8d886ecf9173ed931 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 20:51:21 +0300 Subject: [PATCH 10/57] add comments for server/telegramheader.h --- vpr/src/server/telegramheader.h | 73 ++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/vpr/src/server/telegramheader.h b/vpr/src/server/telegramheader.h index 422927c9c5e..29ff4b558dd 100644 --- a/vpr/src/server/telegramheader.h +++ b/vpr/src/server/telegramheader.h @@ -33,30 +33,101 @@ class TelegramHeader { static constexpr size_t COMPRESSORID_OFFSET = CHECKSUM_OFFSET + CHECKSUM_SIZE; TelegramHeader()=default; - explicit TelegramHeader(uint32_t length, uint32_t checkSum, uint8_t compressorId = 0); + + /** + * @brief Constructs a TelegramHeader object with the specified length, checksum, and optional compressor ID. + * + * @param length The length of the telegram body. + * @param check_sum The checksum of the telegram body. + * @param compressor_id The compressor ID used for compressing the telegram body (default is 0). + */ + explicit TelegramHeader(uint32_t length, uint32_t check_sum, uint8_t compressor_id = 0); + + /** + * @brief Constructs a TelegramHeader object from the provided byte buffer. + * + * This constructor initializes a TelegramHeader object using the length and checksum information taken from the provided byte buffer. + * + * @param body The ByteArray containing the header data of the telegram. + */ explicit TelegramHeader(const ByteArray& body); + ~TelegramHeader()=default; + /** + * @brief Constructs a TelegramHeader based on the provided body data. + * + * @tparam T The type of the body data. + * @param body The body data used to calculate the size and checksum. + * @param compressor_id The ID of the compressor used for compression (default is 0, means no compressor is used). + * @return A TelegramHeader object constructed from the provided body data. + */ template static comm::TelegramHeader construct_from_data(const T& body, uint8_t compressor_id = 0) { uint32_t body_check_sum = ByteArray::calc_check_sum(body); return comm::TelegramHeader{static_cast(body.size()), body_check_sum, compressor_id}; } + /** + * @brief Returns the total size of the TelegramHeader. + * + * This static constexpr method returns the total size of the TelegramHeader, including all its components. + * + * @return The total size of the TelegramHeader. + */ static constexpr size_t size() { return SIGNATURE_SIZE + LENGTH_SIZE + CHECKSUM_SIZE + COMPRESSORID_SIZE; } + /** + * @brief To checks if the TelegramHeader is valid. + * + * @return True if the TelegramHeader is valid, false otherwise. + */ bool is_valid() const { return m_is_valid; } + /** + * @brief Retrieves the buffer associated with the TelegramHeader. + * + * This method returns a constant reference to the buffer associated with the TelegramHeader. + * + * @return A constant reference to the buffer. + */ const ByteArray& buffer() const { return m_buffer; } + /** + * @brief Retrieves the number of bytes in the telegram body. + * + * @return The number of bytes in the telegram body. + */ uint32_t body_bytes_num() const { return m_body_bytes_num; } + + /** + * @brief Retrieves the checksum of telegram body. + * + * @return The checksum of telegram body. + */ uint32_t body_check_sum() const { return m_body_check_sum; } + + /** + * @brief Retrieves the compressor ID used for compressing telegram body. + * + * @return The compressor ID of the telegram body. 0 if the telegram body is not compressed. + */ uint8_t compressor_id() const { return m_compressor_id; } + /** + * @brief Checks if the telegram body is compressed. + * + * @return True if the telegram body is compressed; otherwise, false. + */ bool is_body_compressed() const { return m_compressor_id != 0; } + /** + * @brief Retrieves information about the telegram header. + * + * @return A string containing information about the telegram header. + */ std::string info() const; private: From 9c08e5146fc0abb2590a69e2676c1e02c0016140 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 20:55:17 +0300 Subject: [PATCH 11/57] correct .. doxygenfunction:: server::calc_critical_path --- doc/src/api/vpr/server.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/src/api/vpr/server.rst b/doc/src/api/vpr/server.rst index 402306d0efd..3648e601e47 100644 --- a/doc/src/api/vpr/server.rst +++ b/doc/src/api/vpr/server.rst @@ -30,7 +30,6 @@ Classes .. doxygenfunction:: server::calc_critical_path :project: vpr - :members: .. doxygenclass:: comm::ByteArray :project: vpr From 5fd9029423a8c4cac0672830e034d8408cc5219b Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 21:07:06 +0300 Subject: [PATCH 12/57] add few more comments for server mode code --- vpr/src/server/gateio.h | 3 +++ vpr/src/server/taskresolver.h | 13 ++++++++----- vpr/src/server/telegrambuffer.h | 12 ++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/vpr/src/server/gateio.h b/vpr/src/server/gateio.h index f32bc272a9d..092dd057876 100644 --- a/vpr/src/server/gateio.h +++ b/vpr/src/server/gateio.h @@ -141,6 +141,9 @@ class GateIO const int LOOP_INTERVAL_MS = 100; public: + /** + * @brief Default constructor for GateIO. + */ GateIO(); ~GateIO(); diff --git a/vpr/src/server/taskresolver.h b/vpr/src/server/taskresolver.h index 3ef180e48ba..eca06bc1b74 100644 --- a/vpr/src/server/taskresolver.h +++ b/vpr/src/server/taskresolver.h @@ -20,29 +20,32 @@ namespace server { * * Process and resolve server task, store result and status for processed task. */ - class TaskResolver { public: + /** + * @brief Default constructor for TaskResolver. + */ TaskResolver()=default; + ~TaskResolver()=default; int tasks_num() const { return m_tasks.size(); } /** * @brief Takes ownership of a task. - * + * * This method takes ownership of a task by moving it into the TaskResolver's internal task queue. * After calling this method, the task will be owned and managed by the TaskResolver. - * + * * @param task The task to take ownership of. After calling this method, the task object will be in a valid but unspecified state. - * + * * @note After calling this method, the caller should avoid accessing or modifying the task object. */ void own_task(TaskPtr&& task); /** * @brief Resolve queued tasks. - * + * * @param app A pointer to the ezgl::application object representing the application instance. */ bool update(ezgl::application* app); diff --git a/vpr/src/server/telegrambuffer.h b/vpr/src/server/telegrambuffer.h index 6e7db29b2a1..b3b58896cf6 100644 --- a/vpr/src/server/telegrambuffer.h +++ b/vpr/src/server/telegrambuffer.h @@ -23,8 +23,20 @@ class TelegramBuffer static const std::size_t DEFAULT_SIZE_HINT = 1024; public: + /** + * @brief Constructs a TelegramBuffer object with a default size hint. + * + * This constructor initializes a TelegramBuffer object with a default size hint for the raw buffer. + */ TelegramBuffer(): m_raw_buffer(DEFAULT_SIZE_HINT) {} + + /** + * @brief Constructs a TelegramBuffer object with a specified size hint. + * + * This constructor initializes a TelegramBuffer object with a specified size hint for the raw buffer. + */ explicit TelegramBuffer(std::size_t sizeHint): m_raw_buffer(sizeHint) {} + ~TelegramBuffer()=default; /** From a977ca4d84fea31a1d41dcdf02c8e7f2a2efcf70 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 21:50:49 +0300 Subject: [PATCH 13/57] update doc for draw_crit_path_elements --- vpr/src/draw/draw_basic.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vpr/src/draw/draw_basic.h b/vpr/src/draw/draw_basic.h index 8a163c7274c..898fb32dd3f 100644 --- a/vpr/src/draw/draw_basic.h +++ b/vpr/src/draw/draw_basic.h @@ -111,6 +111,10 @@ void draw_crit_path(ezgl::renderer* g); * * This function draws critical path elements based on the provided timing paths * and indexes map. It is primarily used in server mode, where items are drawn upon request. + * + * @param paths The vector of TimingPath objects representing the critical paths. + * @param indexes The map of sets containing indexes of critical path elements to draw. + * @param g Pointer to the ezgl::renderer object on which the elements will be drawn. */ void draw_crit_path_elements(const std::vector& paths, const std::map>& indexes, ezgl::renderer* g); From c0fe33ed1eda365bffcc41aaadf9fcbf0792f474 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 22:17:37 +0300 Subject: [PATCH 14/57] fix telegramframe doc --- doc/src/api/vpr/server.rst | 7 ++----- vpr/src/server/gateio.h | 4 ++-- vpr/src/server/telegrambuffer.h | 2 +- vpr/src/server/telegramframe.h | 11 +++++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/src/api/vpr/server.rst b/doc/src/api/vpr/server.rst index 3648e601e47..5c01fd3d04b 100644 --- a/doc/src/api/vpr/server.rst +++ b/doc/src/api/vpr/server.rst @@ -2,8 +2,8 @@ Server ======== -Classes -------- +.. doxygenfunction:: server::update + :project: vpr .. doxygenclass:: server::GateIO :project: vpr @@ -21,9 +21,6 @@ Classes :project: vpr :members: -.. doxygenfunction:: server::update - :project: vpr - .. doxygenstruct:: server::CritPathsResult :project: vpr :members: diff --git a/vpr/src/server/gateio.h b/vpr/src/server/gateio.h index 092dd057876..729dedc39db 100644 --- a/vpr/src/server/gateio.h +++ b/vpr/src/server/gateio.h @@ -198,9 +198,9 @@ class GateIO * Once started,the server will continue running in a separate thread and will accept connection only from a single client * attempting to connect to the specified port. * - * @param portNum The port number on which the server will listen for incoming connection. + * @param port_num The port number on which the server will listen for incoming connection. */ - void start(int portNum); + void start(int port_num); /** * @brief Stops the server and terminates the listening thread. diff --git a/vpr/src/server/telegrambuffer.h b/vpr/src/server/telegrambuffer.h index b3b58896cf6..781ee6e1861 100644 --- a/vpr/src/server/telegrambuffer.h +++ b/vpr/src/server/telegrambuffer.h @@ -35,7 +35,7 @@ class TelegramBuffer * * This constructor initializes a TelegramBuffer object with a specified size hint for the raw buffer. */ - explicit TelegramBuffer(std::size_t sizeHint): m_raw_buffer(sizeHint) {} + explicit TelegramBuffer(std::size_t size_hint): m_raw_buffer(size_hint) {} ~TelegramBuffer()=default; diff --git a/vpr/src/server/telegramframe.h b/vpr/src/server/telegramframe.h index c542d41d1ee..c73096a5ad0 100644 --- a/vpr/src/server/telegramframe.h +++ b/vpr/src/server/telegramframe.h @@ -10,17 +10,20 @@ namespace comm { - /** * @brief Structure representing a TelegramFrame. * * A TelegramFrame consists of a TelegramHeader followed by data. -* -* @var header The TelegramHeader containing metadata about the telegram message. @see TelegramHeader -* @var data The actual data of the telegram message. */ struct TelegramFrame { + /** + * @brief header The TelegramHeader containing metadata about the telegram message. + */ TelegramHeader header; + + /** + * @brief data The actual data of the telegram message. + */ ByteArray data; }; using TelegramFramePtr = std::shared_ptr; From 7418fa44bf9c1dd7123b77baa3ee883e6355d6d8 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 22:53:30 +0300 Subject: [PATCH 15/57] work on server_mode/index.rst --- doc/src/vtr/server_mode/index.rst | 55 ++++++++++++++++++------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/doc/src/vtr/server_mode/index.rst b/doc/src/vtr/server_mode/index.rst index 56389fd8a6b..d754bbd146e 100644 --- a/doc/src/vtr/server_mode/index.rst +++ b/doc/src/vtr/server_mode/index.rst @@ -30,7 +30,7 @@ Telegram is a byte sequence consist from the two parts: fixed size **telegram he Communication telegram body structure. - **telegram body** is flat json structure. + **telegram body** is flat **JSON** structure. **CMD** could have following values: @@ -42,13 +42,18 @@ Telegram is a byte sequence consist from the two parts: fixed size **telegram he .. note:: telegram body itself could be compressed with zlib, to minimize amount of data transfered over socket. This is done for **get critical path** response. The compressor id byte in header sinalize if the telegram body is compressed. -Telegram body examples ----------------------- +Get critical path timing report example +--------------------------------------- -.. option:: Get critical path timing report + Let's take a look at an example of a request timing report telegram body with the following options: + + - path_num = 1 + - path_type = "setup" + - details_level = "netlist" + - is_flat_routing = false .. code-block:: json - :caption: **request** example of JSON telegram body + :caption: telegram body **REQUEST** example :linenos: { @@ -57,20 +62,20 @@ Telegram body examples "OPTIONS": "int:path_num:1;string:path_type:setup;string:details_level:netlist;bool:is_flat_routing:0" } - **path_type** could have following values: + **path_type** could have following string values: - - setup - - hold + - "setup" + - "hold" - **details_level** could have following values: + **details_level** could have following string values: - - netlist - - aggregated - - detailed - - debug + - "netlist" + - "aggregated" + - "detailed" + - "debug" .. code-block:: json - :caption: **response** example of JSON telegram body + :caption: telegram body **RESPONSE** example :linenos: { @@ -147,11 +152,17 @@ Telegram body examples "STATUS": "1" } -.. option:: Highlight selected critical path elements +Draw selected critical path elements example -------------------------------------------- + Let's take a look at an example of a request timing report telegram body with the following options: + + - path_elements = path 0 and it's sub-elements 10,11,12,13,14,15,20,21,22,23,24,25 + - high_light_mode = "crit path flylines delays" + - draw_path_contour = 1 + .. code-block:: json - :caption: **request** example of JSON telegram body + :caption: telegram body **REQUEST** example :linenos: { @@ -160,15 +171,15 @@ Telegram body examples "OPTIONS": "string:path_elements:0#10,11,12,13,14,15,20,21,22,23,24,25;string:high_light_mode:crit path flylines delays;bool:draw_path_contour:1" } - **high_light_mode** could have following values: + **high_light_mode** could have following string values: - - crit path flylines - - crit path flylines delays - - crit path routing - - crit path routing delays + - "crit path flylines" + - "crit path flylines delays" + - "crit path routing" + - "crit path routing delays" .. code-block:: json - :caption: **response** exampler of JSON telegram body + :caption: telegram body **RESPONSE** example :linenos: { From b5f304964245897a21637cd1244f6c735b17ea4e Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 23:16:37 +0300 Subject: [PATCH 16/57] server mode doc corrections --- doc/src/vtr/server_mode/index.rst | 19 ++++++++++++------- vpr/src/server/gateio.h | 7 +++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/doc/src/vtr/server_mode/index.rst b/doc/src/vtr/server_mode/index.rst index d754bbd146e..5327f3852fd 100644 --- a/doc/src/vtr/server_mode/index.rst +++ b/doc/src/vtr/server_mode/index.rst @@ -3,19 +3,19 @@ Server Mode ================ -VTR provides ability to run server mode using following command line arguments +VTR provides the ability to run in server mode using the following command-line arguments. .. code-block:: none --server --port_num 60555 -Server mode may accept only single client application connection and response with two kind of requests: **get critical path list** and **highlight selected critical path elements** +Server mode may only accept a single client application connection and respond to two types of requests: **get critical path report** and **highlight selected critical path elements**. Communication telegram ------------------------- -Telegram is a byte sequence consist from the two parts: fixed size **telegram header** and **telegram body** which could have vary size. -**telegram header** is set of helper infomation to properly extract telegram body sequence from the data flow. +Telegram consists of two parts: a fixed-size **telegram header** and a variable-size **telegram body**. +The telegram header contains helper information required to properly extract the telegram body sequence from the data flow. .. _fig_comm_telegram_structure: @@ -32,15 +32,16 @@ Telegram is a byte sequence consist from the two parts: fixed size **telegram he **telegram body** is flat **JSON** structure. - **CMD** could have following values: + **CMD** could have following integer values: - 0 - command id for **get critical path** - 1 - command id for **highlight selected path elements** JOB_ID - is unique id for a task. - .. note:: telegram body itself could be compressed with zlib, to minimize amount of data transfered over socket. - This is done for **get critical path** response. The compressor id byte in header sinalize if the telegram body is compressed. + .. note:: The telegram body itself could be compressed with zlib to minimize the amount of data transferred over the socket. + This compression is applied to the response of the 'get critical path report' request. + The compressor ID byte in the telegram header signals whether the telegram body is compressed. Get critical path timing report example --------------------------------------- @@ -74,6 +75,8 @@ Get critical path timing report example - "detailed" - "debug" + Response will look like: + .. code-block:: json :caption: telegram body **RESPONSE** example :linenos: @@ -178,6 +181,8 @@ Draw selected critical path elements example - "crit path routing" - "crit path routing delays" + Response will look like: + .. code-block:: json :caption: telegram body **RESPONSE** example :linenos: diff --git a/vpr/src/server/gateio.h b/vpr/src/server/gateio.h index 729dedc39db..81fade5dd06 100644 --- a/vpr/src/server/gateio.h +++ b/vpr/src/server/gateio.h @@ -26,10 +26,9 @@ namespace server { * * Operable only with a single client. As soon as client connection is detected * it begins listening on the specified port number for incoming client requests, - * collects and encapsulates them into tasks. - * The incoming tasks are extracted and handled by the top-level logic (TaskResolver). - * Once the tasks are resolved by the TaskResolver, they are returned - * to be sent back to the client as a response. + * collects and encapsulates them into tasks @ref Task. + * The incoming tasks are extracted and handled by the top-level logic @ref TaskResolver. + * Once the tasks are resolved by the @ref TaskResolver, they are returned to be sent back to the client as a response. * * @note * - The GateIO instance should be created and managed from the main thread, while its internal processing From 3ecdfa846a6c2dc753de7e3fde070e6b34fc1e1e Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Wed, 8 May 2024 23:56:12 +0300 Subject: [PATCH 17/57] adjustments for server/index.rst --- doc/src/api/vpr/server.rst | 38 ++++++++++++++++++++++++++++++-------- vpr/src/server/gateio.h | 9 +++++---- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/doc/src/api/vpr/server.rst b/doc/src/api/vpr/server.rst index 5c01fd3d04b..7f9e4f1e550 100644 --- a/doc/src/api/vpr/server.rst +++ b/doc/src/api/vpr/server.rst @@ -2,22 +2,30 @@ Server ======== +server::update +-------------- + .. doxygenfunction:: server::update :project: vpr +server::GateIO +-------------- + .. doxygenclass:: server::GateIO :project: vpr :members: +server::Task +------------ + .. doxygenclass:: server::Task :project: vpr :members: -.. doxygenclass:: server::TaskResolver - :project: vpr - :members: +server::TaskResolver +-------------------- -.. doxygenclass:: server::TelegramOptions +.. doxygenclass:: server::TaskResolver :project: vpr :members: @@ -28,7 +36,14 @@ Server .. doxygenfunction:: server::calc_critical_path :project: vpr -.. doxygenclass:: comm::ByteArray +comm::Telegram +-------------- + +.. doxygenclass:: comm::TelegramHeader + :project: vpr + :members: + +.. doxygenstruct:: comm::TelegramFrame :project: vpr :members: @@ -36,18 +51,25 @@ Server :project: vpr :members: -.. doxygenclass:: comm::TelegramHeader +.. doxygenclass:: comm::ByteArray :project: vpr :members: -.. doxygenclass:: comm::TelegramParser +Parsers +------- + +.. doxygenclass:: server::TelegramOptions :project: vpr :members: -.. doxygenstruct:: comm::TelegramFrame +.. doxygenclass:: comm::TelegramParser :project: vpr :members: + +Compression utils +----------------- + .. doxygenfunction:: try_compress :project: vpr diff --git a/vpr/src/server/gateio.h b/vpr/src/server/gateio.h index 81fade5dd06..d5622c796cb 100644 --- a/vpr/src/server/gateio.h +++ b/vpr/src/server/gateio.h @@ -26,15 +26,16 @@ namespace server { * * Operable only with a single client. As soon as client connection is detected * it begins listening on the specified port number for incoming client requests, - * collects and encapsulates them into tasks @ref Task. - * The incoming tasks are extracted and handled by the top-level logic @ref TaskResolver. - * Once the tasks are resolved by the @ref TaskResolver, they are returned to be sent back to the client as a response. + * collects and encapsulates them into tasks (see @ref Task). + * The incoming tasks are extracted and handled by the top-level logic @ref TaskResolver in main thread. + * Once the tasks are resolved by the @ref TaskResolver, they are returned to be sent back to the client app as a response. + * Extraction and puting @ref Task is taken from main thread inside @ref server::update. * * @note * - The GateIO instance should be created and managed from the main thread, while its internal processing * and IO operations are performed asynchronously in a separate thread. This separation ensures smooth IO behavior * and responsiveness of the application. - * - Gateio is not started automatically upon creation, you have to use the 'start' method with the port number. + * - GateIO is not started automatically upon creation, you have to use the 'start' method with the port number. * - The socket is initialized in a non-blocking mode to function properly in a multithreaded environment. */ class GateIO From 034ef1be9bacbffbc296a85e188653c4b9e95760 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 24 May 2024 12:32:47 +0300 Subject: [PATCH 18/57] fix post-merge build error --- vpr/src/server/taskresolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/server/taskresolver.cpp b/vpr/src/server/taskresolver.cpp index fa25b3ae321..2bdd37c5ebc 100644 --- a/vpr/src/server/taskresolver.cpp +++ b/vpr/src/server/taskresolver.cpp @@ -101,7 +101,7 @@ void TaskResolver::process_get_path_list_task(ezgl::application*, const TaskPtr& if (details_level_opt) { CritPathsResultPtr crit_paths_result = calc_critical_path(path_type, n_critical_path_num, details_level_opt.value(), is_flat); if (crit_paths_result->is_valid()) { - server_ctx.set_crit_paths(std::move(crit_paths_result->paths)); + server_ctx.crit_paths = std::move(crit_paths_result->paths); task->success(std::move(crit_paths_result->report)); } else { std::string msg{"Critical paths report is empty"}; From edd1e49bbf8dc4b01c3c3012b2cf74f8761bc66f Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 24 May 2024 16:28:39 +0300 Subject: [PATCH 19/57] correct comment for void draw_crit_path --- vpr/src/draw/draw_basic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/draw/draw_basic.h b/vpr/src/draw/draw_basic.h index 055965c0bd7..c87fccf3edf 100644 --- a/vpr/src/draw/draw_basic.h +++ b/vpr/src/draw/draw_basic.h @@ -113,7 +113,7 @@ void draw_crit_path(ezgl::renderer* g); * and indexes map. It is primarily used in server mode, where items are drawn upon request. * * @param paths The vector of TimingPath objects representing the critical paths. - * @param indexes The map of sets containing indexes of critical path elements to draw. + * @param indexes The map of sets, where map keys are path indices and each set contains the indices of sub-path elements to draw. * @param g Pointer to the ezgl::renderer object on which the elements will be drawn. */ void draw_crit_path_elements(const std::vector& paths, const std::map>& indexes, bool draw_crit_path_contour, ezgl::renderer* g); From c738215855fbfccdfe98b71b7f59bef508c53104 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 24 May 2024 16:50:16 +0300 Subject: [PATCH 20/57] update doc for std::pair ByteArray::find_sequence due to it's return structure changed --- vpr/src/server/bytearray.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vpr/src/server/bytearray.h b/vpr/src/server/bytearray.h index 57b38eece1c..de55cd3d291 100644 --- a/vpr/src/server/bytearray.h +++ b/vpr/src/server/bytearray.h @@ -94,12 +94,14 @@ class ByteArray : public std::vector { * @brief Finds the position of the specified sequence in the byte array. * * This function searches for the specified sequence of characters within the byte array. - * If the sequence is found, the function returns the position of its first occurrence. - * If the sequence is not found, it returns `std::size_t(-1)`. + * If the sequence is found, it returns a pair containing `true` and the starting index of the sequence. + * If the sequence is not found, it returns a pair containing `false` and `0`. * * @param sequence A pointer to the sequence of characters to search for. * @param sequence_size The size of the sequence to search for. - * @return The position of the first occurrence of the sequence, or `std::size_t(-1)` if not found. + * @return A `std::pair` where the first element is a boolean indicating whether the sequence was + * found (`true`) or not (`false`), and the second element is the starting index of the sequence if + * found. */ std::pair find_sequence(const char* sequence, std::size_t sequence_size) { const std::size_t ssize = size(); From 6ad25c6fe01b45875e29fdce85488eaa35d5816a Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 24 May 2024 16:56:11 +0300 Subject: [PATCH 21/57] update doc for ByteArray for method for a implicit conversion to std::string_view --- vpr/src/server/bytearray.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vpr/src/server/bytearray.h b/vpr/src/server/bytearray.h index de55cd3d291..59874e255cd 100644 --- a/vpr/src/server/bytearray.h +++ b/vpr/src/server/bytearray.h @@ -123,12 +123,12 @@ class ByteArray : public std::vector { } /** - * @brief Converts the byte array to a string. + * @brief Converts the container to a std::string_view. * - * This function creates a string by interpreting the byte array as a sequence of characters. - * It returns the resulting string. + * This operator allows the container to be implicitly converted to a `std::string_view`, + * providing a non-owning view into the container's data. * - * @return A string representation of the byte array. + * @return A `std::string_view` representing the container's data. */ operator std::string_view() const { return std::string_view(this->data(), this->size()); From e3cea6305c9939e545dac15ff7073b5d9cf4b9ef Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 24 May 2024 17:16:21 +0300 Subject: [PATCH 22/57] update doc for CritPathsResultPtr calc_critical_path(const std::string& type, int crit_path_num, e_timing_report_detail details_level, bool is_flat_routing); --- vpr/src/server/pathhelper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/server/pathhelper.h b/vpr/src/server/pathhelper.h index 507b45771f8..f5c3b8efe8f 100644 --- a/vpr/src/server/pathhelper.h +++ b/vpr/src/server/pathhelper.h @@ -44,7 +44,7 @@ using CritPathsResultPtr = std::shared_ptr; * @param crit_path_num The max number of the critical path. * @param details_level The level of detail for the timing report. * @param is_flat_routing Indicates whether flat routing should be used. -* @return The result of the critical path calculation. @see CritPathsResult +* @return A `CritPathsResultPtr` which is a pointer to the result of the critical path calculation (@see CritPathsResult). */ CritPathsResultPtr calc_critical_path(const std::string& type, int crit_path_num, e_timing_report_detail details_level, bool is_flat_routing); From ec0e3ef00032a823f030210dc4da606ef98463da Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 24 May 2024 17:38:07 +0300 Subject: [PATCH 23/57] update task doc --- vpr/src/server/task.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/vpr/src/server/task.h b/vpr/src/server/task.h index 963305f7aa0..67995f7a59f 100644 --- a/vpr/src/server/task.h +++ b/vpr/src/server/task.h @@ -130,14 +130,20 @@ class Task { * @param error The error message describing the reason for the task's failure. */ void fail(const std::string& error); + + /** + * @brief Marks the task as successfully completed. + */ void success(); + /** * @brief Marks the task as successfully completed with the specified result. * - * This method marks the task as successfully completed. Optionally, it can - * include a result string to describe the outcome of the task execution. + * This method marks the task as successfully completed and stores the result. + * It takes an rvalue reference to a string, allowing for efficient move semantics. * - * @param result An optional string describing the result of the task execution. + * @param result An rvalue reference to a string describing the result of the task execution. + * The content of this string will be moved into the task's result storage. */ void success(std::string&& result); From 60c542668e5e3d820b911e2f617fc6e36222b777 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 24 May 2024 17:38:24 +0300 Subject: [PATCH 24/57] unite telegrambuffer constructors --- vpr/src/server/telegrambuffer.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/vpr/src/server/telegrambuffer.h b/vpr/src/server/telegrambuffer.h index 781ee6e1861..449e7f4fbfd 100644 --- a/vpr/src/server/telegrambuffer.h +++ b/vpr/src/server/telegrambuffer.h @@ -20,22 +20,15 @@ namespace comm { */ class TelegramBuffer { - static const std::size_t DEFAULT_SIZE_HINT = 1024; + inline static const std::size_t DEFAULT_SIZE_HINT = 1024; public: - /** - * @brief Constructs a TelegramBuffer object with a default size hint. - * - * This constructor initializes a TelegramBuffer object with a default size hint for the raw buffer. - */ - TelegramBuffer(): m_raw_buffer(DEFAULT_SIZE_HINT) {} - /** * @brief Constructs a TelegramBuffer object with a specified size hint. * * This constructor initializes a TelegramBuffer object with a specified size hint for the raw buffer. */ - explicit TelegramBuffer(std::size_t size_hint): m_raw_buffer(size_hint) {} + explicit TelegramBuffer(std::size_t size_hint = DEFAULT_SIZE_HINT): m_raw_buffer(size_hint) {} ~TelegramBuffer()=default; From c0ddd92e50a17482078757412757b91dde6e055b Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 24 May 2024 18:00:50 +0300 Subject: [PATCH 25/57] rename member 'data' to 'body' in TelegramFrame --- vpr/src/server/commconstants.h | 2 +- vpr/src/server/gateio.cpp | 14 +++++++------- vpr/src/server/telegrambuffer.cpp | 8 ++++---- vpr/src/server/telegramframe.h | 4 ++-- vpr/test/test_server_telegrambuffer.cpp | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/vpr/src/server/commconstants.h b/vpr/src/server/commconstants.h index 545c00a977b..86c6a8c10d2 100644 --- a/vpr/src/server/commconstants.h +++ b/vpr/src/server/commconstants.h @@ -12,7 +12,7 @@ inline const std::string KEY_CMD{"CMD"}; inline const std::string KEY_OPTIONS{"OPTIONS"}; inline const std::string KEY_DATA{"DATA"}; inline const std::string KEY_STATUS{"STATUS"}; -inline const std::string ECHO_DATA{"ECHO"}; +inline const std::string ECHO_TELEGRAM_BODY{"ECHO"}; const unsigned char ZLIB_COMPRESSOR_ID = 'z'; const unsigned char NONE_COMPRESSOR_ID = '\x0'; diff --git a/vpr/src/server/gateio.cpp b/vpr/src/server/gateio.cpp index 573797cb44e..1548f42ddfc 100644 --- a/vpr/src/server/gateio.cpp +++ b/vpr/src/server/gateio.cpp @@ -134,10 +134,10 @@ GateIO::ActivityStatus GateIO::handle_telegrams(std::vectordata}; + std::string message{telegram_frame->body}; bool is_echo_telegram = false; - if ((message.size() == comm::ECHO_DATA.size()) && (message == comm::ECHO_DATA)) { - m_logger.queue(LogLevel::Detail, "received", comm::ECHO_DATA); + if ((message.size() == comm::ECHO_TELEGRAM_BODY.size()) && (message == comm::ECHO_TELEGRAM_BODY)) { + m_logger.queue(LogLevel::Detail, "received", comm::ECHO_TELEGRAM_BODY); is_echo_telegram = true; status = ActivityStatus::CLIENT_ACTIVITY; } @@ -167,17 +167,17 @@ GateIO::ActivityStatus GateIO::handle_client_alive_tracker(sockpp::tcp6_socket& if (client_alive_tracker_ptr) { /// handle sending echo to client if (client_alive_tracker_ptr->is_time_to_sent_echo()) { - comm::TelegramHeader echo_header = comm::TelegramHeader::construct_from_data(comm::ECHO_DATA); + comm::TelegramHeader echo_header = comm::TelegramHeader::construct_from_data(comm::ECHO_TELEGRAM_BODY); std::string message{echo_header.buffer()}; - message.append(comm::ECHO_DATA); + message.append(comm::ECHO_TELEGRAM_BODY); try { std::size_t bytes_sent = client.write(message); if (bytes_sent == message.size()) { - m_logger.queue(LogLevel::Detail, "sent", comm::ECHO_DATA); + m_logger.queue(LogLevel::Detail, "sent", comm::ECHO_TELEGRAM_BODY); client_alive_tracker_ptr->on_echo_sent(); } } catch(...) { - m_logger.queue(LogLevel::Debug, "fail to sent", comm::ECHO_DATA); + m_logger.queue(LogLevel::Debug, "fail to sent", comm::ECHO_TELEGRAM_BODY); status = ActivityStatus::COMMUNICATION_PROBLEM; } } diff --git a/vpr/src/server/telegrambuffer.cpp b/vpr/src/server/telegrambuffer.cpp index 27a4e80cf3b..eaec591d437 100644 --- a/vpr/src/server/telegrambuffer.cpp +++ b/vpr/src/server/telegrambuffer.cpp @@ -44,14 +44,14 @@ void TelegramBuffer::take_telegram_frames(std::vector& r std::size_t expected_telegram_size = TelegramHeader::size() + header.body_bytes_num(); if (m_raw_buffer.size() >= expected_telegram_size) { // checksum validation - ByteArray data(m_raw_buffer.begin() + TelegramHeader::size(), m_raw_buffer.begin() + expected_telegram_size); - uint32_t actual_check_sum = data.calc_check_sum(); + ByteArray body(m_raw_buffer.begin() + TelegramHeader::size(), m_raw_buffer.begin() + expected_telegram_size); + uint32_t actual_check_sum = body.calc_check_sum(); if (actual_check_sum == header.body_check_sum()) { // construct telegram frame if checksum matches TelegramFramePtr telegram_frame_ptr = std::make_shared(); telegram_frame_ptr->header = header; - telegram_frame_ptr->data = std::move(data); - data.clear(); // post std::move safety step + telegram_frame_ptr->body = std::move(body); + body.clear(); // post std::move safety step result.push_back(telegram_frame_ptr); } else { diff --git a/vpr/src/server/telegramframe.h b/vpr/src/server/telegramframe.h index c73096a5ad0..e2237de3e36 100644 --- a/vpr/src/server/telegramframe.h +++ b/vpr/src/server/telegramframe.h @@ -22,9 +22,9 @@ struct TelegramFrame { TelegramHeader header; /** - * @brief data The actual data of the telegram message. + * @brief body The actual data of the telegram message. */ - ByteArray data; + ByteArray body; }; using TelegramFramePtr = std::shared_ptr; diff --git a/vpr/test/test_server_telegrambuffer.cpp b/vpr/test/test_server_telegrambuffer.cpp index 767b4892030..77fa29d9898 100644 --- a/vpr/test/test_server_telegrambuffer.cpp +++ b/vpr/test/test_server_telegrambuffer.cpp @@ -86,7 +86,7 @@ TEST_CASE("test_server_telegrambuffer__oneFinishedOneOpened", "[vpr]") auto frames = tBuff.take_telegram_frames(); REQUIRE(1 == frames.size()); - REQUIRE(msgBody1 == frames[0]->data); + REQUIRE(msgBody1 == frames[0]->body); REQUIRE(t2 == tBuff.data()); } @@ -113,8 +113,8 @@ TEST_CASE("test_server_telegrambuffer_twoFinished", "[vpr]") auto frames = tBuff.take_telegram_frames(); REQUIRE(2 == frames.size()); - REQUIRE(msgBody1 == frames[0]->data); - REQUIRE(msgBody2 == frames[1]->data); + REQUIRE(msgBody1 == frames[0]->body); + REQUIRE(msgBody2 == frames[1]->body); REQUIRE(comm::ByteArray{} == tBuff.data()); } From 475f0a94b888b72bd79c8a095e824b8245538f2e Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 24 May 2024 18:08:58 +0300 Subject: [PATCH 26/57] rename comm::TelegramHeader::construct_from_data to comm::TelegramHeader::construct_from_body --- vpr/src/server/gateio.cpp | 2 +- vpr/src/server/task.cpp | 2 +- vpr/src/server/telegramheader.cpp | 2 +- vpr/src/server/telegramheader.h | 2 +- vpr/test/test_server_telegrambuffer.cpp | 14 +++++++------- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/vpr/src/server/gateio.cpp b/vpr/src/server/gateio.cpp index 1548f42ddfc..7b58f10d823 100644 --- a/vpr/src/server/gateio.cpp +++ b/vpr/src/server/gateio.cpp @@ -167,7 +167,7 @@ GateIO::ActivityStatus GateIO::handle_client_alive_tracker(sockpp::tcp6_socket& if (client_alive_tracker_ptr) { /// handle sending echo to client if (client_alive_tracker_ptr->is_time_to_sent_echo()) { - comm::TelegramHeader echo_header = comm::TelegramHeader::construct_from_data(comm::ECHO_TELEGRAM_BODY); + comm::TelegramHeader echo_header = comm::TelegramHeader::construct_from_body(comm::ECHO_TELEGRAM_BODY); std::string message{echo_header.buffer()}; message.append(comm::ECHO_TELEGRAM_BODY); try { diff --git a/vpr/src/server/task.cpp b/vpr/src/server/task.cpp index d32c84621f5..5a24bb43933 100644 --- a/vpr/src/server/task.cpp +++ b/vpr/src/server/task.cpp @@ -100,7 +100,7 @@ void Task::bake_response() { } std::string body{std::move(body_opt.value())}; - m_telegram_header = comm::TelegramHeader::construct_from_data(body, compressor_id); + m_telegram_header = comm::TelegramHeader::construct_from_body(body, compressor_id); m_response_buffer.append(m_telegram_header.buffer().begin(), m_telegram_header.buffer().end()); m_response_buffer.append(body); diff --git a/vpr/src/server/telegramheader.cpp b/vpr/src/server/telegramheader.cpp index 344e8fe7422..f1f05a4864e 100644 --- a/vpr/src/server/telegramheader.cpp +++ b/vpr/src/server/telegramheader.cpp @@ -73,7 +73,7 @@ std::string TelegramHeader::info() const { return ss.str(); } -comm::TelegramHeader TelegramHeader::construct_from_data(const std::string_view& body, uint8_t compressor_id) { +comm::TelegramHeader TelegramHeader::construct_from_body(const std::string_view& body, uint8_t compressor_id) { uint32_t body_check_sum = ByteArray::calc_check_sum(body); return comm::TelegramHeader{static_cast(body.size()), body_check_sum, compressor_id}; } diff --git a/vpr/src/server/telegramheader.h b/vpr/src/server/telegramheader.h index f0d5c7d3c74..d70ba7b6c75 100644 --- a/vpr/src/server/telegramheader.h +++ b/vpr/src/server/telegramheader.h @@ -62,7 +62,7 @@ class TelegramHeader { * @param compressor_id The ID of the compressor used for compression (default is 0, means no compressor is used). * @return A TelegramHeader object constructed from the provided body data. */ - static comm::TelegramHeader construct_from_data(const std::string_view& body, uint8_t compressor_id = 0); + static comm::TelegramHeader construct_from_body(const std::string_view& body, uint8_t compressor_id = 0); /** * @brief Returns the total size of the TelegramHeader. diff --git a/vpr/test/test_server_telegrambuffer.cpp b/vpr/test/test_server_telegrambuffer.cpp index 77fa29d9898..678eb01f8cf 100644 --- a/vpr/test/test_server_telegrambuffer.cpp +++ b/vpr/test/test_server_telegrambuffer.cpp @@ -52,7 +52,7 @@ TEST_CASE("test_server_telegrambuffer_notFilledTelegramButWithPrependedRubish", const comm::ByteArray rubbish{"#@!"}; const comm::ByteArray msgBody{"some message"}; - const comm::TelegramHeader msgHeader{comm::TelegramHeader::construct_from_data(msgBody)}; + const comm::TelegramHeader msgHeader{comm::TelegramHeader::construct_from_body(msgBody)}; tBuff.append(rubbish); tBuff.append(msgHeader.buffer()); @@ -70,8 +70,8 @@ TEST_CASE("test_server_telegrambuffer__oneFinishedOneOpened", "[vpr]") const comm::ByteArray msgBody1{"message1"}; const comm::ByteArray msgBody2{"message2"}; - const comm::TelegramHeader msgHeader1{comm::TelegramHeader::construct_from_data(msgBody1)}; - const comm::TelegramHeader msgHeader2{comm::TelegramHeader::construct_from_data(msgBody2)}; + const comm::TelegramHeader msgHeader1{comm::TelegramHeader::construct_from_body(msgBody1)}; + const comm::TelegramHeader msgHeader2{comm::TelegramHeader::construct_from_body(msgBody2)}; comm::ByteArray t1(msgHeader1.buffer()); t1.append(msgBody1); @@ -98,8 +98,8 @@ TEST_CASE("test_server_telegrambuffer_twoFinished", "[vpr]") const comm::ByteArray msgBody1{"message1"}; const comm::ByteArray msgBody2{"message2"}; - const comm::TelegramHeader msgHeader1{comm::TelegramHeader::construct_from_data(msgBody1)}; - const comm::TelegramHeader msgHeader2{comm::TelegramHeader::construct_from_data(msgBody2)}; + const comm::TelegramHeader msgHeader1{comm::TelegramHeader::construct_from_body(msgBody1)}; + const comm::TelegramHeader msgHeader2{comm::TelegramHeader::construct_from_body(msgBody2)}; comm::ByteArray t1(msgHeader1.buffer()); t1.append(msgBody1); @@ -126,8 +126,8 @@ TEST_CASE("test_server_telegrambuffer_clear", "[vpr]") const comm::ByteArray msgBody1{"message1"}; const comm::ByteArray msgBody2{"message2"}; - const comm::TelegramHeader msgHeader1{comm::TelegramHeader::construct_from_data(msgBody1)}; - const comm::TelegramHeader msgHeader2{comm::TelegramHeader::construct_from_data(msgBody2)}; + const comm::TelegramHeader msgHeader1{comm::TelegramHeader::construct_from_body(msgBody1)}; + const comm::TelegramHeader msgHeader2{comm::TelegramHeader::construct_from_body(msgBody2)}; comm::ByteArray t1(msgHeader1.buffer()); t1.append(msgBody1); From 71f11b625fa4680f3dcb3b8cde4f7050775f47ad Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 24 May 2024 18:10:49 +0300 Subject: [PATCH 27/57] fix TelegramHeader doc --- vpr/src/server/telegramheader.h | 1 - 1 file changed, 1 deletion(-) diff --git a/vpr/src/server/telegramheader.h b/vpr/src/server/telegramheader.h index d70ba7b6c75..483b5779ebc 100644 --- a/vpr/src/server/telegramheader.h +++ b/vpr/src/server/telegramheader.h @@ -57,7 +57,6 @@ class TelegramHeader { /** * @brief Constructs a TelegramHeader based on the provided body data. * - * @tparam T The type of the body data. * @param body The body data used to calculate the size and checksum. * @param compressor_id The ID of the compressor used for compression (default is 0, means no compressor is used). * @return A TelegramHeader object constructed from the provided body data. From 86eca519c72dc2bd2ac64d26469f8a3402f4a43b Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 27 May 2024 17:19:49 +0300 Subject: [PATCH 28/57] minor arg rename in TelegramHeader constructor --- vpr/src/server/telegramheader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vpr/src/server/telegramheader.h b/vpr/src/server/telegramheader.h index 483b5779ebc..d722a142db5 100644 --- a/vpr/src/server/telegramheader.h +++ b/vpr/src/server/telegramheader.h @@ -48,9 +48,9 @@ class TelegramHeader { * * This constructor initializes a TelegramHeader object using the length and checksum information taken from the provided byte buffer. * - * @param body The ByteArray containing the header data of the telegram. + * @param buffer The ByteArray containing the header data of the telegram. */ - explicit TelegramHeader(const ByteArray& body); + explicit TelegramHeader(const ByteArray& buffer); ~TelegramHeader()=default; From 6875ba516d9f4a33d1db3037d435969db0cebf0f Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 27 May 2024 17:37:41 +0300 Subject: [PATCH 29/57] minimize diff --- vpr/src/base/vpr_context.h | 1 - 1 file changed, 1 deletion(-) diff --git a/vpr/src/base/vpr_context.h b/vpr/src/base/vpr_context.h index 4a18ff988e9..544a1f5e34f 100644 --- a/vpr/src/base/vpr_context.h +++ b/vpr/src/base/vpr_context.h @@ -593,7 +593,6 @@ struct ServerContext : public Context { */ std::vector crit_paths; - /** * @brief Stores the selected critical path elements. * From e6a18ec08c7bdde62a3882f0385f7714a5bd6c85 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Tue, 28 May 2024 12:25:10 +0300 Subject: [PATCH 30/57] code comment formatting --- vpr/src/server/pathhelper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/server/pathhelper.h b/vpr/src/server/pathhelper.h index f5c3b8efe8f..7616dd6e9b7 100644 --- a/vpr/src/server/pathhelper.h +++ b/vpr/src/server/pathhelper.h @@ -44,7 +44,7 @@ using CritPathsResultPtr = std::shared_ptr; * @param crit_path_num The max number of the critical path. * @param details_level The level of detail for the timing report. * @param is_flat_routing Indicates whether flat routing should be used. -* @return A `CritPathsResultPtr` which is a pointer to the result of the critical path calculation (@see CritPathsResult). +* @return A `CritPathsResultPtr` which is a pointer to the result of the critical path calculation ( @see CritPathsResult ). */ CritPathsResultPtr calc_critical_path(const std::string& type, int crit_path_num, e_timing_report_detail details_level, bool is_flat_routing); From 7c7cc9821337a162fd14d24166521471c17e8105 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Tue, 28 May 2024 12:35:37 +0300 Subject: [PATCH 31/57] correct doxygen doc --- vpr/src/server/pathhelper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/server/pathhelper.h b/vpr/src/server/pathhelper.h index 7616dd6e9b7..8393ffb4e1b 100644 --- a/vpr/src/server/pathhelper.h +++ b/vpr/src/server/pathhelper.h @@ -44,7 +44,7 @@ using CritPathsResultPtr = std::shared_ptr; * @param crit_path_num The max number of the critical path. * @param details_level The level of detail for the timing report. * @param is_flat_routing Indicates whether flat routing should be used. -* @return A `CritPathsResultPtr` which is a pointer to the result of the critical path calculation ( @see CritPathsResult ). +* @return A `CritPathsResultPtr` which is a pointer to the result of the critical path calculation ( see @ref CritPathsResult ). */ CritPathsResultPtr calc_critical_path(const std::string& type, int crit_path_num, e_timing_report_detail details_level, bool is_flat_routing); From 0157aa85be5a514957481adfd18e72eece73f7f4 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Tue, 28 May 2024 12:39:54 +0300 Subject: [PATCH 32/57] fix doxygen formatting --- vpr/src/server/pathhelper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/server/pathhelper.h b/vpr/src/server/pathhelper.h index 8393ffb4e1b..0a62cf5e625 100644 --- a/vpr/src/server/pathhelper.h +++ b/vpr/src/server/pathhelper.h @@ -44,7 +44,7 @@ using CritPathsResultPtr = std::shared_ptr; * @param crit_path_num The max number of the critical path. * @param details_level The level of detail for the timing report. * @param is_flat_routing Indicates whether flat routing should be used. -* @return A `CritPathsResultPtr` which is a pointer to the result of the critical path calculation ( see @ref CritPathsResult ). +* @return A `CritPathsResultPtr` which is a pointer to the result of the critical path calculation (see @ref CritPathsResult). */ CritPathsResultPtr calc_critical_path(const std::string& type, int crit_path_num, e_timing_report_detail details_level, bool is_flat_routing); From 73fc03cdcdacceba3ceb55f74c7fe38be83da32d Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Thu, 6 Jun 2024 18:36:34 +0300 Subject: [PATCH 33/57] fix typo --- doc/src/vtr/server_mode/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/vtr/server_mode/index.rst b/doc/src/vtr/server_mode/index.rst index 5327f3852fd..4f54e3b995d 100644 --- a/doc/src/vtr/server_mode/index.rst +++ b/doc/src/vtr/server_mode/index.rst @@ -30,7 +30,7 @@ The telegram header contains helper information required to properly extract the Communication telegram body structure. - **telegram body** is flat **JSON** structure. + **telegram body** is a flat **JSON** structure. **CMD** could have following integer values: From c63477551d322e48f60ca75a921a9bd86d76edd8 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 7 Jun 2024 15:47:13 +0300 Subject: [PATCH 34/57] add note for explaining data structure std::map> in TelegramOptions::get_map_of_sets --- vpr/src/server/telegramoptions.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vpr/src/server/telegramoptions.h b/vpr/src/server/telegramoptions.h index afa37e1478a..1c7ae9f926c 100644 --- a/vpr/src/server/telegramoptions.h +++ b/vpr/src/server/telegramoptions.h @@ -62,6 +62,8 @@ class TelegramOptions { * * This function retrieves a map of sets associated with the specified key. * + * @note The map of sets is used to store the critical path index (map key) and the associated set of selected sub-path element indexes (map value). + * * @param key The key of the map of sets to retrieve. * @return The map of sets associated with the specified key. */ From b454ee96877d1cc0979e20ed37fbbc360286ad7e Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 7 Jun 2024 15:54:26 +0300 Subject: [PATCH 35/57] fix typo --- vpr/src/server/telegramoptions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/server/telegramoptions.h b/vpr/src/server/telegramoptions.h index 1c7ae9f926c..41237cdde2e 100644 --- a/vpr/src/server/telegramoptions.h +++ b/vpr/src/server/telegramoptions.h @@ -38,7 +38,7 @@ class TelegramOptions { * @brief Constructs a TelegramOptions object with the provided data and expected keys. * * This constructor initializes a TelegramOptions object with the given data string - * and a vector of expected keys. It parse data string and validate that such data has all required keys. + * and a vector of expected keys. It parses the data string and validates that such data has all required keys. * If some keys are absent, it collects the errors. * * @param data The data string containing the options. From 69e734eace8907f457394c205bc6f1cffb149ea0 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 7 Jun 2024 16:13:34 +0300 Subject: [PATCH 36/57] extend telegramheader doc with adding nore for DATA_CHECKSUM and COMPRESSOR_ID fields --- vpr/src/server/telegramheader.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vpr/src/server/telegramheader.h b/vpr/src/server/telegramheader.h index d722a142db5..d8b32e40a0c 100644 --- a/vpr/src/server/telegramheader.h +++ b/vpr/src/server/telegramheader.h @@ -19,6 +19,10 @@ namespace comm { * - [ 4 bytes ]: DATA_LENGTH - A 4-byte field where the data length is stored, allowing for proper identification of the start and end of the TelegramFrame sequence. * - [ 4 bytes ]: DATA_CHECKSUM - A 4-byte field where the data checksum is stored to validate the attached data. * - [ 1 byte ]: COMPRESSOR_ID - A 1-byte field where the compressor id is stored. If it's \0, it means the data is not compressed (in text/json format). + * + * @note: Currently, only zlib compression for the telegram body is supported, which is specified with COMPRESSOR_ID='z'. + * + * @note: The DATA_CHECKSUM field can be used to check the integrity of the telegram body on the client app side. */ class TelegramHeader { public: From af9541ec519683d726e36594db39b9ae91f34900 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 7 Jun 2024 16:21:46 +0300 Subject: [PATCH 37/57] enhance telegramheader field [ 1 byte ]: COMPRESSOR_ID description --- vpr/src/server/telegramheader.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vpr/src/server/telegramheader.h b/vpr/src/server/telegramheader.h index d8b32e40a0c..5190a3ac7e7 100644 --- a/vpr/src/server/telegramheader.h +++ b/vpr/src/server/telegramheader.h @@ -18,9 +18,8 @@ namespace comm { * - [ 4 bytes ]: SIGNATURE - A 4-byte constant sequence "I", "P", "A", "\0" which indicates the valid start of a TelegramHeader. * - [ 4 bytes ]: DATA_LENGTH - A 4-byte field where the data length is stored, allowing for proper identification of the start and end of the TelegramFrame sequence. * - [ 4 bytes ]: DATA_CHECKSUM - A 4-byte field where the data checksum is stored to validate the attached data. - * - [ 1 byte ]: COMPRESSOR_ID - A 1-byte field where the compressor id is stored. If it's \0, it means the data is not compressed (in text/json format). - * - * @note: Currently, only zlib compression for the telegram body is supported, which is specified with COMPRESSOR_ID='z'. + * - [ 1 byte ]: COMPRESSOR_ID - A 1-byte field where the compressor ID is stored. If it's null, it means the telegram body is not compressed (in text/json format). + * Otherwise, the telegram body is compressed. Currently, only zlib compression for the telegram body is supported, which is specified with COMPRESSOR_ID='z'. * * @note: The DATA_CHECKSUM field can be used to check the integrity of the telegram body on the client app side. */ From c445d93a14b06bfc1feedfe9fc949803a26cca8a Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 7 Jun 2024 16:53:46 +0300 Subject: [PATCH 38/57] add doc for TelegramBuffer::check_telegram_header_presence --- vpr/src/server/telegrambuffer.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vpr/src/server/telegrambuffer.h b/vpr/src/server/telegrambuffer.h index 449e7f4fbfd..2300303e387 100644 --- a/vpr/src/server/telegrambuffer.h +++ b/vpr/src/server/telegrambuffer.h @@ -89,6 +89,15 @@ class TelegramBuffer std::vector m_errors; std::optional m_header_opt; + /** + * @brief Checks for the presence of the telegram header in the buffer. + * + * This function searches for the telegram header signature in the raw buffer. + * If the signature is found, any bytes preceding the header start position + * are discarded from the buffer. + * + * @return true if the telegram header signature is found, false otherwise. + */ bool check_telegram_header_presence(); }; From 138f8b729ae5c2895a9f1d09abf4a6db109c9da3 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 7 Jun 2024 17:12:41 +0300 Subject: [PATCH 39/57] remove std::vector TelegramBuffer::take_telegram_frames() --- vpr/src/server/telegrambuffer.cpp | 6 ------ vpr/src/server/telegrambuffer.h | 7 ------- vpr/test/test_server_telegrambuffer.cpp | 15 ++++++++++----- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/vpr/src/server/telegrambuffer.cpp b/vpr/src/server/telegrambuffer.cpp index eaec591d437..0aab6af8be1 100644 --- a/vpr/src/server/telegrambuffer.cpp +++ b/vpr/src/server/telegrambuffer.cpp @@ -65,12 +65,6 @@ void TelegramBuffer::take_telegram_frames(std::vector& r } } -std::vector TelegramBuffer::take_telegram_frames() { - std::vector result; - take_telegram_frames(result); - return result; -} - void TelegramBuffer::take_errors(std::vector& errors) { errors.reserve(errors.size() + m_errors.size()); std::move(std::begin(m_errors), std::end(m_errors), std::back_inserter(errors)); diff --git a/vpr/src/server/telegrambuffer.h b/vpr/src/server/telegrambuffer.h index 2300303e387..33c34f87c5f 100644 --- a/vpr/src/server/telegrambuffer.h +++ b/vpr/src/server/telegrambuffer.h @@ -58,13 +58,6 @@ class TelegramBuffer */ void take_telegram_frames(std::vector& frames); - /** - * @brief Extracts well-formed telegram frames from the internal byte buffer. - * - * @return std::vector A vector containing pointers to the extracted telegram frames. - */ - std::vector take_telegram_frames(); - /** * @brief Takes errors from the internal storage. * diff --git a/vpr/test/test_server_telegrambuffer.cpp b/vpr/test/test_server_telegrambuffer.cpp index 678eb01f8cf..6c5c793c3d2 100644 --- a/vpr/test/test_server_telegrambuffer.cpp +++ b/vpr/test/test_server_telegrambuffer.cpp @@ -40,7 +40,8 @@ TEST_CASE("test_server_telegrambuffer_oneOpened", "[vpr]") { buff.append(comm::ByteArray{"111"}); buff.append(comm::ByteArray{"222"}); - auto frames = buff.take_telegram_frames(); + std::vector frames; + buff.take_telegram_frames(frames); REQUIRE(frames.size() == 0); REQUIRE(std::string_view{buff.data()} == "111222"); @@ -57,7 +58,8 @@ TEST_CASE("test_server_telegrambuffer_notFilledTelegramButWithPrependedRubish", tBuff.append(rubbish); tBuff.append(msgHeader.buffer()); - auto frames = tBuff.take_telegram_frames(); + std::vector frames; + tBuff.take_telegram_frames(frames); REQUIRE(0 == frames.size()); REQUIRE(msgHeader.buffer() == tBuff.data()); // the rubbish prefix fragment will be absent here @@ -83,7 +85,8 @@ TEST_CASE("test_server_telegrambuffer__oneFinishedOneOpened", "[vpr]") tBuff.append(t1); tBuff.append(t2); - auto frames = tBuff.take_telegram_frames(); + std::vector frames; + tBuff.take_telegram_frames(frames); REQUIRE(1 == frames.size()); REQUIRE(msgBody1 == frames[0]->body); @@ -110,7 +113,8 @@ TEST_CASE("test_server_telegrambuffer_twoFinished", "[vpr]") tBuff.append(t1); tBuff.append(t2); - auto frames = tBuff.take_telegram_frames(); + std::vector frames; + tBuff.take_telegram_frames(frames); REQUIRE(2 == frames.size()); REQUIRE(msgBody1 == frames[0]->body); @@ -137,7 +141,8 @@ TEST_CASE("test_server_telegrambuffer_clear", "[vpr]") tBuff.clear(); - auto frames = tBuff.take_telegram_frames(); + std::vector frames; + tBuff.take_telegram_frames(frames); REQUIRE(0 == frames.size()); REQUIRE(comm::ByteArray{} == tBuff.data()); From 56d8abc2f6389379b9674abe388914db063620b1 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 7 Jun 2024 17:33:48 +0300 Subject: [PATCH 40/57] enhance Telegram Buffer doc --- vpr/src/server/telegrambuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/server/telegrambuffer.h b/vpr/src/server/telegrambuffer.h index 33c34f87c5f..b5822e9a5c6 100644 --- a/vpr/src/server/telegrambuffer.h +++ b/vpr/src/server/telegrambuffer.h @@ -16,7 +16,7 @@ namespace comm { /** * @brief Implements Telegram Buffer as a wrapper over BytesArray * - * It aggregates received bytes and return only well filled frames. + * It aggregates received bytes and assists in extracting telegram frames ( @ref TelegramFrame ) from the raw byte buffer. */ class TelegramBuffer { From 86d31a38dd75b9464239b8cbce306ea583071565 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 7 Jun 2024 17:48:56 +0300 Subject: [PATCH 41/57] rename Task::success to ::set_success, Task::fail to ::set_fail --- vpr/src/server/task.cpp | 6 +++--- vpr/src/server/task.h | 6 +++--- vpr/src/server/taskresolver.cpp | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/vpr/src/server/task.cpp b/vpr/src/server/task.cpp index 5a24bb43933..837369ba6c7 100644 --- a/vpr/src/server/task.cpp +++ b/vpr/src/server/task.cpp @@ -34,18 +34,18 @@ bool Task::options_match(const std::unique_ptr& other) { return other->options() == m_options; } -void Task::fail(const std::string& error) { +void Task::set_fail(const std::string& error) { m_is_finished = true; m_error = error; bake_response(); } -void Task::success() { +void Task::set_success() { m_is_finished = true; bake_response(); } -void Task::success(std::string&& result) { +void Task::set_success(std::string&& result) { m_result = std::move(result); m_is_finished = true; bake_response(); diff --git a/vpr/src/server/task.h b/vpr/src/server/task.h index 67995f7a59f..9fef5268440 100644 --- a/vpr/src/server/task.h +++ b/vpr/src/server/task.h @@ -129,12 +129,12 @@ class Task { * * @param error The error message describing the reason for the task's failure. */ - void fail(const std::string& error); + void set_fail(const std::string& error); /** * @brief Marks the task as successfully completed. */ - void success(); + void set_success(); /** * @brief Marks the task as successfully completed with the specified result. @@ -145,7 +145,7 @@ class Task { * @param result An rvalue reference to a string describing the result of the task execution. * The content of this string will be moved into the task's result storage. */ - void success(std::string&& result); + void set_success(std::string&& result); /** * @brief Generates a string containing information about the task. diff --git a/vpr/src/server/taskresolver.cpp b/vpr/src/server/taskresolver.cpp index 2bdd37c5ebc..abe9e5f3fda 100644 --- a/vpr/src/server/taskresolver.cpp +++ b/vpr/src/server/taskresolver.cpp @@ -18,12 +18,12 @@ void TaskResolver::own_task(TaskPtr&& new_task) { if (task->cmd() == new_task->cmd()) { if (task->options_match(new_task)) { std::string msg = "similar task is already in execution, reject new " + new_task->info() + " and waiting for old " + task->info() + " execution"; - new_task->fail(msg); + new_task->set_fail(msg); } else { // handle case when task has same cmd but different options if (new_task->job_id() > task->job_id()) { std::string msg = "old " + task->info() + " is overridden by a new " + new_task->info(); - task->fail(msg); + task->set_fail(msg); } } } @@ -102,21 +102,21 @@ void TaskResolver::process_get_path_list_task(ezgl::application*, const TaskPtr& CritPathsResultPtr crit_paths_result = calc_critical_path(path_type, n_critical_path_num, details_level_opt.value(), is_flat); if (crit_paths_result->is_valid()) { server_ctx.crit_paths = std::move(crit_paths_result->paths); - task->success(std::move(crit_paths_result->report)); + task->set_success(std::move(crit_paths_result->report)); } else { std::string msg{"Critical paths report is empty"}; VTR_LOG_ERROR(msg.c_str()); - task->fail(msg); + task->set_fail(msg); } } else { std::string msg{"unsupported report details level " + details_level_str}; VTR_LOG_ERROR(msg.c_str()); - task->fail(msg); + task->set_fail(msg); } } else { std::string msg{"options errors in get crit path list telegram: " + options.errors_str()}; VTR_LOG_ERROR(msg.c_str()); - task->fail(msg); + task->set_fail(msg); } } @@ -138,16 +138,16 @@ void TaskResolver::process_draw_critical_path_task(ezgl::application* app, const gint high_light_mode_index = get_item_index_by_text(toggle_crit_path, high_light_mode.c_str()); if (high_light_mode_index != -1) { gtk_combo_box_set_active(toggle_crit_path, high_light_mode_index); - task->success(); + task->set_success(); } else { std::string msg{"cannot find ToggleCritPath qcombobox index for item " + high_light_mode}; VTR_LOG_ERROR(msg.c_str()); - task->fail(msg); + task->set_fail(msg); } } else { std::string msg{"options errors in highlight crit path telegram: " + options.errors_str()}; VTR_LOG_ERROR(msg.c_str()); - task->fail(msg); + task->set_fail(msg); } } From e3cff2771f698995601293c6114bb96a5431dcc0 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Fri, 7 Jun 2024 18:28:07 +0300 Subject: [PATCH 42/57] Task::cmd now is comm::CMD enum, add doc reference to such enum to list possible cmd values --- vpr/src/server/commconstants.h | 7 ++++--- vpr/src/server/gateio.cpp | 2 +- vpr/src/server/task.cpp | 6 +++--- vpr/src/server/task.h | 13 +++++++------ vpr/src/server/taskresolver.cpp | 4 ++-- vpr/test/test_server_taskresolver.cpp | 25 ++++++++++++++----------- 6 files changed, 31 insertions(+), 26 deletions(-) diff --git a/vpr/src/server/commconstants.h b/vpr/src/server/commconstants.h index 86c6a8c10d2..c1008e93b99 100644 --- a/vpr/src/server/commconstants.h +++ b/vpr/src/server/commconstants.h @@ -28,9 +28,10 @@ inline const std::string OPTION_DRAW_PATH_CONTOUR{"draw_path_contour"}; inline const std::string KEY_SETUP_PATH_LIST{"setup"}; inline const std::string KEY_HOLD_PATH_LIST{"hold"}; -enum CMD { - CMD_GET_PATH_LIST_ID=0, - CMD_DRAW_PATH_ID +enum class CMD : int { + NONE=-1, + GET_PATH_LIST_ID=0, + DRAW_PATH_ID=1 }; } // namespace comm diff --git a/vpr/src/server/gateio.cpp b/vpr/src/server/gateio.cpp index 7b58f10d823..d40431e7da9 100644 --- a/vpr/src/server/gateio.cpp +++ b/vpr/src/server/gateio.cpp @@ -148,7 +148,7 @@ GateIO::ActivityStatus GateIO::handle_telegrams(std::vector cmd_opt = comm::TelegramParser::try_extract_field_cmd(message); std::optional options_opt = comm::TelegramParser::try_extract_field_options(message); if (job_id_opt && cmd_opt && options_opt) { - TaskPtr task = std::make_unique(job_id_opt.value(), cmd_opt.value(), options_opt.value()); + TaskPtr task = std::make_unique(job_id_opt.value(), static_cast(cmd_opt.value()), options_opt.value()); const comm::TelegramHeader& header = telegram_frame->header; m_logger.queue(LogLevel::Info, "received:", header.info(), task->info(/*skipDuration*/true)); std::unique_lock lock(m_tasks_mutex); diff --git a/vpr/src/server/task.cpp b/vpr/src/server/task.cpp index 837369ba6c7..f05ada6d835 100644 --- a/vpr/src/server/task.cpp +++ b/vpr/src/server/task.cpp @@ -10,7 +10,7 @@ namespace server { -Task::Task(int jobId, int cmd, const std::string& options) +Task::Task(int jobId, comm::CMD cmd, const std::string& options) : m_job_id(jobId), m_cmd(cmd), m_options(options) { m_creation_time = std::chrono::high_resolution_clock::now(); } @@ -55,7 +55,7 @@ std::string Task::info(bool skip_duration) const { std::stringstream ss; ss << "task[" << "id=" << std::to_string(m_job_id) - << ",cmd=" << std::to_string(m_cmd); + << ",cmd=" << std::to_string(static_cast(m_cmd)); if (!skip_duration) { ss << ",exists=" << get_pretty_duration_str_from_ms(time_ms_elapsed()); } @@ -73,7 +73,7 @@ void Task::bake_response() { ss << "{"; ss << "\"" << comm::KEY_JOB_ID << "\":\"" << m_job_id << "\","; - ss << "\"" << comm::KEY_CMD << "\":\"" << m_cmd << "\","; + ss << "\"" << comm::KEY_CMD << "\":\"" << static_cast(m_cmd) << "\","; ss << "\"" << comm::KEY_OPTIONS << "\":\"" << m_options << "\","; if (has_error()) { ss << "\"" << comm::KEY_DATA << "\":\"" << m_error << "\","; diff --git a/vpr/src/server/task.h b/vpr/src/server/task.h index 9fef5268440..1d9ef811f69 100644 --- a/vpr/src/server/task.h +++ b/vpr/src/server/task.h @@ -8,6 +8,7 @@ #include #include "telegramheader.h" +#include "commconstants.h" namespace server { @@ -23,10 +24,10 @@ class Task { * @brief Constructs a new Task object. * * @param job_id The ID of the job associated with the task. - * @param cmd The command associated with the task. + * @param cmd The command ID (see @ref comm::CMD) associated with the task. * @param options Additional options for the task (default: empty string). */ - Task(int job_id, int cmd, const std::string& options = ""); + Task(int job_id, comm::CMD cmd, const std::string& options = ""); Task(const Task&) = delete; Task& operator=(const Task&) = delete; @@ -39,11 +40,11 @@ class Task { int job_id() const { return m_job_id; } /** - * @brief Gets the command associated with the task. + * @brief Gets the command ID associated with the task. * - * @return The command. + * @return The command ID (see @ref comm::CMD). */ - int cmd() const { return m_cmd; } + comm::CMD cmd() const { return m_cmd; } /** * @brief Removes the specified number of bytes from the response buffer. @@ -179,7 +180,7 @@ class Task { private: int m_job_id = -1; - int m_cmd = -1; + comm::CMD m_cmd = comm::CMD::NONE; std::string m_options; std::string m_result; std::string m_error; diff --git a/vpr/src/server/taskresolver.cpp b/vpr/src/server/taskresolver.cpp index abe9e5f3fda..5298521ece0 100644 --- a/vpr/src/server/taskresolver.cpp +++ b/vpr/src/server/taskresolver.cpp @@ -64,12 +64,12 @@ bool TaskResolver::update(ezgl::application* app) { for (auto& task: m_tasks) { if (!task->is_finished()) { switch(task->cmd()) { - case comm::CMD_GET_PATH_LIST_ID: { + case comm::CMD::GET_PATH_LIST_ID: { process_get_path_list_task(app, task); has_processed_task = true; break; } - case comm::CMD_DRAW_PATH_ID: { + case comm::CMD::DRAW_PATH_ID: { process_draw_critical_path_task(app, task); has_processed_task = true; break; diff --git a/vpr/test/test_server_taskresolver.cpp b/vpr/test/test_server_taskresolver.cpp index 4e9ff388341..eda8d5ae82f 100644 --- a/vpr/test/test_server_taskresolver.cpp +++ b/vpr/test/test_server_taskresolver.cpp @@ -8,7 +8,7 @@ TEST_CASE("test_server_taskresolver_cmdSpamFilter", "[vpr]") { server::TaskResolver resolver; - const int cmd = 10; + const comm::CMD cmd = comm::CMD::GET_PATH_LIST_ID; { server::TaskPtr task0 = std::make_unique(1, cmd); @@ -43,7 +43,7 @@ TEST_CASE("test_server_taskresolver_cmdSpamFilter", "[vpr]") { TEST_CASE("test_server_taskresolver_cmdOverrideFilter", "[vpr]") { server::TaskResolver resolver; - const int cmd = 10; + const comm::CMD cmd = comm::CMD::GET_PATH_LIST_ID; { server::TaskPtr task0 = std::make_unique(1, cmd, "1"); @@ -75,14 +75,17 @@ TEST_CASE("test_server_taskresolver_cmdOverrideFilter", "[vpr]") { TEST_CASE("test_server_taskresolver_cmdSpamAndOverrideOptions", "[vpr]") { server::TaskResolver resolver; + const comm::CMD cmd1 = comm::CMD::GET_PATH_LIST_ID; + const comm::CMD cmd2 = comm::CMD::DRAW_PATH_ID; + { - server::TaskPtr task0 = std::make_unique(1, 2, "1"); - server::TaskPtr task1 = std::make_unique(2, 2, "11"); - server::TaskPtr task2 = std::make_unique(3, 2, "222"); - server::TaskPtr task3 = std::make_unique(4, 2, "222"); - server::TaskPtr task4 = std::make_unique(5, 1); - server::TaskPtr task5 = std::make_unique(6, 1); - server::TaskPtr task6 = std::make_unique(7, 1); + server::TaskPtr task0 = std::make_unique(1, cmd2, "1"); + server::TaskPtr task1 = std::make_unique(2, cmd2, "11"); + server::TaskPtr task2 = std::make_unique(3, cmd2, "222"); + server::TaskPtr task3 = std::make_unique(4, cmd2, "222"); + server::TaskPtr task4 = std::make_unique(5, cmd1); + server::TaskPtr task5 = std::make_unique(6, cmd1); + server::TaskPtr task6 = std::make_unique(7, cmd1); resolver.own_task(std::move(task0)); resolver.own_task(std::move(task1)); @@ -101,11 +104,11 @@ TEST_CASE("test_server_taskresolver_cmdSpamAndOverrideOptions", "[vpr]") { const server::TaskPtr& task1 = resolver.tasks().at(1); REQUIRE(task0->job_id() == 3); - REQUIRE(task0->cmd() == 2); + REQUIRE(task0->cmd() == cmd2); REQUIRE(task0->options() == "222"); REQUIRE(task1->job_id() == 5); - REQUIRE(task1->cmd() == 1); + REQUIRE(task1->cmd() == cmd1); REQUIRE(task1->options() == ""); } From 3b2eb6a2e435ada504e7c9e276fae1e10ea57449 Mon Sep 17 00:00:00 2001 From: Oleksandr Pyvovarov Date: Fri, 7 Jun 2024 19:39:30 +0300 Subject: [PATCH 43/57] add enum comm::CMD to server.rst to make reference work in the doc --- doc/src/api/vpr/server.rst | 3 +++ vpr/src/server/commcmd.h | 18 ++++++++++++++++++ vpr/src/server/commconstants.h | 6 ------ vpr/src/server/task.h | 2 +- 4 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 vpr/src/server/commcmd.h diff --git a/doc/src/api/vpr/server.rst b/doc/src/api/vpr/server.rst index 7f9e4f1e550..b0176f858da 100644 --- a/doc/src/api/vpr/server.rst +++ b/doc/src/api/vpr/server.rst @@ -18,6 +18,9 @@ server::GateIO server::Task ------------ +.. doxygenfile:: commcmd.h + :project: vpr + .. doxygenclass:: server::Task :project: vpr :members: diff --git a/vpr/src/server/commcmd.h b/vpr/src/server/commcmd.h new file mode 100644 index 00000000000..28f3f69f452 --- /dev/null +++ b/vpr/src/server/commcmd.h @@ -0,0 +1,18 @@ +#ifndef COMMCMD_H +#define COMMCMD_H + +#ifndef NO_SERVER + +namespace comm { + +enum class CMD : int { + NONE=-1, + GET_PATH_LIST_ID=0, + DRAW_PATH_ID=1 +}; + +} // namespace comm + +#endif /* NO_SERVER */ + +#endif /* COMMCMD_H */ diff --git a/vpr/src/server/commconstants.h b/vpr/src/server/commconstants.h index c1008e93b99..2eaeed60386 100644 --- a/vpr/src/server/commconstants.h +++ b/vpr/src/server/commconstants.h @@ -28,12 +28,6 @@ inline const std::string OPTION_DRAW_PATH_CONTOUR{"draw_path_contour"}; inline const std::string KEY_SETUP_PATH_LIST{"setup"}; inline const std::string KEY_HOLD_PATH_LIST{"hold"}; -enum class CMD : int { - NONE=-1, - GET_PATH_LIST_ID=0, - DRAW_PATH_ID=1 -}; - } // namespace comm #endif /* NO_SERVER */ diff --git a/vpr/src/server/task.h b/vpr/src/server/task.h index 1d9ef811f69..3d29e49373f 100644 --- a/vpr/src/server/task.h +++ b/vpr/src/server/task.h @@ -8,7 +8,7 @@ #include #include "telegramheader.h" -#include "commconstants.h" +#include "commcmd.h" namespace server { From 7f8d0c6d71a7958bb3d599ac380af306c57fef20 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 17:11:08 +0300 Subject: [PATCH 44/57] update calc_critical_path doc --- doc/src/api/vpr/server.rst | 5 ++++- vpr/src/server/pathhelper.h | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/src/api/vpr/server.rst b/doc/src/api/vpr/server.rst index b0176f858da..2bda680bbc1 100644 --- a/doc/src/api/vpr/server.rst +++ b/doc/src/api/vpr/server.rst @@ -39,6 +39,9 @@ server::TaskResolver .. doxygenfunction:: server::calc_critical_path :project: vpr +.. doxygenenum:: e_timing_report_detail + :project: vpr + comm::Telegram -------------- @@ -77,4 +80,4 @@ Compression utils :project: vpr .. doxygenfunction:: try_decompress - :project: vpr \ No newline at end of file + :project: vpr diff --git a/vpr/src/server/pathhelper.h b/vpr/src/server/pathhelper.h index 0a62cf5e625..8d2244a885a 100644 --- a/vpr/src/server/pathhelper.h +++ b/vpr/src/server/pathhelper.h @@ -40,9 +40,9 @@ using CritPathsResultPtr = std::shared_ptr; * @brief Calculates the critical path. * This function calculates the critical path based on the provided parameters. -* @param type The type of the critical path. -* @param crit_path_num The max number of the critical path. -* @param details_level The level of detail for the timing report. +* @param type The type of the critical path. Must be either "setup" or "hold". +* @param crit_path_num The max number of critical paths to record. +* @param details_level The level of detail for the timing report. See @ref e_timing_report_detail. * @param is_flat_routing Indicates whether flat routing should be used. * @return A `CritPathsResultPtr` which is a pointer to the result of the critical path calculation (see @ref CritPathsResult). */ From b5521924d1ffd0efd7148fd3aae3d949fb05e9eb Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 17:32:03 +0300 Subject: [PATCH 45/57] make GateIO::is_running doc shorter --- vpr/src/server/gateio.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vpr/src/server/gateio.h b/vpr/src/server/gateio.h index d5622c796cb..96f092f0e42 100644 --- a/vpr/src/server/gateio.h +++ b/vpr/src/server/gateio.h @@ -154,9 +154,7 @@ class GateIO GateIO& operator=(GateIO&&) = delete; /** - * @brief Checks if the port listening process is currently running. - * - * This method returns a boolean indicating whether the port listening process is currently running. + * @brief Returns a bool indicating whether or not the port listening process is currently running. * * @return True if the port listening process is running, false otherwise. */ From adaa276ef2e5b4669a2c144bf7cc1b0fd25a47ce Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 17:34:17 +0300 Subject: [PATCH 46/57] typo fix --- vpr/src/server/gateio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/server/gateio.h b/vpr/src/server/gateio.h index 96f092f0e42..ed15a0447fd 100644 --- a/vpr/src/server/gateio.h +++ b/vpr/src/server/gateio.h @@ -27,7 +27,7 @@ namespace server { * Operable only with a single client. As soon as client connection is detected * it begins listening on the specified port number for incoming client requests, * collects and encapsulates them into tasks (see @ref Task). - * The incoming tasks are extracted and handled by the top-level logic @ref TaskResolver in main thread. + * The incoming tasks are extracted and handled by the top-level logic @ref TaskResolver in the main thread. * Once the tasks are resolved by the @ref TaskResolver, they are returned to be sent back to the client app as a response. * Extraction and puting @ref Task is taken from main thread inside @ref server::update. * From c92e52cbd32fb2d21290d0e59f6bac027373a589 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 17:45:02 +0300 Subject: [PATCH 47/57] simplify GateIO description a bit, typo fix --- vpr/src/server/gateio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vpr/src/server/gateio.h b/vpr/src/server/gateio.h index ed15a0447fd..aa9036459c5 100644 --- a/vpr/src/server/gateio.h +++ b/vpr/src/server/gateio.h @@ -29,7 +29,7 @@ namespace server { * collects and encapsulates them into tasks (see @ref Task). * The incoming tasks are extracted and handled by the top-level logic @ref TaskResolver in the main thread. * Once the tasks are resolved by the @ref TaskResolver, they are returned to be sent back to the client app as a response. - * Extraction and puting @ref Task is taken from main thread inside @ref server::update. + * Moving @ref Task across threads happens in @ref server::update. * * @note * - The GateIO instance should be created and managed from the main thread, while its internal processing @@ -184,7 +184,7 @@ class GateIO /** * @brief Prints log messages for the GateIO. * - * @note Must be called from main thread since it's invoke std::cout. + * @note Must be called from the main thread since it's invoke std::cout. * Calling this method from other threads may result in unexpected behavior. */ void print_logs(); From eccfeda00ebc8e927123f1e30878e786396c7692 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 17:59:08 +0300 Subject: [PATCH 48/57] enhance ByteArray doc a bit --- vpr/src/server/bytearray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/server/bytearray.h b/vpr/src/server/bytearray.h index 59874e255cd..154153be6f9 100644 --- a/vpr/src/server/bytearray.h +++ b/vpr/src/server/bytearray.h @@ -10,7 +10,7 @@ namespace comm { /** - * @brief ByteArray as a simple wrapper over std::vector + * @brief ByteArray is a simple wrapper over std::vector that provides a user-friendly interface for manipulating array data.. */ class ByteArray : public std::vector { public: From 95948f54ea16deff9d12a33f98c92e70eb74222b Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 18:12:06 +0300 Subject: [PATCH 49/57] update void draw_crit_path_elements doc --- vpr/src/draw/draw_basic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/draw/draw_basic.h b/vpr/src/draw/draw_basic.h index c87fccf3edf..d939b43b8ec 100644 --- a/vpr/src/draw/draw_basic.h +++ b/vpr/src/draw/draw_basic.h @@ -113,7 +113,7 @@ void draw_crit_path(ezgl::renderer* g); * and indexes map. It is primarily used in server mode, where items are drawn upon request. * * @param paths The vector of TimingPath objects representing the critical paths. - * @param indexes The map of sets, where map keys are path indices and each set contains the indices of sub-path elements to draw. + * @param indexes The map of sets, where the map keys are path indices in std::vector, and each set contains the indices of the data_arrival_path elements ( @ref tatum::TimingPath ) to draw. * @param g Pointer to the ezgl::renderer object on which the elements will be drawn. */ void draw_crit_path_elements(const std::vector& paths, const std::map>& indexes, bool draw_crit_path_contour, ezgl::renderer* g); From f4d6824be043f7e0accbe2c2a26e71ff5c795423 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 18:18:14 +0300 Subject: [PATCH 50/57] update doc for draw_crit_path_contour --- vpr/src/base/vpr_context.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vpr/src/base/vpr_context.h b/vpr/src/base/vpr_context.h index 4832472a4e1..817f4a52f92 100644 --- a/vpr/src/base/vpr_context.h +++ b/vpr/src/base/vpr_context.h @@ -601,7 +601,8 @@ struct ServerContext : public Context { /** * @brief Stores the flag indicating whether to draw the critical path contour. * - * If the flag is set to true, the non-selected critical path elements will be drawn as a contour, while selected elements will be drawn as usual. + * If True, the entire path will be rendered with some level of transparency, regardless of the selection of path elements. However, selected path elements will be drawn in full color. + * This feature is helpful in visual debugging, to see how the separate path elements are mapped into the whole path. */ bool draw_crit_path_contour = false; From ecd73778c94aa19f60d928b09c6818d3242c66df Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 18:24:56 +0300 Subject: [PATCH 51/57] typo fix --- vpr/src/base/vpr_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpr/src/base/vpr_context.h b/vpr/src/base/vpr_context.h index 817f4a52f92..b6ccba2d4d9 100644 --- a/vpr/src/base/vpr_context.h +++ b/vpr/src/base/vpr_context.h @@ -568,7 +568,7 @@ struct NocContext : public Context { * @brief State relating to server mode * * This should contain only data structures that - * related to server state. + * relate to the vpr server state. */ struct ServerContext : public Context { /** From 5d186029dcafd55b5a4365397732bc7daf199065 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 18:44:53 +0300 Subject: [PATCH 52/57] add more doc for JOB_ID --- doc/src/vtr/server_mode/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/vtr/server_mode/index.rst b/doc/src/vtr/server_mode/index.rst index 4f54e3b995d..67ab8fff5d0 100644 --- a/doc/src/vtr/server_mode/index.rst +++ b/doc/src/vtr/server_mode/index.rst @@ -37,7 +37,7 @@ The telegram header contains helper information required to properly extract the - 0 - command id for **get critical path** - 1 - command id for **highlight selected path elements** - JOB_ID - is unique id for a task. + JOB_ID is a unique ID for a task. It is used to associate the request with the response by matching the same JOB_ID. Each new client request should increment the JOB_ID value; otherwise, it will not be clear which request the current response belongs to. .. note:: The telegram body itself could be compressed with zlib to minimize the amount of data transferred over the socket. This compression is applied to the response of the 'get critical path report' request. From 05ecf74d8b2781788237df5ea16f52e8b6a3645a Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 21:33:50 +0300 Subject: [PATCH 53/57] sync JOB_ID and CMD json keys order in server_mode/index.rst --- doc/src/vtr/server_mode/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/vtr/server_mode/index.rst b/doc/src/vtr/server_mode/index.rst index 67ab8fff5d0..95e7ecf8dad 100644 --- a/doc/src/vtr/server_mode/index.rst +++ b/doc/src/vtr/server_mode/index.rst @@ -58,8 +58,8 @@ Get critical path timing report example :linenos: { - "CMD": "0", "JOB_ID": "1", + "CMD": "0", "OPTIONS": "int:path_num:1;string:path_type:setup;string:details_level:netlist;bool:is_flat_routing:0" } @@ -169,8 +169,8 @@ Draw selected critical path elements example :linenos: { - "CMD": "1", "JOB_ID": "2", + "CMD": "1", "OPTIONS": "string:path_elements:0#10,11,12,13,14,15,20,21,22,23,24,25;string:high_light_mode:crit path flylines delays;bool:draw_path_contour:1" } From c27edfb212e81720adb8ccc1c9973efe977aa0a3 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 21:51:25 +0300 Subject: [PATCH 54/57] update comm_telegram_body_structure.svg and .odg by changing order of DATA nad STATUS fields --- .../comm_telegram_body_structure.odg | Bin 14630 -> 14402 bytes .../comm_telegram_body_structure.svg | 54 +++++++++--------- 2 files changed, 27 insertions(+), 27 deletions(-) mode change 100755 => 100644 doc/src/vtr/server_mode/comm_telegram_body_structure.svg diff --git a/doc/src/vtr/server_mode/comm_telegram_body_structure.odg b/doc/src/vtr/server_mode/comm_telegram_body_structure.odg index 9459ed1e095f992ea4a4056496b7eedf9301297d..9f10c8e7b5b55cbd236971557844498506fef6b9 100755 GIT binary patch delta 10849 zcmZ8{1yEeiviI4=A-KD{yAv$9y9D>(!F7=!K?93>Ah;zET!Tvp?he7-f(7FN1(m%Qz9L)TD-gU15^WB@2h8A(D{gZs-&dH;t|L-YAjle&=q z86_Rz{FRbH{QtwKp@ty5zarEPB=~RD=s&70kjOt%)KEzN@6c!wN>y(%mwL@sDwYg=Fpi09pBl98v=SO!<*V<_uX?NSpktVZI5(@6dO-){V@k7NI zCs#`v*G`e=hfk+Dh5H}2pl(Qbke%}ZuEtwdei`^)#02{1P417pA;_piQ6+R2Cqj!K zWRK4Zg|2QR6Ju^Ai*ctfoY-1Vr>xk#p9fwUzo6N>_DOfBDym0bBawm#DaW`u!(ZT4 zG1KOkFYHRoCgW#3Tj{>73;ZBqP#~KU3>QsIJz_70-(&C&VdwQRbDKT0Dda7Rd3N{E z8)wZF&>T}z1UQ*)tnIzii;bX$KCxz3$0F6heL9k3{iHiMQ!3W?%*@Ngo}*Dtjd+cH z<(3!(_-yqn+Om@vqoK7F_{>;di;l3wb(pqj4uABHN1eLdCDkjmf|(H#Eg%k>Pb6qCS=5hg-qH%gkm6ZBK$Q;7=o!*WIRq@e&i4Jl8;H3S9YZz zhf(-FZ`kD4y{SD#HPi>ML$O7+2v8ZV$`0z zhOlZHTX$HYJqnnH&%$MpdW*7x3{GgS38V$H$Yt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~6J^43g z%uNR6kJJC&3(Eg-3T20`^Ai5!q)qM4O8eL4^}+)H!T)jc - JOB_ID: int + JOB_ID: int @@ -108,7 +108,7 @@ - CMD: int + CMD: int @@ -116,23 +116,23 @@ - OPTIONS: string + OPTIONS: string - - - - STATUS: bool + + + + STATUS: bool - - - - DATA: string + + + + DATA: string @@ -140,7 +140,7 @@ - {option_data_type} + {option_data_type} @@ -148,7 +148,7 @@ - {option_name} + {option_name} @@ -156,7 +156,7 @@ - {option_value} + {option_value} @@ -164,7 +164,7 @@ - : + : @@ -172,7 +172,7 @@ - {option_data_type} + {option_data_type} @@ -180,7 +180,7 @@ - : + : @@ -188,7 +188,7 @@ - {option_data_type} + {option_data_type} @@ -196,7 +196,7 @@ - option_element2 + option_element2 @@ -204,7 +204,7 @@ - ; + ; @@ -212,7 +212,7 @@ - option_element1 + option_element1 @@ -220,7 +220,7 @@ - ; + ; @@ -228,7 +228,7 @@ - ... + ... @@ -236,7 +236,7 @@ - option_element_n + option_element_n @@ -244,7 +244,7 @@ - OPTIONS + OPTIONS @@ -252,7 +252,7 @@ - n + n @@ -260,7 +260,7 @@ - OPTION ELEMENT + OPTION ELEMENT From 4f28a00e7c70f6d37d06b7106dab699da7bbc4c5 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 22:16:50 +0300 Subject: [PATCH 55/57] server_mode/index.rst, describe more about COMPRESSOR_ID and CHECKSUM fields --- doc/src/vtr/server_mode/index.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/src/vtr/server_mode/index.rst b/doc/src/vtr/server_mode/index.rst index 95e7ecf8dad..30e72af486b 100644 --- a/doc/src/vtr/server_mode/index.rst +++ b/doc/src/vtr/server_mode/index.rst @@ -23,7 +23,14 @@ The telegram header contains helper information required to properly extract the Communication telegram structure. - +.. note:: The telegram body itself could be compressed with zlib to minimize the amount of data transferred over the socket. + This compression is applied to the response of the 'get critical path report' request. The compressor ID byte in the telegram header signals whether the telegram body is compressed. + When the compressor ID is null, the telegram body is not compressed. If the compressor ID is 'z', it means the body is compressed with zlib. + +.. note:: The checksum field contains the telegram body checksum. This checksum is used to validate the consistency of the telegram body during the dispatching phase. + If checksums are mismatched, the telegram is considered invalid and is skipped in processing. + + .. _fig_comm_telegram_body_structure: .. figure:: comm_telegram_body_structure.* @@ -39,9 +46,6 @@ The telegram header contains helper information required to properly extract the JOB_ID is a unique ID for a task. It is used to associate the request with the response by matching the same JOB_ID. Each new client request should increment the JOB_ID value; otherwise, it will not be clear which request the current response belongs to. - .. note:: The telegram body itself could be compressed with zlib to minimize the amount of data transferred over the socket. - This compression is applied to the response of the 'get critical path report' request. - The compressor ID byte in the telegram header signals whether the telegram body is compressed. Get critical path timing report example --------------------------------------- From 6eb326eff3a779b5208099de2ad6ad4eddff05e2 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 23:01:07 +0300 Subject: [PATCH 56/57] add high-level context of explanation for server mode into command_line_usage.rst --- doc/src/vpr/command_line_usage.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/src/vpr/command_line_usage.rst b/doc/src/vpr/command_line_usage.rst index 4780c55ea98..3895d071ee5 100644 --- a/doc/src/vpr/command_line_usage.rst +++ b/doc/src/vpr/command_line_usage.rst @@ -1826,6 +1826,9 @@ The following options are used to enable power estimation in VPR. Server Mode Options ^^^^^^^^^^^^^^^^^^^^^^^^ + +If VPR is in server mode, it listens on a socket for commands from a client. Currently, this is used to enable interactive timing analysis and visualization of timing paths in the VPR UI under the control of a separate client. + The following options are used to enable server mode in VPR. .. seealso:: :ref:`server_mode` for more details. From 97ad7f7bc84fe258c5ee3b72be95443db62dcc9d Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Mon, 10 Jun 2024 23:08:20 +0300 Subject: [PATCH 57/57] add high-level context of explanation for server mode into server_mode/index.rst --- doc/src/vtr/server_mode/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/src/vtr/server_mode/index.rst b/doc/src/vtr/server_mode/index.rst index 30e72af486b..66972681241 100644 --- a/doc/src/vtr/server_mode/index.rst +++ b/doc/src/vtr/server_mode/index.rst @@ -3,7 +3,8 @@ Server Mode ================ -VTR provides the ability to run in server mode using the following command-line arguments. +If VPR is in server mode, it listens on a socket for commands from a client. Currently, this is used to enable interactive timing analysis and visualization of timing paths in the VPR UI under the control of a separate client. +VPR provides the ability to run in server mode using the following command-line arguments. .. code-block:: none