Example #1
0
        protected void RefreshDataPerNode()
        {
            //nodesInDatabase = CommonFunctions.GetNodeList(true);
            List <Node> nodeList = new List <Node>();

            nodeList = CommonFunctions.GetNodeList(null, true);
            foreach (Node node in nodeList)
            {
                LivePhasorDataMessage message = new LivePhasorDataMessage()
                {
                    //PmuDistributionList = CommonFunctions.GetPmuDistribution(),
                    DeviceDistributionList    = CommonFunctions.GetVendorDeviceDistribution(null, node.ID),
                    InterconnectionStatusList = CommonFunctions.GetInterconnectionStatus(null, node.ID)
                };

                //lock (syncRoot)
                lock (dataPerNode)
                {
                    if (dataPerNode.ContainsKey(node.ID))
                    {
                        dataPerNode[node.ID] = message;
                    }
                    else
                    {
                        dataPerNode.Add(node.ID, message);
                    }
                }
            }
        }
Example #2
0
        protected void RefreshDataPerNode()
        {
            //nodesInDatabase = CommonFunctions.GetNodeList(true);
            List<Node> nodeList = new List<Node>();
            nodeList = CommonFunctions.GetNodeList(null, true);
            foreach (Node node in nodeList)
            {
                LivePhasorDataMessage message = new LivePhasorDataMessage()
                {
                    //PmuDistributionList = CommonFunctions.GetPmuDistribution(),
                    DeviceDistributionList = CommonFunctions.GetVendorDeviceDistribution(null, node.ID),
                    InterconnectionStatusList = CommonFunctions.GetInterconnectionStatus(null, node.ID)
                };

                //lock (syncRoot)
                lock (dataPerNode)
                {
                    if (dataPerNode.ContainsKey(node.ID))
                        dataPerNode[node.ID] = message;
                    else
                        dataPerNode.Add(node.ID, message);
                }
            }
        }