class Projection(ABC):
How one ROS2 type is rendered, as the steps and the type they answer for.
Abstract: an author writes one of the classes in opensmi.ros2.server.recipes.
| Method | decode |
Return what one payload writes, keyed by the names shape created. |
| Method | inverse |
Run this entry backwards, refusing rather than inventing when it has no inverse. |
| Method | inverts |
Return whether this entry runs backwards for one ROS2 type. |
| Method | matches |
Return whether this entry answers for a ROS2 type. |
| Method | shape |
Return the nodes this type becomes, named relative to whatever contains them. |
| Instance Variable | override |
Whether this entry may shadow one already registered for its type. A duplicate is fatal without it, so the address space never depends on registration order. |
| Instance Variable | type |
The RIHS01 hash of the definition this entry was authored against, or None. It lets CI report that a type moved under a curated entry. It never selects an entry, since that would render different address spaces for different vendor builds. |
| Instance Variable | type |
The ROS2 type this entry answers for, or ANY_TYPE for the entry that answers for every one. Keying is by type name alone. |
| Property | inverse |
Return the function that runs this entry backwards, or None when it has none. |
Message, context: ProjectionContext) -> Mapping[ str, object]:
¶
Return what one payload writes, keyed by the names shape created.
type[ Message], values: Mapping[ str, object], context: ProjectionContext) -> Message:
¶
Run this entry backwards, refusing rather than inventing when it has no inverse.
| Raises | |
NotInvertibleError | When this entry has no inverse, which is a declaration fault wherever it is reached. |
Return whether this entry runs backwards for one ROS2 type.
It takes a type because an Object inverts only if its field plan is total, which depends on the message as well as the recipe. That lets the check run at init.
type[ Message], context: ProjectionContext) -> tuple[ PlanEntry, ...]:
¶
Return the nodes this type becomes, named relative to whatever contains them.
Whether this entry may shadow one already registered for its type. A duplicate is fatal without it, so the address space never depends on registration order.
The RIHS01 hash of the definition this entry was authored against, or None. It lets CI report that a type moved under a curated entry. It never selects an entry, since that would render different address spaces for different vendor builds.
The ROS2 type this entry answers for, or ANY_TYPE for the entry that
answers for every one. Keying is by type name alone.