You can use an invoke operation to a) determine if the alarm is active and b) set the time. Here we use an invoke method to set the time and get the AlarmActive value. This is done by using the DOFObject.Invoke method to invoke the SetNewTime method on the provider.
In an invoke operation, a requestor calls an interface method, and the provider executes it and returns results if the method has return values. An invoke operation can be initiated by the requestor as a synchronous operation using the DOFObject.invoke method or as an asynchronous operation using DOFObject.beginInvoke. A method can have multiple inputs, and the response can contain multiple outputs.
There are several versions of the DOFObject.invoke() method; however, DOFObject.invoke(DOFInterface.Method method, int timeout, DOFValue... inputValues) is the simplest.
The timeout parameter specifies how long to wait for a response before the operation fails. If you don't want it to time out, use DOF.TIMEOUT_NEVER.