Class LightningFaultCodes.Code
- java.lang.Object
-
- com.lightningrobotics.common.fault.LightningFaultCodes.Code
-
- Enclosing class:
- LightningFaultCodes
public static class LightningFaultCodes.Code extends java.lang.Object
A base class that represents a single fault code
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Name of the fault codeboolean
getState()
The current state of the fault codevoid
setName(java.lang.String name)
Sets the name of a fault codevoid
setState(boolean state)
Sets the state of the fault code
-
-
-
Constructor Detail
-
Code
public Code(java.lang.String name, boolean state)
Create fault code- Parameters:
name
- the name of the fault codestate
- the initial state of the fault code (defaults to false)
-
Code
public Code(java.lang.String name)
Create fault code- Parameters:
name
- the name of the fault code
-
-
Method Detail
-
getName
public java.lang.String getName()
Name of the fault code- Returns:
- the name as a string
-
setName
public void setName(java.lang.String name)
Sets the name of a fault code- Parameters:
name
- the new name for the code
-
getState
public boolean getState()
The current state of the fault code- Returns:
- the boolean state of the fault code
-
setState
public void setState(boolean state)
Sets the state of the fault code- Parameters:
state
- the new boolean state of the fault code
-
-