Results 1 to 7 of 7

Thread: UDP Streaming data analysis

  1. #1
    Rookie
    Join Date
    Oct 2016
    Posts
    2
    Platform
    PC

    Talking UDP Streaming data analysis

    Hello,everyone! I have a probelm about UDP streaming data analysis .
    I can get 1367 bytes of data through the UDP broadcast transmission. But I don't know how to parse the data.For example:I konw "sWorldVelocity[3]" statrts from 160th byte to 171th byte.I have gotten 12 bytes Hex data. But I don't know how to calculate the sWorldVelocity[0],sWorldVelocity[1] and sWorldVelocity[2].Can you provide some relevant documentation or examples? Thanks you very much!

  2. #2
    Moderator Bealdor's Avatar
    Join Date
    Apr 2012
    Location
    Leipzig
    Posts
    9,616
    Platform
    PC
    Moved to Third Party Apps & API Discussion subforum.

    Please check out this sticky thread for more info.
    Main Rig: CPU I7 4790K@Stock | GPU Nvidia GTX 1060 6GB | RAM 16GB DDR3 1866Mhz | MB Gigabyte GA-Z97X Gaming 3 | SSD Samsung 850 EVO 120GB | HDD Seagate SATA 1TB | O.S. Win 10 Pro 64bit | Wheel Logitech G27
    Second Rig: CPU Q6600@2,80GHz | GPU Nvidia GTX 460 1GB | RAM 4GB DDR2 800Mhz | MB ASUS P5Q SE2 | HDD WD SATA 320GB | O.S. Win 7 64bit
    STEAM ID: Bealdor

    The forum search is a powerful tool, if you know how to use it...

    Please check out our Project CARS 2 FAQ and Tips

    PCARS 1 Known Issues threads: PC / PS4 / XB1

  3. #3
    Rookie
    Join Date
    Oct 2016
    Posts
    2
    Platform
    PC
    Thank you for your replying.I have read this passage,but I still don't know how to parse the data.

  4. #4
    GT5 Pilot mr_belowski's Avatar
    Join Date
    May 2015
    Posts
    1,492
    Platform
    PC
    you have to convert the raw binary data into the relevant types - e.g. 4 contiguous bytes into a float type. How you do this will depend on what language you're using. C# provides a handy 'struct' type which maps the binary data to usable types - my Crew Chief application is open source so you can see how this works here: https://github.com/mrbelowski/CrewCh...yDataStruct.cs

    This is the struct onto which the binary data (byte array) are mapped, so you get lots of already-created floats and things.

    If you're using Java you have to do all the conversions manually. My Android app does this, and uses lots of little utility methods like

    private float getFloat(byte[] data, int offset) {
    return ByteBuffer.wrap(data, offset, 4).order(BYTE_ORDER).getFloat();
    }

    Basically I have to iterate over the byte array that's come from the UDP packet and call methods like this to convert one or more bytes to their proper native types. I'm happy to share the Java class with all this in if you want it, but obviously it's no use if you're not using Java
    Crew Chief details here http://forum.projectcarsgame.com/sho...r-for-PC-users
    Website, download link and forum: http://thecrewchief.org
    Or make a donation, if you think the chief needs to drink more beer:
    https://www.paypal.com/cgi-bin/websc...=LW33XFXP4DPZE

  5. #5
    WMD Member John Hargreaves's Avatar
    Join Date
    Oct 2011
    Location
    Yorkshire
    Posts
    2,983
    Platform
    PC
    You want to discuss UDP or something more general?

    There is an FAQ at the top of the page
    i7-7700K/MSI RTX 3080/Win10 64bit/64Gb RAM/Asus Xonar DX+Beyer Dynamic DT990 Pro headphones/LG 34" UM65 @2560x1080/HP Reverb G2/Logitech G29+G25 shifter/DSD P2 button box

    WMD1 + WMD2 Member

  6. #6
    WMD Member MaximusN's Avatar
    Join Date
    Oct 2011
    Location
    Close enough to enjoy the sounds of the TT-circuit
    Posts
    2,700
    Platform
    PC
    Quote Originally Posted by John Hargreaves View Post
    You want to discuss UDP or something more general?

    There is an FAQ at the top of the page
    It's just one of those bots asking the same question in the first post and then offering help/adding details on a subject not in anyway related to this forum(like bike chainring ratios) in the next ones. I think it either tries to subtly work up the post count to post malicious links or bait you into contacting it via it's social links.
    Life's too short to front wheel drive
    DD1, Fanatec Universal Hub, SQ V1.5 Shifter, CS Handbrake V1.5 , V3 pedals, MSI 3070 Suprim, 3900X, 55" UHD LG/Vive, Denon AVC-X3700H

    /// MaximusDoriftus(Steam)
    The following user likes this Post: John Hargreaves


  7. #7
    WMD Member John Hargreaves's Avatar
    Join Date
    Oct 2011
    Location
    Yorkshire
    Posts
    2,983
    Platform
    PC
    Oh boy, so it was an evil bot?
    i7-7700K/MSI RTX 3080/Win10 64bit/64Gb RAM/Asus Xonar DX+Beyer Dynamic DT990 Pro headphones/LG 34" UM65 @2560x1080/HP Reverb G2/Logitech G29+G25 shifter/DSD P2 button box

    WMD1 + WMD2 Member

Similar Threads

  1. pCARS Profiler (Telemetry & Analysis) [PC ONLY] [v1.6]
    By R74NN in forum Third-Party Apps & API Discussion
    Replies: 312
    Last Post: 16-01-2021, 20:51
  2. Looking for input for analysis of cpu limiting
    By kidcurry in forum PC - Technical Help & Support
    Replies: 0
    Last Post: 11-06-2016, 20:21
  3. VRHIVE app streaming data to laptop questons.
    By kevin kirk in forum General Discussion
    Replies: 4
    Last Post: 14-05-2016, 15:23
  4. Telemetry Analysis: How to..
    By jimmyb_84 in forum The Garage - Car Setup Talk
    Replies: 64
    Last Post: 16-09-2015, 07:45
  5. Motec analysis from garage (MUST HAVE)
    By AB_Attack in forum Feature Suggestions
    Replies: 3
    Last Post: 08-06-2015, 17:09

Posting Permissions

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