0

I want to send customized diagnostic requests to an ECU in a specific CANoe configuration, and receive the responses of that request, through an external tool (to be developed by me in C#, Visual Studio).

I know of libraries like Vector.Diagnostics and so on, and these will be useful in sending the requests and stuff. But from what I have seen so far, most scripts using these libraries have been loaded into a CANoe configuration, and executed through .NET test modules in the Simulation setup.

So even if I do create a diagnostic request using the "Vector.Diagnostics" library, how exactly should I associate the request with an ECU inside a specific configuration? The ECU itself can be addressed via the ECU Qualifier and "ECU" class object. But what about the CANoe Configuration?

I was thinking of opening the associated CANoe configuration through the CANoe-COM server component and then sending the request, but then it doesn't really make sense. There's no reason why the Configuration(opened through the COM server) would be associated with the diagnostic request(created and sent through the Vector Library in C#).

Someone? Anyone?...

PS: I would also appreciate if this task could be done without having to completely open the CANoe Configuration.

  • How do you plan to access the bus? Does your C# application have access to the (CAN, Ethernet, ?) bus? Or is this supposed to be done through CANoe? – MSpiller Mar 19 '19 at 20:03
  • Through CANoe,yes. All the Transport Layer and Bus related aspects would be configured through CANoe. – Gamma-ray-burst Mar 20 '19 at 03:46
  • Come to think of it, I could probably even use established CAPL libraries indirectly (that handle these transport layer level aspects) through C#, using some commands. But my main problem is associating a CANoe configuration with all of this. – Gamma-ray-burst Mar 20 '19 at 03:52
  • I don't get, what problem you mean by "associating a CANoe configuration with all of this". I would start CANoe and load a config via COM. You can also send the diagnostic request and receive the responses via CANoe's COM API. – MSpiller Mar 20 '19 at 08:23
  • Yeah. But the way I see it, in order to open a CANoe Configuration, we need to declare a CANoe.Application object to open it. On the other hand, in order to run CAPL functions, we need to create a CANoe.CAPLFunction object and then use the function. Is it that these two objects (one of Application, and the other of CAPLFunction) exchange data with each other, so that it is automatically conveyed to CAPLFunction that we're working on this particular configuration? In which case, well, there was no problem to begin with, I guess... – Gamma-ray-burst Mar 22 '19 at 05:34
  • My understanding is, that a CAPLFunction can only be run in the context of a running CANoe.Application. If I remember correctly, you have to have a CANoe.Application object to be able to construct the CAPLFunction object. – MSpiller Mar 22 '19 at 07:27
  • Okay,but weirdly enough, C# is throwing this error : Class Not registered( HRESULT : REGDB_E_CLASSNOTREG),during runtime. I have declared objects of both CANoe.Application and CAPLFunction, and C# doesn't complain as I type them out. On running this, my CANoe Configuration does open, but that's as far as it goes. It highlights the line where I declare my CAPLFunction object, and raises the above mentioned error. – Gamma-ray-burst Mar 22 '19 at 09:33
  • Would need to see the code. Maybe create a new question for that? – MSpiller Mar 22 '19 at 09:34
  • Sure. I hope that's okay with StackOverflow, mentioning the same topic in a different question. – Gamma-ray-burst Mar 22 '19 at 09:54
  • Otherwise edit this one, or close/delete it. I just think, that your problem with running a CAPLFunction from C# is not really related to the topic title. Do as you think. – MSpiller Mar 22 '19 at 10:13

0 Answers0