Search code examples
autosar

How do you connect a software component and an RTE generated function? (in davinci developer)


I have a generated RTE, which contains functions such as did_read, did_checkconditions and did_write. I want to create a software component and connect the created software component to the generated rte(RTE_UNCONNECTED). I know that I can manually change the code in the RTE and make it work, but I need to re-write every time I re-generate RTE. How do I connect/access rte generated functions from a Software component in da vinci developer?

Tried looking into the documentation of vector. I have defined a Software component in the developer and instantiated by creating a component prototype. I have connected the service ports to the created prototype in the configurator. I created a dummy_init runnable to add to the os tasks so that I can generate code. I need other runnables to respond to the request such as did_read, did_write.

I need to connect the RTE and the software component in da vinci developer/configurator so that I shall be able to send and receive data.


Solution

  • I assume from your did_read, did_write and did_checkconditions, that these come out of the Dcm ( as service ports) and therefore from the DiagExtract.

    For this, you should check your SWCs, which ones provide actually the DIDs. Then you should take a look in the generic AUTOSAR DCM SWS, how Service Ports for certain elements look like and create similar ports then in your SWCD to generate the functions.

    8.8.3.2 DataServices_{Data}

    Using the concepts of the SW-C template, the interface is defined as follows if ClientServer interface is used (DcmDspDataUsePort set to USE_DATA_SYNCH_CLIENT_SERVER or USE_DATA_ASYNCH_CLIENT_SERVER or USE_DATA_ASYNCH_CLIENT_SERVER_ERROR)

    {Data} meaning here, for each DID!