Class WsRelayConfig
- java.lang.Object
-
- org.wildstang.hardware.roborio.outputs.config.WsRelayConfig
-
- All Implemented Interfaces:
OutputConfig
public class WsRelayConfig extends java.lang.Object implements OutputConfig
Contains configurations for relays.
-
-
Constructor Summary
Constructors Constructor Description WsRelayConfig(int channel, WsRelayState p_default)Construct the relay config.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetChannel()Returns the hardware port number.WsRelayStategetDefault()Returns the default relay state.java.lang.StringtoString()Builds a JSON String describing the relay config.
-
-
-
Constructor Detail
-
WsRelayConfig
public WsRelayConfig(int channel, WsRelayState p_default)Construct the relay config.- Parameters:
channel- Hardware port number.p_default- Default relay state.
-
-
Method Detail
-
getChannel
public int getChannel()
Returns the hardware port number.- Returns:
- The hardware port number.
-
getDefault
public WsRelayState getDefault()
Returns the default relay state.- Returns:
- The default state.
-
toString
public java.lang.String toString()
Builds a JSON String describing the relay config.- Overrides:
toStringin classjava.lang.Object- Returns:
- Channel number.
-
-