It is almost a given that your solenoid is 12V or 24V DC.
Detroit, Cat, Cummins, and many other engine manufacturers, would have their engine protection systems independent of any generated AC power.
They first protect their engine, and then if part of the package, the generator.
The generator has its own protection for overload and heat ect....
And BTW, Detroits, have the solenoid energized when the engine is running, so when you have low oil pressure, or low coolant, or whatever,,
all that happens is the solenoid is deenergized, and being spring loaded, the fuel valve/bypass, is shut off.
Newer engines do this differently, each unit injector , which have there own solenoids, shut down.
In any case,
GOOD LUCK.