Closed maxwang001 closed 2 months ago
@maxwang001 I wouldn't consider this a defect, as we don't know of any previous operating mode when the vehicle initially connects, and changing the integration level when the vehicle disconnects is simply not a feature that the implementation offers at this point. But it can certainly be beneficial to have a way to (optionally) update the integration level when the vehicle connects or disconnects, so it's a valid feature request.
As always, contributions are welcome, but I'd suggest discussing potential implementations here before creating a PR.
@swltr Thanks for the comment. I agree your opinion to update the integration level when the vehicle connects or disconnects. Below is what we do now and do you think it is appropriate to change integration level under these 2 functions?
@maxwang001 connectVehicle()
and disconnectVehicle()
are called when the driver is supposed to connect/disconnect - not to the vehicle, but to the broker. That doesn't mean the connection to the broker can actually be established, and it also doesn't mean that communication with the vehicle is possible.
In the VDA5050 driver, the place where we know whether there's a communication connection to the vehicle or not is when we receive a Connection
message. And the place where we can decide whether the vehicle is in a usable state is when receive a State
message.
@swltr Yes, I find the side effect too that the exception happens when I disable the vehicle which has been assigned transport orders. And Using MQ messages to make a judgment has a risk about the MQ service sometimes experiences brief interruptions. Maybe use operatingMode to control is a good way but can't handle the vehicle is offline suddenly.
I can understand now why using operation desk to control manually and have no more quesitons.
Affected version
The latest commit of Format code via Spotless
Steps to reproduce
Expected behaviour
Integration level should be changed properly when AGV is online and offline.
Actual behaviour
Additional information