Example plugin (telemetry) !HELP ME!

Discussion in 'Plugins' started by formula1996, Sep 22, 2013.

  1. formula1996

    formula1996 Registered

    Joined:
    Nov 2, 2012
    Messages:
    42
    Likes Received:
    1
    I would like to ask for a little help. I have the exapmle plugin that write the speed, gear, and RPM data into a .txt file. I've created a c# program that read data from the .txt and show the live data as a telemetry program. But how can i do, to the plugin send the data directly to my c# program without write and read .txt file.
     
  2. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    You could get your c# program opening a port and listening for a connection from the plugin, in order to talk directly. The c++ code required for that in the plugin is quite straightforward (google is your friend), I've never used c# but I'm guessing it'll be a little easier than c++ for server-side socket connections.
     
  3. formula1996

    formula1996 Registered

    Joined:
    Nov 2, 2012
    Messages:
    42
    Likes Received:
    1
    Thank you :) I am not good at programming so which one should i use TCP or UDP socket?
     
  4. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    TCP.
     
  5. formula1996

    formula1996 Registered

    Joined:
    Nov 2, 2012
    Messages:
    42
    Likes Received:
    1
    I have done the c# listener but i don't know how to do the c++ (plugin) side to send the dll data. I haven't find anything about this on google. Do you know any tutorial for this or any example/source code?
     
  6. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    If you google "C++ socket programming" for example, you'll find some code samples. Obviously you only need worry about the client side.
     
  7. formula1996

    formula1996 Registered

    Joined:
    Nov 2, 2012
    Messages:
    42
    Likes Received:
    1
    I find some help. But i just can send char variable. How can i convert float and others to const char*? Or what should i do?
     
    Last edited by a moderator: Oct 4, 2013

Share This Page