Minitel-1b Error Correction Procedure. Reference: page 55 and on in <http://543210.free.fr/TV/stum1b.pdf> License: AGPL3 Copyright Pascal J. Bourguignon 2012 - 2012 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
+ecp-block-size+ |
constant |
Size of an ECP block.
Initial value: 17
(ecp-active ecp-data) |
function |
Whether the ECP is active.
ecp-data |
structure |
State for the ECP algorithm.
(ecp-state ecp-data) |
function |
State of the ECP, one of :ecp-start, :ecp-block or :ecp-syn.
(process-output-buffer ecp buffer &key start end last) |
function |
ECP: An ECP-DATA structure maintaining the persistent data between calls to PROCESS-OUTPUT-BUFFER. BUFFER: Source data octet vector (only 7-bit values). START: Index of the first octet in BUFFER to process. END: Index of the first octet in BUFFER after the last to process. LAST: When true, if there's not enough bytes in the BUFFER to fill a packet, the packet is padded with NULs. DO: Encode an ECP packet from bytes obtained from BUFFER, between START and END. RETURN: index of first byte not processed from BUFFER; (ecp-block ecp) -- when a packet is complete, index of first byte not processed from BUFFER; nil -- when the package is not complete.
(start-ecp ecp) |
function |
Initialize the ECP data.
statistics |
structure |
Statistics for the ECP algorithm.
(statistics-bytes-received statistics) |
function |
ECP statistics: number of bytes processed.
(statistics-correct-count statistics) |
function |
ECP statistics: number of correct blocks.
(statistics-corrected-count statistics) |
function |
ECP statistics: number of corrected errors.
(statistics-invalid-count statistics) |
function |
ECP statistics: number of invalid blocks.
(statistics-invalid-syn-count statistics) |
function |
ECP statistics: number of invalid syn.
(statistics-parity-errors statistics) |
function |
ECP statistics: number of parity errors.
(statistics-uncorrectable-count statistics) |
function |
ECP statistics: number of uncorrectable errors.
(statistics-uncorrected-count statistics) |
function |
ECP statistics: number of uncorrected errors.
(statistics-valid-syn-count statistics) |
function |
ECP statistics: number of valid syn.
(stop-ecp ecp) |
function |
Resets the ECP data.