Method and apparatus for synchronously displaying measurement data and computer readable storage medium
A method of synchronously displaying measurement data includes: setting a synchronization identifier and a synchronization function for a plurality of measurement data display windows respectively; when a display time span of any measurement data display window in a paused state is modified, calling the synchronization function of other measurement data display windows in a paused state, and matching the synchronization identifier of the measurement data display window in a paused state with the synchronization identifiers of other measurement data display windows in a paused state in the synchronization function; if successfully matching, performing synchronization operation.
1 . A method of synchronously displaying measurement data, comprising:
setting a synchronization identifier and a synchronization function for each of a plurality of measurement data display windows;
wherein each of the plurality of measurement data display windows comprises a time axis and displays measurement data between a start time and an end time of the time axis;
when a display time span defined by the start time and the end time of the time axis, of one of the plurality of measurement data display windows in a paused state is modified, calling by the measurement data display window in the paused state, the synchronization function of each other measurement data display windows in the paused state, and comparing the synchronization identifier of the measurement data display window in the paused state with the synchronization identifiers of the other measurement data display windows in the paused state in the synchronization function;
if successfully matching, performing a synchronization operation that synchronizes the display time spans of the matched measurement data display windows.
2 . The method of claim 1 , wherein
modifying the display time span of the measurement data display window in the paused state comprises:
triggering an event affecting the display time span;
based on the event affecting the display time span, calculating a current display time span of the measurement data display window in the paused state;
updating the display time span of the measurement data display window in the paused state to the current display time span.
3 . The method of claim 2 , wherein
the event affecting the display time span is a trigger event.
4 . The method of claim 3 , wherein
the trigger event comprises a mouse event, a keyboard event, and a program control event.
5 . The method of claim 1 , wherein
matching the synchronization identifier of the measurement data display window in the paused state with the synchronization identifiers of the other measurement data display windows in the paused state in the synchronization function comprises:
determining whether the synchronization identifier of the measurement data display window in the paused state is identical to the synchronization identifiers of the other measurement data display windows in the paused state, and if yes, achieving successful matching.
6 . The method of claim 1 , wherein
performing the synchronization operation comprises:
transferring a current display time span of the measurement data display window in the paused state as a parameter to the synchronization function of each of successfully-matched measurement data display windows in the paused state;
modifying, by each of the successfully-matched measurement data display windows, the display time span of a successfully-matched measurement data display window to the display time span carried in parameters of a corresponding synchronization function by making the display time span of each of the successfully-matched measurement data display windows consistent with the display time span of the measurement data display window in the paused state to achieve the synchronization operation.
7 . The method of claim 1 , wherein
determining the measurement data display window is in the paused state comprises:
determining whether a pause flag of the measurement data display window is true; if yes, determining the measurement data display window is in the paused state.
8 . The method of claim 1 , wherein
the measurement data display window comprises a graphical window or a packet information window.
9 . The method of claim 1 , wherein
the method of synchronously displaying the measurement data is applied to a synchronous display of vehicle bus measurement data in a vehicle bus tool software.
10 . An apparatus, comprising:
at least one memory and at least one processor, wherein
the at least one memory stores computer executable instructions, wherein the computer executable instructions are executed by the at least one processor to perform a method of synchronously displaying measurement data;
wherein the method of synchronously displaying the measurement data comprises:
setting a synchronization identifier and a synchronization function for each of a plurality of measurement data display windows;
wherein each of the plurality of measurement data display windows comprises a time axis and displays measurement data between a start time and an end time of the time axis;
when a display time span defined by the start time and the end time of the time axis, of one of the plurality of measurement data display windows in a paused state is modified, calling by the measurement data display window in the paused state, the synchronization function of each other measurement data display windows in the paused state, and comparing the synchronization identifier of the measurement data display window in the paused state with the synchronization identifiers of the other measurement data display windows in the paused state in the synchronization function;
if successfully matching, performing a synchronization operation that synchronizes the display time spans of the matched measurement data display windows.
11 . The apparatus of claim 10 , wherein
modifying the display time span of the measurement data display window in the paused state comprises:
triggering an event affecting the display time span;
based on the event affecting the display time span, calculating a current display time span of the measurement data display window in the paused state;
updating the display time span of the measurement data display window in the paused state to the current display time span.
12 . The apparatus of claim 11 , wherein
the event affecting the display time span is a trigger event, wherein the trigger event comprises a mouse event, a keyboard event, and a program control event.
13 . The apparatus of claim 10 , wherein
matching the synchronization identifier of the measurement data display window in the paused state with the synchronization identifiers of the other measurement data display windows in the paused state in the synchronization function comprises:
determining whether the synchronization identifier of the measurement data display window in the paused state is identical to the synchronization identifiers of the other measurement data display windows in the paused state, and if yes, achieving successful matching.
14 . The apparatus of claim 10 , wherein
performing the synchronization operation comprises:
transferring a current display time span of the measurement data display window in the paused state as a parameter to the synchronization function of each of successfully-matched measurement data display windows in the paused state;
modifying, by each of the successfully-matched measurement data display windows, the display time span of a successfully-matched measurement data display window to the display time span carried in parameters of a corresponding synchronization function by making the display time span of each of the successfully-matched measurement data display windows consistent with the display time span of the measurement data display window in the paused state to achieve the synchronization operation.
15 . The apparatus of claim 10 , wherein
determining the measurement data display window is in the paused state comprises:
determining whether a pause flag of the measurement data display window is true; if yes, determining the measurement data display window is in the paused state.
16 . The apparatus of claim 10 , wherein
the measurement data display window comprises a graphical window or a packet information window.
17 . A non-transitory computer readable storage medium, storing computer readable instructions, wherein the computer readable instructions are executed by at least one processor to perform a method of synchronously displaying measurement data;
the method of synchronously displaying the measurement data comprises:
setting a synchronization identifier and a synchronization function for each of a plurality of measurement data display windows;
wherein each of the plurality of measurement data display windows comprises a time axis and displays measurement data between a start time and an end time of the time axis;
when a display time span defined by the start time and the end time of the time axis, of one of the plurality of measurement data display windows in a paused state is modified, calling by the measurement data display window in the paused state, the synchronization function of each other measurement data display windows in the paused state, and comparing the synchronization identifier of the measurement data display window in the paused state with the synchronization identifiers of the other measurement data display windows in the paused state in the synchronization function;
if successfully matching, performing a synchronization operation that synchronizes the display time spans of the matched measurement data display windows.
18 . The non-transitory computer readable storage medium of claim 17 , wherein
modifying the display time span of the measurement data display window in the paused state comprises:
triggering an event affecting the display time span;
based on the event affecting the display time span, calculating a current display time span of the measurement data display window in the paused state;
updating the display time span of the measurement data display window in the paused state to the current display time span.