-
-
Save TomW-Skyline/42ed7216f0bb9498aea13555b61d4b0f to your computer and use it in GitHub Desktop.
Set disallowed matrix connections
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Skyline.DataMiner.Automation; | |
using Skyline.DataMiner.Net.Messages; | |
using Skyline.DataMiner.Net.Messages.Advanced; | |
public static class Helper | |
{ | |
public static void SetDisallowedConnections(IEngine engine, int dmaId, int elementId, int matrixId, int discrete, IEnumerable<int> disallowedDiscretes) | |
{ | |
var message = new SetDataMinerInfoMessage | |
{ | |
What = (int)NotifyType.UpdatePortsXml, | |
DataMinerID = dmaId, | |
HostingDataMinerID = dmaId, | |
Puia1 = new PUIA | |
{ | |
Puia = new[] { new UIA(new[] { 2, elementId, matrixId, dmaId }) }, | |
}, | |
Psa2 = new PSA | |
{ | |
Psa = new[] | |
{ | |
new SA | |
{ | |
Sa = new[] { Convert.ToString(discrete), "matrix=not allowed," + String.Join(",", disallowedDiscretes) }, | |
}, | |
}, | |
}, | |
}; | |
engine.SendSLNetMessage(message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment