Class BaseService

java.lang.Object
frc.lib.service.BaseService
Direct Known Subclasses:
ControlService, Vision

public abstract class BaseService extends Object
The base class for all background data providers.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final String
    The name of the service.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a BaseService with the default name.
    Constructs a BaseService with a custom name.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of the service, which is by default the class name.
    abstract void
    Logic to be executed in parallel.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      protected final String name
      The name of the service.
  • Constructor Details

    • BaseService

      public BaseService()
      Constructs a BaseService with the default name.
    • BaseService

      public BaseService(String name)
      Constructs a BaseService with a custom name. This can be useful for distinguishing multiple instances of the same service type in logs.
      Parameters:
      name - The name of the service.
  • Method Details

    • update

      public abstract void update()
      Logic to be executed in parallel. Marked 'abstract' so every child MUST implement it.
    • getName

      public String getName()
      Returns the name of the service, which is by default the class name. This can be overridden for more descriptive names.
      Returns:
      The name of the service.