svlad-90 / DLT-Message-Analyzer

"Extended search" plugin for the DLT-viewer
Other
76 stars 13 forks source link

Is there any example for how to use thIs? #159

Closed zeerd closed 2 years ago

zeerd commented 2 years ago

Means , need I modify my codes for the outputting logs with some special formale?

I did not found any documents to discuss this.

svlad-90 commented 2 years ago

Hi @zeerd, let me provide you with some information regarding your question.

The DLT-Message-Analyzer is not a stand-alone application. It is only a plugin for the GENIVI ( COVESA ) dlt-viewer: https://github.com/COVESA/dlt-viewer

The installation guide of this repo explains how to install the DLT-Message-Analyzer plugin on top of the installed dlt-viewer: https://github.com/svlad-90/DLT-Message-Analyzer/blob/master/md/installation_guide/installation_guide.md

dlt-viewer's repo has INSTALL.md, which explains how to build and install the dlt-viewer application: https://github.com/COVESA/dlt-viewer/blob/master/INSTALL.md


But all above is only the "viewer" part. It will allow you to analyze *.dlt files.

In order to SEND the messages:

In other words, you need to deploy the following environment on your device: image

Hopefully, the above provides enough overview so that you could move on. Please, try it out.

If you'll have further questions - let me know. ))

zeerd commented 2 years ago

Seems, my question is not clear enough.

I means, is there a formale for the output strings?

For example:

In a.c , I could use DLT_LOG(C, DLT_LOG_INFO, DLT_STRING("Hello, B!"))

in b.c I could use DLT_LOG(C, DLT_LOG_INFO, DLT_STRING("Hello, A!"))

And then, how could zhe DMA know it is :

A -> B : Hello, B!
B -> A : Hello, A!

Need I do something like DLT_STRING("from A to B : Hello, B!") ? Is there a rule for this? I did not find a link to some doc of those things from the README.md in the root dir.

svlad-90 commented 2 years ago

Hi @zeerd, Ok. Now your question is clear enough.

You are interested in the plantuml features. Particularly, in how to let the plugin know which part of the message is which token of the sequence diagram. Which part is the client? Which part is the service? Which part is the method name? Etc.

The documentation covers this. The following article explains it extensively: https://github.com/svlad-90/DLT-Message-Analyzer/blob/master/md/plant_uml/plant_uml.md. Read "General idea", "Simple example" and "Advanced example" sections carefully.


In short - the plugin does not have any hard-coded formatting rules for the strings. You are building those rules using the regex group names:

Group name Meaning Type
USID Sequence id of the communication optional
UCL Name of the client mandatory
URT Request identifier request_type - at least one of the request types should be filled in
URS Response identifier request_type - at least one of the request types should be filled in
UEV Event identifier request_type - at least one of the request types should be filled in
US Service name mandatory
UM Method name mandatory
UA Call arguments optional

In order to build a sequence diagram:

Be aware, that if the output of your application is not unified, you can still work with this, creating UML-capable regex expressions for different types of output. Store them, as separate regex patterns and then use a combination of those to build a sequence diagram, which will contain rows with different formatting.

In other words, the less unified output you have, the more regex expressions you'll need to build. Still, it is possible to work even in that way. At least, I had such experience when was trying to build sequences of different domains, which had totally different formatting of the output messages.

If there will be any further questions - do not hesitate to ask me ))

svlad-90 commented 2 years ago

Hi @zeerd, if your question is answered - please, let me know. In such a case I'll close it ))

svlad-90 commented 2 years ago

As there is no further feedback, the issue is marked as closed.

@zeerd, please, reopen it in case if further help is needed regarding this topic. ))