Package org.opentcs.drivers.vehicle
Klasse VehicleProcessModel
java.lang.Object
org.opentcs.drivers.vehicle.VehicleProcessModel
An observable model of a vehicle's and its comm adapter's attributes.
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungstatic enum
Notification arguments to indicate some change.static class
A notification object sent to observers to indicate a change of a property.static class
A notification object sent to observers to indicate a change of a transport order's property.static class
A notification object sent to observers to indicate a change of a vehicle's property. -
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Registers a new property change listener with this model.void
commandEnqueued
(MovementCommand enqueuedCommand) Notifies observers that the given command has been added to the comm adapter's command queue.void
commandExecuted
(MovementCommand executedCommand) Notifies observers that the given command has been executed by the comm adapter/vehicle.void
commandFailed
(MovementCommand failedCommand) Notifies observers that the given command could not be executed by the comm adapter/vehicle.void
commandSent
(MovementCommand sentCommand) Notifies observers that the given command has been sent to the associated vehicle.Returns the vehicle's current bounding box.int
Returns the vehicle's current energy level.int
Veraltet.Returns the vehicle's load handling devices.getName()
Returns the vehicle's name.Returns user notifications published by the comm adapter.double
Veraltet.UsegetPose()
instead.getPose()
Returns the vehicle's pose.Returns the vehicle's current position.Veraltet.UsegetPose()
instead.protected PropertyChangeSupport
Returns a reference to the vehicle.getState()
Returns the vehicle's current state.void
Notifies observers that the vehicle would like to have its integration level changed.boolean
Indicates whether the comm adapter is currently connected or not.boolean
Indicates whether the comm adapter is currently enabled or not.void
Publishes an event via the kernel's event mechanism.void
publishUserNotification
(UserNotification notification) Publishes an user notification.void
Unregisters a property change listener from this model.void
setBoundingBox
(BoundingBox boundingBox) Sets the vehicle's current bounding box.void
setCommAdapterConnected
(boolean commAdapterConnected) Sets the comm adapter's connected flag.void
setCommAdapterEnabled
(boolean commAdapterEnabled) Sets the comm adapter's enabled flag.void
setEnergyLevel
(int newLevel) Sets the vehicle's current energy level.void
setLength
(int length) Veraltet.UsesetBoundingBox(BoundingBox)
instead.void
setLoadHandlingDevices
(List<LoadHandlingDevice> devices) Sets the vehicle's load handling devices.void
setOrientationAngle
(double angle) Veraltet.UsesetPose(Pose)
instead.void
Sets the vehicle's pose.void
setPosition
(String position) Updates the vehicle's current position.void
setPrecisePosition
(Triple position) Veraltet.UsesetPose(Pose)
} instead.void
setProperty
(String key, String value) Sets a property of the vehicle.void
setState
(Vehicle.State newState) Sets the vehicle's current state.void
setTransportOrderProperty
(String key, String value) Sets a property of the transport order the vehicle is currently processing.void
transportOrderWithdrawalRequested
(boolean forced) Notifies observers that the vehicle would like to have its current transport order withdrawn.
-
Konstruktordetails
-
VehicleProcessModel
Creates a new instance.- Parameter:
attachedVehicle
- The vehicle attached to the new instance.
-
-
Methodendetails
-
addPropertyChangeListener
Registers a new property change listener with this model.- Parameter:
listener
- The listener to be registered.
-
removePropertyChangeListener
Unregisters a property change listener from this model.- Parameter:
listener
- The listener to be unregistered.
-
getReference
Returns a reference to the vehicle.- Gibt zurück:
- A reference to the vehicle.
-
getName
Returns the vehicle's name.- Gibt zurück:
- The vehicle's name.
-
getNotifications
Returns user notifications published by the comm adapter.- Gibt zurück:
- The notifications.
-
publishUserNotification
Publishes an user notification.- Parameter:
notification
- The notification to be published.
-
publishEvent
Publishes an event via the kernel's event mechanism.- Parameter:
event
- The event to be published.
-
isCommAdapterEnabled
public boolean isCommAdapterEnabled()Indicates whether the comm adapter is currently enabled or not.- Gibt zurück:
true
if, and only if, the comm adapter is currently enabled.
-
setCommAdapterEnabled
public void setCommAdapterEnabled(boolean commAdapterEnabled) Sets the comm adapter's enabled flag.- Parameter:
commAdapterEnabled
- The new value.
-
isCommAdapterConnected
public boolean isCommAdapterConnected()Indicates whether the comm adapter is currently connected or not.- Gibt zurück:
true
if, and only if, the comm adapter is currently connected.
-
setCommAdapterConnected
public void setCommAdapterConnected(boolean commAdapterConnected) Sets the comm adapter's connected flag.- Parameter:
commAdapterConnected
- The new value.
-
getPosition
Returns the vehicle's current position.- Gibt zurück:
- The position.
-
setPosition
Updates the vehicle's current position.- Parameter:
position
- The new position
-
getPrecisePosition
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") @Nullable public Triple getPrecisePosition()Veraltet.UsegetPose()
instead.Returns the vehicle's precise position.- Gibt zurück:
- The vehicle's precise position.
-
setPrecisePosition
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public void setPrecisePosition(@Nullable Triple position) Veraltet.UsesetPose(Pose)
} instead.Sets the vehicle's precise position.- Parameter:
position
- The new position.
-
getOrientationAngle
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public double getOrientationAngle()Veraltet.UsegetPose()
instead.Returns the vehicle's current orientation angle.- Gibt zurück:
- The vehicle's current orientation angle.
- Siehe auch:
-
setOrientationAngle
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public void setOrientationAngle(double angle) Veraltet.UsesetPose(Pose)
instead.Sets the vehicle's current orientation angle.- Parameter:
angle
- The new angle
-
getPose
Returns the vehicle's pose.- Gibt zurück:
- The vehicle's pose.
-
setPose
Sets the vehicle's pose.- Parameter:
pose
- The new pose
-
getEnergyLevel
public int getEnergyLevel()Returns the vehicle's current energy level.- Gibt zurück:
- The vehicle's current energy level.
-
setEnergyLevel
public void setEnergyLevel(int newLevel) Sets the vehicle's current energy level.- Parameter:
newLevel
- The new level.
-
getLoadHandlingDevices
Returns the vehicle's load handling devices.- Gibt zurück:
- The vehicle's load handling devices.
-
setLoadHandlingDevices
Sets the vehicle's load handling devices.- Parameter:
devices
- The new devices
-
setProperty
Sets a property of the vehicle.- Parameter:
key
- The property's key.value
- The property's new value.
-
getState
Returns the vehicle's current state.- Gibt zurück:
- The state
-
setState
Sets the vehicle's current state.- Parameter:
newState
- The new state
-
getLength
Veraltet.UsegetBoundingBox()
instead.Returns the vehicle's current length.- Gibt zurück:
- The vehicle's current length.
-
setLength
@Deprecated @ScheduledApiChange(when="7.0", details="Will be removed.") public void setLength(int length) Veraltet.UsesetBoundingBox(BoundingBox)
instead.Sets the vehicle's current length.- Parameter:
length
- The new length.
-
getBoundingBox
Returns the vehicle's current bounding box.- Gibt zurück:
- The vehicle's current bounding box.
-
setBoundingBox
Sets the vehicle's current bounding box.- Parameter:
boundingBox
- The new bounding box.
-
setTransportOrderProperty
Sets a property of the transport order the vehicle is currently processing.- Parameter:
key
- The property's key.value
- The property's new value.
-
commandEnqueued
Notifies observers that the given command has been added to the comm adapter's command queue.- Parameter:
enqueuedCommand
- The command that has been added to the queue.
-
commandSent
Notifies observers that the given command has been sent to the associated vehicle.- Parameter:
sentCommand
- The command that has been sent to the vehicle.
-
commandExecuted
Notifies observers that the given command has been executed by the comm adapter/vehicle.- Parameter:
executedCommand
- The command that has been executed.
-
commandFailed
Notifies observers that the given command could not be executed by the comm adapter/vehicle.- Parameter:
failedCommand
- The command that could not be executed.
-
integrationLevelChangeRequested
Notifies observers that the vehicle would like to have its integration level changed.- Parameter:
level
- The integration level to change to.
-
transportOrderWithdrawalRequested
public void transportOrderWithdrawalRequested(boolean forced) Notifies observers that the vehicle would like to have its current transport order withdrawn.- Parameter:
forced
- Whether a forced withdrawal is requested.
-
getPropertyChangeSupport
-
getBoundingBox()
instead.