Class RelayHelper
Provides helper methods for relaying operations, data, or commands between components.
public class RelayHelper
- Inheritance
-
RelayHelper
- Inherited Members
- Extension Methods
Methods
GetRelayStatus(Relay)
Retrieves the current status of the specified relay. Currently always returns false, indicating the relay status is not available or is treated as inactive.
public static bool GetRelayStatus(Relay relay)
Parameters
relayRelayThe relay whose status is being queried.
Returns
- bool
trueif the relay is active; otherwise,false.
GetRelayStatusFromApiRest(Relay)
public static bool GetRelayStatusFromApiRest(Relay relay)
Parameters
relayRelay
Returns
PowerOffRelay(Relay)
Sends a power off command to the specified relay by building a request to the local relay control endpoint using the relay's number as the path identifier, then forwarding the call to the underlying relay handler.
public static void PowerOffRelay(Relay relay)
Parameters
relayRelayThe relay to power off, identified by its RelayNumber which is used to construct the request path.
PowerOnRelay(Relay)
Powers on the specified relay by constructing a request to the local relay control endpoint at https://localhost:7186, where the relay is identified by its RelayNumber in the path.
public static void PowerOnRelay(Relay relay)
Parameters
relayRelayThe relay to power on.