Interface VehicleService
- All Superinterfaces:
TCSObjectService
- All Known Subinterfaces:
InternalVehicleService
public interface VehicleService extends TCSObjectService
Provides methods concerning
Vehicle
s.-
Method Summary
Modifier and Type Method Description void
attachCommAdapter(TCSObjectReference<Vehicle> ref, VehicleCommAdapterDescription description)
Attaches the described comm adapter to the referenced vehicle.void
disableCommAdapter(TCSObjectReference<Vehicle> ref)
Disables the comm adapter attached to the referenced vehicle.void
enableCommAdapter(TCSObjectReference<Vehicle> ref)
Enables the comm adapter attached to the referenced vehicle.AttachmentInformation
fetchAttachmentInformation(TCSObjectReference<Vehicle> ref)
Returns attachment information for the referenced vehicle.VehicleProcessModelTO
fetchProcessModel(TCSObjectReference<Vehicle> ref)
Returns the process model for the referenced vehicle.void
sendCommAdapterCommand(TCSObjectReference<Vehicle> ref, AdapterCommand command)
Sends anAdapterCommand
to the comm adapter attached to the referenced vehicle.void
sendCommAdapterMessage(TCSObjectReference<Vehicle> ref, java.lang.Object message)
Sends a message to the communication adapter associated with the referenced vehicle.void
updateVehicleAllowedOrderTypes(TCSObjectReference<Vehicle> ref, java.util.Set<java.lang.String> allowedOrderTypes)
Updates the types of transport orders a vehicle is allowed to process.void
updateVehicleIntegrationLevel(TCSObjectReference<Vehicle> ref, Vehicle.IntegrationLevel integrationLevel)
Updates the vehicle's integration level.Methods inherited from interface org.opentcs.components.kernel.services.TCSObjectService
appendObjectHistoryEntry, fetchObject, fetchObject, fetchObjects, fetchObjects, updateObjectProperty
-
Method Details
-
attachCommAdapter
void attachCommAdapter(TCSObjectReference<Vehicle> ref, VehicleCommAdapterDescription description) throws ObjectUnknownException, KernelRuntimeExceptionAttaches the described comm adapter to the referenced vehicle.- Parameters:
ref
- A reference to the vehicle.description
- The description for the comm adapter to be attached.- Throws:
ObjectUnknownException
- If the referenced vehicle does not exist.KernelRuntimeException
- In case there is an exception executing this method.
-
disableCommAdapter
void disableCommAdapter(TCSObjectReference<Vehicle> ref) throws ObjectUnknownException, KernelRuntimeExceptionDisables the comm adapter attached to the referenced vehicle.- Parameters:
ref
- A reference to the vehicle the comm adapter is attached to.- Throws:
ObjectUnknownException
- If the referenced vehicle does not exist.KernelRuntimeException
- In case there is an exception executing this method.
-
enableCommAdapter
void enableCommAdapter(TCSObjectReference<Vehicle> ref) throws ObjectUnknownException, KernelRuntimeExceptionEnables the comm adapter attached to the referenced vehicle.- Parameters:
ref
- A reference to the vehicle the comm adapter is attached to.- Throws:
ObjectUnknownException
- If the referenced vehicle does not exist.KernelRuntimeException
- In case there is an exception executing this method.
-
fetchAttachmentInformation
AttachmentInformation fetchAttachmentInformation(TCSObjectReference<Vehicle> ref) throws ObjectUnknownException, KernelRuntimeExceptionReturns attachment information for the referenced vehicle.- Parameters:
ref
- A reference to the vehicle.- Returns:
- The attachment information.
- Throws:
ObjectUnknownException
- If the referenced vehicle does not exist.KernelRuntimeException
- In case there is an exception executing this method.
-
fetchProcessModel
VehicleProcessModelTO fetchProcessModel(TCSObjectReference<Vehicle> ref) throws ObjectUnknownException, KernelRuntimeExceptionReturns the process model for the referenced vehicle.- Parameters:
ref
- A reference to the vehicle.- Returns:
- The process model.
- Throws:
ObjectUnknownException
- If the referenced vehicle does not exist.KernelRuntimeException
- In case there is an exception executing this method.
-
sendCommAdapterCommand
void sendCommAdapterCommand(TCSObjectReference<Vehicle> ref, AdapterCommand command) throws ObjectUnknownException, KernelRuntimeExceptionSends anAdapterCommand
to the comm adapter attached to the referenced vehicle.- Parameters:
ref
- A reference to the vehicle.command
- The adapter command to send.- Throws:
ObjectUnknownException
- If the referenced vehicle does not exist.KernelRuntimeException
- In case there is an exception executing this method.- See Also:
VehicleCommAdapter.execute(AdapterCommand)
-
sendCommAdapterMessage
void sendCommAdapterMessage(TCSObjectReference<Vehicle> ref, java.lang.Object message) throws ObjectUnknownException, KernelRuntimeExceptionSends a message to the communication adapter associated with the referenced vehicle. This method provides a generic one-way communication channel to the communication adapter of a vehicle. Note that there is no return value and no guarantee that the communication adapter will understand the message; clients cannot even know which communication adapter is attached to a vehicle, so it's entirely possible that the communication adapter receiving the message does not understand it.- Parameters:
ref
- The vehicle whose communication adapter shall receive the message.message
- The message to be delivered.- Throws:
ObjectUnknownException
- If the referenced vehicle does not exist.KernelRuntimeException
- If the calling client is not allowed to execute this method.- See Also:
VehicleCommAdapter.processMessage(java.lang.Object)
-
updateVehicleIntegrationLevel
void updateVehicleIntegrationLevel(TCSObjectReference<Vehicle> ref, Vehicle.IntegrationLevel integrationLevel) throws ObjectUnknownException, KernelRuntimeException, java.lang.IllegalArgumentExceptionUpdates the vehicle's integration level.- Parameters:
ref
- A reference to the vehicle.integrationLevel
- The vehicle's new integration level.- Throws:
ObjectUnknownException
- If the referenced vehicle does not exist.KernelRuntimeException
- In case there is an exception executing this method.java.lang.IllegalArgumentException
- If changing the vehicle's integration level tointegrationLevel
is not allowed from its current integration level.
-
updateVehicleAllowedOrderTypes
void updateVehicleAllowedOrderTypes(TCSObjectReference<Vehicle> ref, java.util.Set<java.lang.String> allowedOrderTypes) throws ObjectUnknownException, KernelRuntimeExceptionUpdates the types of transport orders a vehicle is allowed to process.- Parameters:
ref
- A reference to the vehicle to be modified.allowedOrderTypes
- A set of transport order types.- Throws:
ObjectUnknownException
- If the referenced vehicle does not exist.KernelRuntimeException
- In case there is an exception executing this method.
-