Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
golay.h
Go to the documentation of this file.
1
18#pragma once
19#include <stdint.h>
20
21#include "ws_symbol_export.h"
22
23/* encodes a 12-bit word to a 24-bit codeword
24 */
25WS_DLL_PUBLIC
26uint32_t golay_encode(unsigned w);
27
28/* return a mask showing the bits which are in error in a received
29 * 24-bit codeword, or -1 if 4 errors were detected.
30 */
31WS_DLL_PUBLIC
32int32_t golay_errors(uint32_t codeword);
33
34/* decode a received codeword. Up to 3 errors are corrected for; 4
35 errors are detected as uncorrectable (return -1); 5 or more errors
36 cause an incorrect correction.
37*/
38WS_DLL_PUBLIC
39int golay_decode(uint32_t w);
40
41/*
42 * Editor modelines
43 *
44 * Local Variables:
45 * c-basic-offset: 4
46 * tab-width: 8
47 * indent-tabs-mode: nil
48 * End:
49 *
50 * ex: set shiftwidth=4 tabstop=8 expandtab:
51 * :indentSize=4:tabSize=8:noTabs=true:
52 */