Class VisualFactoryRegistry
Global registry that maps ROS topics and message types to their highest-priority IVisualFactory per IConnector.
Inherited Members
Namespace: Unity.SimulationPro.Foundation.Visualizations
Assembly: Unity.SimulationPro.Foundation.Visualizations.dll
Syntax
public static class VisualFactoryRegistry
Methods
GetAllVisualFactories(IConnector, string, MessageTypeId)
Returns all registered IVisualFactory instances for the given connector, topic, and message type ID.
Declaration
public static IEnumerable<IVisualFactory> GetAllVisualFactories(IConnector connector, string topic, MessageTypeId messageTypeId)
Parameters
| Type | Name | Description |
|---|---|---|
| IConnector | connector | The connector to look up factories for. |
| string | topic | The ROS topic name. |
| MessageTypeId | messageTypeId | The message type ID. |
Returns
| Type | Description |
|---|---|
| IEnumerable<IVisualFactory> | An enumerable of all matching factories, or |
GetVisualFactory(IConnector, string, MessageTypeId)
Returns the highest-priority IVisualFactory for the given connector, topic, and message type ID, or null if none is registered.
Declaration
public static IVisualFactory GetVisualFactory(IConnector connector, string topic, MessageTypeId messageTypeId)
Parameters
| Type | Name | Description |
|---|---|---|
| IConnector | connector | The connector to look up factories for. |
| string | topic | The ROS topic name. |
| MessageTypeId | messageTypeId | The message type ID. |
Returns
| Type | Description |
|---|---|
| IVisualFactory | The best-matching IVisualFactory, or |
RegisterTopicVisualizer(IConnector, string, IVisualFactory, int, MessageDisambiguator)
Registers a factory as the topic-specific visualizer for the given topic on the given connector.
Declaration
public static void RegisterTopicVisualizer(IConnector connector, string topic, IVisualFactory visualFactory, int priority = 0, MessageDisambiguator disambiguator = MessageDisambiguator.Default)
Parameters
| Type | Name | Description |
|---|---|---|
| IConnector | connector | The connector the factory is associated with. |
| string | topic | The ROS topic name. |
| IVisualFactory | visualFactory | The factory to register. |
| int | priority | Priority used when multiple factories target the same topic; higher wins. |
| MessageDisambiguator | disambiguator | Disambiguator used to distinguish request from response topics. |
RegisterTypeVisualizer(IConnector, MessageTypeId, IVisualFactory, int)
Registers a factory as the type-wide visualizer for the given message type ID on the given connector.
Declaration
public static void RegisterTypeVisualizer(IConnector connector, MessageTypeId messageTypeId, IVisualFactory visualFactory, int priority = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| IConnector | connector | The connector the factory is associated with. |
| MessageTypeId | messageTypeId | The message type ID to associate with this factory. |
| IVisualFactory | visualFactory | The factory to register. |
| int | priority | Priority used when multiple factories are registered for the same type; higher wins. |
RegisterTypeVisualizer<MsgType>(IConnector, IVisualFactory, int)
Registers a factory as the type-wide visualizer for message type MsgType on the given connector.
Declaration
public static void RegisterTypeVisualizer<MsgType>(IConnector connector, IVisualFactory visualFactory, int priority = 0) where MsgType : IMessage
Parameters
| Type | Name | Description |
|---|---|---|
| IConnector | connector | The connector the factory is associated with. |
| IVisualFactory | visualFactory | The factory to register. |
| int | priority | Priority used when multiple factories are registered for the same type; higher wins. |
Type Parameters
| Name | Description |
|---|---|
| MsgType | The ROS message type to associate with this factory. |