Class VABSubmodelAPI

  • All Implemented Interfaces:
    ISubmodelAPI

    public class VABSubmodelAPI
    extends Object
    implements ISubmodelAPI
    Implements the Submodel API by mapping it to VAB paths
    Author:
    schnicke
    • Constructor Detail

      • VABSubmodelAPI

        public VABSubmodelAPI​(IModelProvider modelProvider)
        Creates a VABSubmodelAPI that wraps an IModelProvider
        Parameters:
        modelProvider - providing the Submodel
    • Method Detail

      • addSubmodelElement

        public void addSubmodelElement​(String idShortPath,
                                       ISubmodelElement elem)
        Description copied from interface: ISubmodelAPI
        Adds a submodelElement to the submodel
        Specified by:
        addSubmodelElement in interface ISubmodelAPI
        Parameters:
        idShortPath - the idShort path to the submodelElement
        elem - the submodelElement to be added
      • deleteSubmodelElement

        public void deleteSubmodelElement​(String idShortPath)
        Description copied from interface: ISubmodelAPI
        Removes a submodelElement from the submodel
        Specified by:
        deleteSubmodelElement in interface ISubmodelAPI
        Parameters:
        idShortPath - the idShort path to the submodelElement, which is to be removed
      • updateSubmodelElement

        public void updateSubmodelElement​(String idShortPath,
                                          Object newValue)
        Description copied from interface: ISubmodelAPI
        Updates the value of a submodelElement
        Specified by:
        updateSubmodelElement in interface ISubmodelAPI
        Parameters:
        idShortPath - the idShort path to the submodelElement
        newValue - new value of the submodelElement
      • getSubmodelElementValue

        public Object getSubmodelElementValue​(String idShortPath)
        Description copied from interface: ISubmodelAPI
        Retrieves the value of a submodelElement
        Specified by:
        getSubmodelElementValue in interface ISubmodelAPI
        Parameters:
        idShortPath - the idShort path to the submodelElement
        Returns:
        submodelElement value
      • getSubmodelElement

        public ISubmodelElement getSubmodelElement​(String idShortPath)
        Description copied from interface: ISubmodelAPI
        Retrieves a submodelElement
        Specified by:
        getSubmodelElement in interface ISubmodelAPI
        Parameters:
        idShortPath - the idShort Path to the submodelElement
        Returns:
        the submodelElement
      • invokeOperation

        public Object invokeOperation​(String idShortPath,
                                      Object... params)
        Description copied from interface: ISubmodelAPI
        Invokes an operation
        Specified by:
        invokeOperation in interface ISubmodelAPI
        Parameters:
        idShortPath - the idShort path to the operation
        params - to be passed to the operation
        Returns:
        the result of the operation
      • invokeAsync

        public Object invokeAsync​(String idShortPath,
                                  Object... params)
        Description copied from interface: ISubmodelAPI
        Invoke an operation asynchronously
        Specified by:
        invokeAsync in interface ISubmodelAPI
        Parameters:
        idShortPath - the idShort path to the operation
        params - to be passed to the operation
        Returns:
        the requestId of the invocation
      • getOperationResult

        public Object getOperationResult​(String idShortPath,
                                         String requestId)
        Description copied from interface: ISubmodelAPI
        Gets the result of an asynchronously invoked operation
        Specified by:
        getOperationResult in interface ISubmodelAPI
        Parameters:
        idShortPath - of the operation
        requestId - the requestId of the invocation
        Returns:
        the result of the Operation or a Message that it is not finished yet