//Rule signing code, don't modify:6015BB91254EC571 using System; using log4net; using Perytons.Analyzer.Core; using Perytons.Analyzer.Core.Graphs; using System.Collections.Generic; using System.Drawing; // This is a new rule template. You can find rule examples under Perytons/Rules folder in My Document. namespace Perytons.Analyzer.Core.Monitoring { public class AddMessages : RuleBase // don't remove this line { // Declare your global rule variables here // This method is called once, before message processing begins public AddMessages(GraphBuilder builder) : base(builder) // don't remove this line { // Initialize your rule variables here. } // This method will be called on each message received // Use packet.Field(FieldName).FieldProperties to get field value, meaning or any other property // Use packet.Search(Parameters) to use predefined search utilities (search for value in message field(s) or subfields) // Use packet.Action to set the needed action (e.g. add message to time view, etc.) // Use Log.Sevirity(Message) to send alerts to the Event Log window // Use Email.Sevirity(Message) to send e-mail alerts (need to set server info in the log4net.confog file public override void DoRule(Packet packet) // don't remove this line { // Do your packet filtering logic here packet.AddToTimeView(); if (packet.Field("MacHeaderSeq").Value == 20) { packet.AddToMessageView("MacHeaderSeq"); packet.AddToTimeView(Color.Blue); } if (packet.Field("MacHeaderSeq").Value == 0) { packet.AddToMessageView("MacHeaderSeq"); packet.AddToTimeView(Color.Pink); packet.AddName("Seq"); // set the message 'name' or 'type' that will be shown in the message view } base.DoRule(packet); // don't remove this line } // This method is called when statistics results are quarried (e.g. every time the statisitcs form is opened). public override void Process() // don't remove this line { // Do your summary code here base.Process(); // don't remove this line } } }