pprzlink icon indicating copy to clipboard operation
pprzlink copied to clipboard

IvyMessagesInterface send_request not working as expected

Open rafael1193 opened this issue 4 years ago • 1 comments

The function IvyMessagesInterface.send_request is sending the agent name in the place of the message class.

A CONFIG request message is sent as IvyMessagesInterface 63240_1 CONFIG_REQ 200 instead of ground 63240_1 CONFIG_REQ 200

https://github.com/paparazzi/pprzlink/blob/f8e9822347ee2d306e30c4f675ac1897d28f3768/lib/v2.0/python/pprzlink/ivy.py#L295

should be replaced by

class_name, new_id, request_message.name, request_message.payload_to_ivy_string()

rafael1193 avatar Oct 12 '20 13:10 rafael1193

Actually, this is correct, if you compare to the ocaml lib, it is the sender (agent) name that is sent in first position: https://github.com/paparazzi/pprzlink/blob/master/lib/v2.0/ocaml/pprzLink.ml#L814

The confusion is probably coming from the fact that the agent name of the server is "ground", but does not refer to the class name in fact. https://github.com/paparazzi/paparazzi/blob/master/sw/ground_segment/tmtc/server.ml#L25

gautierhattenberger avatar Nov 18 '20 10:11 gautierhattenberger