Is your feature request related to a problem? Please describe.
According to the VDA-5050 specification, AGVs can request base extensions through the newBaseRequest field in state topics. Currently, the vda-5050-lib.js only detects these requests through the onEdgeTraversing callback. This creates a potential issue where if an AGV continuously sends newBaseRequest: true until receiving a successful order extension, we might miss some of these requests since they're only captured when field values change during edge traversal events.
Describe the solution you'd like
Add a new onStateUpdate callback that provides real-time state updates for active orders. This would allow applications to monitor the newBaseRequest field and other state changes continuously, rather than only during edge traversal events.
Describe alternatives you've considered
- Modifying the existing onEdgeTraversing callback to include additional state checks
- Creating a separate dedicated callback just for newBaseRequest changes
Additional context
The proposed solution adds a more general-purpose state monitoring capability through the new callback. While state topics can be directly subscribed to get state information, this callback provides additional benefits:
- Access to both state and active order context (context.order) in a single callback
- Enables real-time monitoring of state changes while maintaining reference to the current order
- Allows implementation of various business logic that requires both state and order information
This approach not only solves the immediate newBaseRequest monitoring need but also creates a more robust framework for implementing order-aware state monitoring features.
Is your feature request related to a problem? Please describe.
According to the VDA-5050 specification, AGVs can request base extensions through the
newBaseRequestfield in state topics. Currently, the vda-5050-lib.js only detects these requests through theonEdgeTraversingcallback. This creates a potential issue where if an AGV continuously sendsnewBaseRequest: trueuntil receiving a successful order extension, we might miss some of these requests since they're only captured when field values change during edge traversal events.Describe the solution you'd like
Add a new onStateUpdate callback that provides real-time state updates for active orders. This would allow applications to monitor the newBaseRequest field and other state changes continuously, rather than only during edge traversal events.
Describe alternatives you've considered
Additional context
The proposed solution adds a more general-purpose state monitoring capability through the new callback. While state topics can be directly subscribed to get state information, this callback provides additional benefits:
This approach not only solves the immediate newBaseRequest monitoring need but also creates a more robust framework for implementing order-aware state monitoring features.