The ASCOM telescope Park method does this and SGP supports it. In SGP set the dome control options to park the telescope before closing the roof and open the roof before unparking.
It's really up to you to handle the frequency of checks of the hardware in your dome controller. The application should be able to call functions as fast as it likes. You may need to set up some sort of throttling in your driver so that hardware is interrogated at a frequency of your choosing. If the application calls more frequently it gets the last value until you choose to check the hardware again.
Chris R