Results 1 to 8 of 8
Thread: Talking to IOCP from C#
-
11-17-2013, 06:23 PM #1
- Join Date
- Mar 2009
- Location
- Usa
- Posts
- 390
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.
-
11-21-2013, 09:29 PM #2
- Join Date
- Jan 2013
- Location
- EVCA
- Posts
- 62
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
-
11-22-2013, 05:29 AM #3
- Join Date
- Mar 2009
- Location
- Usa
- Posts
- 390
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.
-
12-05-2013, 07:09 PM #4
- Join Date
- Oct 2013
- Location
- Indonesia
- Posts
- 10
Re: Talking to IOCP from C#
Hi Pshz11,
the link is down, do you have alternative link?
thanks...
-
12-05-2013, 07:16 PM #5
- Join Date
- Jan 2013
- Location
- EVCA
- Posts
- 62
Re: Talking to IOCP from C#
Building 737NG cockpit and developing Arduino router software. My blog: http://737ng.info
-
12-05-2013, 07:30 PM #6
- Join Date
- Oct 2013
- Location
- Indonesia
- Posts
- 10
Re: Talking to IOCP from C#
I'm looking forward...
thx
-
01-01-2014, 07:00 PM #7
Re: Talking to IOCP from C#
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)
-
01-10-2014, 10:53 PM #8
- Join Date
- Jan 2013
- Location
- EVCA
- Posts
- 62
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