Results 1 to 4 of 4
  1. #1
    KarlNorway is offline Member
    Join Date
    Dec 2011
    Posts
    57
    Rep Power
    0

    Default Turning parts of hex string into little endian

    Hi

    Im trying to write a program that will test some stuff at work and the protocol they have made is buildt up like this:

    Prelim (always the same) , length (of data field),senso. no, adress, data and crc.

    The CRC is calculated from all except prelim, little endian on all fields (turned after crc-calc) on everything but prelim.

    Can someone pleas help me?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,403
    Rep Power
    25

    Default Re: Turning parts of hex string into little endian

    Can you post some examples that show the contents of the input and the desired output?
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    KarlNorway is offline Member
    Join Date
    Dec 2011
    Posts
    57
    Rep Power
    0

    Default Re: Turning parts of hex string into little endian

    Here goes

    Java Code:
    utb2sio 04 01 00 08 2b 45 // in big endian
    I do have all the diffent parts of the string in separate strings that I combine.

    The data field content is preset in the protocol.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,403
    Rep Power
    25

    Default Re: Turning parts of hex string into little endian

    What does that post show? Is it a String with spaces between the parts or what?
    Can you post the input and show what output you want from it?
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 0
    Last Post: 09-12-2011, 01:06 PM
  2. Decode sound sample from Endian
    By cielle in forum Advanced Java
    Replies: 0
    Last Post: 12-24-2010, 08:21 AM
  3. turning string numbers into doubles
    By imorio in forum New To Java
    Replies: 5
    Last Post: 11-10-2010, 10:25 PM
  4. How do I convert Little endian to Big endian?
    By Krooger in forum New To Java
    Replies: 2
    Last Post: 12-10-2009, 06:47 PM
  5. Replies: 3
    Last Post: 01-15-2008, 07:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •