예제 #1
0
        /// <summary>
        /// Make snapshot and keep it the buffer
        /// </summary>
        /// <param name="snapshotType">Snapshot type</param>
        /// <param name="skipFrameCounter">Number of dropped frame before compression. 0 means current frame.</param>
        /// <returns>True if succeeded</returns>
        public bool Snapshot(SnapshoteType snapshotType, int skipFrameCounter)
        {
            // Create snapshot command
            command[0] = CMD_PREFIX;
            command[1] = CMD_SNAPSHOT;
            command[2] = (byte)snapshotType;
            command[3] = (byte)(skipFrameCounter);
            command[4] = (byte)(skipFrameCounter >> 8);
            command[5] = 0x00;

            // send 'Snapshot' command
            SendCommand(command);

            // Receive ACK
            if (!ReceiveACK(CMD_SNAPSHOT, 100))
            {
                return(false);
            }

            return(true);
        }
예제 #2
0
        /// <summary>
        /// Make snapshot and keep it the buffer
        /// </summary>
        /// <param name="snapshotType">Snapshot type</param>
        /// <param name="skipFrameCounter">Number of dropped frame before compression. 0 means current frame.</param>
        /// <returns>True if succeeded</returns>
        public bool Snapshot(SnapshoteType snapshotType, int skipFrameCounter)
        {
            // Create snapshot command
            command[0] = CMD_PREFIX;
            command[1] = CMD_SNAPSHOT;
            command[2] = (byte)snapshotType;
            command[3] = (byte)(skipFrameCounter);
            command[4] = (byte)(skipFrameCounter >> 8);
            command[5] = 0x00;

            // send 'Snapshot' command
            SendCommand(command);

            // Receive ACK
            if (!ReceiveACK(CMD_SNAPSHOT)) //100
                return false;

            return true;
        }