Closed Aziz-repo closed 1 year ago
You mean when using the client? Right now, you can't. Only the subfunction read from the response.
Do you have a good use-case for that?
well now I'm using the client to get data from an ECU and I'm in the middle of getting responses concerning DTCs and I want to interpret the responses to fill the service_data attribute. As you know interpret_response()
method in the ReadDTCInformation class need a subfunction and I want to get it dynamically.
Not sure if I understand correctly, but the client do call interpret_response
for you, so the service_data attribute is filled.
If you manage Services manually, then you should have your request available.
Am I missing something?
In other word I sending requests using the client then I use the BaseService.interpret_response()
where I substitute the BaseService with the actual Service name. I did it this way because I'm developing a GUI application where the user can configure requests using dropboxes and receive responses and the data within. That data must be displayed in details and I didn't find another way to achieve that other than the previously mentioned way
debugging over dropbox is definetly not a use case I predicted! ha ha.
If the client attach the request to the response inside a property called "original_request", would that help?
That will be awesome. I can get a lot of data from that attribute if it's provided and only rely on the response to get the data. Regarding the GUI, I'm going for something like vector testing software if you are familiar with it but it is more user friendly specially for testers with little knowledge on the automotive industry.
I can add this easily tonight. Expect a release during the weekend. Cheers
Implemented in v1.18.1. Please confirm that this resolve your problem. Thank you!
Hey again, Sorry for the late response I've tested the new attribute and it seems stable. It served well the use case in hand. Thank you!
Thank you for the feedback!
Hey, Is there a way of retrieving the subfunction used in the request from the response object?