Example #1
0
        public PelcoDEMessageType?GetResponseType(PelcoDEMessage pelcoMessage)
        {
            if (pelcoMessage == null)
            {
                throw new ArgumentNullException(nameof(pelcoMessage));
            }

            if (_commandsMapping.Values.Contains(pelcoMessage.Command2))
            {
                return(_commandsMapping.FirstOrDefault(cm => cm.Value == pelcoMessage.Command2).Key);
            }
            return(null);
        }
Example #2
0
 public static ushort GetUInt16(PelcoDEMessage pelcoMessage)
 {
     return(BitConverter.ToUInt16(new[] { pelcoMessage.DataL, pelcoMessage.DataH }));
 }