Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value to String conversion in Non Verbose Mode #478

Open
Sowmbika000 opened this issue Jun 1, 2024 · 1 comment
Open

Value to String conversion in Non Verbose Mode #478

Sowmbika000 opened this issue Jun 1, 2024 · 1 comment

Comments

@Sowmbika000
Copy link

Sowmbika000 commented Jun 1, 2024

we are using non verbose mode for our logging. Often times, we are printing states and values for eg below function:

#define INIT_STATE 0x01
#define RUN_STATE 0x02
#define DE_INIT_STATE 0x03
void main (void)
{
uint8 state = INIT_STATE;

switch(state):
    case INIT_STATE:
          func_a();
     break;
    case RUN_STATE:
        func_b();
     break;
    case DE_INIT_STATE:
        func_c();
     break;

 DLT_NONVERBOSE_MODE();
 DLT_LOG_ID(appid, DLT_LOG_INFO, msg_id, DLT_INIT(state);

}

we have updated fibex.xml as below:

		<!--=============== 1. Parameter ==================-->
		<fx:PDU ID="PDU_11_0">
			<ho:SHORT-NAME>PDU_11_0</ho:SHORT-NAME>
			<ho:DESC>STATE:</ho:DESC>
			<fx:BYTE-LENGTH>0</fx:BYTE-LENGTH>
			<fx:PDU-TYPE>OTHER</fx:PDU-TYPE>
		</fx:PDU>
		<!--=============== 2. Parameter ==================-->
		<fx:PDU ID="PDU_11_1">
			<ho:SHORT-NAME>PDU_11_1</ho:SHORT-NAME>
            <fx:BYTE-LENGTH>1</fx:BYTE-LENGTH>
			<fx:PDU-TYPE>OTHER</fx:PDU-TYPE>
            <fx:SIGNAL-INSTANCES>
                <fx:SIGNAL-INSTANCE ID="S_11_1">
                    <fx:SEQUENCE-NUMBER>0</fx:SEQUENCE-NUMBER>
                    <fx:SIGNAL-REF ID-REF="S_UINT8"/>
                </fx:SIGNAL-INSTANCE>
            </fx:SIGNAL-INSTANCES>
		</fx:PDU>

It is printed as below in DLT_Viewer after loading the plugin fibex.xml:
182339 2024/05/13 13:56:12.883000 87.8642 153 ECU APP CNT 0 log info non-verbose STATE: 1
182339 2024/05/13 13:56:12.883000 87.8642 153 ECU APP CNT 0 log info non-verbose STATE: 2
182339 2024/05/13 13:56:12.883000 87.8642 153 ECU APP CNT 0 log info non-verbose STATE: 3

Can we map it to the strings as below so it is readable and easily understandable?
182339 2024/05/13 13:56:12.883000 87.8642 153 ECU APP CNT 0 log info non-verbose STATE: INIT_STATE
182339 2024/05/13 13:56:12.883000 87.8642 153 ECU APP CNT 0 log info non-verbose STATE: RUN_STATE
182339 2024/05/13 13:56:12.883000 87.8642 153 ECU APP CNT 0 log info non-verbose STATE: DE_INIT_STATE

Is this possible? Should we update the plugin in such way? Could you please guide.

@alexmucde
Copy link
Collaborator

@Thil000 Yes thats an intersting feature. Please provide an update of the plugin if possible.
Do you also have an idea how to extend the Fibex file? Is there a standard way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants