public abstract class SendableBase extends Object implements Sendable, AutoCloseable
Constructor and Description |
---|
SendableBase()
Creates an instance of the sensor base.
|
SendableBase(boolean addLiveWindow)
Creates an instance of the sensor base.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addChild(Object child)
Add a child component.
|
void |
close() |
void |
free()
Deprecated.
|
String |
getName()
Gets the name of this
Sendable object. |
String |
getSubsystem()
Gets the subsystem name of this
Sendable object. |
void |
setName(String name)
Sets the name of this
Sendable object. |
protected void |
setName(String moduleType,
int channel)
Sets the name of the sensor with a channel number.
|
protected void |
setName(String moduleType,
int moduleNumber,
int channel)
Sets the name of the sensor with a module and channel number.
|
void |
setSubsystem(String subsystem)
Sets the subsystem name of this
Sendable object. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initSendable, setName
public SendableBase()
public SendableBase(boolean addLiveWindow)
addLiveWindow
- if true, add this Sendable to LiveWindow@Deprecated public void free()
public void close()
close
in interface AutoCloseable
public final String getName()
Sendable
Sendable
object.public final void setName(String name)
Sendable
Sendable
object.protected final void setName(String moduleType, int channel)
moduleType
- A string that defines the module name in the label for the valuechannel
- The channel number the device is plugged intoprotected final void setName(String moduleType, int moduleNumber, int channel)
moduleType
- A string that defines the module name in the label for the valuemoduleNumber
- The number of the particular module typechannel
- The channel number the device is plugged into (usually PWM)public final String getSubsystem()
Sendable
Sendable
object.getSubsystem
in interface Sendable
public final void setSubsystem(String subsystem)
Sendable
Sendable
object.setSubsystem
in interface Sendable
subsystem
- subsystem nameprotected final void addChild(Object child)
child
- child component