GXDLMSProperty FindByLN(GXCategoryCollection categories, Type type, string ln, int attributeOrder) { foreach (GXCategory it in categories) { if (it.GetType() == type && ((GXDLMSCategory)it).LogicalName == ln) { foreach (GXDLMSProperty prop in it.Properties) { if (prop.AttributeOrdinal == attributeOrder) { return prop; } } } } return null; }
/// <summary> /// Override this to made changes before device load. /// </summary> /// <remarks> /// Remember to call base. /// </remarks> protected override void OnDeserializing(bool designMode) { Keepalive = new GXKeepalive(this); this.GXClient = new GXClient(); Categories = new GXCategoryCollection(); Tables = new GXTableCollection(); m_AllowedMediaTypes = new GXMediaTypeCollection(this); m_Statistics = new GXDeviceStatistics(); m_sync = new object(); m_transactionsync = new object(); }
private void ShowAvailableCategories(GXCategoryCollection cats, TreeNode root) { if (Gurux.DeviceSuite.Properties.Settings.Default.DeviceTreeShowCategories) { foreach (GXCategory cat in cats) { ShowAvailableCategory(cat, root); } } root.ExpandAll(); }
/// <summary> /// Initializes a new instance of the GXDevice class. /// </summary> public GXDevice() { Keepalive = new GXKeepalive(this); this.GXClient = new GXClient(); Categories = new GXCategoryCollection(); Tables = new GXTableCollection(); m_AllowedMediaTypes = new GXMediaTypeCollection(this); m_sync = new object(); m_transactionsync = new object(); }