Results 1 to 5 of 5
Thread: Using SIOC variables
-
12-08-2008, 07:15 PM #1
Using SIOC variables
Hi folks
I am somewhat uncertain how to read SIOC code. Especially Variable declaration and its use. Got some experience in programming, but SIOC is a bit strange, and I need to see if I got this right:
This is a declaration statement(?):
Var 302, Name RecallSwitch, Link IOCARD_SW, Input 2
If I want to use this variable in my programming, I can either:
Refer to it this way(?): V302
or
by its name(?): RecallSwitch
It is my understanding that these variables are global and they reside on the IOCP server(?)
Let's say I have SIOC Clients running on two different computer. Can both computer use RecallSwitch in their programming script(?)
I have also seen code examples where the Variable declarations are written after their first use, and this OK whenever(?)
The documentation says that the script associated with the variable is run after there's an event resulting in a change in value.
Making it possible for the script itself to contain code that would change the value yet again(?)
Thanx in advance
Morten
-
12-08-2008, 07:30 PM #2
yes, although one should write &RecallSwitch
Yes they are global but only within your SIOC script. The IOCP Server is a difficult to understand concept, forget about it for the time being.
Yes.
Yes (if you follow the compilation proces of config_sioc.exe you will notice that it is a three pass compilation, so 'define before use' is not needed)
Yes.
regards,
Nico
www.lekseecon.nl/howto.html
-
12-08-2008, 09:23 PM #3
Hi Nico,
Can I just say how much I appreciate your incredible input to our understanding of SIOC programming. I have studied your website and gained a lot of valuable information unobtainable from OC. Having written some instructional material myself in the past I understand the immense amount of time it takes, so you are to be commended for your efforts. OC should commission you to write their manuals
Regards,
Ken.
-
12-09-2008, 02:14 AM #4
Thanx Nico!
This really helps me! I'm a bit embarrassed that I didn't discover your homepage. That would have cleared things up to some extent. But I have bookmarked it now for future use.
I'm slowly getting a feel for the language
-
12-09-2008, 03:16 AM #5
Ken, Morton,
Thank you both for your kind words. I'm glad to be of help.
The SIOC concept is very powerful. In my opinion it is (one of) the (!) best tools world-wide for our application, home cockpit building.
However, the "problem" is that you can use SIOC in different ways, from
"easy": at a single PC (the Flightsim PC), with a single SIOC script and using FSUIPC offsets to communicate with FlightSimulator;
via
"easy but different": at a single PC (the Flightsim PC), with a single SIOC script and using IOCP Server to communicate with FlightSimulator variables (instead of FSUIPC offsets) ;
to
"very complex": several PCs, SIOC at each PC, multiple SIOC scripts at a PC, using IOCP protocol to communicate between SIOC apps, and IOCP Server to communicate with FlightSimulator, and so on..
I'm trying to help people, by showing them the easy way (first)...
Cheers!,
Nico
Similar Threads
-
FS2Phidgets / SIOC variables
By mcdufall in forum FS2Phidget UsersReplies: 2Last Post: 02-14-2011, 05:22 AM -
Variables ?
By spitfire9 in forum FS2Phidget UsersReplies: 7Last Post: 04-23-2010, 08:42 PM -
Variables
By BOINET jean luc in forum PM General Q & AReplies: 1Last Post: 01-29-2006, 06:43 AM -
variables ?
By BOINET jean luc in forum PM General Q & AReplies: 11Last Post: 01-24-2006, 04:00 PM
Girls in your town
A320 Sound Files Missing