private RdmPacket ProcessSlotInfo(RdmPacket packet) { SlotInfo.GetReply response = packet as SlotInfo.GetReply; if (response != null) { foreach (SlotInfo.SlotInformation slot in response.Slots) { PersonalitySlotInformation slotInfo = new PersonalitySlotInformation(); slotInfo.Id = slot.Id; slotInfo.Offset = slot.Offset; slotInfo.Type = slot.Type; slotInfo.SlotLink = slot.SlotLink; Personality.Add(slotInfo); //Request the slot description. SlotDescription.Get slotDescription = new SlotDescription.Get(); slotDescription.SlotOffset = slot.Offset; foreach (var socket in sockets) { socket.SendRdm(slotDescription, Address, Id); } } } return(null); }
protected RdmPacket GetSlotDescription(RdmPacket packet) { SlotDescription.Get requestPacket = packet as SlotDescription.Get; if (requestPacket != null) { SlotDescription.GetReply replyPacket = new SlotDescription.GetReply(); if (requestPacket.SlotOffset >= 0 && requestPacket.SlotOffset < this.Count) { replyPacket.Description = this[requestPacket.SlotOffset].Description; } return(replyPacket); } return(null); }