ScriptTraceEditorObject¶
- class ScriptTraceEditorObject.ScriptTraceEditorObject¶
- Bases: - objectRepresents a open trace editor, used to perform online actions on a trace.- property is_online: bool¶
- Check if the application for the trace is online.
 - property is_logged_in: bool¶
- Check if the trace is logged in.
 - property is_running: bool¶
- Check if the trace is currently running.
 - download() None¶
- Download a trace to the device. After this call the trace will be logged in.- Exception:
 This is exception is throw if the trace can not be downloaded, because it is either a device trace, not online or contains no variables. 
 - start() None¶
- Start the recording of a downloaded trace- Exception:
 This exception is thrown if the trace can not be started, because tt is not logged in, is is already running or stopped on a trigger. 
 - stop() None¶
- Stop the recording of a downloaded trace- Exception:
 This exception is thrown if the trace can not be stopped, because it is not logged in, is is not running or stopped on a trigger. 
 - save(file_name: str) None¶
- Save the data of the trace to a file. If the file already exists it is overwriten.The format of the file depends on the fileextension.- Parameters:
- file_name (str) – 
 Allowed formats are *.txt Text file *.csv CSV file(data only) *.trace Trace file - Exception:
 This exception is thrown if the trace can not be saved, because it is a device trace. 
 - get_trigger_state() TriggerState¶
- Returns information about the trigger while the trace is currently running.- Exception:
 This exception is thrown if the trace has not be downloaded to the device, 
 - get_trigger_timestamp() int¶
- Returns the (absolute) timestamp of the last trigger event. The resolution is ms or µs, depending on the resolution of the trace.- Exception:
 This exception is thrown if the trace has not be downloaded to the device, 
 - get_trigger_startdate() DateTime¶
- Returns the date of the last trigger event in UTC.- Exception:
 This exception is thrown if the trace has not be downloaded to the device, 
 - get_packet_state() PacketState¶
- Returns information about the trace packet in the runtime.- Exception:
 This exception is thrown if the trace has not be downloaded to the device, 
 - get_trace_start_timestamp() int¶
- Returns the (absolute) timestamp when the packet was started.The resolution is ms or µs, depending on the resolution of the trace.- Exception:
 This exception is thrown if the trace has not be downloaded to the device, 
 - reset_trigger() None¶
- Resets the trigger and causes that the trace is running again
 - get_online_traces() list[str]¶
- Returns a list of strings with the packet names of trace, that are currently online.- Return type:
- list[str] 
- Returns:
- See summary 
 
 - upload_to_device_trace(stPacketName: str) None¶
- Uploads the given trace packet to the currently open device trace editor.- Parameters:
- stPacketName (str) – The name of the trace packet to upload