PDA

View Full Version : Merging SIOC routines - SIOC Generator



Barrykensett
12-08-2016, 05:56 PM
I have moved from AST and most of my sim is working fine, I have a few small details now to fix.
I already have many sheets of SIOC routines, most of which continue to work. I don't want to start again if I can help it, I just want to patch up the things that don't work. In general the standard FS offsets work, it is the custom ones that don't, however it does not appear as simple as swapping the AST ones for Jeehell.
I thought I would try the SIOC generator to give me the text to add/substitute to my existing.
I already had success with my MCDU keys, the generator gave me a line of code to append to the existing script, just needed to change variable number. The process generated a new FMGSServer.iocp.ini. I edited the SIOC.ini to point to airbus.ssi instead of jeehellware.ssi.
This all worked.
I then tried to do a little more with the generator. I added my existing text in the box at the starter page (having pointed to the SIOC of course)
I tried a test with a few lights and signs; the result was a number of new lines added above my existing script and a lot more lines added to FMGSServer.iocp.ini. It created a jeehellware.ssi and altered my SIOC.ini to point to it. I compiled and ran the scripts and the new entries worked - I could turn lights, belts etc on and off. However nothing else worked.
I then tried merging the scripts (taking care with variables), saved and compiled the airbus.ssi and altered SIOC.ini but now nothing worked.

A small section of my old text which works the "No Smoking" switch
(I know the lines are deactivated but that is only because I patched in the line generated by SIOC Generator. It shows what I used to use hoiwever)

// Var 0001, name Switch_overhea, Link FSUIPC_INOUT, Offset $4602, Length 1 // Smoke
// Var 0002, Link IOCARD_SW, Input 78
// {
// IF V0002 = 1
// {
// &Switch_overhea = 78
// }
// ELSE
// {
// &Switch_overhea = 77
// }
// }

The 4602 offset is an AST custom one which I need to replace.

The SIOC generator just gave me one line:

Var 9, name NoSmokingUP, Link IOCARD_SW, Input 78

I have a really complex bit of script which handles the refuelling panel which now does not work.

Can anyone give me some general pointers?

Barry
www.a320sim.com (http://www.a320sim.com)

iwik
12-08-2016, 06:59 PM
Barry,
I am not sure what this "SIOC Generator" is you are talking about.
When i want to add new routine to my existing .ssi files.
I use the the tab "Group" in sioc after pressing "Edit script".
Here you place the txt files you want to merge. Then hit the run option
under "Group".
This does the job nicely and you dont have to worry about duplicate variables.
I have just done this with my GA cockpit.

Regards
Les

Barrykensett
12-08-2016, 07:31 PM
I have no difficulty in amending the SIOC .ssi files, I just add the lines that I want into the .txt file and recompile, I don't know what "group" is. My problem is to know what lines I need to put in. The SIOC generator is a program within Jeehell and if one was starting from scratch I think it will quickly automate the generation of the script. SIOC is very complex for those not familiar with the world of programming and it looks to me that JL has given us a great tool. However I have eight years of development of my script and I really don't want to do it all again, I just need a few tweaks.
Ideally I think I would like to know what lines of text to put in similar to the example above, it doesn't have to be processed through the FMGSServer.iocp.ini which I think is ideal for generation of a new setup but I am not sure how to amend what I have got where 90% of it works fine.
Barry
www.a320sim.com

iwik
12-09-2016, 12:57 AM
Barry,
I have seen what JL has done and you are right, he has made creating a new ssi file easily. However when someone encounters something he did not cater for then this is where a lack of understanding can cause problems.

Do you have scripts that work and would like to add to your main .ssi file?.
If so i could walk you thru using SIOC to do this. It is very easy.

Regards
Les

Barrykensett
12-09-2016, 05:55 AM
Les thank you for your replies. I am not communicating well here, I can merge routines in SIOC scripts, that is easy. I just alter the .txt file and from that generate the new .ssi file. My problem is to merge data generated by the SIOC generator and my existing scripts.
Referring back to the original post above (which is just one example) for the no smoking sign, in AST that routine brings up the "No Smoking" in the centre instrument panel and as such is internal processing in AST. The offset $4602 is from the AST list of custom offsets.
In Jeehell, looking at the offset table, I find $78EE but with values of 36,37 & 38 for on, off and auto. Being very old I don't know what to do with those, I wish I could just swap 78EE for 4602 but I know that is not right.
I then thought I would try the SIOC generator in Jeehell and this gave the one line "Var 9, name NoSmokingUP, Link IOCARD_SW, Input 78" but that is not all the story as it seems to put information into FMGSServer.iocp.ini, it also generates a new .ssi file and alters SIOC.ini to point to it. If I then test it, the signs work.
However if I leave the information in the FMGSServer.iocp.ini and add the one line to my existing script and recompile it does not work.
This is where I got stuck.
Barry
www.a320sim.com

jeehell
12-09-2016, 10:02 AM
Barry

you should use SIOC Creator for most hardware in all cases. It is quite more powerful than making your own script through FSUIPC interface.
If you have some scripts, which you must keep because they do other things than what is possible with SIOC Creator, there is a dedicated tool for that inside SIOC Creator, in the "General" tab. You just need to keep you scripts in txt files, and select them through the "add own sioc code" button.
The only limitation is with the variables numbering. It must start AFTER the last variable number in the main jeehellware.ssi. SO safe would be to use variable numbers above 1000.

iwik
12-09-2016, 02:44 PM
Hi Barry,
Yes i am old too 68 and grey matter not working so well.
Barry you made reference to getting some lights and switches working , were these
ones that used the custom offsets.
Sorry i cannot be of much help re sioc codeing, i really suck at it.
Les

Barrykensett
12-09-2016, 03:17 PM
JL - Thank you for your helpful comments, I was trying to patch up the few items that do not work but I must try harder! I will spend more time with SIOC creator.
I think the biggest challenge may be the refuelling panel which I had working. Has anyone programmed one of those on Jeehell I wonder? I can preselect fuel required and then watch it load.
http://www.mycockpit.org/forums/attachment.php?attachmentid=11939&stc=1

Les - thank you for your comments, I am much older than you so please be patient with me.
Barry

jeehell
12-10-2016, 07:42 AM
Hi Barry

You may be in bad luck with the refuel panel. For some time now, I simulate the APU fuel burn, and the way it works probably means any external change on fuel quantity may not work.

Have you tried the "add own SIOC code" feature already?
If so what results?

Barrykensett
12-10-2016, 10:57 AM
JL
Yes I have tried the add code feature and it works. I have to now sort out the things that are not covered and change the variable numbers before a merge proper. Quite a task and I have to get it right! I can probably do it in sections.
The refuel panel I think works on custom offsets but I don't see them in the AST SDK. I think I got them from the forum. It works as follows: Switching the power displays current fuel quantity in both windows. Using the incease/decrease switch the preselected fuel load can be adjusted in the preselect window. Selecting control then slowly increments/decrements the quantity and a "Refueling" tag appears in the EWD. It will not work with the engines running and cannot be used to cheat in flight! If you want to know more I can video the action (I think AST is still on the PC) and I can send you the SIOC code which is about 2.5 A4 sheets. I don't think AST have any rights on it; it came from a user.
Barry

Barrykensett
12-13-2016, 12:23 PM
When I have incorporated all of my SIOC routines into either the SIOC generator or the add text feature do I have to start sioc.exe manually or does hardware connect do it automatically?
Barry