Results 1 to 8 of 8
  1. #1
    300+ Forum Addict



    Join Date
    Mar 2009
    Location
    Body in Netherlands, Hart in the Fairest Cape!
    Posts
    402
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Talking to IOCP from C#

    Hi Everyone,

    I started learning C# this year with the view on developing some software for my new sim project. Under the mottoe, if it isn;t there then I might as well try and make it myself! Unfortunately I am not a person who studies very well from books, . I like to read a bit then go out and try all kinds of things until I get stuck, then I go back to the books. Now I have been able to come a long way using MS Visual Studio, Paul Hent'y FSUIPCclient.dll and of course my dearly loved, registered copy of FSUIPC.

    Now I have reached the stage whene I need, or rather want, to connect to the IOCP server to read and write switch states. I'm not too lazy to read all the ins and outs of winsock programming it is just that I am just too darn frigidity and my childhood ADHD seems to be making sporadic re-entrances on my stage of life for me to sit down and start from scratch while I am still a novice at .NET programming. I have a small setup with a few switches, 5 leds and to rotary encoders that I use for testing stuff. Of course I am dying to try and talk to IOCP from within a WFP project.

    Does anyone have any sample code or other examples? The only documentation that I have found on the new is very limited and refers only to the init and ack strings uesd to pass variables to IOCP. Unfortunately Nico's IOCP client is not available any longer and neither can I find the script examples written by Johan Knol for his PMDGSiocConnector program.

    Thanks for taking the time to read this.

  2. #2
    25+ Posting Member



    Join Date
    Jan 2013
    Location
    EVCA
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Talking to IOCP from C#

    Hi,

    I have coded couple of classes implementing IOCP server functionality. I use them in my 737NG project to interface Arduino with ProSim:737. Check the link below:

    http://ylmbl.ru/wp-content/uploads/2.../NGConnect.rar

    Few lines to initialize class:

    IOCPServer iocps = new IOCPServer();
    iocps.ClientComandReceived += new IOCPComandDelegate(iocps_ClientComandReceived);
    iocps.Start();

    Hope it will help

  3. #3
    300+ Forum Addict



    Join Date
    Mar 2009
    Location
    Body in Netherlands, Hart in the Fairest Cape!
    Posts
    402
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Talking to IOCP from C#

    Hi there,

    Thank you very much for your reply and your examples. I am going to get stuck into this the coming weekend.

    Andrew.

  4. #4
    10+ Posting Member
    Join Date
    Oct 2013
    Location
    Indonesia
    Posts
    11
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Talking to IOCP from C#

    Hi Pshz11,

    the link is down, do you have alternative link?

    thanks...

  5. #5
    25+ Posting Member



    Join Date
    Jan 2013
    Location
    EVCA
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Talking to IOCP from C#

    Quote Originally Posted by prinwibowo View Post
    Hi Pshz11,

    the link is down, do you have alternative link?

    thanks...
    Forgot to pay for server ((( it will be back online soon
    Building 737NG cockpit and developing Arduino router software. My blog: http://737ng.info

  6. #6
    10+ Posting Member
    Join Date
    Oct 2013
    Location
    Indonesia
    Posts
    11
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Talking to IOCP from C#

    I'm looking forward...

    thx

  7. #7
    25+ Posting Member Roarkr's Avatar
    Join Date
    Feb 2011
    Location
    Asker Norway
    Posts
    71
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Talking to IOCP from C#

    Quote Originally Posted by pshz11 View Post
    Hi,

    I have coded couple of classes implementing IOCP server functionality. I use them in my 737NG project to interface Arduino with ProSim:737. Check the link below:

    http://ylmbl.ru/wp-content/uploads/2.../NGConnect.rar

    Few lines to initialize class:

    IOCPServer iocps = new IOCPServer();
    iocps.ClientComandReceived += new IOCPComandDelegate(iocps_ClientComandReceived);
    iocps.Start();

    Hope it will help

    Hi,

    I tried your NGConnect code, but got a compilation error using the

    iocps.ClientComandReceived += new IOCPComandDelegate(iocps_ClientComandReceived);

    when initializing the class

    This is the error code:
    The name 'iocps_ClientComandReceived' does not exist in the current context

    Any ideas what is wrong?

    /Roar

    Roar Kristensen rksoftware www.flightsim4fun.com
    Flightsimmer since 1982 (Sinclair Spectrum Sinclair QL, Amiga, PC --16Mhz >>4.4GHz)

  8. #8
    25+ Posting Member



    Join Date
    Jan 2013
    Location
    EVCA
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Talking to IOCP from C#

    Hi,

    You need to declare iocps_ClientComandReceived function (or any other name you wish). That's an event handler.
    Building 737NG cockpit and developing Arduino router software. My blog: http://737ng.info