Package edu.wpi.first.wpilibj
Class SendableImpl
- java.lang.Object
-
- edu.wpi.first.wpilibj.SendableImpl
-
- All Implemented Interfaces:
Sendable
,AutoCloseable
public class SendableImpl extends Object implements Sendable, AutoCloseable
The base interface for objects that can be sent over the network through network tables.
-
-
Constructor Summary
Constructors Constructor Description SendableImpl()
Creates an instance of the sensor base.SendableImpl(boolean addLiveWindow)
Creates an instance of the sensor base.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addChild(Object child)
Add a child component.void
close()
void
free()
Deprecated.String
getName()
Gets the name of thisSendable
object.String
getSubsystem()
Gets the subsystem name of thisSendable
object.void
initSendable(SendableBuilder builder)
Initializes thisSendable
object.void
setName(String name)
Sets the name of thisSendable
object.void
setName(String moduleType, int channel)
Sets the name of the sensor with a channel number.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 thisSendable
object.
-
-
-
Method Detail
-
free
@Deprecated public void free()
Deprecated.
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
getName
public String getName()
Description copied from interface:Sendable
Gets the name of thisSendable
object.
-
setName
public void setName(String name)
Description copied from interface:Sendable
Sets the name of thisSendable
object.
-
setName
public void setName(String moduleType, int channel)
Sets the name of the sensor with a channel number.- Parameters:
moduleType
- A string that defines the module name in the label for the valuechannel
- The channel number the device is plugged into
-
setName
public void setName(String moduleType, int moduleNumber, int channel)
Sets the name of the sensor with a module and channel number.- Parameters:
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)
-
getSubsystem
public String getSubsystem()
Description copied from interface:Sendable
Gets the subsystem name of thisSendable
object.- Specified by:
getSubsystem
in interfaceSendable
- Returns:
- Subsystem name
-
setSubsystem
public void setSubsystem(String subsystem)
Description copied from interface:Sendable
Sets the subsystem name of thisSendable
object.- Specified by:
setSubsystem
in interfaceSendable
- Parameters:
subsystem
- subsystem name
-
initSendable
public void initSendable(SendableBuilder builder)
Description copied from interface:Sendable
Initializes thisSendable
object.- Specified by:
initSendable
in interfaceSendable
- Parameters:
builder
- sendable builder
-
addChild
public void addChild(Object child)
Add a child component.- Parameters:
child
- child component
-
-