Unpack trigger for testing electronic control units
A system for real-time simulation includes: a real-time computing device configured to execute the real-time simulation; and a host computing device in communication with the real-time computing device. The host computing device is configured to: configure a real-time simulation application for executing the real-time simulation; and send the real-time simulation application to the real-time computing device. The real-time computing device is further configured to, as part of executing the real-time simulation: receive a message corresponding to a data array to a buffer of the real-time computing device; unpack the message in the buffer; determine that an unpack trigger corresponding to the data array has been activated; and in response to determining that the unpack trigger corresponding to the data array has been activated, re-unpack the message in the buffer.
1 . A system for real-time simulation, comprising:
a real-time computing device configured to execute the real-time simulation; and
a host computing device in communication with the real-time computing device, wherein the host computing device is configured to:
configure a real-time simulation application for executing the real-time simulation; and
send the real-time simulation application to the real-time computing device;
wherein the real-time computing device is further configured to, as part of executing the real-time simulation:
receive a message corresponding to a data array to a buffer of the real-time computing device; and
unpack the message in the buffer, wherein unpacking the message comprises deserializing a first signal value of the data array corresponding to a first position of the data array designated by a first value of an index variable;
wherein the host computing device is further configured to change a value of the index variable to a second value and activate an unpack trigger corresponding to the data array; and
wherein the real-time computing device is further configured to, as part of executing the real-time simulation:
determine that the unpack trigger corresponding to the data array has been activated; and
in response to determining that the unpack trigger corresponding to the data array has been activated, re-unpack the message in the buffer, wherein re-unpacking the message in the buffer comprises deserializing a second signal value of the data array corresponding to a second position of the data array designated by the second value of the index variable.
2 . The system according to claim 1 , further comprising:
an electronic control unit (ECU) in communication with the real-time computing device;
wherein the message received by the real-time computing device is received from the ECU.
3 . The system according to claim 2 , further comprising:
a sensor in communication with the ECU, wherein the data array includes measurement information from the sensor.
4 . The system according to claim 1 , further comprising:
another real-time computing device in communication with the real-time computing device, wherein the another real-time computing device is configured to simulate an ECU in communication with the real-time computing device.
5 . The system according to claim 1 , wherein the host computing device is configured to activate the unpack trigger in connection with changing an index variable corresponding to the data array.
6 . The system according to claim 5 , wherein the host computing device is configured to change the index variable and activate the unpack trigger via a trace (TRC) interface corresponding to a TRC file associated with the data array.
7 . The system according to claim 1 , wherein the real-time computing device is further configured to reset the unpack trigger upon re-unpacking the message.
8 . The system according to claim 1 , wherein the real-time computing device is further configured to increment an unpack counter upon unpacking the message, and to increment the unpack counter again upon re-unpacking the message.
9 . The system according to claim 1 , wherein the real-time computing device is further configured to:
in response to determining that the unpack trigger corresponding to the data array has been activated and that a new message corresponding to the data array has been received contemporaneously with the unpack trigger being activated, unpack the new message corresponding to the data array.
10 . The system according to claim 1 , wherein unpacking the message does not include deserializing any other signal values of the data array other than the first signal value, and wherein re-unpacking the message does not include deserializing any other signal values of the data array other than the second signal value.
11 . A method for executing a real-time simulation on a real-time computing device, comprising:
obtaining, by the real-time computing device, a real-time application from a host computing device;
starting, by the real-time computing device, the real-time simulation based on executed the real-time application; and
during running of the real-time simulation:
receiving a message corresponding to a data array to a buffer of the real-time computing device;
unpacking the message in the buffer, wherein unpacking the message comprises deserializing a first signal value of the data array corresponding to a first position of the data array designated by a first value of an index variable;
determining that an unpack trigger corresponding to the data array has been activated by the host computing device; and
in response to determining that the unpack trigger corresponding to the data array has been activated, re-unpacking the message in the buffer, wherein re-unpacking the message in the buffer comprises deserializing a second signal value of the data array corresponding to a second position of the data array designated by a second value of the index variable.
12 . The method according to claim 11 , wherein the message is received from an electronic control unit (ECU) in communication with the real-time computing device; or
wherein the message is received from another real-time computing device in communication with the real-time computing device, wherein the another real-time computing device simulates an ECU in communication with the real-time computing device.
13 . The method according to claim 11 , further comprising:
resetting the unpack trigger upon re-unpacking the message.
14 . The method according to claim 11 , wherein unpacking the message does not include deserializing any other signal values of the data array other than the first signal value, and wherein re-unpacking the message does not include deserializing any other signal values of the data array other than the second signal value.
15 . A non-transitory computer-readable medium having processor-executable instructions stored thereon for executing a real-time simulation on a real-time computing device, wherein the processor-executable instructions, when executed, facilitate:
obtaining, by the real-time computing device, a real-time application from a host computing device;
starting, by the real-time computing device, the real-time simulation based on executed the real-time application; and
during running of the real-time simulation:
receiving a message corresponding to a data array to a buffer of the real-time computing device;
unpacking the message in the buffer, wherein unpacking the message comprises deserializing a first signal value of the data array corresponding to a first position of the data array designated by a first value of an index variable;
determining that an unpack trigger corresponding to the data array has been activated by the host computing device; and
in response to determining that the unpack trigger corresponding to the data array has been activated, re-unpacking the message in the buffer, wherein re-unpacking the message in the buffer comprises deserializing a second signal value of the data array corresponding to a second position of the data array designated by a second value of the index variable.
16 . The non-transitory computer-readable medium according to claim 15 , wherein the message is received from an electronic control unit (ECU) in communication with the real-time computing device; or
wherein the message is received from another real-time computing device in communication with the real-time computing device, wherein the another real-time computing device simulates an ECU in communication with the real-time computing device.
17 . The non-transitory computer-readable medium according to claim 15 , wherein the processor-executable instructions, when executed, further facilitate:
resetting the unpack trigger upon re-unpacking the message.