This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
op25-legacy/decoder/src/lib/golay.h

22 lines
449 B
C

#ifndef INCLUDED_GOLAY_H
#define INCLUDED_GOLAY_H
#include <cstddef>
#include <stdint.h>
/* APCO Golay(23,11,7) ecoder.
*
* \param val The 12-bit value to encode.
* \return The encoded codeword.
*/
extern uint32_t golay_23_encode(uint32_t);
/* APCO Golay(23,11,7) decoder.
*
* \param cw The 23-bit codeword to decode.
* \return The number of errors detected.
*/
extern size_t golay_23_decode(uint32_t& cw);
#endif /* INCLUDED_GOLAY_H */