예제 #1
0
        protected override bool OnOpenStream(FileFormatOption option, Stream stream)
        {
            reader_ = new BinaryReader(stream);
            option_ = option as FileFormatReaderOptionImpl;

            if (option_ == null)
            {
                return(false);
            }

            return(true);
        }
예제 #2
0
        private PacketObject ReadContentsRecord(FileFormatReaderOptionImpl option, byte[] data)
        {
            try {
                if (packet_time_ == DateTime.MinValue)
                {
                    packet_time_ = DateTime.Now;
                }

                var packet = new PacketObject(
                    "Binary",
                    PacketFacility.External,
                    alias_,
                    PacketPriority.Standard,
                    PacketAttribute.Data,
                    packet_time_,
                    "", PacketDirection.Recv, "", "", 0, null, data);

                packet_time_ = packet_time_.AddMilliseconds(option.PacketInterval);

                return(packet);
            } catch {
                return(null);
            }
        }