Results 1 to 2 of 2

Thread: How to convert Little Endian(CAN Frame data) to Big Endian Format of C++ with Qt

  1. #1
    Join Date
    Jun 2015
    Posts
    109
    Thanks
    20
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Question How to convert Little Endian(CAN Frame data) to Big Endian Format of C++ with Qt

    data[0] =0xA5;
    data[1] =0xBC;
    data[2] =0xFE;
    data[3] =0xA5;
    data[4] =0xB3;
    data[5] =0xE1;
    data[6] =0x29;
    data[7] =0x70;

    data[8] = {0xA5,0xBC,0xFE,0xA5,0xB3,0xE1,0x29,0x70};

    Input: 700 [8] 0xA5 0xBC 0xFE 0xA5 0xB3 0xE1 0x29 0x70

    Output: 0xBC 0xA5 0xA5 0xFE 0xE1 0xB3 0x70 0x29 (Currently i am getting this output) Little Endian format

    Requested /Required output as : 0xA5 0xBC 0xFE 0xA5 0xB3 0xE1 0x29 0x70 Big Endian Format

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to convert Little Endian(CAN Frame data) to Big Endian Format of C++ with Qt


Similar Threads

  1. reading integer with big/little endian
    By stef13013 in forum Qt Programming
    Replies: 1
    Last Post: 3rd September 2012, 22:28
  2. Replies: 2
    Last Post: 3rd June 2011, 07:39
  3. convert from little endian to big endian
    By adamatic in forum Qt Programming
    Replies: 3
    Last Post: 2nd March 2009, 08:52
  4. Endian
    By coderbob in forum Qt Programming
    Replies: 1
    Last Post: 30th November 2007, 11:49
  5. Replies: 3
    Last Post: 26th July 2006, 13:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.