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 voidaddChild(Object child)Add a child component.voidclose()voidfree()Deprecated.StringgetName()Gets the name of thisSendableobject.StringgetSubsystem()Gets the subsystem name of thisSendableobject.voidinitSendable(SendableBuilder builder)Initializes thisSendableobject.voidsetName(String name)Sets the name of thisSendableobject.voidsetName(String moduleType, int channel)Sets the name of the sensor with a channel number.voidsetName(String moduleType, int moduleNumber, int channel)Sets the name of the sensor with a module and channel number.voidsetSubsystem(String subsystem)Sets the subsystem name of thisSendableobject.
-
-
-
Method Detail
-
free
@Deprecated public void free()
Deprecated.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
getName
public String getName()
Description copied from interface:SendableGets the name of thisSendableobject.
-
setName
public void setName(String name)
Description copied from interface:SendableSets the name of thisSendableobject.
-
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:SendableGets the subsystem name of thisSendableobject.- Specified by:
getSubsystemin interfaceSendable- Returns:
- Subsystem name
-
setSubsystem
public void setSubsystem(String subsystem)
Description copied from interface:SendableSets the subsystem name of thisSendableobject.- Specified by:
setSubsystemin interfaceSendable- Parameters:
subsystem- subsystem name
-
initSendable
public void initSendable(SendableBuilder builder)
Description copied from interface:SendableInitializes thisSendableobject.- Specified by:
initSendablein interfaceSendable- Parameters:
builder- sendable builder
-
addChild
public void addChild(Object child)
Add a child component.- Parameters:
child- child component
-
-