|
Motion Master 6.0.0-alpha.50
Next-generation motion control software
|
The live collaborators a route plug-in needs, handed to it at registration time. More...
#include <web_api.h>
Public Attributes | |
| mm::node::DeviceManager & | deviceManager |
| Device list + SDO/PDO/state/bus access. | |
| mm::node::MonitoringManager & | monitoringManager |
| Monitoring registry (for monitoring-aware plug-ins). | |
| std::string_view | corsOrigin |
Value to send in Access-Control-Allow-Origin; outlives run(). | |
The live collaborators a route plug-in needs, handed to it at registration time.
A plug-in's RegisterRoutesFn receives this by const reference. The referenced objects (DeviceManager / MonitoringManager) and the storage backing corsOrigin all outlive the running server, so a handler may safely capture the individual fields it needs — but it must **never capture the RouteContext itself**, which is a temporary that dies once registration returns. Capture the fields instead:
| std::string_view mm::api::RouteContext::corsOrigin |
Value to send in Access-Control-Allow-Origin; outlives run().
| mm::node::DeviceManager& mm::api::RouteContext::deviceManager |
Device list + SDO/PDO/state/bus access.
| mm::node::MonitoringManager& mm::api::RouteContext::monitoringManager |
Monitoring registry (for monitoring-aware plug-ins).