Interface PlantModelService
- All Superinterfaces:
TCSObjectService
- All Known Subinterfaces:
InternalPlantModelService
public interface PlantModelService extends TCSObjectService
Provides methods concerning the plant model.
-
Method Summary
Modifier and Type Method Description voidcreatePlantModel(PlantModelCreationTO to)Creates a new plant model with the objects described in the given transfer object.java.lang.StringgetModelName()Returns the name of the model that is currently loaded in the kernel.java.util.Map<java.lang.String,java.lang.String>getModelProperties()Returns the model's properties.voidupdateLocationLock(TCSObjectReference<Location> ref, boolean locked)Updates a location's lock state.Methods inherited from interface org.opentcs.components.kernel.services.TCSObjectService
appendObjectHistoryEntry, fetchObject, fetchObject, fetchObjects, fetchObjects, updateObjectProperty
-
Method Details
-
createPlantModel
void createPlantModel(PlantModelCreationTO to) throws ObjectUnknownException, ObjectExistsException, KernelRuntimeException, java.lang.IllegalStateExceptionCreates a new plant model with the objects described in the given transfer object. Implicitly saves/persists the new plant model.- Parameters:
to- The transfer object describing the plant model objects to be created.- Throws:
ObjectUnknownException- If any referenced object does not exist.ObjectExistsException- If an object with the same name already exists in the model.KernelRuntimeException- In case there is an exception executing this method.java.lang.IllegalStateException- If there was a problem persisting the model.
-
getModelName
Returns the name of the model that is currently loaded in the kernel.- Returns:
- The name of the currently loaded model.
- Throws:
KernelRuntimeException- In case there is an exception executing this method.
-
getModelProperties
java.util.Map<java.lang.String,java.lang.String> getModelProperties() throws KernelRuntimeExceptionReturns the model's properties.- Returns:
- The model's properties.
- Throws:
KernelRuntimeException- In case there is an exception executing this method.
-
updateLocationLock
void updateLocationLock(TCSObjectReference<Location> ref, boolean locked) throws ObjectUnknownException, KernelRuntimeExceptionUpdates a location's lock state.- Parameters:
ref- A reference to the location to be updated.locked- Indicates whether the location is to be locked (true) or unlocked (false).- Throws:
ObjectUnknownException- If the referenced location does not exist.KernelRuntimeException- In case there is an exception executing this method.
-