Matlab connection - GET Syntax - Printable Version +- phyphox Forums (https://phyphox.org/forums) +-- Forum: Discussion (https://phyphox.org/forums/forumdisplay.php?fid=1) +--- Forum: General (https://phyphox.org/forums/forumdisplay.php?fid=3) +--- Thread: Matlab connection - GET Syntax (/showthread.php?tid=716) |
Matlab connection - GET Syntax - Pinky und Brain - 03-14-2020 Hi Phyphoxer I use Phyphox in my physicx-Class. Since i grew up with Matlab, i would like to connect PhyPhox with matlab. The remote interface is working fine, the communication can't be very hard since matlab has functions for JSON. I have no experience with that protocol, hence i have problems understanding the syntax of the GET? command. In the WIKI there is a example /get?abc
I just want to poll the lates sensordata for e.g. acceleration sensor. I don't understand what "abc" means and how to change the syntax to address the buffer for the accelleration sensors.Thank you for your Help @ Sebastian: thank you for your excellent presentation last week in Esslingen RE: Matlab connection - GET Syntax - Sebastian Staacks - 03-14-2020 The "abc" is the name of the buffer that you want to read. I am planning a method to get a list of available buffers, but right now you have to look into the experiment configuration to find the names for each experiment. So, for example for the accelerometer, you can find (https://github.com/Staacks/phyphox-experiments/blob/master/accelerometer.phyphox#L229) that there are the buffers "accX", "accY", "accZ", "acc" and "acc_time", which are x, y and z of the accelerometer as well as the absolute value and the timestamps to each sensor event. /get?accX should give you the last x value of the accelerometer /get?accY=full&acc_time=full should give you the all y values and the coresponding times /get?acc_time=10 should give you all times after the first entry that exceeds 10 (in this case all times after 10 seconds) /get?acc_time=10&acc=10|acc_time should give you all times after the first entry that exceeds 10 (in this case all times after 10 seconds) as well as all absolute acceleration values coresponding to timestamps larger than 10 seconds (the "|" means that the given threshold is applied to a different buffer, in this case acc_time). |