Esempio n. 1
0
        //
        // override object.Equals
        public override bool Equals(object obj)
        {
            PackagePSP p = obj as PackagePSP;

            if (p == null)
            {
                return(false);
            }
            for (int i = 0; i < Count; i++)
            {
                if (!p[i].Equals(this[i]))
                {
                    return(false);
                }
            }
            if (p.StartBit != this.StartBit)
            {
                return(false);
            }
            if (PacketSizeInBytes != p.PacketSizeInBytes)
            {
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
 //
 public ProtocolStreamingPackets(Stream stream, PackagePSP packagePSP)
 {
     this.stream = stream;
     Package     = packagePSP;
     packetBytes = new int[packagePSP.PacketSizeInBytes];
 }