private string StrMsgType2Cmnd(XplMessageTypes Messagetype) { switch (Messagetype) { case XplMessageTypes.Command: return "xpl-cmnd"; case XplMessageTypes.Status: return "xpl-stat"; case XplMessageTypes.Trigger: return "xpl-trig"; case (XplMessageTypes)0xff: return "*"; } return ""; }
public XplFilter(XplMessageTypes t, string Source_Vendor, string Source_Device, string Source_Instance, string Schema_class, string Schema_Type) { this.MessageType = t; this.Source.Vendor = Source_Vendor.ToLowerInvariant(); this.Source.Device = Source_Device.ToLowerInvariant(); this.Source.Instance = Source_Instance.ToLowerInvariant(); this.Schema.msgClass = Schema_class.ToLowerInvariant(); this.Schema.msgType = Schema_Type.ToLowerInvariant(); }
private bool MsgTypeMatchesFilter(string m, XplMessageTypes f) { if (((int)f) == 0xff) { return true; } bool flag = false; string str = m; if (str != null) { if (!(str == "xpl-cmnd")) { if (str == "xpl-stat") { if (((byte)(f & XplMessageTypes.Status)) > 0) { flag = true; } } else if ((str == "xpl-trig") && (((byte)(f & XplMessageTypes.Trigger)) > 0)) { flag = true; } } else if (((byte)(f & XplMessageTypes.Command)) > 0) { flag = true; } } this.LogInfo("Msgtypematchesfilter=" + flag.ToString()); return flag; }
public XplFilter() { this.MessageType = XplMessageTypes.None; this.Source.Vendor = ""; this.Source.Device = ""; this.Source.Instance = ""; this.Schema.msgClass = ""; this.Schema.msgType = ""; }