Interface InternalPlantModelService
- All Superinterfaces:
PlantModelService
,TCSObjectService
public interface InternalPlantModelService extends PlantModelService
Declares the methods the plant model service must provide which are not accessible to remote
peers.
-
Method Summary
Modifier and Type Method Description java.util.Set<TCSResource<?>>
expandResources(java.util.Set<TCSResourceReference<?>> resources)
Expands a set of resources A to a set of resources B.void
loadPlantModel()
Loads the saved model into the kernel.void
savePlantModel()
Saves the current model under the given name.void
updateLocationReservationToken(TCSObjectReference<Location> ref, java.lang.String token)
Deprecated.UseInternalPeripheralService.updatePeripheralReservationToken()
instead.Methods inherited from interface org.opentcs.components.kernel.services.PlantModelService
createPlantModel, getModelName, getModelProperties, getPlantModel, updateLocationLock, updatePathLock
Methods inherited from interface org.opentcs.components.kernel.services.TCSObjectService
appendObjectHistoryEntry, fetchObject, fetchObject, fetchObjects, fetchObjects, updateObjectProperty
-
Method Details
-
expandResources
java.util.Set<TCSResource<?>> expandResources(java.util.Set<TCSResourceReference<?>> resources) throws ObjectUnknownExceptionExpands a set of resources A to a set of resources B. B contains the resources in A with blocks expanded to their actual members. The given set is not modified.- Parameters:
resources
- The set of resources to be expanded.- Returns:
- The given set with resources expanded.
- Throws:
ObjectUnknownException
- If any of the referenced objects does not exist.
-
loadPlantModel
void loadPlantModel() throws java.lang.IllegalStateExceptionLoads the saved model into the kernel. If there is no saved model, a new empty model will be loaded.- Throws:
java.lang.IllegalStateException
- If the model cannot be loaded.
-
savePlantModel
void savePlantModel() throws java.lang.IllegalStateExceptionSaves the current model under the given name. If there is a saved model, it will be overwritten.- Throws:
java.lang.IllegalStateException
- If the model could not be persisted for some reason.
-
updateLocationReservationToken
@Deprecated @ScheduledApiChange(details="Will be removed.", when="6.0") void updateLocationReservationToken(TCSObjectReference<Location> ref, @Nullable java.lang.String token) throws ObjectUnknownException, KernelRuntimeExceptionDeprecated.UseInternalPeripheralService.updatePeripheralReservationToken()
instead.Updates a location's reservation token.- Parameters:
ref
- A reference to the location to be updated.token
- The location's new reservation token.- Throws:
ObjectUnknownException
- If the referenced location does not exist.KernelRuntimeException
- In case there is an exception executing this method.
-