teleplot icon indicating copy to clipboard operation
teleplot copied to clipboard

Optional flags

Open lokiledev opened this issue 3 years ago • 2 comments

Thanks for this great tool!

On the current main branch https://github.com/nesnes/teleplot/commit/493b8665d081d8c8b62e887468590db4524a95a1

By reading the doc I don't understand what the |g value corresponds to for the optional E field.

E is containing flags that carry information on how to read and display the data.

Is it still necessary ?

  • Also i tried using the no plot option |np  but when I refresh the page the plots are still automatically added, does it work?
  • When i plotted some values in c++ using stringstream I had some values that were formatted with scientific unit 3.2323e-8 and it was detected as a text so no chart was availble. Is it mandatory to format with fixed floating point?

It can be solved on the client side with some flags, maybe we can add this to the doc ?

std::stringstream ss;
ss << std::fixed;
ss.precision(4);

lokiledev avatar Oct 18 '22 10:10 lokiledev

Hi,

The G flag

The g flag is historical and should not be required (it was an attempt to comply with statsd but this is something that's being progressively dropped. Actually echo "myData:4" | nc -u -w0 127.0.0.1 47269 is a valid packet.

The np flag

The np flag should be working, make sure to group all the flags after a single |. All the exemples bellow are valid:

  • echo "myData:4|g" | nc -u -w0 127.0.0.1 47269
  • echo "myData:4|g,np" | nc -u -w0 127.0.0.1 47269
  • echo "myData:4|gnp" | nc -u -w0 127.0.0.1 47269
  • echo "myData:4|npg" | nc -u -w0 127.0.0.1 47269

The scientific notation

The scientific notation should be considered as a number, not a string. This seems to be a side effect of the recently added string support. Teleplot is currently being actively improved so we can expect a few bugs like this to occur. this will be fixed very soon along with a stabilization of the 3D shapes protocol thanks to the great work of @Maximilien22 !

nesnes avatar Oct 19 '22 12:10 nesnes

Thanks for feedback, I did some more tests and np actually works my bad. Do you want me to keep sending feedback :) I was wondering if we could add support for a binary serialization to have a more efficient transport ?

lokiledev avatar Oct 21 '22 08:10 lokiledev