• Welcome to Kart Racing Pro Official Forum. Please login or sign up.
 
May 23, 2019, 05:58:22 am

News:

Please read the FORUM RULES


Proxy plugin

Started by PiBoSo, May 28, 2011, 06:21:02 pm

Previous topic - Next topic

PiBoSo

May 28, 2011, 06:21:02 pm Last Edit: January 02, 2015, 11:32:06 pm by PiBoSo
Kart Racing Pro integrates a "proxy" plugin.

Opening KRPProxyObject

g_hMapFile = OpenFileMapping(FILE_MAP_READ,FALSE,"Local\\KRPProxyObject");
void *pBuf = MapViewOfFile(g_hMapFile,FILE_MAP_READ,0,0,sizeof(SProxyData_t));

external programs can read Kart Racing Pro output data.

The source code and data structure are available here: http://www.kartracing-pro.com/downloads/krp_proxy.c

PiBoSo


PiBoSo


Quadie

in the first post u show some code.

does this have to be put somewhere?

PiBoSo

Quote from: Quadie on September 08, 2013, 05:06:12 pm
in the first post u show some code.

does this have to be put somewhere?


No. It is only needed for developers.

PiBoSo


PiBoSo

January 02, 2015, 11:29:17 pm #6 Last Edit: January 02, 2015, 11:32:42 pm by PiBoSo
Source code updated to the latest interface.
Starting with Beta12, the proxy plugin is packed with the build.

PiBoSo

Source code updated to the latest interface.

PiBoSo


Source code updated to the latest interface.

PiBoSo


Source code updated to the latest interface.

ccesaretto

Hello.
I have been using Proxy plugin to interface to Kart Racing Pro from my C# application.
Everything works fine but, in the SPluginsKartSession_t structure, I had to add an extra property to make everything work fine (see code at the bottom)

is it possible that this file:

http://www.kartracing-pro.com/downloads/krp_proxy.c

is not completely up to date and the SPluginsKartSession_t structure actually need the property I have added?

Thanks


    internal struct SPluginsKartSession_t
    {
        public int m_iSession;
        public int m_iSessionSeries;
        public int m_iConditions;
        public float temp;//<============================  ADDED
        public float m_fAirTemperature;
        public float m_fTrackTemperature;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 100)]
        public char[] m_szSetupFileName;
    }


PiBoSo

Quote from: ccesaretto on August 05, 2017, 03:24:13 pm
Hello.
I have been using Proxy plugin to interface to Kart Racing Pro from my C# application.
Everything works fine but, in the SPluginsKartSession_t structure, I had to add an extra property to make everything work fine (see code at the bottom)

is it possible that this file:

http://www.kartracing-pro.com/downloads/krp_proxy.c

is not completely up to date and the SPluginsKartSession_t structure actually need the property I have added?

Thanks


    internal struct SPluginsKartSession_t
    {
        public int m_iSession;
        public int m_iSessionSeries;
        public int m_iConditions;
        public float temp;//<============================  ADDED
        public float m_fAirTemperature;
        public float m_fTrackTemperature;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 100)]
        public char[] m_szSetupFileName;
    }



There is no missing member in the structure.
Could it be an alignment problem? The proxy plugin uses the default value of 8 bytes.
Also, please check the int size, that should be 4 bytes.