22 using System.Collections.Generic;
29 namespace Ntp.Analyzer.Config.Syntax
42 var fixedRun = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordFixedRun) as BooleanSettingNode;
44 var width = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordWidth) as IntegerSettingNode;
45 var height = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordHeight) as IntegerSettingNode;
46 var timespan = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordTimespan) as IntegerSettingNode;
47 var stamp = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordTimeStamp) as
TimeStampNode ??
50 var ignore = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphIgnored) as NumericSettingNode;
51 var drop = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphDropped) as NumericSettingNode;
52 var sent = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphSent) as NumericSettingNode;
53 var notSent = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphNotSent) as NumericSettingNode;
54 var avgRecv = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphAvgReceived) as NumericSettingNode;
55 var avgIgnore = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphAvgIgnored) as NumericSettingNode;
56 var avgDrop = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphAvgDropped) as NumericSettingNode;
57 var avgSent = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphAvgSent) as NumericSettingNode;
58 var avgNotSent = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphAvgNotSent) as NumericSettingNode;
59 var interval = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphPlotInterval) as IntegerSettingNode;
60 var rate = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordGraphPacketRate) as IntegerSettingNode;
93 CheckIsUnique(
new List<Symbol>
104 Symbol.KeywordGraphReceived,
105 Symbol.KeywordGraphIgnored,
106 Symbol.KeywordGraphDropped,
108 Symbol.KeywordGraphNotSent,
109 Symbol.KeywordGraphAvgReceived,
110 Symbol.KeywordGraphAvgIgnored,
111 Symbol.KeywordGraphAvgDropped,
112 Symbol.KeywordGraphAvgSent,
113 Symbol.KeywordGraphAvgNotSent,
114 Symbol.KeywordGraphPlotInterval,
115 Symbol.KeywordGraphPacketRate,
116 Symbol.KeywordDestinations,
120 CheckAllIsPresent(
new List<Symbol>
123 Symbol.KeywordDestinations
126 CheckOneIsPresent(
new List<Symbol>
128 Symbol.KeywordGraphReceived,
129 Symbol.KeywordGraphIgnored,
130 Symbol.KeywordGraphDropped,
132 Symbol.KeywordGraphNotSent,
133 Symbol.KeywordGraphAvgReceived,
134 Symbol.KeywordGraphAvgIgnored,
135 Symbol.KeywordGraphAvgDropped,
136 Symbol.KeywordGraphAvgSent,
137 Symbol.KeywordGraphAvgNotSent,
138 Symbol.KeywordGraphPlotInterval,
139 Symbol.KeywordGraphPacketRate
142 CheckOnlyOneIsPresent(
new List<Symbol>
151 CheckTypeIs<IntegerSettingNode>(
Symbol.KeywordFrequency);
152 CheckTypeIs<BooleanSettingNode>(
Symbol.KeywordInitialRun);
153 CheckTypeIs<BooleanSettingNode>(
Symbol.KeywordFixedRun);
154 CheckTypeIs<StringSettingNode>(
Symbol.KeywordTitle);
155 CheckTypeIs<IntegerSettingNode>(
Symbol.KeywordWidth);
156 CheckTypeIs<IntegerSettingNode>(
Symbol.KeywordHeight);
157 CheckTypeIs<IntegerSettingNode>(
Symbol.KeywordTimespan);
158 CheckTypeIs<TimeStampNode>(
Symbol.KeywordGraphTime);
159 CheckTypeIs<TimeStampNode>(
Symbol.KeywordTimeStamp);
160 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphReceived);
161 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphIgnored);
162 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphDropped);
163 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphSent);
164 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphNotSent);
165 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphAvgReceived);
166 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphAvgIgnored);
167 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphAvgDropped);
168 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphAvgSent);
169 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphAvgNotSent);
170 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphPlotInterval);
171 CheckTypeIs<NumericSettingNode>(
Symbol.KeywordGraphPacketRate);
override TrafficGraphConfiguration InternalCompile()
TrafficGraphSyntaxNode(string name, int line)
Traffic graph configuration used when creating Analyzer.Graph.TrafficGraph.
override void ValidateMandatories()
Override to validates the mandatory types in this syntax node.
override void ValidateTypes()
Override to validates the types in this syntax node.