Git Product home page Git Product logo

Comments (3)

JayTeeBat avatar JayTeeBat commented on June 26, 2024

Looks like the ASCWriter is mostly dumping the output of the Message.str() method in the .asc file,
which is not quite the format expected (as defined by the Vector document).

from python-can.

pierreluctg avatar pierreluctg commented on June 26, 2024

This is because you are not calling the right API

import can
can_msgs = [can.Message(timestamp=1714055256, arbitration_id=419377447, data=[0x12, 0xF3, 0x3b, 0x45, 0xcc, 0x6e])]
asc_writer = can.ASCWriter("dummy_data.asc")
for msg in can_msgs:
    asc_writer.on_message_received(msg)
    # or asc_writer(msg)
    
asc_writer.stop()

See examples and doc on how to use Loggers
https://github.com/hardbyte/python-can/blob/main/examples/simple_log_converter.py
https://python-can.readthedocs.io/en/stable/listeners.html#logger

from python-can.

JayTeeBat avatar JayTeeBat commented on June 26, 2024

@pierreluctg just looked at the example and the code again, makes perfect sense.

Thanks for taking the time to reply and sorry for the silly question, I realize the proper operation of the reader/writers was duly tested, I just couldn't figure out my mistake.

from python-can.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.