35 std::function<std::unique_ptr<SendableBuilder>()> factory);
65 int moduleNumber,
int channel);
106 int moduleNumber,
int channel);
197 int moduleNumber,
int channel);
241 std::shared_ptr<void>
data);
290 std::unique_ptr<SendableBuilder> builder);
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable from
Definition: ThirdPartyNotices.txt:131
Definition: SendableBuilder.h:18
Interface for Sendable objects.
Definition: Sendable.h:16
The SendableRegistry class is the public interface for registering sensors and actuators for use on d...
Definition: SendableRegistry.h:23
static std::string GetName(const Sendable *sendable)
Gets the name of an object.
static Sendable * GetSendable(UID uid)
Get sendable object for a given unique id.
size_t UID
Definition: SendableRegistry.h:27
static std::shared_ptr< void > GetData(Sendable *sendable, int handle)
Gets arbitrary data associated with an object in the registry.
SendableRegistry()=delete
static void EnableLiveWindow(Sendable *sendable)
Enables LiveWindow for an object.
static void SetName(Sendable *sendable, std::string_view name)
Sets the name of an object.
static std::string GetSubsystem(const Sendable *sendable)
Gets the subsystem name of an object.
static void SetSubsystem(Sendable *sendable, std::string_view subsystem)
Sets the subsystem name of an object.
static void Add(Sendable *sendable, std::string_view moduleType, int channel)
Adds an object to the registry.
static UID GetUniqueId(Sendable *sendable)
Get unique id for an object.
static void Add(Sendable *sendable, std::string_view subsystem, std::string_view name)
Adds an object to the registry.
static void SetName(Sendable *sendable, std::string_view subsystem, std::string_view name)
Sets both the subsystem name and device name of an object.
static std::shared_ptr< void > SetData(Sendable *sendable, int handle, std::shared_ptr< void > data)
Associates arbitrary data with an object in the registry.
static void SetName(Sendable *sendable, std::string_view moduleType, int moduleNumber, int channel)
Sets the name of an object with a module and channel number.
static void Publish(UID sendableUid, std::unique_ptr< SendableBuilder > builder)
Publishes an object in the registry.
static void Update(UID sendableUid)
Updates published information from an object.
static void Move(Sendable *to, Sendable *from)
Moves an object in the registry (for use in move constructors/assignments).
static void AddLW(Sendable *sendable, std::string_view name)
Adds an object to the registry and LiveWindow.
static void Add(Sendable *sendable, std::string_view name)
Adds an object to the registry.
static void AddLW(Sendable *sendable, std::string_view subsystem, std::string_view name)
Adds an object to the registry and LiveWindow.
static int GetDataHandle()
Gets a unique handle for setting/getting data with SetData() and GetData().
static void AddChild(Sendable *parent, void *child)
Adds a child object to an object.
static void SetName(Sendable *sendable, std::string_view moduleType, int channel)
Sets the name of an object with a channel number.
static void AddLW(Sendable *sendable, std::string_view moduleType, int channel)
Adds an object to the registry and LiveWindow.
static void AddChild(Sendable *parent, Sendable *child)
Adds a child object to an object.
static void ForeachLiveWindow(int dataHandle, wpi::function_ref< void(CallbackData &cbdata)> callback)
Iterates over LiveWindow-enabled objects in the registry.
static bool Remove(Sendable *sendable)
Removes an object from the registry.
static bool Contains(const Sendable *sendable)
Determines if an object is in the registry.
static void AddLW(Sendable *sendable, std::string_view moduleType, int moduleNumber, int channel)
Adds an object to the registry and LiveWindow.
static void Add(Sendable *sendable, std::string_view moduleType, int moduleNumber, int channel)
Adds an object to the registry.
static void DisableLiveWindow(Sendable *sendable)
Disables LiveWindow for an object.
static void SetLiveWindowBuilderFactory(std::function< std::unique_ptr< SendableBuilder >()> factory)
Sets the factory for LiveWindow builders.
An efficient, type-erasing, non-owning reference to a callable.
Definition: function_ref.h:31
basic_string_view< char > string_view
Definition: core.h:520
/file This file defines the SmallVector class.
Definition: AprilTagFieldLayout.h:18
Definition: format.h:1544
Data passed to ForeachLiveWindow() callback function.
Definition: SendableRegistry.h:302
CallbackData(Sendable *sendable_, std::string_view name_, std::string_view subsystem_, wpi::Sendable *parent_, std::shared_ptr< void > &data_, SendableBuilder &builder_)
Definition: SendableRegistry.h:303
std::string_view name
Definition: SendableRegistry.h:314
SendableBuilder & builder
Definition: SendableRegistry.h:318
Sendable * parent
Definition: SendableRegistry.h:316
std::shared_ptr< void > & data
Definition: SendableRegistry.h:317
Sendable * sendable
Definition: SendableRegistry.h:313
std::string_view subsystem
Definition: SendableRegistry.h:315