OK, so how will we connect the switches? Use a SimpleGPCSoftware class to get the switch data and then have the IDPs call that software? If so, should I use the existing IO_Control class, or create a new one? (with what name?)
Well, lets say it that way:
I want to replace the current model by something that behaves like the original. So, as highest level there will be partitions with computers being a mere resource running the same software in sync.
Instead of directly connecting software to switches, there will be a virtual IOP that acts like all IOPs of the GPCs running in the same partition. Instead of directly polling switch positions, there will be direct memory access I/O, which writes the data from MDMs directly into a virtual GPC memory of the united partition.
So, the switches should connect to a DIL (discrete input, low voltage) module in an MDM and the MDM should be connected to a data bus. The virtual IOP communicates over the bus with the MDM and gets the data of the switch positions as 16 bit word and writes it into memory. Then it wakes up the process that expected the I/O data and lets it process the switch position stored as 16-bit word in simulated GPC memory.
I would say, from what I know of the old analog cockpit, the GPC software that handles the switch position would likely also be the same software that generates the attitude data for the ADI. Something like a DDD_SOP task.
Now, as you can expect, this will all take too long to refactor into SSU before release.
I am not sure yet, what would be the best compromise between now and then for a fast implementation - maybe we should define some "coarse" interface for the software by communicating exclusively with partition memory and have a second software class for the current GPC implementation, prefixed something like "IO_", that gets the switch data the direct way as you suggest and how it was done before, but just writes the data into or from partition memory. Later, we just replace the "IO_" software by proper IO programs in the new model and need only minimal tweaks to get the bigger software tasks run as partition software instead of SimpleGPC.