All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.common.script.node.NodeScripting Maven / Gradle / Ivy

package org.bidib.wizard.common.script.node;

import java.util.List;
import java.util.Map;

import org.bidib.jbidibc.core.node.ConfigurationVariable;
import org.bidib.jbidibc.messages.Feature;
import org.bidib.jbidibc.messages.enums.IdentifyState;
import org.bidib.jbidibc.messages.port.PortConfigValue;
import org.bidib.wizard.api.model.Accessory;
import org.bidib.wizard.api.model.Macro;
import org.bidib.wizard.api.script.Scripting;
import org.bidib.wizard.common.script.node.types.CvType;
import org.bidib.wizard.common.script.node.types.FeatureType;
import org.bidib.wizard.common.script.node.types.TargetType;

public interface NodeScripting extends Scripting {

    /**
     * Set CV values on node.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @param cvTypes
     *            the CV types
     */
    void setCv(Long uniqueId, CvType... cvTypes);

    /**
     * Get the CV values from the node.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @param cvTypes
     *            the CV types
     * @return the list of cv values
     */
    List getCv(Long uniqueId, CvType... cvTypes);

    /**
     * Set features on node.
     *
     * @param uniqueId
     *            the uniqueId of the node
     * @param features
     *            the features
     */
    void setFeature(Long uniqueId, FeatureType... features);

    /**
     * Get all features from the node.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     */
    List featuresGetAll(Long uniqueId, boolean discardCache);

    /**
     * Set the label.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @param portType
     *            the port label info
     */
    void setLabel(Long uniqueId, TargetType portType);

    /**
     * Set the macro.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @param macro
     *            the macro
     */
    void setMacro(Long uniqueId, Macro macro);

    /**
     * Set the accessory.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @param accessory
     *            the accessory
     */
    void setAccessory(Long uniqueId, Accessory accessory);

    /**
     * Check if the node has a restart pending.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @return restart pending
     */
    boolean isNodeHasRestartPending(Long uniqueId);

    /**
     * Reset the node.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     */
    void resetNode(Long uniqueId);

    /**
     * Reselect the node.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     */
    void reselectNode(Long uniqueId);

    /**
     * Set the port config
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @param portType
     *            the port type
     * @param portConfig
     *            the port config to set
     */
    void setPortConfig(Long uniqueId, TargetType portType, final Map> portConfig);

    /**
     * Assert that the port type matches.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @param portType
     *            the requested port type
     */
    void assertPortType(Long uniqueId, TargetType portType);

    /**
     * Set the identify state of the node.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @param identifyState
     *            the identify state
     */
    void setIdentifyState(Long uniqueId, IdentifyState identifyState);

    /**
     * Query the identify state of the node.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @return the identify state
     */
    IdentifyState queryIdentifyState(Long uniqueId);

    /**
     * Set the string value on the node.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @param namespace
     *            the namespace
     * @param index
     *            The index
     * @param value
     *            the string value
     * 
     * @return the returned string value
     */
    String setString(Long uniqueId, int namespace, int index, String value);

    /**
     * Get the string value from the node.
     * 
     * @param uniqueId
     *            the uniqueId of the node
     * @param namespace
     *            the namespace
     * @param index
     *            The index
     * 
     * @return the returned string value
     */
    String getString(Long uniqueId, int namespace, int index);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy