Class CvValueUtils


  • public class CvValueUtils
    extends Object
    • Constructor Detail

      • CvValueUtils

        public CvValueUtils()
    • Method Detail

      • writeCvValues

        public static void writeCvValues​(org.bidib.wizard.api.model.NodeInterface selectedNode,
                                         com.jidesoft.grid.DefaultExpandableRow treeNode,
                                         Map<String,​CvNode> cvNumberToNodeMap,
                                         CvDefinitionPanelProvider cvDefintionPanelProvider)
        Write the CV values provided in treeNode parameter and sub-treeNodes via the cvDefinitionPanelProvider to the node.
        Parameters:
        selectedNode - the selected node
        treeNode - the tree node
        cvNumberToNodeMap - the map
        cvDefinitionPanelProvider - the CV definition panel provider
      • writeCvValues

        public static void writeCvValues​(org.bidib.wizard.api.model.NodeInterface selectedNode,
                                         List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList,
                                         Map<String,​CvNode> cvNumberToNodeMap,
                                         CvDefinitionPanelProvider cvDefinitionPanelProvider)
        Write the CV values provided in cvList parameter via the cvDefinitionPanelProvider to the node.
        Parameters:
        selectedNode - the selected node
        cvList - the list of new CV values
        cvNumberToNodeMap - the map
        cvDefinitionPanelProvider - the CV definition panel provider
      • addNewValueToList

        public static void addNewValueToList​(CvNode cvNode,
                                             List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList)
        Add a new ConfigurationVariable item to the list if the new value is available.
        Parameters:
        cvNode - the cvNode
        cvList - the list
      • compareAndAddNewValue

        public static void compareAndAddNewValue​(CvNode cvNode,
                                                 String newValue,
                                                 List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList,
                                                 Map<String,​CvNode> cvNumberToNodeMap)
        Add a new ConfigurationVariable item to the list if the new value is available.
        Parameters:
        cvNode - the cvNode
        cvList - the list
      • compareAndAddNewValue

        public static void compareAndAddNewValue​(LongCvNode cvNode,
                                                 Integer newValue,
                                                 List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList)
        Add a new ConfigurationVariable item to the list if the new value is available.
        Parameters:
        cvNode - the cvNode
        cvList - the list
      • getConfigVarByteValue

        public static Integer getConfigVarByteValue​(CvNode cvNode,
                                                    Map<String,​CvNode> cvNumberToNodeMap)
        Return the byte value in the CV as integer value. If no CV is assigned the value 0 is returned.
        Parameters:
        cvNode - the cv node
        cvNumberToNodeMap - the map of cv number to node
        Returns:
        the value
      • getConfigVarLongValue

        public static Long getConfigVarLongValue​(CvNode cvNode)
      • getConfigVarStringValue

        public static String getConfigVarStringValue​(CvNode cvNode)