How I trace conversation between driver and server #25
scriptorron
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Often it is needed to analyze the conversation between the driver and the server.
The driver gets its inputs from the server on stdin and writes its responses to stdout. Errors and logs are written to stderr. The inputs on stdin and the outputs on stdout must be XML conform ti the INDI protocol specification. By theory you can start the driver standalone and generate inputs by feeding stdin.
For recording the communication between client (KStars/EKOS) and the server I run the following command on the computer where the client runs:
Advantage of this concept is that you get requests and answers in timely order. Disadvantage is that you cannot distinguish between in- and output. Furthermore the XML blocks for in- and output are often intermingled.
An other concept is to make a wrapper around the driver which writes all in- and outputs to files. Just create a file "indi_simulator_CCD_wrapper.sh" with this contents:
Make "indi_simulator_CCD_wrapper.sh" executable with
chmod u+x indi_simulator_CCD_wrapper.sh
and use it like the CCD Simulator:All inputs will get recorded in "indi_simulator_CCD_in.xml" and all outputs in "indi_simulator_CCD_out.xml" for later analysis.
Beta Was this translation helpful? Give feedback.
All reactions