Menu

Logging binary data with time stamps

Logging
Maettu
2019-12-03
2022-04-29
  • Maettu

    Maettu - 2019-12-03

    YAT offers multiple options for logging binary data with time stamps:

    [Log > Settings... > Neat Format] will log according to the terminal monitor configuration, e.g. using [View > Radix > Hex] and [View > Show Time Stamp], with or without the radix identifier. This will e.g. result in (YAT neat log as hex strings without radix identifier):

    (20:30:40.234) 41 42 43 44
    

    Or (YAT neat log as hex strings with radix identifier):

    (20:30:40.234) 41h 42h 43h 44h
    

    Neat logging is available as text (.log, .txt, .whatever) or RTF (.rtf, same coloring as the YAT monitor).

    [Log > Settings... > Neat Format > Extension] = [.xml] will log using an XML schema that contains the time stamp for each line (given that [View > Show Time Stamp] is active; with the upcoming YAT 2.1.1 this will no longer be required):

    <?xml version="1.0" encoding="utf-8"?>
    <ArrayOfXmlTransferTextLine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <XmlTransferTextLine TimeStamp="2019-12-03T20:30:40.234+01:00" Port="COM101" Direction="Tx" Text="ABCD" ErrorText="" Length="4" />
    </ArrayOfXmlTransferTextLine>
    

    The corresponding XML schema will also be saved to the selected output folder.

    [Log > Settings... > Raw Format > Extension] = [.xml] will also log using a similar XML schema, containing data in Base64 encoding:

    <?xml version="1.0" encoding="utf-8"?>
    <ArrayOfXmlTransferRawLine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <XmlTransferRawLine TimeStamp="2019-12-03T20:30:40.234+01:00" Port="COM101" Direction="Tx" DataAsBase64="QUJDRA0K" />
    </ArrayOfXmlTransferRawLine>
    

    [Log > Settings... > Raw Format > Extension] = other than [.xml] will result in a plain raw binary file, thus not containing any time stamps.

    Notes:

    • [Log > Settings...] offers some more options for formatting of monitors and neat logs.
    • [View > Format...] offers some more options for filing and content of the logs.
    • Screenshot #6 at the YAT project page shows these dialogs.

    Feel free to add to this discussion of file a feature request in case YAT doesn't offer a certain needed feature yet.

     
  • Anonymous

    Anonymous - 2022-04-27

    Hi May I know how to include Date Stamping in the YAT?

     
    • Maettu

      Maettu - 2022-04-29

      Hmm... I think the above post describes everything... Logging with Neat options will allow this, see screenshot.

       

      Last edit: Maettu 2022-04-29
  • Anonymous

    Anonymous - 2022-04-27

    (06:40:15.220) (COM3) (>>) 55 AA 0F 03 4E 2A 06 7B 01 BF 08 21 20 11 02 02 01 00 00 B2 (20)

    Hi , currently i can view only time on the monitor window. May I know how can I set to add date stamp in the monitor window as well?

    Thanks

     
    • Maettu

      Maettu - 2022-04-29

      See above. Or describe the issue you face in more detail, maybe I am not getting it.

       

      Last edit: Maettu 2022-04-29
  • Maettu

    Maettu - 2022-04-29

    If you want to actually transmit a time stamp, use \!(TimeStamp()), formatted according to View > Format Settings... > Options > Time Stamp. Of course this will also be logged, as part of the sent data.

     

Anonymous
Anonymous

Add attachments
Cancel