C header
On this page
This page holds the C headers of libdmrgo: dmrgo.h, with the rules of the API, and dmrgo_gen.h, with the C form of each package.
C API shows how to build the library and link a program with it. v2/capi/internal/capigen writes dmrgo_gen.h from the Go API, with the doc comment of each Go name on its C form. The comment of a type or function starts with Go: and the Go name that it maps to. See the Go API for those packages.
dmrgo.h
/* SPDX-License-Identifier: MIT */
/*
* dmrgo.h is the C API of libdmrgo, the dmrgo library
* (github.com/USA-RedDragon/dmrgo/v2) built as a shared library.
*
* dmrgo_gen.h, which this header includes, holds the C form of the whole
* library. Its functions return DMRGO_OK or a negative status and write
* their results to out pointers, also when they return an error. Outputs
* follow these rules:
*
* - A result array or string (T *out, size_t out_cap, size_t *out_len,
* size_t *out_need) gets what fits; *out_len is the count written and
* *out_need the count needed (for a string, the bytes with the NUL).
* - An append (T *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need)
* adds after the first *dst_len items. *dst_len is the fill: on return
* it is the new fill (also with an error, as Go returns the extended
* slice), and after DMRGO_ERR_SHORT it is unchanged. *dst_need is the
* fill that the call needs.
* - The strings and arrays inside output structs are copied, at call time,
* into the caller's arena (void *arena, size_t arena_cap, size_t
* *arena_len, size_t *arena_need). *arena_len is the fill, as for an
* append: the call adds after it, so pointers from earlier calls stay
* valid, and set it to 0 to reuse the arena. *arena_need is the fill the
* call needs, at any alignment of the arena. arena may be NULL with
* arena_cap 0 to ask for the size. Items are aligned for their type.
* Outputs of one call that hold the same Go data, such as one packet
* that a machine sends to every peer, share one copy in the arena.
* - When an output does not fit, the call returns DMRGO_ERR_SHORT and
* leaves every fill unchanged. A call on a handle has a _need function
* that gives the items and arena bytes the call can use for the same
* arguments, without a change to the handle. The call checks that room
* first: with less it returns DMRGO_ERR_SHORT before it runs, so the
* handle does not change. The comment of a call on a handle without a
* bound states that it has none. A call without a handle can be
* repeated, and it changes its in/out arguments only when it returns
* DMRGO_OK or a library error.
*
* Inputs follow these rules:
*
* - A const pointer is only read. A pointer that is not const and not an
* output is in/out: the call reads it and writes back what the Go call
* changed. Every input array and string is copied or used only during
* the call.
* - A NULL input pointer gives DMRGO_ERR_ARG, except where the comment of
* the function states that it may be NULL, which is a Go nil. An output
* pointer to a value, a count or a need may be NULL to drop that output.
* - A config, options or vtable struct whose first member is size_t size
* is sized: set size to sizeof the struct before the call, for example
* T cfg = {.size = sizeof cfg}. The library reads only the members that
* size covers and takes the rest as zero, so a struct can get members at
* its end without a new ABI version, and a program built against an
* older dmrgo_gen.h works with a newer library. A size below
* sizeof(size_t) gives DMRGO_ERR_ARG. A vtable method that size does not
* cover, or whose function is NULL, fails with DMRGO_ERR_NO_METHOD. A
* vtable function that returns a value other than DMRGO_OK and the
* statuses of this API fails the call with DMRGO_ERR_OTHER. Other
* structs, such as outputs, have a fixed layout.
* - Use a handle from one thread at a time. A handle that a call takes,
* such as the port of dmrgo_dvsi_new or the authenticator of a config,
* stays in use by the handle that the call makes: freeing the handle
* that was taken does not stop that use. The user value of a vtable or
* callback must stay valid until the handle made from it and every
* handle that took that handle or callback are freed.
* - A callback that gets an array, such as the bursts of
* dmrgo_rf_rx_config_t.on_bursts or the samples of
* dmrgo_rf_tx_config_t.on_samples, gets it in storage of the library
* that is valid only during the call: copy what it keeps.
* - libdmrgo runs the Go runtime, whose threads a child of fork() does not
* have, so a child process calls libdmrgo only after an exec.
*
* The ABI version: DMRGO_ABI_VERSION numbers the C ABI of libdmrgo. It is
* independent of the version of the Go module and changes only when a
* declaration changes in a way that breaks a program built against the
* older header, such as a removed function or a changed layout of a
* struct that is not sized. The soname of the library follows it:
* libdmrgo.so.1 for ABI version 1, and the symbols have the version node
* DMRGO_1. New functions, codes and members at the end of a sized struct
* keep the ABI version.
*/
#ifndef DMRGO_H
#define DMRGO_H
#include <stddef.h>
#include <stdint.h>
#include "dmrgo_gen.h"
#ifdef __cplusplus
extern "C" {
#endif
/* The status codes of the API. Errors are negative. */
enum dmrgo_status {
DMRGO_OK = 0,
/* A handle is NULL, freed or of another type. */
DMRGO_ERR_HANDLE = -1,
/* An argument is NULL or out of range: a fill over its capacity, a
* length over PTRDIFF_MAX or past the end of the address space, or a
* NULL pointer with a nonzero length. */
DMRGO_ERR_ARG = -2,
/* An output did not fit its buffer. The lengths give the full size;
* see the output rules above for the retry. */
DMRGO_ERR_SHORT = -3,
/* The library panicked. dmrgo_last_error_message gives the panic. */
DMRGO_ERR_PANIC = -4,
/* The library returned an error that has no status code of its own.
* dmrgo_last_error_message gives it. Codes from -100 down are the
* errors of the library, as dmrgo_gen.h defines them, grouped by
* package. A code keeps its number in every release with the same
* DMRGO_ABI_VERSION, and the number of a removed code is not used
* again. */
DMRGO_ERR_OTHER = -5,
/* An output passed the bound that the _need function of the call gave,
* which only an implementation in C of a Go interface can cause, such
* as a codec whose decode returns more than frame_samples() samples,
* or a port whose read or write gives a count past p_len. The call
* took effect, and the fills are unchanged. */
DMRGO_ERR_BOUND = -6,
/* A vtable has no function for a method that the library called: its
* size does not cover the method, or the function is NULL. */
DMRGO_ERR_NO_METHOD = -7
};
#ifndef DMRGO_NO_PROTOTYPES
/* dmrgo_abi_version returns DMRGO_ABI_VERSION of the library. The ABI
* version changes when a declaration of dmrgo.h or dmrgo_gen.h changes in a
* way that breaks a program built against an older one. */
int dmrgo_abi_version(void);
/* dmrgo_version writes the version of dmrgo that the library was built
* from: the v2 tag, as git describe gives it, when make builds it, else
* (devel) and the commit. libdmrgo has no version of its own beyond that
* and DMRGO_ABI_VERSION: the capi module is never tagged. */
int dmrgo_version(char *buf, size_t cap, size_t *len, size_t *need);
/* dmrgo_last_error_code returns the status code of the last error that a
* function returned on this thread, or DMRGO_OK. */
int dmrgo_last_error_code(void);
/* dmrgo_last_error_is sets *out when the last error that a function
* returned on this thread has the status code status, or wraps an error that
* has it, as Go errors.Is reports: a DMRGO_ERR_PACKET_MESSAGE_CRC error also
* is DMRGO_ERR_FEC_UNCORRECTABLE. It returns DMRGO_ERR_ARG for a NULL out
* and does not change the last error. */
int dmrgo_last_error_is(int status, bool *out);
/* dmrgo_last_error_message writes the message of the last error that a
* function returned on this thread, as a result string. The library keeps
* the first 511 bytes of a message; it returns DMRGO_ERR_SHORT when the
* message was cut there or does not fit cap, and DMRGO_ERR_ARG, with the last
* error kept, for a bad buf and cap. A function that succeeds does not clear
* it. */
int dmrgo_last_error_message(char *buf, size_t cap, size_t *len, size_t *need);
/* dmrgo_strerror returns a static message for a status code. */
const char *dmrgo_strerror(int status);
#endif
#ifdef __cplusplus
}
#endif
#endifdmrgo_gen.h
/* Code generated by go run ./internal/capigen/gen; DO NOT EDIT. */
#ifndef DMRGO_GEN_H
#define DMRGO_GEN_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#define DMRGO_ABI_VERSION 5
/* DMRGO_USER_T is the type of the user value of a callback or vtable. The library builds with uintptr_t, which has the same size and passing. */
#ifndef DMRGO_USER_T
#define DMRGO_USER_T void *
#endif
typedef struct dmrgo_complex64_t {
float re;
float im;
} dmrgo_complex64_t;
typedef struct dmrgo_complex128_t {
double re;
double im;
} dmrgo_complex128_t;
typedef struct dmrgo_string_t {
char *ptr;
size_t len;
} dmrgo_string_t;
/* dmrgo_duration_t is a time in nanoseconds. A now argument is the time since any fixed start, such as a monotonic clock. */
typedef int64_t dmrgo_duration_t;
/* Go: dmrgo.ConfigError. ConfigError is the error of a constructor, and of a machine method that takes a config, option or argument field, for a field with a value out of range. */
typedef struct dmrgo_config_error_t dmrgo_config_error_t;
/* Go: dmrgo.FieldRangeError. FieldRangeError is the error of an encoder or setter when a field value does not fit in its on-air bits, when a padding bit of a packed field is set, or for a coordinate or a narrowed integer when it is outside [Min, Max]. */
typedef struct dmrgo_field_range_error_t dmrgo_field_range_error_t;
/* Go: bs.CACH. CACH makes the CACH field that goes before each outbound burst: the TACT with the TC bit, the AT bit and the LCSS, and one fragment of a Short LC. */
typedef struct dmrgo_bs_cach_t dmrgo_bs_cach_t;
/* Go: bs.Config. Config configures New. */
typedef struct dmrgo_bs_config_t dmrgo_bs_config_t;
/* Go: bs.Output. Output is one result of a Repeater. */
typedef struct dmrgo_bs_output_t dmrgo_bs_output_t;
/* Go: bs.Repeater. Repeater is the base station of one carrier with two slots, as the package doc describes. */
typedef struct dmrgo_bs_repeater_t dmrgo_bs_repeater_t;
/* Go: bs.Source. Source is where an inbound burst came from. */
typedef struct dmrgo_bs_source_t dmrgo_bs_source_t;
/* Go: csbk.Match. Match describes the answer that ends a request of dmrgo_csbk_requester_request: a CSBK with feature set FID and one of the first N Opcodes, addressed from the target of the request to its source. */
typedef struct dmrgo_csbk_match_t dmrgo_csbk_match_t;
/* Go: csbk.Output. Output is one result of a machine. */
typedef struct dmrgo_csbk_output_t dmrgo_csbk_output_t;
/* Go: csbk.Preambles. Preambles follows the Pre_CSBKs of one logical channel. */
typedef struct dmrgo_csbk_preambles_t dmrgo_csbk_preambles_t;
/* Go: csbk.PreamblesConfig. PreamblesConfig configures NewPreambles. */
typedef struct dmrgo_csbk_preambles_config_t dmrgo_csbk_preambles_config_t;
/* Go: csbk.RequestOptions. RequestOptions are the per-request settings. */
typedef struct dmrgo_csbk_request_options_t dmrgo_csbk_request_options_t;
/* Go: csbk.Requester. Requester sends CSBK requests on one logical channel and waits for their answers, one request at a time, as the package doc describes. */
typedef struct dmrgo_csbk_requester_t dmrgo_csbk_requester_t;
/* Go: csbk.RequesterConfig. RequesterConfig configures NewRequester. */
typedef struct dmrgo_csbk_requester_config_t dmrgo_csbk_requester_config_t;
/* Go: csbk.Responder. Responder answers the CSBK requests that address one radio on one logical channel, as the package doc describes. */
typedef struct dmrgo_csbk_responder_t dmrgo_csbk_responder_t;
/* Go: csbk.ResponderConfig. ResponderConfig configures NewResponder. */
typedef struct dmrgo_csbk_responder_config_t dmrgo_csbk_responder_config_t;
/* Go: csbk.Timing. Timing runs the TDMA direct mode wide area timing of one radio: it gets the leader and the channel slot timing from the CT_CSBKs of other radios, elects and appoints a leader, propagates the leader beacon, answers requests and corrects radios with old timing, and beacons when it is the leader. */
typedef struct dmrgo_csbk_timing_t dmrgo_csbk_timing_t;
/* Go: csbk.TimingConfig. TimingConfig configures NewTiming. */
typedef struct dmrgo_csbk_timing_config_t dmrgo_csbk_timing_config_t;
/* Go: csbk.Wakeup. Wakeup is the MS side of the BS outbound activation: it sends BS_Dwn_Act with MS sourced SYNC, waits T_SyncWu for a BS sourced burst with the color code of the BS, and sends again up to N_Wakeup times. */
typedef struct dmrgo_csbk_wakeup_t dmrgo_csbk_wakeup_t;
/* Go: csbk.WakeupConfig. WakeupConfig configures NewWakeup. */
typedef struct dmrgo_csbk_wakeup_config_t dmrgo_csbk_wakeup_config_t;
/* Go: data.Call. Call is the parties of a data call. */
typedef struct dmrgo_data_call_t dmrgo_data_call_t;
/* Go: data.Event. Event is one result of a Receiver. */
typedef struct dmrgo_data_event_t dmrgo_data_event_t;
/* Go: data.Message. Message is one data packet: its header, rate and user data. */
typedef struct dmrgo_data_message_t dmrgo_data_message_t;
/* Go: data.Output. Output is one result of a Sender. */
typedef struct dmrgo_data_output_t dmrgo_data_output_t;
/* Go: data.Receiver. Receiver turns the bursts of one logical channel into data events: the start and end of a data call, each complete packet, the responses heard and the responses to send, as the package doc describes. */
typedef struct dmrgo_data_receiver_t dmrgo_data_receiver_t;
/* Go: data.ReceiverConfig. ReceiverConfig configures NewReceiver. */
typedef struct dmrgo_data_receiver_config_t dmrgo_data_receiver_config_t;
/* Go: data.Sender. Sender sends data messages on one logical channel: the preamble CSBKs, the header and the blocks of each try, one burst per Tick, 60 ms apart, after the channel access of dmrgo_data_sender_config_t.access. */
typedef struct dmrgo_data_sender_t dmrgo_data_sender_t;
/* Go: data.SenderConfig. SenderConfig configures NewSender. */
typedef struct dmrgo_data_sender_config_t dmrgo_data_sender_config_t;
/* Go: data.Stats. Stats counts what a Receiver saw during a data call. */
typedef struct dmrgo_data_stats_t dmrgo_data_stats_t;
/* Go: fec.BERCalculator. BERCalculator accumulates Results into an overall bit error rate. */
typedef struct dmrgo_fec_ber_calculator_t dmrgo_fec_ber_calculator_t;
/* Go: fec.BurstFECStats. BurstFECStats holds the FEC results of each layer of one DMR burst. */
typedef struct dmrgo_fec_burst_fec_stats_t dmrgo_fec_burst_fec_stats_t;
/* Go: fec.Result. Result is the outcome of one FEC decode or check step. */
typedef struct dmrgo_fec_result_t dmrgo_fec_result_t;
/* Go: hdap.GPSData. GPSData is the position of the location protocol: 40 ASCII octets that hold an NMEA-like fix. */
typedef struct dmrgo_hdap_gps_data_t dmrgo_hdap_gps_data_t;
/* Go: hdap.Header. Header is the first octet of a message. */
typedef struct dmrgo_hdap_header_t dmrgo_hdap_header_t;
/* Go: hdap.LPAnswer. LPAnswer is the payload of the answer to a standard request. */
typedef struct dmrgo_hdap_lp_answer_t dmrgo_hdap_lp_answer_t;
/* Go: hdap.LPEmergency. LPEmergency is the payload of an emergency report. */
typedef struct dmrgo_hdap_lp_emergency_t dmrgo_hdap_lp_emergency_t;
/* Go: hdap.LPReport. LPReport is the payload of a condition report: a position that the radio sends on a condition, such as a period. */
typedef struct dmrgo_hdap_lp_report_t dmrgo_hdap_lp_report_t;
/* Go: hdap.LPRequest. LPRequest is the payload of a location protocol standard request. */
typedef struct dmrgo_hdap_lp_request_t dmrgo_hdap_lp_request_t;
/* Go: hdap.Message. Message is a Hytera DMR Application Protocol (HDAP) message: the header, the opcode of the service, the payload, a checksum and the end octet 0x03. */
typedef struct dmrgo_hdap_message_t dmrgo_hdap_message_t;
/* Go: hdap.RRSAnswer. RRSAnswer is the payload of the answer to an RRS registration. */
typedef struct dmrgo_hdap_rrs_answer_t dmrgo_hdap_rrs_answer_t;
/* Go: hdap.RRSCheckAnswer. RRSCheckAnswer is the payload of the answer to an RRS online check. */
typedef struct dmrgo_hdap_rrs_check_answer_t dmrgo_hdap_rrs_check_answer_t;
/* Go: hdap.RRSRadio. RRSRadio is the payload of an RRS registration, deregistration and online check: the radio IP of the radio. */
typedef struct dmrgo_hdap_rrs_radio_t dmrgo_hdap_rrs_radio_t;
/* Go: hdap.TMPAnswer. TMPAnswer is the payload of the answer to a private text. */
typedef struct dmrgo_hdap_tmp_answer_t dmrgo_hdap_tmp_answer_t;
/* Go: hdap.TMPFlags. TMPFlags is the high octet of the opcode of a text message protocol (TMP) message. */
typedef struct dmrgo_hdap_tmp_flags_t dmrgo_hdap_tmp_flags_t;
/* Go: hdap.TMPGroupAnswer. TMPGroupAnswer is the payload of the answer to a group text. */
typedef struct dmrgo_hdap_tmp_group_answer_t dmrgo_hdap_tmp_group_answer_t;
/* Go: hdap.TMPMessage. TMPMessage is the payload of a TMP private or group text without an option field. */
typedef struct dmrgo_hdap_tmp_message_t dmrgo_hdap_tmp_message_t;
/* Go: ip.Datagram. Datagram is a UDP datagram of a DMR data packet, from an IPv4 header (SAP IP based packet data) or a compressed UDP/IPv4 header (SAP UDP/IP header compression). */
typedef struct dmrgo_ip_datagram_t dmrgo_ip_datagram_t;
/* Go: ip.ICMP. ICMP is an ICMP error message: the header and the start of the IPv4 packet that caused it (RFC 792). */
typedef struct dmrgo_ip_icmp_t dmrgo_ip_icmp_t;
/* Go: ip.ICMPHeader. ICMPHeader is the 8-octet header of an ICMP error message (RFC 792, RFC 1191 section 4). */
typedef struct dmrgo_ip_icmp_header_t dmrgo_ip_icmp_header_t;
/* Go: ip.ICMPPacket. ICMPPacket is an ICMP error message in an IPv4 packet, the user data of a packet with the SAP IP based packet data. */
typedef struct dmrgo_ip_icmp_packet_t dmrgo_ip_icmp_packet_t;
/* Go: ip.IPv4. IPv4 is an IPv4 packet: the header, its options and the payload, whose length the header gives (RFC 791 section 3.1). */
typedef struct dmrgo_ip_ipv4_t dmrgo_ip_ipv4_t;
/* Go: ip.IPv4Header. IPv4Header is the fixed 20-octet header of an IPv4 packet (RFC 791 section 3.1). */
typedef struct dmrgo_ip_ipv4_header_t dmrgo_ip_ipv4_header_t;
/* Go: ip.UDP. UDP is a UDP datagram: the header and the payload, whose length the header gives (RFC 768). */
typedef struct dmrgo_ip_udp_t dmrgo_ip_udp_t;
/* Go: ip.UDPHeader. UDPHeader is the 8-octet header of a UDP datagram (RFC 768). */
typedef struct dmrgo_ip_udp_header_t dmrgo_ip_udp_header_t;
/* Go: layer2.Burst. Burst represents a DMR burst. */
typedef struct dmrgo_layer2_burst_t dmrgo_layer2_burst_t;
/* Go: layer2.CACH. CACH is a decoded Common Announcement Channel field (ETSI TS 102 361-1 clause 6.3). */
typedef struct dmrgo_layer2_cach_t dmrgo_layer2_cach_t;
/* Go: layer2.Call. Call is the parties of the call that a burst belongs to, as a machine Output gives them to a transport: the source and destination of a DMRD, IPSC or Hytera packet and its group or unit to unit flag. */
typedef struct dmrgo_layer2_call_t dmrgo_layer2_call_t;
/* Go: layer2.Data. Data is the PDU that a data or control burst carries. */
typedef struct dmrgo_layer2_data_t dmrgo_layer2_data_t;
/* Go: layer2.DecodeOptions. DecodeOptions are receive-side settings for DecodeFromBytesWith. */
typedef struct dmrgo_layer2_decode_options_t dmrgo_layer2_decode_options_t;
/* Go: layer2.EmbeddedLCAssembler. EmbeddedLCAssembler collects the four embedded LC fragments of voice bursts B to E in the order of their LCSS, First, Continuation, Continuation and Last, and decodes the LC of each superframe of the call as EmbeddedLCConfirmer does. */
typedef struct dmrgo_layer2_embedded_lc_assembler_t dmrgo_layer2_embedded_lc_assembler_t;
/* Go: layer2.EmbeddedLCConfirmer. EmbeddedLCConfirmer decodes the embedded LCs of the superframes of one call. */
typedef struct dmrgo_layer2_embedded_lc_confirmer_t dmrgo_layer2_embedded_lc_confirmer_t;
/* Go: layer2.Hint. Hint is the data of a transport about a burst besides its 264 bits, such as the fields of a HomeBrew DMRD, IPSC or MMDVM frame. */
typedef struct dmrgo_layer2_hint_t dmrgo_layer2_hint_t;
typedef struct dmrgo_layer2_voice_transmitter_options_embedded_lc_fn_t dmrgo_layer2_voice_transmitter_options_embedded_lc_fn_t;
/* Go: layer2.PositionTracker. PositionTracker places the voice bursts of one logical channel in their superframe, packet by packet, as dmrgo_voice_receiver_t does: from the position in the Hint, the voice SYNC of burst A, the LCSS of the EMB of bursts B to F, and the sequence number of the Hint, or one step per burst without one. */
typedef struct dmrgo_layer2_position_tracker_t dmrgo_layer2_position_tracker_t;
/* Go: layer2.RawBurst. RawBurst is a 33-octet burst in transmit bit order, the form NewBurstFromBytes takes. */
typedef struct dmrgo_layer2_raw_burst_t dmrgo_layer2_raw_burst_t;
/* Go: layer2.ShortLCAssembler. ShortLCAssembler collects the signalling payloads of 4 CACHs and decodes the Short LC PDU they carry. */
typedef struct dmrgo_layer2_short_lc_assembler_t dmrgo_layer2_short_lc_assembler_t;
/* Go: layer2.VoiceReceiver. VoiceReceiver places the voice bursts of one logical channel in their superframe with a PositionTracker and reassembles the embedded Full LC of bursts B to E with an EmbeddedLCAssembler, by the rules of the package doc. */
typedef struct dmrgo_layer2_voice_receiver_t dmrgo_layer2_voice_receiver_t;
/* Go: layer2.VoiceTransmitter. VoiceTransmitter builds the bursts of one voice transmission from a stream of 72-bit vocoder slots. */
typedef struct dmrgo_layer2_voice_transmitter_t dmrgo_layer2_voice_transmitter_t;
/* Go: layer2.VoiceTransmitterOptions. VoiceTransmitterOptions configures NewVoiceTransmitter. */
typedef struct dmrgo_layer2_voice_transmitter_options_t dmrgo_layer2_voice_transmitter_options_t;
/* Go: framer.Burst. Burst is a burst cut from the stream. */
typedef struct dmrgo_framer_burst_t dmrgo_framer_burst_t;
/* Go: framer.Config. Config configures a Framer. */
typedef struct dmrgo_framer_config_t dmrgo_framer_config_t;
/* Go: framer.Framer. Framer cuts bursts out of a bit stream written to it in pieces of any number of bits, as the package doc describes. */
typedef struct dmrgo_framer_t dmrgo_framer_t;
/* Go: framer.Match. Match is a SYNC field found in a bit stream. */
typedef struct dmrgo_framer_match_t dmrgo_framer_match_t;
/* Go: packet.Assembler. Assembler collects the header and data blocks of one packet at a time on one channel and returns each packet with its message CRC checked. */
typedef struct dmrgo_packet_assembler_t dmrgo_packet_assembler_t;
/* Go: packet.Builder. Builder builds packets into storage that NewBuilder allocates once, so that it does not allocate. */
typedef struct dmrgo_packet_builder_t dmrgo_packet_builder_t;
/* Go: packet.Message. Message is a reassembled packet. */
typedef struct dmrgo_packet_message_t dmrgo_packet_message_t;
/* Go: packet.Packet. Packet is a header and the data blocks that follow it. */
typedef struct dmrgo_packet_t dmrgo_packet_t;
/* Go: packet.ResponseData. ResponseData is the selective retry bitmap of the C_RDATA PDU. */
typedef struct dmrgo_packet_response_data_t dmrgo_packet_response_data_t;
/* Go: pdu.AckInboundPDU. AckInboundPDU is the inbound acknowledgement (C_ACKU) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.2.3). */
typedef struct dmrgo_pdu_ack_inbound_pdu_t dmrgo_pdu_ack_inbound_pdu_t;
/* Go: pdu.AckInboundPayloadPDU. AckInboundPayloadPDU is the inbound payload acknowledgement (P_ACKU) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.4.2). */
typedef struct dmrgo_pdu_ack_inbound_payload_pdu_t dmrgo_pdu_ack_inbound_payload_pdu_t;
/* Go: pdu.AckOutboundPDU. AckOutboundPDU is the outbound acknowledgement (C_ACKD) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.7). */
typedef struct dmrgo_pdu_ack_outbound_pdu_t dmrgo_pdu_ack_outbound_pdu_t;
/* Go: pdu.AckOutboundPayloadPDU. AckOutboundPayloadPDU is the outbound payload acknowledgement (P_ACKD) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.3.5). */
typedef struct dmrgo_pdu_ack_outbound_payload_pdu_t dmrgo_pdu_ack_outbound_payload_pdu_t;
/* Go: pdu.AckvitationPDU. AckvitationPDU is the ackvitation (C_ACKVIT) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.2.2). */
typedef struct dmrgo_pdu_ackvitation_pdu_t dmrgo_pdu_ackvitation_pdu_t;
/* Go: pdu.AdjacentSiteParms. AdjacentSiteParms is the C_BCAST payload with AnnouncementType Adjacent_Site, which announces the TSCC of an adjacent site (ETSI TS 102 361-4 V1.12.1 clause 7.2.19.7, Table 7.79). */
typedef struct dmrgo_pdu_adjacent_site_parms_t dmrgo_pdu_adjacent_site_parms_t;
/* Go: pdu.AhoyPDU. AhoyPDU is the ahoy (C_AHOY and P_AHOY) CSBK payload (ETSI TS 102 361-4 clauses 7.1.1.1.6 and 7.1.1.3.4). */
typedef struct dmrgo_pdu_ahoy_pdu_t dmrgo_pdu_ahoy_pdu_t;
/* Go: pdu.AlohaPDU. AlohaPDU is the Aloha (C_ALOHA) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.4). */
typedef struct dmrgo_pdu_aloha_pdu_t dmrgo_pdu_aloha_pdu_t;
/* Go: pdu.AnnWDTSCCParms. AnnWDTSCCParms is the C_BCAST payload with AnnouncementType Ann_WD_TSCC, which adds up to two TSCCs to the hunt list or withdraws them (ETSI TS 102 361-4 clause 7.2.19.1, Table 7.69). */
typedef struct dmrgo_pdu_ann_wd_tscc_parms_t dmrgo_pdu_ann_wd_tscc_parms_t;
/* Go: pdu.BCAPContinuation. BCAPContinuation is the BC_AP continuation block of a C_BCAST MBC (ETSI TS 102 361-4 clause 7.1.1.1.5.1, Table 7.21). */
typedef struct dmrgo_pdu_bcap_continuation_t dmrgo_pdu_bcap_continuation_t;
/* Go: pdu.BSOutboundActivationPDU. BSOutboundActivationPDU is the BS outbound activation (BS_Dwn_Act) CSBK payload (ETSI TS 102 361-2 clause 7.1.2.1). */
typedef struct dmrgo_pdu_bs_outbound_activation_pdu_t dmrgo_pdu_bs_outbound_activation_pdu_t;
/* Go: pdu.BroadcastPDU. BroadcastPDU is the announcement (C_BCAST) CSBK payload. */
typedef struct dmrgo_pdu_broadcast_pdu_t dmrgo_pdu_broadcast_pdu_t;
/* Go: pdu.BroadcastTalkgroupVoiceGrantPDU. BroadcastTalkgroupVoiceGrantPDU is the broadcast talkgroup voice channel grant (BTV_GRANT) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.1). */
typedef struct dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_t dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_t;
/* Go: pdu.CGAPContinuation. CGAPContinuation is the CG_AP continuation block of a grant MBC (ETSI TS 102 361-4 clause 7.1.1.1.2, Table 7.16). */
typedef struct dmrgo_pdu_cgap_continuation_t dmrgo_pdu_cgap_continuation_t;
/* Go: pdu.CSBK. CSBK is the Control Signalling Block (CSBK) PDU. */
typedef struct dmrgo_pdu_csbk_t dmrgo_pdu_csbk_t;
/* Go: pdu.CSBKBytes. CSBKBytes is the 12-octet BPTC(196,96) payload of a CSBK burst, as dmrgo_layer2_raw_burst_bptc_payload returns it: 80 CSBK bits and the CRC-CCITT XORed with the CSBK mask 0xA5A5. */
typedef struct dmrgo_pdu_csbk_bytes_t dmrgo_pdu_csbk_bytes_t;
/* Go: pdu.CallTimerParms. CallTimerParms is the C_BCAST payload with AnnouncementType CallTimer_Parms, which sets the call timers of the MSs. */
typedef struct dmrgo_pdu_call_timer_parms_t dmrgo_pdu_call_timer_parms_t;
/* Go: pdu.CapacityPlusActivity. CapacityPlusActivity is the channel activity of a Capacity Plus site status: the rest LSN, and per LSN the talkgroup of a group call or the radio of a private voice or data call. */
typedef struct dmrgo_pdu_capacity_plus_activity_t dmrgo_pdu_capacity_plus_activity_t;
/* Go: pdu.CapacityPlusDataRevertAnnouncementPDU. CapacityPlusDataRevertAnnouncementPDU is the payload of the MOTOTRBO enhanced data revert window announcement CSBK (FID 0x10, opcode 0x29). */
typedef struct dmrgo_pdu_capacity_plus_data_revert_announcement_pdu_t dmrgo_pdu_capacity_plus_data_revert_announcement_pdu_t;
/* Go: pdu.CapacityPlusDataRevertGrantPDU. CapacityPlusDataRevertGrantPDU is the payload of the MOTOTRBO enhanced data revert window grant CSBK (FID 0x10, opcode 0x2A). */
typedef struct dmrgo_pdu_capacity_plus_data_revert_grant_pdu_t dmrgo_pdu_capacity_plus_data_revert_grant_pdu_t;
/* Go: pdu.CapacityPlusGroupVoiceGrant. CapacityPlusGroupVoiceGrant is the payload of the Capacity Plus group voice call grant Full LC (FID 0x10, FLCO 4): LC bits 16 to 71. */
typedef struct dmrgo_pdu_capacity_plus_group_voice_grant_t dmrgo_pdu_capacity_plus_group_voice_grant_t;
/* Go: pdu.CapacityPlusNeighborsPDU. CapacityPlusNeighborsPDU is the payload of the Linked Capacity Plus neighbor report CSBK (FID 0x10, opcode 0x3B): the site number and the rest LSN of up to 6 neighbor sites. */
typedef struct dmrgo_pdu_capacity_plus_neighbors_pdu_t dmrgo_pdu_capacity_plus_neighbors_pdu_t;
/* Go: pdu.CapacityPlusPreamblePDU. CapacityPlusPreamblePDU is the payload of the Capacity Plus preamble CSBK (FID 0x10, opcode 0x3D). */
typedef struct dmrgo_pdu_capacity_plus_preamble_pdu_t dmrgo_pdu_capacity_plus_preamble_pdu_t;
/* Go: pdu.CapacityPlusPrivateVoiceGrant. CapacityPlusPrivateVoiceGrant is the payload of the Capacity Plus private voice call grant Full LC (FID 0x10, FLCO 7): LC bits 16 to 71. */
typedef struct dmrgo_pdu_capacity_plus_private_voice_grant_t dmrgo_pdu_capacity_plus_private_voice_grant_t;
/* Go: pdu.CapacityPlusRestChannel. CapacityPlusRestChannel is the payload of the Capacity Plus rest channel Short LC (SLCO 15): Short LC bits 4 to 27. */
typedef struct dmrgo_pdu_capacity_plus_rest_channel_t dmrgo_pdu_capacity_plus_rest_channel_t;
/* Go: pdu.CapacityPlusSiteStatusAssembler. CapacityPlusSiteStatusAssembler joins the blocks of a Capacity Plus site status and decodes its activity. */
typedef struct dmrgo_pdu_capacity_plus_site_status_assembler_t dmrgo_pdu_capacity_plus_site_status_assembler_t;
/* Go: pdu.CapacityPlusSiteStatusPDU. CapacityPlusSiteStatusPDU is one block of the Capacity Plus site status CSBK (FID 0x10, opcode 0x3E). */
typedef struct dmrgo_pdu_capacity_plus_site_status_pdu_t dmrgo_pdu_capacity_plus_site_status_pdu_t;
/* Go: pdu.ChanFreqParms. ChanFreqParms is the C_BCAST header payload with AnnouncementType Chan_Freq, which announces the frequencies of a channel number in the CdefParms of the BC_AP block that follows (ETSI TS 102 361-4 V1.12.1 clause 7.2.19.6, Table 7.78). */
typedef struct dmrgo_pdu_chan_freq_parms_t dmrgo_pdu_chan_freq_parms_t;
/* Go: pdu.ChannelTimingPDU. ChannelTimingPDU is the channel timing (CT_CSBK) CSBK payload (ETSI TS 102 361-2 clause 7.1.2.6, Table 7.8). */
typedef struct dmrgo_pdu_channel_timing_pdu_t dmrgo_pdu_channel_timing_pdu_t;
/* Go: pdu.ClearPDU. ClearPDU is the clear (P_CLEAR) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.3.2). */
typedef struct dmrgo_pdu_clear_pdu_t dmrgo_pdu_clear_pdu_t;
/* Go: pdu.ConfirmedDataHeader. ConfirmedDataHeader is the confirmed data header (C_HEAD) (ETSI TS 102 361-1 clause 9.2.1, Table 9.10). */
typedef struct dmrgo_pdu_confirmed_data_header_t dmrgo_pdu_confirmed_data_header_t;
/* Go: pdu.DataHeader. DataHeader is the data header PDU. */
typedef struct dmrgo_pdu_data_header_t dmrgo_pdu_data_header_t;
/* Go: pdu.DataHeaderBytes. DataHeaderBytes is the 12-octet BPTC(196,96) payload of a data header burst, as dmrgo_layer2_raw_burst_bptc_payload returns it. */
typedef struct dmrgo_pdu_data_header_bytes_t dmrgo_pdu_data_header_bytes_t;
/* Go: pdu.DefinedDataHeader. DefinedDataHeader is the defined data header (DD_HEAD) (ETSI TS 102 361-1 clause 9.2.12, Table 9.17C). */
typedef struct dmrgo_pdu_defined_data_header_t dmrgo_pdu_defined_data_header_t;
/* Go: pdu.DuplexPrivateDataGrantPDU. DuplexPrivateDataGrantPDU is the duplex private data channel grant (PD_GRANT_DX) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.1). */
typedef struct dmrgo_pdu_duplex_private_data_grant_pdu_t dmrgo_pdu_duplex_private_data_grant_pdu_t;
/* Go: pdu.DuplexPrivateVoiceGrantPDU. DuplexPrivateVoiceGrantPDU is the duplex private voice channel grant (PV_GRANT_DX) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.1). */
typedef struct dmrgo_pdu_duplex_private_voice_grant_pdu_t dmrgo_pdu_duplex_private_voice_grant_pdu_t;
/* Go: pdu.EmbeddedSignalling. EmbeddedSignalling is the embedded signalling (EMB) PDU (ETSI TS 102 361-1 clause 9.1.2). */
typedef struct dmrgo_pdu_embedded_signalling_t dmrgo_pdu_embedded_signalling_t;
/* Go: pdu.FLCGPSInfo. FLCGPSInfo is the GPS information (GPS_Info) Full LC payload (ETSI TS 102 361-2 clause 7.1.1.3, Table 7.3). */
typedef struct dmrgo_pdu_flc_gps_info_t dmrgo_pdu_flc_gps_info_t;
/* Go: pdu.FLCGroupVoice. FLCGroupVoice is the group voice channel user (Grp_V_Ch_Usr) Full LC payload (ETSI TS 102 361-2 clause 7.1.1.1, Table 7.1). */
typedef struct dmrgo_pdu_flc_group_voice_t dmrgo_pdu_flc_group_voice_t;
/* Go: pdu.FLCTalkerAliasBlock. FLCTalkerAliasBlock is a talker alias block (Talker_Alias_BLK) Full LC payload (ETSI TS 102 361-2 clause 7.1.1.5, Table 7.5). */
typedef struct dmrgo_pdu_flc_talker_alias_block_t dmrgo_pdu_flc_talker_alias_block_t;
/* Go: pdu.FLCTalkerAliasHeader. FLCTalkerAliasHeader is the talker alias header information (Talker_Alias_HDR) Full LC payload (ETSI TS 102 361-2 clause 7.1.1.4, Table 7.4). */
typedef struct dmrgo_pdu_flc_talker_alias_header_t dmrgo_pdu_flc_talker_alias_header_t;
/* Go: pdu.FLCTerminatorDataLinkControl. FLCTerminatorDataLinkControl is the terminator data link control Full LC payload (ETSI TS 102 361-3 clause 7.1.1.1, Table 7.1). */
typedef struct dmrgo_pdu_flc_terminator_data_link_control_t dmrgo_pdu_flc_terminator_data_link_control_t;
/* Go: pdu.FLCUnitToUnit. FLCUnitToUnit is the unit to unit voice channel user (UU_V_Ch_Usr) Full LC payload (ETSI TS 102 361-2 clause 7.1.1.2, Table 7.2). */
typedef struct dmrgo_pdu_flc_unit_to_unit_t dmrgo_pdu_flc_unit_to_unit_t;
/* Go: pdu.FullLinkControl. FullLinkControl is the Full Link Control (Full LC) PDU. */
typedef struct dmrgo_pdu_full_link_control_t dmrgo_pdu_full_link_control_t;
/* Go: pdu.GenSiteParms. GenSiteParms is the C_BCAST payload with AnnouncementType Gen_Site_Params, which broadcasts the current site information and the network information (ETSI TS 102 361-4 V1.12.1 clauses 7.2.19.8, 7.2.40 and 7.2.41, Tables 7.80, 7.101 and 7.102). */
typedef struct dmrgo_pdu_gen_site_parms_t dmrgo_pdu_gen_site_parms_t;
/* Go: pdu.LCBytes. LCBytes is the 72 LC bits of a Full LC without RS(12,9) parity, as dmrgo_pdu_full_link_control_bytes returns them. */
typedef struct dmrgo_pdu_lc_bytes_t dmrgo_pdu_lc_bytes_t;
/* Go: pdu.LocalTimeParms. LocalTimeParms is the C_BCAST payload with AnnouncementType Local_Time, which broadcasts the local date and time and the offset from UTC (ETSI TS 102 361-4 clause 7.2.19.4, Tables 7.73 to 7.75). */
typedef struct dmrgo_pdu_local_time_parms_t dmrgo_pdu_local_time_parms_t;
/* Go: pdu.MBCContinuation. MBCContinuation is a continuation block of a Multi Block Control (MBC) PDU. */
typedef struct dmrgo_pdu_mbc_continuation_t dmrgo_pdu_mbc_continuation_t;
/* Go: pdu.MBCHeader. MBCHeader is the header block of a Multi Block Control (MBC) PDU. */
typedef struct dmrgo_pdu_mbc_header_t dmrgo_pdu_mbc_header_t;
/* Go: pdu.MVAPContinuation. MVAPContinuation is the MV_AP continuation block of a C_MOVE MBC (ETSI TS 102 361-4 clause 7.1.1.1.3.1, Table 7.18). */
typedef struct dmrgo_pdu_mvap_continuation_t dmrgo_pdu_mvap_continuation_t;
/* Go: pdu.MaintenancePDU. MaintenancePDU is the maintenance (P_MAINT) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.4.3). */
typedef struct dmrgo_pdu_maintenance_pdu_t dmrgo_pdu_maintenance_pdu_t;
/* Go: pdu.MassRegParms. MassRegParms is the C_BCAST payload with AnnouncementType MassReg, which requests the MSs that match Address and AlohaMask to register within the registration window (ETSI TS 102 361-4 clause 7.2.19.5, Tables 7.76 and 7.77). */
typedef struct dmrgo_pdu_mass_reg_parms_t dmrgo_pdu_mass_reg_parms_t;
/* Go: pdu.MotorolaCallAlertAckPDU. MotorolaCallAlertAckPDU is the payload of the Motorola call alert acknowledgement CSBK (FID 0x10, opcode 0x20) that the alerted radio sends back. */
typedef struct dmrgo_pdu_motorola_call_alert_ack_pdu_t dmrgo_pdu_motorola_call_alert_ack_pdu_t;
/* Go: pdu.MotorolaCallAlertPDU. MotorolaCallAlertPDU is the payload of a Motorola call alert CSBK (FID 0x10, opcode 0x1F), which makes the target radio alert its user. */
typedef struct dmrgo_pdu_motorola_call_alert_pdu_t dmrgo_pdu_motorola_call_alert_pdu_t;
/* Go: pdu.MotorolaRadioCheckPDU. MotorolaRadioCheckPDU is the payload of a Motorola radio check CSBK (FID 0x10, opcode 0x24). */
typedef struct dmrgo_pdu_motorola_radio_check_pdu_t dmrgo_pdu_motorola_radio_check_pdu_t;
/* Go: pdu.MovePDU. MovePDU is the move (C_MOVE) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.3). */
typedef struct dmrgo_pdu_move_pdu_t dmrgo_pdu_move_pdu_t;
/* Go: pdu.NegativeAcknowledgementPDU. NegativeAcknowledgementPDU is the negative acknowledgement response (NACK_Rsp) CSBK payload (ETSI TS 102 361-2 clause 7.1.2.4). */
typedef struct dmrgo_pdu_negative_acknowledgement_pdu_t dmrgo_pdu_negative_acknowledgement_pdu_t;
/* Go: pdu.PIHeader. PIHeader is the Privacy Indicator (PI) header. */
typedef struct dmrgo_pdu_pi_header_t dmrgo_pdu_pi_header_t;
/* Go: pdu.PRFill. PRFill is the Pseudo Random Fill Bit (PR FILL) PDU of an idle burst, the 96 fixed bits of Table D.2 (ETSI TS 102 361-1 clause 9.1.9). */
typedef struct dmrgo_pdu_pr_fill_t dmrgo_pdu_pr_fill_t;
/* Go: pdu.PreamblePDU. PreamblePDU is the preamble (Pre) CSBK payload (ETSI TS 102 361-2 clause 7.1.2.5). */
typedef struct dmrgo_pdu_preamble_pdu_t dmrgo_pdu_preamble_pdu_t;
/* Go: pdu.PrivateDataGrantMultiItemPDU. PrivateDataGrantMultiItemPDU is the multi-item private data channel grant (PD_GRANT_MI) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.1). */
typedef struct dmrgo_pdu_private_data_grant_multi_item_pdu_t dmrgo_pdu_private_data_grant_multi_item_pdu_t;
/* Go: pdu.PrivateDataGrantPDU. PrivateDataGrantPDU is the private data channel grant (PD_GRANT) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.1). */
typedef struct dmrgo_pdu_private_data_grant_pdu_t dmrgo_pdu_private_data_grant_pdu_t;
/* Go: pdu.PrivateVoiceGrantPDU. PrivateVoiceGrantPDU is the private voice channel grant (PV_GRANT) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.1). */
typedef struct dmrgo_pdu_private_voice_grant_pdu_t dmrgo_pdu_private_voice_grant_pdu_t;
/* Go: pdu.ProprietaryHeader. ProprietaryHeader is the proprietary data header (P_HEAD) (ETSI TS 102 361-1 clause 9.2.9, Table 9.17). */
typedef struct dmrgo_pdu_proprietary_header_t dmrgo_pdu_proprietary_header_t;
/* Go: pdu.ProtectPDU. ProtectPDU is the protect (P_PROTECT) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.3.3). */
typedef struct dmrgo_pdu_protect_pdu_t dmrgo_pdu_protect_pdu_t;
/* Go: pdu.RandomAccessPDU. RandomAccessPDU is the random access (C_RAND) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.2.1). */
typedef struct dmrgo_pdu_random_access_pdu_t dmrgo_pdu_random_access_pdu_t;
/* Go: pdu.Rate12Data. Rate12Data is a rate 1/2 coded packet data block (R_1_2_DATA). */
typedef struct dmrgo_pdu_rate12_data_t dmrgo_pdu_rate12_data_t;
/* Go: pdu.Rate1Data. Rate1Data is a rate 1 coded packet data block (R_1_DATA). */
typedef struct dmrgo_pdu_rate1_data_t dmrgo_pdu_rate1_data_t;
/* Go: pdu.Rate34Data. Rate34Data is a rate 3/4 coded packet data block (R_3_4_DATA). */
typedef struct dmrgo_pdu_rate34_data_t dmrgo_pdu_rate34_data_t;
/* Go: pdu.RawDataHeader. RawDataHeader is the raw data header (R_HEAD), used when AppendedBlocks is not 0 (ETSI TS 102 361-1 clause 9.2.11, Table 9.17B). */
typedef struct dmrgo_pdu_raw_data_header_t dmrgo_pdu_raw_data_header_t;
/* Go: pdu.ResponsePacketHeader. ResponsePacketHeader is the response packet header (C_RHEAD) (ETSI TS 102 361-1 clause 9.2.4, Table 9.13). */
typedef struct dmrgo_pdu_response_packet_header_t dmrgo_pdu_response_packet_header_t;
/* Go: pdu.ReverseChannel. ReverseChannel is the Reverse Channel (RC) PDU: 4 information bits and a CRC-7 masked with DMRGO_PDU_CRC7_MASK_RC, carried in Single Burst BPTC (ETSI TS 102 361-1 clause 9.1.5). */
typedef struct dmrgo_pdu_reverse_channel_t dmrgo_pdu_reverse_channel_t;
/* Go: pdu.ShortLC. ShortLC is the Short Link Control (Short LC) PDU. */
typedef struct dmrgo_pdu_short_lc_t dmrgo_pdu_short_lc_t;
/* Go: pdu.ShortLCActivityUpdate. ShortLCActivityUpdate is the Activity Update Short LC payload (ETSI TS 102 361-2 clause 7.1.3.2). */
typedef struct dmrgo_pdu_short_lc_activity_update_t dmrgo_pdu_short_lc_activity_update_t;
/* Go: pdu.ShortLCCSysParms. ShortLCCSysParms is the C_SYS_Parms Short LC payload. */
typedef struct dmrgo_pdu_short_lc_c_sys_parms_t dmrgo_pdu_short_lc_c_sys_parms_t;
/* Go: pdu.ShortLCNullMessage. ShortLCNullMessage is the Null Message Short LC payload (ETSI TS 102 361-2 clause 7.1.3.1). */
typedef struct dmrgo_pdu_short_lc_null_message_t dmrgo_pdu_short_lc_null_message_t;
/* Go: pdu.ShortLCPSysParms. ShortLCPSysParms is the P_SYS_Parms Short LC payload. */
typedef struct dmrgo_pdu_short_lc_p_sys_parms_t dmrgo_pdu_short_lc_p_sys_parms_t;
/* Go: pdu.SlotType. SlotType is the slot type (SLOT) PDU (ETSI TS 102 361-1 clause 9.1.3). */
typedef struct dmrgo_pdu_slot_type_t dmrgo_pdu_slot_type_t;
/* Go: pdu.StatusPrecodedHeader. StatusPrecodedHeader is the status or precoded data header (SP_HEAD), which has no appended blocks (ETSI TS 102 361-1 clause 9.2.10, Table 9.17A). */
typedef struct dmrgo_pdu_status_precoded_header_t dmrgo_pdu_status_precoded_header_t;
/* Go: pdu.SysCode. SysCode is the 16-bit C_SYScode: MODEL (2 bits), NET and SITE (12 bits split by MODEL), then PAR (2 bits). */
typedef struct dmrgo_pdu_sys_code_t dmrgo_pdu_sys_code_t;
/* Go: pdu.TACT. TACT is the TDMA Access Channel Type PDU. */
typedef struct dmrgo_pdu_tact_t dmrgo_pdu_tact_t;
/* Go: pdu.TalkerAliasAssembler. TalkerAliasAssembler collects Talker Alias header and block LCs in any order and decodes the alias once the header and all its blocks are present. */
typedef struct dmrgo_pdu_talker_alias_assembler_t dmrgo_pdu_talker_alias_assembler_t;
/* Go: pdu.TalkgroupDataGrantMultiItemPDU. TalkgroupDataGrantMultiItemPDU is the multi-item talkgroup data channel grant (TD_GRANT_MI) CSBK and MBC header payload. */
typedef struct dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_t dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_t;
/* Go: pdu.TalkgroupDataGrantPDU. TalkgroupDataGrantPDU is the talkgroup data channel grant (TD_GRANT) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.1). */
typedef struct dmrgo_pdu_talkgroup_data_grant_pdu_t dmrgo_pdu_talkgroup_data_grant_pdu_t;
/* Go: pdu.TalkgroupVoiceGrantPDU. TalkgroupVoiceGrantPDU is the talkgroup voice channel grant (TV_GRANT) CSBK payload (ETSI TS 102 361-4 clause 7.1.1.1.1). */
typedef struct dmrgo_pdu_talkgroup_voice_grant_pdu_t dmrgo_pdu_talkgroup_voice_grant_pdu_t;
/* Go: pdu.UDPIPv4CompressedHeader. UDPIPv4CompressedHeader is the compressed UDP/IPv4 header. */
typedef struct dmrgo_pdu_udp_ipv4_compressed_header_t dmrgo_pdu_udp_ipv4_compressed_header_t;
/* Go: pdu.UDTHeader. UDTHeader is the UDT data header (UDT_HEAD). */
typedef struct dmrgo_pdu_udt_header_t dmrgo_pdu_udt_header_t;
/* Go: pdu.UnconfirmedDataHeader. UnconfirmedDataHeader is the unconfirmed data header (U_HEAD) (ETSI TS 102 361-1 clause 9.2.6). */
typedef struct dmrgo_pdu_unconfirmed_data_header_t dmrgo_pdu_unconfirmed_data_header_t;
/* Go: pdu.UnifiedSingleBlockData. UnifiedSingleBlockData is a Unified Single Block Data (USBD) PDU (ETSI TS 102 361-1 clause 8.2.3.1). */
typedef struct dmrgo_pdu_unified_single_block_data_t dmrgo_pdu_unified_single_block_data_t;
/* Go: pdu.UnitToUnitVoiceServiceAnswerResponsePDU. UnitToUnitVoiceServiceAnswerResponsePDU is the unit to unit voice service answer response (UU_Ans_Rsp) CSBK payload (ETSI TS 102 361-2 clause 7.1.2.3). */
typedef struct dmrgo_pdu_unit_to_unit_voice_service_answer_response_pdu_t dmrgo_pdu_unit_to_unit_voice_service_answer_response_pdu_t;
/* Go: pdu.UnitToUnitVoiceServiceRequestPDU. UnitToUnitVoiceServiceRequestPDU is the unit to unit voice service request (UU_V_Req) CSBK payload (ETSI TS 102 361-2 clause 7.1.2.2). */
typedef struct dmrgo_pdu_unit_to_unit_voice_service_request_pdu_t dmrgo_pdu_unit_to_unit_voice_service_request_pdu_t;
/* Go: pdu.VNAPContinuation. VNAPContinuation is the VN_AP continuation block of a C_BCAST Vote_Now MBC (ETSI TS 102 361-4 clause 7.2.19.3.1, Table 7.72). */
typedef struct dmrgo_pdu_vnap_continuation_t dmrgo_pdu_vnap_continuation_t;
/* Go: pdu.VoteNowParms. VoteNowParms is the C_BCAST payload with AnnouncementType Vote_Now, which requests the MSs to assess a TSCC. */
typedef struct dmrgo_pdu_vote_now_parms_t dmrgo_pdu_vote_now_parms_t;
/* Go: layer3.CdefParms. CdefParms is the Channel Definition Parameters (Cdeftype 0) information element, which carries the absolute TX and RX frequencies in 58 bits. */
typedef struct dmrgo_layer3_cdef_parms_t dmrgo_layer3_cdef_parms_t;
/* Go: layer3.DataServiceOptions. DataServiceOptions is the 7-bit Service_Options of a Tier III packet data service request, with Field and an Of function as for VoiceServiceOptions. */
typedef struct dmrgo_layer3_data_service_options_t dmrgo_layer3_data_service_options_t;
/* Go: layer3.DiversionServiceOptions. DiversionServiceOptions is the 7-bit Service_Options of a Tier III call diversion request, with Field and an Of function as for VoiceServiceOptions. */
typedef struct dmrgo_layer3_diversion_service_options_t dmrgo_layer3_diversion_service_options_t;
/* Go: layer3.PollingServiceOptions. PollingServiceOptions is the 7-bit Service_Options of a Tier III UDT short data polling request, with Field and an Of function as for VoiceServiceOptions. */
typedef struct dmrgo_layer3_polling_service_options_t dmrgo_layer3_polling_service_options_t;
/* Go: layer3.RegistrationServiceOptions. RegistrationServiceOptions is the 7-bit Service_Options of a Tier III registration request, with Field and an Of function as for VoiceServiceOptions (ETSI TS 102 361-4 clause 7.2.13.4, Table 7.55). */
typedef struct dmrgo_layer3_registration_service_options_t dmrgo_layer3_registration_service_options_t;
/* Go: layer3.ServiceOptions. ServiceOptions is the Service Options information element (ETSI TS 102 361-2 clause 7.2.1). */
typedef struct dmrgo_layer3_service_options_t dmrgo_layer3_service_options_t;
/* Go: layer3.ShortDataServiceOptions. ShortDataServiceOptions is the 7-bit Service_Options of a Tier III UDT short data or DGNA request, with Field and an Of function as for VoiceServiceOptions. */
typedef struct dmrgo_layer3_short_data_service_options_t dmrgo_layer3_short_data_service_options_t;
/* Go: layer3.StatusServiceOptions. StatusServiceOptions is the 7-bit Service_Options of a Tier III status transport request, with Field and an Of function as for VoiceServiceOptions. */
typedef struct dmrgo_layer3_status_service_options_t dmrgo_layer3_status_service_options_t;
/* Go: layer3.VoiceServiceOptions. VoiceServiceOptions is the 7-bit Service_Options of a Tier III voice service request, such as a C_RAND for a talkgroup or individual voice call. */
typedef struct dmrgo_layer3_voice_service_options_t dmrgo_layer3_voice_service_options_t;
/* Go: lip.Element. Element is a type 5 information element of a LIP PDU, as NextElement finds it: its identifier and where its data lies in the PDU. */
typedef struct dmrgo_lip_element_t dmrgo_lip_element_t;
/* Go: lip.EnableDisable. EnableDisable is the LOCATION REPORTING ENABLE/DISABLE REQUEST or RESPONSE PDU, which every MS that supports LIP handles. */
typedef struct dmrgo_lip_enable_disable_t dmrgo_lip_enable_disable_t;
/* Go: lip.Header. Header is the start of a LIP PDU: the PDU type and, for PDU type 1, the PDU type extension and the request/response bit. */
typedef struct dmrgo_lip_header_t dmrgo_lip_header_t;
/* Go: lip.ImmediateRequest. ImmediateRequest is the IMMEDIATE LOCATION REPORT REQUEST PDU. */
typedef struct dmrgo_lip_immediate_request_t dmrgo_lip_immediate_request_t;
/* Go: lip.Location. Location is the location data of a long location report: the shape and the fields that it codes. */
typedef struct dmrgo_lip_location_t dmrgo_lip_location_t;
/* Go: lip.LongReport. LongReport is the LONG LOCATION REPORT PDU: the time, location and velocity data and the additional data. */
typedef struct dmrgo_lip_long_report_t dmrgo_lip_long_report_t;
/* Go: lip.ReportAck. ReportAck is the LOCATION REPORT ACKNOWLEDGEMENT PDU, the answer to a LongReport with AckRequested. */
typedef struct dmrgo_lip_report_ack_t dmrgo_lip_report_ack_t;
/* Go: lip.Time. Time is the time data of a long location report: the time elapsed since the position was found, or the time of the position. */
typedef struct dmrgo_lip_time_t dmrgo_lip_time_t;
/* Go: lip.Velocity. Velocity is the velocity data of a long location report: the velocity type and the fields that it codes. */
typedef struct dmrgo_lip_velocity_t dmrgo_lip_velocity_t;
/* Go: location.Decoder. Decoder decodes positions. */
typedef struct dmrgo_location_decoder_t dmrgo_location_decoder_t;
/* Go: location.Fix. Fix is a position that a radio reported. */
typedef struct dmrgo_location_fix_t dmrgo_location_fix_t;
/* Go: location.Header. Header holds the data header that AppendPacket builds. */
typedef struct dmrgo_location_header_t dmrgo_location_header_t;
/* Go: ars.Header. Header is the first header octet of a message. */
typedef struct dmrgo_ars_header_t dmrgo_ars_header_t;
/* Go: ars.Message. Message is a MOTOTRBO Automatic Registration Service message, the payload of a UDP datagram to port 4005. */
typedef struct dmrgo_ars_message_t dmrgo_ars_message_t;
/* Go: ars.Registration. Registration is the second header octet of a registration. */
typedef struct dmrgo_ars_registration_t dmrgo_ars_registration_t;
/* Go: ars.Response. Response is the second header octet of an answer. */
typedef struct dmrgo_ars_response_t dmrgo_ars_response_t;
/* Go: lrrp.Circle2D. Circle2D is a position with its accuracy (token 0x51). */
typedef struct dmrgo_lrrp_circle2d_t dmrgo_lrrp_circle2d_t;
/* Go: lrrp.Circle3D. Circle3D is a position with an altitude and the accuracy of both (token 0x55). */
typedef struct dmrgo_lrrp_circle3d_t dmrgo_lrrp_circle3d_t;
/* Go: lrrp.Circle3DWhole. Circle3DWhole is a position with an altitude and the accuracy of both, in whole meters (token 0x53), which radios in Buenos Aires send in place of Circle3D. */
typedef struct dmrgo_lrrp_circle3d_whole_t dmrgo_lrrp_circle3d_whole_t;
/* Go: lrrp.Message. Message is a MOTOTRBO Location Request and Response Protocol message, the payload of a UDP datagram to port 4001. */
typedef struct dmrgo_lrrp_message_t dmrgo_lrrp_message_t;
/* Go: lrrp.OperationError. OperationError is the result of a request that failed, with its text (token 0x39). */
typedef struct dmrgo_lrrp_operation_error_t dmrgo_lrrp_operation_error_t;
/* Go: lrrp.Point2D. Point2D is a position (token 0x66). */
typedef struct dmrgo_lrrp_point2d_t dmrgo_lrrp_point2d_t;
/* Go: lrrp.Point3D. Point3D is a position with an altitude (token 0x69). */
typedef struct dmrgo_lrrp_point3d_t dmrgo_lrrp_point3d_t;
/* Go: lrrp.Point3DAccuracy. Point3DAccuracy is a position with an altitude and its accuracy (token 0x6A). */
typedef struct dmrgo_lrrp_point3d_accuracy_t dmrgo_lrrp_point3d_accuracy_t;
/* Go: lrrp.Point3DWhole. Point3DWhole is a position with an altitude in whole meters (token 0x67), which radios in Buenos Aires send in place of Point3D. */
typedef struct dmrgo_lrrp_point3d_whole_t dmrgo_lrrp_point3d_whole_t;
/* Go: lrrp.Report. Report holds the tokens of a report or an answer. */
typedef struct dmrgo_lrrp_report_t dmrgo_lrrp_report_t;
/* Go: lrrp.Request. Request holds the tokens of a request. */
typedef struct dmrgo_lrrp_request_t dmrgo_lrrp_request_t;
/* Go: lrrp.Time. Time is the UTC time of a position (token 0x34). */
typedef struct dmrgo_lrrp_time_t dmrgo_lrrp_time_t;
/* Go: tms.Header. Header is the first header octet of a message. */
typedef struct dmrgo_tms_header_t dmrgo_tms_header_t;
/* Go: tms.Message. Message is a MOTOTRBO Text Messaging Service message, the payload of a UDP datagram to port 4007. */
typedef struct dmrgo_tms_message_t dmrgo_tms_message_t;
/* Go: tms.SequenceHigh. SequenceHigh is the second extension octet of a text message or an acknowledgement. */
typedef struct dmrgo_tms_sequence_high_t dmrgo_tms_sequence_high_t;
/* Go: tms.SequenceLow. SequenceLow is the first extension octet of a text message or an acknowledgement. */
typedef struct dmrgo_tms_sequence_low_t dmrgo_tms_sequence_low_t;
/* Go: nmea.RMC. RMC is a Recommended Minimum Specific GNSS Data sentence ($--RMC). */
typedef struct dmrgo_nmea_rmc_t dmrgo_nmea_rmc_t;
/* Go: privacy.Info. Info is the privacy data that a Receiver holds for the current call. */
typedef struct dmrgo_privacy_info_t dmrgo_privacy_info_t;
/* Go: privacy.Key. Key is one privacy key with its algorithm and key ID. */
typedef struct dmrgo_privacy_key_t dmrgo_privacy_key_t;
/* Go: privacy.Receiver. Receiver removes the privacy of the voice calls that a dmrgo_voice_receiver_t reports. */
typedef struct dmrgo_privacy_receiver_t dmrgo_privacy_receiver_t;
/* Go: privacy.Transmitter. Transmitter applies the privacy of one key to the calls of a dmrgo_voice_transmitter_t. */
typedef struct dmrgo_privacy_transmitter_t dmrgo_privacy_transmitter_t;
/* Go: privacy.TransmitterConfig. TransmitterConfig configures NewTransmitter. */
typedef struct dmrgo_privacy_transmitter_config_t dmrgo_privacy_transmitter_config_t;
/* Go: rf.AudioReceiver. AudioReceiver recovers DMR bursts from the output of an FM discriminator, as the radio chips of hotspots and MMDVM modems give it: real samples in any units, with any gain and DC offset, which the receiver measures itself. */
typedef struct dmrgo_rf_audio_receiver_t dmrgo_rf_audio_receiver_t;
typedef struct dmrgo_rf_audio_rx_config_on_bursts_fn_t dmrgo_rf_audio_rx_config_on_bursts_fn_t;
typedef struct dmrgo_rf_audio_rx_config_on_short_lc_fn_t dmrgo_rf_audio_rx_config_on_short_lc_fn_t;
/* Go: rf.AudioRxConfig. AudioRxConfig sets up an AudioReceiver. */
typedef struct dmrgo_rf_audio_rx_config_t dmrgo_rf_audio_rx_config_t;
/* Go: rf.AudioTransmitter. AudioTransmitter turns DMR bursts into the deviation signal that drives the modulator input of an FM radio, as the radio chips of hotspots and MMDVM modems take it: codes of a converter, with the CACH of BS-sourced bursts and the guard time of MS bursts as a Transmitter places them. */
typedef struct dmrgo_rf_audio_transmitter_t dmrgo_rf_audio_transmitter_t;
typedef struct dmrgo_rf_audio_tx_config_on_samples_fn_t dmrgo_rf_audio_tx_config_on_samples_fn_t;
/* Go: rf.AudioTxConfig. AudioTxConfig sets up an AudioTransmitter. */
typedef struct dmrgo_rf_audio_tx_config_t dmrgo_rf_audio_tx_config_t;
/* Go: rf.Burst. Burst is one burst that a Receiver recovered. */
typedef struct dmrgo_rf_burst_t dmrgo_rf_burst_t;
/* Go: rf.Monitor. Monitor follows the TDMA channels of the bursts of one Receiver or AudioReceiver, as a scanner does. */
typedef struct dmrgo_rf_monitor_t dmrgo_rf_monitor_t;
/* Go: rf.MonitorBurst. MonitorBurst is what a Monitor finds in one Burst. */
typedef struct dmrgo_rf_monitor_burst_t dmrgo_rf_monitor_burst_t;
typedef struct dmrgo_rf_tx_config_on_samples_fn_t dmrgo_rf_tx_config_on_samples_fn_t;
/* Go: rf.PreEmphasis. A PreEmphasis is the DMRGO_RF_TIER0 modulator of an AudioTransmitter for a radio that pre-emphasizes its modulator input from 300 Hz to 3 kHz, which dmrgo_rf_audio_tx_config_t.pre_emphasis takes. */
typedef struct dmrgo_rf_pre_emphasis_t dmrgo_rf_pre_emphasis_t;
/* Go: rf.Receiver. Receiver recovers DMR bursts from a stream of I/Q samples. */
typedef struct dmrgo_rf_receiver_t dmrgo_rf_receiver_t;
/* Go: rf.RegionError. RegionError is the error of a transmitter setup that the Region, Service and Power do not allow, or that no measurement shows to keep their limits. */
typedef struct dmrgo_rf_region_error_t dmrgo_rf_region_error_t;
/* Go: rf.RxConfig. RxConfig sets up a Receiver. */
typedef struct dmrgo_rf_rx_config_t dmrgo_rf_rx_config_t;
/* Go: rf.RxPreEmphasis. A RxPreEmphasis is the pre-emphasis of an AudioReceiver for a radio that de-emphasizes its discriminator output from 300 Hz to 3 kHz, as the speaker and accessory outputs of FM radios do, which dmrgo_rf_audio_rx_config_t.pre_emphasis takes. */
typedef struct dmrgo_rf_rx_pre_emphasis_t dmrgo_rf_rx_pre_emphasis_t;
/* Go: rf.ShortLC. ShortLC is a Short LC that a receiver decoded from the CACH of four bursts (ETSI TS 102 361-1 clause 7.1.3, ETSI TS 102 361-2 clause 7.1.3). */
typedef struct dmrgo_rf_short_lc_t dmrgo_rf_short_lc_t;
/* Go: rf.Transmitter. Transmitter turns DMR bursts into I/Q samples for a software radio: 4FSK on a carrier, with the power ramps of TDMA bursts. */
typedef struct dmrgo_rf_transmitter_t dmrgo_rf_transmitter_t;
/* Go: rf.TxConfig. TxConfig sets up a Transmitter. */
typedef struct dmrgo_rf_tx_config_t dmrgo_rf_tx_config_t;
/* Go: shortdata.HyteraText. HyteraText is the data of the defined data text that AnyTone radios send in H-SMS mode, with SAP short data and DD format 1. */
typedef struct dmrgo_shortdata_hytera_text_t dmrgo_shortdata_hytera_text_t;
/* Go: sms.AnyToneText. AnyToneText is the payload of the text that AnyTone radios send to UDP port 5016 in their DMR Standard mode: the octets 00 0d 00 0a, then the text in UTF-16LE. */
typedef struct dmrgo_sms_anytone_text_t dmrgo_sms_anytone_text_t;
/* Go: sms.Header. Header holds the data header that AppendPacket builds. */
typedef struct dmrgo_sms_header_t dmrgo_sms_header_t;
/* Go: sms.IPText. IPText is the payload of an ETSI text message: UDP port 5016, the text in UTF-16BE (ETSI TS 102 361-3 clause 5.7.1). */
typedef struct dmrgo_sms_ip_text_t dmrgo_sms_ip_text_t;
/* Go: sms.Text. Text is a text message. */
typedef struct dmrgo_sms_text_t dmrgo_sms_text_t;
/* Go: dmrd.Bridge. Bridge is an OpenBridge data packet between two masters. */
typedef struct dmrgo_dmrd_bridge_t dmrgo_dmrd_bridge_t;
/* Go: dmrd.BridgeControl. BridgeControl is a control packet of FreeDMR's enhanced OpenBridge, each with a 20-octet HMAC-SHA1 signature: BCKA (keepalive, every 10 s), BCSQ (the receiver requests the sender to stop a stream to a talkgroup), BCST (stun: stop all traffic) and BCVE (the protocol version, every 60 s). */
typedef struct dmrgo_dmrd_bridge_control_t dmrgo_dmrd_bridge_control_t;
/* Go: dmrd.Control. Control is a login, keepalive, close, beacon, report, options or local link message: every message of a dialect but DMRD, DMRA, DMRG, RPTC and the OpenBridge messages. */
typedef struct dmrgo_dmrd_control_t dmrgo_dmrd_control_t;
/* Go: dmrd.DMRPlusOptions. DMRPlusOptions is the DMR+ startup options text that a repeater sends in dmrgo_dmrd_control_t.text of an RPTO, for example "StartRef=4013;RelinkTime=15;UserLink=1;TS1_1=262;TS1_2=1;". */
typedef struct dmrgo_dmrd_dmr_plus_options_t dmrgo_dmrd_dmr_plus_options_t;
/* Go: dmrd.Data. Data is a DMRD packet: one burst with its call fields. */
typedef struct dmrgo_dmrd_data_t dmrgo_dmrd_data_t;
/* Go: dmrd.FreeDMROptions. FreeDMROptions is the FreeDMR options text that a repeater or hotspot sends in dmrgo_dmrd_control_t.text of an RPTO, for example "TS1=91,2350;TS2=;DIAL=0;VOICE=1;TIMER=10;". */
typedef struct dmrgo_dmrd_free_dmr_options_t dmrgo_dmrd_free_dmr_options_t;
/* Go: dmrd.HBRPConfig. HBRPConfig is the 306-octet RPTC configuration message of DMRGO_DMRD_DIALECT_HBRP, as a view. */
typedef struct dmrgo_dmrd_hbrp_config_t dmrgo_dmrd_hbrp_config_t;
/* Go: dmrd.LocalPosition. LocalPosition is a DMRG message of DMRGO_DMRD_DIALECT_LOCAL, from MMDVMHost to DMRGateway: Position without the repeater ID. */
typedef struct dmrgo_dmrd_local_position_t dmrgo_dmrd_local_position_t;
/* Go: dmrd.LocalTalkerAlias. LocalTalkerAlias is a DMRA message of DMRGO_DMRD_DIALECT_LOCAL, from MMDVMHost to DMRGateway: TalkerAlias without the repeater ID. */
typedef struct dmrgo_dmrd_local_talker_alias_t dmrgo_dmrd_local_talker_alias_t;
/* Go: dmrd.MMDVMConfig. MMDVMConfig is the 302-octet RPTC configuration message of DMRGO_DMRD_DIALECT_MMDVM, as a view: its methods read and write the fields in place. */
typedef struct dmrgo_dmrd_mmdvm_config_t dmrgo_dmrd_mmdvm_config_t;
/* Go: dmrd.OptionValue. OptionValue is one DMR+ startup option. */
typedef struct dmrgo_dmrd_option_value_t dmrgo_dmrd_option_value_t;
/* Go: dmrd.Position. Position is a DMRG message of DMRGO_DMRD_DIALECT_MMDVM: the GPS position that a radio sent, in the 18-octet form that DMRGateway builds toward a master. */
typedef struct dmrgo_dmrd_position_t dmrgo_dmrd_position_t;
/* Go: dmrd.TalkerAlias. TalkerAlias is a DMRA message of DMRGO_DMRD_DIALECT_MMDVM: one talker alias block that a repeater heard, in the 19-octet form that DMRGateway builds toward a master. */
typedef struct dmrgo_dmrd_talker_alias_t dmrgo_dmrd_talker_alias_t;
/* Go: dmrdauth.BridgeKey. BridgeKey holds an OpenBridge key and the hash state that signing with it needs. */
typedef struct dmrgo_dmrdauth_bridge_key_t dmrgo_dmrdauth_bridge_key_t;
/* Go: dmrdsession.Bridge. Bridge is one OpenBridge link between two masters. */
typedef struct dmrgo_dmrdsession_bridge_t dmrgo_dmrdsession_bridge_t;
/* Go: dmrdsession.BridgeConfig. BridgeConfig configures NewBridge. */
typedef struct dmrgo_dmrdsession_bridge_config_t dmrgo_dmrdsession_bridge_config_t;
/* Go: dmrdsession.Master. Master is the master side of the session of one repeater of the MMDVM network protocol or of HBRP. */
typedef struct dmrgo_dmrdsession_master_t dmrgo_dmrdsession_master_t;
/* Go: dmrdsession.MasterConfig. MasterConfig configures NewMaster. */
typedef struct dmrgo_dmrdsession_master_config_t dmrgo_dmrdsession_master_config_t;
/* Go: dmrdsession.Output. Output is one result of a Peer, Master or Bridge. */
typedef struct dmrgo_dmrdsession_output_t dmrgo_dmrdsession_output_t;
/* Go: dmrdsession.Peer. Peer is the repeater side of a session of the MMDVM network protocol or of HBRP, as a repeater, a hotspot or DMRGateway runs it. */
typedef struct dmrgo_dmrdsession_peer_t dmrgo_dmrdsession_peer_t;
/* Go: dmrdsession.PeerConfig. PeerConfig configures NewPeer. */
typedef struct dmrgo_dmrdsession_peer_config_t dmrgo_dmrdsession_peer_config_t;
/* Go: hytera.Frame. Frame is a packet of the DMR service: one burst with its slot, slot type and call fields. */
typedef struct dmrgo_hytera_frame_t dmrgo_hytera_frame_t;
/* Go: hytera.Heartbeat. Heartbeat is the 20-octet "ZZZZ" heartbeat of the P2P service, or the 1-octet keepalive that each side sends on the DMR and RDAC services. */
typedef struct dmrgo_hytera_heartbeat_t dmrgo_hytera_heartbeat_t;
/* Go: hytera.P2P. P2P is a "P2P" command of the P2P service: a repeater requests from the master registration or the DMR or RDAC service, the master accepts it and redirects the repeater to the port of the service, and the repeater acknowledges the redirect. */
typedef struct dmrgo_hytera_p2p_t dmrgo_hytera_p2p_t;
/* Go: ipsc.Control. Control is a peer control packet, opcodes 0x90 to 0x9B. */
typedef struct dmrgo_ipsc_control_t dmrgo_ipsc_control_t;
/* Go: ipsc.Flags. Flags is the 4 flag octets of a peer. */
typedef struct dmrgo_ipsc_flags_t dmrgo_ipsc_flags_t;
/* Go: ipsc.Payload. Payload is the burst of a data packet: the decoded payload with its status octets. */
typedef struct dmrgo_ipsc_payload_t dmrgo_ipsc_payload_t;
/* Go: ipsc.PeerEntry. PeerEntry is one peer of a peer list. */
typedef struct dmrgo_ipsc_peer_entry_t dmrgo_ipsc_peer_entry_t;
/* Go: ipsc.PeerList. PeerList is the entries of a DMRGO_IPSC_OP_PEER_LIST_REPLY, 11 octets each, as a view over the packet. */
typedef struct dmrgo_ipsc_peer_list_t dmrgo_ipsc_peer_list_t;
/* Go: ipsc.RTP. RTP is the RTP header of a user packet, octets 18 to 29. */
typedef struct dmrgo_ipsc_rtp_t dmrgo_ipsc_rtp_t;
/* Go: ipsc.Raw. Raw is a packet that this package does not decode further, such as DMRGO_IPSC_OP_WAKEUP, DMRGO_IPSC_OP_STATUS or DMRGO_IPSC_OP_XNL: its opcode, sender ID and the octets after them. */
typedef struct dmrgo_ipsc_raw_t dmrgo_ipsc_raw_t;
/* Go: ipsc.Stream. Stream fills the fields that the user packets of one call share or count, as a MOTOTRBO repeater sends them. */
typedef struct dmrgo_ipsc_stream_t dmrgo_ipsc_stream_t;
/* Go: ipsc.User. User is a voice or data packet, opcodes 0x80, 0x81, 0x83 and 0x84. */
typedef struct dmrgo_ipsc_user_t dmrgo_ipsc_user_t;
/* Go: ipsc.Voice. Voice is the burst of a voice packet. */
typedef struct dmrgo_ipsc_voice_t dmrgo_ipsc_voice_t;
/* Go: ipscauth.Key. Key holds an IPSC authentication key and the HMAC state that signing with it needs. */
typedef struct dmrgo_ipscauth_key_t dmrgo_ipscauth_key_t;
/* Go: ipscsession.Addr. Addr is the IPv4 address and UDP port of an IPSC peer, as a peer list carries it. */
typedef struct dmrgo_ipscsession_addr_t dmrgo_ipscsession_addr_t;
/* Go: ipscsession.Master. Master is the master of an IPSC system, as DMRlink and ipsc2hbrp run it: it registers peers, answers their keepalives, sends the peer list to every peer when one requests it and when a peer leaves, times out or is dropped, and passes the voice and data packets of registered peers on. */
typedef struct dmrgo_ipscsession_master_t dmrgo_ipscsession_master_t;
/* Go: ipscsession.MasterConfig. MasterConfig configures NewMaster. */
typedef struct dmrgo_ipscsession_master_config_t dmrgo_ipscsession_master_config_t;
/* Go: ipscsession.Output. Output is one result of a Peer or Master. */
typedef struct dmrgo_ipscsession_output_t dmrgo_ipscsession_output_t;
/* Go: ipscsession.Peer. Peer is a peer of an IPSC system, as a MOTOTRBO repeater and DMRlink run it: it registers with the master and sends it keepalives, requests the peer list, registers with each other peer of the list and sends it keepalives, answers the registrations and keepalives of the other peers, and passes the voice and data packets of the master and the peers on. */
typedef struct dmrgo_ipscsession_peer_t dmrgo_ipscsession_peer_t;
/* Go: ipscsession.PeerConfig. PeerConfig configures NewPeer. */
typedef struct dmrgo_ipscsession_peer_config_t dmrgo_ipscsession_peer_config_t;
/* Go: ipscsession.PeerInfo. PeerInfo is one peer that a Peer or Master holds. */
typedef struct dmrgo_ipscsession_peer_info_t dmrgo_ipscsession_peer_info_t;
/* Go: mmdvm.Ack. Ack is the payload of a DMRGO_MMDVM_COMMAND_ACK frame from the modem. */
typedef struct dmrgo_mmdvm_ack_t dmrgo_mmdvm_ack_t;
/* Go: mmdvm.ConfigV1. ConfigV1 is the payload of a DMRGO_MMDVM_COMMAND_SET_CONFIG frame of protocol 1, as MMDVMHost setConfig1 writes it and the MMDVM_HS firmware reads it. */
typedef struct dmrgo_mmdvm_config_v1_t dmrgo_mmdvm_config_v1_t;
/* Go: mmdvm.ConfigV2. ConfigV2 is the payload of a DMRGO_MMDVM_COMMAND_SET_CONFIG frame of protocol 2, as MMDVMHost setConfig2 writes it and the MMDVM firmware reads it. */
typedef struct dmrgo_mmdvm_config_v2_t dmrgo_mmdvm_config_v2_t;
/* Go: mmdvm.DMRAbort. DMRAbort is the payload of a DMRGO_MMDVM_COMMAND_DMR_ABORT frame: it drops the queued bursts of one slot. */
typedef struct dmrgo_mmdvm_dmr_abort_t dmrgo_mmdvm_dmr_abort_t;
/* Go: mmdvm.DMRAloha. DMRAloha is the payload of a DMRGO_MMDVM_COMMAND_DMR_ALOHA frame: the C_ALOHA CSBK burst that a Tier III control channel sends. */
typedef struct dmrgo_mmdvm_dmr_aloha_t dmrgo_mmdvm_dmr_aloha_t;
/* Go: mmdvm.DMRData. DMRData is a DMRGO_MMDVM_COMMAND_DMR_DATA1 or DMRGO_MMDVM_COMMAND_DMR_DATA2 frame, one burst of slot 1 or 2, or a DMRGO_MMDVM_COMMAND_DMR_LOST1 or DMRGO_MMDVM_COMMAND_DMR_LOST2 frame, which shows that the modem lost the signal of the slot. */
typedef struct dmrgo_mmdvm_dmr_data_t dmrgo_mmdvm_dmr_data_t;
/* Go: mmdvm.DMRShortLC. DMRShortLC is the payload of a DMRGO_MMDVM_COMMAND_DMR_SHORT_LC frame: the Short LC that the modem sends in the CACH, as MMDVMHost CDMRShortLC encodes it. */
typedef struct dmrgo_mmdvm_dmr_short_lc_t dmrgo_mmdvm_dmr_short_lc_t;
/* Go: mmdvm.DMRStart. DMRStart is the payload of a DMRGO_MMDVM_COMMAND_DMR_START frame: it starts or stops the duplex transmitter. */
typedef struct dmrgo_mmdvm_dmr_start_t dmrgo_mmdvm_dmr_start_t;
/* Go: mmdvm.Debug. Debug is a debug frame from the modem: DMRGO_MMDVM_COMMAND_DEBUG1 to DMRGO_MMDVM_COMMAND_DEBUG5, a text and 0 to 4 big-endian numbers, or DMRGO_MMDVM_COMMAND_DEBUG_DUMP, raw octets. */
typedef struct dmrgo_mmdvm_debug_t dmrgo_mmdvm_debug_t;
/* Go: mmdvm.Frame. Frame is one frame of the serial protocol: its command and its payload. */
typedef struct dmrgo_mmdvm_frame_t dmrgo_mmdvm_frame_t;
/* Go: mmdvm.Nak. Nak is the payload of a DMRGO_MMDVM_COMMAND_NAK frame from the modem. */
typedef struct dmrgo_mmdvm_nak_t dmrgo_mmdvm_nak_t;
/* Go: mmdvm.SetFreq. SetFreq is the payload of a DMRGO_MMDVM_COMMAND_SET_FREQ frame: the RX and TX frequencies, and from current hosts the RF level and the POCSAG TX frequency. */
typedef struct dmrgo_mmdvm_set_freq_t dmrgo_mmdvm_set_freq_t;
/* Go: mmdvm.SetMode. SetMode is the payload of a DMRGO_MMDVM_COMMAND_SET_MODE frame. */
typedef struct dmrgo_mmdvm_set_mode_t dmrgo_mmdvm_set_mode_t;
/* Go: mmdvm.StatusV1. StatusV1 is the payload of a DMRGO_MMDVM_COMMAND_GET_STATUS reply of protocol 1 (MMDVM_HS firmware): the enabled modes, the modem state, its flags and the free space of each TX buffer. */
typedef struct dmrgo_mmdvm_status_v1_t dmrgo_mmdvm_status_v1_t;
/* Go: mmdvm.StatusV2. StatusV2 is the payload of a DMRGO_MMDVM_COMMAND_GET_STATUS reply of protocol 2 (MMDVM firmware): the modem state, its flags and the free space of each TX buffer. */
typedef struct dmrgo_mmdvm_status_v2_t dmrgo_mmdvm_status_v2_t;
/* Go: mmdvm.Version. Version is the payload of a DMRGO_MMDVM_COMMAND_GET_VERSION reply. */
typedef struct dmrgo_mmdvm_version_t dmrgo_mmdvm_version_t;
/* Go: trunk.Access. Access is the random access control of the last C_ALOHA of a TSCC (ETSI TS 102 361-4 clause 6.2.1.1, Table 7.19). */
typedef struct dmrgo_trunk_access_t dmrgo_trunk_access_t;
/* Go: trunk.AddressList. AddressList is the appended data of a UDT in the address format: up to 15 MS or talkgroup addresses (ETSI TS 102 361-4 clause B.3.2). */
typedef struct dmrgo_trunk_address_list_t dmrgo_trunk_address_list_t;
/* Go: trunk.Appended. Appended is the appended data of a UDT with the fields of its header that describe it: the UDT Format, the pad nibbles and the number of blocks. */
typedef struct dmrgo_trunk_appended_t dmrgo_trunk_appended_t;
/* Go: trunk.Authenticator. Authenticator gives the 24-bit response of the challenge and response authentication, as the RC4 algorithm with the key K (and the PSN, when it is used) of an MS computes it. */
typedef struct dmrgo_trunk_authenticator_t dmrgo_trunk_authenticator_t;
typedef struct dmrgo_trunk_authenticator_vtable_t dmrgo_trunk_authenticator_vtable_t;
/* Go: trunk.CapacityPlusConfig. CapacityPlusConfig configures NewCapacityPlusFollower. */
typedef struct dmrgo_trunk_capacity_plus_config_t dmrgo_trunk_capacity_plus_config_t;
/* Go: trunk.CapacityPlusFollower. CapacityPlusFollower follows a MOTOTRBO Capacity Plus or Linked Capacity Plus site without transmitting. */
typedef struct dmrgo_trunk_capacity_plus_follower_t dmrgo_trunk_capacity_plus_follower_t;
/* Go: trunk.Channel. Channel is a logical physical channel number (LPCN) of a site with its frequencies, as an MS uses them (ETSI TS 102 361-4 Annex C). */
typedef struct dmrgo_trunk_channel_t dmrgo_trunk_channel_t;
/* Go: trunk.ChannelPlan. ChannelPlan maps the channel numbers of a site to frequencies. */
typedef struct dmrgo_trunk_channel_plan_t dmrgo_trunk_channel_plan_t;
/* Go: trunk.ChannelRule. ChannelRule gives the frequencies of a range of channel numbers by a fixed step, as the channel plan of a site or a radio codeplug does: channel n receives on RXHz + (n - First) * StepHz and transmits TXOffsetHz from there. */
typedef struct dmrgo_trunk_channel_rule_t dmrgo_trunk_channel_rule_t;
/* Go: trunk.DynamicGroups. DynamicGroups is the DGNA talkgroup list of an MS (ETSI TS 102 361-4 clause 6.6.8.1). */
typedef struct dmrgo_trunk_dynamic_groups_t dmrgo_trunk_dynamic_groups_t;
/* Go: trunk.Follower. Follower follows a Tier III trunked site without transmitting, as a scanner does: it hunts for a TSCC, reads its site parameters, broadcasts and grants, follows the grants of the calls that its config selects to their payload channels, and returns to the TSCC on P_CLEAR, after the hang time or when the payload channel goes quiet (ETSI TS 102 361-4 clauses 6.3 and 6.6). */
typedef struct dmrgo_trunk_follower_t dmrgo_trunk_follower_t;
/* Go: trunk.FollowerConfig. FollowerConfig configures NewFollower. */
typedef struct dmrgo_trunk_follower_config_t dmrgo_trunk_follower_config_t;
/* Go: trunk.Grant. Grant is a channel grant of a TSCC, such as TV_GRANT or PV_GRANT (ETSI TS 102 361-4 clause 7.1.1.1.1). */
typedef struct dmrgo_trunk_grant_t dmrgo_trunk_grant_t;
/* Go: trunk.HuntEntry. HuntEntry is a channel of a HuntList. */
typedef struct dmrgo_trunk_hunt_entry_t dmrgo_trunk_hunt_entry_t;
/* Go: trunk.HuntList. HuntList is the list of channels on which an MS looks for a TSCC (ETSI TS 102 361-4 clause 6.3.2, Annex D). */
typedef struct dmrgo_trunk_hunt_list_t dmrgo_trunk_hunt_list_t;
/* Go: trunk.LIPShortReport. LIPShortReport is the LIP Short Location Report that a UDT in the LIP format carries: PDU type 0, the position, its error, the speed and the direction. */
typedef struct dmrgo_trunk_lip_short_report_t dmrgo_trunk_lip_short_report_t;
/* Go: trunk.MS. MS is a Tier III mobile station: it hunts for and follows a TSCC as a Follower does, registers and de-registers, makes voice and packet data calls by random access, answers C_AHOY and P_AHOY, follows C_MOVE and P_PROTECT, and ends its own calls with P_MAINT (ETSI TS 102 361-4 clauses 6.2 to 6.6). */
typedef struct dmrgo_trunk_ms_t dmrgo_trunk_ms_t;
/* Go: trunk.MSConfig. MSConfig configures NewMS. */
typedef struct dmrgo_trunk_ms_config_t dmrgo_trunk_ms_config_t;
/* Go: trunk.NMEALong. NMEALong is the Long NMEA (IEC 61162-1) Format Specified appended data of a UDT: two blocks with the fields of NMEAShort, the time in seconds and the course over ground. */
typedef struct dmrgo_trunk_nmea_long_t dmrgo_trunk_nmea_long_t;
/* Go: trunk.NMEAShort. NMEAShort is the Short NMEA (IEC 61162-1) appended data of a UDT: one block with the position, speed and the time in steps of 10 s. */
typedef struct dmrgo_trunk_nmea_short_t dmrgo_trunk_nmea_short_t;
/* Go: trunk.Neighbor. Neighbor is an adjacent site that a TSCC announces with C_BCAST Adjacent_Site (ETSI TS 102 361-4 clause 7.2.19.7). */
typedef struct dmrgo_trunk_neighbor_t dmrgo_trunk_neighbor_t;
/* Go: trunk.Output. Output is one result of a Follower or MS. */
typedef struct dmrgo_trunk_output_t dmrgo_trunk_output_t;
/* Go: trunk.Site. Site holds the data that a Follower or an MS has about the TSCC it is on, from C_ALOHA, C_BCAST and the C_SYS_Parms of the CACH (ETSI TS 102 361-4 clauses 5.1, 6.3.2 and 7.1.1.1). */
typedef struct dmrgo_trunk_site_t dmrgo_trunk_site_t;
/* Go: trunk.TSCC. TSCC is a Tier III dedicated TSCC with its payload channels, for a single site (ETSI TS 102 361-4 clauses 6.2, 6.4.4, 6.4.8 and 6.6). */
typedef struct dmrgo_trunk_tscc_t dmrgo_trunk_tscc_t;
/* Go: trunk.TSCCConfig. TSCCConfig configures NewTSCC. */
typedef struct dmrgo_trunk_tscc_config_t dmrgo_trunk_tscc_config_t;
/* Go: trunk.TSCCOutput. TSCCOutput is one result of a TSCC. */
typedef struct dmrgo_trunk_tscc_output_t dmrgo_trunk_tscc_output_t;
/* Go: trunk.Tune. Tune is a channel to tune to. */
typedef struct dmrgo_trunk_tune_t dmrgo_trunk_tune_t;
/* Go: trunk.UDT. UDT is a Unified Data Transport delivery of a TSCC: a C_UDTHD header and its 1 to 4 appended rate 1/2 blocks (ETSI TS 102 361-4 clause 6.5). */
typedef struct dmrgo_trunk_udt_t dmrgo_trunk_udt_t;
/* Go: trunk.USBDLIPResponse. USBDLIPResponse is the Poll Response of the USBD polling service for LIP: the payload of an inbound USBD with Service Type LIP. */
typedef struct dmrgo_trunk_usbd_lip_response_t dmrgo_trunk_usbd_lip_response_t;
/* Go: trunk.USBDPollRequest. USBDPollRequest is the Poll Request of the USBD polling service: the payload of an outbound USBD after its Service Type. */
typedef struct dmrgo_trunk_usbd_poll_request_t dmrgo_trunk_usbd_poll_request_t;
/* Go: trunkauth.Entry. Entry is the Key of the MS Addr. */
typedef struct dmrgo_trunkauth_entry_t dmrgo_trunkauth_entry_t;
/* Go: trunkauth.Key. Key is the authentication key K and the PSN of one MS. */
typedef struct dmrgo_trunkauth_key_t dmrgo_trunkauth_key_t;
/* Go: trunkauth.Keys. Keys holds the keys of the MSs that a TSCC authenticates. */
typedef struct dmrgo_trunkauth_keys_t dmrgo_trunkauth_keys_t;
/* Go: vocoder.AMBEFrame. AMBEFrame holds the 49 information bits of one AMBE+2 vocoder frame, without the frame FEC, packed, the first bit in the most significant bit of byte 0. */
typedef struct dmrgo_vocoder_ambe_frame_t dmrgo_vocoder_ambe_frame_t;
/* Go: vocoder.Codec. Codec converts between 8 kHz 16-bit mono PCM and the 72 raw on-air bits of one of the three vocoder frames of a DMR voice burst, packed, the first bit in the most significant bit of byte 0, as dmrgo_layer2_raw_burst_voice_slots returns them. */
typedef struct dmrgo_vocoder_codec_t dmrgo_vocoder_codec_t;
typedef struct dmrgo_vocoder_codec_vtable_t dmrgo_vocoder_codec_vtable_t;
/* Go: vocoder.FrameReport. FrameReport gives what a Codec found in one vocoder frame and what it put in the samples for it. */
typedef struct dmrgo_vocoder_frame_report_t dmrgo_vocoder_frame_report_t;
/* Go: codec2.Codec. Codec is a Codec2 dmrgo_vocoder_codec_t with separate libcodec2 encoder and decoder states. */
typedef struct dmrgo_codec2_codec_t dmrgo_codec2_codec_t;
/* Go: codec2.Config. Config selects how a Codec encodes and decodes. */
typedef struct dmrgo_codec2_config_t dmrgo_codec2_config_t;
/* Go: codec2.Module. Module is a compiled WebAssembly build of libcodec2 for dmrgo_codec2_config_t.wasm. */
typedef struct dmrgo_codec2_module_t dmrgo_codec2_module_t;
/* Go: dvsi.Codec. Codec is a dmrgo_vocoder_codec_t that runs on a DVSI chip at the DMR AMBE+2 rate. */
typedef struct dmrgo_dvsi_codec_t dmrgo_dvsi_codec_t;
/* Go: dvsi.Config. Config selects how New sets up the chip. */
typedef struct dmrgo_dvsi_config_t dmrgo_dvsi_config_t;
/* Go: dvsi.Packet. Packet is one parsed packet. */
typedef struct dmrgo_dvsi_packet_t dmrgo_dvsi_packet_t;
/* Go: dvsi.Port. Port carries packets to and from a chip. */
typedef struct dmrgo_dvsi_port_t dmrgo_dvsi_port_t;
typedef struct dmrgo_dvsi_port_vtable_t dmrgo_dvsi_port_vtable_t;
/* Go: voice.Call. Call is the identity of a voice call, from its LC. */
typedef struct dmrgo_voice_call_t dmrgo_voice_call_t;
/* Go: voice.CallOptions. CallOptions are per-call settings of dmrgo_voice_transmitter_start. */
typedef struct dmrgo_voice_call_options_t dmrgo_voice_call_options_t;
/* Go: voice.Event. Event is one result of a Receiver. */
typedef struct dmrgo_voice_event_t dmrgo_voice_event_t;
/* Go: voice.FrameQuality. FrameQuality is the FEC result of one 72-bit AMBE+2 vocoder slot. */
typedef struct dmrgo_voice_frame_quality_t dmrgo_voice_frame_quality_t;
/* Go: voice.Interrupter. Interrupter is the radio that interrupts the voice call of another radio: it sends a Tier 2 RC command in standalone RC bursts on the reverse channel of the call, waits T_RCtimer for the Terminator with LC of the call, and tries again up to dmrgo_voice_interrupter_config_t.retries times. */
typedef struct dmrgo_voice_interrupter_t dmrgo_voice_interrupter_t;
/* Go: voice.InterrupterConfig. InterrupterConfig configures NewInterrupter. */
typedef struct dmrgo_voice_interrupter_config_t dmrgo_voice_interrupter_config_t;
/* Go: voice.Jitter. Jitter is a network jitter buffer for the packets of one slot, like the Jitter of the DMR Network section of MMDVMHost. */
typedef struct dmrgo_voice_jitter_t dmrgo_voice_jitter_t;
/* Go: voice.JitterConfig. JitterConfig configures NewJitter. */
typedef struct dmrgo_voice_jitter_config_t dmrgo_voice_jitter_config_t;
/* Go: voice.JitterPacket. JitterPacket is a packet that Pop returns. */
typedef struct dmrgo_voice_jitter_packet_t dmrgo_voice_jitter_packet_t;
/* Go: voice.JitterStats. JitterStats counts what a Jitter dropped and how often it started its playout again. */
typedef struct dmrgo_voice_jitter_stats_t dmrgo_voice_jitter_stats_t;
/* Go: voice.Output. Output is one result of a Transmitter or an Interrupter. */
typedef struct dmrgo_voice_output_t dmrgo_voice_output_t;
/* Go: voice.Receiver. Receiver turns the bursts of one logical channel into call events, as the package doc describes. */
typedef struct dmrgo_voice_receiver_t dmrgo_voice_receiver_t;
/* Go: voice.ReceiverConfig. ReceiverConfig configures NewReceiver. */
typedef struct dmrgo_voice_receiver_config_t dmrgo_voice_receiver_config_t;
/* Go: voice.Stats. Stats counts what a Receiver saw during a call. */
typedef struct dmrgo_voice_stats_t dmrgo_voice_stats_t;
/* Go: voice.Transmitter. Transmitter makes the bursts of one voice transmission on one logical channel, one per Tick, 60 ms apart. */
typedef struct dmrgo_voice_transmitter_t dmrgo_voice_transmitter_t;
/* Go: voice.TransmitterConfig. TransmitterConfig configures NewTransmitter. */
typedef struct dmrgo_voice_transmitter_config_t dmrgo_voice_transmitter_config_t;
/* Go: dmrgo.Service. Service is the radio service of a transmitting station. */
typedef uint8_t dmrgo_service_t;
/* Go: bs.Activation. Activation selects what wakes up a hibernating Repeater (ETSI TS 102 361-1 clause 5.2.1.3). */
typedef uint8_t dmrgo_bs_activation_t;
/* Go: bs.ChannelAuth. ChannelAuth selects the channel authorization of a Repeater in DMRGO_BS_MODE_RF: how it picks one MS among those that start a transmission in hang time (ETSI TS 102 361-2 clause 5.1.1.6). */
typedef uint8_t dmrgo_bs_channel_auth_t;
/* Go: bs.Dest. Dest is a set of places an output burst goes to. */
typedef uint8_t dmrgo_bs_dest_t;
/* Go: bs.Mode. Mode selects what a Repeater makes. */
typedef uint8_t dmrgo_bs_mode_t;
/* Go: bs.OutputKind. OutputKind is the kind of an Output. */
typedef uint8_t dmrgo_bs_output_kind_t;
/* Go: bs.Reason. Reason is why a Repeater refused a source. */
typedef uint8_t dmrgo_bs_reason_t;
/* Go: bs.Service. Service is what a source uses a slot for. */
typedef uint8_t dmrgo_bs_service_t;
/* Go: bs.SlotState. SlotState is the state of one slot of a Repeater (ETSI TS 102 361-1 Figure G.6, ETSI TS 102 361-3 clause 5.4.3.3). */
typedef uint8_t dmrgo_bs_slot_state_t;
/* Go: bs.State. State is the state of both slots of a Repeater (ETSI TS 102 361-1 Figure G.5). */
typedef uint8_t dmrgo_bs_state_t;
/* Go: csbk.OACSUAnswer. OACSUAnswer is how a Responder answers UU_V_Req, the presence check of an OACSU individual call. */
typedef uint8_t dmrgo_csbk_oacsu_answer_t;
/* Go: csbk.OutputKind. OutputKind is the kind of an Output. */
typedef uint8_t dmrgo_csbk_output_kind_t;
/* Go: csbk.PreamblesState. PreamblesState is the state of a Preambles. */
typedef uint8_t dmrgo_csbk_preambles_state_t;
/* Go: csbk.Reason. Reason is the reason code of a NACK_Rsp (ETSI TS 102 361-2 clause 7.2.3). */
typedef uint8_t dmrgo_csbk_reason_t;
/* Go: csbk.RequesterState. RequesterState is the state of a Requester. */
typedef uint8_t dmrgo_csbk_requester_state_t;
/* Go: csbk.ResponderState. ResponderState is the state of a Responder. */
typedef uint8_t dmrgo_csbk_responder_state_t;
/* Go: csbk.Result. Result is how a request or a wakeup ended. */
typedef uint8_t dmrgo_csbk_result_t;
/* Go: csbk.Service. Service is the CSBK service of a request or an answer. */
typedef uint8_t dmrgo_csbk_service_t;
/* Go: csbk.TimingState. TimingState is the high level state of a Timing (ETSI TS 102 361-2 clause 6.2.1). */
typedef uint8_t dmrgo_csbk_timing_state_t;
/* Go: csbk.WakeupState. WakeupState is the state of a Wakeup. */
typedef uint8_t dmrgo_csbk_wakeup_state_t;
/* Go: data.EndReason. EndReason is why a data call ended. */
typedef uint8_t dmrgo_data_end_reason_t;
/* Go: data.EventKind. EventKind is the kind of an Event. */
typedef uint8_t dmrgo_data_event_kind_t;
/* Go: data.OutputKind. OutputKind is the kind of an Output. */
typedef uint8_t dmrgo_data_output_kind_t;
/* Go: data.Result. Result is how a message ended. */
typedef uint8_t dmrgo_data_result_t;
/* Go: data.SenderState. SenderState is the state of a Sender. */
typedef uint8_t dmrgo_data_sender_state_t;
/* Go: data.State. State is the state of a Receiver. */
typedef uint8_t dmrgo_data_state_t;
/* Go: enums.Access. Access is the channel access policy of a transmission. */
typedef uint8_t dmrgo_enums_access_t;
/* Go: enums.AckReason. AckReason is the 8-bit Reason of a Tier III acknowledgement, such as C_ACKD, C_NACKD, C_QACKD, C_WACKD, C_ACKU and P_ACKD. */
typedef uint8_t dmrgo_enums_ack_reason_t;
/* Go: enums.AckType. AckType is the type of an acknowledgement, the two most significant bits of its AckReason (ETSI TS 102 361-4 clause 7.2.8.0). */
typedef uint8_t dmrgo_enums_ack_type_t;
/* Go: enums.ActivityID. ActivityID is the 4-bit activity of one BS time slot in an Activity Update short LC. */
typedef uint8_t dmrgo_enums_activity_id_t;
/* Go: enums.AnnouncementType. AnnouncementType is the 5-bit announcement type of a C_BCAST PDU. */
typedef uint8_t dmrgo_enums_announcement_type_t;
/* Go: enums.Backoff. Backoff is the 4-bit Backoff number of a TSCC PDU such as C_ALOHA, the code for the number of TDMA frames from which an MS picks the frame of its next random access (ETSI TS 102 361-4 clause 6.2.1.1.6). */
typedef uint8_t dmrgo_enums_backoff_t;
/* Go: enums.ColorCode. ColorCode is the 4-bit color code of a slot type or EMB. */
typedef uint8_t dmrgo_enums_color_code_t;
/* Go: enums.DAID. DAID is the 4-bit Destination IP Address Identifier of a UDP/IPv4 compressed header. */
typedef uint8_t dmrgo_enums_daid_t;
/* Go: enums.DDFormat. DDFormat is the 6-bit Defined Data format (DD) of a defined data header: the coding of the data in its blocks. */
typedef uint8_t dmrgo_enums_dd_format_t;
/* Go: enums.DPID. DPID is the 7-bit UDP Destination Port Identifier of a UDP/IPv4 compressed header. */
typedef uint8_t dmrgo_enums_dpid_t;
/* Go: enums.DataType. DataType is the 4-bit Data Type of a slot type: the content of a general data burst (ETSI TS 102 361-1 clause 9.3.6, Table 9.22). */
typedef uint8_t dmrgo_enums_data_type_t;
/* Go: enums.FID. FID is the 8-bit Feature set ID (FID) of a full LC or CSBK. */
typedef uint8_t dmrgo_enums_fid_t;
/* Go: enums.FLCO. FLCO is the 6-bit Full Link Control Opcode of a full LC (ETSI TS 102 361-2 Table B.1, ETSI TS 102 361-3 clause 7.1.1). */
typedef uint8_t dmrgo_enums_flco_t;
/* Go: enums.LCSS. LCSS is the 2-bit LC Start/Stop of an EMB or CACH. */
typedef uint8_t dmrgo_enums_lcss_t;
/* Go: enums.NRandWait. NRandWait is the 4-bit NRand_Wait of a C_ALOHA, the code for the number of TDMA frames by which the TSCC may delay its answer to a random access (ETSI TS 102 361-4 clause 6.2.1.1.5). */
typedef uint8_t dmrgo_enums_n_rand_wait_t;
/* Go: enums.ProtectKind. ProtectKind is the 3-bit Protect_Kind of a P_PROTECT. */
typedef uint8_t dmrgo_enums_protect_kind_t;
/* Go: enums.RCCommand. RCCommand is the 4-bit Reverse Channel (RC) command. */
typedef uint8_t dmrgo_enums_rc_command_t;
/* Go: enums.SAID. SAID is the 4-bit Source IP Address Identifier of a UDP/IPv4 compressed header. */
typedef uint8_t dmrgo_enums_said_t;
/* Go: enums.SAP. SAP is the 4-bit Service Access Point (SAP) identifier of a data header. */
typedef uint8_t dmrgo_enums_sap_t;
/* Go: enums.SLCO. SLCO is the 4-bit Short Link Control Opcode of a short LC. */
typedef uint8_t dmrgo_enums_slco_t;
/* Go: enums.SPID. SPID is the 7-bit UDP Source Port Identifier of a UDP/IPv4 compressed header. */
typedef uint8_t dmrgo_enums_spid_t;
/* Go: enums.ServiceFunction. ServiceFunction is the 2-bit Service_Function of a C_ALOHA, which shows for which services an MS may make a random access (ETSI TS 102 361-4 clause 6.2.1.1.2, Table 6.1). */
typedef uint8_t dmrgo_enums_service_function_t;
/* Go: enums.ServiceKind. ServiceKind is the 4-bit Service_Kind of a Tier III C_RAND, C_AHOY or C_ACKVIT (ETSI TS 102 361-4 clause 7.2.12, Table 7.49). */
typedef uint8_t dmrgo_enums_service_kind_t;
/* Go: enums.Slot. Slot is a TDMA channel of a carrier, also called a time slot. */
typedef uint8_t dmrgo_enums_slot_t;
/* Go: enums.SyncPattern. SyncPattern is the 48-bit SYNC pattern in the center of a burst, as an integer with the first bit most significant (ETSI TS 102 361-1 clause 9.1.1, Table 9.2). */
typedef uint64_t dmrgo_enums_sync_pattern_t;
/* Go: enums.UDTFormat. UDTFormat is the 4-bit UDT Format of a UDT header: the format of the appended data. */
typedef uint8_t dmrgo_enums_udt_format_t;
/* Go: enums.VoiceBurstType. VoiceBurstType is the position of a voice burst in a voice superframe. */
typedef uint8_t dmrgo_enums_voice_burst_type_t;
/* Go: hdap.Opcode. Opcode is the 16-bit opcode of a message. */
typedef uint16_t dmrgo_hdap_opcode_t;
/* Go: hdap.Service. Service is the 7-bit service of a message. */
typedef uint8_t dmrgo_hdap_service_t;
/* Go: hdap.TMPType. TMPType is the service type of the text message protocol (TMP), the low octet of its Opcode. */
typedef uint8_t dmrgo_hdap_tmp_type_t;
/* Go: ip.ICMPMessage. ICMPMessage is the Type and Code of an ICMP message, as Type<<8 | Code (RFC 792). */
typedef uint16_t dmrgo_ip_icmp_message_t;
/* Go: ip.Port. Port is a UDP port. */
typedef uint16_t dmrgo_ip_port_t;
/* Go: ip.Protocol. Protocol is the protocol number of an IPv4 packet (RFC 790). */
typedef uint8_t dmrgo_ip_protocol_t;
/* Go: layer2.EndHint. EndHint is the end-of-call data that a transport gives. */
typedef uint8_t dmrgo_layer2_end_hint_t;
/* Go: layer2.Kind. Kind is the kind of a burst. */
typedef uint8_t dmrgo_layer2_kind_t;
/* Go: layer2.Placement. Placement is how a PositionTracker took a burst. */
typedef uint8_t dmrgo_layer2_placement_t;
/* Go: layer2.SyncSource. SyncSource selects the SYNC patterns of a voice transmission (ETSI TS 102 361-1 Table 9.2). */
typedef int64_t dmrgo_layer2_sync_source_t;
/* Go: packet.Response. Response is the Class and Type of a response packet, as Class<<3 | Type (ETSI TS 102 361-1 Table 8.3). */
typedef uint8_t dmrgo_packet_response_t;
/* Go: pdu.CSBKOpcode. CSBKOpcode is the 6-bit CSBK opcode (CSBKO) of a CSBK or MBC header. */
typedef uint8_t dmrgo_pdu_csbk_opcode_t;
/* Go: pdu.CapacityPlusSegment. CapacityPlusSegment shows where a CSBK block sits in a site status or neighbor report that spans several CSBKs. */
typedef uint8_t dmrgo_pdu_capacity_plus_segment_t;
/* Go: pdu.EMBInfo. EMBInfo is the 7 information bits of an EMB PDU without the QR(16,7,6) parity, in bits 7 to 1 of one octet as IPSC carries them. */
typedef uint8_t dmrgo_pdu_emb_info_t;
/* Go: pdu.Format. Format is the 4-bit Data Packet Format (DPF) of a data header (ETSI TS 102 361-1 clause 9.3.17). */
typedef uint8_t dmrgo_pdu_format_t;
/* Go: pdu.NetworkModel. NetworkModel is the MODEL field of a System Identity Code (ETSI TS 102 361-4 Table 6.5). */
typedef uint8_t dmrgo_pdu_network_model_t;
/* Go: pdu.Opcode0x38Hint. Opcode0x38Hint is the likely meaning of a CSBK with opcode 0x38, which is BS_Dwn_Act in Tier II and TD_GRANT_MI in Tier III. */
typedef uint8_t dmrgo_pdu_opcode0x38_hint_t;
/* Go: pdu.ServiceType. ServiceType is the higher layer service that a USBD carries (ETSI TS 102 361-1 clause 9.3.43). */
typedef uint8_t dmrgo_pdu_service_type_t;
/* Go: pdu.SlotTypeInfo. SlotTypeInfo is the 8 information bits of a SLOT PDU without the Golay(20,8) parity, as IPSC carries them: the color code in the high 4 bits and the Data Type in the low 4 bits. */
typedef uint8_t dmrgo_pdu_slot_type_info_t;
/* Go: pdu.UDTOpcode. UDTOpcode is the 6-bit UDT Opcode (UDTO) of a UDT header (ETSI TS 102 361-4 Table B.1, "UDT Header" group). */
typedef uint8_t dmrgo_pdu_udt_opcode_t;
/* Go: layer3.AdditionalInformationField. AdditionalInformationField is the 1-bit Additional Information Field: it shows whether the additional information of a PDU is valid (ETSI TS 102 361-2 clause 7.2.6, Table 7.15). */
typedef uint8_t dmrgo_layer3_additional_information_field_t;
/* Go: layer3.PositionAccuracy. PositionAccuracy is the 3-bit Position_Error field: the accuracy of a GPS position (ETSI TS 102 361-2 clause 7.2.15). */
typedef uint8_t dmrgo_layer3_position_accuracy_t;
/* Go: layer3.SourceType. SourceType is the 1-bit Source Type: it shows whether a BS or an MS sent the PDU (ETSI TS 102 361-2 clause 7.2.5, Table 7.14). */
typedef uint8_t dmrgo_layer3_source_type_t;
/* Go: layer3.TalkerAliasDataFormat. TalkerAliasDataFormat is the 2-bit character encoding of a talker alias (ETSI TS 102 361-2 clause 7.2.18, Table 7.25). */
typedef uint8_t dmrgo_layer3_talker_alias_data_format_t;
/* Go: lip.ElementID. ElementID is the type 5 element identifier of an optional information element. */
typedef uint8_t dmrgo_lip_element_id_t;
/* Go: lip.Extension. Extension is the PDU type extension of a LIP PDU of PDU type 1. */
typedef uint8_t dmrgo_lip_extension_t;
/* Go: lip.ReportType. ReportType is the kind of location report that a request specifies (ETSI TS 100 392-18-1 clause 6.3.65). */
typedef uint8_t dmrgo_lip_report_type_t;
/* Go: lip.Shape. Shape is the location shape of the location data. */
typedef uint8_t dmrgo_lip_shape_t;
/* Go: lip.TimeType. TimeType is the kind of the time data of a long location report (ETSI TS 100 392-18-1 clause 6.3.81). */
typedef uint8_t dmrgo_lip_time_type_t;
/* Go: lip.VelocityType. VelocityType is the kind of the velocity data of a long location report (ETSI TS 100 392-18-1 clause 6.3.90). */
typedef uint8_t dmrgo_lip_velocity_type_t;
/* Go: location.Format. Format is the format that a position came in. */
typedef uint8_t dmrgo_location_format_t;
/* Go: ars.Encoding. Encoding is the 5-bit coding of the identifiers of a registration. */
typedef uint8_t dmrgo_ars_encoding_t;
/* Go: ars.Event. Event is the 2-bit event of a device registration. */
typedef uint8_t dmrgo_ars_event_t;
/* Go: ars.FailureReason. FailureReason is the reason in dmrgo_ars_response_t.value of an answer whose dmrgo_ars_header_t.ack_required marks a failure. */
typedef uint8_t dmrgo_ars_failure_reason_t;
/* Go: ars.Type. Type is the 4-bit PDU type of a message. */
typedef uint8_t dmrgo_ars_type_t;
/* Go: lrrp.DocumentID. DocumentID identifies the kind of a message. */
typedef uint8_t dmrgo_lrrp_document_id_t;
/* Go: lrrp.ResultCode. ResultCode is the result code of an answer or report (tokens 0x37 and 0x39). */
typedef uint32_t dmrgo_lrrp_result_code_t;
/* Go: lrrp.TriggerCondition. TriggerCondition is the condition of a triggered request that sends a report (token 0x4A). */
typedef uint32_t dmrgo_lrrp_trigger_condition_t;
/* Go: tms.Encoding. Encoding is the 5-bit character coding of the text. */
typedef uint8_t dmrgo_tms_encoding_t;
/* Go: tms.Type. Type is the kind of a message: the control bit and the 4-bit PDU type of the first header octet. */
typedef uint8_t dmrgo_tms_type_t;
/* Go: privacy.Algorithm. Algorithm is the algorithm ID octet of a PI header with FID 0x10. */
typedef uint8_t dmrgo_privacy_algorithm_t;
/* Go: rf.IQFormat. IQFormat is the layout of one I/Q sample in the bytes of a Receiver. */
typedef uint8_t dmrgo_rf_iq_format_t;
/* Go: rf.Region. Region is the regulatory region whose limits a transmitter keeps. */
typedef uint8_t dmrgo_rf_region_t;
/* Go: rf.Tier. Tier selects how a Receiver detects symbols, by compute budget. */
typedef int64_t dmrgo_rf_tier_t;
/* Go: sms.Format. Format is the format of a text message. */
typedef uint8_t dmrgo_sms_format_t;
/* Go: dmrd.Command. Command is the kind of a message, named by its tag. */
typedef uint8_t dmrgo_dmrd_command_t;
/* Go: dmrd.Dialect. Dialect selects the form of the control messages. */
typedef uint8_t dmrgo_dmrd_dialect_t;
/* Go: dmrd.FrameType. FrameType is the frame type of a DMRD packet, octet 15 bits 5 and 4. */
typedef uint8_t dmrgo_dmrd_frame_type_t;
/* Go: dmrd.OptionState. OptionState is whether a DMR+ startup option is in the options text. */
typedef uint8_t dmrgo_dmrd_option_state_t;
/* Go: dmrdsession.OutputKind. OutputKind is the kind of an Output. */
typedef uint8_t dmrgo_dmrdsession_output_kind_t;
/* Go: dmrdsession.Reason. Reason is why a session ended. */
typedef uint8_t dmrgo_dmrdsession_reason_t;
/* Go: dmrdsession.State. State is the state of a session. */
typedef uint8_t dmrgo_dmrdsession_state_t;
/* Go: hytera.Service. Service is octet 20 of a P2P packet: the service that the repeater requests. */
typedef uint8_t dmrgo_hytera_service_t;
/* Go: hytera.SlotType. SlotType is octets 18 and 19 of a DMR frame: what the burst is, as one nibble four times. */
typedef uint16_t dmrgo_hytera_slot_type_t;
/* Go: ipsc.BurstType. BurstType is octet 30 of a user packet: the DMR data type for a data burst, DMRGO_IPSC_BURST_VOICE for a voice burst, DMRGO_IPSC_BURST_RAW for the raw information bits of a burst that the repeater could not decode, and DMRGO_IPSC_BURST_SYNC_LOST for a placeholder of a burst that it lost. */
typedef uint8_t dmrgo_ipsc_burst_type_t;
/* Go: ipsc.CallInfo. CallInfo is octet 17 of a user packet. */
typedef uint8_t dmrgo_ipsc_call_info_t;
/* Go: ipsc.Flag. Flag is one bit of the 4 flag octets of a peer. */
typedef uint8_t dmrgo_ipsc_flag_t;
/* Go: ipsc.Mode. Mode is the mode octet of a peer: operational, analog or digital, and the link state of each slot. */
typedef uint8_t dmrgo_ipsc_mode_t;
/* Go: ipsc.Opcode. Opcode is octet 0 of an IPSC packet. */
typedef uint8_t dmrgo_ipsc_opcode_t;
/* Go: ipsc.VoiceLayout. VoiceLayout is the form of a voice packet, which gives some superframe positions. */
typedef uint8_t dmrgo_ipsc_voice_layout_t;
/* Go: ipscsession.OutputKind. OutputKind is the kind of an Output. */
typedef uint8_t dmrgo_ipscsession_output_kind_t;
/* Go: ipscsession.Reason. Reason is why a link went down. */
typedef uint8_t dmrgo_ipscsession_reason_t;
/* Go: ipscsession.State. State is the state of a Peer or Master. */
typedef uint8_t dmrgo_ipscsession_state_t;
/* Go: mmdvm.CPU. CPU is the processor of a modem of protocol 2. */
typedef uint8_t dmrgo_mmdvm_cpu_t;
/* Go: mmdvm.Capabilities. Capabilities is the set of modes that a modem has: octets 4 (low) and 5 (high) of a protocol 2 version reply. */
typedef uint16_t dmrgo_mmdvm_capabilities_t;
/* Go: mmdvm.Command. Command is octet 2 of a frame (octet 3 of a long frame): what the frame carries. */
typedef uint8_t dmrgo_mmdvm_command_t;
/* Go: mmdvm.Control. Control is the first payload octet of a DMR data frame: how the modem found the burst. */
typedef uint8_t dmrgo_mmdvm_control_t;
/* Go: mmdvm.Mode. Mode is a mode of the modem, or a calibration state in a status reply. */
typedef uint8_t dmrgo_mmdvm_mode_t;
/* Go: mmdvm.NextResult. NextResult is the result of Next. */
typedef uint8_t dmrgo_mmdvm_next_result_t;
/* Go: trunk.OutputKind. OutputKind is the kind of an Output. */
typedef uint8_t dmrgo_trunk_output_kind_t;
/* Go: trunk.Reason. Reason is why a machine lost a TSCC, left a payload channel or failed a request. */
typedef uint8_t dmrgo_trunk_reason_t;
/* Go: trunk.State. State is the state of a Follower or an MS. */
typedef uint8_t dmrgo_trunk_state_t;
/* Go: trunk.Status. Status is the 7-bit value of the status call service. */
typedef uint8_t dmrgo_trunk_status_t;
/* Go: trunk.StunAction. StunAction is a supplementary service of a TSCC that disables or enables an MS (ETSI TS 102 361-4 clauses 6.4.9 and 6.4.10). */
typedef uint8_t dmrgo_trunk_stun_action_t;
/* Go: trunk.TSCCOutputKind. TSCCOutputKind is the kind of a TSCCOutput. */
typedef uint8_t dmrgo_trunk_tscc_output_kind_t;
/* Go: vocoder.FrameOutput. FrameOutput is what a Codec put in the samples of one vocoder frame. */
typedef uint8_t dmrgo_vocoder_frame_output_t;
/* Go: vocoder.FrameStatus. FrameStatus is what a Codec found in the slot of one vocoder frame. */
typedef uint8_t dmrgo_vocoder_frame_status_t;
/* Go: codec2.Mode. Mode is a Codec2 bit rate in bits per second. */
typedef int64_t dmrgo_codec2_mode_t;
/* Go: dvsi.Field. Field is a field identifier, the first byte of a field (AMBE-3000R manual Table 31). */
typedef uint8_t dmrgo_dvsi_field_t;
/* Go: dvsi.PacketType. PacketType is the fourth byte of a packet (AMBE-3000R manual Table 29). */
typedef uint8_t dmrgo_dvsi_packet_type_t;
/* Go: voice.EndReason. EndReason is why a call ended. */
typedef uint8_t dmrgo_voice_end_reason_t;
/* Go: voice.EventKind. EventKind is the kind of an Event. */
typedef uint8_t dmrgo_voice_event_kind_t;
/* Go: voice.InterrupterState. InterrupterState is the state of an Interrupter. */
typedef uint8_t dmrgo_voice_interrupter_state_t;
/* Go: voice.JitterResult. JitterResult is what Push did with a packet. */
typedef uint8_t dmrgo_voice_jitter_result_t;
/* Go: voice.Origin. Origin is the source from which a Receiver got the identity of a call. */
typedef uint8_t dmrgo_voice_origin_t;
/* Go: voice.OutputKind. OutputKind is the kind of an Output. */
typedef uint8_t dmrgo_voice_output_kind_t;
/* Go: voice.State. State is the state of a Receiver. */
typedef uint8_t dmrgo_voice_state_t;
/* Go: voice.TransmitterState. TransmitterState is the state of a Transmitter. */
typedef uint8_t dmrgo_voice_transmitter_state_t;
struct dmrgo_config_error_t {
/* Type is the package of the call, such as "voice" or "trunk", and Field the name of the field, such as "ColorCode" or "Header.Group". */
char *type;
size_t type_len;
/* Type is the package of the call, such as "voice" or "trunk", and Field the name of the field, such as "ColorCode" or "Header.Group". */
char *field;
size_t field_len;
};
struct dmrgo_field_range_error_t {
/* Type and Field name the PDU type and its field, such as "FLCGroupVoice" and "GroupAddress". For a value that a method takes, Field is the method, such as "SysCode" and "Unpack14". For a value that a package-level function or type takes, Type is the package and Field the function or type, such as "vocoder" and "AMBEFrame". */
char *type;
size_t type_len;
/* Type and Field name the PDU type and its field, such as "FLCGroupVoice" and "GroupAddress". For a value that a method takes, Field is the method, such as "SysCode" and "Unpack14". For a value that a package-level function or type takes, Type is the package and Field the function or type, such as "vocoder" and "AMBEFrame". */
char *field;
size_t field_len;
/* Bits is the width of the field in bits. */
int64_t bits;
/* Signed is true for a two's complement field. */
bool signed_;
/* Min and Max are the range of a coordinate field, or of an integer field that takes fewer values than its bits hold; both are 0 for another field. */
double min;
/* Min and Max are the range of a coordinate field, or of an integer field that takes fewer values than its bits hold; both are 0 for another field. */
double max;
};
struct dmrgo_fec_result_t {
/* BitsChecked is the number of coded bits that an error correcting code covers in this decode step. */
int64_t bits_checked;
/* ErrorsCorrected is the number of bit errors that were corrected. */
int64_t errors_corrected;
/* Uncorrectable is true if errors exceeded the correction capability of the code or an error detecting check failed. */
bool uncorrectable;
};
struct dmrgo_pdu_short_lc_t {
/* Short Link Control Opcode (SLCO) */
dmrgo_enums_slco_t slco;
/* result of the CRC-8 check */
dmrgo_fec_result_t fec;
/* RawPayload holds bits 4 to 27, the payload that SLCO selects, packed most significant bit first: bit 4 is the top bit of byte 0. */
uint8_t raw_payload[3];
};
struct dmrgo_bs_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Mode selects RF repeater or network arbiter. */
dmrgo_bs_mode_t mode;
/* ColorCode is the color code of the bursts the Repeater sends, and the only one it takes from RF. */
dmrgo_enums_color_code_t color_code;
/* Activation selects what wakes up the Repeater in DMRGO_BS_MODE_RF. */
dmrgo_bs_activation_t activation;
/* CACH makes the Repeater send the CACH and Idle bursts in DMRGO_BS_MODE_RF: true for an SDR or a microcontroller modulator, false for an MMDVM modem, whose firmware makes them. */
bool cach;
/* CallHang is the call hang time T_CallHt. 0 means DMRGO_CONSTANTS_T_CALL_HANG (3 s). A broadcast call and a call to DMRGO_CONSTANTS_ALL_MSID have none (ETSI TS 102 361-2 clause 5.3.2.3.2). */
dmrgo_duration_t call_hang;
/* DataHang is the data hang time T_DataHngtime after confirmed data. 0 means DMRGO_CONSTANTS_T_DATA_HANGTIME (180 ms). */
dmrgo_duration_t data_hang;
/* Inactivity is T_MSInactiv. 0 means DMRGO_BS_DEFAULT_INACTIVITY. A negative value keeps the transmitter on once it wakes up. */
dmrgo_duration_t inactivity;
/* Lost is the time without a burst from the owner of a slot after which its call or its Pre_CSBKs end. 0 means DMRGO_VOICE_DEFAULT_LOST (1 s). */
dmrgo_duration_t lost;
/* Timeout is the longest call. 0 means DMRGO_CONSTANTS_TTO (180 s). A longer call ends with a Terminator and the rest of it is dropped. */
dmrgo_duration_t timeout;
/* Headers is the number of Voice LC Headers that start a repeated call. 0 means 1, at most DMRGO_VOICE_MAX_HEADERS. A call that the Repeater joins late, without its Voice LC Header, starts with one header, as dmrgo_voice_transmitter_relay does. */
int64_t headers;
/* Terminators is the number of Terminators with LC that end a repeated call, before the call hang time. 0 means 1, at most DMRGO_VOICE_MAX_TERMINATORS. */
int64_t terminators;
/* Pending is the number of refused sources per slot that wait for the slot and get it in turn when it is free. 0 means DMRGO_BS_DEFAULT_PENDING, at most DMRGO_BS_MAX_PENDING. A negative value queues none: the first burst after the slot is free takes it. */
int64_t pending;
/* PendingAge is the longest time a source waits for a slot. 0 means DMRGO_BS_DEFAULT_PENDING_AGE. */
dmrgo_duration_t pending_age;
/* DataQueue is the number of data and CSBK bursts per slot that wait for the outbound channel in DMRGO_BS_MODE_RF. 0 means DMRGO_BS_DEFAULT_DATA_QUEUE, at most DMRGO_BS_MAX_DATA_QUEUE. */
int64_t data_queue;
/* Silence is the 72-bit vocoder slot that fills lost voice. The zero value means dmrgo_vocoder_ambe_silence_slot. A call with a FID other than DMRGO_ENUMS_FID_STANDARDIZED and DMRGO_ENUMS_FID_MOTOROLA, such as a Codec2 call, repeats its last vocoder slot instead, as dmrgo_voice_transmitter_config_t gives. */
uint8_t silence[9];
/* Lead makes Tick emit an outbound burst this long before its Due time in DMRGO_BS_MODE_RF, so that a transmit FIFO can be filled ahead. 0 means at Due; it must not be negative. */
dmrgo_duration_t lead;
/* ChannelAuth selects the channel authorization of RF access in the call and channel hang time in DMRGO_BS_MODE_RF. DMRGO_BS_MODE_NETWORK ignores it. (ETSI TS 102 361-2 clause 5.1.1.6) */
dmrgo_bs_channel_auth_t channel_auth;
/* ChanAuthResponse is T_BS_ChanAuthRsp, how long the Repeater repeats a ChanAuth PDU while it waits for the authorized MS. 0 means DMRGO_CONSTANTS_TBS_CHAN_AUTH_RSP_VOICE for a Voice LC Header, and DMRGO_CONSTANTS_TBS_CHAN_AUTH_RSP_CSBK_SINGLE or DMRGO_CONSTANTS_TBS_CHAN_AUTH_RSP_CSBK_MULTI for a Pre_CSBK. (ETSI TS 102 361-2 clause A.1) */
dmrgo_duration_t chan_auth_response;
/* ChanAuthSelect is T_BS_ChanAuthSel of DMRGO_BS_CHANNEL_AUTH_MULTI_SITE. 0 means DMRGO_CONSTANTS_TBS_CHAN_AUTH_SEL (240 ms). (ETSI TS 102 361-2 clause A.1) */
dmrgo_duration_t chan_auth_select;
/* Scratch, when set, is the Burst that the Repeater decodes into. It can be shared with other machines on the same thread, because the Repeater is done with it when its method returns. NULL means the Repeater makes its own. */
dmrgo_layer2_burst_t *scratch;
/* Jitter is the playout delay of the network jitter buffer of each slot, a dmrgo_voice_jitter_t, which puts the voice bursts from a network source back in the order of dmrgo_layer2_hint_t.seq and plays them this long after the first burst of a stream arrived, as the Jitter of MMDVMHost does. Voice bursts are the voice bursts, the Voice LC Header, the PI Header and the Terminator with LC. 0 means DMRGO_VOICE_DEFAULT_JITTER (360 ms), and a negative value turns the buffer off, so that each burst is taken as it comes. At most DMRGO_VOICE_MAX_JITTER. RF bursts, and bursts without dmrgo_layer2_hint_t.has_seq, are taken as they come. In DMRGO_BS_MODE_RF the Repeater takes a burst from the buffer up to one burst period and Lead before its time, because the outbound channel takes the voice of a slot that far ahead. The dmrgo_voice_jitter_t doc gives the rules for late, lost and duplicate bursts, stalls and new streams. Data, CSBK, MBC and other bursts of a network source have no playout delay. Such a burst is taken when it comes, in DMRGO_BS_MODE_RF as soon as the data queue of the slot has room, with these exceptions. A burst after a gap in dmrgo_layer2_hint_t.seq waits for the gap to fill for at most one burst period (60 ms) after the first burst behind the gap came, because the blocks of unconfirmed data must go out in order; a stream whose gaps never fill, such as one of a sender that counts both slots, does not wait again. A rate 1/2, 3/4 or 1 data block whose own Data Header has not come yet waits for it at most one superframe (360 ms) after the block came, because a block without its header is dropped. A copy of a burst taken is dropped, and a burst that comes after a later one of its stream is taken late. A burst of a data stream that a source starts while its voice is still in the jitter buffer waits for that voice to play, because the slot carries one call at a time: until the Terminator of the call plays, or the buffer holds no more voice of the source. */
dmrgo_duration_t jitter;
};
struct dmrgo_layer2_raw_burst_t {
uint8_t v[33];
};
struct dmrgo_layer2_hint_t {
/* Slot is the TDMA channel, or DMRGO_ENUMS_SLOT_UNKNOWN. */
dmrgo_enums_slot_t slot;
/* Kind is the burst kind from the transport, for example the DMRD frame type. DMRGO_LAYER2_KIND_UNKNOWN classifies the burst by its SYNC field. */
dmrgo_layer2_kind_t kind;
/* VoiceBurst is the superframe position from the transport, for example the DMRD voice sequence or an IPSC burst type. DMRGO_ENUMS_VOICE_BURST_UNKNOWN means not known. */
dmrgo_enums_voice_burst_type_t voice_burst;
/* DataType is the data type from the transport. HasDataType reports whether it is set. */
dmrgo_enums_data_type_t data_type;
/* HasDataType reports whether DataType is set. */
bool has_data_type;
/* Seq is the transport sequence number, for example the RTP or DMRD sequence number. HasSeq reports whether it is set. */
uint16_t seq;
/* HasSeq reports whether Seq is set. */
bool has_seq;
/* SeqBits is the width of Seq in bits, after which it wraps to 0. 0 means 16, as for an RTP sequence number. The DMRD sequence number of HomeBrew has 8. */
uint8_t seq_bits;
/* At is the time at which the packet arrived, on the clock of the caller, as the now of the session machines. 0 means not known, as for a replay without times. PositionTracker counts the 60 ms burst periods since the burst before it to find the bursts lost after a sync loss, or fewer than the missing sequence numbers. */
dmrgo_duration_t at;
/* Stream is the transport stream ID. HasStream reports whether it is set. */
uint32_t stream;
/* HasStream reports whether Stream is set. */
bool has_stream;
/* End is the end-of-call flag of the transport and how reliable it is. */
dmrgo_layer2_end_hint_t end;
/* SyncLost reports that the transport lost the signal before this burst, for example an MMDVM TAG_LOST or an IPSC "sync not detected" burst. */
bool sync_lost;
};
struct dmrgo_bs_source_t {
/* RF reports a burst from the receiver of the Repeater. */
bool rf;
/* Peer is the network peer, such as a repeater ID. It is 0 for RF. */
uint32_t peer;
};
struct dmrgo_layer3_service_options_t {
/* emergency service */
bool is_emergency;
/* privacy, which ETSI TS 102 361-2 does not define */
bool is_privacy;
/* reserved bits */
uint8_t reserved;
/* broadcast service, for group calls only */
bool is_broadcast;
/* Open Voice Call Mode (OVCM) call */
bool is_open_voice_call_mode;
/* 0 is no priority, 1 to 3 are priorities 1 to 3 (3 is highest) */
uint8_t priority_level;
};
struct dmrgo_pdu_lc_bytes_t {
uint8_t v[9];
};
struct dmrgo_voice_call_t {
/* Group reports whether Target is a talkgroup (Grp_V_Ch_Usr) rather than a radio (UU_V_Ch_Usr). */
bool group;
/* Target is the 24-bit talkgroup or radio address. */
uint32_t target;
/* Source is the 24-bit address of the talking radio. */
uint32_t source;
/* Options is the Service Options of the LC. */
dmrgo_layer3_service_options_t options;
/* FID is the feature set ID of the LC. */
dmrgo_enums_fid_t fid;
/* LC is the 9 LC octets as received. It is zero for DMRGO_VOICE_ORIGIN_UNKNOWN and for a DMRGO_VOICE_ORIGIN_EXPECTED call until a header or embedded LC with the same addresses arrives. */
dmrgo_pdu_lc_bytes_t lc;
/* Origin is the source from which the Receiver got the call. */
dmrgo_voice_origin_t origin;
/* Stream is dmrgo_layer2_hint_t.stream when the transport gives one, else 0. */
uint32_t stream;
};
struct dmrgo_bs_output_t {
/* Kind is the kind of the output. */
dmrgo_bs_output_kind_t kind;
/* Slot is the TDMA channel. */
dmrgo_enums_slot_t slot;
/* To is where a DMRGO_BS_OUTPUT_BURST goes. */
dmrgo_bs_dest_t to;
/* HasCACH reports that CACH is set. */
bool has_cach;
/* CACH is the CACH field before the burst, in transmit order, packed as dmrgo_layer2_decode_cach_field takes it. */
uint8_t cach[3];
/* Burst is the burst to send, with the color code and BS SYNC of the Repeater. */
dmrgo_layer2_raw_burst_t burst;
/* Hint is what Burst is, for a transport: Slot, and DMRGO_LAYER2_KIND_VOICE with the superframe position or DMRGO_LAYER2_KIND_DATA with the data type. */
dmrgo_layer2_hint_t hint;
/* Due is the time at which the burst goes out. */
dmrgo_duration_t due;
/* From is the source of the call that the output belongs to. */
dmrgo_bs_source_t from;
/* Service is what the source uses the slot for. */
dmrgo_bs_service_t service;
/* Call is the identity of the call. For data it has Group, Target and Source from the data header. */
dmrgo_voice_call_t call;
/* End is why the call ended. */
dmrgo_voice_end_reason_t end;
/* Reason is why the source was refused. */
dmrgo_bs_reason_t reason;
};
struct dmrgo_voice_jitter_stats_t {
/* Late is the number of packets dropped as late: those that Push returned DMRGO_VOICE_JITTER_LATE for, and buffered packets that a later packet made late, at the start of the playout or when it moved earlier. */
uint32_t late;
/* Duplicates is the number of packets that Push returned DMRGO_VOICE_JITTER_DUPLICATE for. */
uint32_t duplicates;
/* Overflows is the number of packets that Push returned DMRGO_VOICE_JITTER_OVERFLOW for. */
uint32_t overflows;
/* Resyncs is the number of times the playout started again after a stall longer than the delay, a jump of the sequence number, or a Pop that came more than the delay after a Due time. */
uint32_t resyncs;
};
struct dmrgo_csbk_match_t {
/* FID is the feature set ID of the answer. */
dmrgo_enums_fid_t fid;
/* Opcodes holds the opcodes of the answer. */
dmrgo_pdu_csbk_opcode_t opcodes[4];
/* N is the number of Opcodes that are used, from 1 to 4. */
int64_t n;
};
struct dmrgo_csbk_preambles_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Scratch, when set, is the Burst that Burst decodes into, as for dmrgo_csbk_requester_config_t.scratch. */
dmrgo_layer2_burst_t *scratch;
};
struct dmrgo_csbk_requester_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* ColorCode is the color code of the slot types of the bursts sent. Other than 0, it also drops received CSBKs with another color code, as dmrgo_csbk_wakeup_config_t.color_code does; 0 accepts every color code. */
dmrgo_enums_color_code_t color_code;
/* Source selects the SYNC pattern: DMRGO_LAYER2_SYNC_SOURCE_BS, the zero value, for a repeater outbound, DMRGO_LAYER2_SYNC_SOURCE_MS for a radio. */
dmrgo_layer2_sync_source_t source;
/* AckWait is T_AckWait, the wait for the answer after each try. 0 means DMRGO_CONSTANTS_T_ACK_WAIT (360 ms), and DMRGO_CSBK_DEFAULT_MOTOROLA_ACK_WAIT for the Motorola radio check and call alert. A negative value waits until an answer or Cancel. (ETSI TS 102 361-2 clause A.1) */
dmrgo_duration_t ack_wait;
/* Retries is N_CSBKRetry, the number of tries after the first. 0 means DMRGO_CONSTANTS_NCSBK_RETRY (1), a negative value means none, and it is at most DMRGO_CSBK_MAX_RETRIES. */
int64_t retries;
/* IdleSearch is T_IdleSrch, the wait for an idle channel before a polite time critical try. 0 means DMRGO_CSBK_DEFAULT_IDLE_SEARCH, and a negative value does not wait. */
dmrgo_duration_t idle_search;
/* HoldoffMax is the upper end of the random holdoff T_Holdoff of a request that is not time critical: a polite try on a busy channel waits a random holdoff, and then another while the channel stays busy. 0 means DMRGO_CSBK_DEFAULT_HOLDOFF_MAX, and a negative value means no holdoff: the try waits for an idle channel. (ETSI TS 102 361-1 clause 5.2.2.3) */
dmrgo_duration_t holdoff_max;
/* Seed seeds the generator of the random holdoff, so that the same inputs give the same outputs. Requesters on one channel need different seeds. */
uint64_t seed;
/* Scratch, when set, is the Burst that Burst decodes into. Machines that run on one thread can share one, because a machine is done with it when its method returns. Make it with dmrgo_layer2_new_burst. NULL means the Requester makes its own. */
dmrgo_layer2_burst_t *scratch;
/* Lead makes Tick emit a burst this long before its Due time, so that an RF FIFO can be filled ahead. 0 means at Due; it must not be negative. The timers of the machine keep to the Due times. */
dmrgo_duration_t lead;
/* Slot is the TDMA slot of the machine, which it puts in the Hint of each burst it sends. It must be DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2. */
dmrgo_enums_slot_t slot;
};
struct dmrgo_csbk_responder_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Address is the 24-bit address of the radio. The Responder answers the CSBKs that address it. */
uint32_t address;
/* ColorCode is the color code of the slot types of the bursts sent. Other than 0, it also drops received CSBKs with another color code, as dmrgo_csbk_wakeup_config_t.color_code does; 0 accepts every color code. */
dmrgo_enums_color_code_t color_code;
/* Source selects the SYNC pattern: DMRGO_LAYER2_SYNC_SOURCE_BS, the zero value, for a repeater outbound, DMRGO_LAYER2_SYNC_SOURCE_MS for a radio. */
dmrgo_layer2_sync_source_t source;
/* Access is the channel access policy of the answers. The zero value is polite to own color code. */
dmrgo_enums_access_t access;
/* OACSU is the answer to UU_V_Req. The zero value is DMRGO_CSBK_OACSU_PROCEED. */
dmrgo_csbk_oacsu_answer_t oacsu;
/* NoRadioCheck leaves Motorola radio checks without an answer and without a DMRGO_CSBK_OUTPUT_REQUEST. An AnyTone radio answers them only when its settings allow it. */
bool no_radio_check;
/* NoCallAlert leaves Motorola call alerts without an acknowledgement and without a DMRGO_CSBK_OUTPUT_REQUEST. */
bool no_call_alert;
/* NoFNS leaves standard CSBKs that the Responder does not support without the Feature Not Supported NACK_Rsp, which is mandatory for an MS. Their DMRGO_CSBK_OUTPUT_REQUEST stays. (ETSI TS 102 361-2 clause 5.1.2) */
bool no_fns;
/* IdleSearch is T_IdleSrch, the wait for an idle channel before a polite answer other than NACK_Rsp. 0 means DMRGO_CSBK_DEFAULT_IDLE_SEARCH, and a negative value does not wait. */
dmrgo_duration_t idle_search;
/* HoldoffMax is the upper end of the random holdoff T_Holdoff of a NACK_Rsp: a polite NACK_Rsp on a busy channel waits a random holdoff, and then another while the channel stays busy. 0 means DMRGO_CSBK_DEFAULT_HOLDOFF_MAX, and a negative value means no holdoff: the NACK_Rsp waits for an idle channel. (ETSI TS 102 361-2 clause 5.1.2.2) */
dmrgo_duration_t holdoff_max;
/* Seed seeds the generator of the random holdoff. */
uint64_t seed;
/* Scratch, when set, is the Burst that Burst decodes into, as for dmrgo_csbk_requester_config_t.scratch. */
dmrgo_layer2_burst_t *scratch;
/* Lead makes Tick emit a burst this long before its Due time, so that an RF FIFO can be filled ahead. 0 means at Due; it must not be negative. The timers of the machine keep to the Due times. */
dmrgo_duration_t lead;
/* Slot is the TDMA slot of the machine, which it puts in the Hint of each burst it sends. It must be DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2. */
dmrgo_enums_slot_t slot;
/* Offset puts the answers on the offset channel timing of a BS, in which the inbound slot of a logical channel starts half a TDMA frame after its outbound slot: the answer starts 90 ms after the start of the request, and then on that grid. The zero value is the aligned channel timing of a BS, and a direct channel, where it starts 60 ms after. (ETSI TS 102 361-1 clause 5.1.1, Table 5.1) */
bool offset;
};
struct dmrgo_csbk_timing_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* ID is MS_ID, the 20-bit identifier of the radio in its wide area timing identifier, from 1 to DMRGO_CSBK_MAX_TIMING_ID. The Timing picks a new one when another radio uses it (ETSI TS 102 361-2 clause 6.2.3.7). */
uint32_t id;
/* DynamicID is MS_DI, the leader preference of the radio from 0 to DMRGO_CSBK_MAX_DYNAMIC_ID. 0 means the radio is not eligible to be the leader. (ETSI TS 102 361-2 clause 7.2.9) When a radio without a leader hears one with the same DynamicID, other than 0, the one with the higher WATID (DynamicID and ID) becomes the leader. This is a tie-break of dmrgo: ETSI TS 102 361-2 clause 6.2.3.7 has both radios send CT_CSBK_Req, so that neither ever appoints a leader. */
uint8_t dynamic_id;
/* Slot is the provisioned time slot, DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2. It selects the TDMA direct mode SYNC of the CT_CSBKs, and is the Slot of the Hint of each burst. (ETSI TS 102 361-2 clause 6.2) */
dmrgo_enums_slot_t slot;
/* Seed seeds the generator of CT_RHOT and of new identifiers, so that the same inputs give the same outputs. Radios on one channel need different seeds. (ETSI TS 102 361-2 clause 6.2) */
uint64_t seed;
/* Scratch, when set, is the Burst that Burst decodes into, as for dmrgo_csbk_requester_config_t.scratch. (ETSI TS 102 361-2 clause 6.2) */
dmrgo_layer2_burst_t *scratch;
/* Lead makes Tick emit a burst this long before its Due time, so that an RF FIFO can be filled ahead. 0 means at Due; it must not be negative. The timers of the machine keep to the Due times. */
dmrgo_duration_t lead;
};
struct dmrgo_csbk_wakeup_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* ColorCode is the color code of the BS, of the slot type of the BS_Dwn_Act bursts and of the outbound that ends the wakeup. */
dmrgo_enums_color_code_t color_code;
/* SyncWait is T_SyncWu, the wait for the outbound after each BS_Dwn_Act. 0 means DMRGO_CSBK_DEFAULT_SYNC_WAIT, and a negative value waits until the outbound or Cancel. */
dmrgo_duration_t sync_wait;
/* Attempts is N_Wakeup, the most BS_Dwn_Act bursts. 0 means DMRGO_CSBK_DEFAULT_WAKEUPS; at most DMRGO_CSBK_MAX_RETRIES. */
int64_t attempts;
/* Scratch, when set, is the Burst that Burst decodes into, as for dmrgo_csbk_requester_config_t.scratch. */
dmrgo_layer2_burst_t *scratch;
/* Lead makes Tick emit a burst this long before its Due time, so that an RF FIFO can be filled ahead. 0 means at Due; it must not be negative. The timers of the machine keep to the Due times. */
dmrgo_duration_t lead;
/* Slot is the TDMA slot of the machine, which it puts in the Hint of each burst it sends. It must be DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2. */
dmrgo_enums_slot_t slot;
};
struct dmrgo_layer2_call_t {
/* Group reports whether Target is a talkgroup rather than a radio. */
bool group;
/* Target is the 24-bit talkgroup or radio address. */
uint32_t target;
/* Source is the 24-bit address of the radio that sends. */
uint32_t source;
};
struct dmrgo_pdu_csbk_bytes_t {
uint8_t v[12];
};
struct dmrgo_csbk_output_t {
/* Kind is the kind of the output. */
dmrgo_csbk_output_kind_t kind;
/* Service is the service of DMRGO_CSBK_OUTPUT_DONE and DMRGO_CSBK_OUTPUT_REQUEST. */
dmrgo_csbk_service_t service;
/* Result is how the request ended, for DMRGO_CSBK_OUTPUT_DONE. */
dmrgo_csbk_result_t result;
/* Reason is the reason code of a NACK_Rsp, for DMRGO_CSBK_RESULT_NACK. */
dmrgo_csbk_reason_t reason;
/* Burst is the burst to send, for DMRGO_CSBK_OUTPUT_BURST. */
dmrgo_layer2_raw_burst_t burst;
/* Hint is what Burst is, for a transport: DMRGO_LAYER2_KIND_DATA with DMRGO_ENUMS_DATA_TYPE_CSBK, and the Slot of the config of the machine. */
dmrgo_layer2_hint_t hint;
/* Due is the start of the burst to send, the time at which it goes on air, 60 ms after the one before it. The answer of a Responder goes in the slot of its logical channel a TDMA frame after the start of the request, or a whole number of TDMA frames after that. */
dmrgo_duration_t due;
/* Call is the call: of the burst, for DMRGO_CSBK_OUTPUT_BURST; of the request, for DMRGO_CSBK_OUTPUT_DONE and DMRGO_CSBK_OUTPUT_REQUEST; and of the Pre_CSBKs, for DMRGO_CSBK_OUTPUT_ANNOUNCED, DMRGO_CSBK_OUTPUT_JOINED and DMRGO_CSBK_OUTPUT_EXPIRED. Group reports a talkgroup Target of a request or Pre_CSBK. It is zero for the CT_CSBKs of a Timing, which carry no addresses. */
dmrgo_layer2_call_t call;
/* Data reports that data follows the Pre_CSBKs, for DMRGO_CSBK_OUTPUT_ANNOUNCED and DMRGO_CSBK_OUTPUT_EXPIRED, and that a data header followed them, for DMRGO_CSBK_OUTPUT_JOINED. It is false for a CSBK. */
bool data;
/* Until is the end of the transfer that the Pre_CSBKs announce, for DMRGO_CSBK_OUTPUT_ANNOUNCED and DMRGO_CSBK_OUTPUT_EXPIRED. */
dmrgo_duration_t until;
/* CSBK is the answer, for DMRGO_CSBK_OUTPUT_DONE of a request that ended with an answer; the request, for DMRGO_CSBK_OUTPUT_REQUEST; the CSBK that followed the Pre_CSBKs, for DMRGO_CSBK_OUTPUT_JOINED of a CSBK; and the CT_CSBK, for DMRGO_CSBK_OUTPUT_TIMING. */
dmrgo_pdu_csbk_bytes_t csbk;
};
struct dmrgo_csbk_request_options_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Access is the channel access policy of each try. A polite try waits for Channel to report an idle channel. */
dmrgo_enums_access_t access;
/* TimeCritical denies the request when the channel stays busy for T_IdleSrch, without a random holdoff (ETSI TS 102 361-2 Figure 5.22). */
bool time_critical;
/* Preambles is the number of Pre_CSBKs before the first try, for radios that scan or sleep. 0 means none; at most DMRGO_CSBK_MAX_PREAMBLES. An AnyTone radio sends 5 before a radio check. */
int64_t preambles;
/* RetryPreambles is the number of Pre_CSBKs before each retry. 0 means Preambles; at most DMRGO_CSBK_MAX_PREAMBLES. An AnyTone radio sends 15. */
int64_t retry_preambles;
};
struct dmrgo_pdu_csbk_t {
/* LB bit, true for the last block */
bool last_block;
/* PF bit */
bool protect_flag;
/* CSBKO, selects the payload */
dmrgo_pdu_csbk_opcode_t opcode;
/* feature set ID, selects the payload with Opcode */
dmrgo_enums_fid_t fid;
/* result of the CRC check */
dmrgo_fec_result_t fec;
/* Hint0x38 is the likely meaning of opcode 0x38. DecodeCSBK leaves it DMRGO_PDU_OPCODE0X38_UNKNOWN. dmrgo_layer2_burst_t sets it from the SYNC of the burst, which a network relay can rewrite. Each SetX resets it, except the two 0x38 setters, which set it. */
dmrgo_pdu_opcode0x38_hint_t hint0x38;
/* RawPayload holds CSBK octets 2 to 9 (bits 16 to 79), the payload that Opcode and FID select. */
uint8_t raw_payload[8];
};
struct dmrgo_data_call_t {
/* Group reports whether Target is a talkgroup rather than a radio. */
bool group;
/* Target is the 24-bit destination LLID. */
uint32_t target;
/* Source is the 24-bit source LLID. */
uint32_t source;
};
struct dmrgo_pdu_data_header_t {
/* result of the header CRC check */
dmrgo_fec_result_t fec;
/* RawPayload holds header bits 0 to 79, packed most significant bit first: bit 0 is the top bit of byte 0. */
uint8_t raw_payload[10];
};
struct dmrgo_pdu_proprietary_header_t {
/* SAP identifier */
dmrgo_enums_sap_t sap;
/* manufacturer FID */
dmrgo_enums_fid_t mfid;
/* manufacturer data, header octets 2 to 9 */
uint8_t manufacturer_data[8];
};
struct dmrgo_data_message_t {
/* Header is the first header of the packet. Its format and payload give the kind of packet and the addresses. The zero value is a UDT_HEAD with LLIDs 0. Set it with a SetX method of dmrgo_pdu_data_header_t, build it from its payload, such as with dmrgo_pdu_confirmed_data_header_data_header, or set an R_HEAD with dmrgo_data_message_set_raw_data. */
dmrgo_pdu_data_header_t header;
/* Proprietary is the P_HEAD sent as the second header, or has_proprietary false. */
bool has_proprietary;
dmrgo_pdu_proprietary_header_t proprietary;
/* Rate is the data type of the blocks: DMRGO_ENUMS_DATA_TYPE_RATE12, DMRGO_ENUMS_DATA_TYPE_RATE34 or DMRGO_ENUMS_DATA_TYPE_RATE1. For dmrgo_data_sender_send the zero value means DMRGO_ENUMS_DATA_TYPE_RATE12. */
dmrgo_enums_data_type_t rate;
/* Payload is the user data, without the pad octets and the message CRC. A packet whose first header was lost keeps its pad octets, as only a first try counts them, unless a later try resent every block, as dmrgo_packet_message_t.data describes. It holds at most DMRGO_DATA_MAX_MESSAGE octets (ETSI TS 102 361-1 clause 9.3.20). */
uint8_t *payload;
size_t payload_len;
/* BadCRC reports a packet whose CRC failed, which a Receiver delivers only with dmrgo_data_receiver_config_t.accept_bad_crc. */
bool bad_crc;
/* Fragmented reports a packet that continues a message of several fragments, with an FSN of 1 to 7 in its low bits, and so is not a whole message. The first fragment, FSN 0000, is delivered as a whole message, because repeaters and radios also send single packets with FSN 0000; DMRGO_DATA_EVENT_REASSEMBLED then carries the whole message. */
bool fragmented;
/* Fragments is the number of fragments of a reassembled message. */
uint16_t fragments;
};
struct dmrgo_packet_response_data_t {
/* Retry[i] is set to request the block with DBSN i again */
bool retry[127];
};
struct dmrgo_data_stats_t {
/* Packets is the number of packets that completed, delivered or not. */
uint16_t packets;
/* Delivered is the number of DMRGO_DATA_EVENT_DELIVERED. */
uint16_t delivered;
/* Blocks is the number of data blocks received. */
uint16_t blocks;
/* Lost is the number of data blocks that did not arrive or did not decode. */
uint16_t lost;
/* HeaderCRC is the number of data headers dropped for a bad CRC. */
uint16_t header_crc;
/* BadCRC is the number of packets whose message CRC or block CRC failed. */
uint16_t bad_crc;
/* Duplicates is the number of confirmed packets dropped as a copy of the packet before (N(S) equal to VI). */
uint16_t duplicates;
/* OutOfSequence is the number of confirmed packets refused for an N(S) that is neither VI nor VI + 1. */
uint16_t out_of_sequence;
/* Dropped is the number of other bursts dropped: blocks without a header, packets over DMRGO_DATA_MAX_BLOCKS, headers that the Assembler refused, headers with a null target or source address, and the packets of a sliding window after one that failed or was lost. */
uint16_t dropped;
/* Duration is the time from the start of the call to its end. */
dmrgo_duration_t duration;
};
struct dmrgo_data_event_t {
/* Kind is the kind of the event. */
dmrgo_data_event_kind_t kind;
/* Call is the data call the event belongs to. */
dmrgo_data_call_t call;
/* Message is the delivered packet. */
dmrgo_data_message_t message;
/* Response is the response heard or sent. */
dmrgo_packet_response_t response;
/* Retry is the selective retry flags of a SACK heard, or has_retry false. */
bool has_retry;
dmrgo_packet_response_data_t retry;
/* Burst is the response burst to send. */
dmrgo_layer2_raw_burst_t burst;
/* Due is the time at which the response burst goes on air, 60 ms after the one before it. */
dmrgo_duration_t due;
/* Reason is why the call ended. */
dmrgo_data_end_reason_t reason;
/* Stats counts what the Receiver saw during the call. */
dmrgo_data_stats_t stats;
};
struct dmrgo_pdu_raw_data_header_t {
/* true when LLIDDestination is a group */
bool group;
/* Response Requested (A) */
bool response_requested;
/* Appended Blocks (AB); bits 2 and 3 are the MSBs */
uint8_t appended_blocks;
/* SAP identifier */
dmrgo_enums_sap_t sap;
/* destination LLID */
uint32_t llid_destination;
/* source LLID */
uint32_t llid_source;
/* Source Port (SP) */
uint8_t source_port;
/* Destination Port (DP) */
uint8_t destination_port;
/* Selective Automatic Repeat reQuest (SARQ) */
bool sarq;
/* Full Message Flag (F) */
bool full_message_flag;
/* Bit Padding field */
uint8_t bit_padding;
};
struct dmrgo_data_receiver_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* ColorCode, when set, drops bursts with another color code, and is the color code of the responses. has_color_code false accepts every color code and answers with the color code of the packet. */
bool has_color_code;
dmrgo_enums_color_code_t color_code;
/* Address is the LLID of this station. A confirmed packet gets a response only when its destination is Address. 0 answers every confirmed packet to a radio, as a gateway does. */
uint32_t address;
/* Respond makes the Receiver answer confirmed packets with an ACK, NACK or SACK (DMRGO_DATA_EVENT_RESPOND), and drop duplicate and out of sequence packets outside the IP bearer service, as the package doc describes. False delivers every complete packet and answers none, as a scanner or bridge needs. */
bool respond;
/* Source selects the SYNC of the responses: DMRGO_LAYER2_SYNC_SOURCE_BS, the zero value, for a repeater outbound, DMRGO_LAYER2_SYNC_SOURCE_MS for a radio. */
dmrgo_layer2_sync_source_t source;
/* ResponseDelay is the time from the last block of a packet to the first response burst. 0 means one slot period (60 ms), the next burst of the logical channel, and a negative value means at once. */
dmrgo_duration_t response_delay;
/* MaxBlocks is the most data blocks of a packet. 0 means DMRGO_DATA_MAX_BLOCKS; a larger packet is dropped. Each block takes 24 bytes, so a microcontroller can set 16. */
int64_t max_blocks;
/* MaxFragment is the largest payload of one packet. 0 means DMRGO_DATA_DEFAULT_MAX_FRAGMENT; at most DMRGO_DATA_MAX_MESSAGE. A larger confirmed packet gets a NACK for memory full, and any larger packet is dropped. */
int64_t max_fragment;
/* MaxMessage is the size of the buffer that joins the fragments of a confirmed message. 0 means DMRGO_DATA_DEFAULT_MAX_MESSAGE; at most DMRGO_DATA_MAX_MESSAGE. A longer message is not joined; its fragments are still delivered. */
int64_t max_message;
/* Peers is the number of links whose receive sequence number VI the Receiver keeps. 0 means DMRGO_DATA_DEFAULT_PEERS; at most DMRGO_DATA_MAX_PEERS. When the table is full, the link heard least recently is dropped (ETSI TS 102 361-1 clause 9.3.24). */
int64_t peers;
/* Lost is the time without a burst, while a packet waits for blocks, after which the slots that passed count as lost blocks, one each 60 ms. 0 means DMRGO_DATA_DEFAULT_LOST, and a negative value counts lost blocks only from the transport sequence number and at the end of the call. A network transport with jitter sets dmrgo_layer2_hint_t.seq and a longer Lost. */
dmrgo_duration_t lost;
/* Hang is the time without a burst after which a data call ends with DMRGO_DATA_END_QUIET. 0 means DMRGO_DATA_DEFAULT_HANG, and a negative value turns the timer off. */
dmrgo_duration_t hang;
/* AcceptBadCRC delivers packets whose CRC failed, with dmrgo_data_message_t.bad_crc set, as dmrgo_packet_assembler_set_accept_bad_crc describes. A confirmed packet still gets a NACK, so that a good copy can follow. */
bool accept_bad_crc;
/* Scratch, when set, is the Burst that Burst decodes into. Machines that run on one thread can share one, because a Receiver is done with it when its method returns. Make it with dmrgo_layer2_new_burst. NULL means the Receiver makes its own. */
dmrgo_layer2_burst_t *scratch;
};
struct dmrgo_data_sender_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* ColorCode is the color code of the bursts. */
dmrgo_enums_color_code_t color_code;
/* Source selects the SYNC patterns: DMRGO_LAYER2_SYNC_SOURCE_BS, the zero value, for a repeater outbound, DMRGO_LAYER2_SYNC_SOURCE_MS for a radio. */
dmrgo_layer2_sync_source_t source;
/* Access is the channel access policy. The zero value, DMRGO_ENUMS_ACCESS_POLITE_OWN_C_C, sends only while Channel last reported the channel idle (ETSI TS 102 361-1 clause 5.2.1.6). */
dmrgo_enums_access_t access;
/* Preambles is the number of preamble CSBKs before the header of each try, so that a radio in power save wakes up. A try that starts within DMRGO_DATA_DEFAULT_HANG of a response from the target sends at most one, as the target is still in the data call, and one Pre_CSBK is the ChanAuth PDU of data in channel hangtime (ETSI TS 102 361-2 clause 5.1.1.6.0). 0 means DMRGO_DATA_DEFAULT_PREAMBLES, and a negative value sends none; at most DMRGO_DATA_MAX_PREAMBLES. */
int64_t preambles;
/* IdleSearch is the time that a polite Sender waits for an idle channel before it holds off. 0 means DMRGO_DATA_DEFAULT_IDLE_SEARCH, and a negative value holds off at once. */
dmrgo_duration_t idle_search;
/* Holdoff is the longest random holdoff T_Holdoff after a busy channel. 0 means DMRGO_CONSTANTS_T_HOLDOFF_MAX (2 s), and a negative value turns the holdoff off. */
dmrgo_duration_t holdoff;
/* ResponseWait is the time T_RspnsWait from the end of the last burst to the response of a confirmed packet. 0 means DMRGO_CONSTANTS_T_RESPONSE_WAIT (180 ms). A response that comes through a network can need more; DMRGO_CONSTANTS_T_RESPONSE_WAIT_SIMULCAST is 2 s. */
dmrgo_duration_t response_wait;
/* TxLimit is the time T_DataTxLmt from Send after which no new try starts. 0 means DMRGO_CONSTANTS_T_DATA_TX_LIMIT (60 s), and a negative value turns the limit off. */
dmrgo_duration_t tx_limit;
/* Retries is the most transmissions N_RtryLmt of a confirmed message, the first one included. 0 means DMRGO_CONSTANTS_N_RETRY_LIMIT (8); at most DMRGO_DATA_MAX_RETRIES. */
int64_t retries;
/* MaxBlocks is the most data blocks of a packet. 0 means DMRGO_DATA_MAX_BLOCKS. Each block takes about 110 bytes, so a microcontroller can set 16. */
int64_t max_blocks;
/* Peers is the number of links whose send sequence number V(S) the Sender keeps. 0 means DMRGO_DATA_DEFAULT_PEERS; at most DMRGO_DATA_MAX_PEERS. */
int64_t peers;
/* Resync sets the S flag on the first packet to a link and on the resend after a NACK for N(S) out of sequence, so that the receiver takes the N(S). ETSI TS 102 361-1 clause 9.3.23 keeps S for special registration messages, so false, the default, never sets it. */
bool resync;
/* Window is the most C_HEAD messages of the IP bearer service in progress at once, for sliding window flow control. Send queues up to Window of them to one link, and the Sender sends them one after the other with the Response Requested flag set only on the last, then takes one response for all of them. 0 or 1, the default, means stop and wait: each message requests its own response. At most DMRGO_DATA_MAX_WINDOW. Each message of the window takes its own dmrgo_packet_builder_t. Use a window only with receivers known to keep every packet of it: the AnyTone D890UV firmware (also in the BTECH DA-7X2) sends an ACK for the last packet of a window and keeps only that packet, so the earlier ones are lost. (ETSI TS 102 361-3 clause 5.4.4) */
int64_t window;
/* Seed seeds the random holdoff. Two Senders with the same seed hold off for the same times, so give each radio its own seed. */
uint64_t seed;
/* Slot is the TDMA slot of the Sender, which it puts in the Hint of each burst it sends. It must be DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2. */
dmrgo_enums_slot_t slot;
/* Lead makes Tick emit a burst this long before its Due time, so that an RF FIFO can be filled ahead. 0 means at Due; it must not be negative. The timers of the Sender keep to the Due times. */
dmrgo_duration_t lead;
};
struct dmrgo_data_output_t {
/* Kind is the kind of the output. */
dmrgo_data_output_kind_t kind;
/* Burst is the burst to send. */
dmrgo_layer2_raw_burst_t burst;
/* Hint is what the burst is, for a transport: DMRGO_LAYER2_KIND_DATA with the data type of the burst and the dmrgo_data_sender_config_t.slot. */
dmrgo_layer2_hint_t hint;
/* Due is the time at which the burst goes on air, 60 ms after the one before it. */
dmrgo_duration_t due;
/* Try is the transmission that the burst belongs to, or that ended the message: 1 for the first. */
uint8_t try_;
/* Seq is the N(S) of the C_HEAD message that the burst belongs to or that ended. Messages to one link take N(S) 0, 1, 2 and so on modulo 8 in the order of Send, so with dmrgo_data_sender_config_t.window above 1 Seq shows which message a DMRGO_DATA_OUTPUT_DONE ends. It is 0 for other messages. */
uint8_t seq;
/* Result is how the message ended. */
dmrgo_data_result_t result;
/* Response is the last response to the message. HasResponse reports whether one came. */
dmrgo_packet_response_t response;
/* HasResponse reports whether Response is set. */
bool has_response;
/* Call is the call of the message that the burst belongs to or that ended, from the addresses and group flag of its data header. */
dmrgo_layer2_call_t call;
};
struct dmrgo_fec_burst_fec_stats_t {
/* Golay (20,8,7), 20 bits */
dmrgo_fec_result_t slot_type;
/* QR (16,7,6), 16 bits, bursts with embedded signalling only */
dmrgo_fec_result_t emb;
/* BPTC (196 bits), trellis (196 bits) or rate 1 (0 bits) */
dmrgo_fec_result_t payload;
/* PDU is the RS(12,9) correction (96 bits) or the CRC check (0 bits) of the information bits that the Payload code returned (FLC/CSBK/DataHeader). */
dmrgo_fec_result_t pdu;
/* single burst BPTC (32 bits) and CRC-7 check, Reverse Channel only */
dmrgo_fec_result_t rc;
};
struct dmrgo_hdap_gps_data_t {
/* Status is 'A' for a valid fix and 'V' for none. */
uint8_t status;
/* Hour, Minute and Second are the UTC time of the fix. A radio that has no time sends NUL octets, which give 0. */
uint8_t hour;
uint8_t minute;
uint8_t second;
/* Day, Month and Year are the UTC date of the fix, Year in two digits. A radio that has no date sends NUL octets, which give 0. */
uint8_t day;
uint8_t month;
uint8_t year;
/* NorthSouth is 'N' or 'S'. */
uint8_t north_south;
/* LatitudeDegrees, LatitudeMinutes and LatitudeFraction are the latitude as DDMM.MMMM. */
uint8_t latitude_degrees;
uint8_t latitude_minutes;
uint16_t latitude_fraction;
/* EastWest is 'E' or 'W'. */
uint8_t east_west;
/* LongitudeDegrees, LongitudeMinutes and LongitudeFraction are the longitude as DDDMM.MMMM. */
uint16_t longitude_degrees;
uint8_t longitude_minutes;
uint16_t longitude_fraction;
/* Speed is the speed in knots as ASCII text, such as "0.2", or NUL octets when the radio sends no speed. */
uint8_t speed[3];
/* Direction is the course in degrees from north, 0 to 359. A radio that sends no course sends NUL octets, which give 0. */
uint16_t direction;
};
struct dmrgo_hdap_lp_answer_t {
/* RequestID is the RequestID of the request. */
uint32_t request_id;
/* Radio is the radio IP of the radio. */
uint8_t radio[4];
/* Result is 0 for success. */
uint16_t result;
/* GPS is the position. */
dmrgo_hdap_gps_data_t gps;
};
struct dmrgo_hdap_lp_emergency_t {
/* Radio is the radio IP of the radio. */
uint8_t radio[4];
/* Type is the kind of emergency. */
uint8_t type;
/* GPS is the position. */
dmrgo_hdap_gps_data_t gps;
};
struct dmrgo_hdap_lp_report_t {
/* RequestID is the RequestID of the condition request. */
uint32_t request_id;
/* Radio is the radio IP of the radio. */
uint8_t radio[4];
/* GPS is the position. */
dmrgo_hdap_gps_data_t gps;
};
struct dmrgo_hdap_lp_request_t {
/* RequestID identifies the request in its answer. */
uint32_t request_id;
/* Radio is the radio IP of the radio. */
uint8_t radio[4];
};
struct dmrgo_hdap_header_t {
/* Reliable requests a reliable transfer. */
bool reliable;
/* Service is the service of the message. */
dmrgo_hdap_service_t service;
};
struct dmrgo_hdap_message_t {
/* Header is the first octet. */
dmrgo_hdap_header_t header;
/* Opcode is the opcode of the service. */
dmrgo_hdap_opcode_t opcode;
/* Payload is the payload of the opcode. */
uint8_t *payload;
size_t payload_len;
/* Checksum covers the opcode, the length and the payload. Seal sets it. */
uint8_t checksum;
/* End is the end octet, 0x03. */
uint8_t end;
};
struct dmrgo_hdap_rrs_answer_t {
/* Radio is the radio IP of the radio. */
uint8_t radio[4];
/* Result is 0 for success, 1 for another failure and 2 for a wrong password. */
uint8_t result;
/* ValidTime is the time in seconds after which the radio registers again. */
uint32_t valid_time;
};
struct dmrgo_hdap_rrs_check_answer_t {
/* Radio is the radio IP of the radio. */
uint8_t radio[4];
/* Result is 0 when the radio is online and 1 when it is offline. */
uint8_t result;
};
struct dmrgo_hdap_rrs_radio_t {
/* Radio is the radio IP: the subnet, then the 24-bit radio ID. */
uint8_t radio[4];
};
struct dmrgo_hdap_tmp_answer_t {
/* RequestID is the RequestID of the text. */
uint32_t request_id;
/* Destination is the radio IP of the radio that got the text. */
uint8_t destination[4];
/* Source is the radio IP of the sender of the text. */
uint8_t source[4];
/* Result is 0 for success; other values name the failure, such as 4 for a busy channel. */
uint8_t result;
};
struct dmrgo_hdap_tmp_flags_t {
/* NoAck reports that the sender requests no answer. */
bool no_ack;
/* Option reports an option field, which the package does not decode. */
bool option;
/* Reserved holds the reserved bits. */
uint8_t reserved;
};
struct dmrgo_hdap_tmp_group_answer_t {
/* RequestID is the RequestID of the text. */
uint32_t request_id;
/* Destination is the radio IP of the group. */
uint8_t destination[4];
/* Result is 0 for success. */
uint8_t result;
};
struct dmrgo_hdap_tmp_message_t {
/* RequestID identifies the text in its answer. */
uint32_t request_id;
/* Destination is the radio IP of the radio or group. */
uint8_t destination[4];
/* Source is the radio IP of the sender. */
uint8_t source[4];
/* Text is the text in UTF-16LE. */
uint8_t *text;
size_t text_len;
};
struct dmrgo_ip_datagram_t {
/* Source and Destination are the IPv4 addresses. A compressed header does not carry them, and they are zero. */
uint8_t source[4];
/* Source and Destination are the IPv4 addresses. A compressed header does not carry them, and they are zero. */
uint8_t destination[4];
/* SourcePort and DestinationPort are the UDP ports. */
dmrgo_ip_port_t source_port;
/* SourcePort and DestinationPort are the UDP ports. */
dmrgo_ip_port_t destination_port;
/* ID is the IPv4 Identification field. */
uint16_t id;
/* TTL is the IPv4 time to live, 0 for a compressed header. */
uint8_t ttl;
/* Compressed reports a compressed UDP/IPv4 header. */
bool compressed;
/* SAID and DAID are the address identifiers of a compressed header. */
dmrgo_enums_said_t said;
dmrgo_enums_daid_t daid;
/* Payload is the application data. It points into the data that Decode got. */
uint8_t *payload;
size_t payload_len;
};
struct dmrgo_ip_icmp_packet_t {
/* Source and Destination are the IPv4 addresses of the packet. */
uint8_t source[4];
/* Source and Destination are the IPv4 addresses of the packet. */
uint8_t destination[4];
/* ID is the IPv4 Identification field. */
uint16_t id;
/* TTL is the IPv4 time to live. */
uint8_t ttl;
/* Message is the ICMP Type and Code. */
dmrgo_ip_icmp_message_t message;
/* Pointer is the octet in error of DMRGO_IP_ICMP_BAD_HEADER. */
uint8_t pointer;
/* NextHopMTU is the MTU of DMRGO_IP_ICMP_FRAGMENTATION_NEEDED. */
uint16_t next_hop_mtu;
/* Original is the start of the IPv4 packet in error. It points into the data that DecodeICMPPacket got. */
uint8_t *original;
size_t original_len;
};
struct dmrgo_pdu_udp_ipv4_compressed_header_t {
/* Identification field of the IPv4 header */
uint16_t ipv4_identification;
/* source IP address identifier */
dmrgo_enums_said_t said;
/* destination IP address identifier */
dmrgo_enums_daid_t daid;
/* 2-bit header compression opcode; bit 24 is the MSB */
uint8_t header_compression_opcode;
/* source port identifier */
dmrgo_enums_spid_t spid;
/* destination port identifier */
dmrgo_enums_dpid_t dpid;
/* source port if SPID is 0, else destination port if DPID is 0, else payload */
uint16_t extended_header1;
/* destination port if SPID and DPID are 0, else payload */
uint16_t extended_header2;
};
struct dmrgo_ip_icmp_header_t {
/* Message is the Type and Code. */
dmrgo_ip_icmp_message_t message;
/* Checksum is the checksum over the ICMP message. */
uint16_t checksum;
/* Pointer is the octet of the original IPv4 header in error, for DMRGO_IP_ICMP_BAD_HEADER. Other messages send 0. */
uint8_t pointer;
/* Reserved is unused, 0. */
uint8_t reserved;
/* NextHopMTU is the MTU of the next hop, for DMRGO_IP_ICMP_FRAGMENTATION_NEEDED. Other messages send 0. */
uint16_t next_hop_mtu;
};
struct dmrgo_ip_icmp_t {
/* Header is the header. */
dmrgo_ip_icmp_header_t header;
/* Original is the IPv4 header and the first 8 octets of the payload of the packet in error. */
uint8_t *original;
size_t original_len;
};
struct dmrgo_ip_ipv4_header_t {
/* Version is the IP version, 4. */
uint8_t version;
/* IHL is the header length in 32-bit words, 5 without options. */
uint8_t ihl;
/* TOS is the type of service octet. */
uint8_t tos;
/* TotalLength is the length of the packet in octets, header included. */
uint16_t total_length;
/* ID identifies the fragments of one packet. */
uint16_t id;
/* Reserved is the reserved flag, 0. */
bool reserved;
/* DontFragment is the DF flag. */
bool dont_fragment;
/* MoreFragments is the MF flag. */
bool more_fragments;
/* FragmentOffset is the offset of the fragment in units of 8 octets. */
uint16_t fragment_offset;
/* TTL is the time to live. */
uint8_t ttl;
/* Protocol is the protocol of the payload. */
dmrgo_ip_protocol_t protocol;
/* Checksum is the header checksum. */
uint16_t checksum;
/* Source is the source address. */
uint8_t source[4];
/* Destination is the destination address. */
uint8_t destination[4];
};
struct dmrgo_ip_ipv4_t {
/* Header is the fixed header. */
dmrgo_ip_ipv4_header_t header;
/* Options are the octets of the header after the first 20. */
uint8_t *options;
size_t options_len;
/* Payload is the payload, such as a UDP datagram. */
uint8_t *payload;
size_t payload_len;
};
struct dmrgo_ip_udp_header_t {
/* SourcePort is the source port. */
dmrgo_ip_port_t source_port;
/* DestinationPort is the destination port. */
dmrgo_ip_port_t destination_port;
/* Length is the length of the datagram in octets, header included. */
uint16_t length;
/* Checksum is the checksum over the pseudo header and the datagram, or 0 for none. */
uint16_t checksum;
};
struct dmrgo_ip_udp_t {
/* Header is the header. */
dmrgo_ip_udp_header_t header;
/* Payload is the application data. */
uint8_t *payload;
size_t payload_len;
};
struct dmrgo_layer3_cdef_parms_t {
/* logical channel number */
uint16_t channel;
/* transmit frequency, whole MHz */
uint16_t tx_mhz;
/* transmit frequency above TXMHz, in 125 Hz steps */
uint16_t tx_khz;
/* receive frequency, whole MHz */
uint16_t rx_mhz;
/* receive frequency above RXMHz, in 125 Hz steps */
uint16_t rx_khz;
};
struct dmrgo_pdu_bcap_continuation_t {
/* result of the last-block CRC check */
dmrgo_fec_result_t fec;
/* LB bit, true for the last block */
bool last_block;
/* PF bit */
bool protect_flag;
/* CSBKO of the MBC header */
dmrgo_pdu_csbk_opcode_t opcode;
/* reserved, 0 */
uint8_t reserved1;
/* type of CdefParms, 0 for absolute frequencies */
uint8_t cdeftype;
/* reserved, 0 */
uint8_t reserved2;
/* channel number and its TX and RX frequencies */
dmrgo_layer3_cdef_parms_t cdef_parms;
};
struct dmrgo_pdu_cgap_continuation_t {
/* result of the last-block CRC check */
dmrgo_fec_result_t fec;
/* LB bit, true for the last block */
bool last_block;
/* PF bit */
bool protect_flag;
/* CSBKO of the MBC header */
dmrgo_pdu_csbk_opcode_t opcode;
/* reserved, 0 */
uint8_t reserved1;
/* color code of the destination channel */
dmrgo_enums_color_code_t color_code;
/* type of CdefParms, 0 for absolute frequencies */
uint8_t cdeftype;
/* reserved, 0 */
uint8_t reserved2;
/* channel number and its TX and RX frequencies */
dmrgo_layer3_cdef_parms_t cdef_parms;
};
struct dmrgo_pdu_full_link_control_t {
/* BurstDataType selects the RS(12,9) parity mask; Encode returns an error unless it is DMRGO_ENUMS_DATA_TYPE_VOICE_LC_HEADER or DMRGO_ENUMS_DATA_TYPE_TERMINATOR_WITH_LC. */
dmrgo_enums_data_type_t burst_data_type;
/* Protect Flag (PF) */
bool protect_flag;
/* reserved */
bool reserved;
/* Full Link Control Opcode (FLCO) */
dmrgo_enums_flco_t flco;
/* FID is the Feature set ID; the As methods apply only to the standard FID 0, and RawPayload holds the payload of any FID. */
dmrgo_enums_fid_t fid;
/* FEC is the RS(12,9) result; MMDVMHost accepts only an LC with dmrgo_pdu_full_link_control_t.fec.errors_corrected 0 (dmrgo_layer2_mmdvm_host_accepts). */
dmrgo_fec_result_t fec;
/* RawPayload holds LC bits 16 to 71, the payload that FLCO and FID select, packed most significant bit first: bit 16 is the top bit of byte 0, so the bytes are LC octets 2 to 8. */
uint8_t raw_payload[7];
};
struct dmrgo_pdu_mbc_continuation_t {
/* LB bit, true for the last block, which holds the CRC */
bool last_block;
/* Data holds bits 1 to 95 of the block, packed most significant bit first. A last block holds the CRC in bits 80 to 95. The low bit of byte 11 is padding: Encode returns a *dmrgo_field_range_error_t when it is set. */
uint8_t data[12];
};
struct dmrgo_pdu_mbc_header_t {
/* result of the CRC check */
dmrgo_fec_result_t fec;
/* LB bit, false in an MBC header */
bool last_block;
/* PF bit */
bool protect_flag;
/* CSBKO, selects the payload */
dmrgo_pdu_csbk_opcode_t opcode;
/* feature set ID, only the standard FID has As methods */
dmrgo_enums_fid_t fid;
/* RawPayload holds header octets 2 to 9 (bits 16 to 79), the payload that Opcode and FID select. */
uint8_t raw_payload[8];
};
struct dmrgo_pdu_mvap_continuation_t {
/* result of the last-block CRC check */
dmrgo_fec_result_t fec;
/* LB bit, true for the last block */
bool last_block;
/* PF bit */
bool protect_flag;
/* CSBKO of the MBC header */
dmrgo_pdu_csbk_opcode_t opcode;
/* reserved, 0 */
uint8_t reserved1;
/* color code of the destination channel */
dmrgo_enums_color_code_t color_code;
/* type of CdefParms, 0 for absolute frequencies */
uint8_t cdeftype;
/* reserved, 0 */
uint8_t reserved2;
/* channel number and its TX and RX frequencies */
dmrgo_layer3_cdef_parms_t cdef_parms;
};
struct dmrgo_pdu_pi_header_t {
/* result of the CRC check */
dmrgo_fec_result_t fec;
/* privacy algorithm ID */
uint8_t algorithm_id;
/* manufacturer FID */
dmrgo_enums_fid_t mfid;
/* key ID */
uint8_t key_id;
/* 32-bit message indicator */
uint32_t message_indicator;
/* 24-bit destination address */
uint32_t destination;
/* Raw holds bits 0 to 79, most significant bit first, for other layouts such as Hytera (MFID 0x68); Encode ignores it. */
uint8_t raw[10];
};
struct dmrgo_pdu_pr_fill_t {
uint8_t unused;
};
struct dmrgo_pdu_rate12_data_t {
/* the 96 block bits, most significant bit first */
uint8_t data[12];
};
struct dmrgo_pdu_rate1_data_t {
/* the 192 block bits, most significant bit first */
uint8_t data[24];
};
struct dmrgo_pdu_rate34_data_t {
/* the 144 block bits, most significant bit first */
uint8_t data[18];
};
struct dmrgo_pdu_unified_single_block_data_t {
/* result of the CRC check */
dmrgo_fec_result_t fec;
/* service that the payload carries */
dmrgo_pdu_service_type_t service_type;
/* Payload holds the 76 bits 4 to 79, packed most significant bit first: bit 4 is the top bit of byte 0 and bit 79 is bit 4 of byte 9. The low 4 bits of byte 9 are padding and must be zero; Encode returns a *dmrgo_field_range_error_t otherwise. */
uint8_t payload[10];
};
struct dmrgo_pdu_vnap_continuation_t {
/* result of the last-block CRC check */
dmrgo_fec_result_t fec;
/* LB bit, true for the last block */
bool last_block;
/* PF bit */
bool protect_flag;
/* CSBKO of the MBC header */
dmrgo_pdu_csbk_opcode_t opcode;
/* reserved, 0 */
uint8_t reserved1;
/* color code of the destination channel */
dmrgo_enums_color_code_t color_code;
/* type of CdefParms, 0 for absolute frequencies */
uint8_t cdeftype;
/* reserved, 0 */
uint8_t reserved2;
/* channel number and its TX and RX frequencies */
dmrgo_layer3_cdef_parms_t cdef_parms;
};
struct dmrgo_layer2_data_t {
uint32_t tag;
union {
dmrgo_pdu_bcap_continuation_t pdu_bcap_continuation;
dmrgo_pdu_cgap_continuation_t pdu_cgap_continuation;
dmrgo_pdu_csbk_t pdu_csbk;
dmrgo_pdu_data_header_t pdu_data_header;
dmrgo_pdu_full_link_control_t pdu_full_link_control;
dmrgo_pdu_mbc_continuation_t pdu_mbc_continuation;
dmrgo_pdu_mbc_header_t pdu_mbc_header;
dmrgo_pdu_mvap_continuation_t pdu_mvap_continuation;
dmrgo_pdu_pi_header_t pdu_pi_header;
dmrgo_pdu_pr_fill_t pdu_pr_fill;
dmrgo_pdu_rate12_data_t pdu_rate12_data;
dmrgo_pdu_rate1_data_t pdu_rate1_data;
dmrgo_pdu_rate34_data_t pdu_rate34_data;
dmrgo_pdu_unified_single_block_data_t pdu_unified_single_block_data;
dmrgo_pdu_vnap_continuation_t pdu_vnap_continuation;
} v;
};
struct dmrgo_vocoder_ambe_frame_t {
uint8_t v[7];
};
struct dmrgo_pdu_embedded_signalling_t {
/* color code (CC) */
dmrgo_enums_color_code_t color_code;
/* Pre-emption and power control Indicator (PI) */
bool preemption_and_power_control_indicator;
/* LC Start/Stop (LCSS) of the embedded signalling */
dmrgo_enums_lcss_t lcss;
/* QR(16,7,6) result */
dmrgo_fec_result_t fec;
};
struct dmrgo_pdu_slot_type_t {
/* color code (CC) */
dmrgo_enums_color_code_t color_code;
/* data type of the burst */
dmrgo_enums_data_type_t data_type;
/* Golay(20,8,7) result */
dmrgo_fec_result_t fec;
};
struct dmrgo_pdu_reverse_channel_t {
/* RCCommand is the 4-bit RC command (ETSI TS 102 361-2 clause 7.2.20). */
dmrgo_enums_rc_command_t rc_command;
/* FEC reports the CRC-7 check. */
dmrgo_fec_result_t fec;
};
struct dmrgo_layer2_decode_options_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* SyncThreshold is the largest Hamming distance at which the SYNC field matches a SYNC pattern. 0 selects DMRGO_LAYER2_DEFAULT_SYNC_THRESHOLD; a negative value accepts exact matches only. */
int64_t sync_threshold;
/* ColorCode, when set, is the expected color code. DecodeFromBytesWith returns ErrColorCodeMismatch when the slot type or EMB of the burst carries another one. A voice burst A carries no color code and is not checked. */
bool has_color_code;
dmrgo_enums_color_code_t color_code;
/* Kind is the burst kind, when the caller gets it from outside the burst, such as from TDMA timing or a network header. A known kind overrides the classification by the SYNC field. DMRGO_LAYER2_KIND_UNKNOWN, the zero value, classifies by the SYNC field. */
dmrgo_layer2_kind_t kind;
/* VoiceBurst is the superframe position of a DMRGO_LAYER2_KIND_VOICE burst. DMRGO_ENUMS_VOICE_BURST_A takes the center as a voice SYNC pattern and DMRGO_ENUMS_VOICE_BURST_B to DMRGO_ENUMS_VOICE_BURST_F take it as EMB and embedded data. DMRGO_ENUMS_VOICE_BURST_UNKNOWN takes it as a voice SYNC pattern within the SYNC threshold and as EMB otherwise. */
dmrgo_enums_voice_burst_type_t voice_burst;
/* DataType, when set, is the data type of a DMRGO_LAYER2_KIND_DATA burst. It replaces the data type of the decoded slot type and selects the payload decode. When has_data_type false, the decoded slot type sets it. */
bool has_data_type;
dmrgo_enums_data_type_t data_type;
};
struct dmrgo_pdu_tact_t {
/* Access Type (AT): true when the inbound channel is busy */
bool access_type;
/* TDMA Channel (TC): true when the next outbound burst is channel 2 */
bool tdma_channel;
/* LC Start/Stop (LCSS) of the CACH signalling */
dmrgo_enums_lcss_t lcss;
/* Hamming(7,4,3) result */
dmrgo_fec_result_t fec;
};
struct dmrgo_layer2_cach_t {
/* TACT is the decoded Timing, Activity, Channel, Type PDU. */
dmrgo_pdu_tact_t tact;
/* Payload contains the 17-bit CACH signalling payload, which is one row of the Short LC BPTC transmit matrix, packed, the first bit in the most significant bit of byte 0. The low 7 bits of byte 2 are 0. */
uint8_t payload[3];
};
struct dmrgo_layer2_voice_transmitter_options_embedded_lc_fn_t {
int (*fn)(DMRGO_USER_T user, int64_t superframe, dmrgo_pdu_full_link_control_t *out, bool *out_ok);
DMRGO_USER_T user;
};
struct dmrgo_layer2_voice_transmitter_options_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* LC is the Full LC of the call. The Voice LC Header and the Terminator with LC carry it, with its FID, and so does the embedded LC unless EmbeddedLC or SetEmbeddedLC replaces it. dmrgo_layer2_voice_transmitter_options_t.lc.burst_data_type is ignored. */
dmrgo_pdu_full_link_control_t lc;
/* ColorCode is the color code of the slot types and EMBs. */
dmrgo_enums_color_code_t color_code;
/* Source selects the SYNC patterns. The zero value is DMRGO_LAYER2_SYNC_SOURCE_BS. */
dmrgo_layer2_sync_source_t source;
/* Silence is the 72-bit slot that pads the last superframe, packed as dmrgo_layer2_raw_burst_voice_slots returns it. The zero value means dmrgo_vocoder_ambe_silence_slot(). A Codec2 caller sets its own. */
uint8_t silence[9];
/* PIHeader, when set, adds a PI Header burst after the Voice LC Header (ETSI TS 102 361-1 clause 5.1.2.2, clause 6.2). */
bool has_pi_header;
dmrgo_pdu_pi_header_t pi_header;
/* EmbeddedLC, when set, is called at the start of each superframe with its index, 0 for the first one. The Full LC it returns is the embedded LC of bursts B to E of that superframe, for example a talker alias or GPS LC. A false *out_ok keeps LC. An LC that does not encode makes AddSlots, AddFrames or Terminate return the error. */
dmrgo_layer2_voice_transmitter_options_embedded_lc_fn_t embedded_lc;
};
struct dmrgo_framer_burst_t {
/* Data is the burst, ready for dmrgo_layer2_new_burst_from_bytes. */
dmrgo_layer2_raw_burst_t data;
/* Offset is the stream index of burst bit 0, counted from the first bit written to the Framer. */
int64_t offset;
/* Sync is the SYNC pattern of the SYNC field, or DMRGO_ENUMS_SYNC_NONE when the field is not within the threshold of one, as in voice bursts B to F. */
dmrgo_enums_sync_pattern_t sync;
/* Distance is the Hamming distance of the field from the nearest pattern. */
int64_t distance;
/* HasCACH is set when CACH holds the 24 bits before the burst, in logical order (see dmrgo_layer2_cach_deinterleave). */
bool has_cach;
/* CACH is the CACH decoded from the 24 bits before the burst when HasCACH is set. */
dmrgo_layer2_cach_t cach;
/* Slot is the TDMA channel, or DMRGO_ENUMS_SLOT_UNKNOWN. It comes from the TC bit of the CACH, from a direct mode TDMA SYNC pattern, or from the channel of the previous burst. */
dmrgo_enums_slot_t slot;
};
struct dmrgo_framer_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Threshold is the largest SYNC distance accepted. 0 means DMRGO_LAYER2_DEFAULT_SYNC_THRESHOLD, and a negative value accepts only an exact SYNC, as dmrgo_layer2_decode_options_t.sync_threshold does. */
int64_t threshold;
/* Period is the number of bits from one burst to the next while locked, from DMRGO_LAYER2_BURST_BITS to DMRGO_FRAMER_MAX_PERIOD. 0 means DMRGO_FRAMER_OUTBOUND_PERIOD. Use DMRGO_FRAMER_SLOT_PERIOD for the bursts of a single TDMA channel, such as one inbound or direct mode channel. */
int64_t period;
/* CACH decodes the 24 bits before each burst as a CACH, for a BS outbound stream. */
bool cach;
/* MaxMisses is the number of consecutive bursts without a SYNC that keep the lock. 0 means DMRGO_FRAMER_DEFAULT_MAX_MISSES. */
int64_t max_misses;
};
struct dmrgo_framer_match_t {
/* Offset is the bit index of the first SYNC bit. */
int64_t offset;
/* Pattern is the matched SYNC pattern. */
dmrgo_enums_sync_pattern_t pattern;
/* Distance is the Hamming distance from Pattern. */
int64_t distance;
};
struct dmrgo_packet_t {
/* the data header that starts the packet */
dmrgo_pdu_data_header_t header;
/* the data blocks that follow the header, at most 127 blocks */
dmrgo_layer2_data_t *blocks;
size_t blocks_len;
};
struct dmrgo_packet_message_t {
/* Header is the first header block. */
dmrgo_pdu_data_header_t header;
/* Proprietary is the P_HEAD sent as the second header, or has_proprietary false. */
bool has_proprietary;
dmrgo_pdu_proprietary_header_t proprietary;
/* DataType is the rate of the data blocks. It is set only when Blocks is over 0. */
dmrgo_enums_data_type_t data_type;
/* Blocks is the number of data blocks that Data was built from, 0 for a packet without data blocks, such as a header-only response, or one whose blocks all failed their FEC. */
int64_t blocks;
/* Data is the user data. The pad octets of a U_HEAD or C_HEAD packet are removed when the header is a first try (Full Message Flag set). A C_HEAD packet that a later try started, because the first header was lost, has them removed too when every DBSN from 0 to one less than the Blocks to Follow of the header that started it arrived, in that try or a later one, and the message CRC holds: such a header, as a sender sends it after no response or a NACK, keeps the Pad Octet Count of the first try, though ETSI TS 102 361-1 clause 9.3.20 has a receiver read it only on a first try. Otherwise a packet that a later try started keeps them, and so does a U_HEAD packet with the Full Message Flag clear, which no sender retries. A DD_HEAD or R_HEAD packet has Bit Padding/8 octets removed on every try, as its retries keep the Bit Padding of the first try. It holds at most 3048 bytes: 127 blocks of at most 24 octets. (ETSI TS 102 361-1 clause 9.3.20, clause 9.3.44) */
uint8_t *data;
size_t data_len;
/* CRC is the received message CRC. */
uint32_t crc;
/* Response is the decoded C_RDATA of a SACK response packet, or has_response false. */
bool has_response;
dmrgo_packet_response_data_t response;
/* BadCRC reports that the message CRC failed, that the Pad Octet Count of a first try or the Bit Padding/8 is more than the octets before the CRC, or, with dmrgo_packet_assembler_set_accept_bad_crc, that Data holds a confirmed block whose CRC-9 failed. (ETSI TS 102 361-1 clause 9.3.22) */
bool bad_crc;
};
struct dmrgo_pdu_confirmed_data_header_t {
/* true when LLIDDestination is a group */
bool group;
/* Response Requested (A) */
bool response_requested;
/* reserved */
bool reserved;
/* Pad Octet Count (POC); bit 3 is the MSB */
uint8_t pad_octet_count;
/* SAP identifier */
dmrgo_enums_sap_t sap;
/* destination LLID */
uint32_t llid_destination;
/* source LLID */
uint32_t llid_source;
/* Full Message Flag (F) */
bool full_message_flag;
/* Blocks to Follow (BF) */
uint8_t blocks_to_follow;
/* Re-Synchronize Flag (S) */
bool re_synchronize_flag;
/* send sequence number N(S) */
uint8_t send_sequence_number;
/* Fragment Sequence Number (FSN) */
uint8_t fragment_sequence_number;
};
struct dmrgo_pdu_response_packet_header_t {
/* reserved */
bool reserved;
/* Response Requested (A) */
bool response_requested;
/* reserved */
uint8_t reserved2;
/* SAP identifier */
dmrgo_enums_sap_t sap;
/* reserved */
uint8_t reserved3;
/* destination LLID */
uint32_t llid_destination;
/* source LLID */
uint32_t llid_source;
/* Full Message Flag (F) */
bool full_message_flag;
/* Blocks to Follow (BF) */
uint8_t blocks_to_follow;
/* response Class (Table 8.2) */
uint8_t response_class;
/* response Type (Table 8.2) */
uint8_t response_type;
/* response Status (Table 8.2) */
uint8_t response_status;
};
struct dmrgo_pdu_ack_inbound_pdu_t {
/* supplementary response information */
uint8_t response_info;
/* acknowledgement reason code */
uint8_t reason_code;
/* reserved, 0 */
bool reserved;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit additional information, usually a source address */
uint32_t additional_info;
};
struct dmrgo_pdu_ack_inbound_payload_pdu_t {
/* supplementary response information */
uint8_t response_info;
/* acknowledgement reason code */
uint8_t reason_code;
/* reserved, 0 */
bool reserved;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit additional information, usually a source address */
uint32_t additional_info;
};
struct dmrgo_pdu_ack_outbound_pdu_t {
/* supplementary response information */
uint8_t response_info;
/* acknowledgement reason code */
uint8_t reason_code;
/* reserved, 0 */
bool reserved;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit additional information, usually a source address */
uint32_t additional_info;
};
struct dmrgo_pdu_ack_outbound_payload_pdu_t {
/* supplementary response information */
uint8_t response_info;
/* acknowledgement reason code */
uint8_t reason_code;
/* reserved, 0 */
bool reserved;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit additional information, usually a source address */
uint32_t additional_info;
};
struct dmrgo_pdu_ackvitation_pdu_t {
/* Service_Options_Mirror */
uint8_t service_opts_mirror;
/* flag whose meaning depends on ServiceKind */
bool service_kind_flag;
/* reserved, 0 */
uint8_t reserved;
/* Appended_Blocks, 0 to 3 for 1 to 4 appended data UDTs */
uint8_t uab;
/* service that this PDU supports */
uint8_t service_kind;
/* 24-bit target address, or an authentication challenge */
uint32_t target_address;
/* 24-bit individual MS address */
uint32_t source_address;
};
struct dmrgo_pdu_adjacent_site_parms_t {
/* AnnouncementAdjacentSite */
dmrgo_enums_announcement_type_t announcement_type;
/* 14 most significant bits of the C_SYScode of the adjacent TSCC */
uint16_t adjacent_sys_code;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* system identity code (C_SYScode) of the TSCC that sends it */
uint16_t sys_ident_code;
/* true when ActiveConn is valid */
bool has_active_conn;
/* true when the adjacent site has a network connection */
bool active_conn;
/* priority of the confirmed channel */
uint8_t confirmed_priority;
/* priority of the adjacent channel */
uint8_t adjacent_priority;
/* reserved, 0 */
uint8_t reserved;
/* CH_ADJ, the 12-bit channel number of the adjacent TSCC */
uint16_t channel;
};
struct dmrgo_pdu_ahoy_pdu_t {
/* Service_Options of the request that this answers */
uint8_t service_opts_mirror;
/* flag whose meaning depends on ServiceKind */
bool service_kind_flag;
/* true when the caller requested ambient listening */
bool als;
/* true when TargetAddress is a talkgroup */
bool group;
/* Appended_Blocks: the number of appended data blocks minus one */
uint8_t uab;
/* service that this PDU supports */
uint8_t service_kind;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address, or an authentication challenge */
uint32_t source_address;
};
struct dmrgo_pdu_aloha_pdu_t {
/* reserved, 0 */
bool reserved1;
/* true when the TSCC supports a TSCCAS */
bool tsccas;
/* true when all channels of the site are timeslot synchronized */
bool site_ts_sync;
/* version of ETSI TS 102 361-4 that the system complies with */
uint8_t version;
/* true when the TSCC uses offset timing */
bool offset;
/* true when the TS has a connection to the network */
bool active_conn;
/* address mask, 0 to 24 */
uint8_t mask;
/* services for which random access is invited */
uint8_t service_func;
/* code for the TDMA frames an MS waits before a random access retry */
uint8_t n_rand_wait;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* system identity code (C_SYScode) of the TSCC */
uint16_t sys_ident_code;
/* 24-bit individual MS address */
uint32_t ms_address;
};
struct dmrgo_pdu_ann_wd_tscc_parms_t {
/* AnnouncementAnnWDTSCC */
dmrgo_enums_announcement_type_t announcement_type;
/* reserved, 0 */
uint8_t reserved;
/* color code of Channel1 */
dmrgo_enums_color_code_t color_code1;
/* color code of Channel2 */
dmrgo_enums_color_code_t color_code2;
/* AW_FLAG1: true withdraws Channel1 from the hunt list, false adds it */
bool withdraw1;
/* AW_FLAG2: true withdraws Channel2 from the hunt list, false adds it */
bool withdraw2;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* system identity code (C_SYScode) of the TSCC */
uint16_t sys_ident_code;
/* BCAST_CH1, a 12-bit channel number, 0 for CHNULL */
uint16_t channel1;
/* BCAST_CH2, a 12-bit channel number, 0 for CHNULL */
uint16_t channel2;
};
struct dmrgo_pdu_flc_talker_alias_header_t {
/* Talker alias data format */
dmrgo_layer3_talker_alias_data_format_t talker_alias_data_format;
/* alias length in Code Units */
uint8_t talker_alias_data_length;
/* TalkerAliasData is the 49-bit Talker alias data IE. The 7-bit format uses all 49 bits; the other formats leave the most significant bit unused. */
uint64_t talker_alias_data;
};
struct dmrgo_pdu_flc_talker_alias_block_t {
/* 56 bits of Talker alias data */
uint8_t talker_alias_data[7];
};
struct dmrgo_pdu_bs_outbound_activation_pdu_t {
/* reserved, 0 */
uint16_t reserved;
/* 24-bit address of the BS to activate */
uint32_t bs_address;
/* 24-bit address of the sending MS */
uint32_t source_address;
};
struct dmrgo_pdu_broadcast_pdu_t {
/* which system parameters are broadcast */
dmrgo_enums_announcement_type_t announcement_type;
/* 14 bits whose layout depends on AnnouncementType */
uint16_t broadcast_parms1;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* system identity code (C_SYScode) of the TSCC */
uint16_t sys_ident_code;
/* 24 bits whose layout depends on AnnouncementType */
uint32_t broadcast_parms2;
};
struct dmrgo_pdu_call_timer_parms_t {
/* AnnouncementCallTimer */
dmrgo_enums_announcement_type_t announcement_type;
/* T_EMERG_TIMER, 1 to 510, 511 for infinity */
uint16_t emergency_timer;
/* T_PACKET_TIMER, 1 to 30, 31 for infinity */
uint8_t packet_timer;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* system identity code (C_SYScode) of the TSCC */
uint16_t sys_ident_code;
/* T_MS-MS_TIMER, 1 to 4094, 4095 for infinity */
uint16_t ms_ms_timer;
/* T_MS-LINE_TIMER, 1 to 4094, 4095 for infinity */
uint16_t line_timer;
};
struct dmrgo_pdu_chan_freq_parms_t {
/* AnnouncementChanFreq */
dmrgo_enums_announcement_type_t announcement_type;
/* reserved, 0 */
uint16_t reserved1;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* system identity code (C_SYScode) of the TSCC */
uint16_t sys_ident_code;
/* reserved, 0 */
uint16_t reserved2;
/* CH_ADJ, the 12-bit channel number announced */
uint16_t channel;
};
struct dmrgo_pdu_gen_site_parms_t {
/* AnnouncementGenSiteParams */
dmrgo_enums_announcement_type_t announcement_type;
/* reserved, 0 */
uint16_t reserved1;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* system identity code (C_SYScode) of the TSCC */
uint16_t sys_ident_code;
/* reserved, 0 */
bool reserved2;
/* Hibernating_Flag: true when the TSCC is about to hibernate */
bool hibernating;
/* reserved, 0 */
uint8_t reserved3;
/* reserved, 0 */
uint8_t reserved4;
/* true when MSs register without talkgroup Subscription/Attachment */
bool reg_without_tg;
/* reserved, 0 */
uint8_t reserved5;
};
struct dmrgo_pdu_local_time_parms_t {
/* AnnouncementLocalTime */
dmrgo_enums_announcement_type_t announcement_type;
/* B_DAY, day of the month 1 to 31, 0 when not broadcast */
uint8_t day;
/* B_MONTH, 1 for January to 12 for December, 0 when not broadcast */
uint8_t month;
/* UTC_OFFSET, hours 0 to 14, 15 when not broadcast */
uint8_t utc_offset;
/* UTC_OFFSET_SIGN: true when local time lags UTC (negative offset) */
bool utc_offset_lags;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* system identity code (C_SYScode) of the TSCC */
uint16_t sys_ident_code;
/* B_HOURS, 0 to 23 */
uint8_t hours;
/* B_MINS, 0 to 59 */
uint8_t minutes;
/* B_SECS, 0 to 59 */
uint8_t seconds;
/* DAYOF_WEEK, 1 for Sunday to 7 for Saturday, 0 when not broadcast */
uint8_t day_of_week;
/* UTC_OFFSET_FRACTION: quarter hours added to UTCOffset, 0 to 3 */
uint8_t utc_offset_quarter;
/* reserved, 0 */
uint8_t reserved;
};
struct dmrgo_pdu_mass_reg_parms_t {
/* AnnouncementMassReg */
dmrgo_enums_announcement_type_t announcement_type;
/* reserved, 0 */
uint8_t reserved;
/* Reg_Window code: 0 cancels, 1 to 15 for 0.5 s to 200000 s */
uint8_t reg_window;
/* address mask, 0 to 24 */
uint8_t aloha_mask;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* system identity code (C_SYScode) of the TSCC */
uint16_t sys_ident_code;
/* ADRNULL or a 24-bit individual MS address */
uint32_t address;
};
struct dmrgo_pdu_vote_now_parms_t {
/* AnnouncementVoteNow */
dmrgo_enums_announcement_type_t announcement_type;
/* 14 most significant bits of the C_SYScode of the TSCC to assess */
uint16_t vote_sys_code;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* system identity code (C_SYScode) of the TSCC that sends it */
uint16_t sys_ident_code;
/* true when ActiveConn is valid */
bool has_active_conn;
/* true when the assessed site has a network connection */
bool active_conn;
/* priority of the confirmed channel */
uint8_t confirmed_priority;
/* priority of the adjacent channel */
uint8_t adjacent_priority;
/* reserved, 0 */
uint8_t reserved;
/* CH_VOTE, the 12-bit channel number to assess, 0xFFF when a VN_AP block follows */
uint16_t channel;
};
struct dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_t {
/* 12-bit channel number, 0xFFF when a CGAP block follows */
uint16_t physical_channel;
/* TDMA channel: false for channel 1, true for channel 2 */
bool logical_channel;
/* true when sent after the call set-up (late entry) */
bool late_entry;
/* true for an emergency call */
bool emergency;
/* true for offset timing, false for aligned timing */
bool offset;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_capacity_plus_data_revert_announcement_pdu_t {
/* 0 */
uint8_t reserved;
/* radio that the window is for, 0 for none */
uint16_t target_address;
/* window number */
uint8_t window;
/* superframe number */
uint8_t superframe;
/* meaning unknown, 0xFC seen */
uint8_t flags;
/* meaning unknown, 0 seen */
uint16_t reserved2;
};
struct dmrgo_pdu_capacity_plus_data_revert_grant_pdu_t {
/* 0 */
uint8_t reserved;
/* radio that gets the window */
uint16_t target_address;
/* window number */
uint8_t window;
/* superframe number */
uint8_t superframe;
/* meaning unknown */
uint32_t reserved2;
};
struct dmrgo_pdu_capacity_plus_neighbors_pdu_t {
/* place of the block, DMRGO_PDU_CAPACITY_PLUS_SEGMENT_SINGLE seen */
dmrgo_pdu_capacity_plus_segment_t segment;
/* true on timeslot 2, false on timeslot 1 */
bool slot2;
/* rest LSN of this site */
uint8_t rest_lsn;
/* true for an asynchronous beacon, false for a periodic one */
bool async;
/* site number of this site */
uint8_t site;
/* number of neighbors in Neighbors, 0 to 6 */
uint8_t count;
/* per neighbor, its site number in the high 4 bits and its rest LSN in the low 4 bits */
uint8_t neighbors[6];
};
struct dmrgo_pdu_capacity_plus_preamble_pdu_t {
/* true when data follows the preambles, false when a CSBK follows */
bool data;
/* true when TargetAddress is a talkgroup */
bool group;
/* 0 */
uint8_t reserved;
/* number of blocks after this one */
uint8_t blocks_to_follow;
/* 24-bit target address */
uint32_t target_address;
/* 0 */
uint8_t reserved2;
/* rest LSN for the radios that do not take part */
uint8_t rest_lsn;
/* 16-bit source address */
uint16_t source_address;
};
struct dmrgo_pdu_capacity_plus_site_status_pdu_t {
/* place of the block in the status */
dmrgo_pdu_capacity_plus_segment_t segment;
/* true on timeslot 2, false on timeslot 1 */
bool slot2;
/* rest LSN */
uint8_t rest_lsn;
/* 7 octets of the activity stream */
uint8_t activity[7];
};
struct dmrgo_pdu_channel_timing_pdu_t {
/* time since the last beacon in 500 ms steps */
uint16_t sync_age;
/* number of timing hops from the leader, 0 at the leader */
uint8_t generation;
/* 20-bit ID of the timing leader, 0 when unknown */
uint32_t leader_identifier;
/* true to appoint a new timing leader */
bool new_leader;
/* leader preference of the timing leader */
uint8_t leader_dynamic_identifier;
/* most significant bit of the channel timing opcode */
bool channel_timing_op1;
/* 20-bit ID of the sending MS */
uint32_t source_identifier;
/* reserved, 0 */
bool reserved;
/* leader preference of the sending MS */
uint8_t source_dynamic_identifier;
/* least significant bit of the channel timing opcode */
bool channel_timing_op0;
};
struct dmrgo_pdu_clear_pdu_t {
/* channel number to move to, 0 for the control channel */
uint16_t physical_channel;
/* reserved, 0 */
bool reserved1;
/* reserved, 0 */
uint8_t reserved2;
/* true when TargetAddress is a talkgroup */
bool group;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_duplex_private_data_grant_pdu_t {
/* 12-bit channel number, 0xFFF when a CGAP block follows */
uint16_t physical_channel;
/* TDMA channel: false for channel 1, true for channel 2 */
bool logical_channel;
/* true for dual slot data, false for single slot data */
bool hi_rate;
/* true for an emergency call */
bool emergency;
/* true when TargetAddress is the calling MS, false when it is the called MS */
bool call_direction;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_duplex_private_voice_grant_pdu_t {
/* 12-bit channel number, 0xFFF when a CGAP block follows */
uint16_t physical_channel;
/* TDMA channel: false for channel 1, true for channel 2 */
bool logical_channel;
/* reserved, 0 */
bool reserved;
/* true for an emergency call */
bool emergency;
/* true when TargetAddress is the calling MS, false when it is the called MS */
bool call_direction;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_maintenance_pdu_t {
/* reserved, 0 */
uint16_t reserved;
/* maintenance kind, 0 for DISCON (end of payload channel use) */
uint8_t maint_kind;
/* reserved, 0 */
bool reserved2;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_motorola_call_alert_pdu_t {
/* octets 2 and 3, 0 */
uint16_t reserved;
/* 24-bit address of the radio to alert */
uint32_t target_address;
/* 24-bit address of the alerting radio */
uint32_t source_address;
};
struct dmrgo_pdu_motorola_call_alert_ack_pdu_t {
/* octet 0 of the call alert it answers, 0x9F */
uint8_t request;
/* octet 3, 0 */
uint8_t reserved;
/* 24-bit address of the radio that sent the call alert */
uint32_t target_address;
/* 24-bit address of the alerted radio */
uint32_t source_address;
};
struct dmrgo_pdu_motorola_radio_check_pdu_t {
/* octet 2, 0 */
uint8_t reserved;
/* false in the request, true in the answer (octet 3 is 0x80) */
bool answer;
/* reserved, 0 */
uint8_t reserved2;
/* the radio that requests: source of the request, target of the answer */
uint32_t requester_address;
/* the radio checked: target of the request, source of the answer */
uint32_t checked_address;
};
struct dmrgo_pdu_move_pdu_t {
/* reserved, 0 */
uint16_t reserved1;
/* address mask, 0 to 24 */
uint8_t mask;
/* reserved, 0 */
uint8_t reserved2;
/* true when MSs must register */
bool reg;
/* backoff number, 1 to 15 (0 is reserved) */
uint8_t backoff;
/* reserved, 0 */
uint8_t reserved3;
/* 12-bit TSCC channel number, 0xFFF when an MVAP block follows */
uint16_t physical_channel;
/* 24-bit individual MS address */
uint32_t ms_address;
};
struct dmrgo_pdu_negative_acknowledgement_pdu_t {
/* shows if SourceAddress is valid */
dmrgo_layer3_additional_information_field_t additional_info;
/* BS or MS sourced */
dmrgo_layer3_source_type_t source_type;
/* opcode of the refused service */
dmrgo_pdu_csbk_opcode_t service_type;
/* reason code, 0x21 when the MS does not support the service */
uint8_t reason_code;
/* 24-bit source address */
uint32_t source_address;
/* 24-bit target address */
uint32_t target_address;
};
struct dmrgo_pdu_preamble_pdu_t {
/* true when data follows the preambles, false when a CSBK follows */
bool data;
/* true when TargetAddress is a talkgroup */
bool group;
/* reserved, 0 */
uint8_t reserved;
/* number of blocks after this one (CBF) */
uint8_t csbk_blocks_to_follow;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_private_data_grant_pdu_t {
/* 12-bit channel number, 0xFFF when a CGAP block follows */
uint16_t physical_channel;
/* TDMA channel: false for channel 1, true for channel 2 */
bool logical_channel;
/* true for dual slot data, false for single slot data */
bool hi_rate;
/* true for an emergency call */
bool emergency;
/* true for offset timing, false for aligned timing */
bool offset;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_private_data_grant_multi_item_pdu_t {
/* 12-bit channel number, 0xFFF when a CGAP block follows */
uint16_t physical_channel;
/* TDMA channel: false for channel 1, true for channel 2 */
bool logical_channel;
/* true for dual slot data, false for single slot data */
bool hi_rate;
/* true for an emergency call */
bool emergency;
/* true for offset timing, false for aligned timing */
bool offset;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_private_voice_grant_pdu_t {
/* 12-bit channel number, 0xFFF when a CGAP block follows */
uint16_t physical_channel;
/* TDMA channel: false for channel 1, true for channel 2 */
bool logical_channel;
/* reserved, 0 */
bool reserved;
/* true for an emergency call */
bool emergency;
/* true for offset timing, false for aligned timing */
bool offset;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_protect_pdu_t {
/* reserved, 0 */
uint16_t reserved;
/* 0 DIS_PTT, 1 EN_PTT, 2 ILLEGALLY_PARKED, 3 EN_PTT_ONE_MS */
uint8_t protect_kind;
/* true when TargetAddress is a talkgroup */
bool group;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_random_access_pdu_t {
/* service options of the request */
uint8_t service_options;
/* true for 21 to 44 gateway digits, false for 1 to 20 */
bool proxy_flag;
/* 4 bits whose content depends on ServiceKind */
uint8_t reserved;
/* service requested */
uint8_t service_kind;
/* 24-bit target or gateway address */
uint32_t target_address;
/* 24-bit address of the requesting MS */
uint32_t source_address;
};
struct dmrgo_pdu_talkgroup_data_grant_pdu_t {
/* 12-bit channel number, 0xFFF when a CGAP block follows */
uint16_t physical_channel;
/* TDMA channel: false for channel 1, true for channel 2 */
bool logical_channel;
/* true for dual slot data, false for single slot data */
bool hi_rate;
/* true for an emergency call */
bool emergency;
/* true for offset timing, false for aligned timing */
bool offset;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_t {
/* 12-bit channel number, 0xFFF when a CGAP block follows */
uint16_t physical_channel;
/* TDMA channel: false for channel 1, true for channel 2 */
bool logical_channel;
/* true for dual slot data, false for single slot data */
bool hi_rate;
/* true for an emergency call */
bool emergency;
/* true for offset timing, false for aligned timing */
bool offset;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_talkgroup_voice_grant_pdu_t {
/* 12-bit channel number, 0xFFF when a CGAP block follows */
uint16_t physical_channel;
/* TDMA channel: false for channel 1, true for channel 2 */
bool logical_channel;
/* true when sent after the call set-up (late entry) */
bool late_entry;
/* true for an emergency call */
bool emergency;
/* true for offset timing, false for aligned timing */
bool offset;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_unit_to_unit_voice_service_answer_response_pdu_t {
/* service options of the call */
dmrgo_layer3_service_options_t service_options;
/* 0x20 for proceed, 0x21 for deny */
uint8_t answer_response;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_unit_to_unit_voice_service_request_pdu_t {
/* service options of the call */
dmrgo_layer3_service_options_t service_options;
/* reserved, 0 */
uint8_t reserved;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_capacity_plus_activity_t {
/* RestLSN is the rest LSN of the first block. */
uint8_t rest_lsn;
/* Voice is the bitmap of the LSNs with a group call. */
uint16_t voice;
/* Talkgroups holds the 8-bit talkgroup of each LSN in Voice, at index LSN-1. */
uint8_t talkgroups[16];
/* Options is the octet after the talkgroups. Bit 7 set means that the radio bitmaps follow; the meaning of the other bits is unknown. */
uint8_t options;
/* Radio is the bitmap of the LSNs with a private voice or data call. The site status does not separate the two. */
uint16_t radio;
/* Radios holds the 16-bit target radio of each LSN in Radio, at index LSN-1. */
uint16_t radios[16];
};
struct dmrgo_pdu_capacity_plus_group_voice_grant_t {
/* service options of the call */
dmrgo_layer3_service_options_t service_options;
/* 0 */
uint16_t reserved;
/* 8-bit talkgroup */
uint8_t group_address;
/* 0 */
uint8_t reserved2;
/* rest LSN for the radios not in the call */
uint8_t rest_lsn;
/* 16-bit source address */
uint16_t source_address;
};
struct dmrgo_pdu_capacity_plus_private_voice_grant_t {
/* service options of the call */
dmrgo_layer3_service_options_t service_options;
/* 24-bit target address */
uint32_t target_address;
/* 0 */
uint8_t reserved;
/* rest LSN for the radios not in the call */
uint8_t rest_lsn;
/* 16-bit source address */
uint16_t source_address;
};
struct dmrgo_pdu_capacity_plus_rest_channel_t {
/* 0x10, the Motorola FID */
uint8_t marker;
/* meaning unknown, seen 0 and 1 */
uint8_t flags;
/* rest LSN, where the next call starts */
uint8_t rest_lsn;
/* site number of a Linked Capacity Plus site, 0 for a single site */
uint8_t site;
/* 0 */
uint8_t reserved;
};
struct dmrgo_pdu_defined_data_header_t {
/* true when LLIDDestination is a group */
bool group;
/* Response Requested (A) */
bool response_requested;
/* Appended Blocks (AB); bits 2 and 3 are the MSBs */
uint8_t appended_blocks;
/* SAP identifier */
dmrgo_enums_sap_t sap;
/* destination LLID */
uint32_t llid_destination;
/* source LLID */
uint32_t llid_source;
/* Defined Data format (DD) */
dmrgo_enums_dd_format_t defined_data;
/* Selective Automatic Repeat reQuest (SARQ) */
bool sarq;
/* Full Message Flag (F) */
bool full_message_flag;
/* Bit Padding field */
uint8_t bit_padding;
};
struct dmrgo_pdu_status_precoded_header_t {
/* true when LLIDDestination is a group */
bool group;
/* Response Requested (A) */
bool response_requested;
/* SAP identifier */
dmrgo_enums_sap_t sap;
/* destination LLID */
uint32_t llid_destination;
/* source LLID */
uint32_t llid_source;
/* Source Port (SP) */
uint8_t source_port;
/* Destination Port (DP) */
uint8_t destination_port;
/* 10-bit Status/Precoded (S_P) value */
uint16_t status_precoded;
};
struct dmrgo_pdu_udt_header_t {
/* true when LLIDDestination is a group */
bool group;
/* Response Requested (A) */
bool response_requested;
/* emergency in C_UDTHD, reserved in C_UDTHU */
bool emergency;
/* UDT_Option_Flag in C_UDTHD, UDT_DIV in C_UDTHU */
bool option_flag;
/* SAP identifier */
dmrgo_enums_sap_t sap;
/* UDT Format */
dmrgo_enums_udt_format_t udt_format;
/* destination LLID */
uint32_t llid_destination;
/* source LLID */
uint32_t llid_source;
/* number of pad nibbles appended to the user data */
uint8_t pad_nibble;
/* reserved */
bool reserved;
/* UDT Appended Blocks (UAB): the number of appended blocks minus one */
uint8_t uab;
/* Supplementary Flag (SF): true for supplementary data, false for short data */
bool supplementary_flag;
/* Protect Flag (PF) */
bool protect_flag;
/* UDT Opcode (UDTO) */
dmrgo_pdu_udt_opcode_t opcode;
};
struct dmrgo_pdu_unconfirmed_data_header_t {
/* true when LLIDDestination is a group */
bool group;
/* Response Requested (A) */
bool response_requested;
/* reserved */
bool reserved;
/* Pad Octet Count (POC); bit 3 is the MSB */
uint8_t pad_octet_count;
/* SAP identifier */
dmrgo_enums_sap_t sap;
/* destination LLID */
uint32_t llid_destination;
/* source LLID */
uint32_t llid_source;
/* Full Message Flag (F) */
bool full_message_flag;
/* Blocks to Follow (BF) */
uint8_t blocks_to_follow;
/* reserved */
uint8_t reserved2;
/* Fragment Sequence Number (FSN) */
uint8_t fragment_sequence_number;
};
struct dmrgo_pdu_data_header_bytes_t {
uint8_t v[12];
};
struct dmrgo_pdu_flc_gps_info_t {
/* reserved */
uint8_t reserved;
/* Position Error */
dmrgo_layer3_position_accuracy_t position_error;
/* degrees, -180 to 180 */
double longitude;
/* degrees, -90 to 90 */
double latitude;
};
struct dmrgo_pdu_flc_group_voice_t {
/* Service Options */
dmrgo_layer3_service_options_t service_options;
/* 24-bit group address */
uint32_t group_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_flc_terminator_data_link_control_t {
/* destination LLID */
uint32_t llid_destination;
/* source LLID */
uint32_t llid_source;
/* true when LLIDDestination is a group */
bool group;
/* Response Requested (A) */
bool response_requested;
/* Full Message Flag (F) */
bool full_message_flag;
/* reserved */
bool reserved;
/* Re-Synchronize Flag (S) */
bool re_synchronize_flag;
/* send sequence number N(S) */
uint8_t send_sequence_number;
};
struct dmrgo_pdu_flc_unit_to_unit_t {
/* Service Options */
dmrgo_layer3_service_options_t service_options;
/* 24-bit target address */
uint32_t target_address;
/* 24-bit source address */
uint32_t source_address;
};
struct dmrgo_pdu_short_lc_activity_update_t {
/* activity of timeslot 1 */
dmrgo_enums_activity_id_t ts1_activity_id;
/* activity of timeslot 2 */
dmrgo_enums_activity_id_t ts2_activity_id;
/* 8-bit address hash for timeslot 1 */
uint8_t hash_ts1;
/* 8-bit address hash for timeslot 2 */
uint8_t hash_ts2;
};
struct dmrgo_pdu_short_lc_c_sys_parms_t {
/* network model (MODEL) */
dmrgo_pdu_network_model_t model;
/* NET and SITE, split by MODEL */
uint16_t net_site_raw;
/* true when the TSCC requires the MS to register */
bool reg;
/* 9-bit Common_Slot_Counter */
uint16_t common_slot_counter;
};
struct dmrgo_pdu_short_lc_null_message_t {
/* reserved */
uint32_t reserved;
};
struct dmrgo_pdu_short_lc_p_sys_parms_t {
/* network model (MODEL) */
dmrgo_pdu_network_model_t model;
/* NET and SITE, split by MODEL */
uint16_t net_site_raw;
/* true when the payload channel is a composite control channel */
bool payload_channel_type;
/* 9-bit Common_Slot_Counter */
uint16_t common_slot_counter;
};
struct dmrgo_pdu_sys_code_t {
/* network model */
dmrgo_pdu_network_model_t model;
/* NET, NetBits wide */
uint16_t net;
/* SITE, SiteBits wide */
uint16_t site;
/* 2-bit PAR */
uint8_t par;
};
struct dmrgo_layer3_data_service_options_t {
/* emergency service */
bool is_emergency;
/* privacy, which ETSI TS 102 361-4 does not define */
bool is_privacy;
/* a Supplementary Data Transfer Service is requested for the call */
bool is_supp_data;
/* the payload channel uses dual slot data timing */
bool hi_rate;
/* multi-item data, false for single item data */
bool multi_item;
/* 0 is normal, 1 to 3 are priorities 1 to 3 (3 is highest) */
uint8_t priority_level;
};
struct dmrgo_layer3_diversion_service_options_t {
/* privacy, which ETSI TS 102 361-4 does not define */
bool is_privacy;
/* DIVONOFF: set the diversion, false to clear it */
bool set;
/* DIV_VD: voice calls */
bool voice;
/* DIV_PD: packet data calls */
bool packet_data;
/* DIV_SD: UDT short data calls */
bool short_data;
/* DIV_S: status calls */
bool status;
};
struct dmrgo_layer3_polling_service_options_t {
/* privacy, which ETSI TS 102 361-4 does not define */
bool is_privacy;
/* POL_FMT: the format of the data to poll */
dmrgo_enums_udt_format_t format;
};
struct dmrgo_layer3_registration_service_options_t {
/* reserved, 0 */
bool reserved;
/* privacy, which ETSI TS 102 361-4 does not define */
bool is_privacy;
/* the MS advises an IP connection */
bool ip_inform;
/* PowerSave_RQ: 0 requests no power save */
uint8_t power_save;
/* Reg_Dereg: true to register, false to de-register */
bool register_;
};
struct dmrgo_layer3_short_data_service_options_t {
/* privacy, which ETSI TS 102 361-4 does not define */
bool is_privacy;
/* a Supplementary Data Transfer Service is requested for the call */
bool is_supp_data;
};
struct dmrgo_layer3_status_service_options_t {
/* the target address is a talkgroup */
bool group;
/* supplementary_user data is requested for the call */
bool is_supp_data;
/* the 5 most significant bits of the 7-bit status */
uint8_t status_high;
};
struct dmrgo_layer3_voice_service_options_t {
/* emergency service */
bool is_emergency;
/* privacy, which ETSI TS 102 361-4 does not define */
bool is_privacy;
/* a Supplementary Data Transfer Service is requested for the call */
bool is_supp_data;
/* broadcast service, for talkgroups only */
bool is_broadcast;
/* reserved, 0 */
bool reserved;
/* 0 is normal, 1 to 3 are priorities 1 to 3 (3 is highest) */
uint8_t priority_level;
};
struct dmrgo_lip_enable_disable_t {
/* Response is true for the response PDU, false for the request. */
bool response;
/* AckRequested requests an acknowledgement. Only the request codes it. */
bool ack_requested;
/* Flags holds the location reporting enable flags, flag 1 in the most significant bit: flag 1 enables location reporting and flag 2 the recording of backlog location reports. The other flags are reserved, 0. */
uint8_t flags;
/* Elements is the bit offset of the first type 5 element. DecodeEnableDisable sets it; Encode ignores it. */
int64_t elements;
};
struct dmrgo_lip_header_t {
/* Short is true for PDU type 0, the short location report. The other fields are then zero. */
bool short_;
/* Extension is the PDU type extension of PDU type 1. */
dmrgo_lip_extension_t extension;
/* Response is the request/response bit, true for a response, for an Extension with HasResponseBit. */
bool response;
};
struct dmrgo_lip_immediate_request_t {
/* ReportType is the kind of report that the request specifies. */
dmrgo_lip_report_type_t report_type;
/* Elements is the bit offset of the first type 5 element. DecodeImmediateRequest sets it; Encode ignores it. */
int64_t elements;
};
struct dmrgo_lip_time_t {
/* Type shows which fields are coded. */
dmrgo_lip_time_type_t type;
/* Elapsed is the time elapsed code for DMRGO_LIP_TIME_ELAPSED: 0 under 5 s, 1 under 5 min, 2 under 30 min, 3 not known. */
uint8_t elapsed;
/* Day is the day of the month, 1 to 31, for DMRGO_LIP_TIME_POSITION. */
uint8_t day;
/* Hour is the UTC hour, 0 to 23, for DMRGO_LIP_TIME_POSITION. */
uint8_t hour;
/* Minute is the minute, 0 to 59, for DMRGO_LIP_TIME_POSITION. */
uint8_t minute;
/* Second is the second, 0 to 59, for DMRGO_LIP_TIME_POSITION. */
uint8_t second;
};
struct dmrgo_lip_location_t {
/* Shape shows which fields are coded. */
dmrgo_lip_shape_t shape;
/* Longitude is in degrees, -180 to 180, east positive, in steps of 360/2^25 degrees. Every shape but DMRGO_LIP_SHAPE_NONE codes it. */
double longitude;
/* Latitude is in degrees, -90 to 90, north positive, in steps of 180/2^24 degrees. Every shape but DMRGO_LIP_SHAPE_NONE codes it. */
double latitude;
/* Uncertainty is the horizontal position uncertainty of the circle shapes. */
uint8_t uncertainty;
/* HalfMajor is half of the major axis of the ellipse shapes. */
uint8_t half_major;
/* HalfMinor is half of the minor axis of the ellipse shapes. */
uint8_t half_minor;
/* Angle is the angle of the major axis of the ellipse shapes. */
uint8_t angle;
/* Confidence is the confidence level of the ellipse and arc shapes: 0 for 50 %, 1 68 %, 2 80 %, 3 90 %, 4 95 %, 5 99 %, 6 99.9 % and 7 not known. */
uint8_t confidence;
/* AltitudeUserDefined is the location altitude type of the shapes with an altitude: true for a user defined reference, false for the WGS84 ellipsoid. */
bool altitude_user_defined;
/* Altitude is the altitude code of the shapes with an altitude: 1 is -200 m, in steps of 1 m to 1201 (1000 m), 2 m to 1926 (2450 m) and 75 m to 2047 (11525 m or more). 0 is reserved. */
uint16_t altitude;
/* AltitudeUncertainty is the location altitude uncertainty code of the shapes with an altitude uncertainty. */
uint8_t altitude_uncertainty;
/* InnerRadius is the inner radius of DMRGO_LIP_SHAPE_ARC in steps of 2 m. */
uint16_t inner_radius;
/* OuterRadius is the outer radius of DMRGO_LIP_SHAPE_ARC in steps of 2 m. */
uint16_t outer_radius;
/* StartAngle is the start angle of DMRGO_LIP_SHAPE_ARC. */
uint8_t start_angle;
/* StopAngle is the stop angle of DMRGO_LIP_SHAPE_ARC. */
uint8_t stop_angle;
/* PositionError is the position error of DMRGO_LIP_SHAPE_POINT_POSITION_ERROR. */
dmrgo_layer3_position_accuracy_t position_error;
};
struct dmrgo_lip_velocity_t {
/* Type shows which fields are coded. */
dmrgo_lip_velocity_type_t type;
/* Horizontal is the horizontal velocity code. Every type but DMRGO_LIP_VELOCITY_NONE codes it. */
uint8_t horizontal;
/* HorizontalUncertainty is the horizontal velocity uncertainty of the types with uncertainties. */
uint8_t horizontal_uncertainty;
/* Down is the vertical velocity sign, true for downwards, of the types with a vertical velocity. */
bool down;
/* Vertical is the vertical velocity code of the types with a vertical velocity. */
uint8_t vertical;
/* VerticalUncertainty is the vertical velocity uncertainty of DMRGO_LIP_VELOCITY_HORIZONTAL_VERTICAL_UNCERTAIN and DMRGO_LIP_VELOCITY_ALL. */
uint8_t vertical_uncertainty;
/* Direction is the direction of travel extended, in steps of 360/256 degrees clockwise from north, of the types with a direction. */
uint8_t direction;
/* DirectionUncertainty is the direction of travel uncertainty of DMRGO_LIP_VELOCITY_HORIZONTAL_DIRECTION_UNCERTAIN and DMRGO_LIP_VELOCITY_ALL. */
uint8_t direction_uncertainty;
};
struct dmrgo_lip_long_report_t {
/* Time is the time data. */
dmrgo_lip_time_t time;
/* Location is the location data. */
dmrgo_lip_location_t location;
/* Velocity is the velocity data. */
dmrgo_lip_velocity_t velocity;
/* AckRequested requests a location report acknowledgement. */
bool ack_requested;
/* UserDefined is the type of additional data: true when AdditionalData is user defined data, false for the reason for sending. */
bool user_defined;
/* AdditionalData is the reason for sending or the user defined data. */
uint8_t additional_data;
/* Elements is the bit offset of the first type 5 element. DecodeLongReport sets it; Encode ignores it. */
int64_t elements;
};
struct dmrgo_lip_report_ack_t {
/* Reserved is reserved for result reasons, 0. */
uint8_t reserved;
/* Elements is the bit offset of the first type 5 element. DecodeReportAck sets it; Encode ignores it. */
int64_t elements;
};
struct dmrgo_lip_element_t {
/* ID is the type 5 element identifier. */
dmrgo_lip_element_id_t id;
/* Offset is the bit offset of the element data in the PDU. */
int64_t offset;
/* Bits is the length of the element data in bits. For a length of 8 octets or more it holds the fill bits too. */
int64_t bits;
/* Next is the bit offset of the element after it. */
int64_t next;
};
struct dmrgo_location_fix_t {
/* Format is the format of the report. */
dmrgo_location_format_t format;
/* Source and Destination are the radio IDs of the data packet. */
uint32_t source;
/* Source and Destination are the radio IDs of the data packet. */
uint32_t destination;
/* Valid reports a position from a GNSS fix. An NMEA sentence with status V gives false. */
bool valid;
/* Latitude and Longitude are in degrees, north and east positive. */
double latitude;
/* Latitude and Longitude are in degrees, north and east positive. */
double longitude;
/* Altitude is in meters, when HasAltitude is set. */
double altitude;
bool has_altitude;
/* Radius is the accuracy of the position in meters, when HasRadius is set. */
double radius;
bool has_radius;
/* Speed is the speed over ground in meters per second, when HasSpeed is set. */
double speed;
bool has_speed;
/* Course is the course over ground in degrees from north, when HasCourse is set. */
double course;
bool has_course;
/* Year to Second are the UTC time of the position, when HasTime is set. */
uint16_t year;
uint8_t month;
uint8_t day;
uint8_t hour;
uint8_t minute;
uint8_t second;
bool has_time;
/* Result is the result code of the answer, when HasResult is set: a dmrgo_lrrp_result_code_t for DMRGO_LOCATION_FORMAT_LRRP, and the Result of a standard answer for DMRGO_LOCATION_FORMAT_HDAP. 0 is success. */
uint32_t result;
bool has_result;
/* RequestID holds the identifier of the request that the report answers, in its first RequestIDLength octets: the LRRP request ID, or the RequestID of an HDAP answer or condition report, big-endian. An LRRP request ID longer than 16 octets gives RequestIDLength 0. */
uint8_t request_id[16];
uint8_t request_id_length;
};
struct dmrgo_location_header_t {
/* Data is the data header, for dmrgo_packet_new_packet or a data sender. */
dmrgo_pdu_data_header_t data;
};
struct dmrgo_ars_header_t {
/* Extension reports that a second header octet follows. */
bool extension;
/* AckRequired requests an answer in a request. In an answer it marks a failure. */
bool ack_required;
/* Priority is the priority bit. */
bool priority;
/* Control is the control bit. */
bool control;
/* Type is the PDU type. */
dmrgo_ars_type_t type;
};
struct dmrgo_ars_registration_t {
/* Extension reports that a further header octet follows. */
bool extension;
/* Event is the event of a device registration. */
dmrgo_ars_event_t event;
/* Encoding is the coding of the identifiers. */
dmrgo_ars_encoding_t encoding;
};
struct dmrgo_ars_response_t {
/* Extension reports that a further header octet follows. */
bool extension;
/* Value is the refresh time of a successful device registration, in units of 30 minutes, 0 for none. When dmrgo_ars_header_t.ack_required marks a failure it is the FailureReason. */
uint8_t value;
};
struct dmrgo_ars_message_t {
/* Length is the number of octets after it. AppendBinary sets it. */
uint16_t length;
/* Header is the first header octet. */
dmrgo_ars_header_t header;
/* Registration is the second header octet of a device or user registration with dmrgo_ars_message_t.header.extension set. */
dmrgo_ars_registration_t registration;
/* Device is the identifier of the radio in a registration: its radio ID in decimal ASCII digits. */
uint8_t *device;
size_t device_len;
/* User is the user identifier of a registration. */
uint8_t *user;
size_t user_len;
/* Password is the password of a registration. */
uint8_t *password;
size_t password_len;
/* Response is the second header octet of an answer with dmrgo_ars_message_t.header.extension set. */
dmrgo_ars_response_t response;
/* Extra holds the octets after the fields that the package decodes. */
uint8_t *extra;
size_t extra_len;
};
struct dmrgo_lrrp_circle2d_t {
/* Latitude is in degrees, north positive. Its top bit is the sign and the other 31 bits the magnitude, as radios send it. */
double latitude;
/* Longitude is in degrees, east positive. */
double longitude;
/* Radius is the radius of the circle that holds the position, in meters. */
double radius;
};
struct dmrgo_lrrp_circle3d_t {
/* Latitude is in degrees, north positive. Its top bit is the sign and the other 31 bits the magnitude, as radios send it. */
double latitude;
/* Longitude is in degrees, east positive. */
double longitude;
/* Radius is the radius of the circle that holds the position, in meters. */
double radius;
/* Altitude is in meters. */
double altitude;
/* AltitudeAccuracy is in meters. */
double altitude_accuracy;
};
struct dmrgo_lrrp_circle3d_whole_t {
/* Latitude is in degrees, north positive. Its top bit is the sign and the other 31 bits the magnitude, as radios send it. */
double latitude;
/* Longitude is in degrees, east positive. */
double longitude;
/* Radius is the radius of the circle that holds the position, in meters. */
uint32_t radius;
/* Altitude is in meters. */
int32_t altitude;
/* AltitudeAccuracy is in meters. */
uint32_t altitude_accuracy;
};
struct dmrgo_lrrp_request_t {
/* RequestID is the identifier that the reports carry. */
uint8_t *request_id;
size_t request_id_len;
bool has_request_id;
/* ShortRequestID is a request identifier of one octet. */
uint8_t short_request_id;
bool has_short_request_id;
/* Periodic requests reports on a period or a distance. */
bool periodic;
/* OneShot requests a single report. */
bool one_shot;
/* Interval is the period of a periodic trigger, in seconds. */
uint32_t interval;
bool has_interval;
/* Distance is the distance of a distance trigger, in meters. */
uint32_t distance;
bool has_distance;
/* TriggerCondition is the condition that sends a report. */
dmrgo_lrrp_trigger_condition_t trigger_condition;
bool has_trigger_condition;
/* ProtocolVersion is the requested protocol version. */
uint32_t protocol_version;
bool has_protocol_version;
/* Accuracy requests the accuracy of the position. */
bool accuracy;
/* AccuracyAndTime requests the accuracy and the time of the position. */
bool accuracy_and_time;
/* MaxInfoAge is the age, in seconds, of the oldest position that the report may carry: the require-max-info-age token. */
uint32_t max_info_age;
bool has_max_info_age;
/* Time requests the time of the position. */
bool time;
/* Altitude requests the altitude. */
bool altitude;
/* Speed requests the horizontal speed. */
bool speed;
/* Direction requests the heading. */
bool direction;
/* VerticalSpeed requests the vertical speed. */
bool vertical_speed;
/* LevelOfConfidence is the confidence that the request specifies. */
uint8_t level_of_confidence;
bool has_level_of_confidence;
};
struct dmrgo_lrrp_time_t {
/* Year is the year, such as 2026. */
uint16_t year;
/* Month is the month, 1 to 12. */
uint8_t month;
/* Day is the day of the month, 1 to 31. */
uint8_t day;
/* Hour is the hour, 0 to 23. */
uint8_t hour;
/* Minute is the minute, 0 to 59. */
uint8_t minute;
/* Second is the second, 0 to 59. */
uint8_t second;
};
struct dmrgo_lrrp_operation_error_t {
/* Code is the result code. */
dmrgo_lrrp_result_code_t code;
/* Info is the text of the error. */
uint8_t *info;
size_t info_len;
};
struct dmrgo_lrrp_point2d_t {
/* Latitude is in degrees, north positive. Its top bit is the sign and the other 31 bits the magnitude, as radios send it. */
double latitude;
/* Longitude is in degrees, east positive. */
double longitude;
};
struct dmrgo_lrrp_point3d_whole_t {
/* Latitude is in degrees, north positive. Its top bit is the sign and the other 31 bits the magnitude, as radios send it. */
double latitude;
/* Longitude is in degrees, east positive. */
double longitude;
/* Altitude is in meters. */
int32_t altitude;
};
struct dmrgo_lrrp_point3d_t {
/* Latitude is in degrees, north positive. Its top bit is the sign and the other 31 bits the magnitude, as radios send it. */
double latitude;
/* Longitude is in degrees, east positive. */
double longitude;
/* Altitude is in meters. */
double altitude;
};
struct dmrgo_lrrp_point3d_accuracy_t {
/* Latitude is in degrees, north positive. Its top bit is the sign and the other 31 bits the magnitude, as radios send it. */
double latitude;
/* Longitude is in degrees, east positive. */
double longitude;
/* Altitude is in meters. */
double altitude;
/* AltitudeAccuracy is in meters. */
double altitude_accuracy;
};
struct dmrgo_lrrp_report_t {
/* RequestID is the identifier of the request that the report answers. */
uint8_t *request_id;
size_t request_id_len;
bool has_request_id;
/* ShortRequestID is a request identifier of one octet. */
uint8_t short_request_id;
bool has_short_request_id;
/* Time is the time of the position. */
dmrgo_lrrp_time_t time;
bool has_time;
/* ProtocolVersion is the version of the protocol. */
uint32_t protocol_version;
bool has_protocol_version;
/* Result is the result code of the request. */
dmrgo_lrrp_result_code_t result;
bool has_result;
/* Success reports a request that succeeded. */
bool success;
/* Error is the result of a request that failed. */
dmrgo_lrrp_operation_error_t error;
bool has_error;
/* Circle2D is a position with its accuracy. */
dmrgo_lrrp_circle2d_t circle2d;
bool has_circle2d;
/* Circle3DWhole is a position with an altitude and its accuracy in whole meters. */
dmrgo_lrrp_circle3d_whole_t circle3d_whole;
bool has_circle3d_whole;
/* Circle3D is a position with an altitude and its accuracy. */
dmrgo_lrrp_circle3d_t circle3d;
bool has_circle3d;
/* Direction is the heading in units of 2 degrees from north. */
uint8_t direction;
bool has_direction;
/* LevelOfConfidence is the confidence of the position in percent. */
uint8_t level_of_confidence;
bool has_level_of_confidence;
/* Point2D is a position. */
dmrgo_lrrp_point2d_t point2d;
bool has_point2d;
/* Point3DWhole is a position with an altitude in whole meters. */
dmrgo_lrrp_point3d_whole_t point3d_whole;
bool has_point3d_whole;
/* Point3D is a position with an altitude. */
dmrgo_lrrp_point3d_t point3d;
bool has_point3d;
/* Point3DAccuracy is a position with an altitude and its accuracy. */
dmrgo_lrrp_point3d_accuracy_t point3d_accuracy;
bool has_point3d_accuracy;
/* SpeedWhole is the horizontal speed in whole meters per second, which some radios send in place of Speed. */
uint32_t speed_whole;
bool has_speed_whole;
/* Speed is the horizontal speed in meters per second. */
double speed;
bool has_speed;
/* VerticalSpeed is the vertical speed in meters per second, up positive. */
double vertical_speed;
bool has_vertical_speed;
};
struct dmrgo_lrrp_message_t {
/* Document is the kind of the message. */
dmrgo_lrrp_document_id_t document;
/* Length is the number of octets after it. AppendBinary sets it. */
uint32_t length;
/* Request holds the tokens of a request document. */
dmrgo_lrrp_request_t request;
/* Report holds the tokens of a report or answer document. */
dmrgo_lrrp_report_t report;
};
struct dmrgo_tms_header_t {
/* Extension reports that more header octets follow the address. */
bool extension;
/* AckRequired requests the receiver to send an acknowledgement. */
bool ack_required;
/* Reserved is the reserved bit. Radios set it in a text message. */
bool reserved;
/* Type is the kind of the message. */
dmrgo_tms_type_t type;
};
struct dmrgo_tms_sequence_low_t {
/* Extension reports that SequenceHigh follows. */
bool extension;
/* Reserved holds the reserved bits. */
uint8_t reserved;
/* Low holds the low 5 bits of the sequence number. */
uint8_t low;
};
struct dmrgo_tms_sequence_high_t {
/* Extension reports that a further header octet follows. */
bool extension;
/* High holds the high 2 bits of the sequence number. */
uint8_t high;
/* Encoding is the coding of the text. */
dmrgo_tms_encoding_t encoding;
};
struct dmrgo_tms_message_t {
/* Length is the number of octets after it. AppendBinary sets it. */
uint16_t length;
/* Header is the first header octet. */
dmrgo_tms_header_t header;
/* Address is the address field, empty in the radio to radio messages that are known. */
uint8_t *address;
size_t address_len;
/* Capability is the octet after the address of an availability message with dmrgo_tms_message_t.header.extension set; its low 2 bits give the capability of the device. */
uint8_t capability;
/* SequenceLow is the first extension octet of a text message or an acknowledgement, when dmrgo_tms_message_t.header.extension is set. */
dmrgo_tms_sequence_low_t sequence_low;
/* SequenceHigh is the second extension octet, when dmrgo_tms_message_t.sequence_low.extension is set. */
dmrgo_tms_sequence_high_t sequence_high;
/* Text is the text in UTF-16LE. Radios start it with a CR LF. */
uint8_t *text;
size_t text_len;
};
struct dmrgo_nmea_rmc_t {
/* Talker is the talker ID, such as "GP" for GPS or "GN" for more than one satellite system. */
uint8_t talker[2];
/* Hour is the hour of the UTC time of the fix. */
uint8_t hour;
/* Minute is the minute of the UTC time of the fix. */
uint8_t minute;
/* Second is the second of the UTC time of the fix, 60 for a leap second. */
uint8_t second;
/* Millisecond is the fraction of Second, from the first three digits after the decimal point. */
uint16_t millisecond;
/* HasTime reports a UTC time field that is not empty. */
bool has_time;
/* Valid reports status A. Status V, a warning of the receiver, gives false. */
bool valid;
/* Latitude is in degrees, north positive. */
double latitude;
/* Longitude is in degrees, east positive. */
double longitude;
/* HasPosition reports a latitude and a longitude that are not empty. */
bool has_position;
/* Speed is the speed over ground in knots. */
double speed;
/* HasSpeed reports a speed field that is not empty. */
bool has_speed;
/* Course is the course over ground in degrees true. */
double course;
/* HasCourse reports a course field that is not empty. */
bool has_course;
/* Day is the day of the UTC date, 1 to 31. */
uint8_t day;
/* Month is the month of the UTC date, 1 to 12. */
uint8_t month;
/* Year is 2000 plus the two-digit year of the UTC date. */
uint16_t year;
/* HasDate reports a UTC date field that is not empty. */
bool has_date;
/* MagneticVariation is in degrees, east positive. */
double magnetic_variation;
/* Mode is the mode indicator of NMEA 0183 2.3 and later, such as 'A' for autonomous, or 0 when the sentence has none. */
uint8_t mode;
};
struct dmrgo_privacy_info_t {
/* Encrypted reports that the call is encrypted: its LC sets the Privacy service option, or a PI header came. */
bool encrypted;
/* Header reports that a PI header with a good CRC came, or for a data packet a privacy header (see FromProprietaryHeader), so that MFID, Algorithm, KeyID and MI are set. */
bool header;
/* MFID is the FID of the PI header. Algorithm, KeyID and MI follow the layout of FID 0x10; for another FID they hold its octets 0, 2 and 3 to 6 as they are. */
dmrgo_enums_fid_t mfid;
/* Algorithm is the algorithm ID of the PI header. */
dmrgo_privacy_algorithm_t algorithm;
/* KeyID is the key ID of the PI header. */
uint8_t key_id;
/* MI is the 32-bit message indicator of the PI header. */
uint32_t mi;
/* Decrypting reports that the Receiver holds the key of the call and returns its frames in the clear. */
bool decrypting;
};
struct dmrgo_privacy_transmitter_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Key is the key of the calls. */
dmrgo_privacy_key_t *key;
/* Service is the radio service of the station. It must be stated, and it must not be DMRGO_PRIVACY_SERVICE_AMATEUR. */
dmrgo_service_t service;
};
struct dmrgo_voice_frame_quality_t {
/* ErrorsCorrected is the number of bit errors that the Golay codes corrected, at most 255. */
uint8_t errors_corrected;
/* Bad reports that section A of the frame was uncorrectable. */
bool bad;
};
struct dmrgo_voice_stats_t {
/* Bursts is the number of voice bursts of the call. */
uint32_t bursts;
/* Lost is the number of voice bursts that did not arrive. */
uint32_t lost;
/* Duplicates is the number of bursts dropped as copies of an earlier one, voice bursts and Voice LC Headers. */
uint32_t duplicates;
/* Late is the number of voice bursts dropped because their sequence number was behind the last one. */
uint32_t late;
/* BitsChecked is the number of vocoder bits that the AMBE+2 FEC covered. */
uint32_t bits_checked;
/* BitErrors is the number of bit errors that the AMBE+2 FEC corrected. BitErrors / BitsChecked is the bit error rate, as dmrgo_fec_ber_calculator_t counts it. */
uint32_t bit_errors;
/* Duration is the time from the start of the call to its end. */
dmrgo_duration_t duration;
};
struct dmrgo_voice_event_t {
/* Kind is the kind of the event. */
dmrgo_voice_event_kind_t kind;
/* Call is the call the event belongs to. For voice before the LC is known, its Origin is DMRGO_VOICE_ORIGIN_UNKNOWN. */
dmrgo_voice_call_t call;
/* Position is the superframe position of a voice burst, or DMRGO_ENUMS_VOICE_BURST_UNKNOWN when no evidence placed it. */
dmrgo_enums_voice_burst_type_t position;
/* Burst is the voice burst or the PI Header as received. */
dmrgo_layer2_raw_burst_t burst;
/* Frames is the FEC result of each vocoder slot of a voice burst. */
dmrgo_voice_frame_quality_t frames[3];
/* Lost is the number of voice bursts lost just before this one, at most 255. For the first voice burst after a Voice LC Header or PI Header, it is the number lost after the header. */
uint8_t lost;
/* LC is the embedded LC of a DMRGO_VOICE_EVENT_EMBEDDED. */
dmrgo_pdu_full_link_control_t lc;
/* Text is the alias of a DMRGO_VOICE_EVENT_TALKER_ALIAS, in UTF-8, at most DMRGO_PDU_TALKER_ALIAS_MAX_TEXT bytes. */
uint8_t *text;
size_t text_len;
/* Reason is why the call ended. */
dmrgo_voice_end_reason_t reason;
/* Stats counts what the Receiver saw during the call. */
dmrgo_voice_stats_t stats;
};
struct dmrgo_voice_output_t {
/* Kind is the kind of the output. */
dmrgo_voice_output_kind_t kind;
/* Burst is the burst to send. */
dmrgo_layer2_raw_burst_t burst;
/* Due is the time at which the burst goes on air, 60 ms after the one before it. */
dmrgo_duration_t due;
/* Hint is what the burst is, for a transport: DMRGO_LAYER2_KIND_VOICE with the superframe position, or DMRGO_LAYER2_KIND_DATA with the data type of a header, PI Header or terminator, or DMRGO_LAYER2_KIND_REVERSE_CHANNEL. Its Slot is the Slot of the config. */
dmrgo_layer2_hint_t hint;
/* Fill reports a voice burst with a fill in place of voice that was not queued in time, or with silence that pads the last superframe. The fills that Relay queues for bursts that the Receiver reports lost are voice and do not set it. */
bool fill;
/* Reason is why the transmission ended: DMRGO_VOICE_END_TERMINATOR after a normal end, DMRGO_VOICE_END_LOST for a relayed call that was lost, DMRGO_VOICE_END_TIMEOUT after T_TO. */
dmrgo_voice_end_reason_t reason;
/* Call is the call of the burst, or of the transmission that ended, from the Call of Start or Relay. It is zero for an Interrupter, whose RC bursts carry no addresses. */
dmrgo_layer2_call_t call;
};
struct dmrgo_rf_burst_t {
/* Data is the 264 burst bits as detected, in transmit order. DMRGO_RF_TIER3 detects a burst twice, with the discriminator and coherently, and gives the detection nearer to Fixed. */
dmrgo_layer2_raw_burst_t data;
/* Seconds is the time of the first burst bit from the first sample, within 2 µs on a clean signal at every tier, input and rate, plus the bound that SecondsSymbols and SecondsError give. */
double seconds;
/* SecondsSymbols is the number of symbols over which Seconds was projected at the nominal symbol period (4800 symbols per second, ETSI TS 102 361-1 clause 10.2) because the clock rate of the transmitter was not yet known well enough: Seconds can then be off by up to SecondsSymbols/4800 times the relative clock error. It is 0 once the rate is known. */
int64_t seconds_symbols;
/* SecondsError is the error of Seconds, in seconds, that the uncertainty of the clock rate estimate gives over the projection: the rate error of the timing loop, or the slope uncertainty of the line through the SYNC fits, times the symbols from the timing anchor to the burst. */
float seconds_error;
/* Distance is the Hamming distance of the SYNC field from Sync, or -1 for a burst placed by timing without a SYNC (voice bursts B to F). */
int64_t distance;
/* Sync is the SYNC pattern of the burst. */
dmrgo_enums_sync_pattern_t sync;
/* Voice is the superframe position of a voice burst whose position comes from the slot timing, or DMRGO_ENUMS_VOICE_BURST_UNKNOWN when the SYNC field alone classifies the burst. */
dmrgo_enums_voice_burst_type_t voice;
/* CACH is the 24 bits before the burst in transmit order, when HasCACH. */
uint8_t cach[3];
bool has_cach;
/* BS is set when the burst is BS-sourced, so that the bits before it are a CACH. */
bool bs;
/* Stream numbers the transmissions that the Receiver locked to, from 1. Slot is the 30 ms slot of the burst in its stream. */
int64_t stream;
int64_t slot;
/* Fixed and FixedCACH hold Data and CACH with each FEC field replaced by the codeword that soft-decision decoding picked, when HasFixed. The voice slots of a call whose voice LC has FID 0xC2 (Codec2) carry no FEC and keep the bits of Data, from the LC that gives the FID on. */
dmrgo_layer2_raw_burst_t fixed;
uint8_t fixed_cach[3];
bool has_fixed;
/* Codec2 is the bit rate, 2400 or 3200, of the Codec2 frames of a voice burst of a call whose voice LC has FID 0xC2, once the frames since the start of the call identify it, which 5 clean frames do. It is 0 for other bursts, before that, and at DMRGO_RF_TIER0. */
int64_t codec2;
};
struct dmrgo_rf_audio_rx_config_on_bursts_fn_t {
int (*fn)(DMRGO_USER_T user, const dmrgo_rf_burst_t *bursts, size_t bursts_len);
DMRGO_USER_T user;
};
struct dmrgo_rf_short_lc_t {
/* LC is the Short LC. dmrgo_rf_short_lc_t.lc.fec is the result of the decode that recovered it, and is never uncorrectable. */
dmrgo_pdu_short_lc_t lc;
/* Stream, Slot and Seconds are those of the burst whose CACH carries the last fragment. */
int64_t stream;
int64_t slot;
double seconds;
/* Soft is set when soft-decision decoding recovered the Short LC from fragments that the hard decode of dmrgo_layer2_short_lc_assembler_t rejects. */
bool soft;
};
struct dmrgo_rf_audio_rx_config_on_short_lc_fn_t {
int (*fn)(DMRGO_USER_T user, const dmrgo_rf_short_lc_t *short_lcs, size_t short_lcs_len);
DMRGO_USER_T user;
};
struct dmrgo_rf_audio_rx_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Tier is DMRGO_RF_TIER0, DMRGO_RF_TIER1, DMRGO_RF_TIER2 or DMRGO_RF_TIER3. The zero value DMRGO_RF_TIER_DEFAULT is DMRGO_RF_TIER1 for NewAudioReceiver, DMRGO_RF_TIER0 for it under TinyGo, and DMRGO_RF_TIER0 for Init, which does not allocate the stages of the higher tiers. Under TinyGo too, NewAudioReceiver takes every tier and allocates its stages once, and a program that calls only Init links none of them. DMRGO_RF_TIER2 detects the bursts again coherently, on the carrier phase that it rebuilds from the samples, at about 5 times the CPU time of DMRGO_RF_TIER1. DMRGO_RF_TIER3 detects the bursts of DMRGO_RF_TIER2 again over 52 carrier phases with no compute budget and makes four passes over each data burst, at about 10 times the CPU time of DMRGO_RF_TIER2, 935 KB and the delay of DMRGO_RF_TIER2. */
dmrgo_rf_tier_t tier;
/* Rate is the sample rate of the discriminator samples, in Hz, from 8000 to 1000000, and for DMRGO_RF_TIER0 to 48000. 0 means 48000. The receiver runs at 48000, as sound cards sample, 24000, as MMDVM modems sample, 12000 or 9600: at Rate when it is one of them, else at the lowest of them at or above Rate, or 48000 above 48000, through a resampler. DMRGO_RF_TIER0 resamples in fixed point with a table in flash. A lower rate costs less: the receiver halves 48 kHz and then 24 kHz with a half-band filter before its matched filter, which runs at 12 kHz or 9.6 kHz. */
int64_t rate;
/* Bits is the resolution of the converter, from 8 to 16. 0 means 16. Each sample holds one code of Bits bits in its low bits. */
int64_t bits;
/* Unsigned selects offset binary codes, from 0 to 1<<Bits-1, in place of two's complement codes. */
bool unsigned_;
/* OnBursts, when not NULL, selects stream mode: Write and Flush hand the bursts to it. Each call carries the bursts that are ready at the same point of the stream, in storage of the receiver that is valid only during the call: usually one, and after a late lock the bursts of the slots before the lock, decoded again. A slot comes out at most once: the replay after a relock skips each slot that an earlier lock already gave. When NULL, the receiver is in append mode, for AppendBursts and AppendFlush. */
dmrgo_rf_audio_rx_config_on_bursts_fn_t on_bursts;
/* PreEmphasis, when not NULL, states that the radio de-emphasizes its discriminator output from 300 Hz to 3 kHz, as the speaker and accessory outputs of FM radios do, so that the receiver inverts it with the filter that it holds before it detects the bursts: a RxPreEmphasis of this receiver alone, set up by Init or NewRxPreEmphasis. NULL is a flat discriminator output, as the radio chips of hotspots and MMDVM modems give it. Every Tier and Rate takes it. A RxPreEmphasis that is not set up gives a *dmrgo_config_error_t. */
dmrgo_rf_rx_pre_emphasis_t *pre_emphasis;
/* OnShortLC, when not NULL, receives each Short LC that the CACH of the bursts carries and that passes its CRC-8, in stream and in append mode, in storage of the receiver that is valid only during the call: usually one. The receiver calls it as it outputs the burst of the last fragment, before that burst reaches OnBursts or the slice of AppendBursts. It decodes the fragments of the Decoded CACH as dmrgo_layer2_short_lc_assembler_t does, and from DMRGO_RF_TIER1 up decodes those that fail again from their soft values. DMRGO_RF_TIER0 gives the hard decode only. Init takes no OnShortLC and returns a *dmrgo_config_error_t for it. */
dmrgo_rf_audio_rx_config_on_short_lc_fn_t on_short_lc;
};
struct dmrgo_rf_audio_tx_config_on_samples_fn_t {
int (*fn)(DMRGO_USER_T user, const int16_t *values, size_t values_len);
DMRGO_USER_T user;
};
struct dmrgo_rf_audio_tx_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Tier selects the modulator: DMRGO_RF_TIER0, DMRGO_RF_TIER1 or DMRGO_RF_TIER2. The zero value DMRGO_RF_TIER_DEFAULT is DMRGO_RF_TIER1 for NewAudioTransmitter, and DMRGO_RF_TIER0 for Init and for NewAudioTransmitter under TinyGo. Under TinyGo too, NewAudioTransmitter takes every modulator, and a program that calls only Init links none but DMRGO_RF_TIER0. DMRGO_RF_TIER3 has no modulator of its own yet and gives a *dmrgo_config_error_t. */
dmrgo_rf_tier_t tier;
/* Rate is the sample rate of the converter, in Hz. 0 means 48000. DMRGO_RF_TIER0 makes 24000 and 48000. DMRGO_RF_TIER1 and DMRGO_RF_TIER2 make any rate from 8000 whose ratio to 4800 has a numerator of at most 1024 in lowest terms, such as 8000, 22050 or 44100, and the limits are measured to 96000. */
int64_t rate;
/* Bits is the resolution of the converter, from 8 to 16. 0 means 16. Each sample holds one code of Bits bits in its low bits. */
int64_t bits;
/* Unsigned selects offset binary codes, from 0 to 1<<Bits-1, in place of two's complement codes. */
bool unsigned_;
/* OnSamples, when not NULL, selects stream mode: Write and Flush hand the samples to it in chunks of at most MaxOutput(0) samples, in storage of the transmitter that is valid only during the call. When NULL, the transmitter is in append mode, for AppendSamples and AppendFlush. */
dmrgo_rf_audio_tx_config_on_samples_fn_t on_samples;
/* Level is the code of a run of symbol +3, 1944 Hz of deviation, less the center, from 1 to 16000. 0 means the most that fits in Bits with Offset over every run of symbols. The limits are measured at about half of full scale, 1040 codes at 12 bits. Under 16 bits, DMRGO_RF_TIER1 and DMRGO_RF_TIER2 at 24000 Hz and above reach 2.12 times Level, so there they are measured at the most that fits Bits at Offset 0, 969 to 984 codes at 12 bits. A Level under the measured level gives a *RegionError. */
int64_t level;
/* Offset is added to the center code, 0 or 1<<(Bits-1) when Unsigned. */
int64_t offset;
/* PreEmphasis, when not NULL, states that the radio pre-emphasizes its modulator input from 300 Hz to 3 kHz, so that the transmitter inverts it with the modulator that it holds: a PreEmphasis of this transmitter alone, set up by Init or NewPreEmphasis. DMRGO_RF_TIER1 and DMRGO_RF_TIER2 invert it with a filter of their own. NULL is a radio with no pre-emphasis. The limits are measured with it as without it, and a setup whose limits do not keep their margin with it gives a *RegionError. */
dmrgo_rf_pre_emphasis_t *pre_emphasis;
/* InputLowpassHz states the cutoff in Hz of a low pass of at least two poles that the radio puts before its modulator input; 0 means none, a converter that drives the modulator with no filter. The limits are measured with a two-pole Butterworth low pass at 8000, 5000 and 3000 Hz, and a stated cutoff takes the next looser of these, so 6000 counts as 8000 and a cutoff above 8000 as none. A low pass lowers the least Rate that keeps the limits. A negative cutoff gives a *dmrgo_config_error_t. */
int64_t input_lowpass_hz;
/* Region is the regulatory region whose limits the signal keeps. */
dmrgo_rf_region_t region;
/* Service is the radio service of the station, as in TxConfig. */
dmrgo_service_t service;
/* Power is the most power of the station in dBm, as in TxConfig. */
int64_t power;
/* InputHighpassHz states the corner in Hz of the AC coupling, a first-order high pass, that the radio puts before its modulator input; 0 means none stated, and the signal is the same as without the field. DMRGO_RF_TIER1 and DMRGO_RF_TIER2 then add back the low frequencies that the high pass takes away, as far as the room of the converter above the peak at Level allows, and a zero Level takes the level that the limits are measured at, which leaves that room at 16 bits and none at fewer. A corner over 20 Hz, a negative one, or a corner at DMRGO_RF_TIER0 gives a *dmrgo_config_error_t. */
int64_t input_highpass_hz;
};
struct dmrgo_rf_monitor_burst_t {
/* Hint is the data of the Monitor about the burst besides its bits: Slot is the TDMA channel from the CACHs of the stream, or DMRGO_ENUMS_SLOT_UNKNOWN for a burst without a CACH, and Kind and VoiceBurst come from the timing, as dmrgo_rf_burst_hint gives them. */
dmrgo_layer2_hint_t hint;
/* LC is the LC of the call on the TDMA channel, when HasLC. */
dmrgo_pdu_lc_bytes_t lc;
/* HasLC reports that LC is set. */
bool has_lc;
/* LCDone reports that this burst completed a Full LC: a voice LC header, a terminator with LC, or the embedded LC of a superframe. */
bool lc_done;
/* End reports a terminator with LC: the call on the channel ended, and the Monitor clears its LC after this burst. */
bool end;
};
struct dmrgo_rf_rx_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Tier selects the detection. The zero value DMRGO_RF_TIER_DEFAULT is DMRGO_RF_TIER1 for NewReceiver, and DMRGO_RF_TIER0 for Init and for NewReceiver under TinyGo. Under TinyGo too, NewReceiver takes every tier. */
dmrgo_rf_tier_t tier;
/* Rate is the sample rate of the I/Q, in Hz. 0 means 2400000. DMRGO_RF_TIER0 to DMRGO_RF_TIER3 take a Rate from 48000 to 1e9, and DMRGO_RF_TIER0 and DMRGO_RF_TIER1 also one from 24000, which runs their receiver with a complex front end in place of the FM discriminator, with about 2 KB of state for DMRGO_RF_TIER0. DMRGO_RF_TIER0 also takes 9600 and 12000, for I/Q that a radio chip filtered to the channel, with about 1.4 KB of state; Init sets up only these. */
int64_t rate;
/* Format is the layout of the I/Q samples. 0 means DMRGO_RF_IQ_FORMAT_CS16. */
dmrgo_rf_iq_format_t format;
/* OffsetHz is the frequency of the carrier relative to the center of the I/Q, in Hz, when the oscillator of the radio is known to be off, as for an RTL-SDR without ppm correction (rtl_fm -p): the offset that OffsetHz of a Receiver reported for that radio. The receiver tunes there before it searches 6.25 kHz around it for the carrier. It must be under 24000 in size, or under Rate/2 for a Rate under 48000. 0 means a centered carrier. */
double offset_hz;
/* OnBursts, when not NULL, selects stream mode: Write and Flush hand the bursts to it. Each call carries the bursts that are ready at the same point of the stream, in storage of the receiver that is valid only during the call: usually one, and after a late lock the LookbackSlots bursts decoded again. A slot comes out at most once: the replay after a relock skips each slot that an earlier lock already gave. When NULL, the receiver is in append mode, for AppendBursts and AppendFlush. */
dmrgo_rf_audio_rx_config_on_bursts_fn_t on_bursts;
/* LookbackSlots is the number of 30 ms slots before the first SYNC it locks to that the receiver keeps and decodes: 0 means 4 for DMRGO_RF_TIER1, 8 for DMRGO_RF_TIER2, and 16 for DMRGO_RF_TIER3, and at most DMRGO_RF_MAX_LOOKBACK_SLOTS. DMRGO_RF_TIER0 keeps none, and loses the start of a stream that it enters late. */
int64_t lookback_slots;
/* OnShortLC, when not NULL, receives each Short LC that the CACH of the bursts carries and that passes its CRC-8, in stream and in append mode, in storage of the receiver that is valid only during the call: usually one. The receiver calls it as it outputs the burst of the last fragment, before that burst reaches OnBursts or the slice of AppendBursts. It decodes the fragments of the Decoded CACH as dmrgo_layer2_short_lc_assembler_t does, and from DMRGO_RF_TIER1 up decodes those that fail again from their soft values. DMRGO_RF_TIER0 gives the hard decode only. Init takes no OnShortLC and returns a *dmrgo_config_error_t for it. */
dmrgo_rf_audio_rx_config_on_short_lc_fn_t on_short_lc;
};
struct dmrgo_rf_tx_config_on_samples_fn_t {
int (*fn)(DMRGO_USER_T user, const uint8_t *data, size_t data_len);
DMRGO_USER_T user;
};
struct dmrgo_rf_tx_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Tier selects the modulator: DMRGO_RF_TIER0, DMRGO_RF_TIER1 or DMRGO_RF_TIER2. The zero value DMRGO_RF_TIER_DEFAULT is DMRGO_RF_TIER1 for NewTransmitter, and DMRGO_RF_TIER0 for Init and for NewTransmitter under TinyGo. Under TinyGo too, NewTransmitter takes every modulator, and a program that calls only Init links none but DMRGO_RF_TIER0. DMRGO_RF_TIER3 has no modulator of its own yet and gives a *dmrgo_config_error_t. */
dmrgo_rf_tier_t tier;
/* Rate is the sample rate of the I/Q, in Hz. 0 means 2400000. DMRGO_RF_TIER1 and DMRGO_RF_TIER2 make any Rate from 48000 to 20000000, and DMRGO_RF_TIER0 makes 96000. Under 62500 the image of the main lobe falls within two channels of the carrier, where no limit can count on a filter of the radio, so it gives a *RegionError. */
int64_t rate;
/* Format is the layout of the I/Q samples. 0 means DMRGO_RF_IQ_FORMAT_CS16. DMRGO_RF_IQ_FORMAT_CF32 values lie on the grid of DMRGO_RF_IQ_FORMAT_CS16. */
dmrgo_rf_iq_format_t format;
/* OffsetHz is the frequency of the carrier relative to the center of the I/Q, in Hz, under Rate/4 in size. DMRGO_RF_TIER0 rounds it to whole Hz. */
double offset_hz;
/* OnSamples, when not NULL, selects stream mode: Write and Flush hand the samples to it in chunks of at most MaxOutput(0) samples, in storage of the transmitter that is valid only during the call. When NULL, the transmitter is in append mode, for AppendSamples and AppendFlush. */
dmrgo_rf_tx_config_on_samples_fn_t on_samples;
/* Region is the regulatory region whose limits the signal keeps. */
dmrgo_rf_region_t region;
/* Service is the radio service of the station. DMRGO_RF_SERVICE_UNKNOWN keeps the limits of the land mobile and amateur services at once. The transmitter refuses DMRGO_RF_SERVICE_LICENSE_FREE. */
dmrgo_service_t service;
/* Power is the most power of the station, in dBm, from 1 to 63. 0 means the highest legal power of the Service in the Region. The limits are kept at the next of the breakpoints 27, 30, 40, 44, 47, 50, 54, 57, 60 and 62 dBm at or above it. */
int64_t power;
};
struct dmrgo_rf_region_error_t {
/* Type is the package, "rf", and Field the config field that the limits do not allow, such as "dmrgo_rf_tx_config_t.rate". */
char *type;
size_t type_len;
/* Type is the package, "rf", and Field the config field that the limits do not allow, such as "dmrgo_rf_tx_config_t.rate". */
char *field;
size_t field_len;
/* Reason gives the cause. */
char *reason;
size_t reason_len;
};
struct dmrgo_shortdata_hytera_text_t {
/* Field is a 16-bit value before the text whose meaning is not known: it was 00 00 in four captures and 45 00 in one. Decode keeps it as it is. */
uint16_t field;
/* Text is the text in UTF-16LE, with a NUL character after it and pad octets after that. */
uint8_t *text;
size_t text_len;
};
struct dmrgo_sms_anytone_text_t {
/* Prefix is the fixed prefix 0x000D000A. */
uint32_t prefix;
/* Text is the text in UTF-16LE, then a NUL character when the radio sends one. SetTextUTF8 adds the NUL. */
uint8_t *text;
size_t text_len;
};
struct dmrgo_sms_text_t {
/* Format is the format of the message. */
dmrgo_sms_format_t format;
/* Source and Destination are the radio IDs, or the talkgroup for a group message. */
uint32_t source;
/* Source and Destination are the radio IDs, or the talkgroup for a group message. */
uint32_t destination;
/* Group reports a message to a talkgroup. */
bool group;
/* Confirmed reports a message that requests a response from the data link layer: a C_HEAD packet for the formats on IP, and a DD_HEAD with the Response Requested flag (A) for DMRGO_SMS_FORMAT_DEFINED_DATA and DMRGO_SMS_FORMAT_HYTERA (ETSI TS 102 361-3 clause 6.4, Table 6.5), and the Response Requested flag (A) of the UDT_HEAD of DMRGO_SMS_FORMAT_UDT. Decode sets it from the header and AppendPacket builds that header. */
bool confirmed;
/* Network is the network ID of the IPv4 radio addresses of a DMRGO_SMS_FORMAT_TMS, DMRGO_SMS_FORMAT_IP or DMRGO_SMS_FORMAT_ANYTONE message, Network.x.y.z. The zero value means DMRGO_IP_DEFAULT_NETWORK. Decode sets it from the source address, and leaves it 0 for a compressed header. */
uint8_t network;
/* GroupPrefix is the first octet of the IPv4 multicast address of a group message in those formats. The zero value means 225. Decode sets it from the destination address of a group message. */
uint8_t group_prefix;
/* DD is the DD format of a DMRGO_SMS_FORMAT_DEFINED_DATA message. */
dmrgo_enums_dd_format_t dd;
/* Sequence is the sequence number of a DMRGO_SMS_FORMAT_TMS message. */
uint8_t sequence;
/* AckRequired reports that a DMRGO_SMS_FORMAT_TMS message requests an acknowledgement. */
bool ack_required;
/* Body is the text in UTF-8, without the CR LF that MOTOTRBO radios put before it. Decode drops a NUL after the text in every format. AppendPacket adds one only for DMRGO_SMS_FORMAT_ANYTONE and DMRGO_SMS_FORMAT_HYTERA, and sends a NUL that Body ends with. */
uint8_t *body;
size_t body_len;
/* UDT is the UDT_HEAD of a DMRGO_SMS_FORMAT_UDT message, which Decode sets from the packet. AppendPacket sends its UDT Format, SAP, Emergency and option flags, Supplementary Flag, Protect Flag and UDT Opcode as they are, so that a reply that copies the UDT of a received text has its format. It takes the addresses, Group and the Response Requested flag (A) from the other fields, and sets the UAB and the Pad Nibble from Body. (ETSI TS 102 361-1 clause 9.2.13, Table 9.17D) */
dmrgo_pdu_udt_header_t udt;
};
struct dmrgo_sms_header_t {
/* Data is the data header, for dmrgo_packet_new_packet or a data sender. */
dmrgo_pdu_data_header_t data;
};
struct dmrgo_sms_ip_text_t {
/* Text is the text in UTF-16BE. */
uint8_t *text;
size_t text_len;
};
struct dmrgo_dmrd_data_t {
/* Seq is the sequence number of the packet in its stream; it wraps after 255. */
uint8_t seq;
/* Source is the radio ID of the caller (24 bits). */
uint32_t source;
/* Destination is the talkgroup or radio ID that is called (24 bits). */
uint32_t destination;
/* Repeater is the repeater ID, or for OpenBridge the network ID. */
uint32_t repeater;
/* Slot is the TDMA channel, DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2. */
dmrgo_enums_slot_t slot;
/* Group reports a group call; false, as in the zero Data, is a unit to unit call. On the wire the bit is set for a unit to unit call. */
bool group;
/* Frame is the frame type. */
dmrgo_dmrd_frame_type_t frame;
/* Value is the data type of a DMRGO_DMRD_FRAME_DATA_SYNC packet, or the voice position N (0 to 5 for A to F) of a voice packet, as sent. */
uint8_t value;
/* Stream identifies the call. DMRGateway copies it in the byte order of its host, so treat it as opaque. */
uint32_t stream;
/* Burst is the 33-octet burst in transmit bit order. */
dmrgo_layer2_raw_burst_t burst;
/* BER is the bit error count that the repeater measured (55 and 71 octets). */
uint8_t ber;
/* RSSI is the received signal strength in dBm, as a positive number (55 and 71 octets). */
uint8_t rssi;
/* UUID is the trunking UUID of DMRGateway (71 octets). */
uint8_t uuid[16];
/* Size is the length of the packet: 53, 55 or 71, or 0 for 55, as MMDVMHost and DMRGateway send it. DMRGateway, HBlink4, DroidStar, xlxd and urfd drop a DMRD of 53 octets, and FreeDMR sends one on as a DMRE that its OpenBridge peers drop. */
uint8_t size;
};
struct dmrgo_dmrd_bridge_t {
/* Version is 1, 4 or 5: the 73, 85 or 89-octet form. */
uint8_t version;
/* Data is the DMRD packet. Its Size is 53 for version 1 and 55, with BER and RSSI, for versions 4 and 5. */
dmrgo_dmrd_data_t data;
/* Time is the send time in nanoseconds since 1970 (versions 4 and 5). */
uint64_t time;
/* SourceServer is the ID of the server that sent the call into OpenBridge (versions 4 and 5). */
uint32_t source_server;
/* SourceRepeater is the ID of the repeater that the call came from (version 5). */
uint32_t source_repeater;
/* Hops is the number of OpenBridge links the call has crossed (versions 4 and 5). */
uint8_t hops;
/* Signature is the HMAC-SHA1 signature of version 1, or in its first 16 octets the BLAKE2b hash of versions 4 and 5. */
uint8_t signature[20];
};
struct dmrgo_dmrd_bridge_control_t {
/* Command is DMRGO_DMRD_COMMAND_BCKA, DMRGO_DMRD_COMMAND_BCSQ, DMRGO_DMRD_COMMAND_BCST or DMRGO_DMRD_COMMAND_BCVE. */
dmrgo_dmrd_command_t command;
/* TalkGroup is the talkgroup of a BCSQ (24 bits). */
uint32_t talk_group;
/* Stream is the stream ID of a BCSQ. */
uint32_t stream;
/* Version is the version of a BCVE. */
uint8_t version;
/* Signature is the HMAC-SHA1 signature. */
uint8_t signature[20];
};
struct dmrgo_dmrd_control_t {
/* Command is the message. */
dmrgo_dmrd_command_t command;
/* ID is the repeater ID. In a DMRGO_DMRD_DIALECT_MMDVM RPTACK it is the 4 octets after the tag, which are the salt in the RPTACK that answers RPTL, as DMRGateway reads them; LoginSalt returns them. */
uint32_t id;
/* Salt is the salt of the acknowledgement that answers RPTL, with HasSalt: the DMRGO_DMRD_DIALECT_HBRP MSTACK in both directions, and the DMRGO_DMRD_DIALECT_MMDVM RPTACK for an encoder, which then writes Salt in place of ID. A decoder cannot separate that RPTACK from another one, so it leaves Salt zero there; use LoginSalt. */
uint32_t salt;
/* HasSalt reports whether Salt is set. */
bool has_salt;
/* Token is the login token of an RPTK (see package dmrdauth). */
uint8_t token[32];
/* Text is the rest of an RPTO (options), RPTG (home position), RPTRSSI or RPTINTR (slot and value) or DMRT (trunking command) message. A decode points it into the packet. */
uint8_t *text;
size_t text_len;
};
struct dmrgo_dmrd_option_value_t {
/* State is whether the option is in the text. */
dmrgo_dmrd_option_state_t state;
/* Value is the number of a DMRGO_DMRD_OPTION_SET option. */
uint32_t value;
};
struct dmrgo_dmrd_dmr_plus_options_t {
/* StartRef is the default reflector of slot 2. */
dmrgo_dmrd_option_value_t start_ref;
/* RelinkTime is the time in minutes after which the repeater falls back to StartRef when there is no local traffic. */
dmrgo_dmrd_option_value_t relink_time;
/* UserLink is 1 when users may link to other reflectors, 0 when not. */
dmrgo_dmrd_option_value_t user_link;
/* TS1 holds the up to 5 static talkgroups of slot 1, TS1_1 to TS1_5. */
dmrgo_dmrd_option_value_t ts1[5];
};
struct dmrgo_dmrd_local_position_t {
/* Source is the radio ID (24 bits). */
uint32_t source;
/* Data is the 7 octets of the GPS Info LC after its FLCO and FID octets. */
uint8_t data[7];
};
struct dmrgo_dmrd_local_talker_alias_t {
/* Source is the radio ID of the talker (24 bits). */
uint32_t source;
/* Type is the talker alias block: 0 for the header, 1 to 3 for the blocks. */
uint8_t type;
/* Data is the 7 octets of the block, after its FLCO and FID octets. */
uint8_t data[7];
};
struct dmrgo_dmrd_position_t {
/* Repeater is the repeater ID. */
uint32_t repeater;
/* Source is the radio ID (24 bits). */
uint32_t source;
/* Data is the 7 octets of the GPS Info LC after its FLCO and FID octets (ETSI TS 102 361-2 clause 7.1.1.3). A 14-octet packet holds the first 3, and the others are 0. */
uint8_t data[7];
/* Size is the length of the packet: 14 or 18, or 0 for 14. */
uint8_t size;
};
struct dmrgo_dmrd_talker_alias_t {
/* Repeater is the repeater ID. */
uint32_t repeater;
/* Source is the radio ID of the talker (24 bits). */
uint32_t source;
/* Type is the talker alias block: 0 for the header, 1 to 3 for the blocks. */
uint8_t type;
/* Data is the 7 octets of the block, after its FLCO and FID octets (ETSI TS 102 361-2 clauses 7.1.1.4 and 7.1.1.5). A 15-octet packet holds the first 3, and the others are 0. */
uint8_t data[7];
/* Size is the length of the packet: 15 or 19, or 0 for 15. */
uint8_t size;
};
struct dmrgo_dmrd_free_dmr_options_t {
/* DialTS1 is the reflector that slot 1 links to: default_dial_ts1, DIAL1 or DEFAULT_DIAL_TS1. */
dmrgo_dmrd_option_value_t dial_ts1;
/* DialTS2 is the reflector that slot 2 links to: default_dial_ts2, DIAL2, DEFAULT_DIAL_TS2, DIAL, DEFAULT_REFLECTOR or the DMR+ StartRef. */
dmrgo_dmrd_option_value_t dial_ts2;
/* Timer is the time in minutes after which a talkgroup or reflector that a user linked drops: the DMR+ RelinkTime, TIMER or DEFAULT_UA_TIMER. 0 means no limit, here and in the other timers. */
dmrgo_dmrd_option_value_t timer;
/* TS1Timer is the timer of slot 1: TS1Timer or TS1_TIMER. */
dmrgo_dmrd_option_value_t ts1_timer;
/* TS2Timer is the timer of slot 2: TS2Timer or TS2_TIMER. */
dmrgo_dmrd_option_value_t ts2_timer;
/* TGTimer is the timer of talkgroups: TGTimer or TG_TIMER. */
dmrgo_dmrd_option_value_t tg_timer;
/* DialTimer is the timer of reflectors: DialTimer or DIAL_TIMER. */
dmrgo_dmrd_option_value_t dial_timer;
/* TS1TGTimer is the timer of talkgroups on slot 1: TGTO1 or TS1_TG_TIMER. */
dmrgo_dmrd_option_value_t ts1tg_timer;
/* TS2TGTimer is the timer of talkgroups on slot 2: TGTO2 or TS2_TG_TIMER. */
dmrgo_dmrd_option_value_t ts2tg_timer;
/* TS1DialTimer is the timer of reflectors on slot 1: DIALTO1 or TS1_DIAL_TIMER. */
dmrgo_dmrd_option_value_t ts1_dial_timer;
/* TS2DialTimer is the timer of reflectors on slot 2: DIALTO2 or TS2_DIAL_TIMER. */
dmrgo_dmrd_option_value_t ts2_dial_timer;
/* Voice is 1 when the master sends voice announcements, 0 when not: IDENT or VOICE. */
dmrgo_dmrd_option_value_t voice;
/* IdentTG is the talkgroup of the voice ident: IDENTTG, VOICETG or OVERRIDE_IDENT_TG. */
dmrgo_dmrd_option_value_t ident_tg;
/* Single is 1 for single mode, in which a slot carries one talkgroup at a time, 0 when not: SINGLE. */
dmrgo_dmrd_option_value_t single;
/* DialATG is 1 when users may link reflectors (dial-a-TG), 0 when not: DIALTG or DIAL_A_TG. */
dmrgo_dmrd_option_value_t dial_atg;
/* Dynamic is 1 when users may link talkgroups by calling them, 0 when not: DYNAMIC or DYNAMIC_TG_ROUTING. */
dmrgo_dmrd_option_value_t dynamic;
/* DirectDialSlot is the slot of network direct dial, 0, 1 or 2: NDD_SLOT or NETWORK_DIRECT_DIAL_SLOT. */
dmrgo_dmrd_option_value_t direct_dial_slot;
/* Key is the value of KEY, which FreeDMR compares with the key of the first options it accepted. It is a view of the text; empty means no key. */
uint8_t *key;
size_t key_len;
/* Lang is the value of LANG, the language of the voice announcements, as a view of the text. */
uint8_t *lang;
size_t lang_len;
};
struct dmrgo_dmrd_hbrp_config_t {
uint8_t v[306];
};
struct dmrgo_dmrd_mmdvm_config_t {
uint8_t v[302];
};
struct dmrgo_dmrdsession_output_t {
/* Kind is the kind of the output. */
dmrgo_dmrdsession_output_kind_t kind;
/* Packet is the packet of DMRGO_DMRDSESSION_OUTPUT_SEND, DMRGO_DMRDSESSION_OUTPUT_CONFIG, DMRGO_DMRDSESSION_OUTPUT_DATA and DMRGO_DMRDSESSION_OUTPUT_MESSAGE, or the options text of DMRGO_DMRDSESSION_OUTPUT_OPTIONS. It holds at most DMRGO_DMRDSESSION_MAX_PACKET octets. */
uint8_t *packet;
size_t packet_len;
/* Command is the command of DMRGO_DMRDSESSION_OUTPUT_DATA and DMRGO_DMRDSESSION_OUTPUT_MESSAGE. */
dmrgo_dmrd_command_t command;
/* ID is the repeater ID of the session: a Master sets it in every output but DMRGO_DMRDSESSION_OUTPUT_SEND, a Peer only in DMRGO_DMRDSESSION_OUTPUT_UP, and a Bridge in none. */
uint32_t id;
/* Reason gives the cause for DMRGO_DMRDSESSION_OUTPUT_DOWN. */
dmrgo_dmrdsession_reason_t reason;
/* State is the state in which the session ended, for DMRGO_DMRDSESSION_OUTPUT_DOWN. */
dmrgo_dmrdsession_state_t state;
};
struct dmrgo_dmrdsession_bridge_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Key is the passphrase of the OpenBridge link (see dmrgo_dmrdauth_new_bridge_key). */
uint8_t *key;
size_t key_len;
/* Enhanced turns on FreeDMR's enhanced OpenBridge: the Bridge sends a BCKA every Keepalive. Without it OpenBridge has no keepalive, and the Bridge sends nothing of its own. */
bool enhanced;
/* Keepalive is the BCKA period. 0 means DMRGO_DMRDSESSION_KEEPALIVE_DEFAULT. */
dmrgo_duration_t keepalive;
/* Timeout is the time without a packet with a good signature after which the Bridge reports DMRGO_DMRDSESSION_OUTPUT_DOWN. 0 means DMRGO_DMRDSESSION_TIMEOUT_DEFAULT, the time after which FreeDMR stops sending to a peer. */
dmrgo_duration_t timeout;
};
struct dmrgo_dmrdsession_master_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Dialect is DMRGO_DMRD_DIALECT_MMDVM or DMRGO_DMRD_DIALECT_HBRP. */
dmrgo_dmrd_dialect_t dialect;
/* Timeout is the time without a packet from the repeater after which the Master ends the session. 0 means DMRGO_DMRDSESSION_TIMEOUT_DEFAULT. */
dmrgo_duration_t timeout;
/* LoginTimeout is the time after the first RPTL of a login in which the repeater must finish its login, or the Master ends the session. A repeated RPTL or RPTK does not restart it. 0 means DMRGO_DMRDSESSION_LOGIN_TIMEOUT_DEFAULT. */
dmrgo_duration_t login_timeout;
};
struct dmrgo_dmrdsession_peer_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Dialect is DMRGO_DMRD_DIALECT_MMDVM or DMRGO_DMRD_DIALECT_HBRP. */
dmrgo_dmrd_dialect_t dialect;
/* ID is the repeater ID. */
uint32_t id;
/* Password is the password of the master. The Peer copies it. */
uint8_t *password;
size_t password_len;
/* Config is the RPTC message: a dmrgo_dmrd_mmdvm_config_t (302 octets) for DMRGO_DMRD_DIALECT_MMDVM, a dmrgo_dmrd_hbrp_config_t (306 octets) for DMRGO_DMRD_DIALECT_HBRP. The Peer copies it. */
uint8_t *config;
size_t config_len;
/* Options is the RPTO options text, at most DMRGO_DMRDSESSION_MAX_OPTIONS octets, which the Peer sends after the RPTC is acknowledged. Empty sends no RPTO. DMRGO_DMRD_DIALECT_HBRP has no RPTO. */
uint8_t *options;
size_t options_len;
/* Retry is the time between two sends of a login step, between two pings, and before a new login after the session ended. 0 means DMRGO_DMRDSESSION_RETRY_DEFAULT. */
dmrgo_duration_t retry;
/* Timeout is the time without an acknowledgement or a pong after which the Peer ends the session and logs in again. 0 means DMRGO_DMRDSESSION_TIMEOUT_DEFAULT. */
dmrgo_duration_t timeout;
/* Backoff is the longest wait before a new login. Each session that ends before the login completes doubles the wait from Retry up to Backoff. 0, or a value up to Retry, waits Retry each time, as DMRGateway does. */
dmrgo_duration_t backoff;
};
struct dmrgo_hytera_frame_t {
/* Port is octets 0 and 1: 50002 (C3 52) on the bursts of the repeater in the DO1KBL capture, 0 on its sync packets, 5A 5A from others. */
uint16_t port;
/* Mark is octets 2 and 3: 00 50 or 00 00 in the DO1KBL capture, 5A 5A from others. */
uint16_t mark;
/* Seq is octet 4, one more for each packet; it wraps after 255. */
uint8_t seq;
/* PacketType is octet 8: 0x01 on bursts and 0x03 on terminators in the DO1KBL capture, 0x41 and 0x43 from others. */
uint8_t packet_type;
/* Slot is the TDMA channel, DMRGO_ENUMS_SLOT1 (1111) or DMRGO_ENUMS_SLOT2 (2222). */
dmrgo_enums_slot_t slot;
/* SlotType is what the burst is. */
dmrgo_hytera_slot_type_t slot_type;
/* ColorCode is octets 20 and 21, one nibble four times. */
dmrgo_enums_color_code_t color_code;
/* FrameType is octets 22 and 23: 0000 on bursts, 1111 or 6666 on sync packets. */
uint16_t frame_type;
/* Burst is the 33-octet burst in transmit bit order, with the octet pairs of the packet swapped back. A sync or wakeup packet carries no burst here. */
dmrgo_layer2_raw_burst_t burst;
/* Pad is octet 58, the octet after the burst in the payload. */
uint8_t pad;
/* CallType is octet 62: 0x01 for a group call and 0x00 for a private call from a Hytera repeater, 0x0A on wakeup packets. Some masters send 0x00 on group calls too. Call and SetCall read and write it. */
uint8_t call_type;
/* Destination is the talkgroup or radio ID that is called (octets 64 to 66, little-endian). */
uint32_t destination;
/* Source is the radio ID of the caller (octets 68 to 70, little-endian). */
uint32_t source;
/* Reserved is octets 5 to 7, 9 to 15, 24 and 25, 60 and 61, 63, 67 and 71, in that order. */
uint8_t reserved[17];
};
struct dmrgo_hytera_heartbeat_t {
/* Keepalive reports the 1-octet keepalive. Only Code is then used. */
bool keepalive;
/* Code is octet 4: 0x0A on a heartbeat (0x0C is an acknowledgement in Hytera_Homebrew_Bridge), or the octet of a keepalive: 0x00 from a repeater, 0x41 from Hytera_Homebrew_Bridge. */
uint8_t code;
/* Seq is octet 12: 0x5A from the repeater and 0x5B in the reply of the master in the DO1KBL capture; Hytera_Homebrew_Bridge replies 0xFF. */
uint8_t seq;
/* Status is octets 13 to 15: 5A 59 5A, or 5A 01 5A from Hytera_Homebrew_Bridge. */
uint8_t status[3];
/* Reserved is octets 5 to 11 and 16 to 19: 00 00 00 14 00 00 00 and 00 00 00 00 in every capture. */
uint8_t reserved[11];
};
struct dmrgo_hytera_p2p_t {
/* Op is octet 3: 0x38 from the repeater, 0x50 from the master. */
uint8_t op;
/* Code is octet 4: 0x01 on a request, one more on its accept, 0x0B on a redirect, 0x0C on an acknowledgement. */
uint8_t code;
/* Seq is octet 12, a number that the repeater counts up for each request; an acknowledgement has the Seq of the redirect. */
uint8_t seq;
/* Status is octets 13 to 15: FF 11 02 or 01 11 02 on a request, 01 01 5A on an accept, FF 01 00 on a redirect, 01 59 5A on an acknowledgement. */
uint8_t status[3];
/* Reserved is octets 5 to 11 and 16 to 19: 00 00 00 14 00 00 00 and 00 00 00 00 in every capture. */
uint8_t reserved[11];
/* Body is the octets after octet 19: the service, 00 00 00, and then 01 on an accept or FF 01 and the port on a redirect. An acknowledgement has none. A decode points it into the packet. */
uint8_t *body;
size_t body_len;
};
struct dmrgo_ipsc_peer_entry_t {
/* ID is the peer ID. */
uint32_t id;
/* IP is the IPv4 address of the peer. */
uint8_t ip[4];
/* Port is the UDP port of the peer. */
uint16_t port;
/* Mode is the mode of the peer. */
dmrgo_ipsc_mode_t mode;
};
struct dmrgo_ipsc_flags_t {
uint8_t v[4];
};
struct dmrgo_ipsc_control_t {
/* Opcode is the packet. */
dmrgo_ipsc_opcode_t opcode;
/* ID is the peer or master ID of the sender. */
uint32_t id;
/* Mode is the mode of the sender (0x90, 0x91, 0x96 to 0x99). */
dmrgo_ipsc_mode_t mode;
/* Flags is the flags of the sender (0x90, 0x91, 0x96 to 0x99). */
dmrgo_ipsc_flags_t flags;
/* Peers is the number of peers in a DMRGO_IPSC_OP_REGISTER_REPLY. */
uint16_t peers;
/* ListLen is the length in octets of the peer list of a DMRGO_IPSC_OP_PEER_LIST_REPLY, 11 for each peer. */
uint16_t list_len;
/* Version is the protocol version (0x90, 0x91, 0x94 to 0x97). An XPR 8400 sends its own version, 04 08 04 00, in a register request. In a keepalive request it echoes the version of the last reply of the master. */
uint8_t version[4];
};
struct dmrgo_ipsc_raw_t {
/* Opcode is the packet. */
dmrgo_ipsc_opcode_t opcode;
/* ID is octets 1 to 4, the sender ID. */
uint32_t id;
/* Body is the rest of the packet. A decode points it into the packet. */
uint8_t *body;
size_t body_len;
};
struct dmrgo_ipsc_rtp_t {
/* Flags is octet 18: version 2, no padding, extension or CSRC (0x80). */
uint8_t flags;
/* Marker is the marker bit, set on the first voice header. */
bool marker;
/* PayloadType is 0x5D, or 0x5E on the last packet of a call. */
uint8_t payload_type;
/* Seq is the RTP sequence number, one more for each burst, lost ones included. */
uint16_t seq;
/* Timestamp is the RTP timestamp, 480 more for each burst. */
uint32_t timestamp;
/* SSRC is 0 on MOTOTRBO. */
uint32_t ssrc;
};
struct dmrgo_ipsc_voice_t {
/* Layout is the form of the packet: A, BCDF or E. */
dmrgo_ipsc_voice_layout_t layout;
/* Length is octet 31, the number of octets after it. */
uint8_t length;
/* Control is octet 32: 0x40 on burst A, 0x10 on burst E, and 0x01 when AMBE frame 1 was bad on receive. */
uint8_t control;
/* AMBE holds the three AMBE+2 frames without FEC (see dmrgo_vocoder_unpack_ambe_voice_flags). */
uint8_t ambe[19];
/* Embedded is the 32-bit embedded signalling field of bursts B to F. */
uint8_t embedded[4];
/* LC is the full LC of the call that burst E carries. */
uint8_t lc[9];
/* EMB is the EMB of bursts B to F without its FEC, as the repeater sent it. */
dmrgo_pdu_emb_info_t emb;
};
struct dmrgo_ipsc_payload_t {
/* Status is octet 31: bit 7 is slot 2, the rest are status bits. */
uint8_t status;
/* Words is octets 32 and 33, the number of 16-bit words after them. An XPR 8400 sends some DMRGO_IPSC_BURST_RAW packets with a Words 1 more than the packet holds, so it is kept as sent. */
uint16_t words;
/* HasBody reports whether octets 34 onward are present; a DMRGO_IPSC_BURST_SYNC_LOST packet has none. */
bool has_body;
/* Flags is octets 34 and 35: 0x80 in octet 34 means an RSSI follows, 0x08 in octet 35 a slot type, and 0x40 in octet 35 six octets of unknown meaning. */
uint8_t flags[2];
/* Bits is the payload size in bits: 96 for a BPTC burst, 144 for rate 3/4, 196 for DMRGO_IPSC_BURST_RAW. */
uint16_t bits;
/* Octets holds the payload, padded with zeros to whole 16-bit words: 12 octets for 96 bits, 18 for 144 and 26 for 196. */
uint8_t octets[26];
/* Trailer holds the octets after the payload, TrailerLen of them: the slot type, the unknown octets and the RSSI. */
uint8_t trailer[16];
/* TrailerLen is the number of octets in Trailer. */
uint8_t trailer_len;
};
struct dmrgo_ipsc_user_t {
/* Opcode is the packet. */
dmrgo_ipsc_opcode_t opcode;
/* ID is the peer ID of the sender. */
uint32_t id;
/* CallSeq is octet 5, the same in every packet of a call and one more for each call on an XPR 8400. */
uint8_t call_seq;
/* Source is the radio ID of the caller (24 bits). */
uint32_t source;
/* Destination is the talkgroup or radio ID (24 bits). */
uint32_t destination;
/* Priority is octet 12: 0x02 on voice and 0x01 on data on MOTOTRBO. */
uint8_t priority;
/* CallControl identifies the call. */
uint32_t call_control;
/* Info is octet 17: privacy, end and slot. */
dmrgo_ipsc_call_info_t info;
/* RTP is the RTP header. */
dmrgo_ipsc_rtp_t rtp;
/* Burst is octet 30. Compare dmrgo_ipsc_burst_type_type on dmrgo_ipsc_user_t.burst, which drops the slot 2 bit. */
dmrgo_ipsc_burst_type_t burst;
/* Voice is the burst of a voice packet. */
dmrgo_ipsc_voice_t voice;
/* Data is the burst of a data packet. */
dmrgo_ipsc_payload_t data;
};
struct dmrgo_ipsc_stream_t {
/* CallSeq is octet 5 of every packet of the call. An XPR 8400 counts it up by one for each call. */
uint8_t call_seq;
/* CallControl identifies the call in every packet. */
uint32_t call_control;
/* Seq is the RTP sequence number of the next packet. */
uint16_t seq;
/* Timestamp is the RTP timestamp of the next packet. */
uint32_t timestamp;
/* Sent is the number of packets that Fill has filled. */
uint32_t sent;
};
struct dmrgo_ipscsession_addr_t {
/* IP is the IPv4 address. */
uint8_t ip[4];
/* Port is the UDP port. */
uint16_t port;
};
struct dmrgo_ipscsession_output_t {
/* Kind is the kind of the output. */
dmrgo_ipscsession_output_kind_t kind;
/* Packet is the packet of DMRGO_IPSCSESSION_OUTPUT_SEND and DMRGO_IPSCSESSION_OUTPUT_DATA. It holds at most DMRGO_IPSCSESSION_MAX_PACKET octets. */
uint8_t *packet;
size_t packet_len;
/* Addr is where to send DMRGO_IPSCSESSION_OUTPUT_SEND, and the address of the peer or master of every other output but DMRGO_IPSCSESSION_OUTPUT_PEERS. */
dmrgo_ipscsession_addr_t addr;
/* ID is the peer or master ID of DMRGO_IPSCSESSION_OUTPUT_UP, DMRGO_IPSCSESSION_OUTPUT_DOWN and DMRGO_IPSCSESSION_OUTPUT_DATA, and of DMRGO_IPSCSESSION_OUTPUT_DROPPED when the packet has one. */
uint32_t id;
/* Reason gives the cause for DMRGO_IPSCSESSION_OUTPUT_DOWN and DMRGO_IPSCSESSION_OUTPUT_DROPPED. */
dmrgo_ipscsession_reason_t reason;
};
struct dmrgo_ipscsession_peer_info_t {
/* ID is the peer ID. */
uint32_t id;
/* Addr is the address of the peer. */
dmrgo_ipscsession_addr_t addr;
/* Mode is the last mode of the peer. */
dmrgo_ipsc_mode_t mode;
/* Flags is the last flags of the peer, zero when not known. */
dmrgo_ipsc_flags_t flags;
/* Up reports whether the link with the peer is up. */
bool up;
};
struct dmrgo_ipscsession_master_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* ID is the peer ID of the master. */
uint32_t id;
/* Mode is the mode that the master sends. 0 means DMRGO_IPSCSESSION_MODE_DEFAULT. */
dmrgo_ipsc_mode_t mode;
/* Flags is the flags that the master sends. The zero Flags means voice and data calls. The Master sets DMRGO_IPSC_FLAG_MASTER_PEER, and DMRGO_IPSC_FLAG_AUTH with Auth. */
dmrgo_ipsc_flags_t flags;
/* Auth turns on the HMAC-SHA1 trailer with Key: the Master drops a packet without a good trailer and signs what it sends. */
bool auth;
/* Key is the authentication key (see dmrgo_ipscauth_parse_key). */
uint8_t key[20];
/* Timeout is the time without a packet from a peer after which the Master drops it. 0 means DMRGO_IPSCSESSION_TIMEOUT_DEFAULT. */
dmrgo_duration_t timeout;
/* MaxPeers is the most peers that the Master registers. 0 means DMRGO_IPSCSESSION_MAX_PEERS_DEFAULT. */
int64_t max_peers;
/* AdoptKnown makes Packet adopt a peer that is not registered, as Adopt does, when the trailer of its packet proves the key of the config or the key that the caller passed, so that a peer that registered with another Master needs no Adopt call. Without a key it does nothing. */
bool adopt_known;
/* RegisterVersion is the protocol version that the master sends in a register request or reply (0x90, 0x91, 0x94, 0x95). Zero means RegisterVersionDefault. */
uint8_t register_version[4];
/* AliveVersion is the protocol version that the master sends in a keepalive request or reply (0x96, 0x97). Zero means AliveVersionDefault. */
uint8_t alive_version[4];
};
struct dmrgo_ipscsession_peer_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* ID is the peer ID. */
uint32_t id;
/* Mode is the mode that the peer sends. 0 means DMRGO_IPSCSESSION_MODE_DEFAULT. */
dmrgo_ipsc_mode_t mode;
/* Flags is the flags that the peer sends. The zero Flags means voice and data calls. The Peer sets DMRGO_IPSC_FLAG_AUTH with Auth. */
dmrgo_ipsc_flags_t flags;
/* Master is the address of the master. */
dmrgo_ipscsession_addr_t master;
/* Auth turns on the HMAC-SHA1 trailer with Key: the Peer drops a packet without a good trailer and signs what it sends. */
bool auth;
/* Key is the authentication key (see dmrgo_ipscauth_parse_key). */
uint8_t key[20];
/* Alive is the keepalive period. 0 means DMRGO_IPSCSESSION_ALIVE_DEFAULT. */
dmrgo_duration_t alive;
/* MaxMissed is the number of keepalives without a reply after which the Peer takes a link as down. 0 means DMRGO_IPSCSESSION_MAX_MISSED_DEFAULT. */
int64_t max_missed;
/* MaxPeers is the most other peers that the Peer keeps from the peer list. 0 means DMRGO_IPSCSESSION_MAX_PEERS_DEFAULT. */
int64_t max_peers;
/* RegisterVersion is the protocol version that the peer sends in a register request or reply (0x90, 0x91, 0x94, 0x95). Zero means RegisterVersionDefault. */
uint8_t register_version[4];
/* AliveVersion is the protocol version that the peer sends in a keepalive request or reply (0x96, 0x97). Zero means AliveVersionDefault. */
uint8_t alive_version[4];
};
struct dmrgo_mmdvm_ack_t {
/* Command is the command that the modem accepted. */
dmrgo_mmdvm_command_t command;
};
struct dmrgo_mmdvm_config_v1_t {
/* Simplex selects simplex (DMO) operation instead of duplex. */
bool simplex;
/* UseCOSAsLockout uses the COS input as lockout. */
bool use_cos_as_lockout;
/* Debug makes the modem send debug frames. */
bool debug;
/* YSFLoDev selects the low YSF deviation. */
bool ysf_lo_dev;
/* PTTInvert inverts the PTT output. */
bool ptt_invert;
/* TXInvert inverts the TX audio. */
bool tx_invert;
/* RXInvert inverts the RX audio. */
bool rx_invert;
/* M17 enables M17 (MMDVM_HS). */
bool m17;
/* POCSAG enables POCSAG. */
bool pocsag;
/* NXDN enables NXDN. */
bool nxdn;
/* P25 enables P25. */
bool p25;
/* YSF enables YSF. */
bool ysf;
/* DMR enables DMR. */
bool dmr;
/* DStar enables D-Star. */
bool d_star;
/* TXDelay is the TX delay in units of 10 ms, at most 50. */
uint8_t tx_delay;
/* State is the state to start in, DMRGO_MMDVM_MODE_IDLE from MMDVMHost. */
dmrgo_mmdvm_mode_t state;
/* RXLevel is the RX level. */
uint8_t rx_level;
/* CWIDTXLevel is the CW ID TX level. */
uint8_t cwid_tx_level;
/* DMRColorCode is the DMR color code, 0 to 15. */
dmrgo_enums_color_code_t dmr_color_code;
/* DMRDelay is the DMR delay in symbols. */
uint8_t dmr_delay;
/* OscOffset is 128; the field was the oscillator offset. */
uint8_t osc_offset;
/* DStarTXLevel is the D-Star TX level. */
uint8_t d_star_tx_level;
/* DMRTXLevel is the DMR TX level. */
uint8_t dmr_tx_level;
/* YSFTXLevel is the YSF TX level. */
uint8_t ysf_tx_level;
/* P25TXLevel is the P25 TX level. */
uint8_t p25_tx_level;
/* TXDCOffset is the TX DC offset plus 128. */
uint8_t tx_dc_offset;
/* RXDCOffset is the RX DC offset plus 128. */
uint8_t rx_dc_offset;
/* NXDNTXLevel is the NXDN TX level. */
uint8_t nxdn_tx_level;
/* YSFTXHang is the YSF TX hang time in seconds. */
uint8_t ysf_tx_hang;
/* POCSAGTXLevel is the POCSAG TX level. */
uint8_t pocsag_tx_level;
/* FMTXLevel is the FM TX level; MMDVM_HS does not read it. */
uint8_t fm_tx_level;
/* P25TXHang is the P25 TX hang time in seconds. */
uint8_t p25_tx_hang;
/* NXDNTXHang is the NXDN TX hang time in seconds. */
uint8_t nxdn_tx_hang;
/* M17TXLevel is the M17 TX level (MMDVM_HS), 0 from MMDVMHost 9384d68. */
uint8_t m17_tx_level;
/* M17TXHang is the M17 TX hang time in seconds from the MMDVMHost of Pi-Star, 0 from MMDVMHost 9384d68; MMDVM_HS does not read it. */
uint8_t m17_tx_hang;
};
struct dmrgo_mmdvm_config_v2_t {
/* Simplex selects simplex (DMO) operation instead of duplex. */
bool simplex;
/* UseCOSAsLockout uses the COS input as lockout. */
bool use_cos_as_lockout;
/* Debug makes the modem send debug frames. */
bool debug;
/* YSFLoDev selects the low YSF deviation. */
bool ysf_lo_dev;
/* PTTInvert inverts the PTT output. */
bool ptt_invert;
/* TXInvert inverts the TX audio. */
bool tx_invert;
/* RXInvert inverts the RX audio. */
bool rx_invert;
/* FM enables FM. */
bool fm;
/* NXDN enables NXDN. */
bool nxdn;
/* P25 enables P25. */
bool p25;
/* YSF enables YSF. */
bool ysf;
/* DMR enables DMR. */
bool dmr;
/* DStar enables D-Star. */
bool d_star;
/* POCSAG enables POCSAG. */
bool pocsag;
/* TXDelay is the TX delay in units of 10 ms, at most 50. */
uint8_t tx_delay;
/* State is the state to start in, DMRGO_MMDVM_MODE_IDLE from MMDVMHost. */
dmrgo_mmdvm_mode_t state;
/* TXDCOffset is the TX DC offset plus 128. */
uint8_t tx_dc_offset;
/* RXDCOffset is the RX DC offset plus 128. */
uint8_t rx_dc_offset;
/* RXLevel is the RX level. */
uint8_t rx_level;
/* CWIDTXLevel is the CW ID TX level. */
uint8_t cwid_tx_level;
/* DStarTXLevel is the D-Star TX level. */
uint8_t d_star_tx_level;
/* DMRTXLevel is the DMR TX level. */
uint8_t dmr_tx_level;
/* YSFTXLevel is the YSF TX level. */
uint8_t ysf_tx_level;
/* P25TXLevel is the P25 TX level. */
uint8_t p25_tx_level;
/* NXDNTXLevel is the NXDN TX level. */
uint8_t nxdn_tx_level;
/* POCSAGTXLevel is the POCSAG TX level. */
uint8_t pocsag_tx_level;
/* FMTXLevel is the FM TX level. */
uint8_t fm_tx_level;
/* YSFTXHang is the YSF TX hang time in seconds. */
uint8_t ysf_tx_hang;
/* P25TXHang is the P25 TX hang time in seconds. */
uint8_t p25_tx_hang;
/* NXDNTXHang is the NXDN TX hang time in seconds. */
uint8_t nxdn_tx_hang;
/* DMRTrunking makes the modem a DMR Tier III control channel. */
bool dmr_trunking;
/* DMRColorCode is the DMR color code, 0 to 15. */
dmrgo_enums_color_code_t dmr_color_code;
/* DMRDelay is the DMR delay in symbols. */
uint8_t dmr_delay;
/* OscOffset is 128; the field was the oscillator offset. */
uint8_t osc_offset;
};
struct dmrgo_mmdvm_dmr_abort_t {
/* Slot is the slot, DMRGO_ENUMS_SLOT1 (1) or DMRGO_ENUMS_SLOT2 (2). */
dmrgo_enums_slot_t slot;
};
struct dmrgo_mmdvm_dmr_aloha_t {
/* Burst is the 33-octet burst in transmit bit order. */
dmrgo_layer2_raw_burst_t burst;
};
struct dmrgo_mmdvm_dmr_data_t {
/* Slot is DMRGO_ENUMS_SLOT1 for DMRGO_MMDVM_COMMAND_DMR_DATA1 and DMRGO_MMDVM_COMMAND_DMR_LOST1, DMRGO_ENUMS_SLOT2 for the others. */
dmrgo_enums_slot_t slot;
/* Lost reports a DMRGO_MMDVM_COMMAND_DMR_LOST1 or DMRGO_MMDVM_COMMAND_DMR_LOST2 frame, without a burst. */
bool lost;
/* Control is how the modem found the burst. */
dmrgo_mmdvm_control_t control;
/* Burst is the 33-octet burst in transmit bit order. */
dmrgo_layer2_raw_burst_t burst;
/* RSSI is the raw received signal strength, big-endian after the burst from a modem built with SEND_RSSI_DATA. HasRSSI reports it. */
uint16_t rssi;
/* HasRSSI reports whether RSSI is set. */
bool has_rssi;
};
struct dmrgo_mmdvm_dmr_short_lc_t {
/* LC is the 68 coded and interleaved bits of the Short LC, first bit first, then 4 unused bits. */
uint8_t lc[9];
};
struct dmrgo_mmdvm_dmr_start_t {
/* TX starts the transmitter; false stops it. */
bool tx;
};
struct dmrgo_mmdvm_debug_t {
/* Command is DMRGO_MMDVM_COMMAND_DEBUG1 to DMRGO_MMDVM_COMMAND_DEBUG5 or DMRGO_MMDVM_COMMAND_DEBUG_DUMP. */
dmrgo_mmdvm_command_t command;
/* Text is the text, or the octets of a dump. A decode points it into the payload. */
uint8_t *text;
size_t text_len;
/* N is the numbers; Count shows how many are used. */
int16_t n[4];
};
struct dmrgo_mmdvm_frame_t {
/* Command is what the frame carries. */
dmrgo_mmdvm_command_t command;
/* Payload is the octets after the command. */
uint8_t *payload;
size_t payload_len;
};
struct dmrgo_mmdvm_nak_t {
/* Command is the command that the modem refused. */
dmrgo_mmdvm_command_t command;
/* Reason is the error code of the firmware, for example 4 for a payload that it rejects. */
uint8_t reason;
};
struct dmrgo_mmdvm_set_freq_t {
/* Reserved is octet 0, 0x00 from MMDVMHost. */
uint8_t reserved;
/* RX is the receive frequency in Hz. */
uint32_t rx;
/* TX is the transmit frequency in Hz. */
uint32_t tx;
/* RFLevel is the RF power, 0 to 255 (10 and 14 octets). */
uint8_t rf_level;
/* POCSAG is the POCSAG TX frequency in Hz (14 octets). */
uint32_t pocsag;
/* Size is the length of the payload: 9, 10 or 14, or 0 for 14. */
uint8_t size;
};
struct dmrgo_mmdvm_set_mode_t {
/* Mode is the mode to change to. */
dmrgo_mmdvm_mode_t mode;
};
struct dmrgo_mmdvm_status_v1_t {
/* M17 reports that M17 is enabled. */
bool m17;
/* POCSAG reports that POCSAG is enabled. */
bool pocsag;
/* NXDN reports that NXDN is enabled. */
bool nxdn;
/* P25 reports that P25 is enabled. */
bool p25;
/* YSF reports that YSF is enabled. */
bool ysf;
/* DMR reports that DMR is enabled. */
bool dmr;
/* DStar reports that D-Star is enabled. */
bool d_star;
/* State is the mode or calibration state of the modem. */
dmrgo_mmdvm_mode_t state;
/* CD reports a carrier on the receiver; MMDVM_HS does not set it. */
bool cd;
/* DACOverflow reports that the DAC levels overflowed; MMDVM_HS does not set it. */
bool dac_overflow;
/* Lockout reports the lockout input; MMDVM_HS does not set it. */
bool lockout;
/* TXOverflow reports that the TX buffer overflowed. */
bool tx_overflow;
/* RXOverflow reports that the RX buffer overflowed. */
bool rx_overflow;
/* ADCOverflow reports that the ADC levels overflowed; MMDVM_HS does not set it. */
bool adc_overflow;
/* TX reports that the modem transmits. */
bool tx;
/* DStarSpace is the free space of the D-Star TX buffer. */
uint8_t d_star_space;
/* DMRSpace1 is the free space of the slot 1 TX buffer, or 10 in simplex. */
uint8_t dmr_space1;
/* DMRSpace2 is the free space of the slot 2 TX buffer, or of the DMO buffer in simplex. */
uint8_t dmr_space2;
/* YSFSpace is the free space of the YSF TX buffer. */
uint8_t ysf_space;
/* P25Space is the free space of the P25 TX buffer. */
uint8_t p25_space;
/* NXDNSpace is the free space of the NXDN TX buffer. */
uint8_t nxdn_space;
/* POCSAGSpace is the free space of the POCSAG TX buffer. */
uint8_t pocsag_space;
/* M17Space is the free space of the M17 TX buffer. MMDVM a816818 to a62fd81 (2020) sent the FM space here. */
uint8_t m17_space;
/* Size is the length of the payload: 7 to 11, or 0 for 11. */
uint8_t size;
};
struct dmrgo_mmdvm_status_v2_t {
/* State is the mode or calibration state of the modem. */
dmrgo_mmdvm_mode_t state;
/* CD reports a carrier on the receiver. */
bool cd;
/* DACOverflow reports that the DAC levels overflowed. */
bool dac_overflow;
/* Lockout reports the lockout input. */
bool lockout;
/* TXOverflow reports that the TX buffer overflowed. */
bool tx_overflow;
/* RXOverflow reports that the RX buffer overflowed. */
bool rx_overflow;
/* ADCOverflow reports that the ADC levels overflowed. */
bool adc_overflow;
/* TX reports that the modem transmits. */
bool tx;
/* DStarSpace is the free space of the D-Star TX buffer. */
uint8_t d_star_space;
/* DMRSpace1 is the free space of the slot 1 TX buffer, or 10 in simplex. */
uint8_t dmr_space1;
/* DMRSpace2 is the free space of the slot 2 TX buffer, or of the DMO buffer in simplex. */
uint8_t dmr_space2;
/* YSFSpace is the free space of the YSF TX buffer. */
uint8_t ysf_space;
/* P25Space is the free space of the P25 TX buffer. */
uint8_t p25_space;
/* NXDNSpace is the free space of the NXDN TX buffer. */
uint8_t nxdn_space;
/* FMSpace is the free space of the FM TX buffer. */
uint8_t fm_space;
/* POCSAGSpace is the free space of the POCSAG TX buffer. */
uint8_t pocsag_space;
};
struct dmrgo_mmdvm_version_t {
/* Protocol is the protocol version, 1 or 2. */
uint8_t protocol;
/* Capabilities is the set of modes; DMRGO_MMDVM_CAPABILITIES_V1 for protocol 1. */
dmrgo_mmdvm_capabilities_t capabilities;
/* CPU is the processor (protocol 2). */
dmrgo_mmdvm_cpu_t cpu;
/* UDID is the unique ID of the processor (protocol 2). An ST-Micro CPU fills only the first 12 octets. */
uint8_t udid[16];
/* Description is the firmware and hardware text, which MMDVM_HS may follow with a 0 octet and its unique ID as text. A decode points it into the payload. */
uint8_t *description;
size_t description_len;
};
struct dmrgo_trunk_access_t {
/* Mask is the number of least significant address bits that must match Address for an MS to make a random access, 0 to 24. */
uint8_t mask;
/* Address is the MS address of the C_ALOHA, for Mask. */
uint32_t address;
/* Function shows for which services random access is invited. */
dmrgo_enums_service_function_t function;
/* NRandWait is the code for the most TDMA frames that the TSCC may take to answer a random access. */
dmrgo_enums_n_rand_wait_t n_rand_wait;
/* Backoff is the code for the TDMA frames from which an MS picks the frame of its next random access. */
dmrgo_enums_backoff_t backoff;
};
struct dmrgo_trunk_address_list_t {
/* OneKey reports that Addresses[0] is the One-key_talkgroup of DGNA. */
bool one_key;
/* Addresses holds the first Len addresses. DMRGO_CONSTANTS_ADDRESS_NULL marks an unused entry. */
uint32_t addresses[15];
/* Len is the number of entries of Addresses in use: 3, 7, 11 or 15 for 1 to 4 blocks. */
int64_t len;
};
struct dmrgo_trunk_appended_t {
/* Format is the UDT Format of the data. */
dmrgo_enums_udt_format_t format;
/* PadNibble is the number of pad nibbles after the user data. */
uint8_t pad_nibble;
/* Blocks is the number of appended blocks, 1 to 4. */
int64_t blocks;
/* Data holds the 12*Blocks-2 octets of the blocks before the CRC of the last block. */
uint8_t data[46];
};
struct dmrgo_trunk_nmea_long_t {
/* C: the data is encrypted */
bool encrypted;
/* NS: north latitude, false for south */
bool north;
/* EW: east longitude, false for west */
bool east;
/* Q: the GPS fix is valid */
bool fix;
/* SPEED: knots, 0 to 126, 127 for more than 126 */
uint8_t speed;
/* NDEG: latitude degrees, 0 to 89 */
uint8_t lat_degrees;
/* NMINmm: latitude minutes, 0 to 59 */
uint8_t lat_minutes;
/* NMINF: latitude minutes in 1/10000, 0 to 9999 */
uint16_t lat_fraction;
/* EDEG: longitude degrees, 0 to 179 */
uint8_t lon_degrees;
/* EMINmm: longitude minutes, 0 to 59 */
uint8_t lon_minutes;
/* EMINF: longitude minutes in 1/10000, 0 to 9999 */
uint16_t lon_fraction;
/* UTChh: UTC hours, 0 to 23 */
uint8_t hours;
/* UTCmm: UTC minutes, 0 to 59 */
uint8_t minutes;
/* UTCss6: UTC seconds, 0 to 59 */
uint8_t seconds;
/* spare, free for manufacturers */
uint8_t spare1;
/* MFID: the feature set ID, 0 for SFID */
uint8_t mfid;
/* spare, free for manufacturers */
uint8_t spare2;
/* COG: course over ground in degrees, 0 to 359 */
uint16_t course;
/* spare, free for manufacturers */
uint64_t spare3;
};
struct dmrgo_trunk_nmea_short_t {
/* C: the data is encrypted */
bool encrypted;
/* NS: north latitude, false for south */
bool north;
/* EW: east longitude, false for west */
bool east;
/* Q: the GPS fix is valid */
bool fix;
/* SPEED: knots, 0 to 126, 127 for more than 126 */
uint8_t speed;
/* NDEG: latitude degrees, 0 to 89 */
uint8_t lat_degrees;
/* NMINmm: latitude minutes, 0 to 59 */
uint8_t lat_minutes;
/* NMINF: latitude minutes in 1/10000, 0 to 9999 */
uint16_t lat_fraction;
/* EDEG: longitude degrees, 0 to 179 */
uint8_t lon_degrees;
/* EMINmm: longitude minutes, 0 to 59 */
uint8_t lon_minutes;
/* EMINF: longitude minutes in 1/10000, 0 to 9999 */
uint16_t lon_fraction;
/* UTChh: UTC hours, 0 to 23 */
uint8_t hours;
/* UTCmm: UTC minutes, 0 to 59 */
uint8_t minutes;
/* UTCss3: UTC seconds in steps of 10, 0 to 5 */
uint8_t ten_seconds;
};
struct dmrgo_trunk_authenticator_vtable_t {
/* size is sizeof the struct, which the caller sets. A method that it does not cover, or whose function is NULL, fails with DMRGO_ERR_NO_METHOD, or gives zero results when it has no error. A function that returns an error gives zero results. */
size_t size;
DMRGO_USER_T user;
/* Response returns the response of the MS addr to challenge. */
int (*response)(DMRGO_USER_T user, uint32_t addr, uint32_t challenge, uint32_t *response, bool *ok);
};
struct dmrgo_trunkauth_keys_t {
/* Entries holds the key of each MS. The first entry for an address wins. */
dmrgo_trunkauth_entry_t *entries;
size_t entries_len;
};
struct dmrgo_trunk_capacity_plus_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Plan, when set, maps the repeaters of the site to frequencies: channel number n is repeater n, which carries LSN 2n-1 on timeslot 1 and LSN 2n on timeslot 2. The Follower copies it and hunts over the repeaters that it names, in number order. Without a plan the Follower hunts nothing, and the consumer keeps the receiver on one repeater. */
dmrgo_trunk_channel_plan_t *plan;
/* Talkgroups holds the first TalkgroupsLen talkgroups to follow. TalkgroupsLen 0 follows every talkgroup. */
uint32_t talkgroups[32];
/* TalkgroupsLen is the number of entries of Talkgroups in use. */
int64_t talkgroups_len;
/* Individual follows private calls too: private voice grants, and the radio entries of a site status, which can also be data. */
bool individual;
/* NoFollow reports calls with DMRGO_TRUNK_OUTPUT_GRANT but never leaves the rest channel, for a receiver that cannot tune. */
bool no_follow;
/* NoSignal is the time without a valid Capacity Plus PDU on the rest channel after which the Follower hunts again, and the time it stays on each repeater while it hunts. 0 means DMRGO_TRUNK_CAPACITY_PLUS_NO_SIGNAL_DEFAULT, and a negative value turns the timer off. */
dmrgo_duration_t no_signal;
/* Inactive is the time without a burst of the call after which the Follower returns to the rest channel. 0 means DMRGO_CONSTANTS_TV_INACTIVE_DEFAULT, and a negative value turns the timer off. */
dmrgo_duration_t inactive;
/* Hangtime is the time after a Terminator with LC in which the Follower waits for more voice. 0 means DMRGO_CONSTANTS_TV_HANGTIME_DEFAULT, and a negative value turns the timer off. */
dmrgo_duration_t hangtime;
/* Scratch, when set, is the Burst that the Follower decodes into. NULL means the Follower makes its own. */
dmrgo_layer2_burst_t *scratch;
};
struct dmrgo_trunk_tune_t {
/* Channel is the channel number, or CHNULL for the TSCC that the consumer tuned last without a hunt list. */
uint16_t channel;
/* Slot is the TDMA channel to follow on a payload channel, or DMRGO_ENUMS_SLOT_UNKNOWN on a TSCC. */
dmrgo_enums_slot_t slot;
/* RXHz is the receive frequency from the channel plan or a CG_AP block, or 0 when not known. */
uint64_t rx_hz;
/* TXHz is the transmit frequency, or 0 when not known. */
uint64_t tx_hz;
/* ColorCode is the color code of the channel, when HasColorCode is set. */
dmrgo_enums_color_code_t color_code;
/* HasColorCode reports whether ColorCode is known. */
bool has_color_code;
};
struct dmrgo_trunk_grant_t {
/* Opcode is the CSBK opcode of the grant. */
dmrgo_pdu_csbk_opcode_t opcode;
/* Service is the service that the grant is for. */
dmrgo_enums_service_kind_t service;
/* Group reports whether Target is a talkgroup. */
bool group;
/* Target is the 24-bit talkgroup or MS address. */
uint32_t target;
/* Source is the 24-bit address of the calling MS. */
uint32_t source;
/* Channel is the payload channel, from the grant or its CG_AP block. */
uint16_t channel;
/* Slot is the TDMA channel of the call on the payload channel. */
dmrgo_enums_slot_t slot;
/* RXHz and TXHz are the frequencies of Channel from the plan or the CG_AP block, 0 when not known. */
uint64_t rx_hz;
/* RXHz and TXHz are the frequencies of Channel from the plan or the CG_AP block, 0 when not known. */
uint64_t tx_hz;
/* ColorCode is the color code from a CG_AP block, when HasColorCode is set. */
dmrgo_enums_color_code_t color_code;
/* HasColorCode reports whether ColorCode is known. */
bool has_color_code;
/* Emergency reports an emergency call. */
bool emergency;
/* LateEntry reports a grant sent again after the call set-up. */
bool late_entry;
/* Offset reports offset timing on the payload channel. */
bool offset;
/* HiRate reports dual slot data. */
bool hi_rate;
};
struct dmrgo_trunk_output_t {
/* Kind is the kind of the output. */
dmrgo_trunk_output_kind_t kind;
/* Tune is the channel of DMRGO_TRUNK_OUTPUT_TUNE. */
dmrgo_trunk_tune_t tune;
/* Grant is the grant of DMRGO_TRUNK_OUTPUT_GRANT and DMRGO_TRUNK_OUTPUT_CALL_END, and the call of DMRGO_TRUNK_OUTPUT_AHOY. */
dmrgo_trunk_grant_t grant;
/* Reason gives the cause for DMRGO_TRUNK_OUTPUT_LOST, DMRGO_TRUNK_OUTPUT_CALL_END and DMRGO_TRUNK_OUTPUT_REFUSED. */
dmrgo_trunk_reason_t reason;
/* Ack is the reason code of the TSCC for DMRGO_TRUNK_OUTPUT_REFUSED with DMRGO_TRUNK_REASON_NACK and for DMRGO_TRUNK_OUTPUT_REGISTERED. */
dmrgo_enums_ack_reason_t ack;
/* Burst is the burst of DMRGO_TRUNK_OUTPUT_BURST. */
dmrgo_layer2_raw_burst_t burst;
/* Hint is what Burst is, for a transport: its Slot and DMRGO_LAYER2_KIND_DATA with the data type of the burst. */
dmrgo_layer2_hint_t hint;
/* Slot is the TDMA channel of DMRGO_TRUNK_OUTPUT_BURST. */
dmrgo_enums_slot_t slot;
/* Due is the start of the inbound slot of DMRGO_TRUNK_OUTPUT_BURST, the time at which to transmit it. */
dmrgo_duration_t due;
/* Protect is the kind of DMRGO_TRUNK_OUTPUT_PROTECT. */
dmrgo_enums_protect_kind_t protect;
/* Challenge is the 24-bit challenge of DMRGO_TRUNK_OUTPUT_AUTH_CHALLENGE. */
uint32_t challenge;
/* Status is the status of DMRGO_TRUNK_OUTPUT_STATUS. */
dmrgo_trunk_status_t status;
/* Stun is the action of DMRGO_TRUNK_OUTPUT_STUN. */
dmrgo_trunk_stun_action_t stun;
/* RC is the command of DMRGO_TRUNK_OUTPUT_REVERSE_CHANNEL. */
dmrgo_enums_rc_command_t rc;
};
struct dmrgo_trunk_channel_t {
/* Number is the 12-bit channel number, 1 to 4094. */
uint16_t number;
/* RXHz is the frequency that the MS receives, the outbound channel of the BS. */
uint64_t rx_hz;
/* TXHz is the frequency that the MS transmits, the inbound channel of the BS. It is 0 for a receive-only plan. */
uint64_t tx_hz;
};
struct dmrgo_trunk_channel_rule_t {
/* First is the first channel number of the rule. */
uint16_t first;
/* Last is the last channel number of the rule, at least First. */
uint16_t last;
/* RXHz is the receive frequency of channel First. */
uint64_t rx_hz;
/* StepHz is the frequency step from one channel number to the next. */
uint64_t step_hz;
/* TXOffsetHz is the transmit frequency minus the receive frequency. */
int64_t tx_offset_hz;
};
struct dmrgo_trunk_lip_short_report_t {
/* PDU type, 0 for a short location report */
uint8_t pdu_type;
/* time since the position was found: 0 under 5 s, 1 under 5 min, 2 under 30 min, 3 unknown */
uint8_t time_elapsed;
/* degrees, -180 to 180 */
double longitude;
/* degrees, -90 to 90 */
double latitude;
/* position error */
dmrgo_layer3_position_accuracy_t position_error;
/* horizontal velocity code, 127 for unknown */
uint8_t velocity;
/* direction of travel in steps of 22.5 degrees, 0 is north */
uint8_t direction;
/* AdditionalData is user defined, false for the reason for sending */
bool additional_type;
/* reason for sending or user defined data */
uint8_t additional_data;
};
struct dmrgo_trunk_usbd_lip_response_t {
/* time since the position was found, as in LIPShortReport */
uint8_t time_elapsed;
/* degrees, -180 to 180 */
double longitude;
/* degrees, -90 to 90 */
double latitude;
/* position error */
dmrgo_layer3_position_accuracy_t position_error;
/* horizontal velocity code, 127 for unknown */
uint8_t velocity;
/* direction of travel in steps of 22.5 degrees */
uint8_t direction;
/* reason for sending, 0 for a response to an immediate request */
uint8_t reason;
/* 8-bit hash of the source address, as dmrgo_pdu_address_hash */
uint8_t hashed_source;
};
struct dmrgo_trunk_usbd_poll_request_t {
/* RD: the poll response is due 1 to 4 TDMA frames later */
uint8_t response_delay;
/* PC: Parameters holds data */
bool payload_contents;
/* reserved, false */
bool reserved;
/* 48 bits that depend on the Service Type */
uint64_t parameters;
/* MS target address */
uint32_t target;
};
struct dmrgo_trunk_dynamic_groups_t {
/* Groups holds ADDRESS1 to ADDRESS15 of the DGNA_Address mode in its first 15 entries and the talkgroup of the DGNA_Alias mode in the last. DMRGO_CONSTANTS_ADDRESS_NULL marks an unused entry. */
uint32_t groups[16];
/* OneKey is the One-key_talkgroup, when HasOneKey is set. */
uint32_t one_key;
/* HasOneKey reports whether the MS holds a One-key_talkgroup. */
bool has_one_key;
};
struct dmrgo_trunk_neighbor_t {
/* SysCode14 is the 14 most significant bits of the C_SYScode of the adjacent TSCC, as dmrgo_pdu_sys_code_unpack14 takes them. */
uint16_t sys_code14;
/* Channel is the channel number of the adjacent TSCC. */
uint16_t channel;
/* HasActiveConn reports whether ActiveConn is known. */
bool has_active_conn;
/* ActiveConn reports whether the adjacent site has a network connection. */
bool active_conn;
/* ConfirmedPriority is the priority of the confirmed channel. */
uint8_t confirmed_priority;
/* AdjacentPriority is the priority of the adjacent channel. */
uint8_t adjacent_priority;
};
struct dmrgo_trunk_site_t {
/* SysCode is the C_SYScode of the TSCC. Par is set only when a C_ALOHA or C_BCAST gave the whole 16 bits. */
dmrgo_pdu_sys_code_t sys_code;
/* HasSysCode reports whether SysCode is known. */
bool has_sys_code;
/* ColorCode is the color code of the TSCC. */
dmrgo_enums_color_code_t color_code;
/* Channel is the channel number of the TSCC, or CHNULL when the consumer tuned to it without a hunt list. */
uint16_t channel;
/* Reg reports whether the TSCC requires MSs to register. */
bool reg;
/* Version is the version of ETSI TS 102 361-4 that the system follows, from C_ALOHA. */
uint8_t version;
/* Offset reports whether the TSCC uses offset timing. */
bool offset;
/* ActiveConn reports whether the site has a network connection. */
bool active_conn;
/* SiteTSSync reports whether all channels of the site are timeslot synchronized. */
bool site_ts_sync;
/* Access is the random access control of the last C_ALOHA. HasAccess reports whether one arrived. */
dmrgo_trunk_access_t access;
/* HasAccess reports whether Access holds a C_ALOHA. */
bool has_access;
/* SlotCounter is the Common_Slot_Counter of the last C_SYS_Parms, which counts 120 ms steps modulo 512 (ETSI TS 102 361-4 clause 5.1.3). */
uint16_t slot_counter;
/* Neighbors holds the first NeighborsLen adjacent sites announced. */
dmrgo_trunk_neighbor_t neighbors[8];
/* NeighborsLen is the number of entries of Neighbors in use. */
int64_t neighbors_len;
};
struct dmrgo_trunk_udt_t {
/* Header is the C_UDTHD header. Its UAB plus one is the number of appended blocks. */
dmrgo_pdu_udt_header_t header;
/* Data holds the 12*(dmrgo_trunk_udt_t.header.uab+1)-2 octets of the appended blocks before the CRC of the last block. */
uint8_t data[46];
/* CRCOK reports whether the CRC of the last block checks. */
bool crc_ok;
};
struct dmrgo_trunk_follower_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* SysCode, when set, is the system to follow: a TSCC with another MODEL, NET or SITE is skipped. has_sys_code false follows the first TSCC found. */
bool has_sys_code;
dmrgo_pdu_sys_code_t sys_code;
/* Hunt, when set, is the hunt list. The Follower copies it, requests each channel in turn with DMRGO_TRUNK_OUTPUT_TUNE until it finds a TSCC, and adds and withdraws channels on an Ann_WD_TSCC broadcast. With a NULL or empty Hunt the consumer keeps the receiver on one TSCC, which is then channel CHNULL. */
dmrgo_trunk_hunt_list_t *hunt;
/* Plan, when set, is the channel plan to start from. The Follower copies it and adds the channels that CG_AP and Chan_Freq announce. */
dmrgo_trunk_channel_plan_t *plan;
/* Talkgroups holds the first TalkgroupsLen 24-bit talkgroups to follow. TalkgroupsLen 0 follows every talkgroup. */
uint32_t talkgroups[32];
/* TalkgroupsLen is the number of entries of Talkgroups in use. */
int64_t talkgroups_len;
/* Individual follows individual voice calls too. */
bool individual;
/* Data follows packet data grants too. */
bool data;
/* NoFollow reports grants with DMRGO_TRUNK_OUTPUT_GRANT but never leaves the TSCC, for a receiver that cannot tune, such as the replay of a recording. */
bool no_follow;
/* NoSignal is T_Nosig, the time without a TSCC burst after which the Follower hunts again, and the time it stays on each hunt list channel. 0 means DMRGO_CONSTANTS_T_NO_SIGNAL_DEFAULT, and a negative value turns the timer off (ETSI TS 102 361-4 Table A.1). */
dmrgo_duration_t no_signal;
/* Inactive is TV_Inactive, the time without a burst on the payload channel after which the Follower returns to the TSCC. 0 means DMRGO_CONSTANTS_TV_INACTIVE_DEFAULT, and a negative value turns the timer off. */
dmrgo_duration_t inactive;
/* Hangtime is the time after a Terminator with LC in which the Follower waits on the payload channel for more voice. 0 means DMRGO_CONSTANTS_TV_HANGTIME_DEFAULT, and a negative value turns the timer off. */
dmrgo_duration_t hangtime;
/* SysErrors is NSYSerr, the number of C_SYScodes from another system after which the Follower leaves the TSCC. 0 means DMRGO_CONSTANTS_N_SYS_ERR_DEFAULT; a negative value is an error. */
int64_t sys_errors;
/* AcceptRAS takes a CSBK whose CRC fails as valid when its BPTC needed no correction and its BPTC reserved bit R(2) flags RAS. The CRC of a Motorola Capacity Max system with RAS is a MAC with the key of the system, which the Follower cannot check. */
bool accept_ras;
/* Scratch, when set, is the Burst that the Follower decodes into, as for dmrgo_voice_receiver_config_t.scratch. NULL means the Follower makes its own. */
dmrgo_layer2_burst_t *scratch;
};
struct dmrgo_trunk_hunt_entry_t {
/* Channel is the channel number. */
uint16_t channel;
/* ColorCode is the color code of the TSCC on the channel, when HasColorCode is set. */
dmrgo_enums_color_code_t color_code;
/* HasColorCode reports whether ColorCode is known. */
bool has_color_code;
};
struct dmrgo_trunk_ms_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Address is the 24-bit individual address of the MS, 1 to 0xFFFCDF. */
uint32_t address;
/* Talkgroups holds the first TalkgroupsLen 24-bit talkgroups whose calls the MS follows and whose radio checks it answers. Its own calls and the individual calls to it are always followed. */
uint32_t talkgroups[32];
/* TalkgroupsLen is the number of entries of Talkgroups in use. */
int64_t talkgroups_len;
/* SysCode, when set, is the system to use, as in FollowerConfig. */
bool has_sys_code;
dmrgo_pdu_sys_code_t sys_code;
/* Hunt, when set, is the hunt list, as in FollowerConfig. */
dmrgo_trunk_hunt_list_t *hunt;
/* Plan, when set, is the channel plan to start from. */
dmrgo_trunk_channel_plan_t *plan;
/* Slot is the TDMA channel of the TSCC on which the MS makes random access. DMRGO_ENUMS_SLOT_UNKNOWN means DMRGO_ENUMS_SLOT1. */
dmrgo_enums_slot_t slot;
/* Seed seeds the random choice of the backoff frames. Two MSs with the same seed make the same choices; 0 is a valid seed. */
uint64_t seed;
/* NoRegistration keeps the MS from registering when the TSCC requests it with Reg. */
bool no_registration;
/* RandomTimeout is TRand_TC, the longest time of a random access. 0 means DMRGO_CONSTANTS_T_RAND_TC_DEFAULT, and a negative value turns the timer off. (ETSI TS 102 361-4 clause 6.2.1.1.7) */
dmrgo_duration_t random_timeout;
/* CallTimeout is TP_Timer, the longest wait for the grant of a service that needs a payload channel. 0 means DMRGO_CONSTANTS_TP_TIMER_DEFAULT, and a negative value turns the timer off. */
dmrgo_duration_t call_timeout;
/* RegTimeout is TNP_Timer, the longest wait for the answer to a registration after an intermediate acknowledgement. 0 means DMRGO_CONSTANTS_TNP_TIMER_DEFAULT, and a negative value turns the timer off. */
dmrgo_duration_t reg_timeout;
/* Pending is T_Pending, the time a called MS waits for the grant after it accepted a C_AHOY. 0 means DMRGO_CONSTANTS_T_PENDING_DEFAULT. */
dmrgo_duration_t pending;
/* Dereg is T_Dereg, the longest wait for the answer to a de-registration. 0 means DMRGO_CONSTANTS_T_DEREG_DEFAULT. */
dmrgo_duration_t dereg;
/* DeniedLife is T_DENREG, how long a Reg_Denied keeps the MS off a SYS_AREA. 0 means DMRGO_CONSTANTS_T_DEN_REG_DEFAULT, and a negative value keeps the entry until Reset. */
dmrgo_duration_t denied_life;
/* DMRLA is the number of most significant SITE bits in the SYS_AREA of the registration and denied records. 0 means DMRGO_CONSTANTS_DMRLA_DEFAULT. */
int64_t dmrla;
/* MinLevelHunt, when set, is the signal level below which the MS does not confirm a TSCC, as L_Lower_SHort, in the unit of the levels that the consumer passes to Quality. */
bool has_min_level_hunt;
int64_t min_level_hunt;
/* MinLevelIdle, when set, is the signal level below which the MS leaves a confirmed TSCC, in the unit of MinLevelHunt. */
bool has_min_level_idle;
int64_t min_level_idle;
/* MaxBERPermille is the bit error rate of the TSCC above which the MS leaves it. 0 means DMRGO_TRUNK_DEFAULT_MAX_BER_PERMILLE, and a negative value turns the check off. */
int64_t max_ber_permille;
/* AcceptRAS is as in FollowerConfig. */
bool accept_ras;
/* NoSignal is T_Nosig, as in FollowerConfig. */
dmrgo_duration_t no_signal;
/* Inactive is TV_Inactive, as in FollowerConfig. */
dmrgo_duration_t inactive;
/* Hangtime is the payload hang time, as in FollowerConfig. */
dmrgo_duration_t hangtime;
/* Scratch is the decode Burst, as in FollowerConfig. */
dmrgo_layer2_burst_t *scratch;
/* NoDuplex refuses full-duplex calls to the MS with MS_Duplex_Not_Supported. */
bool no_duplex;
/* Ambient accepts Ambient Listening Service calls to the MS. Without it the MS refuses them with MSNot_Supported. */
bool ambient;
/* Auth, when set, makes the MS authenticate the TSCC before a stun or revive, and lets it accept a kill, which is always authenticated. Without it the MS refuses a kill as not supported. The MS keeps Auth and does not copy what it points to, such as a *dmrgo_trunkauth_key_t or a *dmrgo_trunkauth_keys_t and its Entries. Do not change it while the MS uses it. (ETSI TS 102 361-4 clauses 6.4.9.2 and 6.4.10) */
dmrgo_trunk_authenticator_t *auth;
/* NoStun makes the MS refuse a stun or revive as not supported. */
bool no_stun;
/* NoKill makes the MS refuse a kill as not supported. */
bool no_kill;
/* Stunned starts the MS stunned, for an MS that a TSCC stunned before. */
bool stunned;
/* Killed starts the MS killed, for an MS that a TSCC killed before. */
bool killed;
/* PowerSave is the PowerSave_RQ of the registrations of the MS, 0 to 7: the MS requests to be awake for one power save frame in 2^PowerSave. 0 requests no power save. (ETSI TS 102 361-4 clause 6.4.7) */
uint8_t power_save;
/* Awake is T_Awake, the time the MS stays awake after a PDU for it in power save. 0 means DMRGO_CONSTANTS_T_AWAKE_DEFAULT. */
dmrgo_duration_t awake;
};
struct dmrgo_trunk_tscc_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* SysCode is the C_SYScode of the site. */
dmrgo_pdu_sys_code_t sys_code;
/* ColorCode is the color code of the TSCC and its payload channels. */
dmrgo_enums_color_code_t color_code;
/* Channel is the channel number of the TSCC, for the outputs of its carrier: 1 to 0xFFE. */
uint16_t channel;
/* Payload holds the first PayloadLen channel numbers of the payload channels, each 1 to 0xFFE, different from each other and from Channel. Each has two slots for calls. */
uint16_t payload[16];
/* PayloadLen is the number of entries of Payload in use, 1 or more. */
int64_t payload_len;
/* Reg requests MSs to register, and refuses the services of an MS that is not registered. */
bool reg;
/* MaxRegistrations is the size of the registration table, at most 65536. 0 means 64. */
int64_t max_registrations;
/* NRandWait is the NRand_Wait of C_ALOHA. 0 means the code of DMRGO_CONSTANTS_N_DEFAULT_NW. */
dmrgo_enums_n_rand_wait_t n_rand_wait;
/* Backoff is the backoff number of C_ALOHA. 0 means 3. */
dmrgo_enums_backoff_t backoff;
/* GrantRepeats is the number of times the TSCC sends a grant. 0 means 2; a negative value is an error. */
int64_t grant_repeats;
/* ClearRepeats is the number of times the TSCC sends P_CLEAR. 0 means 3; a negative value is an error. */
int64_t clear_repeats;
/* LateEntry is the time between the late entry grants of a call. 0 means 1 s, and a negative value sends none. */
dmrgo_duration_t late_entry;
/* Hangtime is TV_Hangtime, the time after the end of a transmission in which the call keeps its payload slot. 0 or a negative value means DMRGO_CONSTANTS_TV_HANGTIME_DEFAULT. */
dmrgo_duration_t hangtime;
/* Inactive is TV_Inactive: the TSCC clears a call that has no inbound burst for this long outside the hang time. 0 or a negative value means DMRGO_CONSTANTS_TV_INACTIVE_DEFAULT. */
dmrgo_duration_t inactive;
/* AnswerTimeout is how long the TSCC waits for the answer of a called MS to its C_AHOY, and for the answer to an authentication challenge. 0 or a negative value means DMRGO_CONSTANTS_TP_TIMER_DEFAULT. */
dmrgo_duration_t answer_timeout;
/* Authenticate challenges each MS that registers with a C_AHOY, and registers it only when its answer matches the response that the consumer passes to ExpectAuth after DMRGO_TRUNK_TSCC_AUTH_CHALLENGE. A wrong answer gets C_NACKD Reg_Denied, and no answer within AnswerTimeout gets C_NACKD Reg_Refused. */
bool authenticate;
/* Seed seeds the random choice of the authentication challenges. */
uint64_t seed;
/* Auth, when set, answers the authentication challenge of an MS before a stun, revive or kill. The TSCC keeps Auth and does not copy what it points to, such as a *dmrgo_trunkauth_keys_t and its Entries. Do not change it while the TSCC uses it. (ETSI TS 102 361-4 clauses 6.4.9.2 and 6.4.10) */
dmrgo_trunk_authenticator_t *auth;
/* TransmitInterrupt accepts the transmit interrupt requests of MSs, status calls with DMRGO_TRUNK_STATUS_INTERRUPT and DMRGO_TRUNK_STATUS_TERMINATE. (ETSI TS 102 361-4 clause 6.4.14.3) */
bool transmit_interrupt;
/* MaxCall is the longest time of a call. At its end the TSCC stops the transmission with the reverse channel and clears the call. 0 or a negative value means no limit. (ETSI TS 102 361-4 clause 6.4.14.3.2) */
dmrgo_duration_t max_call;
/* PowerSave gives the MSs that request it a power save frame, and holds the C_AHOY to an MS that sleeps until its frame. (ETSI TS 102 361-4 clause 6.4.7) */
bool power_save;
/* Awake is T_Awake, as in MSConfig. 0 or a negative value means DMRGO_CONSTANTS_T_AWAKE_DEFAULT. */
dmrgo_duration_t awake;
/* IP offers the IP bearer service: the TSCC takes the IP connection advice of MSs. Without it the TSCC refuses the advice with IP_Connection_failed. (ETSI TS 102 361-4 clause 6.4.11) */
bool ip;
/* Supplementary takes the supplementary_user data of call requests and passes it to the called party before the call. Without it the TSCC sets up the call without the data. (ETSI TS 102 361-4 clause 6.4.13) */
bool supplementary;
/* Lead makes Tick emit the bursts of a slot this long before its Due time, so that an RF FIFO can be filled ahead. 0 means at Due; it must be at least 0 and less than DMRGO_TRUNK_MAX_LEAD. The timers of the TSCC keep to the Due times. */
dmrgo_duration_t lead;
};
struct dmrgo_trunk_tscc_output_t {
/* Kind is the kind of the output. */
dmrgo_trunk_tscc_output_kind_t kind;
/* Channel is the channel number of the carrier of DMRGO_TRUNK_TSCC_BURST. */
uint16_t channel;
/* Slot is the TDMA channel of DMRGO_TRUNK_TSCC_BURST. */
dmrgo_enums_slot_t slot;
/* CACH is the CACH before the burst of DMRGO_TRUNK_TSCC_BURST, in transmit order. */
uint8_t cach[3];
/* Burst is the burst of DMRGO_TRUNK_TSCC_BURST. */
dmrgo_layer2_raw_burst_t burst;
/* Due is the start of the 30 ms slot of DMRGO_TRUNK_TSCC_BURST, the time at which it goes on air. */
dmrgo_duration_t due;
/* Hint is what Burst is, for a transport: Slot, and DMRGO_LAYER2_KIND_DATA with the data type, or for a relayed burst what the TSCC decoded of it: the kind, the data type, and voice burst A from its SYNC. */
dmrgo_layer2_hint_t hint;
/* Address is the MS of DMRGO_TRUNK_TSCC_REGISTERED, DMRGO_TRUNK_TSCC_DEREGISTERED, DMRGO_TRUNK_TSCC_REFUSED, DMRGO_TRUNK_TSCC_DELIVERED, DMRGO_TRUNK_TSCC_UDT, DMRGO_TRUNK_TSCC_DIVERSION, DMRGO_TRUNK_TSCC_STUN, DMRGO_TRUNK_TSCC_INTERRUPT and DMRGO_TRUNK_TSCC_IP_ADVICE. */
uint32_t address;
/* Ack is the reason of DMRGO_TRUNK_TSCC_REFUSED and DMRGO_TRUNK_TSCC_DELIVERED, and the answer of the MS for DMRGO_TRUNK_TSCC_STATUS and DMRGO_TRUNK_TSCC_STUN. */
dmrgo_enums_ack_reason_t ack;
/* Grant is the call of DMRGO_TRUNK_TSCC_CALL_START, DMRGO_TRUNK_TSCC_CALL_END and DMRGO_TRUNK_TSCC_INTERRUPT, and the parties of DMRGO_TRUNK_TSCC_STATUS. */
dmrgo_trunk_grant_t grant;
/* Reason gives the cause for DMRGO_TRUNK_TSCC_CALL_END, DMRGO_TRUNK_TSCC_STATUS, DMRGO_TRUNK_TSCC_STUN and DMRGO_TRUNK_TSCC_INTERRUPT. */
dmrgo_trunk_reason_t reason;
/* Challenge is the 24-bit challenge of DMRGO_TRUNK_TSCC_AUTH_CHALLENGE. */
uint32_t challenge;
/* Status is the status of DMRGO_TRUNK_TSCC_STATUS. */
dmrgo_trunk_status_t status;
/* Stun is the action of DMRGO_TRUNK_TSCC_STUN. */
dmrgo_trunk_stun_action_t stun;
/* IP holds the IPv4 address of DMRGO_TRUNK_TSCC_IP_ADVICE in its first 4 octets, or the IPv6 address when IPv6 is set. */
uint8_t ip[16];
/* IPv6 reports an IPv6 address in IP. */
bool ipv6;
/* Remove reports that the MS removes the address, rather than adds it. */
bool remove;
};
struct dmrgo_trunkauth_key_t {
/* K is the authentication key of the MS. */
uint8_t k[16];
/* PSN is the PSN of the MS, or 0 for an MS that uses no PSN. */
uint32_t psn;
};
struct dmrgo_trunkauth_entry_t {
/* Addr is the individual address of the MS. */
uint32_t addr;
/* Key is the key of the MS. */
dmrgo_trunkauth_key_t key;
};
struct dmrgo_vocoder_frame_report_t {
/* Frame is what the codec found in the slot. */
dmrgo_vocoder_frame_status_t frame;
/* Output is what the codec put in the samples. */
dmrgo_vocoder_frame_output_t output;
/* CorrectedA is the number of bits, 0 to 4, that the Golay (24,12) code of section A corrected. */
uint8_t corrected_a;
/* CorrectedB is the number of bits, 0 to 3, that the Golay (23,12) code of section B corrected after the descrambling. */
uint8_t corrected_b;
/* HighErrorRate reports that the bit error rate that the codec estimates from the recent frames is so high that it mutes or replaces frames. It is false when the codec makes no such estimate. */
bool high_error_rate;
/* CountsKnown reports that the codec measured CorrectedA and CorrectedB. When it is false both are 0 and unknown, not a count of 0 bits. */
bool counts_known;
};
struct dmrgo_vocoder_codec_vtable_t {
/* size is sizeof the struct, which the caller sets. A method that it does not cover, or whose function is NULL, fails with DMRGO_ERR_NO_METHOD, or gives zero results when it has no error. A function that returns an error gives zero results. */
size_t size;
DMRGO_USER_T user;
int (*close)(DMRGO_USER_T user);
/* Decode decodes one 72-bit frame, appends its FrameSamples samples to dst and returns the extended slice and a report on the frame. */
int (*decode)(DMRGO_USER_T user, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t slot[9], dmrgo_vocoder_frame_report_t *frame_report);
/* Encode encodes exactly FrameSamples samples into one 72-bit frame. */
int (*encode)(DMRGO_USER_T user, const int16_t *pcm, size_t pcm_len, uint8_t out[9]);
/* FID returns the Feature set ID to send in the Full LC of calls that use this codec. */
int (*fid)(DMRGO_USER_T user, dmrgo_enums_fid_t *out);
/* FrameSamples returns the number of PCM samples in one frame. */
int (*frame_samples)(DMRGO_USER_T user, int64_t *out);
/* Silence returns a frame that decodes to silence, for padding the last burst of a call. */
int (*silence)(DMRGO_USER_T user, uint8_t out[9]);
/* Reset starts a new call: the decoder drops the state that it got from the frames of the call before, such as a detected mode. */
int (*reset)(DMRGO_USER_T user);
/* DecodeLost appends FrameSamples samples in place of a frame that never arrived, such as a repeat of the frame before or silence, and returns the extended slice and a report with Frame DMRGO_VOCODER_FRAME_LOST. */
int (*decode_lost)(DMRGO_USER_T user, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, dmrgo_vocoder_frame_report_t *frame_report);
};
struct dmrgo_codec2_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Mode is the Codec2 bit rate. Zero is DMRGO_CODEC2_MODE_AUTO: the decoder detects DMRGO_CODEC2_MODE2400 or DMRGO_CODEC2_MODE3200 from the padding of the frames of each call, and the encoder uses DMRGO_CODEC2_MODE2400. */
dmrgo_codec2_mode_t mode;
/* FID is the Feature set ID to send in the Full LC. Zero selects DMRGO_CODEC2_DEFAULT_FID. FID 0 is the ETSI feature set, which repeaters treat as AMBE, so it cannot be selected. */
dmrgo_enums_fid_t fid;
/* WASM is a WebAssembly build of libcodec2 from NewModule that the WebAssembly backend runs in place of the module embedded in the package. NULL selects the embedded module. The native backend of -tags codec2native links the system libcodec2 and ignores WASM. */
dmrgo_codec2_module_t *wasm;
};
struct dmrgo_dvsi_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Channel is the vocoder channel of the chip, 0 to DMRGO_DVSI_MAX_CHANNEL. The AMBE-3000R has only channel 0. */
int64_t channel;
/* Timeout is the longest wait for each reply. Zero selects DMRGO_DVSI_DEFAULT_TIMEOUT. */
dmrgo_duration_t timeout;
/* NoReset leaves out the reset of the chip, for a second Codec on another channel of an AMBE-3003 that is already in use. */
bool no_reset;
/* NoParity turns the parity fields off. By default every packet carries a parity field and the chip drops packets with a wrong parity byte. */
bool no_parity;
};
struct dmrgo_dvsi_packet_t {
/* Type is the packet type. */
dmrgo_dvsi_packet_type_t type;
/* Fields holds the bytes after the header, without the parity field. It points into the bytes given to Parse. */
uint8_t *fields;
size_t fields_len;
};
struct dmrgo_dvsi_port_vtable_t {
/* size is sizeof the struct, which the caller sets. A method that it does not cover, or whose function is NULL, fails with DMRGO_ERR_NO_METHOD, or gives zero results when it has no error. A function that returns an error gives zero results. */
size_t size;
DMRGO_USER_T user;
/* Read reads bytes from the chip into p. *out is the count of bytes that the function read or wrote, from 0 to p_len, and the library takes it also when the function returns an error; a count out of that range gives DMRGO_ERR_BOUND. */
int (*read)(DMRGO_USER_T user, uint8_t *p, size_t p_len, int64_t *out);
/* Write writes the bytes of p to the chip. *out is the count of bytes that the function read or wrote, from 0 to p_len, and the library takes it also when the function returns an error; a count out of that range gives DMRGO_ERR_BOUND. */
int (*write)(DMRGO_USER_T user, const uint8_t *p, size_t p_len, int64_t *out);
};
struct dmrgo_voice_call_options_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* PIHeader, when set, is sent after the Voice LC Headers. */
bool has_pi_header;
dmrgo_pdu_pi_header_t pi_header;
/* TalkerAlias, when not empty, is sent in the embedded LC of every other superframe, in TalkerAliasFormat. */
char *talker_alias;
size_t talker_alias_len;
/* TalkerAliasFormat is the character format of TalkerAlias. The zero value is DMRGO_LAYER3_TALKER_ALIAS_SEVEN_BIT. */
dmrgo_layer3_talker_alias_data_format_t talker_alias_format;
/* GPS, when set, is sent in the embedded LC of every other superframe, after the talker alias. */
bool has_gps;
dmrgo_pdu_flc_gps_info_t gps;
/* InCall reports that the radio is party to the call on the channel, or that the call is a response that the channel solicited. Such a call starts whatever the channel state and dmrgo_voice_transmitter_config_t.access. (ETSI TS 102 361-1 clauses 5.2.1.6 and 5.2.2.2.7) */
bool in_call;
/* HangTime reports that the BS sends call or channel hang time bursts. With dmrgo_voice_transmitter_config_t.chan_auth set, a call that is not impolite then starts with the channel authorization. (ETSI TS 102 361-2 clause 5.1.1.6) */
bool hang_time;
};
struct dmrgo_voice_interrupter_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* ColorCode is the color code of the EMB of the standalone RC bursts. The EMB also has PI set, as an RC for the other logical channel. (ETSI TS 102 361-1 clause 6.4.2 and Table 9.19, ETSI TS 102 361-2 clause 6.3.5) */
dmrgo_enums_color_code_t color_code;
/* Wait is T_RCtimer, the wait for the Terminator with LC after each try. 0 means DMRGO_CONSTANTS_TRC_TIMER (600 ms), and a negative value waits until the terminator or Cancel. (ETSI TS 102 361-2 clause A.1) */
dmrgo_duration_t wait;
/* Retries is the number of tries after the first. 0 means 1, the one automatic retry of Motorola Transmit Interrupt (MOTOTRBO System Planner 2.3.2), a negative value means none, and it is at most DMRGO_VOICE_MAX_RETRIES. (ETSI TS 102 361-2 clause 6.3.5) */
int64_t retries;
/* Repeats is the number of standalone RC bursts of each try, 60 ms apart. 0 means 1; at most DMRGO_VOICE_MAX_REPEATS. (ETSI TS 102 361-2 clause 6.3.5) */
int64_t repeats;
/* Scratch, when set, is the Burst that Burst decodes into. Machines that run on one thread can share one. NULL means the Interrupter makes its own. (ETSI TS 102 361-2 clause 6.3.5) */
dmrgo_layer2_burst_t *scratch;
/* Slot is the TDMA slot of the machine, which it puts in the Hint of each burst it sends. It must be DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2. */
dmrgo_enums_slot_t slot;
/* Lead makes Tick emit a burst this long before its Due time, so that an RF FIFO can be filled ahead. 0 means at Due; it must not be negative. T_RCtimer counts from the Due times. */
dmrgo_duration_t lead;
};
struct dmrgo_voice_jitter_packet_t {
/* Burst is the burst of the packet. HasBurst reports whether it is set. */
dmrgo_layer2_raw_burst_t burst;
/* HasBurst is false for a transport frame without a burst, that Push took with a NULL raw. */
bool has_burst;
/* Hint is the Hint that Push took, with At set to Due. */
dmrgo_layer2_hint_t hint;
/* Source is the src that Push took. */
uint32_t source;
/* Due is the time at which the packet plays: the caller hands it to a Receiver or a Repeater with this time as now. */
dmrgo_duration_t due;
};
struct dmrgo_voice_jitter_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* Delay is the playout delay: the time from the arrival of the packet that came first for its place in the stream to the Pop that returns it. A packet that comes up to Delay later than that, in any order, plays in its place. 0 means DMRGO_VOICE_DEFAULT_JITTER, and a negative value turns the buffer off: Push then returns DMRGO_VOICE_JITTER_BYPASS for every packet. At most DMRGO_VOICE_MAX_JITTER. */
dmrgo_duration_t delay;
/* Lead is the time from a Pop to the Due time of the packet it returns, for a Transmitter that relays the call with this dmrgo_voice_transmitter_config_t.lead, so that the packet is there before the Transmitter sends its burst. It must not be negative. */
dmrgo_duration_t lead;
};
struct dmrgo_voice_receiver_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* ColorCode, when set, drops bursts with another color code, except a voice burst of a call that the transport does not place whose EMB is within 5 bits of a codeword of ColorCode, which goes to the sync check of the package doc. Burst A carries no color code, so it does not start a late entry. has_color_code false accepts every color code. */
bool has_color_code;
dmrgo_enums_color_code_t color_code;
/* Lost is the time without a burst after which a call ends with DMRGO_VOICE_END_LOST. 0 means DMRGO_VOICE_DEFAULT_LOST, and a negative value turns the timer off. */
dmrgo_duration_t lost;
/* Hang is the call hang time, in which a call to the same target continues the session. 0 means DMRGO_CONSTANTS_T_CALL_HANG (3 s), and a negative value turns session tracking off. A broadcast call and a call to DMRGO_CONSTANTS_ALL_MSID have no hang time (ETSI TS 102 361-2 clause 5.3.2.3.2). */
dmrgo_duration_t hang;
/* Scratch, when set, is the Burst that Burst decodes into. Receivers that run on one thread can share one, because a Receiver is done with it when its method returns. Make it with dmrgo_layer2_new_burst, so that no decode allocates. NULL means the Receiver makes its own. */
dmrgo_layer2_burst_t *scratch;
};
struct dmrgo_voice_transmitter_config_t {
/* size is sizeof the struct, which the caller sets: the library reads only the members that it covers, as zero for the rest. */
size_t size;
/* ColorCode is the color code of the slot types and EMBs. */
dmrgo_enums_color_code_t color_code;
/* Source selects the SYNC patterns: DMRGO_LAYER2_SYNC_SOURCE_BS, the zero value, for a repeater outbound, DMRGO_LAYER2_SYNC_SOURCE_MS for a radio. */
dmrgo_layer2_sync_source_t source;
/* Silence is the 72-bit slot that fills a burst when no voice is queued, and pads the last superframe, packed as dmrgo_layer2_raw_burst_voice_slots returns it. The zero value means dmrgo_vocoder_ambe_silence_slot(). A Codec2 caller sets its own. A relayed call with a FID other than DMRGO_ENUMS_FID_STANDARDIZED and DMRGO_ENUMS_FID_MOTOROLA, such as a Codec2 call, repeats its last vocoder slot in place of Silence once it has one, as MMDVMHost does, because the silence of one codec is noise to another. */
uint8_t silence[9];
/* Headers is the number of Voice LC Headers before burst A. 0 means 1, as ETSI TS 102 361-1 clause 5.1.2.2 gives; at most DMRGO_VOICE_MAX_HEADERS. MMDVMHost sends 3 as a duplex repeater. dmrgo_voice_transmitter_relay sends one header for a call that the Receiver joined late, one whose dmrgo_voice_call_t.origin is not DMRGO_VOICE_ORIGIN_HEADER, so that its voice is not held back. */
int64_t headers;
/* Terminators is the number of Terminators with LC at the end of a call. 0 means 1; at most DMRGO_VOICE_MAX_TERMINATORS. */
int64_t terminators;
/* Timeout is the transmit timeout T_TO. 0 means DMRGO_CONSTANTS_TTO (180 s), and a negative value turns it off (ETSI TS 102 361-2 clause 6.1). */
dmrgo_duration_t timeout;
/* Queue is the number of vocoder slots buffered. 0 means Headers+2 bursts, DMRGO_VOICE_DEFAULT_QUEUE for 0 or 1 Headers; at most DMRGO_VOICE_MAX_QUEUE. It must hold Headers+1 bursts. */
int64_t queue;
/* Lead makes Tick emit a burst this long before its Due time, so that an RF FIFO can be filled ahead. 0 means at Due; it must not be negative. */
dmrgo_duration_t lead;
/* Access is the channel access policy of Start. A polite call waits up to IdleSearch for Channel to report an idle channel and ends with DMRGO_VOICE_END_DENIED when it does not; an impolite call starts at once. Relay ignores it. The zero value is polite to own color code. (ETSI TS 102 361-1 clauses 5.2.1.6 and 5.2.2) */
dmrgo_enums_access_t access;
/* IdleSearch is T_IdleSrch, the wait for an idle channel before a polite call. 0 means DMRGO_VOICE_DEFAULT_IDLE_SEARCH, and a negative value denies the call at once. (ETSI TS 102 361-1 clause 5.2.2.2.5) */
dmrgo_duration_t idle_search;
/* Interruptible makes Interrupt end the call on a Cease Transmission Request. A Cease Transmission Command ends it whatever this field holds. (ETSI TS 102 361-2 clauses 6.3.3 and 6.3.4) */
bool interruptible;
/* ChanAuth is T_MS_ChanAuth, the wait for the BS to repeat the ChanAuth PDU of a call that starts in hang time, dmrgo_voice_call_options_t.hang_time. 0 means no channel authorization; DMRGO_CONSTANTS_TMS_CHAN_AUTH and DMRGO_CONSTANTS_TMS_CHAN_AUTH_MULTI_SITE are the recommended values. (ETSI TS 102 361-2 clause 5.1.1.6.2) */
dmrgo_duration_t chan_auth;
/* HoldoffMax is the upper end of the random holdoff before a new channel authorization try. 0 means DMRGO_VOICE_DEFAULT_HOLDOFF_MAX, and a negative value means no holdoff. (ETSI TS 102 361-2 clause 5.1.1.6.2) */
dmrgo_duration_t holdoff_max;
/* Seed seeds the generator of the random holdoff, so that the same inputs give the same outputs. (ETSI TS 102 361-2 clause 5.1.1.6.2) */
uint64_t seed;
/* Scratch, when set, is the Burst that Burst decodes into. Machines that run on one thread can share one. NULL means the Transmitter makes its own when ChanAuth is set. (ETSI TS 102 361-2 clause 5.1.1.6.2) */
dmrgo_layer2_burst_t *scratch;
/* Slot is the TDMA slot of the machine, which it puts in the Hint of each burst it sends. It must be DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2. */
dmrgo_enums_slot_t slot;
};
#define DMRGO_BS_REPEATER_DECODED_MAX_ITEMS (DMRGO_BS_MAX_OUTPUTS)
#define DMRGO_BS_REPEATER_INBOUND_MAX_ITEMS (DMRGO_BS_MAX_OUTPUTS)
#define DMRGO_BS_REPEATER_LOST_MAX_ITEMS (DMRGO_BS_MAX_OUTPUTS)
#define DMRGO_BS_REPEATER_TICK_MAX_ITEMS (DMRGO_BS_MAX_OUTPUTS)
#define DMRGO_CSBK_PREAMBLES_BURST_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_PREAMBLES_DECODED_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_PREAMBLES_LOST_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_PREAMBLES_TICK_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_REQUESTER_BURST_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_REQUESTER_CANCEL_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_REQUESTER_DECODED_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_REQUESTER_LOST_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_REQUESTER_TICK_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_RESPONDER_BURST_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_RESPONDER_DECODED_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_RESPONDER_LOST_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_RESPONDER_TICK_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_TIMING_BURST_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_TIMING_DECODED_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_TIMING_LOST_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_TIMING_TERMINATOR_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_TIMING_TICK_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_WAKEUP_BURST_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_WAKEUP_CANCEL_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_WAKEUP_DECODED_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_WAKEUP_LOST_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_WAKEUP_OUTBOUND_SYNC_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_CSBK_WAKEUP_TICK_MAX_ITEMS (DMRGO_CSBK_MAX_OUTPUTS)
#define DMRGO_DATA_SENDER_BURST_MAX_ITEMS (DMRGO_DATA_MAX_OUTPUTS)
#define DMRGO_DATA_SENDER_CANCEL_MAX_ITEMS (DMRGO_DATA_MAX_OUTPUTS)
#define DMRGO_DATA_SENDER_DECODED_MAX_ITEMS (DMRGO_DATA_MAX_OUTPUTS)
#define DMRGO_DATA_SENDER_LOST_MAX_ITEMS (DMRGO_DATA_MAX_OUTPUTS)
#define DMRGO_DATA_SENDER_TICK_MAX_ITEMS (DMRGO_DATA_MAX_OUTPUTS)
#define DMRGO_DVSI_CODEC_PRODUCT_MAX_ITEMS (DMRGO_DVSI_MAX_PRODUCT_LEN)
#define DMRGO_DVSI_CODEC_VERSION_MAX_ITEMS (DMRGO_DVSI_MAX_VERSION_LEN)
#define DMRGO_ERR_ARS_LENGTH (-160)
#define DMRGO_ERR_ARS_SHORT (-161)
#define DMRGO_ERR_BS_SLOT (-105)
#define DMRGO_ERR_CODEC2_CLOSED (-205)
#define DMRGO_ERR_CODEC2_FRAME_LENGTH (-206)
#define DMRGO_ERR_CODEC2_NOT_WASM (-227)
#define DMRGO_ERR_CODEC2_UNAVAILABLE (-207)
#define DMRGO_ERR_CODEC2_UNSUPPORTED_MODE (-208)
#define DMRGO_ERR_CONFIG (-100)
#define DMRGO_ERR_CSBK_BUSY (-106)
#define DMRGO_ERR_CSBK_NO_ADDRESSES (-107)
#define DMRGO_ERR_DATA_BUSY (-108)
#define DMRGO_ERR_DMRD_COMMAND (-180)
#define DMRGO_ERR_DMRD_LENGTH (-181)
#define DMRGO_ERR_DMRD_SHORT (-182)
#define DMRGO_ERR_DMRD_SIGNATURE (-183)
#define DMRGO_ERR_DMRD_TEXT (-184)
#define DMRGO_ERR_DVSI_BITS (-209)
#define DMRGO_ERR_DVSI_CHANNEL (-210)
#define DMRGO_ERR_DVSI_CLOSED (-211)
#define DMRGO_ERR_DVSI_FIELD (-212)
#define DMRGO_ERR_DVSI_INCOMPLETE (-213)
#define DMRGO_ERR_DVSI_LENGTH (-214)
#define DMRGO_ERR_DVSI_PARITY (-215)
#define DMRGO_ERR_DVSI_PORT (-216)
#define DMRGO_ERR_DVSI_SAMPLES (-217)
#define DMRGO_ERR_DVSI_SPEECH_FORMAT (-228)
#define DMRGO_ERR_DVSI_START (-218)
#define DMRGO_ERR_DVSI_STATUS (-219)
#define DMRGO_ERR_DVSI_TIMEOUT (-220)
#define DMRGO_ERR_DVSI_TYPE (-221)
#define DMRGO_ERR_FEC_UNCORRECTABLE (-109)
#define DMRGO_ERR_FIELD_RANGE (-101)
#define DMRGO_ERR_HDAP_LENGTH (-110)
#define DMRGO_ERR_HDAP_SHORT (-111)
#define DMRGO_ERR_HDAP_SIGNATURE (-112)
#define DMRGO_ERR_HDAP_TEXT (-113)
#define DMRGO_ERR_HYTERA_CODE (-185)
#define DMRGO_ERR_HYTERA_LENGTH (-186)
#define DMRGO_ERR_HYTERA_SHORT (-187)
#define DMRGO_ERR_HYTERA_SIGNATURE (-188)
#define DMRGO_ERR_IPSC_COMMAND (-189)
#define DMRGO_ERR_IPSC_LENGTH (-190)
#define DMRGO_ERR_IPSC_SHORT (-191)
#define DMRGO_ERR_IP_CHECKSUM (-114)
#define DMRGO_ERR_IP_FRAGMENT (-115)
#define DMRGO_ERR_IP_LENGTH (-116)
#define DMRGO_ERR_IP_NO_ICMP (-117)
#define DMRGO_ERR_IP_PROTOCOL (-118)
#define DMRGO_ERR_IP_SAP (-119)
#define DMRGO_ERR_IP_SHORT (-120)
#define DMRGO_ERR_IP_VERSION (-121)
#define DMRGO_ERR_LAYER2_COLOR_CODE_MISMATCH (-122)
#define DMRGO_ERR_LAYER2_DATA_TYPE (-123)
#define DMRGO_ERR_LAYER2_EMBEDDED_LC_SEQUENCE (-124)
#define DMRGO_ERR_LAYER2_EMBEDDED_LC_UNCORRECTABLE (-125)
#define DMRGO_ERR_LAYER2_KIND (-126)
#define DMRGO_ERR_LAYER2_RESERVED_DATA_TYPE (-127)
#define DMRGO_ERR_LAYER2_SHORT_LC_SEQUENCE (-128)
#define DMRGO_ERR_LAYER2_SYNC_PATTERN (-129)
#define DMRGO_ERR_LAYER2_SYNC_SOURCE (-130)
#define DMRGO_ERR_LAYER2_VOICE_POSITION (-131)
#define DMRGO_ERR_LAYER2_VOICE_TERMINATED (-132)
#define DMRGO_ERR_LIP_ELEMENT (-229)
#define DMRGO_ERR_LIP_PDU_TYPE (-230)
#define DMRGO_ERR_LIP_SHAPE (-231)
#define DMRGO_ERR_LIP_SHORT (-232)
#define DMRGO_ERR_LIP_TIME_TYPE (-233)
#define DMRGO_ERR_LOCATION_FORMAT (-238)
#define DMRGO_ERR_LOCATION_NO_FIX (-158)
#define DMRGO_ERR_LOCATION_NO_POSITION (-159)
#define DMRGO_ERR_LRRP_LENGTH (-162)
#define DMRGO_ERR_LRRP_SHORT (-163)
#define DMRGO_ERR_LRRP_TOKEN (-164)
#define DMRGO_ERR_LRRP_VARINT (-165)
#define DMRGO_ERR_MMDVM_COMMAND (-192)
#define DMRGO_ERR_MMDVM_LENGTH (-193)
#define DMRGO_ERR_MMDVM_SHORT (-194)
#define DMRGO_ERR_NIL_ARGUMENT (-102)
#define DMRGO_ERR_NIL_RECEIVER (-103)
#define DMRGO_ERR_NMEA_CHECKSUM (-168)
#define DMRGO_ERR_NMEA_FIELD (-169)
#define DMRGO_ERR_NMEA_SENTENCE (-170)
#define DMRGO_ERR_PACKET_BLOCKS_MISSING (-133)
#define DMRGO_ERR_PACKET_FORMAT (-134)
#define DMRGO_ERR_PACKET_HEADER_CRC (-135)
#define DMRGO_ERR_PACKET_MESSAGE_CRC (-136)
#define DMRGO_ERR_PACKET_NO_FIRST_TRY (-137)
#define DMRGO_ERR_PACKET_NO_HEADER (-138)
#define DMRGO_ERR_PACKET_NO_RETRY_BLOCKS (-139)
#define DMRGO_ERR_PACKET_NO_ROOM (-140)
#define DMRGO_ERR_PACKET_PAD_NIBBLE (-245)
#define DMRGO_ERR_PACKET_RATE (-141)
#define DMRGO_ERR_PACKET_RATE_CHANGE (-142)
#define DMRGO_ERR_PACKET_RESPONSE_DATA (-143)
#define DMRGO_ERR_PACKET_TOO_LONG (-144)
#define DMRGO_ERR_PACKET_UNEXPECTED_RETRY (-145)
#define DMRGO_ERR_PDU_CAPACITY_PLUS_INCOMPLETE (-146)
#define DMRGO_ERR_PDU_CAPACITY_PLUS_SEQUENCE (-147)
#define DMRGO_ERR_PDU_NO_ADDRESSES (-148)
#define DMRGO_ERR_PDU_NO_BLOCK_CRC (-149)
#define DMRGO_ERR_PDU_NO_FULL_LC_MASK (-150)
#define DMRGO_ERR_PDU_NO_GROUP_FLAG (-151)
#define DMRGO_ERR_PDU_NO_SERVICE_OPTIONS (-152)
#define DMRGO_ERR_PDU_TALKER_ALIAS_CHARACTER (-153)
#define DMRGO_ERR_PDU_TALKER_ALIAS_INCOMPLETE (-154)
#define DMRGO_ERR_PDU_TALKER_ALIAS_INVALID_UTF8 (-155)
#define DMRGO_ERR_PDU_TALKER_ALIAS_LENGTH (-156)
#define DMRGO_ERR_PDU_WRONG_OPCODE (-157)
#define DMRGO_ERR_PRIVACY_AMATEUR (-234)
#define DMRGO_ERR_PRIVACY_DATA_ALGORITHM (-237)
#define DMRGO_ERR_PRIVACY_KEYS_FULL (-235)
#define DMRGO_ERR_PRIVACY_NOT_STARTED (-236)
#define DMRGO_ERR_RF_BURST_ORDER (-240)
#define DMRGO_ERR_RF_BURST_SERVICE (-241)
#define DMRGO_ERR_RF_NIL_BURST (-242)
#define DMRGO_ERR_RF_NOT_SET_UP (-243)
#define DMRGO_ERR_RF_REGION (-239)
#define DMRGO_ERR_RF_TX_TIMEOUT (-244)
#define DMRGO_ERR_SHORTDATA_CHARACTER (-171)
#define DMRGO_ERR_SHORTDATA_FORMAT (-172)
#define DMRGO_ERR_SHORTDATA_LENGTH (-173)
#define DMRGO_ERR_SHORTDATA_SHORT (-174)
#define DMRGO_ERR_SMS_FORMAT (-175)
#define DMRGO_ERR_SMS_LENGTH (-176)
#define DMRGO_ERR_SMS_NOT_TEXT (-177)
#define DMRGO_ERR_SMS_SHORT (-178)
#define DMRGO_ERR_SMS_SIGNATURE (-179)
#define DMRGO_ERR_SMS_TEXT_LENGTH (-246)
#define DMRGO_ERR_TMS_LENGTH (-166)
#define DMRGO_ERR_TMS_SHORT (-167)
#define DMRGO_ERR_TRUNK_BUSY (-195)
#define DMRGO_ERR_TRUNK_CHANNEL_NUMBER (-196)
#define DMRGO_ERR_TRUNK_NOT_ON_CONTROL (-197)
#define DMRGO_ERR_TRUNK_NOT_REGISTERED (-198)
#define DMRGO_ERR_TRUNK_NO_CALL (-199)
#define DMRGO_ERR_TRUNK_PLAN_FULL (-200)
#define DMRGO_ERR_TRUNK_STUNNED (-201)
#define DMRGO_ERR_TRUNK_UDT_CHARACTER (-202)
#define DMRGO_ERR_TRUNK_UDT_FORMAT (-203)
#define DMRGO_ERR_TRUNK_UDT_LENGTH (-204)
#define DMRGO_ERR_VOICE_BUSY (-222)
#define DMRGO_ERR_VOICE_INTERRUPT_BUSY (-223)
#define DMRGO_ERR_VOICE_NOT_ACTIVE (-224)
#define DMRGO_ERR_VOICE_QUEUE_FULL (-225)
#define DMRGO_ERR_VOICE_TIMED_OUT (-226)
#define DMRGO_ERR_ZERO_VALUE (-104)
#define DMRGO_IPSCAUTH_KEY_SIGN_MAX_ITEMS (DMRGO_IPSCAUTH_TRAILER_LEN)
#define DMRGO_IPSCSESSION_MASTER_SIGN_FOR_MAX_ITEMS (DMRGO_IPSCAUTH_TRAILER_LEN)
#define DMRGO_IPSCSESSION_MASTER_SIGN_MAX_ITEMS (DMRGO_IPSCAUTH_TRAILER_LEN)
#define DMRGO_IPSCSESSION_PEER_SIGN_MAX_ITEMS (DMRGO_IPSCAUTH_TRAILER_LEN)
#define DMRGO_LAYER2_DATA_PDU_BCAP_CONTINUATION 1
#define DMRGO_LAYER2_DATA_PDU_CGAP_CONTINUATION 2
#define DMRGO_LAYER2_DATA_PDU_CSBK 3
#define DMRGO_LAYER2_DATA_PDU_DATA_HEADER 4
#define DMRGO_LAYER2_DATA_PDU_FULL_LINK_CONTROL 5
#define DMRGO_LAYER2_DATA_PDU_MBC_CONTINUATION 6
#define DMRGO_LAYER2_DATA_PDU_MBC_HEADER 7
#define DMRGO_LAYER2_DATA_PDU_MVAP_CONTINUATION 8
#define DMRGO_LAYER2_DATA_PDU_PI_HEADER 9
#define DMRGO_LAYER2_DATA_PDU_PR_FILL 10
#define DMRGO_LAYER2_DATA_PDU_RATE12_DATA 11
#define DMRGO_LAYER2_DATA_PDU_RATE1_DATA 12
#define DMRGO_LAYER2_DATA_PDU_RATE34_DATA 13
#define DMRGO_LAYER2_DATA_PDU_UNIFIED_SINGLE_BLOCK_DATA 14
#define DMRGO_LAYER2_DATA_PDU_VNAP_CONTINUATION 15
#define DMRGO_LAYER2_VOICE_TRANSMITTER_APPEND_HEADERS_MAX_ITEMS (2)
#define DMRGO_LAYER2_VOICE_TRANSMITTER_APPEND_TERMINATE_MAX_ITEMS ((DMRGO_LAYER2_VOICE_BURSTS_PER_SUPERFRAME + 1))
#define DMRGO_LAYER2_VOICE_TRANSMITTER_HEADERS_MAX_ITEMS (2)
#define DMRGO_LAYER2_VOICE_TRANSMITTER_TERMINATE_MAX_ITEMS ((DMRGO_LAYER2_VOICE_BURSTS_PER_SUPERFRAME + 1))
#define DMRGO_PACKET_ASSEMBLER_APPEND_MISSING_MAX_ITEMS (127)
#define DMRGO_PACKET_ASSEMBLER_MISSING_MAX_ITEMS (127)
#define DMRGO_PDU_TALKER_ALIAS_ASSEMBLER_ADD_MAX_ITEMS (DMRGO_PDU_TALKER_ALIAS_MAX_TEXT)
#define DMRGO_PDU_TALKER_ALIAS_ASSEMBLER_APPEND_ADD_MAX_ITEMS (DMRGO_PDU_TALKER_ALIAS_MAX_TEXT)
#define DMRGO_TRUNK_CAPACITY_PLUS_FOLLOWER_BURST_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_CAPACITY_PLUS_FOLLOWER_DECODED_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_CAPACITY_PLUS_FOLLOWER_LOST_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_CAPACITY_PLUS_FOLLOWER_TICK_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_FOLLOWER_BURST_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_FOLLOWER_DECODED_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_FOLLOWER_LOST_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_FOLLOWER_TICK_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_MS_AUTH_RESPONSE_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_MS_BURST_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_MS_CANCEL_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_MS_DECODED_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_MS_END_CALL_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_MS_GROUP_ALIAS_MAX_ITEMS (63)
#define DMRGO_TRUNK_MS_INTERRUPT_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_MS_LOST_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_MS_POWER_OFF_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_MS_QUALITY_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_MS_TICK_MAX_ITEMS (DMRGO_TRUNK_MAX_OUTPUTS)
#define DMRGO_TRUNK_TSCC_INBOUND_MAX_ITEMS (DMRGO_TRUNK_MAX_TSCC_OUTPUTS)
#define DMRGO_TRUNK_TSCC_TICK_MAX_ITEMS (DMRGO_TRUNK_MAX_TSCC_OUTPUTS)
#define DMRGO_VOICE_INTERRUPTER_BURST_MAX_ITEMS (DMRGO_VOICE_MAX_OUTPUTS)
#define DMRGO_VOICE_INTERRUPTER_CANCEL_MAX_ITEMS (DMRGO_VOICE_MAX_OUTPUTS)
#define DMRGO_VOICE_INTERRUPTER_DECODED_MAX_ITEMS (DMRGO_VOICE_MAX_OUTPUTS)
#define DMRGO_VOICE_INTERRUPTER_LOST_MAX_ITEMS (DMRGO_VOICE_MAX_OUTPUTS)
#define DMRGO_VOICE_INTERRUPTER_TICK_MAX_ITEMS (DMRGO_VOICE_MAX_OUTPUTS)
#define DMRGO_VOICE_TRANSMITTER_BURST_MAX_ITEMS (DMRGO_VOICE_MAX_OUTPUTS)
#define DMRGO_VOICE_TRANSMITTER_DECODED_MAX_ITEMS (DMRGO_VOICE_MAX_OUTPUTS)
#define DMRGO_VOICE_TRANSMITTER_LOST_MAX_ITEMS (DMRGO_VOICE_MAX_OUTPUTS)
#define DMRGO_VOICE_TRANSMITTER_TICK_MAX_ITEMS (DMRGO_VOICE_MAX_OUTPUTS)
/* Go: dmrgo.ServiceAmateur. ServiceAmateur is the amateur or amateur-satellite service. */
#define DMRGO_SERVICE_AMATEUR ((dmrgo_service_t)1)
/* Go: dmrgo.ServiceLandMobile. ServiceLandMobile is a licensed land mobile service, such as private, business or public safety PMR. */
#define DMRGO_SERVICE_LAND_MOBILE ((dmrgo_service_t)2)
/* Go: dmrgo.ServiceLicenseFree. ServiceLicenseFree is a licence-exempt service. */
#define DMRGO_SERVICE_LICENSE_FREE ((dmrgo_service_t)3)
/* Go: dmrgo.ServiceUnknown. ServiceUnknown is a service that the caller did not state. */
#define DMRGO_SERVICE_UNKNOWN ((dmrgo_service_t)0)
/* Go: bs.ActivationAny. ActivationAny wakes up on any valid burst with the own color code, or on any network burst ("MS established timing"). */
#define DMRGO_BS_ACTIVATION_ANY ((dmrgo_bs_activation_t)0)
/* Go: bs.ActivationWakeup. ActivationWakeup wakes up only on a BS_Dwn_Act CSBK with the own color code, or on a network burst ("BS established timing", ETSI TS 102 361-2 clause 5.1.1.1). */
#define DMRGO_BS_ACTIVATION_WAKEUP ((dmrgo_bs_activation_t)1)
/* Go: bs.ChannelAuthMultiSite. ChannelAuthMultiSite first collects the ChanAuth PDUs from RF and from the network for T_BS_ChanAuthSel, picks the one with the lowest source address, and then repeats it as DMRGO_BS_CHANNEL_AUTH_SINGLE_SITE does (ETSI TS 102 361-2 clause 5.1.1.6.1.2). */
#define DMRGO_BS_CHANNEL_AUTH_MULTI_SITE ((dmrgo_bs_channel_auth_t)2)
/* Go: bs.ChannelAuthOff. ChannelAuthOff gives the slot to the first burst that the hang time admits. */
#define DMRGO_BS_CHANNEL_AUTH_OFF ((dmrgo_bs_channel_auth_t)0)
/* Go: bs.ChannelAuthSingleSite. ChannelAuthSingleSite repeats the ChanAuth PDU of the first MS, a Voice LC Header or a Pre_CSBK from RF, and gives the slot to the bursts with its source address (ETSI TS 102 361-2 clause 5.1.1.6.1.1). */
#define DMRGO_BS_CHANNEL_AUTH_SINGLE_SITE ((dmrgo_bs_channel_auth_t)1)
/* Go: bs.DefaultDataQueue. DefaultDataQueue is the number of data and CSBK bursts per slot that wait for the outbound channel. */
#define DMRGO_BS_DEFAULT_DATA_QUEUE 4
/* Go: bs.DefaultInactivity. DefaultInactivity is T_MSInactiv, the time without inbound activity after which the Repeater hibernates (ETSI TS 102 361-1 clause F.1). */
#define DMRGO_BS_DEFAULT_INACTIVITY INT64_C(5000000000)
/* Go: bs.DefaultPending. DefaultPending is the number of refused sources per slot that wait for the slot. */
#define DMRGO_BS_DEFAULT_PENDING 8
/* Go: bs.DefaultPendingAge. DefaultPendingAge is the longest time a source waits for a slot. */
#define DMRGO_BS_DEFAULT_PENDING_AGE INT64_C(30000000000)
/* Go: bs.MaxDataQueue. MaxDataQueue is the most data and CSBK bursts per slot that wait for the outbound channel. */
#define DMRGO_BS_MAX_DATA_QUEUE 16
/* Go: bs.MaxOutputs. MaxOutputs is the most outputs that one call of a Repeater method appends. */
#define DMRGO_BS_MAX_OUTPUTS 10
/* Go: bs.MaxPending. MaxPending is the most sources per slot that wait for the slot. */
#define DMRGO_BS_MAX_PENDING 16
/* Go: bs.ModeNetwork. ModeNetwork is the slot arbiter of a network server without RF: it regenerates and forwards the bursts of the owner of each slot and makes no CACH, hang time or Idle bursts. */
#define DMRGO_BS_MODE_NETWORK ((dmrgo_bs_mode_t)1)
/* Go: bs.ModeRF. ModeRF is a repeater or hotspot with a transmitter: one outbound burst per 30 ms slot, hang time bursts, Idle bursts and hibernation. */
#define DMRGO_BS_MODE_RF ((dmrgo_bs_mode_t)0)
/* Go: bs.OutputBurst. OutputBurst is a burst to send at Due to the places in To. */
#define DMRGO_BS_OUTPUT_BURST ((dmrgo_bs_output_kind_t)1)
/* Go: bs.OutputCallEnd. OutputCallEnd is the end of the call or data on a slot. */
#define DMRGO_BS_OUTPUT_CALL_END ((dmrgo_bs_output_kind_t)3)
/* Go: bs.OutputCallStart. OutputCallStart is a source that took a slot. */
#define DMRGO_BS_OUTPUT_CALL_START ((dmrgo_bs_output_kind_t)2)
/* Go: bs.OutputDekey. OutputDekey is the start of hibernation in DMRGO_BS_MODE_RF. */
#define DMRGO_BS_OUTPUT_DEKEY ((dmrgo_bs_output_kind_t)6)
/* Go: bs.OutputKey. OutputKey is the wakeup of the transmitter in DMRGO_BS_MODE_RF. */
#define DMRGO_BS_OUTPUT_KEY ((dmrgo_bs_output_kind_t)5)
/* Go: bs.OutputRejected. OutputRejected is a source that the Repeater refused. */
#define DMRGO_BS_OUTPUT_REJECTED ((dmrgo_bs_output_kind_t)4)
/* Go: bs.ReasonHangTime. ReasonHangTime is a call to another target from another Source in the call hang time of the slot (ETSI TS 102 361-1 clause 5.2.1.4). */
#define DMRGO_BS_REASON_HANG_TIME ((dmrgo_bs_reason_t)2)
/* Go: bs.ReasonRejected. ReasonRejected is a call that the caller refused with dmrgo_bs_repeater_reject. */
#define DMRGO_BS_REASON_REJECTED ((dmrgo_bs_reason_t)4)
/* Go: bs.ReasonSlotBusy. ReasonSlotBusy is a slot that another source owns. */
#define DMRGO_BS_REASON_SLOT_BUSY ((dmrgo_bs_reason_t)1)
/* Go: bs.ReasonTimeout. ReasonTimeout is a call that ran longer than dmrgo_bs_config_t.timeout. */
#define DMRGO_BS_REASON_TIMEOUT ((dmrgo_bs_reason_t)3)
/* Go: bs.ServiceData. ServiceData is a data transfer: a data header and its blocks. */
#define DMRGO_BS_SERVICE_DATA ((dmrgo_bs_service_t)1)
/* Go: bs.ServiceVoice. ServiceVoice is a voice call. */
#define DMRGO_BS_SERVICE_VOICE ((dmrgo_bs_service_t)0)
/* Go: bs.SlotCallHang. SlotCallHang is the call hang time after a voice call: only a call to the same target takes the slot, and it gets Terminators with the call LC. */
#define DMRGO_BS_SLOT_CALL_HANG ((dmrgo_bs_slot_state_t)3)
/* Go: bs.SlotChanAuth. SlotChanAuth repeats the ChanAuth PDU of the authorized MS until T_BS_ChanAuthRsp runs out or a burst with its source address comes (ETSI TS 102 361-2 clause 5.1.1.6.1). */
#define DMRGO_BS_SLOT_CHAN_AUTH ((dmrgo_bs_slot_state_t)7)
/* Go: bs.SlotChanAuthSelect. SlotChanAuthSelect collects ChanAuth PDUs for T_BS_ChanAuthSel and keeps sending the hang time bursts (ETSI TS 102 361-2 clause 5.1.1.6.1.2). */
#define DMRGO_BS_SLOT_CHAN_AUTH_SELECT ((dmrgo_bs_slot_state_t)6)
/* Go: bs.SlotData. SlotData repeats a data header and its blocks. */
#define DMRGO_BS_SLOT_DATA ((dmrgo_bs_slot_state_t)2)
/* Go: bs.SlotDataHang. SlotDataHang is the data hang time after confirmed data: it gets TD_LC and waits for the response. */
#define DMRGO_BS_SLOT_DATA_HANG ((dmrgo_bs_slot_state_t)4)
/* Go: bs.SlotIdle. SlotIdle is the channel hang time: the slot is free and gets Idle bursts. */
#define DMRGO_BS_SLOT_IDLE ((dmrgo_bs_slot_state_t)0)
/* Go: bs.SlotPreamble. SlotPreamble repeats the Pre_CSBKs of one source before its data or CSBK. */
#define DMRGO_BS_SLOT_PREAMBLE ((dmrgo_bs_slot_state_t)8)
/* Go: bs.SlotRejected. SlotRejected drops a call that timed out or was rejected until it ends. */
#define DMRGO_BS_SLOT_REJECTED ((dmrgo_bs_slot_state_t)5)
/* Go: bs.SlotTime. SlotTime is the time of one outbound burst with its CACH, and the period of Tick in DMRGO_BS_MODE_RF (ETSI TS 102 361-1 clause 4.2.2). */
#define DMRGO_BS_SLOT_TIME 30000000
/* Go: bs.SlotVoice. SlotVoice repeats a voice call. */
#define DMRGO_BS_SLOT_VOICE ((dmrgo_bs_slot_state_t)1)
/* Go: bs.StateHangtime. StateHangtime is keyed with both slots free. */
#define DMRGO_BS_STATE_HANGTIME ((dmrgo_bs_state_t)1)
/* Go: bs.StateHibernating. StateHibernating has the transmitter off. */
#define DMRGO_BS_STATE_HIBERNATING ((dmrgo_bs_state_t)0)
/* Go: bs.StateRepeatingBoth. StateRepeatingBoth repeats both slots. */
#define DMRGO_BS_STATE_REPEATING_BOTH ((dmrgo_bs_state_t)4)
/* Go: bs.StateRepeatingSlot1. StateRepeatingSlot1 repeats slot 1. */
#define DMRGO_BS_STATE_REPEATING_SLOT1 ((dmrgo_bs_state_t)2)
/* Go: bs.StateRepeatingSlot2. StateRepeatingSlot2 repeats slot 2. */
#define DMRGO_BS_STATE_REPEATING_SLOT2 ((dmrgo_bs_state_t)3)
/* Go: bs.ToNetwork. ToNetwork sends the burst to the network: in DMRGO_BS_MODE_NETWORK to the peers other than dmrgo_bs_output_t.from, in DMRGO_BS_MODE_RF to the network that the hotspot or repeater is linked to. */
#define DMRGO_BS_TO_NETWORK ((dmrgo_bs_dest_t)2)
/* Go: bs.ToRF. ToRF sends the burst on the outbound channel. */
#define DMRGO_BS_TO_RF ((dmrgo_bs_dest_t)1)
/* Go: constants.AddressNull. AddressNull (ADRNULL) is an ID that is not assigned to any entity. */
#define DMRGO_CONSTANTS_ADDRESS_NULL 0
/* Go: constants.AllMSID. AllMSID (ALLMSID) addresses all MS (AllCall) in every site in the system as a talkgroup. */
#define DMRGO_CONSTANTS_ALL_MSID 16777215
/* Go: constants.AllMSIDLocal. AllMSIDLocal (ALLMSIDL) addresses all MS at one site as a talkgroup. */
#define DMRGO_CONSTANTS_ALL_MSID_LOCAL 16777213
/* Go: constants.AllMSIDZone. AllMSIDZone (ALLMSIDZ) addresses all MS in a subset of the system's sites as a talkgroup. */
#define DMRGO_CONSTANTS_ALL_MSID_ZONE 16777214
/* Go: constants.BeaconDuration. BeaconDuration is the minimum duration of a CT_CSBK_Beacon and CT_CSBK_Prop transmission (ETSI TS 102 361-2 clause A.2). */
#define DMRGO_CONSTANTS_BEACON_DURATION 600000000
/* Go: constants.BeaconInterval. BeaconInterval is the time between the start of two consecutive CT_CSBK_Beacon transmissions by the wide area timing leader MS (ETSI TS 102 361-2 clause A.2). */
#define DMRGO_CONSTANTS_BEACON_INTERVAL INT64_C(270000000000)
/* Go: constants.CTDuration. CTDuration is the minimum duration of a CT_CSBK_Req and CT_CSBK_Resp transmission (ETSI TS 102 361-2 clause A.2). */
#define DMRGO_CONSTANTS_CT_DURATION 180000000
/* Go: constants.CTRHOTIncrement. CTRHOTIncrement is the increment of CT_RHOT (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_CTRHOT_INCREMENT 60000000
/* Go: constants.CTRHOTMax. CTRHOTMax is the upper bound of the CT_CSBK transmission Random HoldOff Timer (CT_RHOT) when leader timing is unknown: a uniform distribution from 0 to 3.24 s. */
#define DMRGO_CONSTANTS_CTRHOT_MAX INT64_C(3240000000)
/* Go: constants.ChPref. ChPref is Ch_Pref, the channels that are marked as Preferred TSCC for Vote_Now (ETSI TS 102 361-4 Table A.6). */
#define DMRGO_CONSTANTS_CH_PREF 50
/* Go: constants.ChannelNull. ChannelNull (CHNULL) is a logical physical channel that is not assigned. */
#define DMRGO_CONSTANTS_CHANNEL_NULL 0
/* Go: constants.DMRLADefault. DMRLADefault is the default DMRLA, the length of the SYS_AREA information field from the C_SYScode. */
#define DMRGO_CONSTANTS_DMRLA_DEFAULT 1
/* Go: constants.DigitNull. DigitNull (DigitNULL) fills unused BCD information elements. */
#define DMRGO_CONSTANTS_DIGIT_NULL 15
/* Go: constants.GatewayALLMSI. GatewayALLMSI (ALLMSI) is the totality of all individual MS and talkgroups. */
#define DMRGO_CONSTANTS_GATEWAY_ALLMSI 16776916
/* Go: constants.GatewayAUTHI. GatewayAUTHI (AUTHI) is the Authentication identifier. */
#define DMRGO_CONSTANTS_GATEWAY_AUTHI 16776909
/* Go: constants.GatewayDGNAI. GatewayDGNAI (DGNAI) is the address that identifies the Dynamic Group Number Assignment. */
#define DMRGO_CONSTANTS_GATEWAY_DGNAI 16776918
/* Go: constants.GatewayDISPATDI. GatewayDISPATDI (DISPATDI) is the address of the system dispatcher using payload offset timing. */
#define DMRGO_CONSTANTS_GATEWAY_DISPATDI 16776915
/* Go: constants.GatewayDISPATI. GatewayDISPATI (DISPATI) is the address of the system dispatcher using payload aligned timing. */
#define DMRGO_CONSTANTS_GATEWAY_DISPATI 16776907
/* Go: constants.GatewayDIVERTI. GatewayDIVERTI (DIVERTI) is the address that identifies a call diversion cancellation. */
#define DMRGO_CONSTANTS_GATEWAY_DIVERTI 16776905
/* Go: constants.GatewayGPI. GatewayGPI (GPI) is the gateway address for Call Diversion to a Talkgroup. */
#define DMRGO_CONSTANTS_GATEWAY_GPI 16776910
/* Go: constants.GatewayIPDI. GatewayIPDI (IPDI) is the address for services to an IP gateway using payload offset timing. */
#define DMRGO_CONSTANTS_GATEWAY_IPDI 16776917
/* Go: constants.GatewayIPI. GatewayIPI (IPI) is the address for services to an IP Gateway using payload aligned timing. */
#define DMRGO_CONSTANTS_GATEWAY_IPI 16776899
/* Go: constants.GatewayKILLI. GatewayKILLI (KILLI) is the MS KILL identifier. */
#define DMRGO_CONSTANTS_GATEWAY_KILLI 16776911
/* Go: constants.GatewayLINEDI. GatewayLINEDI (LINEDI) is the address for services to a Line Gateway using payload offset timing. */
#define DMRGO_CONSTANTS_GATEWAY_LINEDI 16776914
/* Go: constants.GatewayLINEI. GatewayLINEI (LINEI) is the address for services to a Line Gateway using payload aligned timing. */
#define DMRGO_CONSTANTS_GATEWAY_LINEI 16776898
/* Go: constants.GatewayMSI. GatewayMSI (MSI) is the gateway address for Call Diversion to an MS. */
#define DMRGO_CONSTANTS_GATEWAY_MSI 16776903
/* Go: constants.GatewayPABXDI. GatewayPABXDI (PABXDI) is the gateway address for services to the PABX using payload offset timing. */
#define DMRGO_CONSTANTS_GATEWAY_PABXDI 16776913
/* Go: constants.GatewayPABXI. GatewayPABXI (PABXI) is the gateway address for services to the PABX using payload aligned timing. */
#define DMRGO_CONSTANTS_GATEWAY_PABXI 16776897
/* Go: constants.GatewayPSTNDI. GatewayPSTNDI (PSTNDI) is the gateway address for services to the PSTN using payload offset timing. */
#define DMRGO_CONSTANTS_GATEWAY_PSTNDI 16776912
/* Go: constants.GatewayPSTNI. GatewayPSTNI (PSTNI) is the gateway address for services to the PSTN using payload aligned timing. */
#define DMRGO_CONSTANTS_GATEWAY_PSTNI 16776896
/* Go: constants.GatewayREGI. GatewayREGI (REGI) is the address that identifies a registration service. */
#define DMRGO_CONSTANTS_GATEWAY_REGI 16776902
/* Go: constants.GatewaySDMI. GatewaySDMI (SDMI) is the address that identifies a UDT Short Data service. */
#define DMRGO_CONSTANTS_GATEWAY_SDMI 16776901
/* Go: constants.GatewaySTUNI. GatewaySTUNI (STUNI) is the MS Stun/Revive identifier. */
#define DMRGO_CONSTANTS_GATEWAY_STUNI 16776908
/* Go: constants.GatewaySUPLI. GatewaySUPLI (SUPLI) is the address that identifies a supplementary data service. */
#define DMRGO_CONSTANTS_GATEWAY_SUPLI 16776900
/* Go: constants.GatewayTATTSI. GatewayTATTSI (TATTSI) is the address that identifies the Talkgroup Subscription/Attachment Service. */
#define DMRGO_CONSTANTS_GATEWAY_TATTSI 16776919
/* Go: constants.GatewayTSI. GatewayTSI (TSI) is the address of the TS. */
#define DMRGO_CONSTANTS_GATEWAY_TSI 16776906
/* Go: constants.NCSBKRetry. NCSBKRetry is the recommended CSBK retry limit (N_CSBKRetry) for UU_V_Req. */
#define DMRGO_CONSTANTS_NCSBK_RETRY 1
/* Go: constants.NDefaultNW. NDefaultNW is NDefault_NW, the NRand_Wait value an MS uses at switch on (ETSI TS 102 361-4 Table A.6). */
#define DMRGO_CONSTANTS_N_DEFAULT_NW 5
/* Go: constants.NMaint. NMaint is N_Maint, the number of P_MAINT PDUs an MS transmits to clear down the payload channel (ETSI TS 102 361-4 Table A.6). */
#define DMRGO_CONSTANTS_N_MAINT 4
/* Go: constants.NMaxCh. NMaxCh is Nmax_Ch, the minimum number of channels in the Short Hunt List (ETSI TS 102 361-4 Table A.6). */
#define DMRGO_CONSTANTS_N_MAX_CH 50
/* Go: constants.NRandNE. NRandNE is NRand_NE, the number of random access attempts for an emergency priority service (ETSI TS 102 361-4 Table A.6). */
#define DMRGO_CONSTANTS_N_RAND_NE 10
/* Go: constants.NRandNR. NRandNR is NRand_NR, the number of random access attempts for a normal and high priority service (ETSI TS 102 361-4 Table A.6). */
#define DMRGO_CONSTANTS_N_RAND_NR 6
/* Go: constants.NRetryLimit. NRetryLimit is the recommended maximum Data Air Interface Retry Limit (N_RtryLmt): the number of times the DLL transmits and attempts to receive the confirmed data response from the target MS. */
#define DMRGO_CONSTANTS_N_RETRY_LIMIT 8
/* Go: constants.NSysErrDefault. NSysErrDefault is the default NSYSerr, the number of C_SYScodes received that differ from the verified value. */
#define DMRGO_CONSTANTS_N_SYS_ERR_DEFAULT 2
/* Go: constants.NoLeader. NoLeader is the time an MS monitors the channel for wide area timing information after power up or a channel change, before it transmits a request (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_NO_LEADER INT64_C(270000000000)
/* Go: constants.SyncAge. SyncAge is the time wide area timing sync information is valid before the MS requires updated sync information (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_SYNC_AGE INT64_C(600000000000)
/* Go: constants.SyncAgeIncrement. SyncAgeIncrement is the DMRGO_CONSTANTS_SYNC_AGE increment (SAIncr) (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_SYNC_AGE_INCREMENT 500000000
/* Go: constants.SyncAgeWarning. SyncAgeWarning is the time an MS goes without updated sync information before it requests updated sync information (2*DMRGO_CONSTANTS_BEACON_INTERVAL) (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_SYNC_AGE_WARNING INT64_C(540000000000)
/* Go: constants.TALSDefault. TALSDefault is the default T_ALS, the Ambient Listening Service timer for normal priority calls. */
#define DMRGO_CONSTANTS_TALS_DEFAULT INT64_C(60000000000)
/* Go: constants.TALSEDefault. TALSEDefault is the default T_ALS_E, the Ambient Listening Service timer for emergency priority calls. */
#define DMRGO_CONSTANTS_TALSE_DEFAULT INT64_C(300000000000)
/* Go: constants.TALSRequestLifeSpanDefault. TALSRequestLifeSpanDefault is the default T_ALS_REQUEST_LIFE_SPAN, the maximum delay between C_AHOY and the subsequent C_GRANT before the called MS cancels the ALS request. */
#define DMRGO_CONSTANTS_TALS_REQUEST_LIFE_SPAN_DEFAULT INT64_C(5000000000)
/* Go: constants.TALSRetransmitDelayDefault. TALSRetransmitDelayDefault is the default T_ALS_RETRANSMIT_DELAY, the minimum delay before an ALS target MS re-keys after the ALS initiating party interrupts it. */
#define DMRGO_CONSTANTS_TALS_RETRANSMIT_DELAY_DEFAULT 1000000000
/* Go: constants.TAckWait. TAckWait is the recommended ACKWait timer (T_AckWait) for UU_Ans_Rsp. */
#define DMRGO_CONSTANTS_T_ACK_WAIT 360000000
/* Go: constants.TAckWaitSimulcast. TAckWaitSimulcast is the recommended minimum T_AckWait for simulcast systems (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_T_ACK_WAIT_SIMULCAST 2000000000
/* Go: constants.TAnswerCallDefault. TAnswerCallDefault is the default T_AnswerCall, the timeout for a called MS after it receives AHOY for FOACSU. */
#define DMRGO_CONSTANTS_T_ANSWER_CALL_DEFAULT INT64_C(15000000000)
/* Go: constants.TAwakeDefault. TAwakeDefault is the default T_Awake, the time an MS stays awake after receiving a PDU. */
#define DMRGO_CONSTANTS_T_AWAKE_DEFAULT 1000000000
/* Go: constants.TBSChanAuthRspCSBKMulti. TBSChanAuthRspCSBKMulti is the recommended T_BS_ChanAuthRsp for CSBK or data, multi-site (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_TBS_CHAN_AUTH_RSP_CSBK_MULTI 1140000000
/* Go: constants.TBSChanAuthRspCSBKSingle. TBSChanAuthRspCSBKSingle is the recommended T_BS_ChanAuthRsp for CSBK or data, single site (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_TBS_CHAN_AUTH_RSP_CSBK_SINGLE 900000000
/* Go: constants.TBSChanAuthRspVoice. TBSChanAuthRspVoice is the recommended Channel Authorization Response timer (T_BS_ChanAuthRsp) for voice, single site and multi-site (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_TBS_CHAN_AUTH_RSP_VOICE 720000000
/* Go: constants.TBSChanAuthSel. TBSChanAuthSel is the recommended Channel Authorization Selection timer (T_BS_ChanAuthSel), multi-site deployments only (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_TBS_CHAN_AUTH_SEL 240000000
/* Go: constants.TBSInactiveDefault. TBSInactiveDefault is the default T_BS_Inactive, the timer to hibernate if there is no inbound activity on an unregulated TSCC. */
#define DMRGO_CONSTANTS_TBS_INACTIVE_DEFAULT INT64_C(60000000000)
/* Go: constants.TCallHang. TCallHang is the default call hang time (T_CallHt). */
#define DMRGO_CONSTANTS_T_CALL_HANG INT64_C(3000000000)
/* Go: constants.TDHangtimeDefault. TDHangtimeDefault is the default TD_Hangtime, the payload data hangtime timer. */
#define DMRGO_CONSTANTS_TD_HANGTIME_DEFAULT INT64_C(4000000000)
/* Go: constants.TDInactiveDefault. TDInactiveDefault is the default TD_Inactive, the payload data inactivity timer. */
#define DMRGO_CONSTANTS_TD_INACTIVE_DEFAULT INT64_C(5000000000)
/* Go: constants.TDItemDefault. TDItemDefault is the default TD_Item, the payload packet data maximum item timer. */
#define DMRGO_CONSTANTS_TD_ITEM_DEFAULT INT64_C(30000000000)
/* Go: constants.TDataHangtime. TDataHangtime is the recommended Data Hangtime (T_DataHngtime), 3 traffic bursts: the time the BS transmits TD_LC PDUs to reserve the channel for a confirmed data response. */
#define DMRGO_CONSTANTS_T_DATA_HANGTIME 180000000
/* Go: constants.TDataTxLimit. TDataTxLimit is the recommended maximum Data Transmission Limit (T_DataTxLmt): the time an MS attempts to transmit an unconfirmed data message, or to transmit a confirmed data message and receive a reply. */
#define DMRGO_CONSTANTS_T_DATA_TX_LIMIT INT64_C(60000000000)
/* Go: constants.TDenRegDefault. TDenRegDefault is the default T_DENREG, the denied registration lifetime. */
#define DMRGO_CONSTANTS_T_DEN_REG_DEFAULT INT64_C(60000000000)
/* Go: constants.TDeregDefault. TDeregDefault is the default T_dereg, the timer to de-register before abandon. */
#define DMRGO_CONSTANTS_T_DEREG_DEFAULT 500000000
/* Go: constants.TEmergTimerDefault. TEmergTimerDefault is the default emergency call timer (T_EMERG_TIMER), token 24. */
#define DMRGO_CONSTANTS_T_EMERG_TIMER_DEFAULT INT64_C(120000000000)
/* Go: constants.TEmergTimerMax. TEmergTimerMax is the longest finite T_EMERG_TIMER, token 510 (ETSI TS 102 361-4 Table A.2). */
#define DMRGO_CONSTANTS_T_EMERG_TIMER_MAX INT64_C(138900000000000)
/* Go: constants.THoldoffMax. THoldoffMax is the recommended maximum Random Holdoff Time (T_Holdoff) for unconfirmed and confirmed data. */
#define DMRGO_CONSTANTS_T_HOLDOFF_MAX 2000000000
/* Go: constants.TMSChanAuth. TMSChanAuth is the recommended Channel Authorization timer (T_MS_ChanAuth) for single site deployments (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_TMS_CHAN_AUTH 180000000
/* Go: constants.TMSChanAuthMultiSite. TMSChanAuthMultiSite is the recommended T_MS_ChanAuth for multi-site deployments (ETSI TS 102 361-2 clause A.1). */
#define DMRGO_CONSTANTS_TMS_CHAN_AUTH_MULTI_SITE 360000000
/* Go: constants.TMSLineTimerMax. TMSLineTimerMax is the longest finite MS to line call timer (T_MS-LINE_TIMER), token 4094 (ETSI TS 102 361-4 Table A.5). */
#define DMRGO_CONSTANTS_TMS_LINE_TIMER_MAX INT64_C(238560000000000)
/* Go: constants.TMSMSTimerMax. TMSMSTimerMax is the longest finite MS to MS call timer (T_MS-MS_TIMER), token 4094 (ETSI TS 102 361-4 Table A.4). */
#define DMRGO_CONSTANTS_TMS_MS_TIMER_MAX INT64_C(238560000000000)
/* Go: constants.TNPTimerDefault. TNPTimerDefault is the default TNP_Timer, the timeout for a calling MS waiting for a call that does not require a payload channel. */
#define DMRGO_CONSTANTS_TNP_TIMER_DEFAULT INT64_C(5000000000)
/* Go: constants.TNoSignalDefault. TNoSignalDefault is the default T_Nosig, the timeout for entering hunting procedures if no TSCC is received. */
#define DMRGO_CONSTANTS_T_NO_SIGNAL_DEFAULT INT64_C(5000000000)
/* Go: constants.TPTimerDefault. TPTimerDefault is the default TP_Timer, the timeout for a calling MS waiting for a call that requires a payload channel. */
#define DMRGO_CONSTANTS_TP_TIMER_DEFAULT INT64_C(10000000000)
/* Go: constants.TPacketTimerDefault. TPacketTimerDefault is the default packet data call timer (T_PACKET_TIMER), token 6. */
#define DMRGO_CONSTANTS_T_PACKET_TIMER_DEFAULT INT64_C(10000000000)
/* Go: constants.TPacketTimerMax. TPacketTimerMax is the longest finite T_PACKET_TIMER, token 30 (ETSI TS 102 361-4 Table A.3). */
#define DMRGO_CONSTANTS_T_PACKET_TIMER_MAX INT64_C(2100000000000)
/* Go: constants.TPendingDefault. TPendingDefault is the default T_Pending, the timeout for a called MS after it receives AHOY for OACSU. */
#define DMRGO_CONSTANTS_T_PENDING_DEFAULT INT64_C(5000000000)
/* Go: constants.TRCTimer. TRCTimer is the recommended T_RCtimer: the time an MS waits for the target MS of a Tier 2 RC Command to end its transmission before it retries the command. */
#define DMRGO_CONSTANTS_TRC_TIMER 600000000
/* Go: constants.TRandTCDefault. TRandTCDefault is the default Trand_TC, the timeout for an MS attempting random access. */
#define DMRGO_CONSTANTS_T_RAND_TC_DEFAULT INT64_C(10000000000)
/* Go: constants.TResponseWait. TResponseWait is the recommended Confirmed Data Response Wait Limit (T_RspnsWait): the time an MS waits to receive the confirmed header packet data response. */
#define DMRGO_CONSTANTS_T_RESPONSE_WAIT 180000000
/* Go: constants.TResponseWaitSimulcast. TResponseWaitSimulcast is the recommended minimum T_RspnsWait for simulcast systems (ETSI TS 102 361-3 clause A.1). */
#define DMRGO_CONSTANTS_T_RESPONSE_WAIT_SIMULCAST 2000000000
/* Go: constants.TTO. TTO is the transmit timeout timer (T_TO) for DMR Tier I, a fixed value. */
#define DMRGO_CONSTANTS_TTO INT64_C(180000000000)
/* Go: constants.TTOMax. TTOMax is the maximum T_TO for DMR Tier II and Tier III, where the MS designer chooses a value from 0 to 180 s. */
#define DMRGO_CONSTANTS_TTO_MAX INT64_C(180000000000)
/* Go: constants.TVHangtimeDefault. TVHangtimeDefault is the default TV_Hangtime, the payload voice hangtime timer. */
#define DMRGO_CONSTANTS_TV_HANGTIME_DEFAULT INT64_C(4000000000)
/* Go: constants.TVInactiveDefault. TVInactiveDefault is the default TV_Inactive, the payload voice inactivity timer. */
#define DMRGO_CONSTANTS_TV_INACTIVE_DEFAULT INT64_C(5000000000)
/* Go: constants.TVItemDefault. TVItemDefault is the default TV_Item, the payload voice maximum item timer. */
#define DMRGO_CONSTANTS_TV_ITEM_DEFAULT INT64_C(30000000000)
/* Go: constants.VoteBlockDefault. VoteBlockDefault is the default VOTE_BLK, the number of TDMA frames for which the TSCC withdraws random access activity after a Vote Now Advice. */
#define DMRGO_CONSTANTS_VOTE_BLOCK_DEFAULT 3
/* Go: csbk.AllSiteColorCode. AllSiteColorCode is the "All Site" color code of the CT_CSBKs (ETSI TS 102 361-2 clause 6.2.2.2). */
#define DMRGO_CSBK_ALL_SITE_COLOR_CODE ((dmrgo_enums_color_code_t)15)
/* Go: csbk.BurstInterval. BurstInterval is the time between two bursts of one logical channel: one TDMA frame of two 30 ms slots. */
#define DMRGO_CSBK_BURST_INTERVAL 60000000
/* Go: csbk.DefaultHoldoffMax. DefaultHoldoffMax is the upper end of the random holdoff T_Holdoff, the recommended maximum for non-time critical CSBK ACK/NACK messages (ETSI TS 102 361-1 clause F.1). */
#define DMRGO_CSBK_DEFAULT_HOLDOFF_MAX 1000000000
/* Go: csbk.DefaultIdleSearch. DefaultIdleSearch is the idle search timer T_IdleSrch, the most that ETSI TS 102 361-1 clause F.1 allows. */
#define DMRGO_CSBK_DEFAULT_IDLE_SEARCH 540000000
/* Go: csbk.DefaultMotorolaAckWait. DefaultMotorolaAckWait is T_AckWait for the Motorola radio check and call alert. */
#define DMRGO_CSBK_DEFAULT_MOTOROLA_ACK_WAIT 2000000000
/* Go: csbk.DefaultSyncWait. DefaultSyncWait is the Sync WU timer T_SyncWu, the most that ETSI TS 102 361-1 clause F.1 allows. */
#define DMRGO_CSBK_DEFAULT_SYNC_WAIT 360000000
/* Go: csbk.DefaultWakeups. DefaultWakeups is the wakeup threshold N_Wakeup that ETSI TS 102 361-1 clause F.2 suggests. */
#define DMRGO_CSBK_DEFAULT_WAKEUPS 2
/* Go: csbk.MaxDynamicID. MaxDynamicID is the largest dynamic identifier, the leader preference High (ETSI TS 102 361-2 clause 7.2.9). */
#define DMRGO_CSBK_MAX_DYNAMIC_ID 3
/* Go: csbk.MaxOutputs. MaxOutputs is the most outputs that one call of a machine method appends. */
#define DMRGO_CSBK_MAX_OUTPUTS 2
/* Go: csbk.MaxPreambles. MaxPreambles is the most Pre_CSBKs before a CSBK: the CSBK Blocks to Follow of the first one counts them and the CSBK in 8 bits. */
#define DMRGO_CSBK_MAX_PREAMBLES 255
/* Go: csbk.MaxRetries. MaxRetries is the most retries of a request, and the most attempts of a wakeup. */
#define DMRGO_CSBK_MAX_RETRIES 255
/* Go: csbk.MaxTimingID. MaxTimingID is the largest 20-bit MS identifier of a wide area timing identifier (ETSI TS 102 361-2 clause 7.2.10). */
#define DMRGO_CSBK_MAX_TIMING_ID 1048575
/* Go: csbk.OACSUDeny. OACSUDeny answers UU_Ans_Rsp with Deny. */
#define DMRGO_CSBK_OACSU_DENY ((dmrgo_csbk_oacsu_answer_t)1)
/* Go: csbk.OACSUNotSupported. OACSUNotSupported answers the Feature Not Supported NACK_Rsp, unless dmrgo_csbk_responder_config_t.no_fns is set. */
#define DMRGO_CSBK_OACSU_NOT_SUPPORTED ((dmrgo_csbk_oacsu_answer_t)2)
/* Go: csbk.OACSUProceed. OACSUProceed answers UU_Ans_Rsp with Proceed. */
#define DMRGO_CSBK_OACSU_PROCEED ((dmrgo_csbk_oacsu_answer_t)0)
/* Go: csbk.OutputAnnounced. OutputAnnounced is the first Pre_CSBK of a transfer. */
#define DMRGO_CSBK_OUTPUT_ANNOUNCED ((dmrgo_csbk_output_kind_t)4)
/* Go: csbk.OutputBurst. OutputBurst is a burst to send at Due. */
#define DMRGO_CSBK_OUTPUT_BURST ((dmrgo_csbk_output_kind_t)1)
/* Go: csbk.OutputDone. OutputDone is the end of a request or a wakeup, with its Result, or a response of a Responder that the channel denied. */
#define DMRGO_CSBK_OUTPUT_DONE ((dmrgo_csbk_output_kind_t)2)
/* Go: csbk.OutputExpired. OutputExpired is an announced transfer that did not come by Until. */
#define DMRGO_CSBK_OUTPUT_EXPIRED ((dmrgo_csbk_output_kind_t)6)
/* Go: csbk.OutputJoined. OutputJoined is the CSBK or data header that the Pre_CSBKs announced. */
#define DMRGO_CSBK_OUTPUT_JOINED ((dmrgo_csbk_output_kind_t)5)
/* Go: csbk.OutputRequest. OutputRequest is a request for the radio of a Responder, which it answers. */
#define DMRGO_CSBK_OUTPUT_REQUEST ((dmrgo_csbk_output_kind_t)3)
/* Go: csbk.OutputTiming. OutputTiming reports that the caller of a Timing must set the channel slot timing from the CT_CSBK in CSBK, which it passed at Due (ETSI TS 102 361-2 clause 6.2.2.3). */
#define DMRGO_CSBK_OUTPUT_TIMING ((dmrgo_csbk_output_kind_t)7)
/* Go: csbk.PreamblesAnnounced. PreamblesAnnounced waits for the CSBK or data that Pre_CSBKs announced. */
#define DMRGO_CSBK_PREAMBLES_ANNOUNCED ((dmrgo_csbk_preambles_state_t)1)
/* Go: csbk.PreamblesIdle. PreamblesIdle follows no announced transfer. */
#define DMRGO_CSBK_PREAMBLES_IDLE ((dmrgo_csbk_preambles_state_t)0)
/* Go: csbk.ReasonNotSupported. ReasonNotSupported is the reason code of the Feature Not Supported NACK_Rsp: the MS does not support the service or feature (ETSI TS 102 361-2 Table 7.13). */
#define DMRGO_CSBK_REASON_NOT_SUPPORTED ((dmrgo_csbk_reason_t)33)
/* Go: csbk.RequesterAccess. RequesterAccess waits for an idle channel or the end of a holdoff. */
#define DMRGO_CSBK_REQUESTER_ACCESS ((dmrgo_csbk_requester_state_t)1)
/* Go: csbk.RequesterIdle. RequesterIdle runs no request. */
#define DMRGO_CSBK_REQUESTER_IDLE ((dmrgo_csbk_requester_state_t)0)
/* Go: csbk.RequesterSending. RequesterSending sends the Pre_CSBKs and the request. */
#define DMRGO_CSBK_REQUESTER_SENDING ((dmrgo_csbk_requester_state_t)2)
/* Go: csbk.RequesterWaiting. RequesterWaiting waits T_AckWait for the answer. */
#define DMRGO_CSBK_REQUESTER_WAITING ((dmrgo_csbk_requester_state_t)3)
/* Go: csbk.ResponderAccess. ResponderAccess waits for an idle channel or the end of a holdoff before it sends the answer. */
#define DMRGO_CSBK_RESPONDER_ACCESS ((dmrgo_csbk_responder_state_t)1)
/* Go: csbk.ResponderIdle. ResponderIdle has no answer to send. */
#define DMRGO_CSBK_RESPONDER_IDLE ((dmrgo_csbk_responder_state_t)0)
/* Go: csbk.ResponderSending. ResponderSending sends the answer at the next Tick. */
#define DMRGO_CSBK_RESPONDER_SENDING ((dmrgo_csbk_responder_state_t)2)
/* Go: csbk.ResultAnswered. ResultAnswered is an answer that accepts: UU_Ans_Rsp with Proceed, a radio check answer, a call alert acknowledgement, an answer that the Match of a custom request accepts, or, for a wakeup, the BS outbound. */
#define DMRGO_CSBK_RESULT_ANSWERED ((dmrgo_csbk_result_t)1)
/* Go: csbk.ResultCanceled. ResultCanceled is a request that Cancel ended. */
#define DMRGO_CSBK_RESULT_CANCELED ((dmrgo_csbk_result_t)6)
/* Go: csbk.ResultDenied. ResultDenied is a channel that stayed busy for T_IdleSrch, for a time critical request or a response. */
#define DMRGO_CSBK_RESULT_DENIED ((dmrgo_csbk_result_t)5)
/* Go: csbk.ResultNACK. ResultNACK is a NACK_Rsp for the request. */
#define DMRGO_CSBK_RESULT_NACK ((dmrgo_csbk_result_t)3)
/* Go: csbk.ResultNoAnswer. ResultNoAnswer is no answer after the last retry, or no BS outbound after the last wakeup. */
#define DMRGO_CSBK_RESULT_NO_ANSWER ((dmrgo_csbk_result_t)4)
/* Go: csbk.ResultRefused. ResultRefused is UU_Ans_Rsp with Deny. */
#define DMRGO_CSBK_RESULT_REFUSED ((dmrgo_csbk_result_t)2)
/* Go: csbk.ServiceCallAlert. ServiceCallAlert is the Motorola call alert (FID 0x10, opcode 0x1F), answered by the call alert acknowledgement (opcode 0x20). */
#define DMRGO_CSBK_SERVICE_CALL_ALERT ((dmrgo_csbk_service_t)3)
/* Go: csbk.ServiceCustom. ServiceCustom is a request that dmrgo_csbk_requester_request sends with a Match. */
#define DMRGO_CSBK_SERVICE_CUSTOM ((dmrgo_csbk_service_t)0)
/* Go: csbk.ServiceOACSU. ServiceOACSU is the presence check of an OACSU individual call: UU_V_Req, answered by UU_Ans_Rsp (ETSI TS 102 361-2 clause 5.2.2). */
#define DMRGO_CSBK_SERVICE_OACSU ((dmrgo_csbk_service_t)1)
/* Go: csbk.ServiceRadioCheck. ServiceRadioCheck is the Motorola radio check (FID 0x10, opcode 0x24), answered by a radio check with octet 3 set to 0x80. */
#define DMRGO_CSBK_SERVICE_RADIO_CHECK ((dmrgo_csbk_service_t)2)
/* Go: csbk.ServiceTiming. ServiceTiming is the TDMA direct mode wide area timing of a Timing, with CT_CSBK (ETSI TS 102 361-2 clause 6.2). */
#define DMRGO_CSBK_SERVICE_TIMING ((dmrgo_csbk_service_t)6)
/* Go: csbk.ServiceUnsupported. ServiceUnsupported is a standard CSBK that addresses the radio and that the Responder does not support. */
#define DMRGO_CSBK_SERVICE_UNSUPPORTED ((dmrgo_csbk_service_t)4)
/* Go: csbk.ServiceWakeup. ServiceWakeup is the BS outbound activation BS_Dwn_Act (ETSI TS 102 361-1 clause 5.2.2.2.4). */
#define DMRGO_CSBK_SERVICE_WAKEUP ((dmrgo_csbk_service_t)5)
/* Go: csbk.TimingLeader. TimingLeader is the wide area timing leader and sets the slot timing. */
#define DMRGO_CSBK_TIMING_LEADER ((dmrgo_csbk_timing_state_t)3)
/* Go: csbk.TimingLeaderAndTimingKnown. TimingLeaderAndTimingKnown follows the leader and its slot timing. */
#define DMRGO_CSBK_TIMING_LEADER_AND_TIMING_KNOWN ((dmrgo_csbk_timing_state_t)2)
/* Go: csbk.TimingLeaderAndTimingUnknown. TimingLeaderAndTimingUnknown has neither the channel slot timing nor the leader: after Join, and when no leader was ever found. */
#define DMRGO_CSBK_TIMING_LEADER_AND_TIMING_UNKNOWN ((dmrgo_csbk_timing_state_t)0)
/* Go: csbk.TimingLeaderUnknown. TimingLeaderUnknown had the timing, but DMRGO_CONSTANTS_SYNC_AGE ran out, and has no leader. */
#define DMRGO_CSBK_TIMING_LEADER_UNKNOWN ((dmrgo_csbk_timing_state_t)1)
/* Go: csbk.WakeupIdle. WakeupIdle runs no wakeup. */
#define DMRGO_CSBK_WAKEUP_IDLE ((dmrgo_csbk_wakeup_state_t)0)
/* Go: csbk.WakeupSending. WakeupSending sends a BS_Dwn_Act at the next Tick. */
#define DMRGO_CSBK_WAKEUP_SENDING ((dmrgo_csbk_wakeup_state_t)1)
/* Go: csbk.WakeupWaiting. WakeupWaiting waits T_SyncWu for the BS outbound. */
#define DMRGO_CSBK_WAKEUP_WAITING ((dmrgo_csbk_wakeup_state_t)2)
/* Go: data.DefaultHang. DefaultHang is the time without a burst after which a Receiver ends a data call. */
#define DMRGO_DATA_DEFAULT_HANG 360000000
/* Go: data.DefaultIdleSearch. DefaultIdleSearch is the time that a polite Sender waits for an idle channel before it holds off, the largest T_IdleSrch (ETSI TS 102 361-1 clause F.1). */
#define DMRGO_DATA_DEFAULT_IDLE_SEARCH 540000000
/* Go: data.DefaultLost. DefaultLost is the time without a burst, while a packet waits for blocks, after which a Receiver counts the blocks of the slots that passed as lost: one and a half slot periods. */
#define DMRGO_DATA_DEFAULT_LOST 90000000
/* Go: data.DefaultMaxFragment. DefaultMaxFragment is the largest payload of one packet that a Receiver takes when dmrgo_data_receiver_config_t.max_fragment is 0, n_DFragMax (ETSI TS 102 361-1 clause F.2). */
#define DMRGO_DATA_DEFAULT_MAX_FRAGMENT 1500
/* Go: data.DefaultMaxMessage. DefaultMaxMessage is the largest message that a Receiver joins from fragments when dmrgo_data_receiver_config_t.max_message is 0. */
#define DMRGO_DATA_DEFAULT_MAX_MESSAGE 1500
/* Go: data.DefaultPeers. DefaultPeers is the number of links whose sequence number a Receiver or a Sender keeps. */
#define DMRGO_DATA_DEFAULT_PEERS 8
/* Go: data.DefaultPreambles. DefaultPreambles is the number of preamble CSBKs before a header that radios send, such as the AnyTone D890UV firmware before its own SMS. */
#define DMRGO_DATA_DEFAULT_PREAMBLES 5
/* Go: data.EndIdle. EndIdle is an idle burst after the last packet. */
#define DMRGO_DATA_END_IDLE ((dmrgo_data_end_reason_t)2)
/* Go: data.EndQuiet. EndQuiet is a time of dmrgo_data_receiver_config_t.hang without a burst. */
#define DMRGO_DATA_END_QUIET ((dmrgo_data_end_reason_t)1)
/* Go: data.EndSuperseded. EndSuperseded is a header or preamble of other parties. */
#define DMRGO_DATA_END_SUPERSEDED ((dmrgo_data_end_reason_t)6)
/* Go: data.EndSyncLost. EndSyncLost is a transport that lost the signal: dmrgo_layer2_hint_t.sync_lost or dmrgo_data_receiver_lost. */
#define DMRGO_DATA_END_SYNC_LOST ((dmrgo_data_end_reason_t)4)
/* Go: data.EndTransport. EndTransport is the end flag of the transport, dmrgo_layer2_hint_t.end DMRGO_LAYER2_END_STRONG. */
#define DMRGO_DATA_END_TRANSPORT ((dmrgo_data_end_reason_t)5)
/* Go: data.EndVoice. EndVoice is a voice burst or a Voice LC Header. */
#define DMRGO_DATA_END_VOICE ((dmrgo_data_end_reason_t)3)
/* Go: data.EventCallEnd. EventCallEnd ends a data call. */
#define DMRGO_DATA_EVENT_CALL_END ((dmrgo_data_event_kind_t)5)
/* Go: data.EventCallStart. EventCallStart starts a data call, at a preamble CSBK or the first header. */
#define DMRGO_DATA_EVENT_CALL_START ((dmrgo_data_event_kind_t)1)
/* Go: data.EventDelivered. EventDelivered is a complete packet. */
#define DMRGO_DATA_EVENT_DELIVERED ((dmrgo_data_event_kind_t)2)
/* Go: data.EventReassembled. EventReassembled is a confirmed message joined from its fragments, after the DMRGO_DATA_EVENT_DELIVERED of its last fragment. */
#define DMRGO_DATA_EVENT_REASSEMBLED ((dmrgo_data_event_kind_t)6)
/* Go: data.EventRespond. EventRespond is a response burst to send. */
#define DMRGO_DATA_EVENT_RESPOND ((dmrgo_data_event_kind_t)4)
/* Go: data.EventResponse. EventResponse is a response packet heard on the channel. */
#define DMRGO_DATA_EVENT_RESPONSE ((dmrgo_data_event_kind_t)3)
/* Go: data.MaxBlocks. MaxBlocks is the most data blocks of one packet, the 7 bits of the Blocks To Follow element (ETSI TS 102 361-1 clause 9.3.21). */
#define DMRGO_DATA_MAX_BLOCKS 127
/* Go: data.MaxEvents. MaxEvents is the most events that one call of a Receiver method appends. */
#define DMRGO_DATA_MAX_EVENTS 14
/* Go: data.MaxMessage. MaxMessage is the most octets of dmrgo_data_receiver_config_t.max_fragment and dmrgo_data_receiver_config_t.max_message. */
#define DMRGO_DATA_MAX_MESSAGE 65535
/* Go: data.MaxOutputs. MaxOutputs is the most outputs that one call of a Sender method appends: one burst and the end of each message of a window. */
#define DMRGO_DATA_MAX_OUTPUTS 9
/* Go: data.MaxPeers. MaxPeers is the most links in the table of sequence numbers. */
#define DMRGO_DATA_MAX_PEERS 64
/* Go: data.MaxPreambles. MaxPreambles is the most preamble CSBKs before a header. */
#define DMRGO_DATA_MAX_PREAMBLES 64
/* Go: data.MaxRetries. MaxRetries is the most transmissions of one message. */
#define DMRGO_DATA_MAX_RETRIES 64
/* Go: data.MaxWindow. MaxWindow is the most C_HEAD packets of one sliding window: 7 that do not request a response and the 8th that does (ETSI TS 102 361-3 clause 5.4.4). */
#define DMRGO_DATA_MAX_WINDOW 8
/* Go: data.OutputBurst. OutputBurst is a burst to send. */
#define DMRGO_DATA_OUTPUT_BURST ((dmrgo_data_output_kind_t)1)
/* Go: data.OutputDone. OutputDone is the end of the message. */
#define DMRGO_DATA_OUTPUT_DONE ((dmrgo_data_output_kind_t)2)
/* Go: data.ResultCancelled. ResultCancelled is a message that Cancel ended. */
#define DMRGO_DATA_RESULT_CANCELLED ((dmrgo_data_result_t)6)
/* Go: data.ResultDelivered. ResultDelivered is a confirmed message that got an ACK. */
#define DMRGO_DATA_RESULT_DELIVERED ((dmrgo_data_result_t)2)
/* Go: data.ResultRefused. ResultRefused is a confirmed message that got a NACK that a resend cannot fix: illegal format, memory full, undeliverable, invalid user, or FSN out of sequence. */
#define DMRGO_DATA_RESULT_REFUSED ((dmrgo_data_result_t)3)
/* Go: data.ResultRetryLimit. ResultRetryLimit is a confirmed message that got no ACK in dmrgo_data_sender_config_t.retries transmissions. */
#define DMRGO_DATA_RESULT_RETRY_LIMIT ((dmrgo_data_result_t)4)
/* Go: data.ResultSent. ResultSent is an unconfirmed message whose last burst was sent. */
#define DMRGO_DATA_RESULT_SENT ((dmrgo_data_result_t)1)
/* Go: data.ResultTimeLimit. ResultTimeLimit is a message that could not finish before dmrgo_data_sender_config_t.tx_limit. */
#define DMRGO_DATA_RESULT_TIME_LIMIT ((dmrgo_data_result_t)5)
/* Go: data.SenderHoldoff. SenderHoldoff waits for the random holdoff after a busy channel. */
#define DMRGO_DATA_SENDER_HOLDOFF ((dmrgo_data_sender_state_t)2)
/* Go: data.SenderIdle. SenderIdle has no message. */
#define DMRGO_DATA_SENDER_IDLE ((dmrgo_data_sender_state_t)0)
/* Go: data.SenderSending. SenderSending sends the bursts of a try, one per Tick. */
#define DMRGO_DATA_SENDER_SENDING ((dmrgo_data_sender_state_t)3)
/* Go: data.SenderWaitResponse. SenderWaitResponse waits for the response to a confirmed packet. */
#define DMRGO_DATA_SENDER_WAIT_RESPONSE ((dmrgo_data_sender_state_t)4)
/* Go: data.SenderWaiting. SenderWaiting waits for an idle channel. */
#define DMRGO_DATA_SENDER_WAITING ((dmrgo_data_sender_state_t)1)
/* Go: data.StateCall. StateCall has a data call, between packets. */
#define DMRGO_DATA_STATE_CALL ((dmrgo_data_state_t)1)
/* Go: data.StateIdle. StateIdle has no data call. */
#define DMRGO_DATA_STATE_IDLE ((dmrgo_data_state_t)0)
/* Go: data.StateReceiving. StateReceiving has a packet that waits for blocks. */
#define DMRGO_DATA_STATE_RECEIVING ((dmrgo_data_state_t)2)
/* Go: enums.AccessImpolite. AccessImpolite transmits whatever the activity on the channel. */
#define DMRGO_ENUMS_ACCESS_IMPOLITE ((dmrgo_enums_access_t)2)
/* Go: enums.AccessPoliteAll. AccessPoliteAll waits while the channel has any activity, DMR or other. */
#define DMRGO_ENUMS_ACCESS_POLITE_ALL ((dmrgo_enums_access_t)1)
/* Go: enums.AccessPoliteOwnCC. AccessPoliteOwnCC waits while the logical channel carries a transmission with the own color code. */
#define DMRGO_ENUMS_ACCESS_POLITE_OWN_C_C ((dmrgo_enums_access_t)0)
/* Go: enums.AckACK. C_ACK, the request is accepted */
#define DMRGO_ENUMS_ACK_ACK ((dmrgo_enums_ack_type_t)1)
/* Go: enums.AckNACK. C_NACK, the request is refused */
#define DMRGO_ENUMS_ACK_NACK ((dmrgo_enums_ack_type_t)0)
/* Go: enums.AckQACK. C_QACK, the request is queued */
#define DMRGO_ENUMS_ACK_QACK ((dmrgo_enums_ack_type_t)2)
/* Go: enums.AckReasonAuthResponseMS. authentication response of the MS */
#define DMRGO_ENUMS_ACK_REASON_AUTH_RESPONSE_MS ((dmrgo_enums_ack_reason_t)72)
/* Go: enums.AckReasonAuthResponseTS. authentication response of the TS */
#define DMRGO_ENUMS_ACK_REASON_AUTH_RESPONSE_TS ((dmrgo_enums_ack_reason_t)100)
/* Go: enums.AckReasonCallBack. CallBack */
#define DMRGO_ENUMS_ACK_REASON_CALL_BACK ((dmrgo_enums_ack_reason_t)69)
/* Go: enums.AckReasonCallCancelRefused. Call_Cancel_Refused */
#define DMRGO_ENUMS_ACK_REASON_CALL_CANCEL_REFUSED ((dmrgo_enums_ack_reason_t)41)
/* Go: enums.AckReasonCalledGroupNotAllowed. Called_Group_Not_Allowed */
#define DMRGO_ENUMS_ACK_REASON_CALLED_GROUP_NOT_ALLOWED ((dmrgo_enums_ack_reason_t)47)
/* Go: enums.AckReasonCalledPartyBusy. Called_Party_Busy */
#define DMRGO_ENUMS_ACK_REASON_CALLED_PARTY_BUSY ((dmrgo_enums_ack_reason_t)46)
/* Go: enums.AckReasonCustomRefused. Custom_Refused */
#define DMRGO_ENUMS_ACK_REASON_CUSTOM_REFUSED ((dmrgo_enums_ack_reason_t)21)
/* Go: enums.AckReasonDivCauseFail. Div_Cause_Fail */
#define DMRGO_ENUMS_ACK_REASON_DIV_CAUSE_FAIL ((dmrgo_enums_ack_reason_t)38)
/* Go: enums.AckReasonDuplexCongestion. Duplex_Congestion */
#define DMRGO_ENUMS_ACK_REASON_DUPLEX_CONGESTION ((dmrgo_enums_ack_reason_t)49)
/* Go: enums.AckReasonEquipBusyRefused. EquipBusy_Refused */
#define DMRGO_ENUMS_ACK_REASON_EQUIP_BUSY_REFUSED ((dmrgo_enums_ack_reason_t)19)
/* Go: enums.AckReasonIPConnectionFailed. IP_Connection_failed */
#define DMRGO_ENUMS_ACK_REASON_IP_CONNECTION_FAILED ((dmrgo_enums_ack_reason_t)44)
/* Go: enums.AckReasonLineNotSupported. LineNot_Supported */
#define DMRGO_ENUMS_ACK_REASON_LINE_NOT_SUPPORTED ((dmrgo_enums_ack_reason_t)17)
/* Go: enums.AckReasonMSAccepted. MS_Accepted */
#define DMRGO_ENUMS_ACK_REASON_MS_ACCEPTED ((dmrgo_enums_ack_reason_t)68)
/* Go: enums.AckReasonMSAlerting. MS_ALERTING */
#define DMRGO_ENUMS_ACK_REASON_MS_ALERTING ((dmrgo_enums_ack_reason_t)70)
/* Go: enums.AckReasonMSAwayRefused. MSaway_Refused */
#define DMRGO_ENUMS_ACK_REASON_MS_AWAY_REFUSED ((dmrgo_enums_ack_reason_t)37)
/* Go: enums.AckReasonMSDuplexNotSupported. MS_Duplex_Not_Supported */
#define DMRGO_ENUMS_ACK_REASON_MS_DUPLEX_NOT_SUPPORTED ((dmrgo_enums_ack_reason_t)22)
/* Go: enums.AckReasonMSNotRegistered. MS_Not_Registered */
#define DMRGO_ENUMS_ACK_REASON_MS_NOT_REGISTERED ((dmrgo_enums_ack_reason_t)45)
/* Go: enums.AckReasonMSNotSupported. MSNot_Supported */
#define DMRGO_ENUMS_ACK_REASON_MS_NOT_SUPPORTED ((dmrgo_enums_ack_reason_t)0)
/* Go: enums.AckReasonMessageAccepted. Message_Accepted */
#define DMRGO_ENUMS_ACK_REASON_MESSAGE_ACCEPTED ((dmrgo_enums_ack_reason_t)96)
/* Go: enums.AckReasonNoregMSAwayRefused. NoregMSaway_Refused */
#define DMRGO_ENUMS_ACK_REASON_NOREG_MS_AWAY_REFUSED ((dmrgo_enums_ack_reason_t)36)
/* Go: enums.AckReasonNotSupported. Not_Supported */
#define DMRGO_ENUMS_ACK_REASON_NOT_SUPPORTED ((dmrgo_enums_ack_reason_t)32)
/* Go: enums.AckReasonPermUserRefused. Perm_User_Refused */
#define DMRGO_ENUMS_ACK_REASON_PERM_USER_REFUSED ((dmrgo_enums_ack_reason_t)33)
/* Go: enums.AckReasonQueuedForBusy. Queued-for-busy, the called party is in another call */
#define DMRGO_ENUMS_ACK_REASON_QUEUED_FOR_BUSY ((dmrgo_enums_ack_reason_t)161)
/* Go: enums.AckReasonQueuedForResource. Queued-for-resource, such as a payload channel */
#define DMRGO_ENUMS_ACK_REASON_QUEUED_FOR_RESOURCE ((dmrgo_enums_ack_reason_t)160)
/* Go: enums.AckReasonRecipientRefused. Recipient_Refused */
#define DMRGO_ENUMS_ACK_REASON_RECIPIENT_REFUSED ((dmrgo_enums_ack_reason_t)20)
/* Go: enums.AckReasonRefusedUnknownMS. Refused_Reason_Unknown of the MS */
#define DMRGO_ENUMS_ACK_REASON_REFUSED_UNKNOWN_MS ((dmrgo_enums_ack_reason_t)31)
/* Go: enums.AckReasonRefusedUnknownTS. Refused_Reason_Unknown of the TS */
#define DMRGO_ENUMS_ACK_REASON_REFUSED_UNKNOWN_TS ((dmrgo_enums_ack_reason_t)63)
/* Go: enums.AckReasonRegAccepted. Reg_Accepted */
#define DMRGO_ENUMS_ACK_REASON_REG_ACCEPTED ((dmrgo_enums_ack_reason_t)98)
/* Go: enums.AckReasonRegDenied. Reg_Denied */
#define DMRGO_ENUMS_ACK_REASON_REG_DENIED ((dmrgo_enums_ack_reason_t)43)
/* Go: enums.AckReasonRegRefused. Reg_Refused */
#define DMRGO_ENUMS_ACK_REASON_REG_REFUSED ((dmrgo_enums_ack_reason_t)42)
/* Go: enums.AckReasonRegSubscription. Reg_Subscription/Attachment service */
#define DMRGO_ENUMS_ACK_REASON_REG_SUBSCRIPTION ((dmrgo_enums_ack_reason_t)101)
/* Go: enums.AckReasonStackFullRefused. StackFull_Refused */
#define DMRGO_ENUMS_ACK_REASON_STACK_FULL_REFUSED ((dmrgo_enums_ack_reason_t)18)
/* Go: enums.AckReasonStatusPollAcceptedMS. accepted for the status polling service */
#define DMRGO_ENUMS_ACK_REASON_STATUS_POLL_ACCEPTED_MS ((dmrgo_enums_ack_reason_t)71)
/* Go: enums.AckReasonStatusPollAcceptedTS. accepted for the status polling service */
#define DMRGO_ENUMS_ACK_REASON_STATUS_POLL_ACCEPTED_TS ((dmrgo_enums_ack_reason_t)99)
/* Go: enums.AckReasonStoreForward. Store_Forward */
#define DMRGO_ENUMS_ACK_REASON_STORE_FORWARD ((dmrgo_enums_ack_reason_t)97)
/* Go: enums.AckReasonSysBusyRefused. SYSbusy_Refused */
#define DMRGO_ENUMS_ACK_REASON_SYS_BUSY_REFUSED ((dmrgo_enums_ack_reason_t)39)
/* Go: enums.AckReasonSysNotReady. SYS_NotReady */
#define DMRGO_ENUMS_ACK_REASON_SYS_NOT_READY ((dmrgo_enums_ack_reason_t)40)
/* Go: enums.AckReasonTempUserRefused. Temp_User_Refused */
#define DMRGO_ENUMS_ACK_REASON_TEMP_USER_REFUSED ((dmrgo_enums_ack_reason_t)34)
/* Go: enums.AckReasonTransientSysRefused. Transient_Sys_Refused */
#define DMRGO_ENUMS_ACK_REASON_TRANSIENT_SYS_REFUSED ((dmrgo_enums_ack_reason_t)35)
/* Go: enums.AckReasonUDTUploadCRCError. CRC error in the UDT upload phase */
#define DMRGO_ENUMS_ACK_REASON_UDT_UPLOAD_CRC_ERROR ((dmrgo_enums_ack_reason_t)48)
/* Go: enums.AckReasonWait. Wait */
#define DMRGO_ENUMS_ACK_REASON_WAIT ((dmrgo_enums_ack_reason_t)224)
/* Go: enums.AckWACK. C_WACK, more signalling follows */
#define DMRGO_ENUMS_ACK_WACK ((dmrgo_enums_ack_type_t)3)
/* Go: enums.ActivityEmergencyGroupVoice. emergency group voice activity */
#define DMRGO_ENUMS_ACTIVITY_EMERGENCY_GROUP_VOICE ((dmrgo_enums_activity_id_t)12)
/* Go: enums.ActivityEmergencyIndividualVoice. emergency individual voice activity */
#define DMRGO_ENUMS_ACTIVITY_EMERGENCY_INDIVIDUAL_VOICE ((dmrgo_enums_activity_id_t)13)
/* Go: enums.ActivityGroupCSBK. group CSBK activity */
#define DMRGO_ENUMS_ACTIVITY_GROUP_CSBK ((dmrgo_enums_activity_id_t)2)
/* Go: enums.ActivityGroupData. group data activity */
#define DMRGO_ENUMS_ACTIVITY_GROUP_DATA ((dmrgo_enums_activity_id_t)11)
/* Go: enums.ActivityGroupVoice. group voice activity */
#define DMRGO_ENUMS_ACTIVITY_GROUP_VOICE ((dmrgo_enums_activity_id_t)8)
/* Go: enums.ActivityIndividualCSBK. individual CSBK activity */
#define DMRGO_ENUMS_ACTIVITY_INDIVIDUAL_CSBK ((dmrgo_enums_activity_id_t)3)
/* Go: enums.ActivityIndividualData. individual data activity */
#define DMRGO_ENUMS_ACTIVITY_INDIVIDUAL_DATA ((dmrgo_enums_activity_id_t)10)
/* Go: enums.ActivityIndividualVoice. individual voice activity */
#define DMRGO_ENUMS_ACTIVITY_INDIVIDUAL_VOICE ((dmrgo_enums_activity_id_t)9)
/* Go: enums.ActivityNoActivity. no activity */
#define DMRGO_ENUMS_ACTIVITY_NO_ACTIVITY ((dmrgo_enums_activity_id_t)0)
/* Go: enums.AnnouncementAdjacentSite. Adjacent_Site, adjacent site information */
#define DMRGO_ENUMS_ANNOUNCEMENT_ADJACENT_SITE ((dmrgo_enums_announcement_type_t)6)
/* Go: enums.AnnouncementAnnWDTSCC. Ann_WD_TSCC, announce or withdraw a TSCC */
#define DMRGO_ENUMS_ANNOUNCEMENT_ANN_WD_TSCC ((dmrgo_enums_announcement_type_t)0)
/* Go: enums.AnnouncementCallTimer. CallTimer_Parms, call timer parameters */
#define DMRGO_ENUMS_ANNOUNCEMENT_CALL_TIMER ((dmrgo_enums_announcement_type_t)1)
/* Go: enums.AnnouncementChanFreq. Chan_Freq, logical channel frequency */
#define DMRGO_ENUMS_ANNOUNCEMENT_CHAN_FREQ ((dmrgo_enums_announcement_type_t)5)
/* Go: enums.AnnouncementGenSiteParams. Gen_Site_Params, general site parameters */
#define DMRGO_ENUMS_ANNOUNCEMENT_GEN_SITE_PARAMS ((dmrgo_enums_announcement_type_t)7)
/* Go: enums.AnnouncementLocalTime. Local_Time, local date and time */
#define DMRGO_ENUMS_ANNOUNCEMENT_LOCAL_TIME ((dmrgo_enums_announcement_type_t)3)
/* Go: enums.AnnouncementManufacturerSpecific1. manufacturer specific */
#define DMRGO_ENUMS_ANNOUNCEMENT_MANUFACTURER_SPECIFIC1 ((dmrgo_enums_announcement_type_t)30)
/* Go: enums.AnnouncementManufacturerSpecific2. manufacturer specific */
#define DMRGO_ENUMS_ANNOUNCEMENT_MANUFACTURER_SPECIFIC2 ((dmrgo_enums_announcement_type_t)31)
/* Go: enums.AnnouncementMassReg. MassReg, mass registration */
#define DMRGO_ENUMS_ANNOUNCEMENT_MASS_REG ((dmrgo_enums_announcement_type_t)4)
/* Go: enums.AnnouncementVoteNow. Vote_Now, vote now advice */
#define DMRGO_ENUMS_ANNOUNCEMENT_VOTE_NOW ((dmrgo_enums_announcement_type_t)2)
/* Go: enums.DAIDGroupNetwork. group network */
#define DMRGO_ENUMS_DAID_GROUP_NETWORK ((dmrgo_enums_daid_t)2)
/* Go: enums.DAIDRadioNetwork. radio network */
#define DMRGO_ENUMS_DAID_RADIO_NETWORK ((dmrgo_enums_daid_t)0)
/* Go: enums.DAIDUSBEthernetNetwork. USB or Ethernet network */
#define DMRGO_ENUMS_DAID_USB_ETHERNET_NETWORK ((dmrgo_enums_daid_t)1)
/* Go: enums.DD7Bit. 7-bit characters */
#define DMRGO_ENUMS_DD_7BIT ((dmrgo_enums_dd_format_t)2)
/* Go: enums.DDBCD. BCD */
#define DMRGO_ENUMS_DD_BCD ((dmrgo_enums_dd_format_t)1)
/* Go: enums.DDBinary. binary */
#define DMRGO_ENUMS_DD_BINARY ((dmrgo_enums_dd_format_t)0)
/* Go: enums.DDISO8859Part1. 8-bit ISO/IEC 8859-1 */
#define DMRGO_ENUMS_DD_ISO8859_PART1 ((dmrgo_enums_dd_format_t)3)
/* Go: enums.DDISO8859Part10. 8-bit ISO/IEC 8859-10 */
#define DMRGO_ENUMS_DD_ISO8859_PART10 ((dmrgo_enums_dd_format_t)12)
/* Go: enums.DDISO8859Part11. 8-bit ISO/IEC 8859-11 */
#define DMRGO_ENUMS_DD_ISO8859_PART11 ((dmrgo_enums_dd_format_t)13)
/* Go: enums.DDISO8859Part13. 8-bit ISO/IEC 8859-13 */
#define DMRGO_ENUMS_DD_ISO8859_PART13 ((dmrgo_enums_dd_format_t)14)
/* Go: enums.DDISO8859Part14. 8-bit ISO/IEC 8859-14 */
#define DMRGO_ENUMS_DD_ISO8859_PART14 ((dmrgo_enums_dd_format_t)15)
/* Go: enums.DDISO8859Part15. 8-bit ISO/IEC 8859-15 */
#define DMRGO_ENUMS_DD_ISO8859_PART15 ((dmrgo_enums_dd_format_t)16)
/* Go: enums.DDISO8859Part16. 8-bit ISO/IEC 8859-16 */
#define DMRGO_ENUMS_DD_ISO8859_PART16 ((dmrgo_enums_dd_format_t)17)
/* Go: enums.DDISO8859Part2. 8-bit ISO/IEC 8859-2 */
#define DMRGO_ENUMS_DD_ISO8859_PART2 ((dmrgo_enums_dd_format_t)4)
/* Go: enums.DDISO8859Part3. 8-bit ISO/IEC 8859-3 */
#define DMRGO_ENUMS_DD_ISO8859_PART3 ((dmrgo_enums_dd_format_t)5)
/* Go: enums.DDISO8859Part4. 8-bit ISO/IEC 8859-4 */
#define DMRGO_ENUMS_DD_ISO8859_PART4 ((dmrgo_enums_dd_format_t)6)
/* Go: enums.DDISO8859Part5. 8-bit ISO/IEC 8859-5 */
#define DMRGO_ENUMS_DD_ISO8859_PART5 ((dmrgo_enums_dd_format_t)7)
/* Go: enums.DDISO8859Part6. 8-bit ISO/IEC 8859-6 */
#define DMRGO_ENUMS_DD_ISO8859_PART6 ((dmrgo_enums_dd_format_t)8)
/* Go: enums.DDISO8859Part7. 8-bit ISO/IEC 8859-7 */
#define DMRGO_ENUMS_DD_ISO8859_PART7 ((dmrgo_enums_dd_format_t)9)
/* Go: enums.DDISO8859Part8. 8-bit ISO/IEC 8859-8 */
#define DMRGO_ENUMS_DD_ISO8859_PART8 ((dmrgo_enums_dd_format_t)10)
/* Go: enums.DDISO8859Part9. 8-bit ISO/IEC 8859-9 */
#define DMRGO_ENUMS_DD_ISO8859_PART9 ((dmrgo_enums_dd_format_t)11)
/* Go: enums.DDUTF16. Unicode UTF-16, big-endian unless a byte order mark sets another order */
#define DMRGO_ENUMS_DD_UTF16 ((dmrgo_enums_dd_format_t)19)
/* Go: enums.DDUTF16BE. Unicode UTF-16BE */
#define DMRGO_ENUMS_DD_UTF16BE ((dmrgo_enums_dd_format_t)20)
/* Go: enums.DDUTF16LE. Unicode UTF-16LE */
#define DMRGO_ENUMS_DD_UTF16LE ((dmrgo_enums_dd_format_t)21)
/* Go: enums.DDUTF32. Unicode UTF-32 */
#define DMRGO_ENUMS_DD_UTF32 ((dmrgo_enums_dd_format_t)22)
/* Go: enums.DDUTF32BE. Unicode UTF-32BE */
#define DMRGO_ENUMS_DD_UTF32BE ((dmrgo_enums_dd_format_t)23)
/* Go: enums.DDUTF32LE. Unicode UTF-32LE */
#define DMRGO_ENUMS_DD_UTF32LE ((dmrgo_enums_dd_format_t)24)
/* Go: enums.DDUTF8. Unicode UTF-8 */
#define DMRGO_ENUMS_DD_UTF8 ((dmrgo_enums_dd_format_t)18)
/* Go: enums.DPIDExtendedHeader. port number in the extended header */
#define DMRGO_ENUMS_DPID_EXTENDED_HEADER ((dmrgo_enums_dpid_t)0)
/* Go: enums.DPIDLocationProtocol. Port 5017 */
#define DMRGO_ENUMS_DPID_LOCATION_PROTOCOL ((dmrgo_enums_dpid_t)2)
/* Go: enums.DPIDTextMessage. Port 5016 */
#define DMRGO_ENUMS_DPID_TEXT_MESSAGE ((dmrgo_enums_dpid_t)1)
/* Go: enums.DataTypeCSBK. CSBK */
#define DMRGO_ENUMS_DATA_TYPE_CSBK ((dmrgo_enums_data_type_t)3)
/* Go: enums.DataTypeDataHeader. Data Header */
#define DMRGO_ENUMS_DATA_TYPE_DATA_HEADER ((dmrgo_enums_data_type_t)6)
/* Go: enums.DataTypeIdle. Idle */
#define DMRGO_ENUMS_DATA_TYPE_IDLE ((dmrgo_enums_data_type_t)9)
/* Go: enums.DataTypeMBCContinuation. MBC Continuation */
#define DMRGO_ENUMS_DATA_TYPE_MBC_CONTINUATION ((dmrgo_enums_data_type_t)5)
/* Go: enums.DataTypeMBCHeader. MBC Header */
#define DMRGO_ENUMS_DATA_TYPE_MBC_HEADER ((dmrgo_enums_data_type_t)4)
/* Go: enums.DataTypePIHeader. PI Header */
#define DMRGO_ENUMS_DATA_TYPE_PI_HEADER ((dmrgo_enums_data_type_t)0)
/* Go: enums.DataTypeRate1. Rate 1 Data */
#define DMRGO_ENUMS_DATA_TYPE_RATE1 ((dmrgo_enums_data_type_t)10)
/* Go: enums.DataTypeRate12. Rate 1/2 Data */
#define DMRGO_ENUMS_DATA_TYPE_RATE12 ((dmrgo_enums_data_type_t)7)
/* Go: enums.DataTypeRate34. Rate 3/4 Data */
#define DMRGO_ENUMS_DATA_TYPE_RATE34 ((dmrgo_enums_data_type_t)8)
/* Go: enums.DataTypeReserved. DataTypeReserved is 12, the lowest of the reserved values 12 to 15. */
#define DMRGO_ENUMS_DATA_TYPE_RESERVED ((dmrgo_enums_data_type_t)12)
/* Go: enums.DataTypeTerminatorWithLC. Terminator with LC */
#define DMRGO_ENUMS_DATA_TYPE_TERMINATOR_WITH_LC ((dmrgo_enums_data_type_t)2)
/* Go: enums.DataTypeUnifiedSingleBlock. Unified Single Block Data */
#define DMRGO_ENUMS_DATA_TYPE_UNIFIED_SINGLE_BLOCK ((dmrgo_enums_data_type_t)11)
/* Go: enums.DataTypeVoiceLCHeader. Voice LC Header */
#define DMRGO_ENUMS_DATA_TYPE_VOICE_LC_HEADER ((dmrgo_enums_data_type_t)1)
/* Go: enums.FIDAselsan. ASELSAN */
#define DMRGO_ENUMS_FID_ASELSAN ((dmrgo_enums_fid_t)9)
/* Go: enums.FIDDMRAssociation. DMR Association */
#define DMRGO_ENUMS_FID_DMR_ASSOCIATION ((dmrgo_enums_fid_t)11)
/* Go: enums.FIDEMC. EMC */
#define DMRGO_ENUMS_FID_EMC ((dmrgo_enums_fid_t)19)
/* Go: enums.FIDEMC2. EMC, second ID */
#define DMRGO_ENUMS_FID_EMC2 ((dmrgo_enums_fid_t)28)
/* Go: enums.FIDFlydeMicro. Flyde Micro */
#define DMRGO_ENUMS_FID_FLYDE_MICRO ((dmrgo_enums_fid_t)4)
/* Go: enums.FIDHYTScienceTech. HYT Science Tech */
#define DMRGO_ENUMS_FID_HYT_SCIENCE_TECH ((dmrgo_enums_fid_t)8)
/* Go: enums.FIDHYTScienceTech2. HYT Science Tech, second ID */
#define DMRGO_ENUMS_FID_HYT_SCIENCE_TECH2 ((dmrgo_enums_fid_t)104)
/* Go: enums.FIDJVCKenwood. JVC Kenwood */
#define DMRGO_ENUMS_FID_JVC_KENWOOD ((dmrgo_enums_fid_t)32)
/* Go: enums.FIDKirisun. Kirisun */
#define DMRGO_ENUMS_FID_KIRISUN ((dmrgo_enums_fid_t)10)
/* Go: enums.FIDMotorola. Motorola */
#define DMRGO_ENUMS_FID_MOTOROLA ((dmrgo_enums_fid_t)16)
/* Go: enums.FIDProdEl. PROD-EL */
#define DMRGO_ENUMS_FID_PROD_EL ((dmrgo_enums_fid_t)5)
/* Go: enums.FIDRadioActivity. Radio Activity */
#define DMRGO_ENUMS_FID_RADIO_ACTIVITY ((dmrgo_enums_fid_t)51)
/* Go: enums.FIDRadioActivity2. Radio Activity, second ID */
#define DMRGO_ENUMS_FID_RADIO_ACTIVITY2 ((dmrgo_enums_fid_t)60)
/* Go: enums.FIDRadiodata. RADIODATA */
#define DMRGO_ENUMS_FID_RADIODATA ((dmrgo_enums_fid_t)7)
/* Go: enums.FIDStandardized. standardized feature set */
#define DMRGO_ENUMS_FID_STANDARDIZED ((dmrgo_enums_fid_t)0)
/* Go: enums.FIDTait. Tait */
#define DMRGO_ENUMS_FID_TAIT ((dmrgo_enums_fid_t)88)
/* Go: enums.FIDTridentMicroSystems. Trident Micro Systems */
#define DMRGO_ENUMS_FID_TRIDENT_MICRO_SYSTEMS ((dmrgo_enums_fid_t)6)
/* Go: enums.FIDVertexStandard. Vertex Standard */
#define DMRGO_ENUMS_FID_VERTEX_STANDARD ((dmrgo_enums_fid_t)119)
/* Go: enums.FLCOGPSInfo. GPS_Info */
#define DMRGO_ENUMS_FLCO_GPS_INFO ((dmrgo_enums_flco_t)8)
/* Go: enums.FLCOGroupVoiceChannelUser. Grp_V_Ch_Usr, group voice channel user */
#define DMRGO_ENUMS_FLCO_GROUP_VOICE_CHANNEL_USER ((dmrgo_enums_flco_t)0)
/* Go: enums.FLCOTalkerAliasBlock1. Talker_Alias_blk1 */
#define DMRGO_ENUMS_FLCO_TALKER_ALIAS_BLOCK1 ((dmrgo_enums_flco_t)5)
/* Go: enums.FLCOTalkerAliasBlock2. Talker_Alias_blk2 */
#define DMRGO_ENUMS_FLCO_TALKER_ALIAS_BLOCK2 ((dmrgo_enums_flco_t)6)
/* Go: enums.FLCOTalkerAliasBlock3. Talker_Alias_blk3 */
#define DMRGO_ENUMS_FLCO_TALKER_ALIAS_BLOCK3 ((dmrgo_enums_flco_t)7)
/* Go: enums.FLCOTalkerAliasHeader. Talker_Alias_hdr */
#define DMRGO_ENUMS_FLCO_TALKER_ALIAS_HEADER ((dmrgo_enums_flco_t)4)
/* Go: enums.FLCOTerminatorDataLinkControl. TD_LC, terminator data link control */
#define DMRGO_ENUMS_FLCO_TERMINATOR_DATA_LINK_CONTROL ((dmrgo_enums_flco_t)48)
/* Go: enums.FLCOUnitToUnitVoiceChannelUser. UU_V_Ch_Usr, unit to unit voice channel user */
#define DMRGO_ENUMS_FLCO_UNIT_TO_UNIT_VOICE_CHANNEL_USER ((dmrgo_enums_flco_t)3)
/* Go: enums.LCSSContinuationFragment. continuation fragment LC or CSBK */
#define DMRGO_ENUMS_LCSS_CONTINUATION_FRAGMENT ((dmrgo_enums_lcss_t)3)
/* Go: enums.LCSSFirstFragment. first fragment LC */
#define DMRGO_ENUMS_LCSS_FIRST_FRAGMENT ((dmrgo_enums_lcss_t)1)
/* Go: enums.LCSSLastFragment. last fragment LC or CSBK */
#define DMRGO_ENUMS_LCSS_LAST_FRAGMENT ((dmrgo_enums_lcss_t)2)
/* Go: enums.LCSSSingleFragment. single fragment LC or first fragment CSBK */
#define DMRGO_ENUMS_LCSS_SINGLE_FRAGMENT ((dmrgo_enums_lcss_t)0)
/* Go: enums.ProtectDisablePTT. DIS_PTT: the addressed MSs must not transmit */
#define DMRGO_ENUMS_PROTECT_DISABLE_PTT ((dmrgo_enums_protect_kind_t)0)
/* Go: enums.ProtectEnablePTT. EN_PTT: the addressed MSs may transmit again */
#define DMRGO_ENUMS_PROTECT_ENABLE_PTT ((dmrgo_enums_protect_kind_t)1)
/* Go: enums.ProtectEnablePTTOneMS. EN_PTT_ONE_MS: only the addressed MS may transmit */
#define DMRGO_ENUMS_PROTECT_ENABLE_PTT_ONE_MS ((dmrgo_enums_protect_kind_t)3)
/* Go: enums.ProtectIllegallyParked. ILLEGALLY_PARKED: MSs other than the source and target must leave the payload channel */
#define DMRGO_ENUMS_PROTECT_ILLEGALLY_PARKED ((dmrgo_enums_protect_kind_t)2)
/* Go: enums.RCCeaseTransmissionCommand. cease transmission command */
#define DMRGO_ENUMS_RC_CEASE_TRANSMISSION_COMMAND ((dmrgo_enums_rc_command_t)4)
/* Go: enums.RCCeaseTransmissionRequest. cease transmission request */
#define DMRGO_ENUMS_RC_CEASE_TRANSMISSION_REQUEST ((dmrgo_enums_rc_command_t)5)
/* Go: enums.RCDecreasePower. decrease power by one step, Tier III */
#define DMRGO_ENUMS_RC_DECREASE_POWER ((dmrgo_enums_rc_command_t)1)
/* Go: enums.RCHighestPower. set power to highest, Tier III */
#define DMRGO_ENUMS_RC_HIGHEST_POWER ((dmrgo_enums_rc_command_t)2)
/* Go: enums.RCIncreasePower. increase power by one step, Tier III */
#define DMRGO_ENUMS_RC_INCREASE_POWER ((dmrgo_enums_rc_command_t)0)
/* Go: enums.RCLowestPower. set power to lowest, Tier III */
#define DMRGO_ENUMS_RC_LOWEST_POWER ((dmrgo_enums_rc_command_t)3)
/* Go: enums.SAIDRadioNetwork. radio network */
#define DMRGO_ENUMS_SAID_RADIO_NETWORK ((dmrgo_enums_said_t)0)
/* Go: enums.SAIDUSBEthernetNetwork. USB or Ethernet network */
#define DMRGO_ENUMS_SAID_USB_ETHERNET_NETWORK ((dmrgo_enums_said_t)1)
/* Go: enums.SAPAddressResolutionProtocol. Address Resolution Protocol (ARP) */
#define DMRGO_ENUMS_SAP_ADDRESS_RESOLUTION_PROTOCOL ((dmrgo_enums_sap_t)5)
/* Go: enums.SAPIPBasedPacketData. IP based packet data */
#define DMRGO_ENUMS_SAP_IP_BASED_PACKET_DATA ((dmrgo_enums_sap_t)4)
/* Go: enums.SAPProprietaryPacketData. proprietary packet data */
#define DMRGO_ENUMS_SAP_PROPRIETARY_PACKET_DATA ((dmrgo_enums_sap_t)9)
/* Go: enums.SAPShortData. short data */
#define DMRGO_ENUMS_SAP_SHORT_DATA ((dmrgo_enums_sap_t)10)
/* Go: enums.SAPTCPIPHeaderCompression. TCP/IP header compression */
#define DMRGO_ENUMS_SAP_TCP_IP_HEADER_COMPRESSION ((dmrgo_enums_sap_t)2)
/* Go: enums.SAPUDPIPHeaderCompression. UDP/IP header compression */
#define DMRGO_ENUMS_SAP_UDP_IP_HEADER_COMPRESSION ((dmrgo_enums_sap_t)3)
/* Go: enums.SAPUnifiedDataTransport. Unified Data Transport (UDT) */
#define DMRGO_ENUMS_SAP_UNIFIED_DATA_TRANSPORT ((dmrgo_enums_sap_t)0)
/* Go: enums.SLCOActivityUpdate. Act_Updt, activity update */
#define DMRGO_ENUMS_SLCO_ACTIVITY_UPDATE ((dmrgo_enums_slco_t)1)
/* Go: enums.SLCOCSysParms. C_SYS_Parms (ETSI TS 102 361-4 clause 7.1.2) */
#define DMRGO_ENUMS_SLCO_C_SYS_PARMS ((dmrgo_enums_slco_t)2)
/* Go: enums.SLCONullMessage. Nul_Msg, null message */
#define DMRGO_ENUMS_SLCO_NULL_MESSAGE ((dmrgo_enums_slco_t)0)
/* Go: enums.SLCOPSysParms. P_SYS_Parms (ETSI TS 102 361-4 clause 7.1.2) */
#define DMRGO_ENUMS_SLCO_P_SYS_PARMS ((dmrgo_enums_slco_t)3)
/* Go: enums.SPIDExtendedHeader. port number in the extended header */
#define DMRGO_ENUMS_SPID_EXTENDED_HEADER ((dmrgo_enums_spid_t)0)
/* Go: enums.SPIDLocationProtocol. Port 5017 */
#define DMRGO_ENUMS_SPID_LOCATION_PROTOCOL ((dmrgo_enums_spid_t)2)
/* Go: enums.SPIDTextMessage. Port 5016 */
#define DMRGO_ENUMS_SPID_TEXT_MESSAGE ((dmrgo_enums_spid_t)1)
/* Go: enums.ServiceFunctionAll. ServiceFunctionAll invites random access for all services. */
#define DMRGO_ENUMS_SERVICE_FUNCTION_ALL ((dmrgo_enums_service_function_t)0)
/* Go: enums.ServiceFunctionNoPayload. ServiceFunctionNoPayload invites random access for registration and the services that do not need a payload channel. */
#define DMRGO_ENUMS_SERVICE_FUNCTION_NO_PAYLOAD ((dmrgo_enums_service_function_t)2)
/* Go: enums.ServiceFunctionPayload. ServiceFunctionPayload invites random access for registration and the services that need a payload channel. */
#define DMRGO_ENUMS_SERVICE_FUNCTION_PAYLOAD ((dmrgo_enums_service_function_t)1)
/* Go: enums.ServiceFunctionRegistration. ServiceFunctionRegistration invites random access for registration only. */
#define DMRGO_ENUMS_SERVICE_FUNCTION_REGISTRATION ((dmrgo_enums_service_function_t)3)
/* Go: enums.ServiceKindCallAnswer. call answer */
#define DMRGO_ENUMS_SERVICE_KIND_CALL_ANSWER ((dmrgo_enums_service_kind_t)9)
/* Go: enums.ServiceKindCallDiversion. call diversion */
#define DMRGO_ENUMS_SERVICE_KIND_CALL_DIVERSION ((dmrgo_enums_service_kind_t)8)
/* Go: enums.ServiceKindCancelCall. cancel call */
#define DMRGO_ENUMS_SERVICE_KIND_CANCEL_CALL ((dmrgo_enums_service_kind_t)15)
/* Go: enums.ServiceKindDuplexPacketData. full-duplex MS to MS packet data call */
#define DMRGO_ENUMS_SERVICE_KIND_DUPLEX_PACKET_DATA ((dmrgo_enums_service_kind_t)11)
/* Go: enums.ServiceKindDuplexVoice. full-duplex MS to MS voice call */
#define DMRGO_ENUMS_SERVICE_KIND_DUPLEX_VOICE ((dmrgo_enums_service_kind_t)10)
/* Go: enums.ServiceKindIndividualPacketData. individual packet data call */
#define DMRGO_ENUMS_SERVICE_KIND_INDIVIDUAL_PACKET_DATA ((dmrgo_enums_service_kind_t)2)
/* Go: enums.ServiceKindIndividualShortData. individual UDT short data call */
#define DMRGO_ENUMS_SERVICE_KIND_INDIVIDUAL_SHORT_DATA ((dmrgo_enums_service_kind_t)4)
/* Go: enums.ServiceKindIndividualVoice. individual voice call */
#define DMRGO_ENUMS_SERVICE_KIND_INDIVIDUAL_VOICE ((dmrgo_enums_service_kind_t)0)
/* Go: enums.ServiceKindRegistration. registration, authentication, de-registration and MS radio check */
#define DMRGO_ENUMS_SERVICE_KIND_REGISTRATION ((dmrgo_enums_service_kind_t)14)
/* Go: enums.ServiceKindShortDataPolling. UDT short data polling */
#define DMRGO_ENUMS_SERVICE_KIND_SHORT_DATA_POLLING ((dmrgo_enums_service_kind_t)6)
/* Go: enums.ServiceKindStatusTransport. status transport */
#define DMRGO_ENUMS_SERVICE_KIND_STATUS_TRANSPORT ((dmrgo_enums_service_kind_t)7)
/* Go: enums.ServiceKindSupplementary. supplementary service */
#define DMRGO_ENUMS_SERVICE_KIND_SUPPLEMENTARY ((dmrgo_enums_service_kind_t)13)
/* Go: enums.ServiceKindTalkgroupPacketData. packet data call to a talkgroup */
#define DMRGO_ENUMS_SERVICE_KIND_TALKGROUP_PACKET_DATA ((dmrgo_enums_service_kind_t)3)
/* Go: enums.ServiceKindTalkgroupShortData. talkgroup UDT short data call */
#define DMRGO_ENUMS_SERVICE_KIND_TALKGROUP_SHORT_DATA ((dmrgo_enums_service_kind_t)5)
/* Go: enums.ServiceKindTalkgroupVoice. talkgroup voice call */
#define DMRGO_ENUMS_SERVICE_KIND_TALKGROUP_VOICE ((dmrgo_enums_service_kind_t)1)
/* Go: enums.Slot1. TDMA channel 1 */
#define DMRGO_ENUMS_SLOT1 ((dmrgo_enums_slot_t)1)
/* Go: enums.Slot2. TDMA channel 2 */
#define DMRGO_ENUMS_SLOT2 ((dmrgo_enums_slot_t)2)
/* Go: enums.SlotUnknown. SlotUnknown is a burst whose TDMA channel is not known. */
#define DMRGO_ENUMS_SLOT_UNKNOWN ((dmrgo_enums_slot_t)0)
/* Go: enums.SyncBSSourcedData. BS sourced data */
#define DMRGO_ENUMS_SYNC_BS_SOURCED_DATA ((dmrgo_enums_sync_pattern_t)UINT64_C(0xdff57d75df5d))
/* Go: enums.SyncBSSourcedVoice. BS sourced voice */
#define DMRGO_ENUMS_SYNC_BS_SOURCED_VOICE ((dmrgo_enums_sync_pattern_t)UINT64_C(0x755fd7df75f7))
/* Go: enums.SyncMSSourcedData. MS sourced data */
#define DMRGO_ENUMS_SYNC_MS_SOURCED_DATA ((dmrgo_enums_sync_pattern_t)UINT64_C(0xd5d7f77fd757))
/* Go: enums.SyncMSSourcedRC. MS sourced RC sync */
#define DMRGO_ENUMS_SYNC_MS_SOURCED_RC ((dmrgo_enums_sync_pattern_t)UINT64_C(0x77d55f7dfd77))
/* Go: enums.SyncMSSourcedVoice. MS sourced voice */
#define DMRGO_ENUMS_SYNC_MS_SOURCED_VOICE ((dmrgo_enums_sync_pattern_t)UINT64_C(0x7f7d5dd57dfd))
/* Go: enums.SyncNone. SyncNone is the SyncPattern of a burst whose center carries embedded signalling instead of a SYNC pattern. */
#define DMRGO_ENUMS_SYNC_NONE ((dmrgo_enums_sync_pattern_t)0)
/* Go: enums.SyncReserved. reserved pattern */
#define DMRGO_ENUMS_SYNC_RESERVED ((dmrgo_enums_sync_pattern_t)UINT64_C(0xdd7ff5d757dd))
/* Go: enums.SyncTDMA1Data. TDMA direct mode time slot 1 data */
#define DMRGO_ENUMS_SYNC_TDMA1_DATA ((dmrgo_enums_sync_pattern_t)UINT64_C(0xf7fdd5ddfd55))
/* Go: enums.SyncTDMA1Voice. TDMA direct mode time slot 1 voice */
#define DMRGO_ENUMS_SYNC_TDMA1_VOICE ((dmrgo_enums_sync_pattern_t)UINT64_C(0x5d577f7757ff))
/* Go: enums.SyncTDMA2Data. TDMA direct mode time slot 2 data */
#define DMRGO_ENUMS_SYNC_TDMA2_DATA ((dmrgo_enums_sync_pattern_t)UINT64_C(0xd7557f5ff7f5))
/* Go: enums.SyncTDMA2Voice. TDMA direct mode time slot 2 voice */
#define DMRGO_ENUMS_SYNC_TDMA2_VOICE ((dmrgo_enums_sync_pattern_t)UINT64_C(0x7dffd5f55d5f))
/* Go: enums.UDTAddress. MS or talkgroup addresses */
#define DMRGO_ENUMS_UDT_ADDRESS ((dmrgo_enums_udt_format_t)1)
/* Go: enums.UDTBCD. 4-bit BCD digits */
#define DMRGO_ENUMS_UDT_BCD ((dmrgo_enums_udt_format_t)2)
/* Go: enums.UDTBinary. binary */
#define DMRGO_ENUMS_UDT_BINARY ((dmrgo_enums_udt_format_t)0)
/* Go: enums.UDTIP. IP address */
#define DMRGO_ENUMS_UDT_IP ((dmrgo_enums_udt_format_t)6)
/* Go: enums.UDTISO7. ISO/IEC 646 7-bit characters */
#define DMRGO_ENUMS_UDT_ISO7 ((dmrgo_enums_udt_format_t)3)
/* Go: enums.UDTISO8. ISO/IEC 8859 8-bit characters */
#define DMRGO_ENUMS_UDT_ISO8 ((dmrgo_enums_udt_format_t)4)
/* Go: enums.UDTLIP. Location Information Protocol (LIP) */
#define DMRGO_ENUMS_UDT_LIP ((dmrgo_enums_udt_format_t)11)
/* Go: enums.UDTManufacturer1. manufacturer specific */
#define DMRGO_ENUMS_UDT_MANUFACTURER1 ((dmrgo_enums_udt_format_t)8)
/* Go: enums.UDTManufacturer2. manufacturer specific */
#define DMRGO_ENUMS_UDT_MANUFACTURER2 ((dmrgo_enums_udt_format_t)9)
/* Go: enums.UDTMixed. one address and UTF-16BE characters */
#define DMRGO_ENUMS_UDT_MIXED ((dmrgo_enums_udt_format_t)10)
/* Go: enums.UDTNMEA. NMEA (IEC 61162-1) location */
#define DMRGO_ENUMS_UDT_NMEA ((dmrgo_enums_udt_format_t)5)
/* Go: enums.UDTUTF16BE. UTF-16BE characters */
#define DMRGO_ENUMS_UDT_UTF16BE ((dmrgo_enums_udt_format_t)7)
/* Go: enums.VoiceBurstA. burst A, which carries the voice SYNC */
#define DMRGO_ENUMS_VOICE_BURST_A ((dmrgo_enums_voice_burst_type_t)1)
/* Go: enums.VoiceBurstB. burst B */
#define DMRGO_ENUMS_VOICE_BURST_B ((dmrgo_enums_voice_burst_type_t)2)
/* Go: enums.VoiceBurstC. burst C */
#define DMRGO_ENUMS_VOICE_BURST_C ((dmrgo_enums_voice_burst_type_t)3)
/* Go: enums.VoiceBurstD. burst D */
#define DMRGO_ENUMS_VOICE_BURST_D ((dmrgo_enums_voice_burst_type_t)4)
/* Go: enums.VoiceBurstE. burst E */
#define DMRGO_ENUMS_VOICE_BURST_E ((dmrgo_enums_voice_burst_type_t)5)
/* Go: enums.VoiceBurstF. burst F */
#define DMRGO_ENUMS_VOICE_BURST_F ((dmrgo_enums_voice_burst_type_t)6)
/* Go: enums.VoiceBurstUnknown. VoiceBurstUnknown is a burst whose superframe position is not known. */
#define DMRGO_ENUMS_VOICE_BURST_UNKNOWN ((dmrgo_enums_voice_burst_type_t)0)
/* Go: hdap.LPConditionReport. a position on a condition, such as a period */
#define DMRGO_HDAP_LP_CONDITION_REPORT ((dmrgo_hdap_opcode_t)53251)
/* Go: hdap.LPEmergencyReport. a position sent in an emergency */
#define DMRGO_HDAP_LP_EMERGENCY_REPORT ((dmrgo_hdap_opcode_t)45059)
/* Go: hdap.LPStandardAnswer. the answer to a standard request */
#define DMRGO_HDAP_LP_STANDARD_ANSWER ((dmrgo_hdap_opcode_t)40962)
/* Go: hdap.LPStandardRequest. request one position */
#define DMRGO_HDAP_LP_STANDARD_REQUEST ((dmrgo_hdap_opcode_t)40961)
/* Go: hdap.RRSDeregistration. the radio goes offline */
#define DMRGO_HDAP_RRS_DEREGISTRATION ((dmrgo_hdap_opcode_t)1)
/* Go: hdap.RRSOnlineCheck. the server checks whether the radio is online */
#define DMRGO_HDAP_RRS_ONLINE_CHECK ((dmrgo_hdap_opcode_t)2)
/* Go: hdap.RRSOnlineCheckAnswer. the answer to an online check */
#define DMRGO_HDAP_RRS_ONLINE_CHECK_ANSWER ((dmrgo_hdap_opcode_t)130)
/* Go: hdap.RRSRegistration. the radio registers */
#define DMRGO_HDAP_RRS_REGISTRATION ((dmrgo_hdap_opcode_t)3)
/* Go: hdap.RRSRegistrationAnswer. the answer to a registration */
#define DMRGO_HDAP_RRS_REGISTRATION_ANSWER ((dmrgo_hdap_opcode_t)128)
/* Go: hdap.ServiceDDS. data delivery states */
#define DMRGO_HDAP_SERVICE_DDS ((dmrgo_hdap_service_t)20)
/* Go: hdap.ServiceDTP. data transmit protocol */
#define DMRGO_HDAP_SERVICE_DTP ((dmrgo_hdap_service_t)19)
/* Go: hdap.ServiceLP. location protocol */
#define DMRGO_HDAP_SERVICE_LP ((dmrgo_hdap_service_t)8)
/* Go: hdap.ServiceRCP. radio control protocol */
#define DMRGO_HDAP_SERVICE_RCP ((dmrgo_hdap_service_t)2)
/* Go: hdap.ServiceRRS. radio registration service */
#define DMRGO_HDAP_SERVICE_RRS ((dmrgo_hdap_service_t)17)
/* Go: hdap.ServiceTMP. text message protocol */
#define DMRGO_HDAP_SERVICE_TMP ((dmrgo_hdap_service_t)9)
/* Go: hdap.ServiceTP. telemetry protocol */
#define DMRGO_HDAP_SERVICE_TP ((dmrgo_hdap_service_t)18)
/* Go: hdap.TMPGroupMessage. a text to a talkgroup */
#define DMRGO_HDAP_TMP_GROUP_MESSAGE ((dmrgo_hdap_tmp_type_t)177)
/* Go: hdap.TMPGroupMessageAnswer. the answer to a group text */
#define DMRGO_HDAP_TMP_GROUP_MESSAGE_ANSWER ((dmrgo_hdap_tmp_type_t)178)
/* Go: hdap.TMPPrivateMessage. a text to a radio */
#define DMRGO_HDAP_TMP_PRIVATE_MESSAGE ((dmrgo_hdap_tmp_type_t)161)
/* Go: hdap.TMPPrivateMessageAnswer. the answer to a private text */
#define DMRGO_HDAP_TMP_PRIVATE_MESSAGE_ANSWER ((dmrgo_hdap_tmp_type_t)162)
/* Go: ip.DefaultNetwork. DefaultNetwork is the network ID that radios use by default for the IPv4 address of a radio: 12.x.y.z, with the 24-bit radio ID as x.y.z. */
#define DMRGO_IP_DEFAULT_NETWORK 12
/* Go: ip.ICMPBadHeader. ICMPBadHeader is a Parameter Problem: the IP header of the message is not a valid IPv4 header. */
#define DMRGO_IP_ICMP_BAD_HEADER ((dmrgo_ip_icmp_message_t)3072)
/* Go: ip.ICMPFragmentationNeeded. ICMPFragmentationNeeded is a Destination Unreachable: the IP message is longer than the MTU of the accessory interface and has the DF flag set. */
#define DMRGO_IP_ICMP_FRAGMENTATION_NEEDED ((dmrgo_ip_icmp_message_t)772)
/* Go: ip.ICMPHostUnreachable. ICMPHostUnreachable is a Destination Unreachable: the sender used all its tries on air, the message overflows the queue of the recipient, or it waited in the queue longer than the limit. */
#define DMRGO_IP_ICMP_HOST_UNREACHABLE ((dmrgo_ip_icmp_message_t)769)
/* Go: ip.ICMPNetworkUnknown. ICMPNetworkUnknown is a Destination Unreachable: the IP message is for a network class that the system does not support (RFC 1122 section 3.2.2.1). */
#define DMRGO_IP_ICMP_NETWORK_UNKNOWN ((dmrgo_ip_icmp_message_t)774)
/* Go: ip.ICMPNetworkUnreachable. ICMPNetworkUnreachable is a Destination Unreachable: the final destination of an IP message that a radio received is unreachable. */
#define DMRGO_IP_ICMP_NETWORK_UNREACHABLE ((dmrgo_ip_icmp_message_t)768)
/* Go: ip.PortARS. MOTOTRBO Automatic Registration Service */
#define DMRGO_IP_PORT_ARS ((dmrgo_ip_port_t)4005)
/* Go: ip.PortBattery. MOTOTRBO battery management */
#define DMRGO_IP_PORT_BATTERY ((dmrgo_ip_port_t)4012)
/* Go: ip.PortHyteraCall. Hytera radio control protocol */
#define DMRGO_IP_PORT_HYTERA_CALL ((dmrgo_ip_port_t)3005)
/* Go: ip.PortHyteraData. Hytera data transmit protocol */
#define DMRGO_IP_PORT_HYTERA_DATA ((dmrgo_ip_port_t)3007)
/* Go: ip.PortHyteraLocation. Hytera location protocol */
#define DMRGO_IP_PORT_HYTERA_LOCATION ((dmrgo_ip_port_t)3003)
/* Go: ip.PortHyteraRRS. Hytera radio registration service */
#define DMRGO_IP_PORT_HYTERA_RRS ((dmrgo_ip_port_t)3002)
/* Go: ip.PortHyteraSelfDefine. Hytera self-defined message protocol */
#define DMRGO_IP_PORT_HYTERA_SELF_DEFINE ((dmrgo_ip_port_t)3009)
/* Go: ip.PortHyteraTelemetry. Hytera telemetry protocol */
#define DMRGO_IP_PORT_HYTERA_TELEMETRY ((dmrgo_ip_port_t)3006)
/* Go: ip.PortHyteraText. Hytera text message protocol */
#define DMRGO_IP_PORT_HYTERA_TEXT ((dmrgo_ip_port_t)3004)
/* Go: ip.PortJobTicket. MOTOTRBO job ticket server */
#define DMRGO_IP_PORT_JOB_TICKET ((dmrgo_ip_port_t)4013)
/* Go: ip.PortLRRP. MOTOTRBO Location Request and Response Protocol */
#define DMRGO_IP_PORT_LRRP ((dmrgo_ip_port_t)4001)
/* Go: ip.PortLocation. location information protocol (ETSI TS 102 361-3 clause 5.7.2) */
#define DMRGO_IP_PORT_LOCATION ((dmrgo_ip_port_t)5017)
/* Go: ip.PortNMEA. NMEA 0183 sentences */
#define DMRGO_IP_PORT_NMEA ((dmrgo_ip_port_t)10110)
/* Go: ip.PortOTAP. MOTOTRBO over the air programming */
#define DMRGO_IP_PORT_OTAP ((dmrgo_ip_port_t)4009)
/* Go: ip.PortTMS. MOTOTRBO Text Messaging Service */
#define DMRGO_IP_PORT_TMS ((dmrgo_ip_port_t)4007)
/* Go: ip.PortTelemetry. MOTOTRBO telemetry */
#define DMRGO_IP_PORT_TELEMETRY ((dmrgo_ip_port_t)4008)
/* Go: ip.PortText. text messaging (ETSI TS 102 361-3 clause 5.7.1) */
#define DMRGO_IP_PORT_TEXT ((dmrgo_ip_port_t)5016)
/* Go: ip.PortXCMP. MOTOTRBO Extensible Command Message Protocol */
#define DMRGO_IP_PORT_XCMP ((dmrgo_ip_port_t)4004)
/* Go: ip.ProtocolICMP. ICMP */
#define DMRGO_IP_PROTOCOL_ICMP ((dmrgo_ip_protocol_t)1)
/* Go: ip.ProtocolTCP. TCP */
#define DMRGO_IP_PROTOCOL_TCP ((dmrgo_ip_protocol_t)6)
/* Go: ip.ProtocolUDP. UDP */
#define DMRGO_IP_PROTOCOL_UDP ((dmrgo_ip_protocol_t)17)
/* Go: layer2.BurstBits. BurstBits is the total number of bits in a DMR burst. */
#define DMRGO_LAYER2_BURST_BITS 264
/* Go: layer2.CACHBits. CACHBits is the total number of bits in a CACH field. */
#define DMRGO_LAYER2_CACH_BITS 24
/* Go: layer2.CACHPayloadBits. CACHPayloadBits is the number of signalling payload bits. */
#define DMRGO_LAYER2_CACH_PAYLOAD_BITS 17
/* Go: layer2.DefaultSyncThreshold. DefaultSyncThreshold is the largest Hamming distance, in bits, at which a received 48-bit SYNC field still matches a SYNC pattern. */
#define DMRGO_LAYER2_DEFAULT_SYNC_THRESHOLD 4
/* Go: layer2.EndNone. EndNone is a burst without an end flag. */
#define DMRGO_LAYER2_END_NONE ((dmrgo_layer2_end_hint_t)0)
/* Go: layer2.EndStrong. EndStrong is a flag that marks only the end of a call. */
#define DMRGO_LAYER2_END_STRONG ((dmrgo_layer2_end_hint_t)2)
/* Go: layer2.EndWeak. EndWeak is a flag that real equipment also sets in the middle of a call, such as the IPSC 0x40 bit, which MOTOTRBO sets on weak voice bursts. */
#define DMRGO_LAYER2_END_WEAK ((dmrgo_layer2_end_hint_t)1)
/* Go: layer2.KindData. KindData is a data or control burst: a slot type and an information payload around a data SYNC pattern or around embedded signalling (ETSI TS 102 361-1 clause 5.1.5.1, clause 6.4.2). */
#define DMRGO_LAYER2_KIND_DATA ((dmrgo_layer2_kind_t)2)
/* Go: layer2.KindReverseChannel. KindReverseChannel is a standalone inbound RC burst (ETSI TS 102 361-1 clause 6.4.1). */
#define DMRGO_LAYER2_KIND_REVERSE_CHANNEL ((dmrgo_layer2_kind_t)3)
/* Go: layer2.KindUnknown. KindUnknown is a burst of unknown kind. */
#define DMRGO_LAYER2_KIND_UNKNOWN ((dmrgo_layer2_kind_t)0)
/* Go: layer2.KindVoice. KindVoice is a voice burst: three vocoder slots around a voice SYNC pattern (burst A) or embedded signalling (bursts B to F). */
#define DMRGO_LAYER2_KIND_VOICE ((dmrgo_layer2_kind_t)1)
/* Go: layer2.PlacementDuplicate. PlacementDuplicate is a burst with the sequence number of the burst before it. */
#define DMRGO_LAYER2_PLACEMENT_DUPLICATE ((dmrgo_layer2_placement_t)1)
/* Go: layer2.PlacementInOrder. PlacementInOrder is a burst that follows the one before it, or a gap after it. */
#define DMRGO_LAYER2_PLACEMENT_IN_ORDER ((dmrgo_layer2_placement_t)0)
/* Go: layer2.PlacementLate. PlacementLate is a burst whose sequence number is at most 32 behind the last one. */
#define DMRGO_LAYER2_PLACEMENT_LATE ((dmrgo_layer2_placement_t)2)
/* Go: layer2.RawBurstSize. RawBurstSize is the length of a RawBurst in octets: the 264 bits of a burst. */
#define DMRGO_LAYER2_RAW_BURST_SIZE 33
/* Go: layer2.SyncSourceBS. SyncSourceBS is a BS-sourced (outbound) transmission. */
#define DMRGO_LAYER2_SYNC_SOURCE_BS ((dmrgo_layer2_sync_source_t)0)
/* Go: layer2.SyncSourceDirectTS1. SyncSourceDirectTS1 is a direct mode transmission on TDMA time slot 1. */
#define DMRGO_LAYER2_SYNC_SOURCE_DIRECT_TS1 ((dmrgo_layer2_sync_source_t)2)
/* Go: layer2.SyncSourceDirectTS2. SyncSourceDirectTS2 is a direct mode transmission on TDMA time slot 2. */
#define DMRGO_LAYER2_SYNC_SOURCE_DIRECT_TS2 ((dmrgo_layer2_sync_source_t)3)
/* Go: layer2.SyncSourceMS. SyncSourceMS is an MS-sourced (inbound) transmission. */
#define DMRGO_LAYER2_SYNC_SOURCE_MS ((dmrgo_layer2_sync_source_t)1)
/* Go: layer2.TACTBits. TACTBits is the number of bits in the TACT field. */
#define DMRGO_LAYER2_TACT_BITS 7
/* Go: layer2.VoiceBurstsPerSuperframe. VoiceBurstsPerSuperframe is the number of voice bursts in a superframe. */
#define DMRGO_LAYER2_VOICE_BURSTS_PER_SUPERFRAME 6
/* Go: layer2.VoiceSlotsPerBurst. VoiceSlotsPerBurst is the number of 72-bit vocoder slots in a voice burst. */
#define DMRGO_LAYER2_VOICE_SLOTS_PER_BURST 3
/* Go: framer.DefaultMaxMisses. DefaultMaxMisses is the default number of bursts without a SYNC that a locked Framer emits before it loses lock. */
#define DMRGO_FRAMER_DEFAULT_MAX_MISSES 12
/* Go: framer.MaxPeriod. MaxPeriod is the largest dmrgo_framer_config_t.period. */
#define DMRGO_FRAMER_MAX_PERIOD 65536
/* Go: framer.OutboundPeriod. OutboundPeriod is the bit period of bursts in a BS outbound stream: one CACH and one burst. */
#define DMRGO_FRAMER_OUTBOUND_PERIOD 288
/* Go: framer.SlotPeriod. SlotPeriod is the bit period of the bursts of one TDMA channel. */
#define DMRGO_FRAMER_SLOT_PERIOD 576
/* Go: framer.SyncBits. SyncBits is the length of the SYNC field. */
#define DMRGO_FRAMER_SYNC_BITS 48
/* Go: framer.SyncOffset. SyncOffset is the burst bit at which the SYNC field starts. */
#define DMRGO_FRAMER_SYNC_OFFSET 108
/* Go: packet.ResponseACK. ResponseACK acknowledges all blocks of all packets up to NI. */
#define DMRGO_PACKET_RESPONSE_ACK ((dmrgo_packet_response_t)1)
/* Go: packet.ResponseNACKFSNOutOfSequence. ResponseNACKFSNOutOfSequence rejects a packet whose FSN is out of sequence. */
#define DMRGO_PACKET_RESPONSE_NACK_FSN_OUT_OF_SEQUENCE ((dmrgo_packet_response_t)11)
/* Go: packet.ResponseNACKIllegalFormat. ResponseNACKIllegalFormat rejects a packet with an illegal format. */
#define DMRGO_PACKET_RESPONSE_NACK_ILLEGAL_FORMAT ((dmrgo_packet_response_t)8)
/* Go: packet.ResponseNACKInvalidUser. ResponseNACKInvalidUser rejects a user the system disallows. */
#define DMRGO_PACKET_RESPONSE_NACK_INVALID_USER ((dmrgo_packet_response_t)14)
/* Go: packet.ResponseNACKMemoryFull. ResponseNACKMemoryFull rejects a packet because the recipient memory is full. */
#define DMRGO_PACKET_RESPONSE_NACK_MEMORY_FULL ((dmrgo_packet_response_t)10)
/* Go: packet.ResponseNACKOutOfSequence. ResponseNACKOutOfSequence rejects a packet whose N(S) is not VI or VI + 1. */
#define DMRGO_PACKET_RESPONSE_NACK_OUT_OF_SEQUENCE ((dmrgo_packet_response_t)13)
/* Go: packet.ResponseNACKPacketCRC. ResponseNACKPacketCRC rejects a packet whose message CRC failed. */
#define DMRGO_PACKET_RESPONSE_NACK_PACKET_CRC ((dmrgo_packet_response_t)9)
/* Go: packet.ResponseNACKUndeliverable. ResponseNACKUndeliverable rejects an undeliverable packet. */
#define DMRGO_PACKET_RESPONSE_NACK_UNDELIVERABLE ((dmrgo_packet_response_t)12)
/* Go: packet.ResponseSACK. ResponseSACK requests the selective retry of the blocks flagged in the response data blocks. */
#define DMRGO_PACKET_RESPONSE_SACK ((dmrgo_packet_response_t)16)
/* Go: pdu.CRC7MaskRC. CRC7MaskRC is the CRC-7 data type mask for Reverse Channel PDUs (ETSI TS 102 361-1 Table B.21). */
#define DMRGO_PDU_CRC7_MASK_RC 122
/* Go: pdu.CSBKAckInbound. C_ACKU */
#define DMRGO_PDU_CSBK_ACK_INBOUND ((dmrgo_pdu_csbk_opcode_t)33)
/* Go: pdu.CSBKAckInboundPayload. P_ACKU */
#define DMRGO_PDU_CSBK_ACK_INBOUND_PAYLOAD ((dmrgo_pdu_csbk_opcode_t)35)
/* Go: pdu.CSBKAckOutbound. C_ACKD */
#define DMRGO_PDU_CSBK_ACK_OUTBOUND ((dmrgo_pdu_csbk_opcode_t)32)
/* Go: pdu.CSBKAckOutboundPayload. P_ACKD */
#define DMRGO_PDU_CSBK_ACK_OUTBOUND_PAYLOAD ((dmrgo_pdu_csbk_opcode_t)34)
/* Go: pdu.CSBKAckvitation. C_ACKVIT */
#define DMRGO_PDU_CSBK_ACKVITATION ((dmrgo_pdu_csbk_opcode_t)30)
/* Go: pdu.CSBKAhoy. C_AHOY and P_AHOY */
#define DMRGO_PDU_CSBK_AHOY ((dmrgo_pdu_csbk_opcode_t)28)
/* Go: pdu.CSBKAloha. C_ALOHA */
#define DMRGO_PDU_CSBK_ALOHA ((dmrgo_pdu_csbk_opcode_t)25)
/* Go: pdu.CSBKBSOutboundActivation. BS_Dwn_Act, same value as DMRGO_PDU_CSBK_TALKGROUP_DATA_GRANT_MULTI_ITEM */
#define DMRGO_PDU_CSBK_BS_OUTBOUND_ACTIVATION ((dmrgo_pdu_csbk_opcode_t)56)
/* Go: pdu.CSBKBroadcast. C_BCAST */
#define DMRGO_PDU_CSBK_BROADCAST ((dmrgo_pdu_csbk_opcode_t)40)
/* Go: pdu.CSBKBroadcastTalkgroupVoiceGrant. BTV_GRANT */
#define DMRGO_PDU_CSBK_BROADCAST_TALKGROUP_VOICE_GRANT ((dmrgo_pdu_csbk_opcode_t)50)
/* Go: pdu.CSBKCapacityPlusDataRevertAnnouncement. enhanced data revert window announcement */
#define DMRGO_PDU_CSBK_CAPACITY_PLUS_DATA_REVERT_ANNOUNCEMENT ((dmrgo_pdu_csbk_opcode_t)41)
/* Go: pdu.CSBKCapacityPlusDataRevertGrant. enhanced data revert window grant */
#define DMRGO_PDU_CSBK_CAPACITY_PLUS_DATA_REVERT_GRANT ((dmrgo_pdu_csbk_opcode_t)42)
/* Go: pdu.CSBKCapacityPlusNeighbors. neighbor sites of a Linked Capacity Plus site */
#define DMRGO_PDU_CSBK_CAPACITY_PLUS_NEIGHBORS ((dmrgo_pdu_csbk_opcode_t)59)
/* Go: pdu.CSBKCapacityPlusPreamble. preamble with the rest LSN */
#define DMRGO_PDU_CSBK_CAPACITY_PLUS_PREAMBLE ((dmrgo_pdu_csbk_opcode_t)61)
/* Go: pdu.CSBKCapacityPlusSiteStatus. rest LSN and channel activity */
#define DMRGO_PDU_CSBK_CAPACITY_PLUS_SITE_STATUS ((dmrgo_pdu_csbk_opcode_t)62)
/* Go: pdu.CSBKChannelTiming. CT_CSBK */
#define DMRGO_PDU_CSBK_CHANNEL_TIMING ((dmrgo_pdu_csbk_opcode_t)7)
/* Go: pdu.CSBKClear. P_CLEAR */
#define DMRGO_PDU_CSBK_CLEAR ((dmrgo_pdu_csbk_opcode_t)46)
/* Go: pdu.CSBKDuplexPrivateDataGrant. PD_GRANT_DX */
#define DMRGO_PDU_CSBK_DUPLEX_PRIVATE_DATA_GRANT ((dmrgo_pdu_csbk_opcode_t)54)
/* Go: pdu.CSBKDuplexPrivateVoiceGrant. PV_GRANT_DX */
#define DMRGO_PDU_CSBK_DUPLEX_PRIVATE_VOICE_GRANT ((dmrgo_pdu_csbk_opcode_t)53)
/* Go: pdu.CSBKMaintenance. P_MAINT */
#define DMRGO_PDU_CSBK_MAINTENANCE ((dmrgo_pdu_csbk_opcode_t)42)
/* Go: pdu.CSBKMotorolaCallAlert. call alert */
#define DMRGO_PDU_CSBK_MOTOROLA_CALL_ALERT ((dmrgo_pdu_csbk_opcode_t)31)
/* Go: pdu.CSBKMotorolaCallAlertAck. call alert acknowledgement */
#define DMRGO_PDU_CSBK_MOTOROLA_CALL_ALERT_ACK ((dmrgo_pdu_csbk_opcode_t)32)
/* Go: pdu.CSBKMotorolaRadioCheck. radio check request and answer */
#define DMRGO_PDU_CSBK_MOTOROLA_RADIO_CHECK ((dmrgo_pdu_csbk_opcode_t)36)
/* Go: pdu.CSBKMove. C_MOVE */
#define DMRGO_PDU_CSBK_MOVE ((dmrgo_pdu_csbk_opcode_t)57)
/* Go: pdu.CSBKNegativeAcknowledgement. NACK_Rsp */
#define DMRGO_PDU_CSBK_NEGATIVE_ACKNOWLEDGEMENT ((dmrgo_pdu_csbk_opcode_t)38)
/* Go: pdu.CSBKPreamble. Pre_CSBK */
#define DMRGO_PDU_CSBK_PREAMBLE ((dmrgo_pdu_csbk_opcode_t)61)
/* Go: pdu.CSBKPrivateDataGrant. PD_GRANT */
#define DMRGO_PDU_CSBK_PRIVATE_DATA_GRANT ((dmrgo_pdu_csbk_opcode_t)51)
/* Go: pdu.CSBKPrivateDataGrantMultiItem. PD_GRANT_MI */
#define DMRGO_PDU_CSBK_PRIVATE_DATA_GRANT_MULTI_ITEM ((dmrgo_pdu_csbk_opcode_t)55)
/* Go: pdu.CSBKPrivateVoiceGrant. PV_GRANT */
#define DMRGO_PDU_CSBK_PRIVATE_VOICE_GRANT ((dmrgo_pdu_csbk_opcode_t)48)
/* Go: pdu.CSBKProtect. P_PROTECT */
#define DMRGO_PDU_CSBK_PROTECT ((dmrgo_pdu_csbk_opcode_t)47)
/* Go: pdu.CSBKRandomAccess. C_RAND */
#define DMRGO_PDU_CSBK_RANDOM_ACCESS ((dmrgo_pdu_csbk_opcode_t)31)
/* Go: pdu.CSBKTalkgroupDataGrant. TD_GRANT */
#define DMRGO_PDU_CSBK_TALKGROUP_DATA_GRANT ((dmrgo_pdu_csbk_opcode_t)52)
/* Go: pdu.CSBKTalkgroupDataGrantMultiItem. TD_GRANT_MI, same value as DMRGO_PDU_CSBK_BS_OUTBOUND_ACTIVATION */
#define DMRGO_PDU_CSBK_TALKGROUP_DATA_GRANT_MULTI_ITEM ((dmrgo_pdu_csbk_opcode_t)56)
/* Go: pdu.CSBKTalkgroupVoiceGrant. TV_GRANT */
#define DMRGO_PDU_CSBK_TALKGROUP_VOICE_GRANT ((dmrgo_pdu_csbk_opcode_t)49)
/* Go: pdu.CSBKUnitToUnitVoiceServiceAnswerResponse. UU_Ans_Rsp */
#define DMRGO_PDU_CSBK_UNIT_TO_UNIT_VOICE_SERVICE_ANSWER_RESPONSE ((dmrgo_pdu_csbk_opcode_t)5)
/* Go: pdu.CSBKUnitToUnitVoiceServiceRequest. UU_V_Req */
#define DMRGO_PDU_CSBK_UNIT_TO_UNIT_VOICE_SERVICE_REQUEST ((dmrgo_pdu_csbk_opcode_t)4)
/* Go: pdu.CapacityPlusMaxBlocks. CapacityPlusMaxBlocks is the most CSBK blocks of one Capacity Plus site status that CapacityPlusSiteStatusAssembler joins: enough for 16 busy talkgroup LSNs and 16 busy radio LSNs. */
#define DMRGO_PDU_CAPACITY_PLUS_MAX_BLOCKS 8
/* Go: pdu.CapacityPlusMaxLSN. CapacityPlusMaxLSN is the highest logical slot number (LSN) of a Capacity Plus site: 8 repeaters of 2 timeslots. */
#define DMRGO_PDU_CAPACITY_PLUS_MAX_LSN 16
/* Go: pdu.CapacityPlusSegmentContinuation. a middle block */
#define DMRGO_PDU_CAPACITY_PLUS_SEGMENT_CONTINUATION ((dmrgo_pdu_capacity_plus_segment_t)0)
/* Go: pdu.CapacityPlusSegmentFirst. the first block */
#define DMRGO_PDU_CAPACITY_PLUS_SEGMENT_FIRST ((dmrgo_pdu_capacity_plus_segment_t)2)
/* Go: pdu.CapacityPlusSegmentLast. the last block */
#define DMRGO_PDU_CAPACITY_PLUS_SEGMENT_LAST ((dmrgo_pdu_capacity_plus_segment_t)1)
/* Go: pdu.CapacityPlusSegmentSingle. the only block */
#define DMRGO_PDU_CAPACITY_PLUS_SEGMENT_SINGLE ((dmrgo_pdu_capacity_plus_segment_t)3)
/* Go: pdu.FLCOCapacityPlusGroupVoiceGrant. group voice call grant */
#define DMRGO_PDU_FLCO_CAPACITY_PLUS_GROUP_VOICE_GRANT ((dmrgo_enums_flco_t)4)
/* Go: pdu.FLCOCapacityPlusPrivateVoiceGrant. private voice call grant */
#define DMRGO_PDU_FLCO_CAPACITY_PLUS_PRIVATE_VOICE_GRANT ((dmrgo_enums_flco_t)7)
/* Go: pdu.FormatConfirmed. C_HEAD */
#define DMRGO_PDU_FORMAT_CONFIRMED ((dmrgo_pdu_format_t)3)
/* Go: pdu.FormatProprietary. P_HEAD */
#define DMRGO_PDU_FORMAT_PROPRIETARY ((dmrgo_pdu_format_t)15)
/* Go: pdu.FormatResponsePacket. C_RHEAD */
#define DMRGO_PDU_FORMAT_RESPONSE_PACKET ((dmrgo_pdu_format_t)1)
/* Go: pdu.FormatShortDataDefined. DD_HEAD */
#define DMRGO_PDU_FORMAT_SHORT_DATA_DEFINED ((dmrgo_pdu_format_t)13)
/* Go: pdu.FormatShortDataRawOrStatusPrecoded. R_HEAD or SP_HEAD */
#define DMRGO_PDU_FORMAT_SHORT_DATA_RAW_OR_STATUS_PRECODED ((dmrgo_pdu_format_t)14)
/* Go: pdu.FormatUnconfirmed. U_HEAD */
#define DMRGO_PDU_FORMAT_UNCONFIRMED ((dmrgo_pdu_format_t)2)
/* Go: pdu.FormatUnifiedDataTransport. UDT_HEAD */
#define DMRGO_PDU_FORMAT_UNIFIED_DATA_TRANSPORT ((dmrgo_pdu_format_t)0)
/* Go: pdu.NetworkModelHuge. Huge (2 bits) */
#define DMRGO_PDU_NETWORK_MODEL_HUGE ((dmrgo_pdu_network_model_t)3)
/* Go: pdu.NetworkModelLarge. Large (4 bits) */
#define DMRGO_PDU_NETWORK_MODEL_LARGE ((dmrgo_pdu_network_model_t)2)
/* Go: pdu.NetworkModelSmall. Small (7 bits) */
#define DMRGO_PDU_NETWORK_MODEL_SMALL ((dmrgo_pdu_network_model_t)1)
/* Go: pdu.NetworkModelTiny. Tiny (9 bits) */
#define DMRGO_PDU_NETWORK_MODEL_TINY ((dmrgo_pdu_network_model_t)0)
/* Go: pdu.Opcode0x38BSOutboundActivation. Opcode0x38BSOutboundActivation hints at BS_Dwn_Act, which an MS sends (ETSI TS 102 361-2 clause 5.1.1.1). */
#define DMRGO_PDU_OPCODE0X38_BS_OUTBOUND_ACTIVATION ((dmrgo_pdu_opcode0x38_hint_t)1)
/* Go: pdu.Opcode0x38TalkgroupDataGrantMultiItem. Opcode0x38TalkgroupDataGrantMultiItem hints at TD_GRANT_MI, which a TSCC sends (ETSI TS 102 361-4 clause 7.1.1.1.1). */
#define DMRGO_PDU_OPCODE0X38_TALKGROUP_DATA_GRANT_MULTI_ITEM ((dmrgo_pdu_opcode0x38_hint_t)2)
/* Go: pdu.Opcode0x38Unknown. Opcode0x38Unknown gives no hint. */
#define DMRGO_PDU_OPCODE0X38_UNKNOWN ((dmrgo_pdu_opcode0x38_hint_t)0)
/* Go: pdu.SLCOCapacityPlusRestChannel. SLCOCapacityPlusRestChannel is the Short LC opcode of the Capacity Plus rest channel announcement. */
#define DMRGO_PDU_SLCO_CAPACITY_PLUS_REST_CHANNEL ((dmrgo_enums_slco_t)15)
/* Go: pdu.ServiceTypeLIP. Location Information Protocol */
#define DMRGO_PDU_SERVICE_TYPE_LIP ((dmrgo_pdu_service_type_t)0)
/* Go: pdu.ServiceTypeManufacturerSpecific1. manufacturer specific service 1 */
#define DMRGO_PDU_SERVICE_TYPE_MANUFACTURER_SPECIFIC1 ((dmrgo_pdu_service_type_t)8)
/* Go: pdu.ServiceTypeManufacturerSpecific2. manufacturer specific service 2 */
#define DMRGO_PDU_SERVICE_TYPE_MANUFACTURER_SPECIFIC2 ((dmrgo_pdu_service_type_t)9)
/* Go: pdu.ServiceTypeManufacturerSpecific3. manufacturer specific service 3 */
#define DMRGO_PDU_SERVICE_TYPE_MANUFACTURER_SPECIFIC3 ((dmrgo_pdu_service_type_t)10)
/* Go: pdu.ServiceTypeManufacturerSpecific4. manufacturer specific service 4 */
#define DMRGO_PDU_SERVICE_TYPE_MANUFACTURER_SPECIFIC4 ((dmrgo_pdu_service_type_t)11)
/* Go: pdu.ServiceTypeManufacturerSpecific5. manufacturer specific service 5 */
#define DMRGO_PDU_SERVICE_TYPE_MANUFACTURER_SPECIFIC5 ((dmrgo_pdu_service_type_t)12)
/* Go: pdu.ServiceTypeManufacturerSpecific6. manufacturer specific service 6 */
#define DMRGO_PDU_SERVICE_TYPE_MANUFACTURER_SPECIFIC6 ((dmrgo_pdu_service_type_t)13)
/* Go: pdu.ServiceTypeManufacturerSpecific7. manufacturer specific service 7 */
#define DMRGO_PDU_SERVICE_TYPE_MANUFACTURER_SPECIFIC7 ((dmrgo_pdu_service_type_t)14)
/* Go: pdu.ServiceTypeManufacturerSpecific8. manufacturer specific service 8 */
#define DMRGO_PDU_SERVICE_TYPE_MANUFACTURER_SPECIFIC8 ((dmrgo_pdu_service_type_t)15)
/* Go: pdu.TalkerAliasMaxText. TalkerAliasMaxText is the length of the longest UTF-8 text of an alias: 31 UTF-16 Code Units of 3 bytes each. */
#define DMRGO_PDU_TALKER_ALIAS_MAX_TEXT 93
/* Go: pdu.UDTOpcodeDGNAInboundHeader. C_DGNAHU */
#define DMRGO_PDU_UDT_OPCODE_DGNA_INBOUND_HEADER ((dmrgo_pdu_udt_opcode_t)37)
/* Go: pdu.UDTOpcodeDGNAOutboundHeader. C_DGNAHD */
#define DMRGO_PDU_UDT_OPCODE_DGNA_OUTBOUND_HEADER ((dmrgo_pdu_udt_opcode_t)36)
/* Go: pdu.UDTOpcodeInboundHeader. C_UDTHU */
#define DMRGO_PDU_UDT_OPCODE_INBOUND_HEADER ((dmrgo_pdu_udt_opcode_t)27)
/* Go: pdu.UDTOpcodeOutboundHeader. C_UDTHD */
#define DMRGO_PDU_UDT_OPCODE_OUTBOUND_HEADER ((dmrgo_pdu_udt_opcode_t)26)
/* Go: layer3.AdditionalInfoIgnore. ignore the additional information */
#define DMRGO_LAYER3_ADDITIONAL_INFO_IGNORE ((dmrgo_layer3_additional_information_field_t)0)
/* Go: layer3.AdditionalInfoValid. the additional information is valid */
#define DMRGO_LAYER3_ADDITIONAL_INFO_VALID ((dmrgo_layer3_additional_information_field_t)1)
/* Go: layer3.PositionErrorUnknown. position error not known */
#define DMRGO_LAYER3_POSITION_ERROR_UNKNOWN ((dmrgo_layer3_position_accuracy_t)7)
/* Go: layer3.PositionLessThan200KM. less than or equal to 200 km */
#define DMRGO_LAYER3_POSITION_LESS_THAN200_KM ((dmrgo_layer3_position_accuracy_t)5)
/* Go: layer3.PositionLessThan200M. less than 200 m */
#define DMRGO_LAYER3_POSITION_LESS_THAN200M ((dmrgo_layer3_position_accuracy_t)2)
/* Go: layer3.PositionLessThan20KM. less than 20 km */
#define DMRGO_LAYER3_POSITION_LESS_THAN20_KM ((dmrgo_layer3_position_accuracy_t)4)
/* Go: layer3.PositionLessThan20M. less than 20 m */
#define DMRGO_LAYER3_POSITION_LESS_THAN20M ((dmrgo_layer3_position_accuracy_t)1)
/* Go: layer3.PositionLessThan2KM. less than 2 km */
#define DMRGO_LAYER3_POSITION_LESS_THAN2_KM ((dmrgo_layer3_position_accuracy_t)3)
/* Go: layer3.PositionLessThan2M. less than 2 m */
#define DMRGO_LAYER3_POSITION_LESS_THAN2M ((dmrgo_layer3_position_accuracy_t)0)
/* Go: layer3.PositionMoreThan200KM. more than 200 km */
#define DMRGO_LAYER3_POSITION_MORE_THAN200_KM ((dmrgo_layer3_position_accuracy_t)6)
/* Go: layer3.SourceTypeBS. BS sourced */
#define DMRGO_LAYER3_SOURCE_TYPE_BS ((dmrgo_layer3_source_type_t)0)
/* Go: layer3.SourceTypeMS. MS sourced */
#define DMRGO_LAYER3_SOURCE_TYPE_MS ((dmrgo_layer3_source_type_t)1)
/* Go: layer3.TalkerAliasISOEightBit. ISO 8-bit characters */
#define DMRGO_LAYER3_TALKER_ALIAS_ISO_EIGHT_BIT ((dmrgo_layer3_talker_alias_data_format_t)1)
/* Go: layer3.TalkerAliasSevenBit. 7-bit characters */
#define DMRGO_LAYER3_TALKER_ALIAS_SEVEN_BIT ((dmrgo_layer3_talker_alias_data_format_t)0)
/* Go: layer3.TalkerAliasUTF16. Unicode UTF-16BE */
#define DMRGO_LAYER3_TALKER_ALIAS_UTF16 ((dmrgo_layer3_talker_alias_data_format_t)3)
/* Go: layer3.TalkerAliasUTF8. Unicode UTF-8 */
#define DMRGO_LAYER3_TALKER_ALIAS_UTF8 ((dmrgo_layer3_talker_alias_data_format_t)2)
/* Go: lip.ElementAltitudeAccuracy. location altitude and location altitude accuracy */
#define DMRGO_LIP_ELEMENT_ALTITUDE_ACCURACY ((dmrgo_lip_element_id_t)5)
/* Go: lip.ElementBacklogAvailable. backlog information available, 10 bits */
#define DMRGO_LIP_ELEMENT_BACKLOG_AVAILABLE ((dmrgo_lip_element_id_t)23)
/* Go: lip.ElementBacklogContinuation. backlog continuation state */
#define DMRGO_LIP_ELEMENT_BACKLOG_CONTINUATION ((dmrgo_lip_element_id_t)24)
/* Go: lip.ElementDefaultLifetime. default enable/disable lifetime, 2 bits */
#define DMRGO_LIP_ELEMENT_DEFAULT_LIFETIME ((dmrgo_lip_element_id_t)9)
/* Go: lip.ElementDestination. location information destination */
#define DMRGO_LIP_ELEMENT_DESTINATION ((dmrgo_lip_element_id_t)4)
/* Go: lip.ElementDirectionAccuracy. direction of travel and direction of travel accuracy */
#define DMRGO_LIP_ELEMENT_DIRECTION_ACCURACY ((dmrgo_lip_element_id_t)0)
/* Go: lip.ElementExtendedUserData. extended user defined data */
#define DMRGO_LIP_ELEMENT_EXTENDED_USER_DATA ((dmrgo_lip_element_id_t)1)
/* Go: lip.ElementIdentification. terminal or location identification */
#define DMRGO_LIP_ELEMENT_IDENTIFICATION ((dmrgo_lip_element_id_t)17)
/* Go: lip.ElementMaxInformationAge. maximum information age, 7 bits */
#define DMRGO_LIP_ELEMENT_MAX_INFORMATION_AGE ((dmrgo_lip_element_id_t)7)
/* Go: lip.ElementMaxResponseTime. maximum response time, 7 bits */
#define DMRGO_LIP_ELEMENT_MAX_RESPONSE_TIME ((dmrgo_lip_element_id_t)8)
/* Go: lip.ElementMessageReference. location message reference, 8 bits */
#define DMRGO_LIP_ELEMENT_MESSAGE_REFERENCE ((dmrgo_lip_element_id_t)6)
/* Go: lip.ElementPositionAccuracy. horizontal position and horizontal position accuracy */
#define DMRGO_LIP_ELEMENT_POSITION_ACCURACY ((dmrgo_lip_element_id_t)2)
/* Go: lip.ElementRequestPriority. request priority, 2 bits */
#define DMRGO_LIP_ELEMENT_REQUEST_PRIORITY ((dmrgo_lip_element_id_t)11)
/* Go: lip.ElementResultCode. result code, 8 bits */
#define DMRGO_LIP_ELEMENT_RESULT_CODE ((dmrgo_lip_element_id_t)12)
/* Go: lip.ElementSDSType1Value. SDS type-1 value, 16 bits */
#define DMRGO_LIP_ELEMENT_SDS_TYPE1_VALUE ((dmrgo_lip_element_id_t)13)
/* Go: lip.ElementStartTime. start time, 22 bits */
#define DMRGO_LIP_ELEMENT_START_TIME ((dmrgo_lip_element_id_t)14)
/* Go: lip.ElementStatusValue. status value, 16 bits */
#define DMRGO_LIP_ELEMENT_STATUS_VALUE ((dmrgo_lip_element_id_t)15)
/* Go: lip.ElementStopTime. stop time, 22 bits */
#define DMRGO_LIP_ELEMENT_STOP_TIME ((dmrgo_lip_element_id_t)16)
/* Go: lip.ElementTemporaryControl. temporary control parameter definition */
#define DMRGO_LIP_ELEMENT_TEMPORARY_CONTROL ((dmrgo_lip_element_id_t)22)
/* Go: lip.ElementTriggerDefinition. trigger definition */
#define DMRGO_LIP_ELEMENT_TRIGGER_DEFINITION ((dmrgo_lip_element_id_t)19)
/* Go: lip.ElementTriggerRemoval. trigger removal */
#define DMRGO_LIP_ELEMENT_TRIGGER_REMOVAL ((dmrgo_lip_element_id_t)20)
/* Go: lip.ElementVelocityAccuracy. horizontal velocity and horizontal velocity accuracy */
#define DMRGO_LIP_ELEMENT_VELOCITY_ACCURACY ((dmrgo_lip_element_id_t)3)
/* Go: lip.ElementVerticalAccuracy. vertical velocity and vertical velocity accuracy */
#define DMRGO_LIP_ELEMENT_VERTICAL_ACCURACY ((dmrgo_lip_element_id_t)21)
/* Go: lip.ExtensionAddModifyTrigger. add/modify trigger request or response */
#define DMRGO_LIP_EXTENSION_ADD_MODIFY_TRIGGER ((dmrgo_lip_extension_t)6)
/* Go: lip.ExtensionBacklog. backlog request or response */
#define DMRGO_LIP_EXTENSION_BACKLOG ((dmrgo_lip_extension_t)12)
/* Go: lip.ExtensionBasicParameters. basic location parameters request or response */
#define DMRGO_LIP_EXTENSION_BASIC_PARAMETERS ((dmrgo_lip_extension_t)5)
/* Go: lip.ExtensionEnableDisable. location reporting enable/disable request or response */
#define DMRGO_LIP_EXTENSION_ENABLE_DISABLE ((dmrgo_lip_extension_t)10)
/* Go: lip.ExtensionImmediateReport. immediate location report request */
#define DMRGO_LIP_EXTENSION_IMMEDIATE_REPORT ((dmrgo_lip_extension_t)1)
/* Go: lip.ExtensionLongReport. long location report */
#define DMRGO_LIP_EXTENSION_LONG_REPORT ((dmrgo_lip_extension_t)3)
/* Go: lip.ExtensionRemoveTrigger. remove trigger request or response */
#define DMRGO_LIP_EXTENSION_REMOVE_TRIGGER ((dmrgo_lip_extension_t)7)
/* Go: lip.ExtensionReportAck. location report acknowledgement */
#define DMRGO_LIP_EXTENSION_REPORT_ACK ((dmrgo_lip_extension_t)4)
/* Go: lip.ExtensionReportBasicParams. report basic location parameters request or response */
#define DMRGO_LIP_EXTENSION_REPORT_BASIC_PARAMS ((dmrgo_lip_extension_t)9)
/* Go: lip.ExtensionReportTrigger. report trigger request or response */
#define DMRGO_LIP_EXTENSION_REPORT_TRIGGER ((dmrgo_lip_extension_t)8)
/* Go: lip.ExtensionTemporaryControl. location reporting temporary control request or response */
#define DMRGO_LIP_EXTENSION_TEMPORARY_CONTROL ((dmrgo_lip_extension_t)11)
/* Go: lip.ReportLongElapsed. a long location report with DMRGO_LIP_TIME_ELAPSED */
#define DMRGO_LIP_REPORT_LONG_ELAPSED ((dmrgo_lip_report_type_t)1)
/* Go: lip.ReportLongNoTime. a long location report without time */
#define DMRGO_LIP_REPORT_LONG_NO_TIME ((dmrgo_lip_report_type_t)0)
/* Go: lip.ReportLongPosition. a long location report with DMRGO_LIP_TIME_POSITION */
#define DMRGO_LIP_REPORT_LONG_POSITION ((dmrgo_lip_report_type_t)2)
/* Go: lip.ReportShort. a short location report */
#define DMRGO_LIP_REPORT_SHORT ((dmrgo_lip_report_type_t)3)
/* Go: lip.ShapeArc. a point, the radii, the angles and Confidence */
#define DMRGO_LIP_SHAPE_ARC ((dmrgo_lip_shape_t)9)
/* Go: lip.ShapeCircle. a point and Uncertainty */
#define DMRGO_LIP_SHAPE_CIRCLE ((dmrgo_lip_shape_t)2)
/* Go: lip.ShapeCircleAltitude. a circle and the altitude */
#define DMRGO_LIP_SHAPE_CIRCLE_ALTITUDE ((dmrgo_lip_shape_t)5)
/* Go: lip.ShapeCircleAltitudeUncertainty. a circle, the altitude and AltitudeUncertainty */
#define DMRGO_LIP_SHAPE_CIRCLE_ALTITUDE_UNCERTAINTY ((dmrgo_lip_shape_t)7)
/* Go: lip.ShapeEllipse. a point, the axes, Angle and Confidence */
#define DMRGO_LIP_SHAPE_ELLIPSE ((dmrgo_lip_shape_t)3)
/* Go: lip.ShapeEllipseAltitude. an ellipse and the altitude */
#define DMRGO_LIP_SHAPE_ELLIPSE_ALTITUDE ((dmrgo_lip_shape_t)6)
/* Go: lip.ShapeEllipseAltitudeUncertainty. an ellipse, the altitude and AltitudeUncertainty */
#define DMRGO_LIP_SHAPE_ELLIPSE_ALTITUDE_UNCERTAINTY ((dmrgo_lip_shape_t)8)
/* Go: lip.ShapeNone. no position */
#define DMRGO_LIP_SHAPE_NONE ((dmrgo_lip_shape_t)0)
/* Go: lip.ShapePoint. longitude and latitude */
#define DMRGO_LIP_SHAPE_POINT ((dmrgo_lip_shape_t)1)
/* Go: lip.ShapePointAltitude. a point and the altitude */
#define DMRGO_LIP_SHAPE_POINT_ALTITUDE ((dmrgo_lip_shape_t)4)
/* Go: lip.ShapePointPositionError. a point and PositionError */
#define DMRGO_LIP_SHAPE_POINT_POSITION_ERROR ((dmrgo_lip_shape_t)10)
/* Go: lip.TimeElapsed. dmrgo_lip_time_t.elapsed */
#define DMRGO_LIP_TIME_ELAPSED ((dmrgo_lip_time_type_t)1)
/* Go: lip.TimeNone. no time */
#define DMRGO_LIP_TIME_NONE ((dmrgo_lip_time_type_t)0)
/* Go: lip.TimePosition. dmrgo_lip_time_t.day to dmrgo_lip_time_t.second */
#define DMRGO_LIP_TIME_POSITION ((dmrgo_lip_time_type_t)2)
/* Go: lip.VelocityAll. Horizontal, Vertical, Direction and their uncertainties */
#define DMRGO_LIP_VELOCITY_ALL ((dmrgo_lip_velocity_type_t)7)
/* Go: lip.VelocityHorizontal. Horizontal */
#define DMRGO_LIP_VELOCITY_HORIZONTAL ((dmrgo_lip_velocity_type_t)1)
/* Go: lip.VelocityHorizontalDirection. Horizontal and Direction */
#define DMRGO_LIP_VELOCITY_HORIZONTAL_DIRECTION ((dmrgo_lip_velocity_type_t)5)
/* Go: lip.VelocityHorizontalDirectionUncertain. Horizontal, Direction and their uncertainties */
#define DMRGO_LIP_VELOCITY_HORIZONTAL_DIRECTION_UNCERTAIN ((dmrgo_lip_velocity_type_t)6)
/* Go: lip.VelocityHorizontalUncertainty. Horizontal and its uncertainty */
#define DMRGO_LIP_VELOCITY_HORIZONTAL_UNCERTAINTY ((dmrgo_lip_velocity_type_t)2)
/* Go: lip.VelocityHorizontalVertical. Horizontal and Vertical */
#define DMRGO_LIP_VELOCITY_HORIZONTAL_VERTICAL ((dmrgo_lip_velocity_type_t)3)
/* Go: lip.VelocityHorizontalVerticalUncertain. Horizontal, Vertical and their uncertainties */
#define DMRGO_LIP_VELOCITY_HORIZONTAL_VERTICAL_UNCERTAIN ((dmrgo_lip_velocity_type_t)4)
/* Go: lip.VelocityNone. no velocity */
#define DMRGO_LIP_VELOCITY_NONE ((dmrgo_lip_velocity_type_t)0)
/* Go: location.FormatHDAP. FormatHDAP is a Hytera HDAP location protocol message to UDP port 3003: the answer to a standard request, a condition report or an emergency report. */
#define DMRGO_LOCATION_FORMAT_HDAP ((dmrgo_location_format_t)3)
/* Go: location.FormatLRRP. FormatLRRP is a MOTOTRBO LRRP report to UDP port 4001, as MOTOTRBO and Hytera radios send. */
#define DMRGO_LOCATION_FORMAT_LRRP ((dmrgo_location_format_t)2)
/* Go: location.FormatNMEA. FormatNMEA is an NMEA RMC sentence to UDP port 10110, as AnyTone radios send. */
#define DMRGO_LOCATION_FORMAT_NMEA ((dmrgo_location_format_t)1)
/* Go: ars.EncodingASCII. ASCII characters */
#define DMRGO_ARS_ENCODING_ASCII ((dmrgo_ars_encoding_t)0)
/* Go: ars.EventInitial. the radio registers after power on or a channel change */
#define DMRGO_ARS_EVENT_INITIAL ((dmrgo_ars_event_t)1)
/* Go: ars.EventNone. no event, as in a user registration */
#define DMRGO_ARS_EVENT_NONE ((dmrgo_ars_event_t)0)
/* Go: ars.EventRefresh. the radio registers again before its registration ends */
#define DMRGO_ARS_EVENT_REFRESH ((dmrgo_ars_event_t)2)
/* Go: ars.FailureDeviceNotAuthorized. in DMRGO_ARS_TYPE_ACK: the radio may not register */
#define DMRGO_ARS_FAILURE_DEVICE_NOT_AUTHORIZED ((dmrgo_ars_failure_reason_t)0)
/* Go: ars.FailureTransmission. in DMRGO_ARS_TYPE_USER_ACK: a transmission failure, as each value from 3 to 127 */
#define DMRGO_ARS_FAILURE_TRANSMISSION ((dmrgo_ars_failure_reason_t)127)
/* Go: ars.FailureUserIDNotValid. in DMRGO_ARS_TYPE_USER_ACK: the user ID is not known */
#define DMRGO_ARS_FAILURE_USER_ID_NOT_VALID ((dmrgo_ars_failure_reason_t)1)
/* Go: ars.FailureUserValidationTimeout. in DMRGO_ARS_TYPE_USER_ACK: the user validation timed out */
#define DMRGO_ARS_FAILURE_USER_VALIDATION_TIMEOUT ((dmrgo_ars_failure_reason_t)2)
/* Go: ars.TypeAck. the answer to a device registration or a query */
#define DMRGO_ARS_TYPE_ACK ((dmrgo_ars_type_t)15)
/* Go: ars.TypeDeviceDeregistration. a radio leaves */
#define DMRGO_ARS_TYPE_DEVICE_DEREGISTRATION ((dmrgo_ars_type_t)1)
/* Go: ars.TypeDeviceRegistration. a radio registers with the server */
#define DMRGO_ARS_TYPE_DEVICE_REGISTRATION ((dmrgo_ars_type_t)0)
/* Go: ars.TypeQuery. the server requests a radio to register */
#define DMRGO_ARS_TYPE_QUERY ((dmrgo_ars_type_t)4)
/* Go: ars.TypeUserAck. the answer to a user registration or deregistration */
#define DMRGO_ARS_TYPE_USER_ACK ((dmrgo_ars_type_t)7)
/* Go: ars.TypeUserDeregistration. a user logs off */
#define DMRGO_ARS_TYPE_USER_DEREGISTRATION ((dmrgo_ars_type_t)6)
/* Go: ars.TypeUserRegistration. a user logs on at a radio */
#define DMRGO_ARS_TYPE_USER_REGISTRATION ((dmrgo_ars_type_t)5)
/* Go: lrrp.DocumentImmediateReport. the answer to a DMRGO_LRRP_DOCUMENT_IMMEDIATE_REQUEST */
#define DMRGO_LRRP_DOCUMENT_IMMEDIATE_REPORT ((dmrgo_lrrp_document_id_t)7)
/* Go: lrrp.DocumentImmediateRequest. request one position */
#define DMRGO_LRRP_DOCUMENT_IMMEDIATE_REQUEST ((dmrgo_lrrp_document_id_t)5)
/* Go: lrrp.DocumentProtocolReport. the answer to a DMRGO_LRRP_DOCUMENT_PROTOCOL_REQUEST */
#define DMRGO_LRRP_DOCUMENT_PROTOCOL_REPORT ((dmrgo_lrrp_document_id_t)21)
/* Go: lrrp.DocumentProtocolRequest. request the protocol version */
#define DMRGO_LRRP_DOCUMENT_PROTOCOL_REQUEST ((dmrgo_lrrp_document_id_t)20)
/* Go: lrrp.DocumentStopAnswer. the answer to a DMRGO_LRRP_DOCUMENT_STOP_REQUEST */
#define DMRGO_LRRP_DOCUMENT_STOP_ANSWER ((dmrgo_lrrp_document_id_t)17)
/* Go: lrrp.DocumentStopRequest. stop a DMRGO_LRRP_DOCUMENT_TRIGGERED_REQUEST */
#define DMRGO_LRRP_DOCUMENT_STOP_REQUEST ((dmrgo_lrrp_document_id_t)15)
/* Go: lrrp.DocumentTriggeredAnswer. the answer to a DMRGO_LRRP_DOCUMENT_TRIGGERED_REQUEST */
#define DMRGO_LRRP_DOCUMENT_TRIGGERED_ANSWER ((dmrgo_lrrp_document_id_t)11)
/* Go: lrrp.DocumentTriggeredReport. a position that a trigger sent */
#define DMRGO_LRRP_DOCUMENT_TRIGGERED_REPORT ((dmrgo_lrrp_document_id_t)13)
/* Go: lrrp.DocumentTriggeredRequest. request positions on a trigger, such as a period */
#define DMRGO_LRRP_DOCUMENT_TRIGGERED_REQUEST ((dmrgo_lrrp_document_id_t)9)
/* Go: lrrp.DocumentUnsolicitedReport. a position sent without a request */
#define DMRGO_LRRP_DOCUMENT_UNSOLICITED_REPORT ((dmrgo_lrrp_document_id_t)19)
/* Go: lrrp.ResultDuplicateRequest. the request ID is already in use */
#define DMRGO_LRRP_RESULT_DUPLICATE_REQUEST ((dmrgo_lrrp_result_code_t)22)
/* Go: lrrp.ResultGPSInitializing. the GPS receiver has no good fix yet */
#define DMRGO_LRRP_RESULT_GPS_INITIALIZING ((dmrgo_lrrp_result_code_t)512)
/* Go: lrrp.ResultInvalidCommand. the radio cannot process the request */
#define DMRGO_LRRP_RESULT_INVALID_COMMAND ((dmrgo_lrrp_result_code_t)10)
/* Go: lrrp.ResultNoGPS. the radio has no GPS fix */
#define DMRGO_LRRP_RESULT_NO_GPS ((dmrgo_lrrp_result_code_t)16)
/* Go: lrrp.ResultSuccess. the request succeeded */
#define DMRGO_LRRP_RESULT_SUCCESS ((dmrgo_lrrp_result_code_t)0)
/* Go: lrrp.TriggerEmergency. TriggerEmergency sends a report when the radio declares an emergency. */
#define DMRGO_LRRP_TRIGGER_EMERGENCY ((dmrgo_lrrp_trigger_condition_t)2)
/* Go: tms.EncodingNone. no coding given */
#define DMRGO_TMS_ENCODING_NONE ((dmrgo_tms_encoding_t)0)
/* Go: tms.EncodingUTF16LE. UTF-16LE (UCS-2) */
#define DMRGO_TMS_ENCODING_UTF16LE ((dmrgo_tms_encoding_t)4)
/* Go: tms.TypeAck. the acknowledgement of a text message */
#define DMRGO_TMS_TYPE_ACK ((dmrgo_tms_type_t)31)
/* Go: tms.TypeAvailability. a service availability message */
#define DMRGO_TMS_TYPE_AVAILABILITY ((dmrgo_tms_type_t)16)
/* Go: tms.TypeText. a text message */
#define DMRGO_TMS_TYPE_TEXT ((dmrgo_tms_type_t)0)
/* Go: privacy.AlgorithmAES128. AlgorithmAES128 is AES-128 in OFB mode. */
#define DMRGO_PRIVACY_ALGORITHM_AES128 ((dmrgo_privacy_algorithm_t)36)
/* Go: privacy.AlgorithmAES256. AlgorithmAES256 is AES-256 in OFB mode. */
#define DMRGO_PRIVACY_ALGORITHM_AES256 ((dmrgo_privacy_algorithm_t)37)
/* Go: privacy.AlgorithmARC4. AlgorithmARC4 is ARC4 (RC4) with a 40-bit key, also called Enhanced Privacy. */
#define DMRGO_PRIVACY_ALGORITHM_ARC4 ((dmrgo_privacy_algorithm_t)33)
/* Go: privacy.AlgorithmBasic. AlgorithmBasic is Basic Privacy, a fixed pattern from a 16-bit key. */
#define DMRGO_PRIVACY_ALGORITHM_BASIC ((dmrgo_privacy_algorithm_t)0)
/* Go: privacy.AlgorithmDES. AlgorithmDES is DES in OFB mode. */
#define DMRGO_PRIVACY_ALGORITHM_DES ((dmrgo_privacy_algorithm_t)34)
/* Go: privacy.MaxKeys. MaxKeys is the most keys that a Receiver holds. */
#define DMRGO_PRIVACY_MAX_KEYS 16
/* Go: privacy.ServiceAmateur. ServiceAmateur is the amateur or amateur-satellite service, which forbids messages encoded to obscure their meaning. */
#define DMRGO_PRIVACY_SERVICE_AMATEUR ((dmrgo_service_t)1)
/* Go: privacy.ServiceLandMobile. ServiceLandMobile is a licensed land mobile service, such as private, business or public safety PMR. */
#define DMRGO_PRIVACY_SERVICE_LAND_MOBILE ((dmrgo_service_t)2)
/* Go: privacy.ServiceLicenseFree. ServiceLicenseFree is a licence-exempt service. */
#define DMRGO_PRIVACY_SERVICE_LICENSE_FREE ((dmrgo_service_t)3)
/* Go: privacy.ServiceUnknown. ServiceUnknown is a service that the caller did not state. */
#define DMRGO_PRIVACY_SERVICE_UNKNOWN ((dmrgo_service_t)0)
/* Go: rf.IQFormatCF32. IQFormatCF32 is little-endian float32, as GNU Radio gives it, with full scale at 1. */
#define DMRGO_RF_IQ_FORMAT_CF32 ((dmrgo_rf_iq_format_t)4)
/* Go: rf.IQFormatCS16. IQFormatCS16 is signed 16-bit little-endian, as PlutoSDR, LimeSDR, USRP and the radio chips give it. */
#define DMRGO_RF_IQ_FORMAT_CS16 ((dmrgo_rf_iq_format_t)3)
/* Go: rf.IQFormatCS8. IQFormatCS8 is signed 8-bit, as hackrf_transfer writes it. */
#define DMRGO_RF_IQ_FORMAT_CS8 ((dmrgo_rf_iq_format_t)2)
/* Go: rf.IQFormatCU8. IQFormatCU8 is unsigned 8-bit, as rtl_sdr writes it. */
#define DMRGO_RF_IQ_FORMAT_CU8 ((dmrgo_rf_iq_format_t)1)
/* Go: rf.IQFormatDefault. IQFormatDefault is the zero value: DMRGO_RF_IQ_FORMAT_CS16. */
#define DMRGO_RF_IQ_FORMAT_DEFAULT ((dmrgo_rf_iq_format_t)0)
/* Go: rf.MaxLookbackSlots. MaxLookbackSlots is the largest dmrgo_rf_rx_config_t.lookback_slots, 7.68 s of signal. */
#define DMRGO_RF_MAX_LOOKBACK_SLOTS 256
/* Go: rf.RegionCEPT. RegionCEPT keeps ETSI EN 300 113 for land mobile and ERC/REC 74-01 for amateur. */
#define DMRGO_RF_REGION_CEPT ((dmrgo_rf_region_t)2)
/* Go: rf.RegionChina. RegionChina keeps the 2025 MIIT notice for land mobile and the Radio Frequency Allocation Regulations for amateur. */
#define DMRGO_RF_REGION_CHINA ((dmrgo_rf_region_t)3)
/* Go: rf.RegionJapan. RegionJapan keeps the Radio Equipment Regulations for land mobile and amateur. */
#define DMRGO_RF_REGION_JAPAN ((dmrgo_rf_region_t)4)
/* Go: rf.RegionUS. RegionUS keeps 47 CFR 90.210 Emission Masks D and H and the 47 CFR 90.691 EA mask at once for land mobile, and 47 CFR 97.307 for amateur. */
#define DMRGO_RF_REGION_US ((dmrgo_rf_region_t)1)
/* Go: rf.RegionWorld. RegionWorld keeps the limits of every other region at once, the strictest of each. */
#define DMRGO_RF_REGION_WORLD ((dmrgo_rf_region_t)0)
/* Go: rf.ServiceAmateur. ServiceAmateur is the amateur or amateur-satellite service. */
#define DMRGO_RF_SERVICE_AMATEUR ((dmrgo_service_t)1)
/* Go: rf.ServiceLandMobile. ServiceLandMobile is a licensed land mobile service, such as private, business or public safety PMR. */
#define DMRGO_RF_SERVICE_LAND_MOBILE ((dmrgo_service_t)2)
/* Go: rf.ServiceLicenseFree. ServiceLicenseFree is a licence-exempt service. */
#define DMRGO_RF_SERVICE_LICENSE_FREE ((dmrgo_service_t)3)
/* Go: rf.ServiceUnknown. ServiceUnknown is a service that the caller did not state: the transmitter keeps the limits of the land mobile and amateur services at once. */
#define DMRGO_RF_SERVICE_UNKNOWN ((dmrgo_service_t)0)
/* Go: rf.Tier0. Tier0 slices the output of an FM discriminator and its matched filter. */
#define DMRGO_RF_TIER0 ((dmrgo_rf_tier_t)1)
/* Go: rf.Tier1. Tier1 adds to DMRGO_RF_TIER0 the soft decoders: a BPTC(196,96) block whose check fails by ordered statistics, C0 and C1 of each voice frame by soft ML, the embedded LC of each superframe over its four fragments and the earlier superframes of the call, and LookbackSlots slots before the first lock decoded again. */
#define DMRGO_RF_TIER1 ((dmrgo_rf_tier_t)2)
/* Go: rf.Tier2. Tier2 adds to the soft decoders of DMRGO_RF_TIER1 the detection again of the bursts with a trellis over three symbols that carries the carrier phase with each survivor, from the SYNC or EMB of the burst, within a compute budget per slot: on I/Q from the samples at 24 kHz, on audio from the carrier phase that it sums from the discriminator samples. */
#define DMRGO_RF_TIER2 ((dmrgo_rf_tier_t)3)
/* Go: rf.Tier3. Tier3 detects the bursts of DMRGO_RF_TIER2 again by log-MAP over a window of three symbols with one of 52 carrier phases in the trellis state and no compute budget, and detects each voice burst once more with the bits that its FEC fixed. */
#define DMRGO_RF_TIER3 ((dmrgo_rf_tier_t)4)
/* Go: rf.TierDefault. TierDefault is the zero value: DMRGO_RF_TIER1 for NewReceiver and NewAudioReceiver, and DMRGO_RF_TIER0 for Init and for the constructors under TinyGo. */
#define DMRGO_RF_TIER_DEFAULT ((dmrgo_rf_tier_t)0)
/* Go: sms.FormatAnyTone. FormatAnyTone is the text to UDP port 5016 that AnyTone radios send in DMR Standard mode: the octets 00 0d 00 0a, then the text in UTF-16LE. */
#define DMRGO_SMS_FORMAT_ANYTONE ((dmrgo_sms_format_t)3)
/* Go: sms.FormatDefinedData. FormatDefinedData is a short data packet (DD_HEAD) whose DD format gives the coding of the text. */
#define DMRGO_SMS_FORMAT_DEFINED_DATA ((dmrgo_sms_format_t)4)
/* Go: sms.FormatHytera. FormatHytera is the short data packet that AnyTone radios send in H-SMS mode: DD format 1 (BCD) and the HyteraText layout. */
#define DMRGO_SMS_FORMAT_HYTERA ((dmrgo_sms_format_t)5)
/* Go: sms.FormatIP. FormatIP is an ETSI text message to UDP port 5016: the text in UTF-16BE, with no prefix and no NUL, as ETSI TS 102 361-3 clause 5.7.1 gives it and as one Hytera radio sends it. */
#define DMRGO_SMS_FORMAT_IP ((dmrgo_sms_format_t)2)
/* Go: sms.FormatTMS. FormatTMS is a MOTOTRBO text message to UDP port 4007, as AnyTone radios send in M-SMS mode. */
#define DMRGO_SMS_FORMAT_TMS ((dmrgo_sms_format_t)1)
/* Go: sms.FormatUDT. FormatUDT is a UDT packet (UDT_HEAD) whose UDT Format gives the coding of the text: ISO 7-bit characters, ISO 8-bit characters read as ISO/IEC 8859-1, or UTF-16BE. */
#define DMRGO_SMS_FORMAT_UDT ((dmrgo_sms_format_t)6)
/* Go: dmrd.CommandBCKA. FreeDMR OpenBridge keepalive */
#define DMRGO_DMRD_COMMAND_BCKA ((dmrgo_dmrd_command_t)25)
/* Go: dmrd.CommandBCSQ. FreeDMR OpenBridge squelch of a stream */
#define DMRGO_DMRD_COMMAND_BCSQ ((dmrgo_dmrd_command_t)26)
/* Go: dmrd.CommandBCST. FreeDMR OpenBridge stun */
#define DMRGO_DMRD_COMMAND_BCST ((dmrgo_dmrd_command_t)27)
/* Go: dmrd.CommandBCVE. FreeDMR OpenBridge version */
#define DMRGO_DMRD_COMMAND_BCVE ((dmrgo_dmrd_command_t)28)
/* Go: dmrd.CommandDMRA. talker alias */
#define DMRGO_DMRD_COMMAND_DMRA ((dmrgo_dmrd_command_t)2)
/* Go: dmrd.CommandDMRB. DMRGateway requests a beacon from MMDVMHost */
#define DMRGO_DMRD_COMMAND_DMRB ((dmrgo_dmrd_command_t)22)
/* Go: dmrd.CommandDMRD. DMR data */
#define DMRGO_DMRD_COMMAND_DMRD ((dmrgo_dmrd_command_t)1)
/* Go: dmrd.CommandDMRE. FreeDMR OpenBridge data, versions 4 and 5 */
#define DMRGO_DMRD_COMMAND_DMRE ((dmrgo_dmrd_command_t)24)
/* Go: dmrd.CommandDMRG. GPS position of a radio */
#define DMRGO_DMRD_COMMAND_DMRG ((dmrgo_dmrd_command_t)3)
/* Go: dmrd.CommandDMRP. ping between MMDVMHost and DMRGateway */
#define DMRGO_DMRD_COMMAND_DMRP ((dmrgo_dmrd_command_t)21)
/* Go: dmrd.CommandDMRT. trunking command between MMDVMHost and DMRGateway */
#define DMRGO_DMRD_COMMAND_DMRT ((dmrgo_dmrd_command_t)23)
/* Go: dmrd.CommandMSTACK. acknowledgement from the master (DMRGO_DMRD_DIALECT_HBRP) */
#define DMRGO_DMRD_COMMAND_MSTACK ((dmrgo_dmrd_command_t)6)
/* Go: dmrd.CommandMSTCL. the master closes the connection */
#define DMRGO_DMRD_COMMAND_MSTCL ((dmrgo_dmrd_command_t)15)
/* Go: dmrd.CommandMSTNAK. refusal from the master */
#define DMRGO_DMRD_COMMAND_MSTNAK ((dmrgo_dmrd_command_t)16)
/* Go: dmrd.CommandMSTPING. keepalive request (DMRGO_DMRD_DIALECT_HBRP) */
#define DMRGO_DMRD_COMMAND_MSTPING ((dmrgo_dmrd_command_t)12)
/* Go: dmrd.CommandMSTPONG. keepalive reply from the master (DMRGO_DMRD_DIALECT_MMDVM) */
#define DMRGO_DMRD_COMMAND_MSTPONG ((dmrgo_dmrd_command_t)11)
/* Go: dmrd.CommandRPTACK. acknowledgement from the master (DMRGO_DMRD_DIALECT_MMDVM) */
#define DMRGO_DMRD_COMMAND_RPTACK ((dmrgo_dmrd_command_t)5)
/* Go: dmrd.CommandRPTC. configuration */
#define DMRGO_DMRD_COMMAND_RPTC ((dmrgo_dmrd_command_t)8)
/* Go: dmrd.CommandRPTCL. the repeater closes the connection */
#define DMRGO_DMRD_COMMAND_RPTCL ((dmrgo_dmrd_command_t)14)
/* Go: dmrd.CommandRPTG. home position of the repeater (DMRGO_DMRD_DIALECT_MMDVM) */
#define DMRGO_DMRD_COMMAND_RPTG ((dmrgo_dmrd_command_t)18)
/* Go: dmrd.CommandRPTINTR. request to interrupt the incoming call (DMRGO_DMRD_DIALECT_HBRP) */
#define DMRGO_DMRD_COMMAND_RPTINTR ((dmrgo_dmrd_command_t)20)
/* Go: dmrd.CommandRPTK. login token */
#define DMRGO_DMRD_COMMAND_RPTK ((dmrgo_dmrd_command_t)7)
/* Go: dmrd.CommandRPTL. login request */
#define DMRGO_DMRD_COMMAND_RPTL ((dmrgo_dmrd_command_t)4)
/* Go: dmrd.CommandRPTO. options */
#define DMRGO_DMRD_COMMAND_RPTO ((dmrgo_dmrd_command_t)9)
/* Go: dmrd.CommandRPTPING. keepalive request from the repeater (DMRGO_DMRD_DIALECT_MMDVM) */
#define DMRGO_DMRD_COMMAND_RPTPING ((dmrgo_dmrd_command_t)10)
/* Go: dmrd.CommandRPTPONG. keepalive reply (DMRGO_DMRD_DIALECT_HBRP) */
#define DMRGO_DMRD_COMMAND_RPTPONG ((dmrgo_dmrd_command_t)13)
/* Go: dmrd.CommandRPTRSSI. RSSI report (DMRGO_DMRD_DIALECT_HBRP) */
#define DMRGO_DMRD_COMMAND_RPTRSSI ((dmrgo_dmrd_command_t)19)
/* Go: dmrd.CommandRPTSBKN. the master requests a site beacon */
#define DMRGO_DMRD_COMMAND_RPTSBKN ((dmrgo_dmrd_command_t)17)
/* Go: dmrd.CommandUnknown. not a message of the dialect */
#define DMRGO_DMRD_COMMAND_UNKNOWN ((dmrgo_dmrd_command_t)0)
/* Go: dmrd.DialectHBRP. DialectHBRP is the HomeBrew Repeater Protocol in the form of the examples of its specification and of the Homebrew port of other masters: repeater IDs, salt and token as hex text, MSTACK, MSTPING and RPTPONG, and a 306-octet RPTC with the ID after the callsign. */
#define DMRGO_DMRD_DIALECT_HBRP ((dmrgo_dmrd_dialect_t)2)
/* Go: dmrd.DialectLocal. DialectLocal is the link between MMDVMHost and DMRGateway on one host: no login, DMRP and DMRB, DMRT, and DMRA and DMRG without the repeater ID. */
#define DMRGO_DMRD_DIALECT_LOCAL ((dmrgo_dmrd_dialect_t)3)
/* Go: dmrd.DialectMMDVM. DialectMMDVM is the protocol that DMRGateway speaks to a master and that DMR+, HBlink, FreeDMR, DMRHub and other masters accept: binary repeater IDs, RPTACK, RPTPING and MSTPONG, RPTO, RPTG and a 302-octet RPTC with the ID at octets 4 to 7. */
#define DMRGO_DMRD_DIALECT_MMDVM ((dmrgo_dmrd_dialect_t)1)
/* Go: dmrd.DialectUnknown. DialectUnknown is the zero value. */
#define DMRGO_DMRD_DIALECT_UNKNOWN ((dmrgo_dmrd_dialect_t)0)
/* Go: dmrd.FrameDataSync. a data or control burst; Value is its data type */
#define DMRGO_DMRD_FRAME_DATA_SYNC ((dmrgo_dmrd_frame_type_t)2)
/* Go: dmrd.FrameReserved. not used; MMDVMHost reads it as DMRGO_DMRD_FRAME_DATA_SYNC */
#define DMRGO_DMRD_FRAME_RESERVED ((dmrgo_dmrd_frame_type_t)3)
/* Go: dmrd.FrameVoice. a voice burst B to F, or A with Value 0 */
#define DMRGO_DMRD_FRAME_VOICE ((dmrgo_dmrd_frame_type_t)0)
/* Go: dmrd.FrameVoiceSync. voice burst A */
#define DMRGO_DMRD_FRAME_VOICE_SYNC ((dmrgo_dmrd_frame_type_t)1)
/* Go: dmrd.MaxFreeDMROptionsLen. MaxFreeDMROptionsLen is the longest options text that FreeDMR reads. */
#define DMRGO_DMRD_MAX_FREE_DMR_OPTIONS_LEN 255
/* Go: dmrd.OptionAbsent. OptionAbsent leaves the setting of the master as it is. */
#define DMRGO_DMRD_OPTION_ABSENT ((dmrgo_dmrd_option_state_t)0)
/* Go: dmrd.OptionClear. OptionClear is an option with an empty value: it clears the setting of the master. */
#define DMRGO_DMRD_OPTION_CLEAR ((dmrgo_dmrd_option_state_t)1)
/* Go: dmrd.OptionSet. OptionSet is an option with a value: it overrides the master. */
#define DMRGO_DMRD_OPTION_SET ((dmrgo_dmrd_option_state_t)2)
/* Go: dmrdauth.KeyLen. KeyLen is the length of an OpenBridge key in octets. */
#define DMRGO_DMRDAUTH_KEY_LEN 20
/* Go: dmrdsession.KeepaliveDefault. KeepaliveDefault is the default dmrgo_dmrdsession_bridge_config_t.keepalive, the BCKA period of FreeDMR. */
#define DMRGO_DMRDSESSION_KEEPALIVE_DEFAULT INT64_C(10000000000)
/* Go: dmrdsession.LoginTimeoutDefault. LoginTimeoutDefault is the default dmrgo_dmrdsession_master_config_t.login_timeout: the PING_TIME of 5 s times the MAX_MISSED of 3 after which an HBlink3 master drops a repeater, logged in or not. */
#define DMRGO_DMRDSESSION_LOGIN_TIMEOUT_DEFAULT INT64_C(15000000000)
/* Go: dmrdsession.MaxOptions. MaxOptions is the longest RPTO options text in octets that DMRGateway sends. */
#define DMRGO_DMRDSESSION_MAX_OPTIONS 291
/* Go: dmrdsession.MaxOutputs. MaxOutputs is the most outputs that one call of a Peer, Master or Bridge method appends. */
#define DMRGO_DMRDSESSION_MAX_OUTPUTS 4
/* Go: dmrdsession.MaxPacket. MaxPacket is the longest packet in octets that the machines take. */
#define DMRGO_DMRDSESSION_MAX_PACKET 512
/* Go: dmrdsession.OutputConfig. OutputConfig reports the RPTC of the repeater in dmrgo_dmrdsession_output_t.id at a Master, in dmrgo_dmrdsession_output_t.packet. */
#define DMRGO_DMRDSESSION_OUTPUT_CONFIG ((dmrgo_dmrdsession_output_kind_t)5)
/* Go: dmrdsession.OutputData. OutputData is a DMRD, DMRA or DMRG packet, or for a Bridge a DMRD or DMRE packet with a good signature, in dmrgo_dmrdsession_output_t.packet, with its command in dmrgo_dmrdsession_output_t.command. */
#define DMRGO_DMRDSESSION_OUTPUT_DATA ((dmrgo_dmrdsession_output_kind_t)7)
/* Go: dmrdsession.OutputDown. OutputDown reports that the session ended. */
#define DMRGO_DMRDSESSION_OUTPUT_DOWN ((dmrgo_dmrdsession_output_kind_t)3)
/* Go: dmrdsession.OutputLogin. OutputLogin reports the RPTL of the repeater in dmrgo_dmrdsession_output_t.id at a Master. */
#define DMRGO_DMRDSESSION_OUTPUT_LOGIN ((dmrgo_dmrdsession_output_kind_t)4)
/* Go: dmrdsession.OutputMessage. OutputMessage is another message of a logged-in session for the consumer, in dmrgo_dmrdsession_output_t.packet with its command in dmrgo_dmrdsession_output_t.command: an RPTSBKN at a Peer, an RPTG, RPTRSSI or RPTINTR at a Master, or a BCSQ, BCST or BCVE at a Bridge. */
#define DMRGO_DMRDSESSION_OUTPUT_MESSAGE ((dmrgo_dmrdsession_output_kind_t)8)
/* Go: dmrdsession.OutputOptions. OutputOptions reports the RPTO options text that the Master accepted, in dmrgo_dmrdsession_output_t.packet. */
#define DMRGO_DMRDSESSION_OUTPUT_OPTIONS ((dmrgo_dmrdsession_output_kind_t)6)
/* Go: dmrdsession.OutputPong. OutputPong reports a ping of the repeater in dmrgo_dmrdsession_output_t.id that the Master answered with a pong, so the consumer can keep the time of the last ping. */
#define DMRGO_DMRDSESSION_OUTPUT_PONG ((dmrgo_dmrdsession_output_kind_t)9)
/* Go: dmrdsession.OutputSend. OutputSend is a packet in dmrgo_dmrdsession_output_t.packet to send to the other side. */
#define DMRGO_DMRDSESSION_OUTPUT_SEND ((dmrgo_dmrdsession_output_kind_t)1)
/* Go: dmrdsession.OutputUp. OutputUp reports that the login is complete, or that a Bridge took the first packet with a good signature after DMRGO_DMRDSESSION_STATE_IDLE. */
#define DMRGO_DMRDSESSION_OUTPUT_UP ((dmrgo_dmrdsession_output_kind_t)2)
/* Go: dmrdsession.ReasonClosed. ReasonClosed is an MSTCL from the master or an RPTCL from the repeater. */
#define DMRGO_DMRDSESSION_REASON_CLOSED ((dmrgo_dmrdsession_reason_t)3)
/* Go: dmrdsession.ReasonLogin. ReasonLogin is a new RPTL from a repeater that was logged in. */
#define DMRGO_DMRDSESSION_REASON_LOGIN ((dmrgo_dmrdsession_reason_t)5)
/* Go: dmrdsession.ReasonNone. ReasonNone is the zero Reason. */
#define DMRGO_DMRDSESSION_REASON_NONE ((dmrgo_dmrdsession_reason_t)0)
/* Go: dmrdsession.ReasonRefused. ReasonRefused is an MSTNAK from the master, or a login that the Master refused. */
#define DMRGO_DMRDSESSION_REASON_REFUSED ((dmrgo_dmrdsession_reason_t)2)
/* Go: dmrdsession.ReasonStopped. ReasonStopped is a Close of the consumer. */
#define DMRGO_DMRDSESSION_REASON_STOPPED ((dmrgo_dmrdsession_reason_t)4)
/* Go: dmrdsession.ReasonTimeout. ReasonTimeout is Timeout without a reply or a packet. */
#define DMRGO_DMRDSESSION_REASON_TIMEOUT ((dmrgo_dmrdsession_reason_t)1)
/* Go: dmrdsession.RetryDefault. RetryDefault is the default dmrgo_dmrdsession_peer_config_t.retry: the time between two sends of a login step, and between two pings. */
#define DMRGO_DMRDSESSION_RETRY_DEFAULT INT64_C(10000000000)
/* Go: dmrdsession.StateAuth. StateAuth is a Peer that sent RPTK, or a Master that sent the salt. */
#define DMRGO_DMRDSESSION_STATE_AUTH ((dmrgo_dmrdsession_state_t)3)
/* Go: dmrdsession.StateConfig. StateConfig is a Peer that sent RPTC, or a Master that waits for it or for Accept or Refuse. */
#define DMRGO_DMRDSESSION_STATE_CONFIG ((dmrgo_dmrdsession_state_t)4)
/* Go: dmrdsession.StateIdle. StateIdle has no session: a Peer after Close, a Master before an RPTL or after the end of a session, a Bridge, enhanced or not, before the first packet with a good signature and after Timeout without one. */
#define DMRGO_DMRDSESSION_STATE_IDLE ((dmrgo_dmrdsession_state_t)0)
/* Go: dmrdsession.StateLogin. StateLogin is a Peer that sent RPTL, or a Master that waits for Admit or Refuse. */
#define DMRGO_DMRDSESSION_STATE_LOGIN ((dmrgo_dmrdsession_state_t)2)
/* Go: dmrdsession.StateOptions. StateOptions is a Peer that sent RPTO. */
#define DMRGO_DMRDSESSION_STATE_OPTIONS ((dmrgo_dmrdsession_state_t)5)
/* Go: dmrdsession.StateRunning. StateRunning is a logged-in session, or a Bridge, enhanced or not, whose peer sent a packet with a good signature within Timeout. */
#define DMRGO_DMRDSESSION_STATE_RUNNING ((dmrgo_dmrdsession_state_t)6)
/* Go: dmrdsession.StateWait. StateWait is a Peer that waits to log in again. */
#define DMRGO_DMRDSESSION_STATE_WAIT ((dmrgo_dmrdsession_state_t)1)
/* Go: dmrdsession.TimeoutDefault. TimeoutDefault is the default dmrgo_dmrdsession_peer_config_t.timeout and dmrgo_dmrdsession_master_config_t.timeout. */
#define DMRGO_DMRDSESSION_TIMEOUT_DEFAULT INT64_C(60000000000)
/* Go: hytera.FrameLen. FrameLen is the length of a DMR frame in octets. */
#define DMRGO_HYTERA_FRAME_LEN 72
/* Go: hytera.HeartbeatLen. HeartbeatLen is the length of the heartbeat of the P2P service in octets. */
#define DMRGO_HYTERA_HEARTBEAT_LEN 20
/* Go: hytera.P2PHeaderLen. P2PHeaderLen is the length of a P2P command without its body, in octets. */
#define DMRGO_HYTERA_P2P_HEADER_LEN 20
/* Go: hytera.ServiceDMR. The Service values. */
#define DMRGO_HYTERA_SERVICE_DMR ((dmrgo_hytera_service_t)17)
/* Go: hytera.ServiceRDAC. The Service values. */
#define DMRGO_HYTERA_SERVICE_RDAC ((dmrgo_hytera_service_t)18)
/* Go: hytera.ServiceRegistration. The Service values. */
#define DMRGO_HYTERA_SERVICE_REGISTRATION ((dmrgo_hytera_service_t)16)
/* Go: hytera.SlotTypeCSBK. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_CSBK ((dmrgo_hytera_slot_type_t)13107)
/* Go: hytera.SlotTypeDataHeader. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_DATA_HEADER ((dmrgo_hytera_slot_type_t)17476)
/* Go: hytera.SlotTypePIHeader. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_PI_HEADER ((dmrgo_hytera_slot_type_t)0)
/* Go: hytera.SlotTypeRate12. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_RATE12 ((dmrgo_hytera_slot_type_t)21845)
/* Go: hytera.SlotTypeRate34. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_RATE34 ((dmrgo_hytera_slot_type_t)26214)
/* Go: hytera.SlotTypeSync. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_SYNC ((dmrgo_hytera_slot_type_t)61166)
/* Go: hytera.SlotTypeTerminator. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_TERMINATOR ((dmrgo_hytera_slot_type_t)8738)
/* Go: hytera.SlotTypeVoiceA. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_VOICE_A ((dmrgo_hytera_slot_type_t)30583)
/* Go: hytera.SlotTypeVoiceB. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_VOICE_B ((dmrgo_hytera_slot_type_t)34952)
/* Go: hytera.SlotTypeVoiceC. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_VOICE_C ((dmrgo_hytera_slot_type_t)39321)
/* Go: hytera.SlotTypeVoiceD. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_VOICE_D ((dmrgo_hytera_slot_type_t)43690)
/* Go: hytera.SlotTypeVoiceE. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_VOICE_E ((dmrgo_hytera_slot_type_t)48059)
/* Go: hytera.SlotTypeVoiceF. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_VOICE_F ((dmrgo_hytera_slot_type_t)52428)
/* Go: hytera.SlotTypeVoiceLCHeader. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_VOICE_LC_HEADER ((dmrgo_hytera_slot_type_t)4369)
/* Go: hytera.SlotTypeWakeup. The SlotType values. */
#define DMRGO_HYTERA_SLOT_TYPE_WAKEUP ((dmrgo_hytera_slot_type_t)56797)
/* Go: ipsc.BurstRaw. The BurstType values other than the data types 0x00 to 0x08. */
#define DMRGO_IPSC_BURST_RAW ((dmrgo_ipsc_burst_type_t)31)
/* Go: ipsc.BurstSyncLost. The BurstType values other than the data types 0x00 to 0x08. */
#define DMRGO_IPSC_BURST_SYNC_LOST ((dmrgo_ipsc_burst_type_t)19)
/* Go: ipsc.BurstVoice. The BurstType values other than the data types 0x00 to 0x08. */
#define DMRGO_IPSC_BURST_VOICE ((dmrgo_ipsc_burst_type_t)10)
/* Go: ipsc.FlagAuth. octet 3 bit 4: packets carry an HMAC-SHA1 trailer */
#define DMRGO_IPSC_FLAG_AUTH ((dmrgo_ipsc_flag_t)52)
/* Go: ipsc.FlagCSBK. octet 2 bit 7: CSBK calls */
#define DMRGO_IPSC_FLAG_CSBK ((dmrgo_ipsc_flag_t)39)
/* Go: ipsc.FlagConsoleApp. octet 2 bit 5: console application */
#define DMRGO_IPSC_FLAG_CONSOLE_APP ((dmrgo_ipsc_flag_t)37)
/* Go: ipsc.FlagData. octet 3 bit 3: data calls */
#define DMRGO_IPSC_FLAG_DATA ((dmrgo_ipsc_flag_t)51)
/* Go: ipsc.FlagMasterPeer. octet 3 bit 0: the master */
#define DMRGO_IPSC_FLAG_MASTER_PEER ((dmrgo_ipsc_flag_t)48)
/* Go: ipsc.FlagRepeaterMonitor. octet 2 bit 6: repeater call monitoring */
#define DMRGO_IPSC_FLAG_REPEATER_MONITOR ((dmrgo_ipsc_flag_t)38)
/* Go: ipsc.FlagVoice. octet 3 bit 2: voice calls */
#define DMRGO_IPSC_FLAG_VOICE ((dmrgo_ipsc_flag_t)50)
/* Go: ipsc.FlagXNLMaster. octet 3 bit 6: XNL master */
#define DMRGO_IPSC_FLAG_XNL_MASTER ((dmrgo_ipsc_flag_t)54)
/* Go: ipsc.FlagXNLSlave. octet 3 bit 5: XNL slave */
#define DMRGO_IPSC_FLAG_XNL_SLAVE ((dmrgo_ipsc_flag_t)53)
/* Go: ipsc.FlagXNLStatus. octet 3 bit 7: XNL connected; an XPR 8400 copies it from the last reply of the master */
#define DMRGO_IPSC_FLAG_XNL_STATUS ((dmrgo_ipsc_flag_t)55)
/* Go: ipsc.OpAliveReply. keepalive reply from the master */
#define DMRGO_IPSC_OP_ALIVE_REPLY ((dmrgo_ipsc_opcode_t)151)
/* Go: ipsc.OpAliveRequest. keepalive from a peer to the master */
#define DMRGO_IPSC_OP_ALIVE_REQUEST ((dmrgo_ipsc_opcode_t)150)
/* Go: ipsc.OpCallConfirmation. confirmation from the receiver of a confirmed call */
#define DMRGO_IPSC_OP_CALL_CONFIRMATION ((dmrgo_ipsc_opcode_t)5)
/* Go: ipsc.OpCallMonitorNack. call monitor NACK */
#define DMRGO_IPSC_OP_CALL_MONITOR_NACK ((dmrgo_ipsc_opcode_t)99)
/* Go: ipsc.OpCallMonitorRepeat. call monitor repeat */
#define DMRGO_IPSC_OP_CALL_MONITOR_REPEAT ((dmrgo_ipsc_opcode_t)98)
/* Go: ipsc.OpCallMonitorStatus. call monitor status */
#define DMRGO_IPSC_OP_CALL_MONITOR_STATUS ((dmrgo_ipsc_opcode_t)97)
/* Go: ipsc.OpCollision. collision of two transmitters */
#define DMRGO_IPSC_OP_COLLISION ((dmrgo_ipsc_opcode_t)134)
/* Go: ipsc.OpDeregisterReply. the leave is accepted */
#define DMRGO_IPSC_OP_DEREGISTER_REPLY ((dmrgo_ipsc_opcode_t)155)
/* Go: ipsc.OpDeregisterRequest. a peer leaves */
#define DMRGO_IPSC_OP_DEREGISTER_REQUEST ((dmrgo_ipsc_opcode_t)154)
/* Go: ipsc.OpGroupData. group data */
#define DMRGO_IPSC_OP_GROUP_DATA ((dmrgo_ipsc_opcode_t)131)
/* Go: ipsc.OpGroupVoice. group voice */
#define DMRGO_IPSC_OP_GROUP_VOICE ((dmrgo_ipsc_opcode_t)128)
/* Go: ipsc.OpPeerAliveReply. keepalive reply between peers */
#define DMRGO_IPSC_OP_PEER_ALIVE_REPLY ((dmrgo_ipsc_opcode_t)153)
/* Go: ipsc.OpPeerAliveRequest. keepalive between peers */
#define DMRGO_IPSC_OP_PEER_ALIVE_REQUEST ((dmrgo_ipsc_opcode_t)152)
/* Go: ipsc.OpPeerListReply. the master sends the peer list */
#define DMRGO_IPSC_OP_PEER_LIST_REPLY ((dmrgo_ipsc_opcode_t)147)
/* Go: ipsc.OpPeerListRequest. a peer requests the peer list */
#define DMRGO_IPSC_OP_PEER_LIST_REQUEST ((dmrgo_ipsc_opcode_t)146)
/* Go: ipsc.OpPeerRegisterReply. a peer accepts a registration */
#define DMRGO_IPSC_OP_PEER_REGISTER_REPLY ((dmrgo_ipsc_opcode_t)149)
/* Go: ipsc.OpPeerRegisterRequest. a peer registers with another peer */
#define DMRGO_IPSC_OP_PEER_REGISTER_REQUEST ((dmrgo_ipsc_opcode_t)148)
/* Go: ipsc.OpPrivateData. private data */
#define DMRGO_IPSC_OP_PRIVATE_DATA ((dmrgo_ipsc_opcode_t)132)
/* Go: ipsc.OpPrivateVoice. private voice */
#define DMRGO_IPSC_OP_PRIVATE_VOICE ((dmrgo_ipsc_opcode_t)129)
/* Go: ipsc.OpRegisterReply. the master accepts a registration */
#define DMRGO_IPSC_OP_REGISTER_REPLY ((dmrgo_ipsc_opcode_t)145)
/* Go: ipsc.OpRegisterRequest. a peer registers with the master */
#define DMRGO_IPSC_OP_REGISTER_REQUEST ((dmrgo_ipsc_opcode_t)144)
/* Go: ipsc.OpStatus. sent by an XPR 8400 after each keepalive; meaning not known */
#define DMRGO_IPSC_OP_STATUS ((dmrgo_ipsc_opcode_t)240)
/* Go: ipsc.OpTextMessageAck. text message acknowledgement */
#define DMRGO_IPSC_OP_TEXT_MESSAGE_ACK ((dmrgo_ipsc_opcode_t)84)
/* Go: ipsc.OpWakeup. repeater wake-up */
#define DMRGO_IPSC_OP_WAKEUP ((dmrgo_ipsc_opcode_t)133)
/* Go: ipsc.OpXNL. XCMP/XNL control message */
#define DMRGO_IPSC_OP_XNL ((dmrgo_ipsc_opcode_t)112)
/* Go: ipsc.VoiceLayoutA. 52 octets: burst A, the AMBE frames only */
#define DMRGO_IPSC_VOICE_LAYOUT_A ((dmrgo_ipsc_voice_layout_t)1)
/* Go: ipsc.VoiceLayoutBCDF. 57 octets: bursts B, C, D and F, with embedded data and EMB */
#define DMRGO_IPSC_VOICE_LAYOUT_BCDF ((dmrgo_ipsc_voice_layout_t)2)
/* Go: ipsc.VoiceLayoutE. 66 octets: burst E, also with the full LC */
#define DMRGO_IPSC_VOICE_LAYOUT_E ((dmrgo_ipsc_voice_layout_t)3)
/* Go: ipscauth.TrailerLen. TrailerLen is the length of the authentication trailer in octets. */
#define DMRGO_IPSCAUTH_TRAILER_LEN 10
/* Go: ipscsession.AliveDefault. AliveDefault is the default dmrgo_ipscsession_peer_config_t.alive, the ALIVE_TIMER of DMRlink. */
#define DMRGO_IPSCSESSION_ALIVE_DEFAULT INT64_C(5000000000)
/* Go: ipscsession.MaxControl. MaxControl is the longest link control packet in octets other than a peer list, with its authentication trailer. */
#define DMRGO_IPSCSESSION_MAX_CONTROL 26
/* Go: ipscsession.MaxMissedDefault. MaxMissedDefault is the default dmrgo_ipscsession_peer_config_t.max_missed, the MAX_MISSED of DMRlink. */
#define DMRGO_IPSCSESSION_MAX_MISSED_DEFAULT 20
/* Go: ipscsession.MaxPacket. MaxPacket is the longest packet in octets that the machines take or send, with its authentication trailer. */
#define DMRGO_IPSCSESSION_MAX_PACKET 1500
/* Go: ipscsession.MaxPeersDefault. MaxPeersDefault is the default MaxPeers: an IPSC system has at most 15 peers. */
#define DMRGO_IPSCSESSION_MAX_PEERS_DEFAULT 15
/* Go: ipscsession.MaxPeersLimit. MaxPeersLimit is the largest MaxPeers: the most peers whose peer list, with its authentication trailer, fits in DMRGO_IPSCSESSION_MAX_PACKET. */
#define DMRGO_IPSCSESSION_MAX_PEERS_LIMIT 134
/* Go: ipscsession.ModeDefault. ModeDefault is the mode that a Peer or Master sends when its config leaves Mode zero: operational, digital, and both slots linked. */
#define DMRGO_IPSCSESSION_MODE_DEFAULT ((dmrgo_ipsc_mode_t)106)
/* Go: ipscsession.OutputData. OutputData is a packet other than a link control packet, such as a voice or data packet, from dmrgo_ipscsession_output_t.id at dmrgo_ipscsession_output_t.addr, in dmrgo_ipscsession_output_t.packet without the authentication trailer. */
#define DMRGO_IPSCSESSION_OUTPUT_DATA ((dmrgo_ipscsession_output_kind_t)5)
/* Go: ipscsession.OutputDown. OutputDown reports that the link with dmrgo_ipscsession_output_t.id is down. */
#define DMRGO_IPSCSESSION_OUTPUT_DOWN ((dmrgo_ipscsession_output_kind_t)3)
/* Go: ipscsession.OutputDropped. OutputDropped reports a packet from dmrgo_ipscsession_output_t.addr that a Master dropped, with the sender ID in dmrgo_ipscsession_output_t.id when the packet has one. */
#define DMRGO_IPSCSESSION_OUTPUT_DROPPED ((dmrgo_ipscsession_output_kind_t)6)
/* Go: ipscsession.OutputPeers. OutputPeers reports a new peer list at a Peer, which Peers and PeerAt return. */
#define DMRGO_IPSCSESSION_OUTPUT_PEERS ((dmrgo_ipscsession_output_kind_t)4)
/* Go: ipscsession.OutputSend. OutputSend is a packet in dmrgo_ipscsession_output_t.packet to send to dmrgo_ipscsession_output_t.addr, with its authentication trailer when the config has Auth. */
#define DMRGO_IPSCSESSION_OUTPUT_SEND ((dmrgo_ipscsession_output_kind_t)1)
/* Go: ipscsession.OutputUp. OutputUp reports that the link with dmrgo_ipscsession_output_t.id at dmrgo_ipscsession_output_t.addr is up: at a Peer, the registration with the master or with another peer; at a Master, the registration of a peer. */
#define DMRGO_IPSCSESSION_OUTPUT_UP ((dmrgo_ipscsession_output_kind_t)2)
/* Go: ipscsession.ReasonAddress. ReasonAddress is a de-registration request from an address other than the one the peer registered from. */
#define DMRGO_IPSCSESSION_REASON_ADDRESS ((dmrgo_ipscsession_reason_t)9)
/* Go: ipscsession.ReasonAuth. ReasonAuth is a packet without a good authentication trailer, with Auth. */
#define DMRGO_IPSCSESSION_REASON_AUTH ((dmrgo_ipscsession_reason_t)5)
/* Go: ipscsession.ReasonClosed. ReasonClosed is a de-registration request of the other side. */
#define DMRGO_IPSCSESSION_REASON_CLOSED ((dmrgo_ipscsession_reason_t)2)
/* Go: ipscsession.ReasonDropped. ReasonDropped is a Drop of the consumer. */
#define DMRGO_IPSCSESSION_REASON_DROPPED ((dmrgo_ipscsession_reason_t)10)
/* Go: ipscsession.ReasonFull. ReasonFull is a registration that MaxPeers leaves no room for. */
#define DMRGO_IPSCSESSION_REASON_FULL ((dmrgo_ipscsession_reason_t)8)
/* Go: ipscsession.ReasonList. ReasonList is a peer that a new peer list left out. */
#define DMRGO_IPSCSESSION_REASON_LIST ((dmrgo_ipscsession_reason_t)4)
/* Go: ipscsession.ReasonMalformed. ReasonMalformed is a packet that is empty, longer than DMRGO_IPSCSESSION_MAX_PACKET or does not decode as its opcode. */
#define DMRGO_IPSCSESSION_REASON_MALFORMED ((dmrgo_ipscsession_reason_t)7)
/* Go: ipscsession.ReasonNone. ReasonNone is the zero Reason. */
#define DMRGO_IPSCSESSION_REASON_NONE ((dmrgo_ipscsession_reason_t)0)
/* Go: ipscsession.ReasonStopped. ReasonStopped is a Close of the consumer. */
#define DMRGO_IPSCSESSION_REASON_STOPPED ((dmrgo_ipscsession_reason_t)3)
/* Go: ipscsession.ReasonTimeout. ReasonTimeout is MaxMissed keepalives without a reply at a Peer, or Timeout without a packet at a Master. */
#define DMRGO_IPSCSESSION_REASON_TIMEOUT ((dmrgo_ipscsession_reason_t)1)
/* Go: ipscsession.ReasonUnregistered. ReasonUnregistered is a packet that needs the registration of its sender, from a peer that is not registered. */
#define DMRGO_IPSCSESSION_REASON_UNREGISTERED ((dmrgo_ipscsession_reason_t)6)
/* Go: ipscsession.StateIdle. StateIdle is a Peer or Master after Close. */
#define DMRGO_IPSCSESSION_STATE_IDLE ((dmrgo_ipscsession_state_t)0)
/* Go: ipscsession.StateRegistering. StateRegistering is a Peer that is not registered with the master. */
#define DMRGO_IPSCSESSION_STATE_REGISTERING ((dmrgo_ipscsession_state_t)1)
/* Go: ipscsession.StateRunning. StateRunning is a registered Peer, or a running Master. */
#define DMRGO_IPSCSESSION_STATE_RUNNING ((dmrgo_ipscsession_state_t)2)
/* Go: ipscsession.TimeoutDefault. TimeoutDefault is the default dmrgo_ipscsession_master_config_t.timeout, after which DMRlink drops a silent peer. */
#define DMRGO_IPSCSESSION_TIMEOUT_DEFAULT INT64_C(120000000000)
/* Go: mmdvm.CPUAtmel. The CPU values. */
#define DMRGO_MMDVM_CPU_ATMEL ((dmrgo_mmdvm_cpu_t)0)
/* Go: mmdvm.CPUNXP. The CPU values. */
#define DMRGO_MMDVM_CPU_NXP ((dmrgo_mmdvm_cpu_t)1)
/* Go: mmdvm.CPUST. The CPU values. */
#define DMRGO_MMDVM_CPU_ST ((dmrgo_mmdvm_cpu_t)2)
/* Go: mmdvm.CapDMR. The Capabilities bits. */
#define DMRGO_MMDVM_CAP_DMR ((dmrgo_mmdvm_capabilities_t)2)
/* Go: mmdvm.CapDStar. The Capabilities bits. */
#define DMRGO_MMDVM_CAP_D_STAR ((dmrgo_mmdvm_capabilities_t)1)
/* Go: mmdvm.CapFM. The Capabilities bits. */
#define DMRGO_MMDVM_CAP_FM ((dmrgo_mmdvm_capabilities_t)64)
/* Go: mmdvm.CapNXDN. The Capabilities bits. */
#define DMRGO_MMDVM_CAP_NXDN ((dmrgo_mmdvm_capabilities_t)16)
/* Go: mmdvm.CapP25. The Capabilities bits. */
#define DMRGO_MMDVM_CAP_P25 ((dmrgo_mmdvm_capabilities_t)8)
/* Go: mmdvm.CapPOCSAG. The Capabilities bits. */
#define DMRGO_MMDVM_CAP_POCSAG ((dmrgo_mmdvm_capabilities_t)256)
/* Go: mmdvm.CapYSF. The Capabilities bits. */
#define DMRGO_MMDVM_CAP_YSF ((dmrgo_mmdvm_capabilities_t)4)
/* Go: mmdvm.CapabilitiesV1. CapabilitiesV1 is what MMDVMHost assumes for a modem of protocol 1, which does not send its capabilities. */
#define DMRGO_MMDVM_CAPABILITIES_V1 ((dmrgo_mmdvm_capabilities_t)287)
/* Go: mmdvm.CommandAck. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_ACK ((dmrgo_mmdvm_command_t)112)
/* Go: mmdvm.CommandCalData. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_CAL_DATA ((dmrgo_mmdvm_command_t)8)
/* Go: mmdvm.CommandDMRAbort. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DMR_ABORT ((dmrgo_mmdvm_command_t)30)
/* Go: mmdvm.CommandDMRAloha. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DMR_ALOHA ((dmrgo_mmdvm_command_t)23)
/* Go: mmdvm.CommandDMRData1. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DMR_DATA1 ((dmrgo_mmdvm_command_t)24)
/* Go: mmdvm.CommandDMRData2. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DMR_DATA2 ((dmrgo_mmdvm_command_t)26)
/* Go: mmdvm.CommandDMRLost1. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DMR_LOST1 ((dmrgo_mmdvm_command_t)25)
/* Go: mmdvm.CommandDMRLost2. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DMR_LOST2 ((dmrgo_mmdvm_command_t)27)
/* Go: mmdvm.CommandDMRShortLC. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DMR_SHORT_LC ((dmrgo_mmdvm_command_t)28)
/* Go: mmdvm.CommandDMRStart. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DMR_START ((dmrgo_mmdvm_command_t)29)
/* Go: mmdvm.CommandDStarData. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_D_STAR_DATA ((dmrgo_mmdvm_command_t)17)
/* Go: mmdvm.CommandDStarEOT. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_D_STAR_EOT ((dmrgo_mmdvm_command_t)19)
/* Go: mmdvm.CommandDStarHeader. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_D_STAR_HEADER ((dmrgo_mmdvm_command_t)16)
/* Go: mmdvm.CommandDStarLost. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_D_STAR_LOST ((dmrgo_mmdvm_command_t)18)
/* Go: mmdvm.CommandDebug1. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DEBUG1 ((dmrgo_mmdvm_command_t)241)
/* Go: mmdvm.CommandDebug2. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DEBUG2 ((dmrgo_mmdvm_command_t)242)
/* Go: mmdvm.CommandDebug3. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DEBUG3 ((dmrgo_mmdvm_command_t)243)
/* Go: mmdvm.CommandDebug4. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DEBUG4 ((dmrgo_mmdvm_command_t)244)
/* Go: mmdvm.CommandDebug5. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DEBUG5 ((dmrgo_mmdvm_command_t)245)
/* Go: mmdvm.CommandDebugDump. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_DEBUG_DUMP ((dmrgo_mmdvm_command_t)250)
/* Go: mmdvm.CommandFMData. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_FM_DATA ((dmrgo_mmdvm_command_t)101)
/* Go: mmdvm.CommandFMEOT. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_FM_EOT ((dmrgo_mmdvm_command_t)103)
/* Go: mmdvm.CommandFMParams1. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_FM_PARAMS1 ((dmrgo_mmdvm_command_t)96)
/* Go: mmdvm.CommandFMParams2. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_FM_PARAMS2 ((dmrgo_mmdvm_command_t)97)
/* Go: mmdvm.CommandFMParams3. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_FM_PARAMS3 ((dmrgo_mmdvm_command_t)98)
/* Go: mmdvm.CommandFMParams4. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_FM_PARAMS4 ((dmrgo_mmdvm_command_t)99)
/* Go: mmdvm.CommandFMRSSI. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_FM_RSSI ((dmrgo_mmdvm_command_t)104)
/* Go: mmdvm.CommandFMStatus. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_FM_STATUS ((dmrgo_mmdvm_command_t)102)
/* Go: mmdvm.CommandGetStatus. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_GET_STATUS ((dmrgo_mmdvm_command_t)1)
/* Go: mmdvm.CommandGetVersion. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_GET_VERSION ((dmrgo_mmdvm_command_t)0)
/* Go: mmdvm.CommandI2CData. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_I2C_DATA ((dmrgo_mmdvm_command_t)129)
/* Go: mmdvm.CommandM17EOT. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_M17_EOT ((dmrgo_mmdvm_command_t)73)
/* Go: mmdvm.CommandM17LinkSetup. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_M17_LINK_SETUP ((dmrgo_mmdvm_command_t)69)
/* Go: mmdvm.CommandM17Lost. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_M17_LOST ((dmrgo_mmdvm_command_t)72)
/* Go: mmdvm.CommandM17Packet. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_M17_PACKET ((dmrgo_mmdvm_command_t)71)
/* Go: mmdvm.CommandM17Stream. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_M17_STREAM ((dmrgo_mmdvm_command_t)70)
/* Go: mmdvm.CommandNXDNData. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_NXDN_DATA ((dmrgo_mmdvm_command_t)64)
/* Go: mmdvm.CommandNXDNLost. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_NXDN_LOST ((dmrgo_mmdvm_command_t)65)
/* Go: mmdvm.CommandNak. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_NAK ((dmrgo_mmdvm_command_t)127)
/* Go: mmdvm.CommandP25Header. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_P25_HEADER ((dmrgo_mmdvm_command_t)48)
/* Go: mmdvm.CommandP25LDU. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_P25_LDU ((dmrgo_mmdvm_command_t)49)
/* Go: mmdvm.CommandP25Lost. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_P25_LOST ((dmrgo_mmdvm_command_t)50)
/* Go: mmdvm.CommandPOCSAGData. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_POCSAG_DATA ((dmrgo_mmdvm_command_t)80)
/* Go: mmdvm.CommandQSOInfo. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_QSO_INFO ((dmrgo_mmdvm_command_t)145)
/* Go: mmdvm.CommandRSSIData. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_RSSI_DATA ((dmrgo_mmdvm_command_t)9)
/* Go: mmdvm.CommandSendCWID. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_SEND_CWID ((dmrgo_mmdvm_command_t)10)
/* Go: mmdvm.CommandSerialData. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_SERIAL_DATA ((dmrgo_mmdvm_command_t)128)
/* Go: mmdvm.CommandSetConfig. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_SET_CONFIG ((dmrgo_mmdvm_command_t)2)
/* Go: mmdvm.CommandSetFreq. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_SET_FREQ ((dmrgo_mmdvm_command_t)4)
/* Go: mmdvm.CommandSetMode. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_SET_MODE ((dmrgo_mmdvm_command_t)3)
/* Go: mmdvm.CommandTransparent. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_TRANSPARENT ((dmrgo_mmdvm_command_t)144)
/* Go: mmdvm.CommandYSFData. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_YSF_DATA ((dmrgo_mmdvm_command_t)32)
/* Go: mmdvm.CommandYSFLost. The Command values of the MMDVM and MMDVM_HS firmware. */
#define DMRGO_MMDVM_COMMAND_YSF_LOST ((dmrgo_mmdvm_command_t)33)
/* Go: mmdvm.ControlDataSync. ControlDataSync marks a burst with a data SYNC; the low nibble is its data type. */
#define DMRGO_MMDVM_CONTROL_DATA_SYNC ((dmrgo_mmdvm_control_t)64)
/* Go: mmdvm.ControlIdle. ControlIdle marks a burst that the modem heard while idle, such as the BS_Dwn_Act CSBK that wakes a repeater (0x80 | 0x40 | CSBK). */
#define DMRGO_MMDVM_CONTROL_IDLE ((dmrgo_mmdvm_control_t)128)
/* Go: mmdvm.ControlVoiceSync. ControlVoiceSync marks voice burst A, which has the voice SYNC, or a voice burst at the position of A whose SYNC the modem missed. */
#define DMRGO_MMDVM_CONTROL_VOICE_SYNC ((dmrgo_mmdvm_control_t)32)
/* Go: mmdvm.DMRDataLen. DMRDataLen is the length of the payload of a DMR data frame without RSSI. */
#define DMRGO_MMDVM_DMR_DATA_LEN 34
/* Go: mmdvm.FrameStart. FrameStart is the first octet of every frame. */
#define DMRGO_MMDVM_FRAME_START 224
/* Go: mmdvm.MaxFrameLen. MaxFrameLen is the length of the longest frame in octets: the long form counts 255 plus its second length octet. */
#define DMRGO_MMDVM_MAX_FRAME_LEN 510
/* Go: mmdvm.ModeDMR. The Mode values. */
#define DMRGO_MMDVM_MODE_DMR ((dmrgo_mmdvm_mode_t)2)
/* Go: mmdvm.ModeDStar. The Mode values. */
#define DMRGO_MMDVM_MODE_D_STAR ((dmrgo_mmdvm_mode_t)1)
/* Go: mmdvm.ModeFM. The Mode values. */
#define DMRGO_MMDVM_MODE_FM ((dmrgo_mmdvm_mode_t)10)
/* Go: mmdvm.ModeIdle. The Mode values. */
#define DMRGO_MMDVM_MODE_IDLE ((dmrgo_mmdvm_mode_t)0)
/* Go: mmdvm.ModeM17. The Mode values. */
#define DMRGO_MMDVM_MODE_M17 ((dmrgo_mmdvm_mode_t)7)
/* Go: mmdvm.ModeNXDN. The Mode values. */
#define DMRGO_MMDVM_MODE_NXDN ((dmrgo_mmdvm_mode_t)5)
/* Go: mmdvm.ModeP25. The Mode values. */
#define DMRGO_MMDVM_MODE_P25 ((dmrgo_mmdvm_mode_t)4)
/* Go: mmdvm.ModePOCSAG. The Mode values. */
#define DMRGO_MMDVM_MODE_POCSAG ((dmrgo_mmdvm_mode_t)6)
/* Go: mmdvm.ModeYSF. The Mode values. */
#define DMRGO_MMDVM_MODE_YSF ((dmrgo_mmdvm_mode_t)3)
/* Go: mmdvm.NextFrame. NextFrame is a whole frame. */
#define DMRGO_MMDVM_NEXT_FRAME ((dmrgo_mmdvm_next_result_t)0)
/* Go: mmdvm.NextMore. NextMore is the start of a frame that needs more octets. */
#define DMRGO_MMDVM_NEXT_MORE ((dmrgo_mmdvm_next_result_t)1)
/* Go: mmdvm.NextSkip. NextSkip is octets that do not start a frame, to drop. */
#define DMRGO_MMDVM_NEXT_SKIP ((dmrgo_mmdvm_next_result_t)2)
/* Go: trunk.CapacityPlusNoSignalDefault. CapacityPlusNoSignalDefault is the default dmrgo_trunk_capacity_plus_config_t.no_signal: more than twice the 2 s beacon period of an idle rest channel. */
#define DMRGO_TRUNK_CAPACITY_PLUS_NO_SIGNAL_DEFAULT INT64_C(5000000000)
/* Go: trunk.ChannelAbsolute. ChannelAbsolute is the channel number of a grant or C_MOVE whose frequencies follow in a CG_AP or MV_AP block (ETSI TS 102 361-4 clause 7.1.1.1.1). */
#define DMRGO_TRUNK_CHANNEL_ABSOLUTE 4095
/* Go: trunk.ChannelNull. ChannelNull is CHNULL, the channel number that names no channel (ETSI TS 102 361-4 clause 7.2.19.1). */
#define DMRGO_TRUNK_CHANNEL_NULL 0
/* Go: trunk.DefaultMaxBERPermille. DefaultMaxBERPermille is the bit error rate of the TSCC, in parts per thousand of the FEC-checked bits of the last 32 TSCC bursts, above which an MS leaves the TSCC, when dmrgo_trunk_ms_config_t.max_ber_permille is 0. */
#define DMRGO_TRUNK_DEFAULT_MAX_BER_PERMILLE 50
/* Go: trunk.MaxAppendedOctets. MaxAppendedOctets is the most octets of appended data in a UDT: four blocks of 12 octets, less the CRC of the last block. */
#define DMRGO_TRUNK_MAX_APPENDED_OCTETS 46
/* Go: trunk.MaxChannels. MaxChannels is the number of channels that a ChannelPlan and a HuntList hold, the storage of a hunt list in ETSI TS 102 361-4 Annex D. */
#define DMRGO_TRUNK_MAX_CHANNELS 64
/* Go: trunk.MaxDenied. MaxDenied is the number of entries of the denied registration list of an MS. */
#define DMRGO_TRUNK_MAX_DENIED 8
/* Go: trunk.MaxDiversions. MaxDiversions is the size of the call diversion table of a TSCC (ETSI TS 102 361-4 clause 6.6.7). */
#define DMRGO_TRUNK_MAX_DIVERSIONS 16
/* Go: trunk.MaxDynamicGroups. MaxDynamicGroups is the number of DGNA talkgroups of an MS: 15 of the DGNA_Address mode and one of the DGNA_Alias mode (ETSI TS 102 361-4 clause 6.6.8.0). */
#define DMRGO_TRUNK_MAX_DYNAMIC_GROUPS 16
/* Go: trunk.MaxLead. MaxLead is the bound of dmrgo_trunk_tscc_config_t.lead: a Lead must be less than it. */
#define DMRGO_TRUNK_MAX_LEAD 1000000000
/* Go: trunk.MaxNeighbors. MaxNeighbors is the number of adjacent sites that a Site keeps. */
#define DMRGO_TRUNK_MAX_NEIGHBORS 8
/* Go: trunk.MaxOutputs. MaxOutputs is the most outputs that one call of a Follower, MS or CapacityPlusFollower method appends. */
#define DMRGO_TRUNK_MAX_OUTPUTS 10
/* Go: trunk.MaxPayloadChannels. MaxPayloadChannels is the most payload channels of a TSCC. */
#define DMRGO_TRUNK_MAX_PAYLOAD_CHANNELS 16
/* Go: trunk.MaxRules. MaxRules is the number of rules that a ChannelPlan holds. */
#define DMRGO_TRUNK_MAX_RULES 4
/* Go: trunk.MaxTSCCOutputs. MaxTSCCOutputs is the most outputs that one call of a TSCC method appends: one burst for the TSCC, one burst and one call end for each payload channel, and the events, such as a refusal for each authentication challenge and call set-up that times out. */
#define DMRGO_TRUNK_MAX_TSCC_OUTPUTS 43
/* Go: trunk.MaxTalkgroups. MaxTalkgroups is the size of dmrgo_trunk_follower_config_t.talkgroups. */
#define DMRGO_TRUNK_MAX_TALKGROUPS 32
/* Go: trunk.OutputAccepted. OutputAccepted reports that the TSCC accepted a request of the MS that needs no payload channel, such as a status call, a transmit interrupt or an IP connection advice. */
#define DMRGO_TRUNK_OUTPUT_ACCEPTED ((dmrgo_trunk_output_kind_t)19)
/* Go: trunk.OutputAhoy. OutputAhoy reports a C_AHOY for the MS, with the call in dmrgo_trunk_output_t.grant: an individual call that the MS answers, a radio check, or with Service DMRGO_ENUMS_SERVICE_KIND_CANCEL_CALL the end of the call from dmrgo_trunk_grant_t.source that the MS answered before its grant. */
#define DMRGO_TRUNK_OUTPUT_AHOY ((dmrgo_trunk_output_kind_t)9)
/* Go: trunk.OutputAmbient. OutputAmbient reports that the MS joined the Ambient Listening Service call of dmrgo_trunk_output_t.grant: it transmits without an action of its user until it ends the call at T_ALS or T_ALS_E. */
#define DMRGO_TRUNK_OUTPUT_AMBIENT ((dmrgo_trunk_output_kind_t)17)
/* Go: trunk.OutputAuthChallenge. OutputAuthChallenge reports the authentication challenge of the TSCC in dmrgo_trunk_output_t.challenge. */
#define DMRGO_TRUNK_OUTPUT_AUTH_CHALLENGE ((dmrgo_trunk_output_kind_t)13)
/* Go: trunk.OutputBurst. OutputBurst is a burst for the MS to transmit in dmrgo_trunk_output_t.slot at dmrgo_trunk_output_t.due. */
#define DMRGO_TRUNK_OUTPUT_BURST ((dmrgo_trunk_output_kind_t)6)
/* Go: trunk.OutputCallEnd. OutputCallEnd reports that the machine left the payload channel of dmrgo_trunk_output_t.grant. */
#define DMRGO_TRUNK_OUTPUT_CALL_END ((dmrgo_trunk_output_kind_t)5)
/* Go: trunk.OutputDelivered. OutputDelivered reports that the TSCC completed a UDT short data, polling, call diversion or DGNA request of the MS, with the reason in dmrgo_trunk_output_t.ack. */
#define DMRGO_TRUNK_OUTPUT_DELIVERED ((dmrgo_trunk_output_kind_t)14)
/* Go: trunk.OutputGrant. OutputGrant reports a channel grant in dmrgo_trunk_output_t.grant, whether or not the machine follows it. */
#define DMRGO_TRUNK_OUTPUT_GRANT ((dmrgo_trunk_output_kind_t)4)
/* Go: trunk.OutputGroups. OutputGroups reports that a DGNA transfer changed the talkgroups that dmrgo_trunk_ms_groups returns. */
#define DMRGO_TRUNK_OUTPUT_GROUPS ((dmrgo_trunk_output_kind_t)16)
/* Go: trunk.OutputLost. OutputLost reports that the machine lost the TSCC. */
#define DMRGO_TRUNK_OUTPUT_LOST ((dmrgo_trunk_output_kind_t)3)
/* Go: trunk.OutputPolled. OutputPolled reports that the TSCC polled the MS, with a C_AHOY from dmrgo_trunk_output_t.grant.source or with a USBD Poll Request, and that the MS sent its poll response or refused the poll. */
#define DMRGO_TRUNK_OUTPUT_POLLED ((dmrgo_trunk_output_kind_t)15)
/* Go: trunk.OutputPowerOff. OutputPowerOff reports that the MS de-registered, or gave up after T_Dereg, and may be switched off. */
#define DMRGO_TRUNK_OUTPUT_POWER_OFF ((dmrgo_trunk_output_kind_t)12)
/* Go: trunk.OutputProtect. OutputProtect reports a P_PROTECT for the MS on its payload channel, with its kind in dmrgo_trunk_output_t.protect. */
#define DMRGO_TRUNK_OUTPUT_PROTECT ((dmrgo_trunk_output_kind_t)11)
/* Go: trunk.OutputRefused. OutputRefused reports that the TSCC refused a request of the MS, or that the request failed. */
#define DMRGO_TRUNK_OUTPUT_REFUSED ((dmrgo_trunk_output_kind_t)8)
/* Go: trunk.OutputRegistered. OutputRegistered reports that the TSCC accepted the registration of the MS. */
#define DMRGO_TRUNK_OUTPUT_REGISTERED ((dmrgo_trunk_output_kind_t)7)
/* Go: trunk.OutputReverseChannel. OutputReverseChannel reports the RC command in dmrgo_trunk_output_t.rc on the payload channel of the MS. */
#define DMRGO_TRUNK_OUTPUT_REVERSE_CHANNEL ((dmrgo_trunk_output_kind_t)21)
/* Go: trunk.OutputSite. OutputSite reports that the machine confirmed a TSCC, or that the system parameters of the TSCC changed. */
#define DMRGO_TRUNK_OUTPUT_SITE ((dmrgo_trunk_output_kind_t)2)
/* Go: trunk.OutputSleep. OutputSleep reports that the MS may switch its receiver off until dmrgo_trunk_output_t.due, its next power save frame. */
#define DMRGO_TRUNK_OUTPUT_SLEEP ((dmrgo_trunk_output_kind_t)22)
/* Go: trunk.OutputStatus. OutputStatus reports a status in dmrgo_trunk_output_t.status: a status call to the MS or to one of its talkgroups, with the parties in dmrgo_trunk_output_t.grant, or the answer to a status poll of the MS, from dmrgo_trunk_output_t.grant.source. */
#define DMRGO_TRUNK_OUTPUT_STATUS ((dmrgo_trunk_output_kind_t)18)
/* Go: trunk.OutputStun. OutputStun reports that the TSCC stunned, revived or killed the MS, with the action in dmrgo_trunk_output_t.stun. */
#define DMRGO_TRUNK_OUTPUT_STUN ((dmrgo_trunk_output_kind_t)20)
/* Go: trunk.OutputTune. OutputTune requests the consumer to tune the receiver, and the transmitter of an MS, to dmrgo_trunk_output_t.tune. */
#define DMRGO_TRUNK_OUTPUT_TUNE ((dmrgo_trunk_output_kind_t)1)
/* Go: trunk.OutputUDT. OutputUDT reports a UDT delivery, which UDT returns until the next call of the machine. */
#define DMRGO_TRUNK_OUTPUT_UDT ((dmrgo_trunk_output_kind_t)10)
/* Go: trunk.ReasonAuthentication. ReasonAuthentication is a failed authentication: no key for the MS, or a response that the MS refused. */
#define DMRGO_TRUNK_REASON_AUTHENTICATION ((dmrgo_trunk_reason_t)18)
/* Go: trunk.ReasonCallTimer. ReasonCallTimer is the end of the longest call time of a TSCC. */
#define DMRGO_TRUNK_REASON_CALL_TIMER ((dmrgo_trunk_reason_t)17)
/* Go: trunk.ReasonCancelled. ReasonCancelled is a request that the consumer cancelled. */
#define DMRGO_TRUNK_REASON_CANCELLED ((dmrgo_trunk_reason_t)10)
/* Go: trunk.ReasonClear. ReasonClear is a P_CLEAR on the payload channel. */
#define DMRGO_TRUNK_REASON_CLEAR ((dmrgo_trunk_reason_t)3)
/* Go: trunk.ReasonDenied. ReasonDenied is a TSCC in a SYS_AREA that denied the registration of the MS. */
#define DMRGO_TRUNK_REASON_DENIED ((dmrgo_trunk_reason_t)13)
/* Go: trunk.ReasonDiverted. ReasonDiverted is a request that the TSCC answered with the diverted address of the called party in a UDT, which UDT returns. */
#define DMRGO_TRUNK_REASON_DIVERTED ((dmrgo_trunk_reason_t)15)
/* Go: trunk.ReasonHangtime. ReasonHangtime is the end of the call hang time after a terminator. */
#define DMRGO_TRUNK_REASON_HANGTIME ((dmrgo_trunk_reason_t)5)
/* Go: trunk.ReasonInactive. ReasonInactive is TV_Inactive or TD_Inactive without a burst on the payload channel. */
#define DMRGO_TRUNK_REASON_INACTIVE ((dmrgo_trunk_reason_t)4)
/* Go: trunk.ReasonInterrupt. ReasonInterrupt is a transmit interrupt: the MS left the payload channel to request it, or the TSCC stopped the transmission of the call. */
#define DMRGO_TRUNK_REASON_INTERRUPT ((dmrgo_trunk_reason_t)16)
/* Go: trunk.ReasonMaintenance. ReasonMaintenance is the end of the own call: the MS sent P_MAINT. */
#define DMRGO_TRUNK_REASON_MAINTENANCE ((dmrgo_trunk_reason_t)6)
/* Go: trunk.ReasonMove. ReasonMove is a C_MOVE to another TSCC. */
#define DMRGO_TRUNK_REASON_MOVE ((dmrgo_trunk_reason_t)11)
/* Go: trunk.ReasonNack. ReasonNack is a C_NACKD for the request, with its reason in dmrgo_trunk_output_t.ack. */
#define DMRGO_TRUNK_REASON_NACK ((dmrgo_trunk_reason_t)7)
/* Go: trunk.ReasonNoAnswer. ReasonNoAnswer is a random access that got no answer after the most attempts, or after TRand_TC. */
#define DMRGO_TRUNK_REASON_NO_ANSWER ((dmrgo_trunk_reason_t)8)
/* Go: trunk.ReasonNoSignal. ReasonNoSignal is T_Nosig without a TSCC burst, or a hunt list channel without a TSCC. */
#define DMRGO_TRUNK_REASON_NO_SIGNAL ((dmrgo_trunk_reason_t)1)
/* Go: trunk.ReasonNone. ReasonNone is the zero Reason. */
#define DMRGO_TRUNK_REASON_NONE ((dmrgo_trunk_reason_t)0)
/* Go: trunk.ReasonParked. ReasonParked is a P_PROTECT ILLEGALLY_PARKED for an MS that is neither the source nor the target of the call. */
#define DMRGO_TRUNK_REASON_PARKED ((dmrgo_trunk_reason_t)14)
/* Go: trunk.ReasonQuality. ReasonQuality is a TSCC whose signal level or bit error rate is below the thresholds of the MS. */
#define DMRGO_TRUNK_REASON_QUALITY ((dmrgo_trunk_reason_t)12)
/* Go: trunk.ReasonSysCode. ReasonSysCode is a TSCC with another C_SYScode, NSYSerr times. */
#define DMRGO_TRUNK_REASON_SYS_CODE ((dmrgo_trunk_reason_t)2)
/* Go: trunk.ReasonTimeout. ReasonTimeout is TP_Timer, TNP_Timer or T_Pending. */
#define DMRGO_TRUNK_REASON_TIMEOUT ((dmrgo_trunk_reason_t)9)
/* Go: trunk.StateControl. StateControl is on a confirmed TSCC. */
#define DMRGO_TRUNK_STATE_CONTROL ((dmrgo_trunk_state_t)1)
/* Go: trunk.StateHunting. StateHunting looks for a TSCC. */
#define DMRGO_TRUNK_STATE_HUNTING ((dmrgo_trunk_state_t)0)
/* Go: trunk.StatePayload. StatePayload follows a call on a payload channel. */
#define DMRGO_TRUNK_STATE_PAYLOAD ((dmrgo_trunk_state_t)2)
/* Go: trunk.StatusCancelEmergency. StatusCancelEmergency cancels an emergency alarm (ETSI TS 102 361-4 clause 6.6.6.3.2). */
#define DMRGO_TRUNK_STATUS_CANCEL_EMERGENCY ((dmrgo_trunk_status_t)124)
/* Go: trunk.StatusEmergency. StatusEmergency is an emergency alarm (ETSI TS 102 361-4 clause 6.6.6.3.1). */
#define DMRGO_TRUNK_STATUS_EMERGENCY ((dmrgo_trunk_status_t)126)
/* Go: trunk.StatusInterrupt. StatusInterrupt requests the TSCC to stop the transmission of an MS so that the caller can talk (ETSI TS 102 361-4 clause 6.4.14.3.3). */
#define DMRGO_TRUNK_STATUS_INTERRUPT ((dmrgo_trunk_status_t)125)
/* Go: trunk.StatusPoll. StatusPoll requests the status of the target (ETSI TS 102 361-4 clause 6.6.6.2). */
#define DMRGO_TRUNK_STATUS_POLL ((dmrgo_trunk_status_t)127)
/* Go: trunk.StatusTerminate. StatusTerminate requests the TSCC to stop the transmission of an MS and to end its call, such as an ALS call (ETSI TS 102 361-4 clause 6.4.14.3.4). */
#define DMRGO_TRUNK_STATUS_TERMINATE ((dmrgo_trunk_status_t)123)
/* Go: trunk.StunKill. StunKill disables the MS for good. */
#define DMRGO_TRUNK_STUN_KILL ((dmrgo_trunk_stun_action_t)3)
/* Go: trunk.StunNone. StunNone is the zero StunAction. */
#define DMRGO_TRUNK_STUN_NONE ((dmrgo_trunk_stun_action_t)0)
/* Go: trunk.StunRevive. StunRevive gives a stunned MS its user services again. */
#define DMRGO_TRUNK_STUN_REVIVE ((dmrgo_trunk_stun_action_t)2)
/* Go: trunk.StunStun. StunStun denies the MS the user services. */
#define DMRGO_TRUNK_STUN_STUN ((dmrgo_trunk_stun_action_t)1)
/* Go: trunk.TSCCAuthChallenge. TSCCAuthChallenge reports that the TSCC sent the authentication Challenge to the MS Address. */
#define DMRGO_TRUNK_TSCC_AUTH_CHALLENGE ((dmrgo_trunk_tscc_output_kind_t)7)
/* Go: trunk.TSCCBurst. TSCCBurst is an outbound burst with its CACH for Channel and Slot. */
#define DMRGO_TRUNK_TSCC_BURST ((dmrgo_trunk_tscc_output_kind_t)1)
/* Go: trunk.TSCCCallEnd. TSCCCallEnd reports that the TSCC cleared the call of Grant, with Reason. */
#define DMRGO_TRUNK_TSCC_CALL_END ((dmrgo_trunk_tscc_output_kind_t)5)
/* Go: trunk.TSCCCallStart. TSCCCallStart reports the grant in Grant. */
#define DMRGO_TRUNK_TSCC_CALL_START ((dmrgo_trunk_tscc_output_kind_t)4)
/* Go: trunk.TSCCDelivered. TSCCDelivered reports that a UDT short data, polling or DGNA transfer from Address to dmrgo_trunk_grant_t.target completed, with the final acknowledgement in Ack. */
#define DMRGO_TRUNK_TSCC_DELIVERED ((dmrgo_trunk_tscc_output_kind_t)8)
/* Go: trunk.TSCCDeregistered. TSCCDeregistered reports that the MS Address de-registered. */
#define DMRGO_TRUNK_TSCC_DEREGISTERED ((dmrgo_trunk_tscc_output_kind_t)3)
/* Go: trunk.TSCCDiversion. TSCCDiversion reports that the MS Address set or cleared a call diversion. */
#define DMRGO_TRUNK_TSCC_DIVERSION ((dmrgo_trunk_tscc_output_kind_t)11)
/* Go: trunk.TSCCIPAdvice. TSCCIPAdvice reports the IP connection advice of the MS Address, in IP, IPv6 and Remove. */
#define DMRGO_TRUNK_TSCC_IP_ADVICE ((dmrgo_trunk_tscc_output_kind_t)15)
/* Go: trunk.TSCCInterrupt. TSCCInterrupt reports the end of a transmit interrupt of the call of Grant for the MS Address, or for the TSCC when Address is 0. */
#define DMRGO_TRUNK_TSCC_INTERRUPT ((dmrgo_trunk_tscc_output_kind_t)14)
/* Go: trunk.TSCCRefused. TSCCRefused reports a C_NACKD with Ack to the MS Address. */
#define DMRGO_TRUNK_TSCC_REFUSED ((dmrgo_trunk_tscc_output_kind_t)6)
/* Go: trunk.TSCCRegistered. TSCCRegistered reports that the MS Address registered. */
#define DMRGO_TRUNK_TSCC_REGISTERED ((dmrgo_trunk_tscc_output_kind_t)2)
/* Go: trunk.TSCCStatus. TSCCStatus reports a status call with Status between the parties in Grant, and the answer of the called MS in Ack. */
#define DMRGO_TRUNK_TSCC_STATUS ((dmrgo_trunk_tscc_output_kind_t)12)
/* Go: trunk.TSCCStun. TSCCStun reports the end of Stun or Kill for the MS Address: Stun gives the action and Ack holds the final answer of the MS. */
#define DMRGO_TRUNK_TSCC_STUN ((dmrgo_trunk_tscc_output_kind_t)13)
/* Go: trunk.TSCCUDT. TSCCUDT reports the UDT from the MS Address that answers PollShortData. */
#define DMRGO_TRUNK_TSCC_UDT ((dmrgo_trunk_tscc_output_kind_t)9)
/* Go: trunk.TSCCUSBD. TSCCUSBD reports a USBD Poll Response, to the poll of the MS Address. */
#define DMRGO_TRUNK_TSCC_USBD ((dmrgo_trunk_tscc_output_kind_t)10)
/* Go: trunkauth.KeyLen. KeyLen is the length of the authentication key K in octets (ETSI TS 102 361-4 clause 6.4.8.1.1). */
#define DMRGO_TRUNKAUTH_KEY_LEN 16
/* Go: trunkauth.MaxChallenge. MaxChallenge is the largest challenge that a TSCC sends in the Source Address of a C_AHOY. */
#define DMRGO_TRUNKAUTH_MAX_CHALLENGE 16776415
/* Go: vocoder.FrameErased. FrameErased is a frame that the codec received and did not use, because it found too many bit errors in it. */
#define DMRGO_VOCODER_FRAME_ERASED ((dmrgo_vocoder_frame_status_t)2)
/* Go: vocoder.FrameGood. FrameGood is a frame that the codec decoded, after any FEC correction. */
#define DMRGO_VOCODER_FRAME_GOOD ((dmrgo_vocoder_frame_status_t)0)
/* Go: vocoder.FrameInvalid. FrameInvalid is a slot whose bits are not a valid frame of the vocoder, such as a frame with padding bits set. */
#define DMRGO_VOCODER_FRAME_INVALID ((dmrgo_vocoder_frame_status_t)3)
/* Go: vocoder.FrameLost. FrameLost is a frame that never arrived. */
#define DMRGO_VOCODER_FRAME_LOST ((dmrgo_vocoder_frame_status_t)1)
/* Go: vocoder.OutputRepeat. OutputRepeat is a repeat of the frame before, in place of a frame that is lost or that the codec did not use. */
#define DMRGO_VOCODER_OUTPUT_REPEAT ((dmrgo_vocoder_frame_output_t)2)
/* Go: vocoder.OutputSilence. OutputSilence is silence or comfort noise. */
#define DMRGO_VOCODER_OUTPUT_SILENCE ((dmrgo_vocoder_frame_output_t)3)
/* Go: vocoder.OutputTone. OutputTone is a tone, such as a DTMF digit, that the codec decoded from a tone frame. */
#define DMRGO_VOCODER_OUTPUT_TONE ((dmrgo_vocoder_frame_output_t)1)
/* Go: vocoder.OutputVoice. OutputVoice is speech that the codec decoded from the frame. */
#define DMRGO_VOCODER_OUTPUT_VOICE ((dmrgo_vocoder_frame_output_t)0)
/* Go: codec2.Backend. Backend is the name of the backend of this build: "native", "wasm" or "stub". */
#define DMRGO_CODEC2_BACKEND "native"
/* Go: codec2.DefaultFID. DefaultFID is the Full LC Feature set ID QRadioLink sends for Codec2 calls. */
#define DMRGO_CODEC2_DEFAULT_FID ((dmrgo_enums_fid_t)194)
/* Go: codec2.FrameSamples. FrameSamples is the number of 8 kHz PCM samples in one Codec2 frame. */
#define DMRGO_CODEC2_FRAME_SAMPLES 160
/* Go: codec2.Mode2400. 2400 bit/s, 6 bytes per frame */
#define DMRGO_CODEC2_MODE2400 ((dmrgo_codec2_mode_t)2400)
/* Go: codec2.Mode3200. 3200 bit/s, 8 bytes per frame */
#define DMRGO_CODEC2_MODE3200 ((dmrgo_codec2_mode_t)3200)
/* Go: codec2.ModeAuto. decode the mode that the frames of each call show, encode DMRGO_CODEC2_MODE2400 */
#define DMRGO_CODEC2_MODE_AUTO ((dmrgo_codec2_mode_t)0)
/* Go: dvsi.DefaultTimeout. DefaultTimeout is the time a Codec waits for a reply when dmrgo_dvsi_config_t.timeout is zero. */
#define DMRGO_DVSI_DEFAULT_TIMEOUT 500000000
/* Go: dvsi.FieldChannel0. the next fields are for channel 0 */
#define DMRGO_DVSI_FIELD_CHANNEL0 ((dmrgo_dvsi_field_t)64)
/* Go: dvsi.FieldChannel1. the next fields are for channel 1 (AMBE-3003) */
#define DMRGO_DVSI_FIELD_CHANNEL1 ((dmrgo_dvsi_field_t)65)
/* Go: dvsi.FieldChannel2. the next fields are for channel 2 (AMBE-3003) */
#define DMRGO_DVSI_FIELD_CHANNEL2 ((dmrgo_dvsi_field_t)66)
/* Go: dvsi.FieldInit. initialize the encoder (bit 0) and decoder (bit 1) */
#define DMRGO_DVSI_FIELD_INIT ((dmrgo_dvsi_field_t)11)
/* Go: dvsi.FieldParityMode. turn the parity field on (1) or off (0) */
#define DMRGO_DVSI_FIELD_PARITY_MODE ((dmrgo_dvsi_field_t)63)
/* Go: dvsi.FieldProdID. product identification query */
#define DMRGO_DVSI_FIELD_PROD_ID ((dmrgo_dvsi_field_t)48)
/* Go: dvsi.FieldRateP. six rate control words for the current channel */
#define DMRGO_DVSI_FIELD_RATE_P ((dmrgo_dvsi_field_t)10)
/* Go: dvsi.FieldReady. sent by the chip when it is ready after a reset */
#define DMRGO_DVSI_FIELD_READY ((dmrgo_dvsi_field_t)57)
/* Go: dvsi.FieldReset. reset with the configuration pins */
#define DMRGO_DVSI_FIELD_RESET ((dmrgo_dvsi_field_t)51)
/* Go: dvsi.FieldVerString. version string query */
#define DMRGO_DVSI_FIELD_VER_STRING ((dmrgo_dvsi_field_t)49)
/* Go: dvsi.FrameBits. FrameBits is the number of channel bits in one DMR AMBE+2 frame with FEC. */
#define DMRGO_DVSI_FRAME_BITS 72
/* Go: dvsi.FrameSamples. FrameSamples is the number of 8 kHz samples in one 20 ms frame. */
#define DMRGO_DVSI_FRAME_SAMPLES 160
/* Go: dvsi.HeaderLen. HeaderLen is the length of the packet header: DMRGO_DVSI_START_BYTE, the 2-byte LENGTH, most significant byte first, and the packet type. */
#define DMRGO_DVSI_HEADER_LEN 4
/* Go: dvsi.MaxBits. MinBits and DMRGO_DVSI_MAX_BITS bound the bits of a CHAND field (AMBE-3000R manual Table 106). */
#define DMRGO_DVSI_MAX_BITS 192
/* Go: dvsi.MaxChannel. MaxChannel is the highest channel number: the AMBE-3003 has channels 0 to 2, the AMBE-3000R only channel 0 (AMBE-3003 manual Table 27). */
#define DMRGO_DVSI_MAX_CHANNEL 2
/* Go: dvsi.MaxLength. MaxLength is the largest LENGTH that Parse accepts. */
#define DMRGO_DVSI_MAX_LENGTH 384
/* Go: dvsi.MaxPacketLen. MaxPacketLen is the length of the longest packet that Parse accepts. */
#define DMRGO_DVSI_MAX_PACKET_LEN 388
/* Go: dvsi.MaxProductLen. MaxProductLen and DMRGO_DVSI_MAX_VERSION_LEN are the longest product name and version string that a Codec keeps (AMBE-3000R manual Tables 67 and 69). */
#define DMRGO_DVSI_MAX_PRODUCT_LEN 16
/* Go: dvsi.MaxSamples. MinSamples and DMRGO_DVSI_MAX_SAMPLES bound the samples of a SPEECHD field (AMBE-3000R manual Table 98). */
#define DMRGO_DVSI_MAX_SAMPLES 164
/* Go: dvsi.MaxVersionLen. MaxProductLen and DMRGO_DVSI_MAX_VERSION_LEN are the longest product name and version string that a Codec keeps (AMBE-3000R manual Tables 67 and 69). */
#define DMRGO_DVSI_MAX_VERSION_LEN 48
/* Go: dvsi.MinBits. MinBits and DMRGO_DVSI_MAX_BITS bound the bits of a CHAND field (AMBE-3000R manual Table 106). */
#define DMRGO_DVSI_MIN_BITS 40
/* Go: dvsi.MinSamples. MinSamples and DMRGO_DVSI_MAX_SAMPLES bound the samples of a SPEECHD field (AMBE-3000R manual Table 98). */
#define DMRGO_DVSI_MIN_SAMPLES 156
/* Go: dvsi.StartByte. StartByte is the first byte of every packet (AMBE-3000R manual section 6.5.1). */
#define DMRGO_DVSI_START_BYTE 97
/* Go: dvsi.TypeChannel. channel bits to decode, or encoded by the chip */
#define DMRGO_DVSI_TYPE_CHANNEL ((dmrgo_dvsi_packet_type_t)1)
/* Go: dvsi.TypeControl. configuration requests and their responses */
#define DMRGO_DVSI_TYPE_CONTROL ((dmrgo_dvsi_packet_type_t)0)
/* Go: dvsi.TypeSpeech. speech samples to encode, or decoded by the chip */
#define DMRGO_DVSI_TYPE_SPEECH ((dmrgo_dvsi_packet_type_t)2)
/* Go: voice.DefaultHoldoffMax. DefaultHoldoffMax is the upper end of the random holdoff before a new channel authorization try, the recommended maximum T_Holdoff of ETSI TS 102 361-1 clause F.1. */
#define DMRGO_VOICE_DEFAULT_HOLDOFF_MAX 1000000000
/* Go: voice.DefaultIdleSearch. DefaultIdleSearch is the idle search timer T_IdleSrch of a polite call, the most that ETSI TS 102 361-1 clause F.1 allows. */
#define DMRGO_VOICE_DEFAULT_IDLE_SEARCH 540000000
/* Go: voice.DefaultJitter. DefaultJitter is the playout delay of a Jitter when dmrgo_voice_jitter_config_t.delay is 0: 360 ms, the default Jitter of the DMR Network section of MMDVMHost. */
#define DMRGO_VOICE_DEFAULT_JITTER 360000000
/* Go: voice.DefaultLost. DefaultLost is the time without a burst after which a Receiver ends a call, when dmrgo_voice_receiver_config_t.lost is 0. */
#define DMRGO_VOICE_DEFAULT_LOST 1000000000
/* Go: voice.DefaultQueue. DefaultQueue is the number of vocoder slots that a Transmitter buffers when dmrgo_voice_transmitter_config_t.queue is 0 and dmrgo_voice_transmitter_config_t.headers is 0 or 1: three bursts. */
#define DMRGO_VOICE_DEFAULT_QUEUE 9
/* Go: voice.EndDataSync. EndDataSync is a data burst other than a terminator. */
#define DMRGO_VOICE_END_DATA_SYNC ((dmrgo_voice_end_reason_t)2)
/* Go: voice.EndDenied. EndDenied is a polite call of a Transmitter that the channel denied (ETSI TS 102 361-1 clause 5.2.2). */
#define DMRGO_VOICE_END_DENIED ((dmrgo_voice_end_reason_t)9)
/* Go: voice.EndIdle. EndIdle is an idle burst. */
#define DMRGO_VOICE_END_IDLE ((dmrgo_voice_end_reason_t)3)
/* Go: voice.EndInterrupted. EndInterrupted is a call of a Transmitter that a Tier 2 RC command ended (ETSI TS 102 361-2 clause 6.3). */
#define DMRGO_VOICE_END_INTERRUPTED ((dmrgo_voice_end_reason_t)10)
/* Go: voice.EndLost. EndLost is a time of dmrgo_voice_receiver_config_t.lost without a burst. */
#define DMRGO_VOICE_END_LOST ((dmrgo_voice_end_reason_t)4)
/* Go: voice.EndNoOutbound. EndNoOutbound is a call of a Transmitter that began in hang time with no outbound burst at all until T_MS_ChanAuth ran out: the BS is asleep or out of range. */
#define DMRGO_VOICE_END_NO_OUTBOUND ((dmrgo_voice_end_reason_t)11)
/* Go: voice.EndSuperseded. EndSuperseded is a new call: an LC with other addresses, or another transport stream. */
#define DMRGO_VOICE_END_SUPERSEDED ((dmrgo_voice_end_reason_t)7)
/* Go: voice.EndSyncLost. EndSyncLost is a transport that lost the signal, dmrgo_layer2_hint_t.sync_lost or dmrgo_voice_receiver_lost, or 13 voice bursts in a row that failed the sync check of the package doc. */
#define DMRGO_VOICE_END_SYNC_LOST ((dmrgo_voice_end_reason_t)5)
/* Go: voice.EndTerminator. EndTerminator is a Terminator with LC. */
#define DMRGO_VOICE_END_TERMINATOR ((dmrgo_voice_end_reason_t)1)
/* Go: voice.EndTimeout. EndTimeout is the transmit timeout T_TO of a Transmitter (ETSI TS 102 361-2 clause 6.1). */
#define DMRGO_VOICE_END_TIMEOUT ((dmrgo_voice_end_reason_t)8)
/* Go: voice.EndTransport. EndTransport is the end flag of the transport, dmrgo_layer2_hint_t.end DMRGO_LAYER2_END_STRONG. */
#define DMRGO_VOICE_END_TRANSPORT ((dmrgo_voice_end_reason_t)6)
/* Go: voice.EventCallEnd. EventCallEnd ends a call. */
#define DMRGO_VOICE_EVENT_CALL_END ((dmrgo_voice_event_kind_t)6)
/* Go: voice.EventCallStart. EventCallStart starts a call. */
#define DMRGO_VOICE_EVENT_CALL_START ((dmrgo_voice_event_kind_t)1)
/* Go: voice.EventEmbedded. EventEmbedded is an embedded LC that is not the call LC, such as GPS or a talker alias block. */
#define DMRGO_VOICE_EVENT_EMBEDDED ((dmrgo_voice_event_kind_t)3)
/* Go: voice.EventPIHeader. EventPIHeader is a PI Header of the call. */
#define DMRGO_VOICE_EVENT_PI_HEADER ((dmrgo_voice_event_kind_t)5)
/* Go: voice.EventSessionEnd. EventSessionEnd ends the call hang time with no new call to the same target. */
#define DMRGO_VOICE_EVENT_SESSION_END ((dmrgo_voice_event_kind_t)8)
/* Go: voice.EventSessionStart. EventSessionStart joins a call session in its hang time, from a Terminator with LC. */
#define DMRGO_VOICE_EVENT_SESSION_START ((dmrgo_voice_event_kind_t)7)
/* Go: voice.EventTalkerAlias. EventTalkerAlias is a complete talker alias. */
#define DMRGO_VOICE_EVENT_TALKER_ALIAS ((dmrgo_voice_event_kind_t)4)
/* Go: voice.EventVoice. EventVoice is a voice burst. */
#define DMRGO_VOICE_EVENT_VOICE ((dmrgo_voice_event_kind_t)2)
/* Go: voice.InterrupterIdle. InterrupterIdle runs no interrupt request. */
#define DMRGO_VOICE_INTERRUPTER_IDLE ((dmrgo_voice_interrupter_state_t)0)
/* Go: voice.InterrupterSending. InterrupterSending sends the standalone RC bursts of a try. */
#define DMRGO_VOICE_INTERRUPTER_SENDING ((dmrgo_voice_interrupter_state_t)1)
/* Go: voice.InterrupterWaiting. InterrupterWaiting waits T_RCtimer for the Terminator with LC. */
#define DMRGO_VOICE_INTERRUPTER_WAITING ((dmrgo_voice_interrupter_state_t)2)
/* Go: voice.JitterBuffered. JitterBuffered is a packet that Pop returns later. */
#define DMRGO_VOICE_JITTER_BUFFERED ((dmrgo_voice_jitter_result_t)1)
/* Go: voice.JitterBypass. JitterBypass is a packet that the Jitter does not take: the buffer is off, the packet has no dmrgo_layer2_hint_t.has_seq, or two other streams wait. */
#define DMRGO_VOICE_JITTER_BYPASS ((dmrgo_voice_jitter_result_t)2)
/* Go: voice.JitterDuplicate. JitterDuplicate is a packet dropped as a copy of one buffered or played. */
#define DMRGO_VOICE_JITTER_DUPLICATE ((dmrgo_voice_jitter_result_t)4)
/* Go: voice.JitterLate. JitterLate is a packet dropped because its Due time has passed, or because a later packet has played. */
#define DMRGO_VOICE_JITTER_LATE ((dmrgo_voice_jitter_result_t)3)
/* Go: voice.JitterOverflow. JitterOverflow is a packet dropped because it is too far ahead of the packet that plays next for the buffer to hold it. */
#define DMRGO_VOICE_JITTER_OVERFLOW ((dmrgo_voice_jitter_result_t)5)
/* Go: voice.MaxEvents. MaxEvents is the most events that one call of a Receiver method appends. */
#define DMRGO_VOICE_MAX_EVENTS 16
/* Go: voice.MaxHeaders. MaxHeaders is the most Voice LC Headers before burst A. */
#define DMRGO_VOICE_MAX_HEADERS 8
/* Go: voice.MaxJitter. MaxJitter is the longest playout delay. */
#define DMRGO_VOICE_MAX_JITTER 2000000000
/* Go: voice.MaxOutputs. MaxOutputs is the most outputs that one call of a Transmitter or Interrupter method appends: one burst, and DMRGO_VOICE_OUTPUT_ENDED after the last terminator. */
#define DMRGO_VOICE_MAX_OUTPUTS 2
/* Go: voice.MaxQueue. MaxQueue is the most vocoder slots that a Transmitter buffers. */
#define DMRGO_VOICE_MAX_QUEUE 192
/* Go: voice.MaxRepeats. MaxRepeats is the most standalone RC bursts of one try. */
#define DMRGO_VOICE_MAX_REPEATS 8
/* Go: voice.MaxRetries. MaxRetries is the most retries of an interrupt request. */
#define DMRGO_VOICE_MAX_RETRIES 255
/* Go: voice.MaxTerminators. MaxTerminators is the most Terminators with LC at the end of a call. */
#define DMRGO_VOICE_MAX_TERMINATORS 64
/* Go: voice.OriginEmbedded. OriginEmbedded is the embedded LC of bursts B to E (late entry). */
#define DMRGO_VOICE_ORIGIN_EMBEDDED ((dmrgo_voice_origin_t)2)
/* Go: voice.OriginExpected. OriginExpected is the call that dmrgo_voice_receiver_expect gave, for voice that came without an LC, such as after a Tier III grant. */
#define DMRGO_VOICE_ORIGIN_EXPECTED ((dmrgo_voice_origin_t)4)
/* Go: voice.OriginHeader. OriginHeader is a Voice LC Header. */
#define DMRGO_VOICE_ORIGIN_HEADER ((dmrgo_voice_origin_t)1)
/* Go: voice.OriginTerminator. OriginTerminator is a Terminator with LC, seen in the call hang time. */
#define DMRGO_VOICE_ORIGIN_TERMINATOR ((dmrgo_voice_origin_t)3)
/* Go: voice.OriginUnknown. OriginUnknown is voice whose LC is not known yet. */
#define DMRGO_VOICE_ORIGIN_UNKNOWN ((dmrgo_voice_origin_t)0)
/* Go: voice.OutputBurst. OutputBurst is a burst to send. */
#define DMRGO_VOICE_OUTPUT_BURST ((dmrgo_voice_output_kind_t)1)
/* Go: voice.OutputEnded. OutputEnded is the end of the transmission. */
#define DMRGO_VOICE_OUTPUT_ENDED ((dmrgo_voice_output_kind_t)2)
/* Go: voice.OutputInterruptCanceled. OutputInterruptCanceled is an interrupt request of an Interrupter that Cancel ended. */
#define DMRGO_VOICE_OUTPUT_INTERRUPT_CANCELED ((dmrgo_voice_output_kind_t)5)
/* Go: voice.OutputInterruptFailed. OutputInterruptFailed is an interrupt request of an Interrupter without a Terminator with LC after the last try (ETSI TS 102 361-2 clause 6.3.5). */
#define DMRGO_VOICE_OUTPUT_INTERRUPT_FAILED ((dmrgo_voice_output_kind_t)4)
/* Go: voice.OutputInterrupted. OutputInterrupted is the Terminator with LC that ends the call of another radio after the RC command of an Interrupter (ETSI TS 102 361-2 clause 6.3.5). */
#define DMRGO_VOICE_OUTPUT_INTERRUPTED ((dmrgo_voice_output_kind_t)3)
/* Go: voice.StateHang. StateHang is the call hang time after a call, in which a new call to the same target continues the session. */
#define DMRGO_VOICE_STATE_HANG ((dmrgo_voice_state_t)3)
/* Go: voice.StateIdle. StateIdle has no call and no session. */
#define DMRGO_VOICE_STATE_IDLE ((dmrgo_voice_state_t)0)
/* Go: voice.StateInCall. StateInCall has a call. */
#define DMRGO_VOICE_STATE_IN_CALL ((dmrgo_voice_state_t)2)
/* Go: voice.StateLateEntry. StateLateEntry has voice whose LC is not known yet. */
#define DMRGO_VOICE_STATE_LATE_ENTRY ((dmrgo_voice_state_t)1)
/* Go: voice.TransmitterAccess. TransmitterAccess waits for Channel to report an idle channel before a polite call (ETSI TS 102 361-1 clause 5.2.2). */
#define DMRGO_VOICE_TRANSMITTER_ACCESS ((dmrgo_voice_transmitter_state_t)5)
/* Go: voice.TransmitterChanAuth. TransmitterChanAuth sends the ChanAuth PDU of a call in hang time and waits T_MS_ChanAuth for the BS to repeat it (ETSI TS 102 361-2 clause 5.1.1.6.2). */
#define DMRGO_VOICE_TRANSMITTER_CHAN_AUTH ((dmrgo_voice_transmitter_state_t)6)
/* Go: voice.TransmitterEnding. TransmitterEnding pads the last superframe and sends the terminators. */
#define DMRGO_VOICE_TRANSMITTER_ENDING ((dmrgo_voice_transmitter_state_t)3)
/* Go: voice.TransmitterHeader. TransmitterHeader sends the Voice LC Headers and the PI Header. */
#define DMRGO_VOICE_TRANSMITTER_HEADER ((dmrgo_voice_transmitter_state_t)1)
/* Go: voice.TransmitterIdle. TransmitterIdle sends nothing. */
#define DMRGO_VOICE_TRANSMITTER_IDLE ((dmrgo_voice_transmitter_state_t)0)
/* Go: voice.TransmitterTimedOut. TransmitterTimedOut has ended the call after T_TO and waits for Stop, the release of the PTT (ETSI TS 102 361-2 clause 6.1). */
#define DMRGO_VOICE_TRANSMITTER_TIMED_OUT ((dmrgo_voice_transmitter_state_t)4)
/* Go: voice.TransmitterVoice. TransmitterVoice sends voice bursts. */
#define DMRGO_VOICE_TRANSMITTER_VOICE ((dmrgo_voice_transmitter_state_t)2)
#ifndef DMRGO_NO_PROTOTYPES
/* Go: dmrgo.ConfigError.Error. Error returns the message of e. */
int dmrgo_config_error_error(const dmrgo_config_error_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_config_error_last sets *ok when the last error of this thread holds a dmrgo_config_error_t and copies it to *out. Its strings point into thread-local memory that the next failed call on the thread reuses. */
int dmrgo_config_error_last(dmrgo_config_error_t *out, bool *ok);
/* Go: dmrgo.FieldRangeError.Error. Error returns the message of e. */
int dmrgo_field_range_error_error(const dmrgo_field_range_error_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_field_range_error_last sets *ok when the last error of this thread holds a dmrgo_field_range_error_t and copies it to *out. Its strings point into thread-local memory that the next failed call on the thread reuses. */
int dmrgo_field_range_error_last(dmrgo_field_range_error_t *out, bool *ok);
/* Go: dmrgo.Service.String. String returns the name of the service. */
int dmrgo_service_string(dmrgo_service_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: bs.Activation.String. String returns the name of the activation. */
int dmrgo_bs_activation_string(dmrgo_bs_activation_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_bs_cach_new makes a zero dmrgo_bs_cach_t. */
int dmrgo_bs_cach_new(dmrgo_bs_cach_t **out);
/* dmrgo_bs_cach_free frees the handle. self may be NULL. */
int dmrgo_bs_cach_free(dmrgo_bs_cach_t *self);
/* Go: bs.CACH.First. First reports whether the next call of Next starts a new Short LC, so that the caller builds the Short LC only then. */
int dmrgo_bs_cach_first(dmrgo_bs_cach_t *self, bool *out);
/* Go: bs.CACH.Next. Next returns the CACH field before the outbound burst of tc, in transmit order, packed as dmrgo_layer2_decode_cach_field takes it. It returns DMRGO_ERR_BS_SLOT for a tc other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, DMRGO_ERR_NIL_ARGUMENT for a NULL slc when First is true, and the error of dmrgo_pdu_short_lc_encode; after an error First stays true. slc may be NULL. */
int dmrgo_bs_cach_next(dmrgo_bs_cach_t *self, dmrgo_enums_slot_t tc, bool busy, const dmrgo_pdu_short_lc_t *slc, uint8_t out[3]);
/* Go: bs.CACH.Reset. Reset makes the next Next start a new Short LC. */
int dmrgo_bs_cach_reset(dmrgo_bs_cach_t *self);
/* Go: bs.ChannelAuth.String. String returns the name of the channel authorization. */
int dmrgo_bs_channel_auth_string(dmrgo_bs_channel_auth_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: bs.CheckSlot. CheckSlot returns DMRGO_ERR_BS_SLOT for a slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, the slots that dmrgo_bs_repeater_inbound and dmrgo_bs_repeater_lost drop. */
int dmrgo_bs_check_slot(dmrgo_enums_slot_t s);
/* Go: bs.Mode.String. String returns the name of the mode. */
int dmrgo_bs_mode_string(dmrgo_bs_mode_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: bs.New. New returns a Repeater for cfg. It returns a DMRGO_ERR_CONFIG for a field out of range. cfg may be NULL. */
int dmrgo_bs_new(const dmrgo_bs_config_t *cfg, dmrgo_bs_repeater_t **out);
/* Go: bs.OutputKind.String. String returns the name of the kind. */
int dmrgo_bs_output_kind_string(dmrgo_bs_output_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: bs.Reason.String. String returns the name of the reason. */
int dmrgo_bs_reason_string(dmrgo_bs_reason_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_bs_repeater_free frees the handle. self may be NULL. */
int dmrgo_bs_repeater_free(dmrgo_bs_repeater_t *self);
/* Go: bs.Repeater.Deadline. Deadline returns the time at which the Repeater needs a Tick. */
int dmrgo_bs_repeater_deadline(dmrgo_bs_repeater_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_bs_repeater_decoded_need sets *items and *arena to the room that dmrgo_bs_repeater_decoded needs for these arguments, without a change to the handle. */
int dmrgo_bs_repeater_decoded_need(dmrgo_bs_repeater_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, const dmrgo_bs_source_t *from, size_t *items, size_t *arena);
/* Go: bs.Repeater.Decoded. Decoded takes the burst b, received on slot h->slot from the source from and decoded by the caller, which may be NULL for a burst that did not decode, and runs it through the Repeater as Inbound does, with the FEC results of b. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_bs_repeater_decoded_need gives (DMRGO_BS_REPEATER_DECODED_MAX_ITEMS items). b may be NULL. */
int dmrgo_bs_repeater_decoded(dmrgo_bs_repeater_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, const dmrgo_bs_source_t *from, dmrgo_bs_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_bs_repeater_inbound_need sets *items and *arena to the room that dmrgo_bs_repeater_inbound needs for these arguments, without a change to the handle. */
int dmrgo_bs_repeater_inbound_need(dmrgo_bs_repeater_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, const dmrgo_bs_source_t *from, size_t *items, size_t *arena);
/* Go: bs.Repeater.Inbound. Inbound takes a burst received on slot h->slot from the source from, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_bs_repeater_inbound_need gives (DMRGO_BS_REPEATER_INBOUND_MAX_ITEMS items). raw may be NULL. */
int dmrgo_bs_repeater_inbound(dmrgo_bs_repeater_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, const dmrgo_bs_source_t *from, dmrgo_bs_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: bs.Repeater.JitterStats. JitterStats returns the counts of the jitter buffer of slot s, or zero counts for a slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2 or when dmrgo_bs_config_t.jitter turned the buffer off. */
int dmrgo_bs_repeater_jitter_stats(dmrgo_bs_repeater_t *self, dmrgo_enums_slot_t s, dmrgo_voice_jitter_stats_t *out);
/* dmrgo_bs_repeater_lost_need sets *items and *arena to the room that dmrgo_bs_repeater_lost needs for these arguments, without a change to the handle. */
int dmrgo_bs_repeater_lost_need(dmrgo_bs_repeater_t *self, dmrgo_duration_t now, dmrgo_enums_slot_t s, const dmrgo_bs_source_t *from, size_t *items, size_t *arena);
/* Go: bs.Repeater.Lost. Lost records that the transport lost the signal of slot s, such as an MMDVM TAG_LOST. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_bs_repeater_lost_need gives (DMRGO_BS_REPEATER_LOST_MAX_ITEMS items). */
int dmrgo_bs_repeater_lost(dmrgo_bs_repeater_t *self, dmrgo_duration_t now, dmrgo_enums_slot_t s, const dmrgo_bs_source_t *from, dmrgo_bs_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: bs.Repeater.Reject. Reject rejects the call on slot s, as for an access rule of the caller, typically on its DMRGO_BS_OUTPUT_CALL_START. It returns DMRGO_ERR_ZERO_VALUE on a zero Repeater and DMRGO_ERR_BS_SLOT for a slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, and does nothing for a slot without a call. */
int dmrgo_bs_repeater_reject(dmrgo_bs_repeater_t *self, dmrgo_enums_slot_t s);
/* Go: bs.Repeater.Reset. Reset ends every call without outputs, empties the queues and puts the Repeater in DMRGO_BS_STATE_HIBERNATING, or keyed in DMRGO_BS_MODE_NETWORK. */
int dmrgo_bs_repeater_reset(dmrgo_bs_repeater_t *self);
/* Go: bs.Repeater.SlotState. SlotState returns the state of slot s, and DMRGO_BS_SLOT_IDLE for a slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2. */
int dmrgo_bs_repeater_slot_state(dmrgo_bs_repeater_t *self, dmrgo_enums_slot_t s, dmrgo_bs_slot_state_t *out);
/* Go: bs.Repeater.State. State returns the state of both slots. */
int dmrgo_bs_repeater_state(dmrgo_bs_repeater_t *self, dmrgo_bs_state_t *out);
/* dmrgo_bs_repeater_tick_need sets *items and *arena to the room that dmrgo_bs_repeater_tick needs for these arguments, without a change to the handle. */
int dmrgo_bs_repeater_tick_need(dmrgo_bs_repeater_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: bs.Repeater.Tick. Tick runs the timers that are due at now and, in DMRGO_BS_MODE_RF while keyed, appends the next outbound burst when now has reached its Due time minus dmrgo_bs_config_t.lead. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_bs_repeater_tick_need gives (DMRGO_BS_REPEATER_TICK_MAX_ITEMS items). */
int dmrgo_bs_repeater_tick(dmrgo_bs_repeater_t *self, dmrgo_duration_t now, dmrgo_bs_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: bs.Service.String. String returns the name of the service. */
int dmrgo_bs_service_string(dmrgo_bs_service_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: bs.SlotState.String. String returns the name of the slot state. */
int dmrgo_bs_slot_state_string(dmrgo_bs_slot_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: bs.State.String. String returns the name of the state. */
int dmrgo_bs_state_string(dmrgo_bs_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: csbk.NewMatch. NewMatch returns the Match of an answer with feature set fid and one of opcodes, with N set to the number of opcodes. It returns a DMRGO_ERR_CONFIG for no opcodes or more than 4. */
int dmrgo_csbk_new_match(dmrgo_enums_fid_t fid, const dmrgo_pdu_csbk_opcode_t *opcodes, size_t opcodes_len, dmrgo_csbk_match_t *out);
/* Go: csbk.NewPreambles. NewPreambles returns a Preambles for cfg. cfg may be NULL. */
int dmrgo_csbk_new_preambles(const dmrgo_csbk_preambles_config_t *cfg, dmrgo_csbk_preambles_t **out);
/* Go: csbk.NewRequester. NewRequester returns a Requester for cfg. It returns a DMRGO_ERR_CONFIG for a color code above 15, an unknown Source, Retries above DMRGO_CSBK_MAX_RETRIES, a negative Lead or a Slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, so also for a NULL cfg. cfg may be NULL. */
int dmrgo_csbk_new_requester(const dmrgo_csbk_requester_config_t *cfg, dmrgo_csbk_requester_t **out);
/* Go: csbk.NewResponder. NewResponder returns a Responder for cfg. It returns a DMRGO_ERR_CONFIG for a NULL cfg, an Address of 0 or above 24 bits, a color code above 15, an unknown Source, Access or OACSU, a negative Lead, or a Slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2. cfg may be NULL. */
int dmrgo_csbk_new_responder(const dmrgo_csbk_responder_config_t *cfg, dmrgo_csbk_responder_t **out);
/* Go: csbk.NewTiming. NewTiming returns a Timing for cfg. It returns a DMRGO_ERR_CONFIG for a NULL cfg, an ID of 0 or above DMRGO_CSBK_MAX_TIMING_ID, a DynamicID above DMRGO_CSBK_MAX_DYNAMIC_ID, a Slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, or a negative Lead. cfg may be NULL. */
int dmrgo_csbk_new_timing(const dmrgo_csbk_timing_config_t *cfg, dmrgo_csbk_timing_t **out);
/* Go: csbk.NewWakeup. NewWakeup returns a Wakeup for cfg. It returns a DMRGO_ERR_CONFIG for a color code above 15, Attempts out of range, a negative Lead, or a Slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, so also for a NULL cfg. cfg may be NULL. */
int dmrgo_csbk_new_wakeup(const dmrgo_csbk_wakeup_config_t *cfg, dmrgo_csbk_wakeup_t **out);
/* Go: csbk.OACSUAnswer.String. String returns the name of the answer. */
int dmrgo_csbk_oacsu_answer_string(dmrgo_csbk_oacsu_answer_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: csbk.OutputKind.String. String returns the name of the kind. */
int dmrgo_csbk_output_kind_string(dmrgo_csbk_output_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_csbk_preambles_free frees the handle. self may be NULL. */
int dmrgo_csbk_preambles_free(dmrgo_csbk_preambles_t *self);
/* dmrgo_csbk_preambles_burst_need sets *items and *arena to the room that dmrgo_csbk_preambles_burst needs for these arguments, without a change to the handle. */
int dmrgo_csbk_preambles_burst_need(dmrgo_csbk_preambles_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: csbk.Preambles.Burst. Burst decodes the burst raw with the data in the Hint h, runs it through the Preambles as Decoded does, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_preambles_burst_need gives (DMRGO_CSBK_PREAMBLES_BURST_MAX_ITEMS items). raw may be NULL. */
int dmrgo_csbk_preambles_burst(dmrgo_csbk_preambles_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Preambles.Deadline. Deadline returns the time at which the Preambles needs a Tick. */
int dmrgo_csbk_preambles_deadline(dmrgo_csbk_preambles_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_csbk_preambles_decoded_need sets *items and *arena to the room that dmrgo_csbk_preambles_decoded needs for these arguments, without a change to the handle. */
int dmrgo_csbk_preambles_decoded_need(dmrgo_csbk_preambles_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, size_t *items, size_t *arena);
/* Go: csbk.Preambles.Decoded. Decoded takes the decoded burst b, which may be NULL, and appends the outputs to dst: DMRGO_CSBK_OUTPUT_ANNOUNCED for the first Pre_CSBK of a transfer, DMRGO_CSBK_OUTPUT_JOINED for the CSBK, MBC header or data header after it with the target and source addresses of the Pre_CSBKs, and DMRGO_CSBK_OUTPUT_EXPIRED for a transfer that a Pre_CSBK with other addresses replaces, or that a CSBK, MBC header or data header with other addresses follows. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_preambles_decoded_need gives (DMRGO_CSBK_PREAMBLES_DECODED_MAX_ITEMS items). b may be NULL. */
int dmrgo_csbk_preambles_decoded(dmrgo_csbk_preambles_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_csbk_preambles_lost_need sets *items and *arena to the room that dmrgo_csbk_preambles_lost needs for these arguments, without a change to the handle. */
int dmrgo_csbk_preambles_lost_need(dmrgo_csbk_preambles_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Preambles.Lost. Lost records that the transport lost the signal. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_preambles_lost_need gives (DMRGO_CSBK_PREAMBLES_LOST_MAX_ITEMS items). */
int dmrgo_csbk_preambles_lost(dmrgo_csbk_preambles_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Preambles.Reset. Reset clears the announced transfer without an output. */
int dmrgo_csbk_preambles_reset(dmrgo_csbk_preambles_t *self);
/* Go: csbk.Preambles.State. State returns the state of the Preambles. */
int dmrgo_csbk_preambles_state(dmrgo_csbk_preambles_t *self, dmrgo_csbk_preambles_state_t *out);
/* dmrgo_csbk_preambles_tick_need sets *items and *arena to the room that dmrgo_csbk_preambles_tick needs for these arguments, without a change to the handle. */
int dmrgo_csbk_preambles_tick_need(dmrgo_csbk_preambles_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Preambles.Tick. Tick runs the timer that is due at now and appends its output to dst: a DMRGO_CSBK_OUTPUT_EXPIRED one burst after the last announced block, when nothing followed the Pre_CSBKs. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_preambles_tick_need gives (DMRGO_CSBK_PREAMBLES_TICK_MAX_ITEMS items). */
int dmrgo_csbk_preambles_tick(dmrgo_csbk_preambles_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.PreamblesState.String. String returns the name of the state. */
int dmrgo_csbk_preambles_state_string(dmrgo_csbk_preambles_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: csbk.Reason.String. String returns the name of the reason code. */
int dmrgo_csbk_reason_string(dmrgo_csbk_reason_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_csbk_requester_free frees the handle. self may be NULL. */
int dmrgo_csbk_requester_free(dmrgo_csbk_requester_t *self);
/* dmrgo_csbk_requester_burst_need sets *items and *arena to the room that dmrgo_csbk_requester_burst needs for these arguments, without a change to the handle. */
int dmrgo_csbk_requester_burst_need(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: csbk.Requester.Burst. Burst decodes the burst raw with the data in the Hint h, runs it through the Requester as Decoded does, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_requester_burst_need gives (DMRGO_CSBK_REQUESTER_BURST_MAX_ITEMS items). raw may be NULL. */
int dmrgo_csbk_requester_burst(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_csbk_requester_cancel_need sets *items and *arena to the room that dmrgo_csbk_requester_cancel needs for these arguments, without a change to the handle. */
int dmrgo_csbk_requester_cancel_need(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Requester.Cancel. Cancel ends the request, and appends a DMRGO_CSBK_OUTPUT_DONE with DMRGO_CSBK_RESULT_CANCELED to dst while one runs. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_requester_cancel_need gives (DMRGO_CSBK_REQUESTER_CANCEL_MAX_ITEMS items). */
int dmrgo_csbk_requester_cancel(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Requester.Channel. Channel reports whether the logical channel is busy, from the activity that the caller detects on it. */
int dmrgo_csbk_requester_channel(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, bool busy);
/* Go: csbk.Requester.Deadline. Deadline returns the time at which the Requester needs a Tick. */
int dmrgo_csbk_requester_deadline(dmrgo_csbk_requester_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_csbk_requester_decoded_need sets *items and *arena to the room that dmrgo_csbk_requester_decoded needs for these arguments, without a change to the handle. */
int dmrgo_csbk_requester_decoded_need(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, size_t *items, size_t *arena);
/* Go: csbk.Requester.Decoded. Decoded takes the decoded burst b, which may be NULL, and appends the outputs to dst: a DMRGO_CSBK_OUTPUT_DONE when b is the answer to the request, or a NACK_Rsp for it, after the first try went out. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_requester_decoded_need gives (DMRGO_CSBK_REQUESTER_DECODED_MAX_ITEMS items). b may be NULL. */
int dmrgo_csbk_requester_decoded(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_csbk_requester_lost_need sets *items and *arena to the room that dmrgo_csbk_requester_lost needs for these arguments, without a change to the handle. */
int dmrgo_csbk_requester_lost_need(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Requester.Lost. Lost records that the transport lost the signal: the channel counts as idle. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_requester_lost_need gives (DMRGO_CSBK_REQUESTER_LOST_MAX_ITEMS items). */
int dmrgo_csbk_requester_lost(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Requester.Request. Request starts a request with the CSBK c, which m answers. It returns DMRGO_ERR_CSBK_BUSY while a request runs, DMRGO_ERR_ZERO_VALUE on a zero Requester, DMRGO_ERR_NIL_ARGUMENT for a NULL c, the error of dmrgo_pdu_csbk_encode for a field out of range, DMRGO_ERR_CSBK_NO_ADDRESSES for a standard CSBK without both addresses, and a DMRGO_ERR_CONFIG for a Match without opcodes or a Pre_CSBK count out of range. c and opts may be NULL. */
int dmrgo_csbk_requester_request(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, const dmrgo_pdu_csbk_t *c, const dmrgo_csbk_match_t *m, const dmrgo_csbk_request_options_t *opts);
/* Go: csbk.Requester.RequestCallAlert. RequestCallAlert starts a Motorola call alert of target by source (FID 0x10, opcode 0x1F), which makes target alert its user. opts may be NULL. */
int dmrgo_csbk_requester_request_call_alert(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, uint32_t target, uint32_t source, const dmrgo_csbk_request_options_t *opts);
/* Go: csbk.Requester.RequestOACSU. RequestOACSU starts the presence check of an OACSU individual call from source to target: UU_V_Req with the service options so, answered by UU_Ans_Rsp. It returns DMRGO_ERR_CSBK_BUSY while a request runs, DMRGO_ERR_ZERO_VALUE on a zero Requester, and a DMRGO_ERR_CONFIG for an address above 24 bits, impolite access or a Pre_CSBK count out of range. opts may be NULL. */
int dmrgo_csbk_requester_request_oacsu(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, uint32_t target, uint32_t source, const dmrgo_layer3_service_options_t *so, const dmrgo_csbk_request_options_t *opts);
/* Go: csbk.Requester.RequestRadioCheck. RequestRadioCheck starts a Motorola radio check of target by source (FID 0x10, opcode 0x24). opts may be NULL. */
int dmrgo_csbk_requester_request_radio_check(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, uint32_t target, uint32_t source, const dmrgo_csbk_request_options_t *opts);
/* Go: csbk.Requester.Reset. Reset ends any request without an output and clears the channel state. */
int dmrgo_csbk_requester_reset(dmrgo_csbk_requester_t *self);
/* Go: csbk.Requester.State. State returns the state of the Requester. */
int dmrgo_csbk_requester_state(dmrgo_csbk_requester_t *self, dmrgo_csbk_requester_state_t *out);
/* dmrgo_csbk_requester_tick_need sets *items and *arena to the room that dmrgo_csbk_requester_tick needs for these arguments, without a change to the handle. */
int dmrgo_csbk_requester_tick_need(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Requester.Tick. Tick runs the timers that are due at now and appends their outputs to dst: at most one burst of a try, and the DMRGO_CSBK_OUTPUT_DONE of a request that the channel denied or that got no answer after the last retry. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_requester_tick_need gives (DMRGO_CSBK_REQUESTER_TICK_MAX_ITEMS items). */
int dmrgo_csbk_requester_tick(dmrgo_csbk_requester_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.RequesterState.String. String returns the name of the state. */
int dmrgo_csbk_requester_state_string(dmrgo_csbk_requester_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_csbk_responder_free frees the handle. self may be NULL. */
int dmrgo_csbk_responder_free(dmrgo_csbk_responder_t *self);
/* dmrgo_csbk_responder_burst_need sets *items and *arena to the room that dmrgo_csbk_responder_burst needs for these arguments, without a change to the handle. */
int dmrgo_csbk_responder_burst_need(dmrgo_csbk_responder_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: csbk.Responder.Burst. Burst decodes the burst raw with the data in the Hint h, runs it through the Responder as Decoded does, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_responder_burst_need gives (DMRGO_CSBK_RESPONDER_BURST_MAX_ITEMS items). raw may be NULL. */
int dmrgo_csbk_responder_burst(dmrgo_csbk_responder_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Responder.Channel. Channel reports whether the logical channel is busy, as dmrgo_csbk_requester_channel does. */
int dmrgo_csbk_responder_channel(dmrgo_csbk_responder_t *self, dmrgo_duration_t now, bool busy);
/* Go: csbk.Responder.Deadline. Deadline returns the time at which the Responder needs a Tick. */
int dmrgo_csbk_responder_deadline(dmrgo_csbk_responder_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_csbk_responder_decoded_need sets *items and *arena to the room that dmrgo_csbk_responder_decoded needs for these arguments, without a change to the handle. */
int dmrgo_csbk_responder_decoded_need(dmrgo_csbk_responder_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, size_t *items, size_t *arena);
/* Go: csbk.Responder.Decoded. Decoded takes the decoded burst b, which may be NULL. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_responder_decoded_need gives (DMRGO_CSBK_RESPONDER_DECODED_MAX_ITEMS items). b may be NULL. */
int dmrgo_csbk_responder_decoded(dmrgo_csbk_responder_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_csbk_responder_lost_need sets *items and *arena to the room that dmrgo_csbk_responder_lost needs for these arguments, without a change to the handle. */
int dmrgo_csbk_responder_lost_need(dmrgo_csbk_responder_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Responder.Lost. Lost records that the transport lost the signal: the channel counts as idle. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_responder_lost_need gives (DMRGO_CSBK_RESPONDER_LOST_MAX_ITEMS items). */
int dmrgo_csbk_responder_lost(dmrgo_csbk_responder_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Responder.Reset. Reset drops the pending answer and clears the channel state. */
int dmrgo_csbk_responder_reset(dmrgo_csbk_responder_t *self);
/* Go: csbk.Responder.State. State returns the state of the Responder. */
int dmrgo_csbk_responder_state(dmrgo_csbk_responder_t *self, dmrgo_csbk_responder_state_t *out);
/* dmrgo_csbk_responder_tick_need sets *items and *arena to the room that dmrgo_csbk_responder_tick needs for these arguments, without a change to the handle. */
int dmrgo_csbk_responder_tick_need(dmrgo_csbk_responder_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Responder.Tick. Tick runs the timers that are due at now and appends their outputs to dst: the burst of the answer, or a DMRGO_CSBK_OUTPUT_DONE with DMRGO_CSBK_RESULT_DENIED for a time critical answer that the channel denied. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_responder_tick_need gives (DMRGO_CSBK_RESPONDER_TICK_MAX_ITEMS items). */
int dmrgo_csbk_responder_tick(dmrgo_csbk_responder_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.ResponderState.String. String returns the name of the state. */
int dmrgo_csbk_responder_state_string(dmrgo_csbk_responder_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: csbk.Result.String. String returns the name of the result. */
int dmrgo_csbk_result_string(dmrgo_csbk_result_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: csbk.Service.String. String returns the name of the service. */
int dmrgo_csbk_service_string(dmrgo_csbk_service_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_csbk_timing_free frees the handle. self may be NULL. */
int dmrgo_csbk_timing_free(dmrgo_csbk_timing_t *self);
/* dmrgo_csbk_timing_burst_need sets *items and *arena to the room that dmrgo_csbk_timing_burst needs for these arguments, without a change to the handle. */
int dmrgo_csbk_timing_burst_need(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: csbk.Timing.Burst. Burst decodes the burst raw with the data in the Hint h, runs it through the Timing as Decoded does, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_timing_burst_need gives (DMRGO_CSBK_TIMING_BURST_MAX_ITEMS items). raw may be NULL. */
int dmrgo_csbk_timing_burst(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Timing.Channel. Channel reports whether the frequency has RF activity on either slot. */
int dmrgo_csbk_timing_channel(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, bool busy);
/* Go: csbk.Timing.Deadline. Deadline returns the time at which the Timing needs a Tick. */
int dmrgo_csbk_timing_deadline(dmrgo_csbk_timing_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_csbk_timing_decoded_need sets *items and *arena to the room that dmrgo_csbk_timing_decoded needs for these arguments, without a change to the handle. */
int dmrgo_csbk_timing_decoded_need(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: csbk.Timing.Decoded. Decoded takes the decoded burst b, which may be NULL, from either slot, and evaluates a CT_CSBK in it: it appends DMRGO_CSBK_OUTPUT_TIMING to dst when the radio takes the slot timing of b, and starts, keeps or cancels the CT_CSBK that the radio sends. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_timing_decoded_need gives (DMRGO_CSBK_TIMING_DECODED_MAX_ITEMS items). b may be NULL. */
int dmrgo_csbk_timing_decoded(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Timing.Join. Join starts the Timing for a radio that arrives on the channel, which has no leader and no timing, and waits DMRGO_CONSTANTS_NO_LEADER for the CT_CSBKs of other radios before it requests them. It returns DMRGO_ERR_ZERO_VALUE on a zero Timing. */
int dmrgo_csbk_timing_join(dmrgo_csbk_timing_t *self, dmrgo_duration_t now);
/* Go: csbk.Timing.Leader. Leader returns the dynamic identifier and the identifier of the wide area timing leader. */
int dmrgo_csbk_timing_leader(dmrgo_csbk_timing_t *self, uint8_t *dynamic_id, uint32_t *id, bool *ok);
/* dmrgo_csbk_timing_lost_need sets *items and *arena to the room that dmrgo_csbk_timing_lost needs for these arguments, without a change to the handle. */
int dmrgo_csbk_timing_lost_need(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Timing.Lost. Lost records that the transport lost the signal. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_timing_lost_need gives (DMRGO_CSBK_TIMING_LOST_MAX_ITEMS items). */
int dmrgo_csbk_timing_lost(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Timing.Reset. Reset stops the Timing until the next Join and clears the channel state. */
int dmrgo_csbk_timing_reset(dmrgo_csbk_timing_t *self);
/* Go: csbk.Timing.State. State returns the state of the Timing. */
int dmrgo_csbk_timing_state(dmrgo_csbk_timing_t *self, dmrgo_csbk_timing_state_t *out);
/* dmrgo_csbk_timing_terminator_need sets *items and *arena to the room that dmrgo_csbk_timing_terminator needs for these arguments, without a change to the handle. */
int dmrgo_csbk_timing_terminator_need(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Timing.Terminator. Terminator appends to dst the CT_CSBK_Term that follows a voice, data or CSBK transmission of the radio, due at now. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_timing_terminator_need gives (DMRGO_CSBK_TIMING_TERMINATOR_MAX_ITEMS items). */
int dmrgo_csbk_timing_terminator(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_csbk_timing_tick_need sets *items and *arena to the room that dmrgo_csbk_timing_tick needs for these arguments, without a change to the handle. */
int dmrgo_csbk_timing_tick_need(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Timing.Tick. Tick runs the timers that are due at now and appends their outputs to dst: at most one CT_CSBK burst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_timing_tick_need gives (DMRGO_CSBK_TIMING_TICK_MAX_ITEMS items). */
int dmrgo_csbk_timing_tick(dmrgo_csbk_timing_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.TimingState.String. String returns the name of the state. */
int dmrgo_csbk_timing_state_string(dmrgo_csbk_timing_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_csbk_wakeup_free frees the handle. self may be NULL. */
int dmrgo_csbk_wakeup_free(dmrgo_csbk_wakeup_t *self);
/* dmrgo_csbk_wakeup_burst_need sets *items and *arena to the room that dmrgo_csbk_wakeup_burst needs for these arguments, without a change to the handle. */
int dmrgo_csbk_wakeup_burst_need(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: csbk.Wakeup.Burst. Burst decodes the burst raw with the data in the Hint h, runs it through the Wakeup as Decoded does, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_wakeup_burst_need gives (DMRGO_CSBK_WAKEUP_BURST_MAX_ITEMS items). raw may be NULL. */
int dmrgo_csbk_wakeup_burst(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_csbk_wakeup_cancel_need sets *items and *arena to the room that dmrgo_csbk_wakeup_cancel needs for these arguments, without a change to the handle. */
int dmrgo_csbk_wakeup_cancel_need(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Wakeup.Cancel. Cancel ends the wakeup, and appends a DMRGO_CSBK_OUTPUT_DONE with DMRGO_CSBK_RESULT_CANCELED to dst while one runs. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_wakeup_cancel_need gives (DMRGO_CSBK_WAKEUP_CANCEL_MAX_ITEMS items). */
int dmrgo_csbk_wakeup_cancel(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Wakeup.Deadline. Deadline returns the time at which the Wakeup needs a Tick. */
int dmrgo_csbk_wakeup_deadline(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_csbk_wakeup_decoded_need sets *items and *arena to the room that dmrgo_csbk_wakeup_decoded needs for these arguments, without a change to the handle. */
int dmrgo_csbk_wakeup_decoded_need(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, size_t *items, size_t *arena);
/* Go: csbk.Wakeup.Decoded. Decoded takes the decoded burst b, which may be NULL, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_wakeup_decoded_need gives (DMRGO_CSBK_WAKEUP_DECODED_MAX_ITEMS items). b may be NULL. */
int dmrgo_csbk_wakeup_decoded(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_csbk_wakeup_lost_need sets *items and *arena to the room that dmrgo_csbk_wakeup_lost needs for these arguments, without a change to the handle. */
int dmrgo_csbk_wakeup_lost_need(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Wakeup.Lost. Lost records that the transport lost the signal. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_wakeup_lost_need gives (DMRGO_CSBK_WAKEUP_LOST_MAX_ITEMS items). */
int dmrgo_csbk_wakeup_lost(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_csbk_wakeup_outbound_sync_need sets *items and *arena to the room that dmrgo_csbk_wakeup_outbound_sync needs for these arguments, without a change to the handle. */
int dmrgo_csbk_wakeup_outbound_sync_need(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Wakeup.OutboundSync. OutboundSync records that the BS outbound is on air, as the caller detects it, and appends a DMRGO_CSBK_OUTPUT_DONE with DMRGO_CSBK_RESULT_ANSWERED to dst while a wakeup runs. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_wakeup_outbound_sync_need gives (DMRGO_CSBK_WAKEUP_OUTBOUND_SYNC_MAX_ITEMS items). */
int dmrgo_csbk_wakeup_outbound_sync(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Wakeup.Reset. Reset ends any wakeup without an output. */
int dmrgo_csbk_wakeup_reset(dmrgo_csbk_wakeup_t *self);
/* Go: csbk.Wakeup.State. State returns the state of the Wakeup. */
int dmrgo_csbk_wakeup_state(dmrgo_csbk_wakeup_t *self, dmrgo_csbk_wakeup_state_t *out);
/* dmrgo_csbk_wakeup_tick_need sets *items and *arena to the room that dmrgo_csbk_wakeup_tick needs for these arguments, without a change to the handle. */
int dmrgo_csbk_wakeup_tick_need(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: csbk.Wakeup.Tick. Tick runs the timers that are due at now and appends their outputs to dst: a BS_Dwn_Act burst, or a DMRGO_CSBK_OUTPUT_DONE with DMRGO_CSBK_RESULT_NO_ANSWER after the last T_SyncWu. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_csbk_wakeup_tick_need gives (DMRGO_CSBK_WAKEUP_TICK_MAX_ITEMS items). */
int dmrgo_csbk_wakeup_tick(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, dmrgo_csbk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: csbk.Wakeup.Wake. Wake starts the wakeup of the BS with address bs by the radio source. It returns DMRGO_ERR_CSBK_BUSY while a wakeup runs, DMRGO_ERR_ZERO_VALUE on a zero Wakeup, and a DMRGO_ERR_CONFIG for an address above 24 bits. */
int dmrgo_csbk_wakeup_wake(dmrgo_csbk_wakeup_t *self, dmrgo_duration_t now, uint32_t bs, uint32_t source);
/* Go: csbk.WakeupState.String. String returns the name of the state. */
int dmrgo_csbk_wakeup_state_string(dmrgo_csbk_wakeup_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: data.EndReason.String. String returns the name of the reason. */
int dmrgo_data_end_reason_string(dmrgo_data_end_reason_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: data.Event.ICMP. ICMP returns the ICMP error message that a radio sends about the IPv4 packet of the DMRGO_DATA_EVENT_DELIVERED or DMRGO_DATA_EVENT_REASSEMBLED e, for an accessory interface with the MTU mtu, as dmrgo_ip_check_ipv4 does. */
int dmrgo_data_event_icmp(const dmrgo_data_event_t *self, int64_t mtu, dmrgo_ip_icmp_message_t *m, uint8_t *pointer, bool *ok);
/* Go: data.EventKind.String. String returns the name of the kind. */
int dmrgo_data_event_kind_string(dmrgo_data_event_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: data.Message.SetRawData. SetRawData sets self->header to an R_HEAD that carries p, for dmrgo_data_sender_send, which sets its Appended Blocks, so p->appended_blocks does not matter. */
int dmrgo_data_message_set_raw_data(dmrgo_data_message_t *self, const dmrgo_pdu_raw_data_header_t *p);
/* Go: data.NewReceiver. NewReceiver returns a Receiver for cfg. It returns a DMRGO_ERR_CONFIG for a color code above 15, an unknown Source, or a DMRGO_DATA_MAX_BLOCKS, Peers, MaxFragment or DMRGO_DATA_MAX_MESSAGE out of range. cfg may be NULL. */
int dmrgo_data_new_receiver(const dmrgo_data_receiver_config_t *cfg, dmrgo_data_receiver_t **out);
/* Go: data.NewSender. NewSender returns a Sender for cfg. It returns a DMRGO_ERR_CONFIG for a color code above 15, an unknown Source or Access, a Preambles, Retries, DMRGO_DATA_MAX_BLOCKS, Peers or Window out of range, a negative Lead, or a Slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, so also for a NULL cfg. cfg may be NULL. */
int dmrgo_data_new_sender(const dmrgo_data_sender_config_t *cfg, dmrgo_data_sender_t **out);
/* Go: data.Output.ICMP. ICMP returns the ICMP error message that the DMRGO_DATA_OUTPUT_DONE o of a message of the IP bearer service reports to the IP layer: DMRGO_IP_ICMP_HOST_UNREACHABLE for a message that used all its tries on air (DMRGO_DATA_RESULT_RETRY_LIMIT), that could not finish before dmrgo_data_sender_config_t.tx_limit (DMRGO_DATA_RESULT_TIME_LIMIT), or that got a NACK for the full memory of the recipient. */
int dmrgo_data_output_icmp(const dmrgo_data_output_t *self, dmrgo_ip_icmp_message_t *m, bool *ok);
/* Go: data.OutputKind.String. String returns the name of the kind. */
int dmrgo_data_output_kind_string(dmrgo_data_output_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_data_receiver_free frees the handle. self may be NULL. */
int dmrgo_data_receiver_free(dmrgo_data_receiver_t *self);
/* dmrgo_data_receiver_burst_need sets *items and *arena to the room that dmrgo_data_receiver_burst needs for these arguments, without a change to the handle. */
int dmrgo_data_receiver_burst_need(dmrgo_data_receiver_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: data.Receiver.Burst. Burst decodes the burst raw with the data in the Hint h, runs it through the Receiver as Decoded does, and appends the events to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_data_receiver_burst_need gives. raw may be NULL. */
int dmrgo_data_receiver_burst(dmrgo_data_receiver_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_data_event_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: data.Receiver.Deadline. Deadline returns the time at which the Receiver needs a Tick. */
int dmrgo_data_receiver_deadline(dmrgo_data_receiver_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_data_receiver_decoded_need sets *items and *arena to the room that dmrgo_data_receiver_decoded needs for these arguments, without a change to the handle. */
int dmrgo_data_receiver_decoded_need(dmrgo_data_receiver_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: data.Receiver.Decoded. Decoded runs the decoded burst b through the Receiver and appends the events to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_data_receiver_decoded_need gives. b may be NULL. */
int dmrgo_data_receiver_decoded(dmrgo_data_receiver_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, dmrgo_data_event_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_data_receiver_lost_need sets *items and *arena to the room that dmrgo_data_receiver_lost needs for these arguments, without a change to the handle. */
int dmrgo_data_receiver_lost_need(dmrgo_data_receiver_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: data.Receiver.Lost. Lost records that the transport lost the signal, such as an MMDVM TAG_LOST. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_data_receiver_lost_need gives. */
int dmrgo_data_receiver_lost(dmrgo_data_receiver_t *self, dmrgo_duration_t now, dmrgo_data_event_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: data.Receiver.MaxOutputOctets. MaxOutputOctets returns the most octets that the dmrgo_data_message_t.payload of the events of one call of the Receiver hold: one packet completes in a call, with a payload of at most dmrgo_data_receiver_config_t.max_fragment octets, or 48 for a UDT, and the message that it completes holds at most dmrgo_data_receiver_config_t.max_message octets. */
int dmrgo_data_receiver_max_output_octets(dmrgo_data_receiver_t *self, int64_t *out);
/* Go: data.Receiver.Reset. Reset ends any data call without events and clears the packet in progress and the sequence numbers of every link. */
int dmrgo_data_receiver_reset(dmrgo_data_receiver_t *self);
/* Go: data.Receiver.State. State returns the state of the Receiver. */
int dmrgo_data_receiver_state(dmrgo_data_receiver_t *self, dmrgo_data_state_t *out);
/* dmrgo_data_receiver_tick_need sets *items and *arena to the room that dmrgo_data_receiver_tick needs for these arguments, without a change to the handle. */
int dmrgo_data_receiver_tick_need(dmrgo_data_receiver_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: data.Receiver.Tick. Tick runs the timers that are due at now and appends their events to dst: lost blocks after dmrgo_data_receiver_config_t.lost, which can complete a packet and send its SACK, and the end of the call after dmrgo_data_receiver_config_t.hang. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_data_receiver_tick_need gives. */
int dmrgo_data_receiver_tick(dmrgo_data_receiver_t *self, dmrgo_duration_t now, dmrgo_data_event_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: data.Result.String. String returns the name of the result. */
int dmrgo_data_result_string(dmrgo_data_result_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_data_sender_free frees the handle. self may be NULL. */
int dmrgo_data_sender_free(dmrgo_data_sender_t *self);
/* dmrgo_data_sender_burst_need sets *items and *arena to the room that dmrgo_data_sender_burst needs for these arguments, without a change to the handle. */
int dmrgo_data_sender_burst_need(dmrgo_data_sender_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: data.Sender.Burst. Burst decodes the burst raw and takes the response to the confirmed messages in progress from it: a response packet from the target of the messages to their source. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_data_sender_burst_need gives (DMRGO_DATA_SENDER_BURST_MAX_ITEMS items). raw may be NULL. */
int dmrgo_data_sender_burst(dmrgo_data_sender_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_data_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_data_sender_cancel_need sets *items and *arena to the room that dmrgo_data_sender_cancel needs for these arguments, without a change to the handle. */
int dmrgo_data_sender_cancel_need(dmrgo_data_sender_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: data.Sender.Cancel. Cancel ends every message in progress with DMRGO_DATA_RESULT_CANCELLED and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_data_sender_cancel_need gives (DMRGO_DATA_SENDER_CANCEL_MAX_ITEMS items). */
int dmrgo_data_sender_cancel(dmrgo_data_sender_t *self, dmrgo_duration_t now, dmrgo_data_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: data.Sender.Channel. Channel records whether the channel is busy at now, for example from the AT bit of the CACH, the carrier, or a repeater. */
int dmrgo_data_sender_channel(dmrgo_data_sender_t *self, dmrgo_duration_t now, bool busy);
/* Go: data.Sender.Deadline. Deadline returns the time at which the Sender needs a Tick. */
int dmrgo_data_sender_deadline(dmrgo_data_sender_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_data_sender_decoded_need sets *items and *arena to the room that dmrgo_data_sender_decoded needs for these arguments, without a change to the handle. */
int dmrgo_data_sender_decoded_need(dmrgo_data_sender_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, size_t *items, size_t *arena);
/* Go: data.Sender.Decoded. Decoded takes the response to the confirmed messages in progress from the decoded burst b, as Burst does. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_data_sender_decoded_need gives (DMRGO_DATA_SENDER_DECODED_MAX_ITEMS items). b may be NULL. */
int dmrgo_data_sender_decoded(dmrgo_data_sender_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, dmrgo_data_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_data_sender_lost_need sets *items and *arena to the room that dmrgo_data_sender_lost needs for these arguments, without a change to the handle. */
int dmrgo_data_sender_lost_need(dmrgo_data_sender_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: data.Sender.Lost. Lost records that the transport lost the signal: the channel counts as idle. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_data_sender_lost_need gives (DMRGO_DATA_SENDER_LOST_MAX_ITEMS items). */
int dmrgo_data_sender_lost(dmrgo_data_sender_t *self, dmrgo_duration_t now, dmrgo_data_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: data.Sender.Reset. Reset ends every message without outputs and clears the sequence numbers of every link and the channel state. */
int dmrgo_data_sender_reset(dmrgo_data_sender_t *self);
/* Go: data.Sender.Send. Send starts the message m at now, or queues it in the sliding window. Send returns DMRGO_ERR_DATA_BUSY for any other message while a message is in progress, DMRGO_ERR_NIL_ARGUMENT for a NULL m, a DMRGO_ERR_CONFIG for another header (Field "Header"), a P_HEAD in m->proprietary after another header or with a field out of range (Field "Proprietary") or a confirmed message to a group (Field "Header.Group"), DMRGO_ERR_ZERO_VALUE on a zero Sender, DMRGO_ERR_PACKET_TOO_LONG for a message with a P_HEAD that needs 127 blocks, and the errors of dmrgo_packet_builder_segment, such as DMRGO_ERR_PACKET_NO_ROOM for a message of more than dmrgo_data_sender_config_t.max_blocks blocks, DMRGO_ERR_PACKET_RATE and DMRGO_ERR_PACKET_PAD_NIBBLE. m may be NULL. */
int dmrgo_data_sender_send(dmrgo_data_sender_t *self, dmrgo_duration_t now, const dmrgo_data_message_t *m);
/* Go: data.Sender.State. State returns the state of the Sender. */
int dmrgo_data_sender_state(dmrgo_data_sender_t *self, dmrgo_data_sender_state_t *out);
/* dmrgo_data_sender_tick_need sets *items and *arena to the room that dmrgo_data_sender_tick needs for these arguments, without a change to the handle. */
int dmrgo_data_sender_tick_need(dmrgo_data_sender_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: data.Sender.Tick. Tick appends the next burst when now has reached its Due time, and runs the other timers that are due: the end of the idle search, the holdoff, the response wait, which starts a resend, and the transmit limit. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_data_sender_tick_need gives (DMRGO_DATA_SENDER_TICK_MAX_ITEMS items). */
int dmrgo_data_sender_tick(dmrgo_data_sender_t *self, dmrgo_duration_t now, dmrgo_data_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: data.SenderState.String. String returns the name of the state. */
int dmrgo_data_sender_state_string(dmrgo_data_sender_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: data.State.String. String returns the name of the state. */
int dmrgo_data_state_string(dmrgo_data_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.Access.String. String returns the clause 5.2.1.6 name of the policy. */
int dmrgo_enums_access_string(dmrgo_enums_access_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.AckReason.FromTS. FromTS reports whether the d bit of r is 1: the TS sent the reason. */
int dmrgo_enums_ack_reason_from_ts(dmrgo_enums_ack_reason_t self, bool *out);
/* Go: enums.AckReason.String. String returns the mnemonic of r. */
int dmrgo_enums_ack_reason_string(dmrgo_enums_ack_reason_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.AckReason.Type. Type returns the acknowledgement type of r. */
int dmrgo_enums_ack_reason_type(dmrgo_enums_ack_reason_t self, dmrgo_enums_ack_type_t *out);
/* Go: enums.AckType.String. String returns "NACK", "ACK", "QACK" or "WACK". */
int dmrgo_enums_ack_type_string(dmrgo_enums_ack_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.ActivityID.String. String returns the name of the ActivityID. */
int dmrgo_enums_activity_id_string(dmrgo_enums_activity_id_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.AnnouncementType.String. String returns the name of the AnnouncementType. */
int dmrgo_enums_announcement_type_string(dmrgo_enums_announcement_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.Backoff.Frames. Frames returns the number of TDMA frames of the backoff number (ETSI TS 102 361-4 Table 6.3). */
int dmrgo_enums_backoff_frames(dmrgo_enums_backoff_t self, int64_t *out);
/* Go: enums.DAID.IsManufacturerSpecific. IsManufacturerSpecific reports whether daid is one of the manufacturer specific values 12 to 15. */
int dmrgo_enums_daid_is_manufacturer_specific(dmrgo_enums_daid_t self, bool *out);
/* Go: enums.DAID.String. String returns the name of the DAID. */
int dmrgo_enums_daid_string(dmrgo_enums_daid_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.DDFormat.String. String returns the name of f. */
int dmrgo_enums_dd_format_string(dmrgo_enums_dd_format_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.DPID.IsManufacturerSpecific. IsManufacturerSpecific reports whether dpid is one of the manufacturer specific values 95 to 127. */
int dmrgo_enums_dpid_is_manufacturer_specific(dmrgo_enums_dpid_t self, bool *out);
/* Go: enums.DPID.String. String returns the name of the DPID. */
int dmrgo_enums_dpid_string(dmrgo_enums_dpid_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.DataType.CarriesFullLC. CarriesFullLC reports whether a burst of data type dt carries a Full LC with RS(12,9) parity: a Voice LC Header or a Terminator with LC. */
int dmrgo_enums_data_type_carries_full_lc(dmrgo_enums_data_type_t self, bool *out);
/* Go: enums.DataType.IsBPTC. IsBPTC reports whether a burst of data type dt carries 96 information bits coded with BPTC(196,96): every data type except Rate 3/4, Rate 1 and the reserved values (ETSI TS 102 361-1 clause B.1.1). */
int dmrgo_enums_data_type_is_bptc(dmrgo_enums_data_type_t self, bool *out);
/* Go: enums.DataType.IsReserved. IsReserved reports whether dt is one of the reserved values 12 to 15 (DMRGO_ENUMS_DATA_TYPE_RESERVED and above) (ETSI TS 102 361-1 Table 9.22). */
int dmrgo_enums_data_type_is_reserved(dmrgo_enums_data_type_t self, bool *out);
/* Go: enums.DataType.String. String returns the name of the DataType. */
int dmrgo_enums_data_type_string(dmrgo_enums_data_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.FID.String. String returns the name of the FID. */
int dmrgo_enums_fid_string(dmrgo_enums_fid_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.FLCO.String. String returns the name of the FLCO. */
int dmrgo_enums_flco_string(dmrgo_enums_flco_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.LCSS.String. String returns the name of the LCSS. */
int dmrgo_enums_lcss_string(dmrgo_enums_lcss_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.NRandWait.Frames. Frames returns the number of TDMA frames, NWait, of the code (ETSI TS 102 361-4 Table 6.2). */
int dmrgo_enums_n_rand_wait_frames(dmrgo_enums_n_rand_wait_t self, int64_t *out);
/* Go: enums.NearestSyncPattern. NearestSyncPattern returns the Table 9.2 pattern nearest to the 48-bit field and its Hamming distance from that pattern. */
int dmrgo_enums_nearest_sync_pattern(const uint8_t field[6], dmrgo_enums_sync_pattern_t *sync_pattern, int64_t *n);
/* Go: enums.NewColorCode. NewColorCode returns v as a ColorCode. It returns a DMRGO_ERR_FIELD_RANGE when v is above 15. */
int dmrgo_enums_new_color_code(uint8_t v, dmrgo_enums_color_code_t *out);
/* Go: enums.ProtectKind.String. String returns the alias of the ProtectKind. */
int dmrgo_enums_protect_kind_string(dmrgo_enums_protect_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.RCCommand.String. String returns the name of the RCCommand. */
int dmrgo_enums_rc_command_string(dmrgo_enums_rc_command_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.SAID.IsManufacturerSpecific. IsManufacturerSpecific reports whether said is one of the manufacturer specific values 12 to 15. */
int dmrgo_enums_said_is_manufacturer_specific(dmrgo_enums_said_t self, bool *out);
/* Go: enums.SAID.String. String returns the name of the SAID. */
int dmrgo_enums_said_string(dmrgo_enums_said_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.SAP.String. String returns the name of the SAP. */
int dmrgo_enums_sap_string(dmrgo_enums_sap_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.SLCO.String. String returns the name of the SLCO. */
int dmrgo_enums_slco_string(dmrgo_enums_slco_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.SPID.IsManufacturerSpecific. IsManufacturerSpecific reports whether spid is one of the manufacturer specific values 95 to 127. */
int dmrgo_enums_spid_is_manufacturer_specific(dmrgo_enums_spid_t self, bool *out);
/* Go: enums.SPID.String. String returns the name of the SPID. */
int dmrgo_enums_spid_string(dmrgo_enums_spid_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.ServiceFunction.Invites. Invites reports whether the Service_Function invites a random access for the service kind k. */
int dmrgo_enums_service_function_invites(dmrgo_enums_service_function_t self, dmrgo_enums_service_kind_t k, bool *out);
/* Go: enums.ServiceFunction.String. String returns the name of the ServiceFunction. */
int dmrgo_enums_service_function_string(dmrgo_enums_service_function_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.ServiceKind.NeedsPayloadChannel. NeedsPayloadChannel reports whether the service uses a payload channel: the voice and packet data calls. */
int dmrgo_enums_service_kind_needs_payload_channel(dmrgo_enums_service_kind_t self, bool *out);
/* Go: enums.ServiceKind.String. String returns the name of the ServiceKind. */
int dmrgo_enums_service_kind_string(dmrgo_enums_service_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.Slot.Other. Other returns the other TDMA channel of the carrier: DMRGO_ENUMS_SLOT2 for DMRGO_ENUMS_SLOT1 and DMRGO_ENUMS_SLOT1 for DMRGO_ENUMS_SLOT2. */
int dmrgo_enums_slot_other(dmrgo_enums_slot_t self, dmrgo_enums_slot_t *out);
/* Go: enums.Slot.String. String returns "TS1", "TS2", or "Unknown" for DMRGO_ENUMS_SLOT_UNKNOWN. */
int dmrgo_enums_slot_string(dmrgo_enums_slot_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.SyncPattern.String. String returns the name of the SyncPattern. */
int dmrgo_enums_sync_pattern_string(dmrgo_enums_sync_pattern_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.UDTFormat.String. String returns the name of the UDT Format. */
int dmrgo_enums_udt_format_string(dmrgo_enums_udt_format_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: enums.VoiceBurstAt. VoiceBurstAt returns the voice burst at index i of a superframe, 0 for burst A to 5 for burst F. */
int dmrgo_enums_voice_burst_at(int64_t i, dmrgo_enums_voice_burst_type_t *v, bool *ok);
/* Go: enums.VoiceBurstType.Index. Index returns the index of v in a superframe, 0 for burst A to 5 for burst F. */
int dmrgo_enums_voice_burst_type_index(dmrgo_enums_voice_burst_type_t self, int64_t *i, bool *ok);
/* Go: enums.VoiceBurstType.LCSS. LCSS returns the LCSS in the EMB of voice burst v in a superframe with an embedded LC: First for B, Continuation for C and D, Last for E and Single for F. */
int dmrgo_enums_voice_burst_type_lcss(dmrgo_enums_voice_burst_type_t self, dmrgo_enums_lcss_t *lcss, bool *ok);
/* Go: enums.VoiceBurstType.String. String returns the name of a voice burst type. */
int dmrgo_enums_voice_burst_type_string(dmrgo_enums_voice_burst_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_fec_ber_calculator_new makes a zero dmrgo_fec_ber_calculator_t. */
int dmrgo_fec_ber_calculator_new(dmrgo_fec_ber_calculator_t **out);
/* dmrgo_fec_ber_calculator_free frees the handle. self may be NULL. */
int dmrgo_fec_ber_calculator_free(dmrgo_fec_ber_calculator_t *self);
/* Go: fec.BERCalculator.Add. Add incorporates a single Result into the running BER calculation. */
int dmrgo_fec_ber_calculator_add(dmrgo_fec_ber_calculator_t *self, const dmrgo_fec_result_t *result);
/* Go: fec.BERCalculator.AddBurst. AddBurst incorporates the Aggregate of the FEC layers of a burst into the running BER calculation. */
int dmrgo_fec_ber_calculator_add_burst(dmrgo_fec_ber_calculator_t *self, const dmrgo_fec_burst_fec_stats_t *stats);
/* Go: fec.BERCalculator.BER. BER returns the bit error rate as a percentage from 0 to 100, as MMDVM computes it. */
int dmrgo_fec_ber_calculator_ber(dmrgo_fec_ber_calculator_t *self, double *out);
/* Go: fec.BERCalculator.Reset. Reset clears the accumulated BER state. */
int dmrgo_fec_ber_calculator_reset(dmrgo_fec_ber_calculator_t *self);
/* Go: fec.BERCalculator.TotalBitsChecked. TotalBitsChecked returns the total number of FEC-protected bits accumulated. */
int dmrgo_fec_ber_calculator_total_bits_checked(dmrgo_fec_ber_calculator_t *self, uint64_t *out);
/* Go: fec.BERCalculator.TotalErrors. TotalErrors returns the total number of corrected errors accumulated. */
int dmrgo_fec_ber_calculator_total_errors(dmrgo_fec_ber_calculator_t *self, uint64_t *out);
/* Go: fec.BERCalculator.Uncorrectable. Uncorrectable returns the number of accumulated results with Uncorrectable set. */
int dmrgo_fec_ber_calculator_uncorrectable(dmrgo_fec_ber_calculator_t *self, uint64_t *out);
/* Go: fec.BurstFECStats.Aggregate. Aggregate returns combined stats across all FEC layers in this burst. */
int dmrgo_fec_burst_fec_stats_aggregate(const dmrgo_fec_burst_fec_stats_t *self, dmrgo_fec_result_t *out);
/* Go: fec.Result.Combine. Combine returns the result of two decode steps over disjoint bits, or of a correcting step and a detecting step on its output: the bit counts add and Uncorrectable is set if either step set it. */
int dmrgo_fec_result_combine(const dmrgo_fec_result_t *self, const dmrgo_fec_result_t *o, dmrgo_fec_result_t *out);
/* Go: fec.Result.Err. Err returns DMRGO_ERR_FEC_UNCORRECTABLE when Uncorrectable is set, and DMRGO_OK otherwise. */
int dmrgo_fec_result_err(const dmrgo_fec_result_t *self);
/* Go: fec.Result.HasErrors. HasErrors returns true if any errors were corrected or if the data is uncorrectable. */
int dmrgo_fec_result_has_errors(const dmrgo_fec_result_t *self, bool *out);
/* Go: hdap.DecodeLPAnswer. DecodeLPAnswer decodes an LPAnswer from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field and DMRGO_ERR_HDAP_LENGTH when a length does not match the data. */
int dmrgo_hdap_decode_lp_answer(const uint8_t *data, size_t data_len, dmrgo_hdap_lp_answer_t *out);
/* Go: hdap.DecodeLPEmergency. DecodeLPEmergency decodes an LPEmergency from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field and DMRGO_ERR_HDAP_LENGTH when a length does not match the data. */
int dmrgo_hdap_decode_lp_emergency(const uint8_t *data, size_t data_len, dmrgo_hdap_lp_emergency_t *out);
/* Go: hdap.DecodeLPReport. DecodeLPReport decodes an LPReport from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field and DMRGO_ERR_HDAP_LENGTH when a length does not match the data. */
int dmrgo_hdap_decode_lp_report(const uint8_t *data, size_t data_len, dmrgo_hdap_lp_report_t *out);
/* Go: hdap.DecodeLPRequest. DecodeLPRequest decodes an LPRequest from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field and DMRGO_ERR_HDAP_LENGTH when a length does not match the data. */
int dmrgo_hdap_decode_lp_request(const uint8_t *data, size_t data_len, dmrgo_hdap_lp_request_t *out);
/* Go: hdap.DecodeMessage. DecodeMessage decodes a Message from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field, DMRGO_ERR_HDAP_LENGTH when a length does not match the data and DMRGO_ERR_HDAP_SIGNATURE when a fixed field does not hold its value. */
int dmrgo_hdap_decode_message(const uint8_t *data, size_t data_len, dmrgo_hdap_message_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: hdap.DecodeRRSAnswer. DecodeRRSAnswer decodes an RRSAnswer from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field and DMRGO_ERR_HDAP_LENGTH when a length does not match the data. */
int dmrgo_hdap_decode_rrs_answer(const uint8_t *data, size_t data_len, dmrgo_hdap_rrs_answer_t *out);
/* Go: hdap.DecodeRRSCheckAnswer. DecodeRRSCheckAnswer decodes an RRSCheckAnswer from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field and DMRGO_ERR_HDAP_LENGTH when a length does not match the data. */
int dmrgo_hdap_decode_rrs_check_answer(const uint8_t *data, size_t data_len, dmrgo_hdap_rrs_check_answer_t *out);
/* Go: hdap.DecodeRRSRadio. DecodeRRSRadio decodes an RRSRadio from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field and DMRGO_ERR_HDAP_LENGTH when a length does not match the data. */
int dmrgo_hdap_decode_rrs_radio(const uint8_t *data, size_t data_len, dmrgo_hdap_rrs_radio_t *out);
/* Go: hdap.DecodeTMPAnswer. DecodeTMPAnswer decodes a TMPAnswer from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field and DMRGO_ERR_HDAP_LENGTH when a length does not match the data. */
int dmrgo_hdap_decode_tmp_answer(const uint8_t *data, size_t data_len, dmrgo_hdap_tmp_answer_t *out);
/* Go: hdap.DecodeTMPFlags. DecodeTMPFlags decodes a TMPFlags from data, a frame of 1 octet. It returns DMRGO_ERR_HDAP_SHORT when data is shorter than 1 octet and DMRGO_ERR_HDAP_LENGTH when it is longer. */
int dmrgo_hdap_decode_tmp_flags(const uint8_t *data, size_t data_len, dmrgo_hdap_tmp_flags_t *out);
/* Go: hdap.DecodeTMPGroupAnswer. DecodeTMPGroupAnswer decodes a TMPGroupAnswer from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field and DMRGO_ERR_HDAP_LENGTH when a length does not match the data. */
int dmrgo_hdap_decode_tmp_group_answer(const uint8_t *data, size_t data_len, dmrgo_hdap_tmp_group_answer_t *out);
/* Go: hdap.DecodeTMPMessage. DecodeTMPMessage decodes a TMPMessage from data. It returns DMRGO_ERR_HDAP_SHORT when data ends inside a field. */
int dmrgo_hdap_decode_tmp_message(const uint8_t *data, size_t data_len, dmrgo_hdap_tmp_message_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: hdap.GPSData.AppendBinary. AppendBinary appends the 40 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_hdap_gps_data_append_binary(const dmrgo_hdap_gps_data_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.GPSData.Latitude. Latitude returns the latitude in degrees, north positive. */
int dmrgo_hdap_gps_data_latitude(const dmrgo_hdap_gps_data_t *self, double *out);
/* Go: hdap.GPSData.Longitude. Longitude returns the longitude in degrees, east positive. */
int dmrgo_hdap_gps_data_longitude(const dmrgo_hdap_gps_data_t *self, double *out);
/* Go: hdap.GPSData.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_gps_data_string(const dmrgo_hdap_gps_data_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.GPSData.Valid. Valid reports a position from a fix: Status 'A'. */
int dmrgo_hdap_gps_data_valid(const dmrgo_hdap_gps_data_t *self, bool *out);
/* Go: hdap.Header.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_hdap_header_append_binary(const dmrgo_hdap_header_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.Header.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_header_string(const dmrgo_hdap_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.LPAnswer.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_lp_answer_append_binary(const dmrgo_hdap_lp_answer_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.LPAnswer.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_lp_answer_string(const dmrgo_hdap_lp_answer_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.LPEmergency.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_lp_emergency_append_binary(const dmrgo_hdap_lp_emergency_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.LPEmergency.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_lp_emergency_string(const dmrgo_hdap_lp_emergency_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.LPReport.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_lp_report_append_binary(const dmrgo_hdap_lp_report_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.LPReport.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_lp_report_string(const dmrgo_hdap_lp_report_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.LPRequest.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_lp_request_append_binary(const dmrgo_hdap_lp_request_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.LPRequest.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_lp_request_string(const dmrgo_hdap_lp_request_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.Message.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_message_append_binary(const dmrgo_hdap_message_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.Message.ChecksumOK. ChecksumOK reports whether Checksum matches the opcode, the length and the payload. */
int dmrgo_hdap_message_checksum_ok(const dmrgo_hdap_message_t *self, bool *out);
/* Go: hdap.Message.Seal. Seal sets Checksum: the sum of the octets of the opcode, the length and the payload, inverted, plus 0x33. */
int dmrgo_hdap_message_seal(dmrgo_hdap_message_t *self);
/* Go: hdap.Message.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_message_string(const dmrgo_hdap_message_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.Opcode.String. String returns the name of o. */
int dmrgo_hdap_opcode_string(dmrgo_hdap_opcode_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.Opcode.TMP. TMP returns the TMPFlags and the TMPType of a text message protocol (TMP) opcode: its high and low octets. */
int dmrgo_hdap_opcode_tmp(dmrgo_hdap_opcode_t self, dmrgo_hdap_tmp_flags_t *tmp_flags, dmrgo_hdap_tmp_type_t *tmp_type);
/* Go: hdap.RRSAnswer.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_rrs_answer_append_binary(const dmrgo_hdap_rrs_answer_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.RRSAnswer.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_rrs_answer_string(const dmrgo_hdap_rrs_answer_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.RRSCheckAnswer.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_rrs_check_answer_append_binary(const dmrgo_hdap_rrs_check_answer_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.RRSCheckAnswer.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_rrs_check_answer_string(const dmrgo_hdap_rrs_check_answer_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.RRSRadio.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_rrs_radio_append_binary(const dmrgo_hdap_rrs_radio_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.RRSRadio.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_rrs_radio_string(const dmrgo_hdap_rrs_radio_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.Service.String. String returns the name of s. */
int dmrgo_hdap_service_string(dmrgo_hdap_service_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.TMPAnswer.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_tmp_answer_append_binary(const dmrgo_hdap_tmp_answer_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.TMPAnswer.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_tmp_answer_string(const dmrgo_hdap_tmp_answer_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.TMPFlags.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_hdap_tmp_flags_append_binary(const dmrgo_hdap_tmp_flags_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.TMPFlags.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_tmp_flags_string(const dmrgo_hdap_tmp_flags_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.TMPGroupAnswer.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_tmp_group_answer_append_binary(const dmrgo_hdap_tmp_group_answer_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.TMPGroupAnswer.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_tmp_group_answer_string(const dmrgo_hdap_tmp_group_answer_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.TMPMessage.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_hdap_tmp_message_append_binary(const dmrgo_hdap_tmp_message_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.TMPMessage.SetTextUTF8. SetTextUTF8 appends text, UTF-8, to dst as UTF-16LE, points Text at the appended octets and returns dst. */
int dmrgo_hdap_tmp_message_set_text_utf8(dmrgo_hdap_tmp_message_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t *text, size_t text_len, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: hdap.TMPMessage.String. String returns the fields of s as text, for printing. */
int dmrgo_hdap_tmp_message_string(const dmrgo_hdap_tmp_message_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hdap.TMPMessage.TextUTF8. TextUTF8 appends Text, UTF-16LE text, to dst as UTF-8 and returns dst. */
int dmrgo_hdap_tmp_message_text_utf8(const dmrgo_hdap_tmp_message_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hdap.TMPOpcode. TMPOpcode returns the text message protocol (TMP) opcode of the flags f and the service type t, the inverse of dmrgo_hdap_opcode_tmp. It returns a DMRGO_ERR_FIELD_RANGE when f->reserved does not fit in 6 bits. */
int dmrgo_hdap_tmp_opcode(const dmrgo_hdap_tmp_flags_t *f, dmrgo_hdap_tmp_type_t t, dmrgo_hdap_opcode_t *out);
/* Go: hdap.TMPType.String. String returns the name of t. */
int dmrgo_hdap_tmp_type_string(dmrgo_hdap_tmp_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ip.AppendCompressed. AppendCompressed appends d to dst with a compressed UDP/IPv4 header. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when SAID or DAID does not fit, and DMRGO_ERR_NIL_ARGUMENT for a NULL d. d may be NULL. */
int dmrgo_ip_append_compressed(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_ip_datagram_t *d);
/* Go: ip.AppendICMPPacket. AppendICMPPacket appends c to dst as an IPv4 packet with an ICMP message, and computes both checksums. It returns dst unchanged and DMRGO_ERR_IP_NO_ICMP when RFC 1122 clause 3.2.2 forbids an ICMP error message about Original: an ICMP error message (Type 3, 4, 5, 11 or 12, or an ICMP Type that Original does not hold), a packet to the broadcast address 255.255.255.255 or a multicast address, a fragment other than the first, or a packet from an address that is not one host (0.0.0.0/8, 127.0.0.0/8, multicast or class E). It returns DMRGO_ERR_NIL_ARGUMENT for a NULL c, and another error when the packet is longer than 65535 octets. c may be NULL. */
int dmrgo_ip_append_icmp_packet(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_ip_icmp_packet_t *c);
/* Go: ip.AppendIPv4. AppendIPv4 appends d to dst as an IPv4 packet with a UDP datagram, and computes both checksums. It returns dst unchanged and an error when the datagram is longer than 65515 octets, or DMRGO_ERR_NIL_ARGUMENT for a NULL d. d may be NULL. */
int dmrgo_ip_append_ipv4(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_ip_datagram_t *d);
/* Go: ip.CheckIPv4. CheckIPv4 returns the ICMP error message that a radio sends for the IPv4 packet data that it received for an accessory interface with the MTU mtu: DMRGO_IP_ICMP_BAD_HEADER with the octet in error when the header is not a valid IPv4 header, or DMRGO_IP_ICMP_FRAGMENTATION_NEEDED when the packet is longer than mtu and has the DF flag set. */
int dmrgo_ip_check_ipv4(const uint8_t *data, size_t data_len, int64_t mtu, dmrgo_ip_icmp_message_t *m, uint8_t *pointer, bool *ok);
/* Go: ip.CompressedPorts. CompressedPorts returns the UDP source and destination ports of a compressed UDP/IPv4 header: the port of the SPID or DPID, or the port in an Extended Header when the SPID or DPID is 0. h may be NULL. */
int dmrgo_ip_compressed_ports(const dmrgo_pdu_udp_ipv4_compressed_header_t *h, dmrgo_ip_port_t *source, dmrgo_ip_port_t *destination);
/* Go: ip.DPIDPort. DPIDPort returns the UDP port of dpid: DMRGO_IP_PORT_TEXT for DMRGO_ENUMS_DPID_TEXT_MESSAGE and DMRGO_IP_PORT_LOCATION for DMRGO_ENUMS_DPID_LOCATION_PROTOCOL. */
int dmrgo_ip_dpid_port(dmrgo_enums_dpid_t dpid, dmrgo_ip_port_t *out);
/* Go: ip.Decode. Decode decodes the UDP datagram at the start of data, the user data of a packet with the given SAP. It returns DMRGO_ERR_IP_SAP for a SAP that does not carry IP, and for an IPv4 header DMRGO_ERR_IP_SHORT, DMRGO_ERR_IP_LENGTH, DMRGO_ERR_IP_VERSION, DMRGO_ERR_IP_PROTOCOL or DMRGO_ERR_IP_FRAGMENT. When a checksum does not match it returns the Datagram with DMRGO_ERR_IP_CHECKSUM. */
int dmrgo_ip_decode(dmrgo_enums_sap_t sap, const uint8_t *data, size_t data_len, dmrgo_ip_datagram_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ip.DecodeICMP. DecodeICMP decodes an ICMP from data. It returns DMRGO_ERR_IP_SHORT when data ends inside a field. */
int dmrgo_ip_decode_icmp(const uint8_t *data, size_t data_len, dmrgo_ip_icmp_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ip.DecodeICMPPacket. DecodeICMPPacket decodes the ICMP message in the IPv4 packet at the start of data. It returns DMRGO_ERR_IP_SHORT, DMRGO_ERR_IP_LENGTH, DMRGO_ERR_IP_VERSION or DMRGO_ERR_IP_FRAGMENT for the IPv4 header, and DMRGO_ERR_IP_PROTOCOL for a packet that does not carry ICMP. When a checksum does not match it returns the ICMPPacket with DMRGO_ERR_IP_CHECKSUM. */
int dmrgo_ip_decode_icmp_packet(const uint8_t *data, size_t data_len, dmrgo_ip_icmp_packet_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ip.DecodeIPv4. DecodeIPv4 decodes an IPv4 from data. It returns DMRGO_ERR_IP_SHORT when data ends inside a field and DMRGO_ERR_IP_LENGTH when a length does not match the data. */
int dmrgo_ip_decode_ipv4(const uint8_t *data, size_t data_len, dmrgo_ip_ipv4_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ip.DecodeUDP. DecodeUDP decodes a UDP from data. It returns DMRGO_ERR_IP_SHORT when data ends inside a field and DMRGO_ERR_IP_LENGTH when a length does not match the data. */
int dmrgo_ip_decode_udp(const uint8_t *data, size_t data_len, dmrgo_ip_udp_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ip.GroupAddress. GroupAddress returns the IPv4 multicast address of the group with the 24-bit ID group: prefix.x.y.z, where prefix is a class D octet from 224 to 239, such as 225. */
int dmrgo_ip_group_address(uint8_t prefix, uint32_t group, uint8_t out[4]);
/* Go: ip.ICMP.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_ip_icmp_append_binary(const dmrgo_ip_icmp_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ip.ICMP.String. String returns the fields of s as text, for printing. */
int dmrgo_ip_icmp_string(const dmrgo_ip_icmp_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ip.ICMPHeader.AppendBinary. AppendBinary appends the 8 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_ip_icmp_header_append_binary(const dmrgo_ip_icmp_header_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ip.ICMPHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_ip_icmp_header_string(const dmrgo_ip_icmp_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ip.ICMPMessage.Code. Code returns the ICMP Code of m. */
int dmrgo_ip_icmp_message_code(dmrgo_ip_icmp_message_t self, uint8_t *out);
/* Go: ip.ICMPMessage.String. String returns the Table 5.1 name of m. */
int dmrgo_ip_icmp_message_string(dmrgo_ip_icmp_message_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ip.ICMPMessage.Type. Type returns the ICMP Type of m. */
int dmrgo_ip_icmp_message_type(dmrgo_ip_icmp_message_t self, uint8_t *out);
/* Go: ip.IPv4.AppendBinary. AppendBinary appends s to dst, with dmrgo_ip_ipv4_t.header.total_length set to the length of the data. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_ip_ipv4_append_binary(const dmrgo_ip_ipv4_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ip.IPv4.String. String returns the fields of s as text, for printing. */
int dmrgo_ip_ipv4_string(const dmrgo_ip_ipv4_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ip.IPv4Header.AppendBinary. AppendBinary appends the 20 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_ip_ipv4_header_append_binary(const dmrgo_ip_ipv4_header_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ip.IPv4Header.String. String returns the fields of s as text, for printing. */
int dmrgo_ip_ipv4_header_string(const dmrgo_ip_ipv4_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ip.Port.String. String returns the name of p, or its number when it has no name. */
int dmrgo_ip_port_string(dmrgo_ip_port_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ip.PortDPID. PortDPID returns the DPID of the UDP port p. */
int dmrgo_ip_port_dpid(dmrgo_ip_port_t p, dmrgo_enums_dpid_t *dpid, bool *ok);
/* Go: ip.PortSPID. PortSPID returns the SPID of the UDP port p. */
int dmrgo_ip_port_spid(dmrgo_ip_port_t p, dmrgo_enums_spid_t *spid, bool *ok);
/* Go: ip.Protocol.String. String returns the name of p. */
int dmrgo_ip_protocol_string(dmrgo_ip_protocol_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ip.RadioAddress. RadioAddress returns the IPv4 address of the radio with the 24-bit radio ID id: network.x.y.z. */
int dmrgo_ip_radio_address(uint8_t network, uint32_t id, uint8_t out[4]);
/* Go: ip.RadioID. RadioID returns the 24-bit radio or group ID of the address addr, its last three octets: the inverse of RadioAddress and GroupAddress. */
int dmrgo_ip_radio_id(const uint8_t addr[4], uint32_t *out);
/* Go: ip.SPIDPort. SPIDPort returns the UDP port of spid: DMRGO_IP_PORT_TEXT for DMRGO_ENUMS_SPID_TEXT_MESSAGE and DMRGO_IP_PORT_LOCATION for DMRGO_ENUMS_SPID_LOCATION_PROTOCOL. */
int dmrgo_ip_spid_port(dmrgo_enums_spid_t spid, dmrgo_ip_port_t *out);
/* Go: ip.UDP.AppendBinary. AppendBinary appends s to dst, with dmrgo_ip_udp_t.header.length set to the length of the data. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_ip_udp_append_binary(const dmrgo_ip_udp_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ip.UDP.String. String returns the fields of s as text, for printing. */
int dmrgo_ip_udp_string(const dmrgo_ip_udp_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ip.UDPHeader.AppendBinary. AppendBinary appends the 8 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_ip_udp_header_append_binary(const dmrgo_ip_udp_header_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ip.UDPHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_ip_udp_header_string(const dmrgo_ip_udp_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer2.BuildBurst. BuildBurst returns the data burst that carries d, with a slot type of color code cc and data type dmrgo_layer2_data_data_type on d and the data SYNC pattern of src. It returns an error for any other d or when d does not encode, DMRGO_ERR_LAYER2_SYNC_SOURCE when src is unknown, and a DMRGO_ERR_FIELD_RANGE when cc does not fit in 4 bits. */
int dmrgo_layer2_build_burst(const dmrgo_layer2_data_t *d, dmrgo_enums_color_code_t cc, dmrgo_layer2_sync_source_t src, dmrgo_layer2_raw_burst_t *out);
/* Go: layer2.BuildDataBurst. BuildDataBurst returns a data burst that carries the BPTC(196,96) payload p, which must already carry its CRC or parity (see dmrgo_pdu_seal), with a slot type of color code cc and data type dt and the data SYNC pattern of src. It returns DMRGO_ERR_LAYER2_DATA_TYPE, wrapped, when dt is not BPTC coded, DMRGO_ERR_LAYER2_SYNC_SOURCE when src is unknown, and a DMRGO_ERR_FIELD_RANGE when cc does not fit in 4 bits. */
int dmrgo_layer2_build_data_burst(const uint8_t p[12], dmrgo_enums_data_type_t dt, dmrgo_enums_color_code_t cc, dmrgo_layer2_sync_source_t src, dmrgo_layer2_raw_burst_t *out);
/* Go: layer2.BuildRate1DataBurst. BuildRate1DataBurst returns a Rate 1 data burst that carries p, with a slot type of color code cc and the data SYNC pattern of src. It returns DMRGO_ERR_LAYER2_SYNC_SOURCE when src is unknown, and a DMRGO_ERR_FIELD_RANGE when cc does not fit in 4 bits. */
int dmrgo_layer2_build_rate1_data_burst(const uint8_t p[24], dmrgo_enums_color_code_t cc, dmrgo_layer2_sync_source_t src, dmrgo_layer2_raw_burst_t *out);
/* Go: layer2.BuildRate34DataBurst. BuildRate34DataBurst returns a Rate 3/4 data burst that carries p, with a slot type of color code cc and the data SYNC pattern of src. It returns DMRGO_ERR_LAYER2_SYNC_SOURCE when src is unknown, and a DMRGO_ERR_FIELD_RANGE when cc does not fit in 4 bits. */
int dmrgo_layer2_build_rate34_data_burst(const uint8_t p[18], dmrgo_enums_color_code_t cc, dmrgo_layer2_sync_source_t src, dmrgo_layer2_raw_burst_t *out);
/* Go: layer2.BuildVoiceBurst. BuildVoiceBurst returns voice burst pos of a superframe that carries the AMBE+2 frames. It returns DMRGO_ERR_LAYER2_VOICE_POSITION, wrapped, when pos is not A to F, DMRGO_ERR_LAYER2_SYNC_SOURCE when src is unknown, and a DMRGO_ERR_FIELD_RANGE when a padding bit of a frame is set or a field of emb does not fit its bits. */
int dmrgo_layer2_build_voice_burst(const dmrgo_vocoder_ambe_frame_t frames[3], dmrgo_enums_voice_burst_type_t pos, const dmrgo_pdu_embedded_signalling_t *emb, const uint8_t embedded[4], dmrgo_layer2_sync_source_t src, dmrgo_layer2_raw_burst_t *out);
/* Go: layer2.Burst.Kind. Kind is the kind of the burst. */
int dmrgo_layer2_burst_get_kind(dmrgo_layer2_burst_t *self, dmrgo_layer2_kind_t *out);
/* Go: layer2.Burst.Kind. Kind is the kind of the burst. */
int dmrgo_layer2_burst_set_kind(dmrgo_layer2_burst_t *self, dmrgo_layer2_kind_t v);
/* Go: layer2.Burst.SyncPattern. SyncPattern is the SYNC pattern in the burst center, or DMRGO_ENUMS_SYNC_NONE when the center carries embedded signalling, as in voice bursts B to F and data bursts with an EMB. */
int dmrgo_layer2_burst_get_sync_pattern(dmrgo_layer2_burst_t *self, dmrgo_enums_sync_pattern_t *out);
/* Go: layer2.Burst.SyncPattern. SyncPattern is the SYNC pattern in the burst center, or DMRGO_ENUMS_SYNC_NONE when the center carries embedded signalling, as in voice bursts B to F and data bursts with an EMB. */
int dmrgo_layer2_burst_set_sync_pattern(dmrgo_layer2_burst_t *self, dmrgo_enums_sync_pattern_t v);
/* Go: layer2.Burst.NearestSync. NearestSync is the SYNC pattern nearest to the received center field, whatever the classification. */
int dmrgo_layer2_burst_get_nearest_sync(dmrgo_layer2_burst_t *self, dmrgo_enums_sync_pattern_t *out);
/* Go: layer2.Burst.NearestSync. NearestSync is the SYNC pattern nearest to the received center field, whatever the classification. */
int dmrgo_layer2_burst_set_nearest_sync(dmrgo_layer2_burst_t *self, dmrgo_enums_sync_pattern_t v);
/* Go: layer2.Burst.SyncDistance. SyncDistance is the Hamming distance of the center field from NearestSync. */
int dmrgo_layer2_burst_get_sync_distance(dmrgo_layer2_burst_t *self, int64_t *out);
/* Go: layer2.Burst.SyncDistance. SyncDistance is the Hamming distance of the center field from NearestSync. */
int dmrgo_layer2_burst_set_sync_distance(dmrgo_layer2_burst_t *self, int64_t v);
/* Go: layer2.Burst.VoiceBurst. VoiceBurst is the superframe position of a voice burst. */
int dmrgo_layer2_burst_get_voice_burst(dmrgo_layer2_burst_t *self, dmrgo_enums_voice_burst_type_t *out);
/* Go: layer2.Burst.VoiceBurst. VoiceBurst is the superframe position of a voice burst. */
int dmrgo_layer2_burst_set_voice_burst(dmrgo_layer2_burst_t *self, dmrgo_enums_voice_burst_type_t v);
/* Go: layer2.Burst.VoiceSlots. VoiceSlots holds the three 72-bit vocoder slots of a voice burst as received, before any FEC, packed as dmrgo_layer2_raw_burst_voice_slots returns them. */
int dmrgo_layer2_burst_get_voice_slots(dmrgo_layer2_burst_t *self, uint8_t out[3][9]);
/* Go: layer2.Burst.VoiceSlots. VoiceSlots holds the three 72-bit vocoder slots of a voice burst as received, before any FEC, packed as dmrgo_layer2_raw_burst_voice_slots returns them. */
int dmrgo_layer2_burst_set_voice_slots(dmrgo_layer2_burst_t *self, const uint8_t v[3][9]);
/* Go: layer2.Burst.SlotType. SlotType is the slot type of a data burst. */
int dmrgo_layer2_burst_get_slot_type(dmrgo_layer2_burst_t *self, dmrgo_pdu_slot_type_t *out);
/* Go: layer2.Burst.SlotType. SlotType is the slot type of a data burst. */
int dmrgo_layer2_burst_set_slot_type(dmrgo_layer2_burst_t *self, const dmrgo_pdu_slot_type_t *v);
/* Go: layer2.Burst.BPTCReserved. BPTCReserved holds the reserved bits R(0) to R(2) of the BPTC(196,96) payload of a data burst after FEC correction, R(i) in bit i, so that it reads R(2), R(1), R(0) in the order of the BPTC matrix, the first most significant. */
int dmrgo_layer2_burst_get_bptc_reserved(dmrgo_layer2_burst_t *self, uint8_t *out);
/* Go: layer2.Burst.BPTCReserved. BPTCReserved holds the reserved bits R(0) to R(2) of the BPTC(196,96) payload of a data burst after FEC correction, R(i) in bit i, so that it reads R(2), R(1), R(0) in the order of the BPTC matrix, the first most significant. */
int dmrgo_layer2_burst_set_bptc_reserved(dmrgo_layer2_burst_t *self, uint8_t v);
/* Go: layer2.Burst.EmbeddedSignalling. EmbeddedSignalling is the EMB of a burst with HasEmbeddedSignalling. */
int dmrgo_layer2_burst_get_embedded_signalling(dmrgo_layer2_burst_t *self, dmrgo_pdu_embedded_signalling_t *out);
/* Go: layer2.Burst.EmbeddedSignalling. EmbeddedSignalling is the EMB of a burst with HasEmbeddedSignalling. */
int dmrgo_layer2_burst_set_embedded_signalling(dmrgo_layer2_burst_t *self, const dmrgo_pdu_embedded_signalling_t *v);
/* Go: layer2.Burst.EmbeddedSignallingData. EmbeddedSignallingData is the 32-bit embedded data field of a burst with HasEmbeddedSignalling, packed as dmrgo_layer2_raw_burst_embedded_data returns it. */
int dmrgo_layer2_burst_get_embedded_signalling_data(dmrgo_layer2_burst_t *self, uint8_t out[4]);
/* Go: layer2.Burst.EmbeddedSignallingData. EmbeddedSignallingData is the 32-bit embedded data field of a burst with HasEmbeddedSignalling, packed as dmrgo_layer2_raw_burst_embedded_data returns it. */
int dmrgo_layer2_burst_set_embedded_signalling_data(dmrgo_layer2_burst_t *self, const uint8_t v[4]);
/* Go: layer2.Burst.ReverseChannel. ReverseChannel is the RC PDU of a burst with HasReverseChannel. */
int dmrgo_layer2_burst_get_reverse_channel(dmrgo_layer2_burst_t *self, dmrgo_pdu_reverse_channel_t *out);
/* Go: layer2.Burst.ReverseChannel. ReverseChannel is the RC PDU of a burst with HasReverseChannel. */
int dmrgo_layer2_burst_set_reverse_channel(dmrgo_layer2_burst_t *self, const dmrgo_pdu_reverse_channel_t *v);
/* Go: layer2.Burst.Data. Data is the decoded PDU of a data burst, NULL only for a reserved data type. */
int dmrgo_layer2_burst_get_data(dmrgo_layer2_burst_t *self, dmrgo_layer2_data_t *out);
/* Go: layer2.Burst.Data. Data is the decoded PDU of a data burst, NULL only for a reserved data type. */
int dmrgo_layer2_burst_set_data(dmrgo_layer2_burst_t *self, const dmrgo_layer2_data_t *v);
/* Go: layer2.Burst.FEC. FEC reports the FEC and CRC results of the decode. */
int dmrgo_layer2_burst_get_fec(dmrgo_layer2_burst_t *self, dmrgo_fec_burst_fec_stats_t *out);
/* Go: layer2.Burst.FEC. FEC reports the FEC and CRC results of the decode. */
int dmrgo_layer2_burst_set_fec(dmrgo_layer2_burst_t *self, const dmrgo_fec_burst_fec_stats_t *v);
/* dmrgo_layer2_burst_free frees the handle. self may be NULL. */
int dmrgo_layer2_burst_free(dmrgo_layer2_burst_t *self);
/* Go: layer2.Burst.AMBEFrames. AMBEFrames decodes the three voice slots as AMBE+2 frames with dmrgo_vocoder_decode_ambe72 and returns them with the combined FEC result. */
int dmrgo_layer2_burst_ambe_frames(dmrgo_layer2_burst_t *self, dmrgo_vocoder_ambe_frame_t ambe_frames[3], dmrgo_fec_result_t *fec);
/* Go: layer2.Burst.DecodeFromBytes. DecodeFromBytes decodes data into the burst in place. */
int dmrgo_layer2_burst_decode_from_bytes(dmrgo_layer2_burst_t *self, const dmrgo_layer2_raw_burst_t *data);
/* Go: layer2.Burst.DecodeFromBytesWith. DecodeFromBytesWith decodes data into the burst with receive-side options; a NULL opts means the zero DecodeOptions. The error is DMRGO_ERR_LAYER2_RESERVED_DATA_TYPE, DMRGO_ERR_LAYER2_COLOR_CODE_MISMATCH, an error for invalid options, or a join of these, and the burst is populated also when an error is returned. opts may be NULL. */
int dmrgo_layer2_burst_decode_from_bytes_with(dmrgo_layer2_burst_t *self, const dmrgo_layer2_raw_burst_t *data, const dmrgo_layer2_decode_options_t *opts);
/* Go: layer2.Burst.Encode. Encode returns the burst in transmit bit order, as the package doc describes. It returns an error for DMRGO_LAYER2_KIND_UNKNOWN, a SyncPattern that does not fit the kind, a missing Data, or a Data whose data type is not dmrgo_pdu_slot_type_t.data_type, and a DMRGO_ERR_FIELD_RANGE for a field value that does not fit its bits or a padding bit that is set. */
int dmrgo_layer2_burst_encode(dmrgo_layer2_burst_t *self, dmrgo_layer2_raw_burst_t *out);
/* Go: layer2.Burst.HasEmbeddedSignalling. HasEmbeddedSignalling reports whether the burst carries an EMB and an embedded data field: a voice or data burst without a SYNC pattern, or a standalone RC burst. */
int dmrgo_layer2_burst_has_embedded_signalling(dmrgo_layer2_burst_t *self, bool *out);
/* Go: layer2.Burst.HasReverseChannel. HasReverseChannel reports whether the embedded data field carries an RC PDU: in a standalone RC burst, and in a voice or data burst whose EMB has PI set and LCSS single fragment (ETSI TS 102 361-1 clause 6.4). */
int dmrgo_layer2_burst_has_reverse_channel(dmrgo_layer2_burst_t *self, bool *out);
/* Go: layer2.Burst.SetAMBEFrames. SetAMBEFrames sets the three voice slots to the AMBE+2 coding of frames, as dmrgo_vocoder_encode_ambe72 returns it. */
int dmrgo_layer2_burst_set_ambe_frames(dmrgo_layer2_burst_t *self, const dmrgo_vocoder_ambe_frame_t frames[3]);
/* Go: layer2.Burst.String. String returns a string representation of the burst. */
int dmrgo_layer2_burst_string(dmrgo_layer2_burst_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer2.CACH.Encode. Encode encodes a CACH struct into a 24-bit field in logical order, packed as DecodeCACH takes it. */
int dmrgo_layer2_cach_encode(const dmrgo_layer2_cach_t *self, uint8_t out[3]);
/* Go: layer2.CACHDeinterleave. CACHDeinterleave converts a 24-bit CACH field from transmit order to the logical order that DecodeCACH takes: AT, TC, LCSS, Hamming parity, then the 17 payload bits. */
int dmrgo_layer2_cach_deinterleave(const uint8_t tx[3], uint8_t out[3]);
/* Go: layer2.CACHInterleave. CACHInterleave converts a 24-bit CACH field from logical order to transmit order. */
int dmrgo_layer2_cach_interleave(const uint8_t logical[3], uint8_t out[3]);
/* Go: layer2.Data.DataType. DataType returns the data type of the bursts that carry the PDU. */
int dmrgo_layer2_data_data_type(const dmrgo_layer2_data_t *self, dmrgo_enums_data_type_t *out);
/* Go: layer2.Data.String. String returns the fields of the PDU as text. */
int dmrgo_layer2_data_string(const dmrgo_layer2_data_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer2.DecodeCACH. DecodeCACH decodes a 24-bit CACH field into its TACT and signalling payload. */
int dmrgo_layer2_decode_cach(const uint8_t bits[3], dmrgo_layer2_cach_t *out);
/* Go: layer2.DecodeCACHField. DecodeCACHField decodes a 24-bit CACH field in transmit order, as it is received, into its TACT and signalling payload. */
int dmrgo_layer2_decode_cach_field(const uint8_t on_air[3], dmrgo_layer2_cach_t *out);
/* Go: layer2.DecodeEmbeddedFullLinkControl. DecodeEmbeddedFullLinkControl decodes a Full LC from the four embedded signalling fields f of bursts B to E, as DecodeEmbeddedLC(f) does. */
int dmrgo_layer2_decode_embedded_full_link_control(const uint8_t f[4][4], dmrgo_pdu_full_link_control_t *out);
/* Go: layer2.DecodeEmbeddedLC. DecodeEmbeddedLC decodes the 9 LC octets from the embedded signalling fields f of bursts B to E, as dmrgo_layer2_raw_burst_embedded_data returns them. */
int dmrgo_layer2_decode_embedded_lc(const uint8_t f[4][4], dmrgo_pdu_lc_bytes_t *lc, dmrgo_fec_result_t *res);
/* Go: layer2.DecodeEmbeddedLCCandidate. DecodeEmbeddedLCCandidate decodes the 9 LC octets from the embedded signalling fields f of bursts B to E to the nearest codeword of the BPTC, up to 8 bit errors, whose 5-bit checksum matches its LC. */
int dmrgo_layer2_decode_embedded_lc_candidate(const uint8_t f[4][4], dmrgo_pdu_lc_bytes_t *lc, dmrgo_fec_result_t *res);
/* Go: layer2.DecodeEmbeddedRC. DecodeEmbeddedRC decodes a Reverse Channel PDU from the 32-bit embedded signalling data field, packed, the first bit in the most significant bit of byte 0, as dmrgo_layer2_raw_burst_embedded_data returns it. */
int dmrgo_layer2_decode_embedded_rc(const uint8_t data[4], dmrgo_pdu_reverse_channel_t *out);
/* dmrgo_layer2_embedded_lc_assembler_new makes a zero dmrgo_layer2_embedded_lc_assembler_t. */
int dmrgo_layer2_embedded_lc_assembler_new(dmrgo_layer2_embedded_lc_assembler_t **out);
/* dmrgo_layer2_embedded_lc_assembler_free frees the handle. self may be NULL. */
int dmrgo_layer2_embedded_lc_assembler_free(dmrgo_layer2_embedded_lc_assembler_t *self);
/* Go: layer2.EmbeddedLCAssembler.Add. Add adds the embedded signalling field frag of a burst whose EMB carries lcss. When a Last fragment follows a First and two Continuation fragments, Add returns the LC with done set, and DMRGO_ERR_LAYER2_EMBEDDED_LC_UNCORRECTABLE when its FEC result is uncorrectable. Add returns DMRGO_ERR_LAYER2_EMBEDDED_LC_SEQUENCE when a fragment out of that order discards a partial LC. */
int dmrgo_layer2_embedded_lc_assembler_add(dmrgo_layer2_embedded_lc_assembler_t *self, const uint8_t frag[4], dmrgo_enums_lcss_t lcss, dmrgo_pdu_lc_bytes_t *lc, dmrgo_fec_result_t *res, bool *done);
/* Go: layer2.EmbeddedLCAssembler.Header. Header starts a new call whose voice header carries lc, as dmrgo_layer2_embedded_lc_confirmer_header does, and discards any partial LC. */
int dmrgo_layer2_embedded_lc_assembler_header(dmrgo_layer2_embedded_lc_assembler_t *self, const dmrgo_pdu_lc_bytes_t *lc);
/* Go: layer2.EmbeddedLCAssembler.Reset. Reset discards any partial LC and starts a new call. */
int dmrgo_layer2_embedded_lc_assembler_reset(dmrgo_layer2_embedded_lc_assembler_t *self);
/* dmrgo_layer2_embedded_lc_confirmer_new makes a zero dmrgo_layer2_embedded_lc_confirmer_t. */
int dmrgo_layer2_embedded_lc_confirmer_new(dmrgo_layer2_embedded_lc_confirmer_t **out);
/* dmrgo_layer2_embedded_lc_confirmer_free frees the handle. self may be NULL. */
int dmrgo_layer2_embedded_lc_confirmer_free(dmrgo_layer2_embedded_lc_confirmer_t *self);
/* Go: layer2.EmbeddedLCConfirmer.Decode. Decode decodes the embedded LC of the next superframe of the call from the embedded signalling fields f of bursts B to E. */
int dmrgo_layer2_embedded_lc_confirmer_decode(dmrgo_layer2_embedded_lc_confirmer_t *self, const uint8_t f[4][4], dmrgo_pdu_lc_bytes_t *lc, dmrgo_fec_result_t *res);
/* Go: layer2.EmbeddedLCConfirmer.Header. Header starts a new call whose voice header carries lc. */
int dmrgo_layer2_embedded_lc_confirmer_header(dmrgo_layer2_embedded_lc_confirmer_t *self, const dmrgo_pdu_lc_bytes_t *lc);
/* Go: layer2.EmbeddedLCConfirmer.Reset. Reset starts a new call: no header and no earlier superframes. */
int dmrgo_layer2_embedded_lc_confirmer_reset(dmrgo_layer2_embedded_lc_confirmer_t *self);
/* Go: layer2.EncodeEmbeddedFullLinkControl. EncodeEmbeddedFullLinkControl returns the four embedded signalling fields, in burst order B to E, that carry lc. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL lc. lc may be NULL. */
int dmrgo_layer2_encode_embedded_full_link_control(const dmrgo_pdu_full_link_control_t *lc, uint8_t out[4][4]);
/* Go: layer2.EncodeEmbeddedLC. EncodeEmbeddedLC returns the four 32-bit embedded signalling fields, in burst order B to E, that carry the 9-octet LC lc, in the form dmrgo_layer2_raw_burst_set_embedded_data takes. */
int dmrgo_layer2_encode_embedded_lc(const dmrgo_pdu_lc_bytes_t *lc, uint8_t out[4][4]);
/* Go: layer2.EncodeEmbeddedRC. EncodeEmbeddedRC encodes a Reverse Channel PDU into the 32 transmit bits of the embedded signalling data field, packed as DecodeEmbeddedRC takes them. It returns an error when the RC command does not fit in 4 bits, and DMRGO_ERR_NIL_ARGUMENT for a NULL rc. rc may be NULL. */
int dmrgo_layer2_encode_embedded_rc(const dmrgo_pdu_reverse_channel_t *rc, uint8_t out[4]);
/* Go: layer2.EncodeShortLCToCACH. EncodeShortLCToCACH encodes a Short LC PDU into the 4 CACH fields that carry it, in transmit order. slc may be NULL. */
int dmrgo_layer2_encode_short_lc_to_cach(const dmrgo_pdu_short_lc_t *slc, const dmrgo_pdu_tact_t *tact, uint8_t out[4][3]);
/* Go: layer2.EndHint.String. String returns the name of the hint. */
int dmrgo_layer2_end_hint_string(dmrgo_layer2_end_hint_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer2.Kind.String. String returns the name of the kind. */
int dmrgo_layer2_kind_string(dmrgo_layer2_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer2.MMDVMHostAccepts. MMDVMHostAccepts reports whether MMDVMHost (g4klx/MMDVMHost 0acb758) uses a data burst of dataType from the network, given the 96-bit BPTC(196,96) payload that dmrgo_layer2_raw_burst_bptc_payload returns. */
int dmrgo_layer2_mmdvm_host_accepts(dmrgo_enums_data_type_t data_type, const uint8_t payload[12], bool *out);
/* Go: layer2.MMDVMHostSeal. MMDVMHostSeal rewrites the parity or CRC of the BPTC(196,96) payload p of a burst of dataType, after the caller edited p, so that MMDVMHostAccepts(dataType, *p) holds. For a data type that MMDVMHost discards it returns an error that wraps DMRGO_ERR_LAYER2_DATA_TYPE, and for a NULL p DMRGO_ERR_NIL_ARGUMENT; both leave p as it is. p may be NULL. */
int dmrgo_layer2_mmdvm_host_seal(dmrgo_enums_data_type_t data_type, uint8_t p[12]);
/* Go: layer2.NewBurst. NewBurst returns a new Burst. */
int dmrgo_layer2_new_burst(dmrgo_layer2_burst_t **out);
/* Go: layer2.NewBurstFromBytes. NewBurstFromBytes decodes data into a new Burst, as DecodeFromBytes does. */
int dmrgo_layer2_new_burst_from_bytes(const dmrgo_layer2_raw_burst_t *data, dmrgo_layer2_burst_t **out);
/* Go: layer2.NewVoiceTransmitter. NewVoiceTransmitter returns a VoiceTransmitter for opts. It returns DMRGO_ERR_LAYER2_SYNC_SOURCE when Source is unknown, an error when LC or PIHeader does not encode, and a DMRGO_ERR_FIELD_RANGE when ColorCode does not fit in 4 bits. opts may be NULL. */
int dmrgo_layer2_new_voice_transmitter(const dmrgo_layer2_voice_transmitter_options_t *opts, dmrgo_layer2_voice_transmitter_t **out);
/* Go: layer2.Placement.String. String returns the name of the placement. */
int dmrgo_layer2_placement_string(dmrgo_layer2_placement_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_layer2_position_tracker_new makes a zero dmrgo_layer2_position_tracker_t. */
int dmrgo_layer2_position_tracker_new(dmrgo_layer2_position_tracker_t **out);
/* dmrgo_layer2_position_tracker_free frees the handle. self may be NULL. */
int dmrgo_layer2_position_tracker_free(dmrgo_layer2_position_tracker_t *self);
/* Go: layer2.PositionTracker.Forget. Forget clears the superframe position and keeps the sequence number, so that the next burst is placed only by its SYNC or EMB, as after a weak burst. */
int dmrgo_layer2_position_tracker_forget(dmrgo_layer2_position_tracker_t *self);
/* Go: layer2.PositionTracker.Header. Header records that a voice LC header or PI header with Hint h came before the first voice burst of the call, so that the next burst is burst A. h may be NULL. */
int dmrgo_layer2_position_tracker_header(dmrgo_layer2_position_tracker_t *self, const dmrgo_layer2_hint_t *h);
/* Go: layer2.PositionTracker.Place. Place takes the burst raw of one packet with its Hint h, as a transport gives them, and sets h->voice_burst of a voice burst to its superframe position, or to DMRGO_ENUMS_VOICE_BURST_UNKNOWN when it cannot place it. raw and h may be NULL. */
int dmrgo_layer2_position_tracker_place(dmrgo_layer2_position_tracker_t *self, const dmrgo_layer2_raw_burst_t *raw, dmrgo_layer2_hint_t *h, int64_t *lost, dmrgo_layer2_placement_t *p);
/* Go: layer2.PositionTracker.PlaceDecoded. PlaceDecoded places the decoded voice burst b with Hint h by the same rules as Place, for a receiver that has decoded the burst already. b and h may be NULL. */
int dmrgo_layer2_position_tracker_place_decoded(dmrgo_layer2_position_tracker_t *self, dmrgo_layer2_burst_t *b, dmrgo_layer2_hint_t *h, int64_t steps, int64_t *lost, dmrgo_layer2_placement_t *p);
/* Go: layer2.PositionTracker.Reset. Reset clears the call. */
int dmrgo_layer2_position_tracker_reset(dmrgo_layer2_position_tracker_t *self);
/* Go: layer2.RawBurst.AMBEFrames. AMBEFrames decodes the three voice slots as AMBE+2 frames with dmrgo_vocoder_decode_ambe72, as dmrgo_layer2_burst_ambe_frames does, and returns them with the combined FEC result. */
int dmrgo_layer2_raw_burst_ambe_frames(const dmrgo_layer2_raw_burst_t *self, dmrgo_vocoder_ambe_frame_t ambe_frames[3], dmrgo_fec_result_t *fec);
/* Go: layer2.RawBurst.AMBEVoice. AMBEVoice decodes the three voice slots as AMBEFrames does and packs the frames into the 19-octet IPSC AMBE payload, with the bad flags of frames 2 and 3 set from their FEC results, as dmrgo_vocoder_pack_ambe_voice_flags does. */
int dmrgo_layer2_raw_burst_ambe_voice(const dmrgo_layer2_raw_burst_t *self, uint8_t p[19], bool bad[3], dmrgo_fec_result_t *res);
/* Go: layer2.RawBurst.BPTCPayload. BPTCPayload decodes the 196 information bits as BPTC(196,96) and returns the 96 data bits packed most significant bit first, before any CRC or RS(12,9) check. */
int dmrgo_layer2_raw_burst_bptc_payload(const dmrgo_layer2_raw_burst_t *self, uint8_t data[12], dmrgo_fec_result_t *fec);
/* Go: layer2.RawBurst.BPTCReserved. BPTCReserved decodes the 196 information bits as BPTC(196,96) and returns the reserved bits R(0) to R(2) after FEC correction, R(i) in bit i as dmrgo_layer2_burst_set_bptc_reserved holds them, with the BPTC result. */
int dmrgo_layer2_raw_burst_bptc_reserved(const dmrgo_layer2_raw_burst_t *self, uint8_t *value, dmrgo_fec_result_t *fec);
/* Go: layer2.RawBurst.EMB. EMB decodes the QR(16,7) embedded signalling in burst bits 108 to 115 and 148 to 155 of a voice burst B to F or a data burst without a SYNC pattern. */
int dmrgo_layer2_raw_burst_emb(const dmrgo_layer2_raw_burst_t *self, dmrgo_pdu_embedded_signalling_t *out);
/* Go: layer2.RawBurst.EmbeddedData. EmbeddedData returns the 32-bit embedded signalling field, burst bits 116 to 147, of a voice burst B to F or a data burst without a SYNC pattern: an embedded LC fragment, a Null embedded message or an outbound RC, still FEC coded. */
int dmrgo_layer2_raw_burst_embedded_data(const dmrgo_layer2_raw_burst_t *self, uint8_t out[4]);
/* Go: layer2.RawBurst.Info. Info returns the 196 information bits of a data burst, burst bits 0 to 97 and 166 to 263, before any FEC, packed most significant bit first. */
int dmrgo_layer2_raw_burst_info(const dmrgo_layer2_raw_burst_t *self, uint8_t out[25]);
/* Go: layer2.RawBurst.MMDVMHostPayload. MMDVMHostPayload returns the BPTC(196,96) payload of r, as BPTCPayload returns it, and whether MMDVMHost accepts it from the network for a burst of dt, as MMDVMHostAccepts reports. */
int dmrgo_layer2_raw_burst_mmdvm_host_payload(const dmrgo_layer2_raw_burst_t *self, dmrgo_enums_data_type_t dt, uint8_t data[12], bool *ok);
/* Go: layer2.RawBurst.Rate1Payload. Rate1Payload returns the 192 uncoded data bits of a Rate 1 burst packed most significant bit first: information bits 0 to 95 and 100 to 195. */
int dmrgo_layer2_raw_burst_rate1_payload(const dmrgo_layer2_raw_burst_t *self, uint8_t data[24], dmrgo_fec_result_t *fec);
/* Go: layer2.RawBurst.Rate34Payload. Rate34Payload decodes the 196 information bits as a Rate 3/4 trellis code and returns the 144 data bits packed most significant bit first (ETSI TS 102 361-1 clause B.1.1). */
int dmrgo_layer2_raw_burst_rate34_payload(const dmrgo_layer2_raw_burst_t *self, uint8_t data[18], dmrgo_fec_result_t *fec);
/* Go: layer2.RawBurst.SetAMBEFrames. SetAMBEFrames writes the AMBE+2 coding of frames (dmrgo_vocoder_encode_ambe72) into the three voice slots. */
int dmrgo_layer2_raw_burst_set_ambe_frames(dmrgo_layer2_raw_burst_t *self, const dmrgo_vocoder_ambe_frame_t frames[3]);
/* Go: layer2.RawBurst.SetBPTCPayload. SetBPTCPayload encodes p with BPTC(196,96) into the 196 information bits, with the reserved bits R(0) to R(3) zero, and keeps the slot type and SYNC. */
int dmrgo_layer2_raw_burst_set_bptc_payload(dmrgo_layer2_raw_burst_t *self, const uint8_t p[12]);
/* Go: layer2.RawBurst.SetBPTCReserved. SetBPTCReserved sets the BPTC(196,96) reserved bits R(0) to R(2) to res, R(i) in bit i, and updates the Hamming parity bits that cover them. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when res does not fit in 3 bits. */
int dmrgo_layer2_raw_burst_set_bptc_reserved(dmrgo_layer2_raw_burst_t *self, uint8_t res);
/* Go: layer2.RawBurst.SetEMB. SetEMB encodes e into the EMB bits of a voice burst B to F or a data burst without a SYNC pattern. */
int dmrgo_layer2_raw_burst_set_emb(dmrgo_layer2_raw_burst_t *self, const dmrgo_pdu_embedded_signalling_t *e);
/* Go: layer2.RawBurst.SetEmbeddedData. SetEmbeddedData writes d into the embedded signalling field. */
int dmrgo_layer2_raw_burst_set_embedded_data(dmrgo_layer2_raw_burst_t *self, const uint8_t d[4]);
/* Go: layer2.RawBurst.SetInfo. SetInfo writes the 196 information bits p, packed as Info returns them, and keeps the slot type and SYNC. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when a padding bit, one of the low 4 bits of octet 24, is set. */
int dmrgo_layer2_raw_burst_set_info(dmrgo_layer2_raw_burst_t *self, const uint8_t p[25]);
/* Go: layer2.RawBurst.SetRate1Payload. SetRate1Payload writes p into the 192 data bits of a Rate 1 burst. */
int dmrgo_layer2_raw_burst_set_rate1_payload(dmrgo_layer2_raw_burst_t *self, const uint8_t p[24]);
/* Go: layer2.RawBurst.SetRate34Payload. SetRate34Payload trellis encodes p into the 196 information bits. */
int dmrgo_layer2_raw_burst_set_rate34_payload(dmrgo_layer2_raw_burst_t *self, const uint8_t p[18]);
/* Go: layer2.RawBurst.SetSlotType. SetSlotType encodes st into the slot type bits. */
int dmrgo_layer2_raw_burst_set_slot_type(dmrgo_layer2_raw_burst_t *self, const dmrgo_pdu_slot_type_t *st);
/* Go: layer2.RawBurst.SetStandaloneRCData. SetStandaloneRCData writes d into the RC bits of a standalone RC burst. */
int dmrgo_layer2_raw_burst_set_standalone_rc_data(dmrgo_layer2_raw_burst_t *self, const uint8_t d[4]);
/* Go: layer2.RawBurst.SetStandaloneRCEMB. SetStandaloneRCEMB encodes e into the EMB bits of a standalone RC burst, as SetEMB does, with the errors of SetEMB. */
int dmrgo_layer2_raw_burst_set_standalone_rc_emb(dmrgo_layer2_raw_burst_t *self, const dmrgo_pdu_embedded_signalling_t *e);
/* Go: layer2.RawBurst.SetSync. SetSync writes the SYNC pattern p into burst bits 108 to 155. */
int dmrgo_layer2_raw_burst_set_sync(dmrgo_layer2_raw_burst_t *self, dmrgo_enums_sync_pattern_t p);
/* Go: layer2.RawBurst.SetVoiceSlots. SetVoiceSlots writes the three vocoder slots s into the voice bits. */
int dmrgo_layer2_raw_burst_set_voice_slots(dmrgo_layer2_raw_burst_t *self, const uint8_t s[3][9]);
/* Go: layer2.RawBurst.SlotType. SlotType decodes the Golay(20,8) slot type in burst bits 98 to 107 and 156 to 165. */
int dmrgo_layer2_raw_burst_slot_type(const dmrgo_layer2_raw_burst_t *self, dmrgo_pdu_slot_type_t *out);
/* Go: layer2.RawBurst.StandaloneRCData. StandaloneRCData returns the 32 FEC coded RC bits of a standalone RC burst, burst bits 92 to 107 and 156 to 171, in the order that DecodeEmbeddedRC takes. */
int dmrgo_layer2_raw_burst_standalone_rc_data(const dmrgo_layer2_raw_burst_t *self, uint8_t out[4]);
/* Go: layer2.RawBurst.StandaloneRCEMB. StandaloneRCEMB decodes the EMB of a standalone inbound RC burst, burst bits 84 to 91 and 172 to 179 (ETSI TS 102 361-1 clause 6.4.1, Figure 6.7). */
int dmrgo_layer2_raw_burst_standalone_rc_emb(const dmrgo_layer2_raw_burst_t *self, dmrgo_pdu_embedded_signalling_t *out);
/* Go: layer2.RawBurst.Sync. Sync returns the SYNC pattern nearest to burst bits 108 to 155 and its Hamming distance, as dmrgo_enums_nearest_sync_pattern does. */
int dmrgo_layer2_raw_burst_sync(const dmrgo_layer2_raw_burst_t *self, dmrgo_enums_sync_pattern_t *sync_pattern, int64_t *n);
/* Go: layer2.RawBurst.VoiceSlots. VoiceSlots returns the three 72-bit vocoder slots of a voice burst as they are on air, before any FEC. */
int dmrgo_layer2_raw_burst_voice_slots(const dmrgo_layer2_raw_burst_t *self, uint8_t out[3][9]);
/* dmrgo_layer2_short_lc_assembler_new makes a zero dmrgo_layer2_short_lc_assembler_t. */
int dmrgo_layer2_short_lc_assembler_new(dmrgo_layer2_short_lc_assembler_t **out);
/* dmrgo_layer2_short_lc_assembler_free frees the handle. self may be NULL. */
int dmrgo_layer2_short_lc_assembler_free(dmrgo_layer2_short_lc_assembler_t *self);
/* Go: layer2.ShortLCAssembler.Add. Add adds a decoded CACH and returns the Short LC when the CACH completes it, with done set. A CACH whose TACT is uncorrectable has no LCSS, and a Single fragment LCSS is not used in the CACH, so either discards the partial Short LC; Add then returns DMRGO_ERR_LAYER2_SHORT_LC_SEQUENCE when fragments were discarded. A fragment out of order also discards the partial Short LC and returns DMRGO_ERR_LAYER2_SHORT_LC_SEQUENCE. A NULL a returns DMRGO_ERR_NIL_RECEIVER. */
int dmrgo_layer2_short_lc_assembler_add(dmrgo_layer2_short_lc_assembler_t *self, const dmrgo_layer2_cach_t *c, dmrgo_pdu_short_lc_t *slc, bool *done);
/* Go: layer2.ShortLCAssembler.Count. Count returns the number of fragments accumulated so far, 0 for a NULL a. */
int dmrgo_layer2_short_lc_assembler_count(dmrgo_layer2_short_lc_assembler_t *self, int64_t *out);
/* Go: layer2.ShortLCAssembler.Reset. Reset clears the assembler state for reuse. */
int dmrgo_layer2_short_lc_assembler_reset(dmrgo_layer2_short_lc_assembler_t *self);
/* Go: layer2.SyncSource.SyncPatterns. SyncPatterns returns the voice and data SYNC patterns of the source. */
int dmrgo_layer2_sync_source_sync_patterns(dmrgo_layer2_sync_source_t self, dmrgo_enums_sync_pattern_t *voice, dmrgo_enums_sync_pattern_t *data, bool *ok);
/* Go: layer2.SyncSourceOf. SyncSourceOf returns the source and the burst kind of the SYNC pattern p: DMRGO_LAYER2_KIND_VOICE or DMRGO_LAYER2_KIND_DATA for the voice and data patterns, and DMRGO_LAYER2_SYNC_SOURCE_MS with DMRGO_LAYER2_KIND_REVERSE_CHANNEL for the MS-sourced RC pattern. */
int dmrgo_layer2_sync_source_of(dmrgo_enums_sync_pattern_t p, dmrgo_layer2_sync_source_t *src, dmrgo_layer2_kind_t *k, bool *ok);
/* dmrgo_layer2_voice_receiver_new makes a zero dmrgo_layer2_voice_receiver_t. */
int dmrgo_layer2_voice_receiver_new(dmrgo_layer2_voice_receiver_t **out);
/* dmrgo_layer2_voice_receiver_free frees the handle. self may be NULL. */
int dmrgo_layer2_voice_receiver_free(dmrgo_layer2_voice_receiver_t *self);
/* Go: layer2.VoiceReceiver.Receive. Receive takes the next decoded burst b of the logical channel with its Hint h, and sets the voice_burst of b to its superframe position, as dmrgo_layer2_position_tracker_place_decoded places it with one step per burst. When burst E completes an embedded LC, Receive returns it with ok set, or with DMRGO_ERR_LAYER2_EMBEDDED_LC_UNCORRECTABLE. It returns DMRGO_ERR_LAYER2_EMBEDDED_LC_SEQUENCE when the burst discards a partial embedded LC. b and h may be NULL. */
int dmrgo_layer2_voice_receiver_receive(dmrgo_layer2_voice_receiver_t *self, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, dmrgo_pdu_full_link_control_t *lc, bool *ok);
/* Go: layer2.VoiceReceiver.Reset. Reset clears the call and any partial embedded LC. */
int dmrgo_layer2_voice_receiver_reset(dmrgo_layer2_voice_receiver_t *self);
/* dmrgo_layer2_voice_transmitter_free frees the handle. self may be NULL. */
int dmrgo_layer2_voice_transmitter_free(dmrgo_layer2_voice_transmitter_t *self);
/* Go: layer2.VoiceTransmitter.AddBurst. AddBurst adds the DMRGO_LAYER2_VOICE_SLOTS_PER_BURST slots of one burst in transmit order, as AppendSlots does, and returns the voice burst that they complete. */
int dmrgo_layer2_voice_transmitter_add_burst(dmrgo_layer2_voice_transmitter_t *self, const uint8_t slots[3][9], dmrgo_layer2_raw_burst_t *out);
/* dmrgo_layer2_voice_transmitter_add_frames_need sets *items and *arena to the room that dmrgo_layer2_voice_transmitter_add_frames needs for these arguments, without a change to the handle. */
int dmrgo_layer2_voice_transmitter_add_frames_need(dmrgo_layer2_voice_transmitter_t *self, const dmrgo_vocoder_ambe_frame_t *frames, size_t frames_len, size_t *items, size_t *arena);
/* Go: layer2.VoiceTransmitter.AddFrames. AddFrames adds AMBE+2 frames in transmit order, each as the slot dmrgo_vocoder_encode_ambe72 returns, and returns the voice bursts they complete and the errors of EncodeAMBE72, as AppendFrames does with a NULL dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_layer2_voice_transmitter_add_frames_need gives. */
int dmrgo_layer2_voice_transmitter_add_frames(dmrgo_layer2_voice_transmitter_t *self, const dmrgo_vocoder_ambe_frame_t *frames, size_t frames_len, dmrgo_layer2_raw_burst_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_layer2_voice_transmitter_add_slots_need sets *items and *arena to the room that dmrgo_layer2_voice_transmitter_add_slots needs for these arguments, without a change to the handle. */
int dmrgo_layer2_voice_transmitter_add_slots_need(dmrgo_layer2_voice_transmitter_t *self, const uint8_t (*slots)[9], size_t slots_len, size_t *items, size_t *arena);
/* Go: layer2.VoiceTransmitter.AddSlots. AddSlots adds 72-bit vocoder slots in transmit order and returns the voice bursts they complete, as AppendSlots does with a NULL dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_layer2_voice_transmitter_add_slots_need gives. */
int dmrgo_layer2_voice_transmitter_add_slots(dmrgo_layer2_voice_transmitter_t *self, const uint8_t (*slots)[9], size_t slots_len, dmrgo_layer2_raw_burst_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_layer2_voice_transmitter_append_frames_need sets *items and *arena to the room that dmrgo_layer2_voice_transmitter_append_frames needs for these arguments, without a change to the handle. */
int dmrgo_layer2_voice_transmitter_append_frames_need(dmrgo_layer2_voice_transmitter_t *self, const dmrgo_vocoder_ambe_frame_t *frames, size_t frames_len, size_t *items, size_t *arena);
/* Go: layer2.VoiceTransmitter.AppendFrames. AppendFrames adds AMBE+2 frames in transmit order, each as the slot dmrgo_vocoder_encode_ambe72 returns, appends the voice bursts they complete to dst and returns the extended slice, as AppendSlots does, with the errors of EncodeAMBE72. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_layer2_voice_transmitter_append_frames_need gives. */
int dmrgo_layer2_voice_transmitter_append_frames(dmrgo_layer2_voice_transmitter_t *self, dmrgo_layer2_raw_burst_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_vocoder_ambe_frame_t *frames, size_t frames_len);
/* dmrgo_layer2_voice_transmitter_append_headers_need sets *items and *arena to the room that dmrgo_layer2_voice_transmitter_append_headers needs for these arguments, without a change to the handle. */
int dmrgo_layer2_voice_transmitter_append_headers_need(dmrgo_layer2_voice_transmitter_t *self, size_t *items, size_t *arena);
/* Go: layer2.VoiceTransmitter.AppendHeaders. AppendHeaders appends the bursts that Headers returns to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_layer2_voice_transmitter_append_headers_need gives (DMRGO_LAYER2_VOICE_TRANSMITTER_APPEND_HEADERS_MAX_ITEMS items). */
int dmrgo_layer2_voice_transmitter_append_headers(dmrgo_layer2_voice_transmitter_t *self, dmrgo_layer2_raw_burst_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_layer2_voice_transmitter_append_slots_need sets *items and *arena to the room that dmrgo_layer2_voice_transmitter_append_slots needs for these arguments, without a change to the handle. */
int dmrgo_layer2_voice_transmitter_append_slots_need(dmrgo_layer2_voice_transmitter_t *self, const uint8_t (*slots)[9], size_t slots_len, size_t *items, size_t *arena);
/* Go: layer2.VoiceTransmitter.AppendSlots. AppendSlots adds 72-bit vocoder slots in transmit order, appends the voice bursts they complete to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_layer2_voice_transmitter_append_slots_need gives. */
int dmrgo_layer2_voice_transmitter_append_slots(dmrgo_layer2_voice_transmitter_t *self, dmrgo_layer2_raw_burst_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t (*slots)[9], size_t slots_len);
/* dmrgo_layer2_voice_transmitter_append_terminate_need sets *items and *arena to the room that dmrgo_layer2_voice_transmitter_append_terminate needs for these arguments, without a change to the handle. */
int dmrgo_layer2_voice_transmitter_append_terminate_need(dmrgo_layer2_voice_transmitter_t *self, size_t *items, size_t *arena);
/* Go: layer2.VoiceTransmitter.AppendTerminate. AppendTerminate ends the transmission as Terminate does, appends the bursts to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_layer2_voice_transmitter_append_terminate_need gives (DMRGO_LAYER2_VOICE_TRANSMITTER_APPEND_TERMINATE_MAX_ITEMS items). */
int dmrgo_layer2_voice_transmitter_append_terminate(dmrgo_layer2_voice_transmitter_t *self, dmrgo_layer2_raw_burst_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: layer2.VoiceTransmitter.Header. Header returns the Voice LC Header burst, sent before the first voice burst. */
int dmrgo_layer2_voice_transmitter_header(dmrgo_layer2_voice_transmitter_t *self, dmrgo_layer2_raw_burst_t *out);
/* dmrgo_layer2_voice_transmitter_headers_need sets *items and *arena to the room that dmrgo_layer2_voice_transmitter_headers needs for these arguments, without a change to the handle. */
int dmrgo_layer2_voice_transmitter_headers_need(dmrgo_layer2_voice_transmitter_t *self, size_t *items, size_t *arena);
/* Go: layer2.VoiceTransmitter.Headers. Headers returns the bursts sent before the first voice burst: the Voice LC Header, then the PI Header when the options set one. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_layer2_voice_transmitter_headers_need gives (DMRGO_LAYER2_VOICE_TRANSMITTER_HEADERS_MAX_ITEMS items). */
int dmrgo_layer2_voice_transmitter_headers(dmrgo_layer2_voice_transmitter_t *self, dmrgo_layer2_raw_burst_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer2.VoiceTransmitter.PIHeader. PIHeader returns the PI Header burst that Headers returns after the Voice LC Header. */
int dmrgo_layer2_voice_transmitter_pi_header(dmrgo_layer2_voice_transmitter_t *self, dmrgo_layer2_raw_burst_t *b, bool *ok);
/* Go: layer2.VoiceTransmitter.Reset. Reset starts a new transmission with opts, as NewVoiceTransmitter does, in the storage of t, so that a caller can keep one VoiceTransmitter for many calls. opts may be NULL. */
int dmrgo_layer2_voice_transmitter_reset(dmrgo_layer2_voice_transmitter_t *self, const dmrgo_layer2_voice_transmitter_options_t *opts);
/* Go: layer2.VoiceTransmitter.SetEmbeddedFragments. SetEmbeddedFragments sets the four embedded signalling fields of bursts B to E of the next superframe that starts, as dmrgo_layer2_raw_burst_embedded_data returns them, so a bridge can pass received fragments through unchanged. */
int dmrgo_layer2_voice_transmitter_set_embedded_fragments(dmrgo_layer2_voice_transmitter_t *self, const uint8_t f[4][4]);
/* Go: layer2.VoiceTransmitter.SetEmbeddedLC. SetEmbeddedLC sets the embedded LC of the next superframe that starts. */
int dmrgo_layer2_voice_transmitter_set_embedded_lc(dmrgo_layer2_voice_transmitter_t *self, const dmrgo_pdu_full_link_control_t *lc);
/* Go: layer2.VoiceTransmitter.SetReverseChannel. SetReverseChannel sends rc in place of the Null embedded message in the next burst F, and a later call before that burst replaces rc. */
int dmrgo_layer2_voice_transmitter_set_reverse_channel(dmrgo_layer2_voice_transmitter_t *self, const dmrgo_pdu_reverse_channel_t *rc);
/* dmrgo_layer2_voice_transmitter_terminate_need sets *items and *arena to the room that dmrgo_layer2_voice_transmitter_terminate needs for these arguments, without a change to the handle. */
int dmrgo_layer2_voice_transmitter_terminate_need(dmrgo_layer2_voice_transmitter_t *self, size_t *items, size_t *arena);
/* Go: layer2.VoiceTransmitter.Terminate. Terminate ends the transmission. Later calls return DMRGO_ERR_LAYER2_VOICE_TERMINATED. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_layer2_voice_transmitter_terminate_need gives (DMRGO_LAYER2_VOICE_TRANSMITTER_TERMINATE_MAX_ITEMS items). */
int dmrgo_layer2_voice_transmitter_terminate(dmrgo_layer2_voice_transmitter_t *self, dmrgo_layer2_raw_burst_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer2.VoiceTransmitter.Terminator. Terminator returns the Terminator with LC burst that Terminate returns last. */
int dmrgo_layer2_voice_transmitter_terminator(dmrgo_layer2_voice_transmitter_t *self, dmrgo_layer2_raw_burst_t *out);
/* dmrgo_framer_free frees the handle. self may be NULL. */
int dmrgo_framer_free(dmrgo_framer_t *self);
/* dmrgo_framer_append_bursts_need sets *items and *arena to the room that dmrgo_framer_append_bursts needs for these arguments, without a change to the handle. */
int dmrgo_framer_append_bursts_need(dmrgo_framer_t *self, const uint8_t *stream, size_t stream_len, int64_t nbits, size_t *items, size_t *arena);
/* Go: framer.Framer.AppendBursts. AppendBursts adds the first nbits bits of stream as Write does, with nbits clamped to [0, 8*len(stream)], appends the bursts they complete to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_framer_append_bursts_need gives. */
int dmrgo_framer_append_bursts(dmrgo_framer_t *self, dmrgo_framer_burst_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t *stream, size_t stream_len, int64_t nbits);
/* Go: framer.Framer.Locked. Locked reports whether the Framer is locked on a burst period. */
int dmrgo_framer_locked(dmrgo_framer_t *self, bool *out);
/* dmrgo_framer_write_need sets *items and *arena to the room that dmrgo_framer_write needs for these arguments, without a change to the handle. */
int dmrgo_framer_write_need(dmrgo_framer_t *self, const uint8_t *stream, size_t stream_len, int64_t nbits, size_t *items, size_t *arena);
/* Go: framer.Framer.Write. Write adds the first nbits bits of stream, packed, the first bit in the most significant bit of stream[0], and returns the bursts they complete, or NULL when they complete none. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_framer_write_need gives. */
int dmrgo_framer_write(dmrgo_framer_t *self, const uint8_t *stream, size_t stream_len, int64_t nbits, dmrgo_framer_burst_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: framer.New. New returns a Framer for cfg. It returns a DMRGO_ERR_CONFIG for a Period that is not 0 and not from DMRGO_LAYER2_BURST_BITS to DMRGO_FRAMER_MAX_PERIOD. c may be NULL. */
int dmrgo_framer_new(const dmrgo_framer_config_t *c, dmrgo_framer_t **out);
/* Go: framer.Search. Search returns the first SYNC field in the first nbits bits of stream that starts at or after bit start and is within threshold bits of a SYNC pattern. */
int dmrgo_framer_search(const uint8_t *stream, size_t stream_len, int64_t nbits, int64_t start, int64_t threshold, dmrgo_framer_match_t *m, bool *ok);
/* Go: packet.AppendBursts. AppendBursts appends the bursts that Bursts returns to dst and returns the extended slice. p may be NULL. */
int dmrgo_packet_append_bursts(dmrgo_layer2_raw_burst_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_packet_t *p, dmrgo_enums_color_code_t color_code, dmrgo_layer2_sync_source_t src);
/* Go: packet.Assembler.AcceptBadCRC. AcceptBadCRC makes the Assembler deliver a packet whose message CRC failed, or whose confirmed blocks failed their CRC-9, as the "skip CRC" setting of some radios does. */
int dmrgo_packet_assembler_get_accept_bad_crc(dmrgo_packet_assembler_t *self, bool *out);
/* Go: packet.Assembler.AcceptBadCRC. AcceptBadCRC makes the Assembler deliver a packet whose message CRC failed, or whose confirmed blocks failed their CRC-9, as the "skip CRC" setting of some radios does. */
int dmrgo_packet_assembler_set_accept_bad_crc(dmrgo_packet_assembler_t *self, bool v);
/* dmrgo_packet_assembler_free frees the handle. self may be NULL. */
int dmrgo_packet_assembler_free(dmrgo_packet_assembler_t *self);
/* dmrgo_packet_assembler_add_need sets *items and *arena to the room that dmrgo_packet_assembler_add needs for these arguments, without a change to the handle. */
int dmrgo_packet_assembler_add_need(dmrgo_packet_assembler_t *self, const dmrgo_layer2_data_t *d, size_t *items, size_t *arena);
/* Go: packet.Assembler.Add. Add adds a decoded PDU: a *dmrgo_pdu_data_header_t, *dmrgo_pdu_rate12_data_t, *dmrgo_pdu_rate34_data_t or *dmrgo_pdu_rate1_data_t, and ignores other PDUs. done is true when the packet is complete, with its Message; on DMRGO_ERR_PACKET_MESSAGE_CRC the Message is returned too. A header with dmrgo_pdu_data_header_t.fec.uncorrectable set returns DMRGO_ERR_PACKET_HEADER_CRC and changes nothing. A NULL pointer of one of these types returns DMRGO_ERR_NIL_ARGUMENT and changes nothing. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_packet_assembler_add_need gives. */
int dmrgo_packet_assembler_add(dmrgo_packet_assembler_t *self, const dmrgo_layer2_data_t *d, dmrgo_packet_message_t *message, bool *ok, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_packet_assembler_add_burst_need sets *items and *arena to the room that dmrgo_packet_assembler_add_burst needs for these arguments, without a change to the handle. */
int dmrgo_packet_assembler_add_burst_need(dmrgo_packet_assembler_t *self, dmrgo_layer2_burst_t *b, size_t *items, size_t *arena);
/* Go: packet.Assembler.AddBurst. AddBurst adds a decoded burst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_packet_assembler_add_burst_need gives. b may be NULL. */
int dmrgo_packet_assembler_add_burst(dmrgo_packet_assembler_t *self, dmrgo_layer2_burst_t *b, dmrgo_packet_message_t *message, bool *ok, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_packet_assembler_append_missing_need sets *items and *arena to the room that dmrgo_packet_assembler_append_missing needs for these arguments, without a change to the handle. */
int dmrgo_packet_assembler_append_missing_need(dmrgo_packet_assembler_t *self, size_t *items, size_t *arena);
/* Go: packet.Assembler.AppendMissing. AppendMissing appends the DBSNs that Missing returns to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_packet_assembler_append_missing_need gives (DMRGO_PACKET_ASSEMBLER_APPEND_MISSING_MAX_ITEMS items). */
int dmrgo_packet_assembler_append_missing(dmrgo_packet_assembler_t *self, int64_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: packet.Assembler.InProgress. InProgress reports whether a header has started a packet that has not completed or been reset. */
int dmrgo_packet_assembler_in_progress(dmrgo_packet_assembler_t *self, bool *out);
/* dmrgo_packet_assembler_lost_need sets *items and *arena to the room that dmrgo_packet_assembler_lost needs for these arguments, without a change to the handle. */
int dmrgo_packet_assembler_lost_need(dmrgo_packet_assembler_t *self, size_t *items, size_t *arena);
/* Go: packet.Assembler.Lost. Lost records that one block burst of the packet in progress was not received, for example because its slot passed without a SYNC on RF. The block counts as a block whose CRC failed, so the last block of an attempt still completes the attempt: an unconfirmed packet returns its Message with DMRGO_ERR_PACKET_MESSAGE_CRC, and a confirmed packet returns DMRGO_ERR_PACKET_BLOCKS_MISSING, so that Response builds the SACK. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_packet_assembler_lost_need gives. */
int dmrgo_packet_assembler_lost(dmrgo_packet_assembler_t *self, dmrgo_packet_message_t *message, bool *ok, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_packet_assembler_missing_need sets *items and *arena to the room that dmrgo_packet_assembler_missing needs for these arguments, without a change to the handle. */
int dmrgo_packet_assembler_missing_need(dmrgo_packet_assembler_t *self, size_t *items, size_t *arena);
/* Go: packet.Assembler.Missing. Missing returns the DBSNs of the current confirmed packet that have not arrived with a good CRC-9. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_packet_assembler_missing_need gives (DMRGO_PACKET_ASSEMBLER_MISSING_MAX_ITEMS items). */
int dmrgo_packet_assembler_missing(dmrgo_packet_assembler_t *self, int64_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: packet.Assembler.Reset. Reset discards any partial packet. */
int dmrgo_packet_assembler_reset(dmrgo_packet_assembler_t *self);
/* dmrgo_packet_assembler_response_need sets *items and *arena to the room that dmrgo_packet_assembler_response needs for these arguments, without a change to the handle. */
int dmrgo_packet_assembler_response_need(dmrgo_packet_assembler_t *self, size_t *items, size_t *arena);
/* Go: packet.Assembler.Response. Response builds the response packet for the current confirmed packet: a SACK for the blocks Missing returns. It returns DMRGO_ERR_PACKET_FORMAT when there is no confirmed packet in progress, and DMRGO_ERR_PACKET_NO_FIRST_TRY for a packet that a later try started. After Add returns a confirmed Message, use NewResponse with DMRGO_PACKET_RESPONSE_ACK, or DMRGO_PACKET_RESPONSE_NACK_PACKET_CRC on DMRGO_ERR_PACKET_MESSAGE_CRC. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_packet_assembler_response_need gives. */
int dmrgo_packet_assembler_response(dmrgo_packet_assembler_t *self, dmrgo_packet_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_packet_builder_free frees the handle. self may be NULL. */
int dmrgo_packet_builder_free(dmrgo_packet_builder_t *self);
/* dmrgo_packet_builder_new_response_need sets *items and *arena to the room that dmrgo_packet_builder_new_response needs for these arguments, without a change to the handle. */
int dmrgo_packet_builder_new_response_need(dmrgo_packet_builder_t *self, const dmrgo_pdu_confirmed_data_header_t *to, dmrgo_packet_response_t r, const dmrgo_packet_response_data_t *data, size_t *items, size_t *arena);
/* Go: packet.Builder.NewResponse. NewResponse does what the package function NewResponse does, into the storage of b. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_packet_builder_new_response_need gives. to and data may be NULL. */
int dmrgo_packet_builder_new_response(dmrgo_packet_builder_t *self, const dmrgo_pdu_confirmed_data_header_t *to, dmrgo_packet_response_t r, const dmrgo_packet_response_data_t *data, dmrgo_packet_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_packet_builder_retry_need sets *items and *arena to the room that dmrgo_packet_builder_retry needs for these arguments, without a change to the handle. */
int dmrgo_packet_builder_retry_need(dmrgo_packet_builder_t *self, const dmrgo_packet_t *p, const dmrgo_packet_response_data_t *rd, size_t *items, size_t *arena);
/* Go: packet.Builder.Retry. Retry builds the later try of the confirmed packet p that a SACK with response data rd requests: a copy of the header of p with the Full Message Flag clear and the block count set to the number of blocks it resends, then block i of p for each DBSN i that rd flags, in DBSN order. Retry returns an error that wraps DMRGO_ERR_PACKET_FORMAT for another header or for a non-NULL rd with such a header, and DMRGO_ERR_PACKET_NO_RETRY_BLOCKS when rd flags no block of p. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_packet_builder_retry_need gives. p and rd may be NULL. */
int dmrgo_packet_builder_retry(dmrgo_packet_builder_t *self, const dmrgo_packet_t *p, const dmrgo_packet_response_data_t *rd, dmrgo_packet_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_packet_builder_segment_need sets *items and *arena to the room that dmrgo_packet_builder_segment needs for these arguments, without a change to the handle. */
int dmrgo_packet_builder_segment_need(dmrgo_packet_builder_t *self, const dmrgo_pdu_data_header_t *header, const uint8_t *payload, size_t payload_len, dmrgo_enums_data_type_t rate, size_t *items, size_t *arena);
/* Go: packet.Builder.Segment. Segment does what NewPacket does, into the storage of b. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_packet_builder_segment_need gives. */
int dmrgo_packet_builder_segment(dmrgo_packet_builder_t *self, const dmrgo_pdu_data_header_t *header, const uint8_t *payload, size_t payload_len, dmrgo_enums_data_type_t rate, dmrgo_packet_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: packet.Bursts. Bursts returns the on-air data bursts of p: the Data Header burst, then one Rate 1/2, Rate 3/4 or Rate 1 burst per block, each with a slot type of color code colorCode and the data SYNC pattern of src. It returns an error when the header or a block does not encode, a block has another data type, or src is unknown, and a DMRGO_ERR_FIELD_RANGE when colorCode does not fit in 4 bits. A NULL p returns DMRGO_ERR_NIL_ARGUMENT. p may be NULL. */
int dmrgo_packet_bursts(const dmrgo_packet_t *p, dmrgo_enums_color_code_t color_code, dmrgo_layer2_sync_source_t src, dmrgo_layer2_raw_burst_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: packet.DecodeResponseData. DecodeResponseData decodes one or two C_RDATA blocks and checks their CRC. On a CRC failure it returns the decoded flags with an error that wraps DMRGO_ERR_PACKET_RESPONSE_DATA and DMRGO_ERR_FEC_UNCORRECTABLE. It returns DMRGO_ERR_PACKET_RESPONSE_DATA for a NULL block. */
int dmrgo_packet_decode_response_data(const dmrgo_pdu_rate12_data_t *blocks, size_t blocks_len, dmrgo_packet_response_data_t *out);
/* Go: packet.Message.UDPIPv4. UDPIPv4 decodes the compressed UDP/IPv4 header at the start of Data and returns it with the application data that follows it, which points into Data. */
int dmrgo_packet_message_udp_ipv4(const dmrgo_packet_message_t *self, dmrgo_pdu_udp_ipv4_compressed_header_t *header, uint8_t *payload, size_t payload_cap, size_t *payload_len, size_t *payload_need, bool *ok);
/* Go: packet.NewAssembler. NewAssembler returns an Assembler for packets of up to maxBlocks data blocks of any rate. */
int dmrgo_packet_new_assembler(int64_t max_blocks, dmrgo_packet_assembler_t **out);
/* Go: packet.NewBuilder. NewBuilder returns a Builder for packets of up to maxBlocks data blocks of any rate. */
int dmrgo_packet_new_builder(int64_t max_blocks, dmrgo_packet_builder_t **out);
/* Go: packet.NewPacket. NewPacket splits payload into the data blocks of one packet at the given rate and returns them with a copy of header. It keeps the Pad Nibble of the header, whose count depends on the UDT Format, and returns DMRGO_ERR_PACKET_PAD_NIBBLE when the pad nibbles cover more of payload than the low nibble of its last octet. It returns an error that wraps DMRGO_ERR_PACKET_RATE, DMRGO_ERR_PACKET_FORMAT, DMRGO_ERR_PACKET_TOO_LONG or DMRGO_ERR_PACKET_PAD_NIBBLE. */
int dmrgo_packet_new_packet(const dmrgo_pdu_data_header_t *header, const uint8_t *payload, size_t payload_len, dmrgo_enums_data_type_t rate, dmrgo_packet_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: packet.NewResponse. NewResponse builds the response packet a recipient sends for the confirmed packet with header to. It returns a DMRGO_ERR_FIELD_RANGE when the Class of r does not fit in 2 bits or a field of to does not fit in the response header, and an error for a NULL to. to and data may be NULL. */
int dmrgo_packet_new_response(const dmrgo_pdu_confirmed_data_header_t *to, dmrgo_packet_response_t r, const dmrgo_packet_response_data_t *data, dmrgo_packet_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: packet.NewResponseCode. NewResponseCode returns the Response of a Class and Type. It returns a DMRGO_ERR_FIELD_RANGE when class does not fit in 2 bits or typ in 3. */
int dmrgo_packet_new_response_code(uint8_t class_, uint8_t typ, dmrgo_packet_response_t *out);
/* Go: packet.Response.Class. Class returns the 2-bit Class. */
int dmrgo_packet_response_class(dmrgo_packet_response_t self, uint8_t *out);
/* Go: packet.Response.String. String returns the Table 8.3 name of r. */
int dmrgo_packet_response_string(dmrgo_packet_response_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: packet.Response.Type. Type returns the 3-bit Type. */
int dmrgo_packet_response_type(dmrgo_packet_response_t self, uint8_t *out);
/* Go: packet.ResponseData.AppendEncode. AppendEncode appends the C_RDATA blocks that Encode returns to dst and returns the extended slice. */
int dmrgo_packet_response_data_append_encode(const dmrgo_packet_response_data_t *self, dmrgo_pdu_rate12_data_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t blocks);
/* Go: packet.ResponseData.AppendRetryBlocks. AppendRetryBlocks appends the DBSNs flagged for retry to dst in ascending order and returns the extended slice. */
int dmrgo_packet_response_data_append_retry_blocks(const dmrgo_packet_response_data_t *self, int64_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: packet.ResponseData.Encode. Encode returns the rate 1/2 C_RDATA blocks for a packet of the given number of blocks: one block with 64 flags, or two blocks with 127 flags when blocks is over 64. */
int dmrgo_packet_response_data_encode(const dmrgo_packet_response_data_t *self, int64_t blocks, dmrgo_pdu_rate12_data_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: packet.ResponseData.RetryBlocks. RetryBlocks returns the DBSNs flagged for retry in ascending order. */
int dmrgo_packet_response_data_retry_blocks(const dmrgo_packet_response_data_t *self, int64_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: packet.ResponseOf. ResponseOf returns the Response of a C_RHEAD, with the errors of NewResponseCode, and an error for a NULL h. h may be NULL. */
int dmrgo_packet_response_of(const dmrgo_pdu_response_packet_header_t *h, dmrgo_packet_response_t *out);
/* Go: pdu.AckInboundPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_ack_inbound sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_ack_inbound_pdu_csbk(const dmrgo_pdu_ack_inbound_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.AckInboundPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_ack_inbound_pdu_string(const dmrgo_pdu_ack_inbound_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.AckInboundPayloadPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_ack_inbound_payload sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_ack_inbound_payload_pdu_csbk(const dmrgo_pdu_ack_inbound_payload_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.AckInboundPayloadPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_ack_inbound_payload_pdu_string(const dmrgo_pdu_ack_inbound_payload_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.AckOutboundPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_ack_outbound sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_ack_outbound_pdu_csbk(const dmrgo_pdu_ack_outbound_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.AckOutboundPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_ack_outbound_pdu_string(const dmrgo_pdu_ack_outbound_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.AckOutboundPayloadPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_ack_outbound_payload sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_ack_outbound_payload_pdu_csbk(const dmrgo_pdu_ack_outbound_payload_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.AckOutboundPayloadPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_ack_outbound_payload_pdu_string(const dmrgo_pdu_ack_outbound_payload_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.AckvitationPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_ackvitation sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_ackvitation_pdu_csbk(const dmrgo_pdu_ackvitation_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.AckvitationPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_ackvitation_pdu_string(const dmrgo_pdu_ackvitation_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.AddressHash. AddressHash returns the 8-bit hash of a 24-bit address, as in the HashTS1 and HashTS2 fields of the Activity Update Short LC and the Hashed Source Address. It returns a DMRGO_ERR_FIELD_RANGE when id does not fit in 24 bits. */
int dmrgo_pdu_address_hash(uint32_t id, uint8_t *out);
/* Go: pdu.AdjacentSiteParms.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_adjacent_site_parms_string(const dmrgo_pdu_adjacent_site_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.AhoyPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_ahoy sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_ahoy_pdu_csbk(const dmrgo_pdu_ahoy_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.AhoyPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_ahoy_pdu_string(const dmrgo_pdu_ahoy_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.AlohaPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_aloha sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_aloha_pdu_csbk(const dmrgo_pdu_aloha_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.AlohaPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_aloha_pdu_string(const dmrgo_pdu_aloha_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.AnnWDTSCCParms.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_ann_wd_tscc_parms_string(const dmrgo_pdu_ann_wd_tscc_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.AppendTalkerAlias. AppendTalkerAlias appends the alias that TalkerAlias returns to dst as UTF-8 and returns the extended slice, with the errors of TalkerAlias. With DMRGO_ERR_NIL_ARGUMENT and DMRGO_ERR_PDU_TALKER_ALIAS_INCOMPLETE it returns dst unchanged. header may be NULL. */
int dmrgo_pdu_append_talker_alias(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_pdu_flc_talker_alias_header_t *header, const dmrgo_pdu_flc_talker_alias_block_t *blocks, size_t blocks_len);
/* Go: pdu.BCAPContinuation.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_MBC_CONTINUATION. */
int dmrgo_pdu_bcap_continuation_data_type(const dmrgo_pdu_bcap_continuation_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.BCAPContinuation.Encode. Encode encodes a BCAPContinuation. */
int dmrgo_pdu_bcap_continuation_encode(const dmrgo_pdu_bcap_continuation_t *self, uint8_t out[12]);
/* Go: pdu.BCAPContinuation.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_bcap_continuation_string(const dmrgo_pdu_bcap_continuation_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.BSOutboundActivationPDU.CSBK. CSBK returns the BS_Dwn_Act CSBK that carries s, as dmrgo_pdu_csbk_set_bs_outbound_activation sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_bs_outbound_activation_pdu_csbk(const dmrgo_pdu_bs_outbound_activation_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.BSOutboundActivationPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_bs_outbound_activation_pdu_string(const dmrgo_pdu_bs_outbound_activation_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.BlockCRCOK. BlockCRCOK reports whether octets 10 and 11 of the single-block payload b hold the CRC that Seal writes for dt. */
int dmrgo_pdu_block_crc_ok(const uint8_t b[12], dmrgo_enums_data_type_t dt, bool *out);
/* Go: pdu.BroadcastPDU.AsAdjacentSite. AsAdjacentSite returns p as Adjacent_Site parameters, as AsAnnWDTSCC does. */
int dmrgo_pdu_broadcast_pdu_as_adjacent_site(const dmrgo_pdu_broadcast_pdu_t *self, dmrgo_pdu_adjacent_site_parms_t *v, bool *ok);
/* Go: pdu.BroadcastPDU.AsAnnWDTSCC. AsAnnWDTSCC returns p as Ann_WD_TSCC parameters. */
int dmrgo_pdu_broadcast_pdu_as_ann_wd_tscc(const dmrgo_pdu_broadcast_pdu_t *self, dmrgo_pdu_ann_wd_tscc_parms_t *v, bool *ok);
/* Go: pdu.BroadcastPDU.AsCallTimer. AsCallTimer returns p as CallTimer_Parms parameters, as AsAnnWDTSCC does. */
int dmrgo_pdu_broadcast_pdu_as_call_timer(const dmrgo_pdu_broadcast_pdu_t *self, dmrgo_pdu_call_timer_parms_t *v, bool *ok);
/* Go: pdu.BroadcastPDU.AsChanFreq. AsChanFreq returns p as Chan_Freq parameters, as AsAnnWDTSCC does. */
int dmrgo_pdu_broadcast_pdu_as_chan_freq(const dmrgo_pdu_broadcast_pdu_t *self, dmrgo_pdu_chan_freq_parms_t *v, bool *ok);
/* Go: pdu.BroadcastPDU.AsGenSite. AsGenSite returns p as Gen_Site_Params parameters, as AsAnnWDTSCC does. */
int dmrgo_pdu_broadcast_pdu_as_gen_site(const dmrgo_pdu_broadcast_pdu_t *self, dmrgo_pdu_gen_site_parms_t *v, bool *ok);
/* Go: pdu.BroadcastPDU.AsLocalTime. AsLocalTime returns p as Local_Time parameters, as AsAnnWDTSCC does. */
int dmrgo_pdu_broadcast_pdu_as_local_time(const dmrgo_pdu_broadcast_pdu_t *self, dmrgo_pdu_local_time_parms_t *v, bool *ok);
/* Go: pdu.BroadcastPDU.AsMassReg. AsMassReg returns p as MassReg parameters, as AsAnnWDTSCC does. */
int dmrgo_pdu_broadcast_pdu_as_mass_reg(const dmrgo_pdu_broadcast_pdu_t *self, dmrgo_pdu_mass_reg_parms_t *v, bool *ok);
/* Go: pdu.BroadcastPDU.AsVoteNow. AsVoteNow returns p as Vote_Now parameters, as AsAnnWDTSCC does. */
int dmrgo_pdu_broadcast_pdu_as_vote_now(const dmrgo_pdu_broadcast_pdu_t *self, dmrgo_pdu_vote_now_parms_t *v, bool *ok);
/* Go: pdu.BroadcastPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_broadcast sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_broadcast_pdu_csbk(const dmrgo_pdu_broadcast_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.BroadcastPDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_broadcast sets it, with the other fields zero. */
int dmrgo_pdu_broadcast_pdu_mbc_header(const dmrgo_pdu_broadcast_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.BroadcastPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_broadcast_pdu_string(const dmrgo_pdu_broadcast_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.BroadcastTalkgroupVoiceGrantPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_broadcast_talkgroup_voice_grant sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_csbk(const dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.BroadcastTalkgroupVoiceGrantPDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_broadcast_talkgroup_voice_grant sets it, with the other fields zero. */
int dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_mbc_header(const dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.BroadcastTalkgroupVoiceGrantPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_string(const dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CGAPContinuation.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_MBC_CONTINUATION. */
int dmrgo_pdu_cgap_continuation_data_type(const dmrgo_pdu_cgap_continuation_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.CGAPContinuation.Encode. Encode encodes a CGAPContinuation. */
int dmrgo_pdu_cgap_continuation_encode(const dmrgo_pdu_cgap_continuation_t *self, uint8_t out[12]);
/* Go: pdu.CGAPContinuation.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_cgap_continuation_string(const dmrgo_pdu_cgap_continuation_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CRCMask. CRCMask returns the Data Type CRC Mask for dt and its width in bits: 24 for an RS(12,9) parity, 16 for a CRC-CCITT and 9 for a CRC-9. */
int dmrgo_pdu_crc_mask(dmrgo_enums_data_type_t dt, uint32_t *mask, int64_t *width, bool *ok);
/* Go: pdu.CSBK.Addresses. Addresses returns the 24-bit target and source addresses of a CSBK whose payload carries both: the TargetAddress and SourceAddress fields of the payload, or the same bits of RawPayload for opcode 0x38. */
int dmrgo_pdu_csbk_addresses(const dmrgo_pdu_csbk_t *self, uint32_t *target, uint32_t *source, bool *ok);
/* Go: pdu.CSBK.AsAckInbound. AsAckInbound decodes RawPayload as an AckInboundPDU payload. */
int dmrgo_pdu_csbk_as_ack_inbound(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_ack_inbound_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsAckInboundPayload. AsAckInboundPayload decodes RawPayload as an AckInboundPayloadPDU payload. */
int dmrgo_pdu_csbk_as_ack_inbound_payload(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_ack_inbound_payload_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsAckOutbound. AsAckOutbound decodes RawPayload as an AckOutboundPDU payload. */
int dmrgo_pdu_csbk_as_ack_outbound(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_ack_outbound_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsAckOutboundPayload. AsAckOutboundPayload decodes RawPayload as an AckOutboundPayloadPDU payload. */
int dmrgo_pdu_csbk_as_ack_outbound_payload(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_ack_outbound_payload_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsAckvitation. AsAckvitation decodes RawPayload as an AckvitationPDU payload. */
int dmrgo_pdu_csbk_as_ackvitation(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_ackvitation_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsAhoy. AsAhoy decodes RawPayload as an AhoyPDU payload. */
int dmrgo_pdu_csbk_as_ahoy(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_ahoy_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsAloha. AsAloha decodes RawPayload as an AlohaPDU payload. */
int dmrgo_pdu_csbk_as_aloha(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_aloha_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsBSOutboundActivation. AsBSOutboundActivation decodes the RawPayload of a standard FID CSBK with opcode 0x38 as a BS_Dwn_Act PDU. */
int dmrgo_pdu_csbk_as_bs_outbound_activation(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_bs_outbound_activation_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsBroadcast. AsBroadcast decodes RawPayload as a BroadcastPDU payload. */
int dmrgo_pdu_csbk_as_broadcast(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_broadcast_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsBroadcastTalkgroupVoiceGrant. AsBroadcastTalkgroupVoiceGrant decodes RawPayload as a BroadcastTalkgroupVoiceGrantPDU payload. */
int dmrgo_pdu_csbk_as_broadcast_talkgroup_voice_grant(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsCapacityPlusDataRevertAnnouncement. AsCapacityPlusDataRevertAnnouncement decodes the RawPayload of an enhanced data revert window announcement CSBK. */
int dmrgo_pdu_csbk_as_capacity_plus_data_revert_announcement(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_capacity_plus_data_revert_announcement_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsCapacityPlusDataRevertGrant. AsCapacityPlusDataRevertGrant decodes the RawPayload of an enhanced data revert window grant CSBK. */
int dmrgo_pdu_csbk_as_capacity_plus_data_revert_grant(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_capacity_plus_data_revert_grant_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsCapacityPlusNeighbors. AsCapacityPlusNeighbors decodes the RawPayload of a Linked Capacity Plus neighbor report CSBK. */
int dmrgo_pdu_csbk_as_capacity_plus_neighbors(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_capacity_plus_neighbors_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsCapacityPlusPreamble. AsCapacityPlusPreamble decodes the RawPayload of a Capacity Plus preamble CSBK. */
int dmrgo_pdu_csbk_as_capacity_plus_preamble(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_capacity_plus_preamble_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsCapacityPlusSiteStatus. AsCapacityPlusSiteStatus decodes the RawPayload of a Capacity Plus site status CSBK. */
int dmrgo_pdu_csbk_as_capacity_plus_site_status(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_capacity_plus_site_status_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsChannelTiming. AsChannelTiming decodes RawPayload as a ChannelTimingPDU payload. */
int dmrgo_pdu_csbk_as_channel_timing(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_channel_timing_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsClear. AsClear decodes RawPayload as a ClearPDU payload. */
int dmrgo_pdu_csbk_as_clear(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_clear_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsDuplexPrivateDataGrant. AsDuplexPrivateDataGrant decodes RawPayload as a DuplexPrivateDataGrantPDU payload. */
int dmrgo_pdu_csbk_as_duplex_private_data_grant(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_duplex_private_data_grant_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsDuplexPrivateVoiceGrant. AsDuplexPrivateVoiceGrant decodes RawPayload as a DuplexPrivateVoiceGrantPDU payload. */
int dmrgo_pdu_csbk_as_duplex_private_voice_grant(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_duplex_private_voice_grant_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsMaintenance. AsMaintenance decodes RawPayload as a MaintenancePDU payload. */
int dmrgo_pdu_csbk_as_maintenance(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_maintenance_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsMotorolaCallAlert. AsMotorolaCallAlert decodes RawPayload as a MotorolaCallAlertPDU payload. */
int dmrgo_pdu_csbk_as_motorola_call_alert(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_motorola_call_alert_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsMotorolaCallAlertAck. AsMotorolaCallAlertAck decodes RawPayload as a MotorolaCallAlertAckPDU payload. */
int dmrgo_pdu_csbk_as_motorola_call_alert_ack(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_motorola_call_alert_ack_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsMotorolaRadioCheck. AsMotorolaRadioCheck decodes RawPayload as a MotorolaRadioCheckPDU payload. */
int dmrgo_pdu_csbk_as_motorola_radio_check(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_motorola_radio_check_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsMove. AsMove decodes RawPayload as a MovePDU payload. */
int dmrgo_pdu_csbk_as_move(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_move_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsNegativeAcknowledgement. AsNegativeAcknowledgement decodes RawPayload as a NegativeAcknowledgementPDU payload. */
int dmrgo_pdu_csbk_as_negative_acknowledgement(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_negative_acknowledgement_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsPreamble. AsPreamble decodes RawPayload as a PreamblePDU payload. */
int dmrgo_pdu_csbk_as_preamble(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_preamble_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsPrivateDataGrant. AsPrivateDataGrant decodes RawPayload as a PrivateDataGrantPDU payload. */
int dmrgo_pdu_csbk_as_private_data_grant(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_private_data_grant_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsPrivateDataGrantMultiItem. AsPrivateDataGrantMultiItem decodes RawPayload as a PrivateDataGrantMultiItemPDU payload. */
int dmrgo_pdu_csbk_as_private_data_grant_multi_item(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_private_data_grant_multi_item_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsPrivateVoiceGrant. AsPrivateVoiceGrant decodes RawPayload as a PrivateVoiceGrantPDU payload. */
int dmrgo_pdu_csbk_as_private_voice_grant(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_private_voice_grant_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsProtect. AsProtect decodes RawPayload as a ProtectPDU payload. */
int dmrgo_pdu_csbk_as_protect(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_protect_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsRandomAccess. AsRandomAccess decodes RawPayload as a RandomAccessPDU payload. */
int dmrgo_pdu_csbk_as_random_access(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_random_access_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsTalkgroupDataGrant. AsTalkgroupDataGrant decodes RawPayload as a TalkgroupDataGrantPDU payload. */
int dmrgo_pdu_csbk_as_talkgroup_data_grant(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_talkgroup_data_grant_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsTalkgroupDataGrantMultiItem. AsTalkgroupDataGrantMultiItem decodes the RawPayload of a standard FID CSBK with opcode 0x38 as a TD_GRANT_MI PDU. */
int dmrgo_pdu_csbk_as_talkgroup_data_grant_multi_item(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsTalkgroupVoiceGrant. AsTalkgroupVoiceGrant decodes RawPayload as a TalkgroupVoiceGrantPDU payload. */
int dmrgo_pdu_csbk_as_talkgroup_voice_grant(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_talkgroup_voice_grant_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsUnitToUnitVoiceServiceAnswerResponse. AsUnitToUnitVoiceServiceAnswerResponse decodes RawPayload as a UnitToUnitVoiceServiceAnswerResponsePDU payload. */
int dmrgo_pdu_csbk_as_unit_to_unit_voice_service_answer_response(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_unit_to_unit_voice_service_answer_response_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.AsUnitToUnitVoiceServiceRequest. AsUnitToUnitVoiceServiceRequest decodes RawPayload as a UnitToUnitVoiceServiceRequestPDU payload. */
int dmrgo_pdu_csbk_as_unit_to_unit_voice_service_request(const dmrgo_pdu_csbk_t *self, dmrgo_pdu_unit_to_unit_voice_service_request_pdu_t *p, bool *ok);
/* Go: pdu.CSBK.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_CSBK. */
int dmrgo_pdu_csbk_data_type(const dmrgo_pdu_csbk_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.CSBK.Encode. Encode encodes a CSBK. */
int dmrgo_pdu_csbk_encode(const dmrgo_pdu_csbk_t *self, uint8_t out[12]);
/* Go: pdu.CSBK.SetAckInbound. SetAckInbound makes s carry p as an AckInboundPDU payload: it sets Opcode to DMRGO_PDU_CSBK_ACK_INBOUND, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_ack_inbound(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_ack_inbound_pdu_t *p);
/* Go: pdu.CSBK.SetAckInboundPayload. SetAckInboundPayload makes s carry p as an AckInboundPayloadPDU payload: it sets Opcode to DMRGO_PDU_CSBK_ACK_INBOUND_PAYLOAD, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_ack_inbound_payload(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_ack_inbound_payload_pdu_t *p);
/* Go: pdu.CSBK.SetAckOutbound. SetAckOutbound makes s carry p as an AckOutboundPDU payload: it sets Opcode to DMRGO_PDU_CSBK_ACK_OUTBOUND, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_ack_outbound(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_ack_outbound_pdu_t *p);
/* Go: pdu.CSBK.SetAckOutboundPayload. SetAckOutboundPayload makes s carry p as an AckOutboundPayloadPDU payload: it sets Opcode to DMRGO_PDU_CSBK_ACK_OUTBOUND_PAYLOAD, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_ack_outbound_payload(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_ack_outbound_payload_pdu_t *p);
/* Go: pdu.CSBK.SetAckvitation. SetAckvitation makes s carry p as an AckvitationPDU payload: it sets Opcode to DMRGO_PDU_CSBK_ACKVITATION, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_ackvitation(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_ackvitation_pdu_t *p);
/* Go: pdu.CSBK.SetAddresses. SetAddresses sets the target and source addresses of a CSBK for which Addresses returns ok. It returns DMRGO_ERR_PDU_NO_ADDRESSES for other CSBKs and a DMRGO_ERR_FIELD_RANGE when an address does not fit in 24 bits, and then changes nothing. */
int dmrgo_pdu_csbk_set_addresses(dmrgo_pdu_csbk_t *self, uint32_t target, uint32_t source);
/* Go: pdu.CSBK.SetAhoy. SetAhoy makes s carry p as an AhoyPDU payload: it sets Opcode to DMRGO_PDU_CSBK_AHOY, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_ahoy(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_ahoy_pdu_t *p);
/* Go: pdu.CSBK.SetAloha. SetAloha makes s carry p as an AlohaPDU payload: it sets Opcode to DMRGO_PDU_CSBK_ALOHA, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_aloha(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_aloha_pdu_t *p);
/* Go: pdu.CSBK.SetBSOutboundActivation. SetBSOutboundActivation makes s a standard FID BS_Dwn_Act CSBK that carries p: it sets Opcode, FID, Hint0x38 and RawPayload, and keeps the other fields. */
int dmrgo_pdu_csbk_set_bs_outbound_activation(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_bs_outbound_activation_pdu_t *p);
/* Go: pdu.CSBK.SetBroadcast. SetBroadcast makes s carry p as a BroadcastPDU payload: it sets Opcode to DMRGO_PDU_CSBK_BROADCAST, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_broadcast(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_broadcast_pdu_t *p);
/* Go: pdu.CSBK.SetBroadcastTalkgroupVoiceGrant. SetBroadcastTalkgroupVoiceGrant makes s carry p as a BroadcastTalkgroupVoiceGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_BROADCAST_TALKGROUP_VOICE_GRANT, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_broadcast_talkgroup_voice_grant(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_t *p);
/* Go: pdu.CSBK.SetChannelTiming. SetChannelTiming makes s carry p as a ChannelTimingPDU payload: it sets Opcode to DMRGO_PDU_CSBK_CHANNEL_TIMING, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_channel_timing(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_channel_timing_pdu_t *p);
/* Go: pdu.CSBK.SetClear. SetClear makes s carry p as a ClearPDU payload: it sets Opcode to DMRGO_PDU_CSBK_CLEAR, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_clear(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_clear_pdu_t *p);
/* Go: pdu.CSBK.SetDuplexPrivateDataGrant. SetDuplexPrivateDataGrant makes s carry p as a DuplexPrivateDataGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_DUPLEX_PRIVATE_DATA_GRANT, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_duplex_private_data_grant(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_duplex_private_data_grant_pdu_t *p);
/* Go: pdu.CSBK.SetDuplexPrivateVoiceGrant. SetDuplexPrivateVoiceGrant makes s carry p as a DuplexPrivateVoiceGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_DUPLEX_PRIVATE_VOICE_GRANT, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_duplex_private_voice_grant(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_duplex_private_voice_grant_pdu_t *p);
/* Go: pdu.CSBK.SetMaintenance. SetMaintenance makes s carry p as a MaintenancePDU payload: it sets Opcode to DMRGO_PDU_CSBK_MAINTENANCE, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_maintenance(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_maintenance_pdu_t *p);
/* Go: pdu.CSBK.SetMotorolaCallAlert. SetMotorolaCallAlert makes s carry p as a MotorolaCallAlertPDU payload: it sets Opcode to DMRGO_PDU_CSBK_MOTOROLA_CALL_ALERT, FID to DMRGO_ENUMS_FID_MOTOROLA, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_motorola_call_alert(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_motorola_call_alert_pdu_t *p);
/* Go: pdu.CSBK.SetMotorolaCallAlertAck. SetMotorolaCallAlertAck makes s carry p as a MotorolaCallAlertAckPDU payload: it sets Opcode to DMRGO_PDU_CSBK_MOTOROLA_CALL_ALERT_ACK, FID to DMRGO_ENUMS_FID_MOTOROLA, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_motorola_call_alert_ack(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_motorola_call_alert_ack_pdu_t *p);
/* Go: pdu.CSBK.SetMotorolaRadioCheck. SetMotorolaRadioCheck makes s carry p as a MotorolaRadioCheckPDU payload: it sets Opcode to DMRGO_PDU_CSBK_MOTOROLA_RADIO_CHECK, FID to DMRGO_ENUMS_FID_MOTOROLA, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_motorola_radio_check(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_motorola_radio_check_pdu_t *p);
/* Go: pdu.CSBK.SetMove. SetMove makes s carry p as a MovePDU payload: it sets Opcode to DMRGO_PDU_CSBK_MOVE, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_move(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_move_pdu_t *p);
/* Go: pdu.CSBK.SetNegativeAcknowledgement. SetNegativeAcknowledgement makes s carry p as a NegativeAcknowledgementPDU payload: it sets Opcode to DMRGO_PDU_CSBK_NEGATIVE_ACKNOWLEDGEMENT, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_negative_acknowledgement(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_negative_acknowledgement_pdu_t *p);
/* Go: pdu.CSBK.SetPreamble. SetPreamble makes s carry p as a PreamblePDU payload: it sets Opcode to DMRGO_PDU_CSBK_PREAMBLE, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_preamble(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_preamble_pdu_t *p);
/* Go: pdu.CSBK.SetPrivateDataGrant. SetPrivateDataGrant makes s carry p as a PrivateDataGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_PRIVATE_DATA_GRANT, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_private_data_grant(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_private_data_grant_pdu_t *p);
/* Go: pdu.CSBK.SetPrivateDataGrantMultiItem. SetPrivateDataGrantMultiItem makes s carry p as a PrivateDataGrantMultiItemPDU payload: it sets Opcode to DMRGO_PDU_CSBK_PRIVATE_DATA_GRANT_MULTI_ITEM, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_private_data_grant_multi_item(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_private_data_grant_multi_item_pdu_t *p);
/* Go: pdu.CSBK.SetPrivateVoiceGrant. SetPrivateVoiceGrant makes s carry p as a PrivateVoiceGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_PRIVATE_VOICE_GRANT, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_private_voice_grant(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_private_voice_grant_pdu_t *p);
/* Go: pdu.CSBK.SetProtect. SetProtect makes s carry p as a ProtectPDU payload: it sets Opcode to DMRGO_PDU_CSBK_PROTECT, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_protect(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_protect_pdu_t *p);
/* Go: pdu.CSBK.SetRandomAccess. SetRandomAccess makes s carry p as a RandomAccessPDU payload: it sets Opcode to DMRGO_PDU_CSBK_RANDOM_ACCESS, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_random_access(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_random_access_pdu_t *p);
/* Go: pdu.CSBK.SetTalkgroupDataGrant. SetTalkgroupDataGrant makes s carry p as a TalkgroupDataGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_TALKGROUP_DATA_GRANT, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_talkgroup_data_grant(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_talkgroup_data_grant_pdu_t *p);
/* Go: pdu.CSBK.SetTalkgroupDataGrantMultiItem. SetTalkgroupDataGrantMultiItem makes s a standard FID TD_GRANT_MI CSBK that carries p, as SetBSOutboundActivation does. */
int dmrgo_pdu_csbk_set_talkgroup_data_grant_multi_item(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_t *p);
/* Go: pdu.CSBK.SetTalkgroupVoiceGrant. SetTalkgroupVoiceGrant makes s carry p as a TalkgroupVoiceGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_TALKGROUP_VOICE_GRANT, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_talkgroup_voice_grant(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_talkgroup_voice_grant_pdu_t *p);
/* Go: pdu.CSBK.SetUnitToUnitVoiceServiceAnswerResponse. SetUnitToUnitVoiceServiceAnswerResponse makes s carry p as a UnitToUnitVoiceServiceAnswerResponsePDU payload: it sets Opcode to DMRGO_PDU_CSBK_UNIT_TO_UNIT_VOICE_SERVICE_ANSWER_RESPONSE, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_unit_to_unit_voice_service_answer_response(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_unit_to_unit_voice_service_answer_response_pdu_t *p);
/* Go: pdu.CSBK.SetUnitToUnitVoiceServiceRequest. SetUnitToUnitVoiceServiceRequest makes s carry p as a UnitToUnitVoiceServiceRequestPDU payload: it sets Opcode to DMRGO_PDU_CSBK_UNIT_TO_UNIT_VOICE_SERVICE_REQUEST, FID to 0, Hint0x38 to DMRGO_PDU_OPCODE0X38_UNKNOWN and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_csbk_set_unit_to_unit_voice_service_request(dmrgo_pdu_csbk_t *self, const dmrgo_pdu_unit_to_unit_voice_service_request_pdu_t *p);
/* Go: pdu.CSBK.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_csbk_string(const dmrgo_pdu_csbk_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CSBKBytes.Addresses. Addresses returns the 24-bit target and source addresses of the CSBKs for which dmrgo_pdu_csbk_addresses returns them, and ok false for every other CSBK. */
int dmrgo_pdu_csbk_bytes_addresses(const dmrgo_pdu_csbk_bytes_t *self, uint32_t *target, uint32_t *source, bool *ok);
/* Go: pdu.CSBKBytes.CRCOK. CRCOK reports whether octets 10 and 11 hold the CRC of octets 0 to 9 with the CSBK mask, as BlockCRCOK does. */
int dmrgo_pdu_csbk_bytes_crc_ok(const dmrgo_pdu_csbk_bytes_t *self, bool *out);
/* Go: pdu.CSBKBytes.FID. FID returns the Feature set ID, octet 1. */
int dmrgo_pdu_csbk_bytes_fid(const dmrgo_pdu_csbk_bytes_t *self, dmrgo_enums_fid_t *out);
/* Go: pdu.CSBKBytes.Group. Group reports whether the target address is a talkgroup, from the Group bit of Pre_CSBK or the G/I bit of P_CLEAR, P_PROTECT, C_AHOY and P_AHOY. */
int dmrgo_pdu_csbk_bytes_group(const dmrgo_pdu_csbk_bytes_t *self, bool *group, bool *ok);
/* Go: pdu.CSBKBytes.Opcode. Opcode returns the 6-bit CSBKO, the low 6 bits of octet 0. */
int dmrgo_pdu_csbk_bytes_opcode(const dmrgo_pdu_csbk_bytes_t *self, dmrgo_pdu_csbk_opcode_t *out);
/* Go: pdu.CSBKBytes.Reseal. Reseal writes the CRC of octets 0 to 9 with the CSBK mask into octets 10 and 11, as Seal does. */
int dmrgo_pdu_csbk_bytes_reseal(dmrgo_pdu_csbk_bytes_t *self);
/* Go: pdu.CSBKBytes.SetAddresses. SetAddresses writes target and source into the address octets of a CSBK for which Addresses returns ok. It returns DMRGO_ERR_PDU_NO_ADDRESSES for other CSBKs and a DMRGO_ERR_FIELD_RANGE when an address does not fit in 24 bits, and then changes nothing. */
int dmrgo_pdu_csbk_bytes_set_addresses(dmrgo_pdu_csbk_bytes_t *self, uint32_t target, uint32_t source);
/* Go: pdu.CSBKBytes.SetGroup. SetGroup writes the flag that Group returns. It returns DMRGO_ERR_PDU_NO_GROUP_FLAG, and changes nothing, for a CSBK for which Group returns no flag. */
int dmrgo_pdu_csbk_bytes_set_group(dmrgo_pdu_csbk_bytes_t *self, bool group);
/* Go: pdu.CSBKOpcode.String. String returns the name of the CSBKOpcode, or of the Capacity Plus opcode (FID 0x10) for a value that has no standard opcode. */
int dmrgo_pdu_csbk_opcode_string(dmrgo_pdu_csbk_opcode_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CallTimerParms.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_call_timer_parms_string(const dmrgo_pdu_call_timer_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CapacityPlusActivity.RadioTarget. RadioTarget returns the target radio of a private voice or data call on lsn. */
int dmrgo_pdu_capacity_plus_activity_radio_target(const dmrgo_pdu_capacity_plus_activity_t *self, uint8_t lsn, uint16_t *radio, bool *ok);
/* Go: pdu.CapacityPlusActivity.Talkgroup. Talkgroup returns the talkgroup of a group call on lsn. */
int dmrgo_pdu_capacity_plus_activity_talkgroup(const dmrgo_pdu_capacity_plus_activity_t *self, uint8_t lsn, uint8_t *tg, bool *ok);
/* Go: pdu.CapacityPlusChannel. CapacityPlusChannel returns the repeater and timeslot of a logical slot number: LSN 1 and 2 are timeslots 1 and 2 of repeater 1, LSN 3 and 4 of repeater 2, and so on. */
int dmrgo_pdu_capacity_plus_channel(uint8_t lsn, uint8_t *repeater, dmrgo_enums_slot_t *slot, bool *ok);
/* Go: pdu.CapacityPlusDataRevertAnnouncementPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_capacity_plus_data_revert_announcement_pdu_string(const dmrgo_pdu_capacity_plus_data_revert_announcement_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CapacityPlusDataRevertGrantPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_capacity_plus_data_revert_grant_pdu_string(const dmrgo_pdu_capacity_plus_data_revert_grant_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CapacityPlusGroupVoiceGrant.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_capacity_plus_group_voice_grant_string(const dmrgo_pdu_capacity_plus_group_voice_grant_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CapacityPlusNeighborsPDU.Neighbor. Neighbor returns the site number and rest LSN of neighbor i, from 0. */
int dmrgo_pdu_capacity_plus_neighbors_pdu_neighbor(const dmrgo_pdu_capacity_plus_neighbors_pdu_t *self, int64_t i, uint8_t *site, uint8_t *rest_lsn, bool *ok);
/* Go: pdu.CapacityPlusNeighborsPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_capacity_plus_neighbors_pdu_string(const dmrgo_pdu_capacity_plus_neighbors_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CapacityPlusPreamblePDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_capacity_plus_preamble_pdu_string(const dmrgo_pdu_capacity_plus_preamble_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CapacityPlusPrivateVoiceGrant.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_capacity_plus_private_voice_grant_string(const dmrgo_pdu_capacity_plus_private_voice_grant_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CapacityPlusRestChannel.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_capacity_plus_rest_channel_string(const dmrgo_pdu_capacity_plus_rest_channel_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.CapacityPlusSegment.String. String returns the name of the CapacityPlusSegment. */
int dmrgo_pdu_capacity_plus_segment_string(dmrgo_pdu_capacity_plus_segment_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_pdu_capacity_plus_site_status_assembler_new makes a zero dmrgo_pdu_capacity_plus_site_status_assembler_t. */
int dmrgo_pdu_capacity_plus_site_status_assembler_new(dmrgo_pdu_capacity_plus_site_status_assembler_t **out);
/* dmrgo_pdu_capacity_plus_site_status_assembler_free frees the handle. self may be NULL. */
int dmrgo_pdu_capacity_plus_site_status_assembler_free(dmrgo_pdu_capacity_plus_site_status_assembler_t *self);
/* Go: pdu.CapacityPlusSiteStatusAssembler.Activity. Activity decodes the last complete status. It returns DMRGO_ERR_PDU_CAPACITY_PLUS_INCOMPLETE when no status is complete, and when a bitmap names more talkgroups or radios than the status holds; the activity then has the entries that the status holds. */
int dmrgo_pdu_capacity_plus_site_status_assembler_activity(dmrgo_pdu_capacity_plus_site_status_assembler_t *self, dmrgo_pdu_capacity_plus_activity_t *out);
/* Go: pdu.CapacityPlusSiteStatusAssembler.Add. Add adds a block. It returns DMRGO_ERR_PDU_CAPACITY_PLUS_SEQUENCE for a continuation or last block without a first block, and for a block past DMRGO_PDU_CAPACITY_PLUS_MAX_BLOCKS. p may be NULL. */
int dmrgo_pdu_capacity_plus_site_status_assembler_add(dmrgo_pdu_capacity_plus_site_status_assembler_t *self, const dmrgo_pdu_capacity_plus_site_status_pdu_t *p, bool *out);
/* Go: pdu.CapacityPlusSiteStatusAssembler.Reset. Reset drops the partial or complete status. */
int dmrgo_pdu_capacity_plus_site_status_assembler_reset(dmrgo_pdu_capacity_plus_site_status_assembler_t *self);
/* Go: pdu.CapacityPlusSiteStatusPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_capacity_plus_site_status_pdu_string(const dmrgo_pdu_capacity_plus_site_status_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ChanFreqParms.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_chan_freq_parms_string(const dmrgo_pdu_chan_freq_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ChannelTimingPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_channel_timing sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_channel_timing_pdu_csbk(const dmrgo_pdu_channel_timing_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.ChannelTimingPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_channel_timing_pdu_string(const dmrgo_pdu_channel_timing_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ClearPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_clear sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_clear_pdu_csbk(const dmrgo_pdu_clear_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.ClearPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_clear_pdu_string(const dmrgo_pdu_clear_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ConfirmedDataHeader.DataHeader. DataHeader returns the DataHeader that carries s, as dmrgo_pdu_data_header_set_confirmed sets it, with the other fields zero. */
int dmrgo_pdu_confirmed_data_header_data_header(const dmrgo_pdu_confirmed_data_header_t *self, dmrgo_pdu_data_header_t *out);
/* Go: pdu.ConfirmedDataHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_confirmed_data_header_string(const dmrgo_pdu_confirmed_data_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.DataHeader.Addresses. Addresses returns the destination LLID as target and the source LLID of the header. */
int dmrgo_pdu_data_header_addresses(const dmrgo_pdu_data_header_t *self, uint32_t *target, uint32_t *source, bool *ok);
/* Go: pdu.DataHeader.AsConfirmed. AsConfirmed decodes RawPayload as a ConfirmedDataHeader payload. */
int dmrgo_pdu_data_header_as_confirmed(const dmrgo_pdu_data_header_t *self, dmrgo_pdu_confirmed_data_header_t *p, bool *ok);
/* Go: pdu.DataHeader.AsDefinedData. AsDefinedData decodes RawPayload as a DefinedDataHeader payload. */
int dmrgo_pdu_data_header_as_defined_data(const dmrgo_pdu_data_header_t *self, dmrgo_pdu_defined_data_header_t *p, bool *ok);
/* Go: pdu.DataHeader.AsProprietary. AsProprietary decodes RawPayload as a ProprietaryHeader payload. */
int dmrgo_pdu_data_header_as_proprietary(const dmrgo_pdu_data_header_t *self, dmrgo_pdu_proprietary_header_t *p, bool *ok);
/* Go: pdu.DataHeader.AsRawData. AsRawData decodes RawPayload as a RawDataHeader payload. */
int dmrgo_pdu_data_header_as_raw_data(const dmrgo_pdu_data_header_t *self, dmrgo_pdu_raw_data_header_t *p, bool *ok);
/* Go: pdu.DataHeader.AsResponse. AsResponse decodes RawPayload as a ResponsePacketHeader payload. */
int dmrgo_pdu_data_header_as_response(const dmrgo_pdu_data_header_t *self, dmrgo_pdu_response_packet_header_t *p, bool *ok);
/* Go: pdu.DataHeader.AsStatusPrecoded. AsStatusPrecoded decodes RawPayload as a StatusPrecodedHeader payload. */
int dmrgo_pdu_data_header_as_status_precoded(const dmrgo_pdu_data_header_t *self, dmrgo_pdu_status_precoded_header_t *p, bool *ok);
/* Go: pdu.DataHeader.AsUDT. AsUDT decodes RawPayload as a UDTHeader payload. */
int dmrgo_pdu_data_header_as_udt(const dmrgo_pdu_data_header_t *self, dmrgo_pdu_udt_header_t *p, bool *ok);
/* Go: pdu.DataHeader.AsUnconfirmed. AsUnconfirmed decodes RawPayload as an UnconfirmedDataHeader payload. */
int dmrgo_pdu_data_header_as_unconfirmed(const dmrgo_pdu_data_header_t *self, dmrgo_pdu_unconfirmed_data_header_t *p, bool *ok);
/* Go: pdu.DataHeader.BlocksToFollow. BlocksToFollow returns the number of blocks after the header: the Blocks to Follow of a U_HEAD, C_HEAD or C_RHEAD, the Appended Blocks of a DD_HEAD or R_HEAD, UAB plus one for a UDT_HEAD, and 0 for an SP_HEAD. */
int dmrgo_pdu_data_header_blocks_to_follow(const dmrgo_pdu_data_header_t *self, int64_t *n, bool *ok);
/* Go: pdu.DataHeader.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_DATA_HEADER. */
int dmrgo_pdu_data_header_data_type(const dmrgo_pdu_data_header_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.DataHeader.Encode. Encode encodes a DataHeader. */
int dmrgo_pdu_data_header_encode(const dmrgo_pdu_data_header_t *self, uint8_t out[12]);
/* Go: pdu.DataHeader.Format. Format returns the Data Packet Format (DPF) of the header. */
int dmrgo_pdu_data_header_format(const dmrgo_pdu_data_header_t *self, dmrgo_pdu_format_t *out);
/* Go: pdu.DataHeader.FullMessage. FullMessage returns the Full Message Flag (F) of a U_HEAD, C_HEAD, DD_HEAD or R_HEAD: true for the first try of a packet. */
int dmrgo_pdu_data_header_full_message(const dmrgo_pdu_data_header_t *self, bool *full, bool *ok);
/* Go: pdu.DataHeader.Group. Group returns the Group or Individual flag of the header: true when the destination LLID is a talkgroup. */
int dmrgo_pdu_data_header_group(const dmrgo_pdu_data_header_t *self, bool *group, bool *ok);
/* Go: pdu.DataHeader.SAP. SAP returns the SAP identifier of the header. */
int dmrgo_pdu_data_header_sap(const dmrgo_pdu_data_header_t *self, dmrgo_enums_sap_t *sap, bool *ok);
/* Go: pdu.DataHeader.SetAddresses. SetAddresses sets the destination and source LLIDs of the header. It returns DMRGO_ERR_PDU_NO_ADDRESSES for a proprietary header and a header of an unknown format, and a DMRGO_ERR_FIELD_RANGE when an LLID does not fit in 24 bits, and then changes nothing. */
int dmrgo_pdu_data_header_set_addresses(dmrgo_pdu_data_header_t *self, uint32_t destination, uint32_t source);
/* Go: pdu.DataHeader.SetConfirmed. SetConfirmed makes s carry p as a ConfirmedDataHeader payload: it sets RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_data_header_set_confirmed(dmrgo_pdu_data_header_t *self, const dmrgo_pdu_confirmed_data_header_t *p);
/* Go: pdu.DataHeader.SetDefinedData. SetDefinedData makes s carry p as a DefinedDataHeader payload: it sets RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_data_header_set_defined_data(dmrgo_pdu_data_header_t *self, const dmrgo_pdu_defined_data_header_t *p);
/* Go: pdu.DataHeader.SetGroup. SetGroup sets the flag that Group returns. It returns DMRGO_ERR_PDU_NO_GROUP_FLAG, and changes nothing, for a header for which Group returns no flag. */
int dmrgo_pdu_data_header_set_group(dmrgo_pdu_data_header_t *self, bool group);
/* Go: pdu.DataHeader.SetProprietary. SetProprietary makes s carry p as a ProprietaryHeader payload: it sets RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_data_header_set_proprietary(dmrgo_pdu_data_header_t *self, const dmrgo_pdu_proprietary_header_t *p);
/* Go: pdu.DataHeader.SetRawData. SetRawData makes s carry p as a RawDataHeader payload: it sets RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits or p->appended_blocks is 0, and then leaves s as it is. */
int dmrgo_pdu_data_header_set_raw_data(dmrgo_pdu_data_header_t *self, const dmrgo_pdu_raw_data_header_t *p);
/* Go: pdu.DataHeader.SetResponse. SetResponse makes s carry p as a ResponsePacketHeader payload: it sets RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_data_header_set_response(dmrgo_pdu_data_header_t *self, const dmrgo_pdu_response_packet_header_t *p);
/* Go: pdu.DataHeader.SetStatusPrecoded. SetStatusPrecoded makes s carry p as a StatusPrecodedHeader payload: it sets RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_data_header_set_status_precoded(dmrgo_pdu_data_header_t *self, const dmrgo_pdu_status_precoded_header_t *p);
/* Go: pdu.DataHeader.SetUDT. SetUDT makes s carry p as a UDTHeader payload: it sets RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_data_header_set_udt(dmrgo_pdu_data_header_t *self, const dmrgo_pdu_udt_header_t *p);
/* Go: pdu.DataHeader.SetUnconfirmed. SetUnconfirmed makes s carry p as an UnconfirmedDataHeader payload: it sets RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_data_header_set_unconfirmed(dmrgo_pdu_data_header_t *self, const dmrgo_pdu_unconfirmed_data_header_t *p);
/* Go: pdu.DataHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_data_header_string(const dmrgo_pdu_data_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.DataHeaderBytes.Addresses. Addresses returns the destination LLID (octets 2 to 4) as target and the source LLID (octets 5 to 7) of the header. */
int dmrgo_pdu_data_header_bytes_addresses(const dmrgo_pdu_data_header_bytes_t *self, uint32_t *target, uint32_t *source, bool *ok);
/* Go: pdu.DataHeaderBytes.CRCOK. CRCOK reports whether octets 10 and 11 hold the CRC of octets 0 to 9 with the Data Header mask, as BlockCRCOK does. */
int dmrgo_pdu_data_header_bytes_crc_ok(const dmrgo_pdu_data_header_bytes_t *self, bool *out);
/* Go: pdu.DataHeaderBytes.Format. Format returns the Format, the low 4 bits of octet 0. */
int dmrgo_pdu_data_header_bytes_format(const dmrgo_pdu_data_header_bytes_t *self, dmrgo_pdu_format_t *out);
/* Go: pdu.DataHeaderBytes.Group. Group returns the Group or Individual flag, bit 7 of octet 0: true for a group destination. */
int dmrgo_pdu_data_header_bytes_group(const dmrgo_pdu_data_header_bytes_t *self, bool *group, bool *ok);
/* Go: pdu.DataHeaderBytes.Reseal. Reseal writes the CRC of octets 0 to 9 with the Data Header mask into octets 10 and 11, as Seal does. */
int dmrgo_pdu_data_header_bytes_reseal(dmrgo_pdu_data_header_bytes_t *self);
/* Go: pdu.DataHeaderBytes.SetAddresses. SetAddresses writes the destination and source LLIDs. It returns DMRGO_ERR_PDU_NO_ADDRESSES for a P_HEAD or a reserved format and a DMRGO_ERR_FIELD_RANGE when an LLID does not fit in 24 bits, and then changes nothing. */
int dmrgo_pdu_data_header_bytes_set_addresses(dmrgo_pdu_data_header_bytes_t *self, uint32_t target, uint32_t source);
/* Go: pdu.DataHeaderBytes.SetGroup. SetGroup writes the flag that Group returns. It returns DMRGO_ERR_PDU_NO_GROUP_FLAG, and changes nothing, for a header for which Group returns no flag. */
int dmrgo_pdu_data_header_bytes_set_group(dmrgo_pdu_data_header_bytes_t *self, bool group);
/* Go: pdu.DecodeCSBK. DecodeCSBK decodes a CSBK. */
int dmrgo_pdu_decode_csbk(const uint8_t data[12], dmrgo_pdu_csbk_t *out);
/* Go: pdu.DecodeDataHeader. DecodeDataHeader decodes a DataHeader. */
int dmrgo_pdu_decode_data_header(const uint8_t data[12], dmrgo_pdu_data_header_t *out);
/* Go: pdu.DecodeEMBCodeword. DecodeEMBCodeword decodes the 16-bit QR(16,7,6) codeword cw, first bit most significant, as DecodeEmbeddedSignalling does. */
int dmrgo_pdu_decode_emb_codeword(uint16_t cw, dmrgo_pdu_emb_info_t *emb_info, dmrgo_fec_result_t *fec);
/* Go: pdu.DecodeEmbeddedSignalling. DecodeEmbeddedSignalling decodes an EmbeddedSignalling. */
int dmrgo_pdu_decode_embedded_signalling(const uint8_t data[2], dmrgo_pdu_embedded_signalling_t *out);
/* Go: pdu.DecodeFullLCCodeword. DecodeFullLCCodeword removes the mask of dt from the parity of cw and decodes the RS(12,9) codeword. */
int dmrgo_pdu_decode_full_lc_codeword(const uint8_t cw[12], dmrgo_enums_data_type_t dt, uint8_t data[9], dmrgo_fec_result_t *fec);
/* Go: pdu.DecodeFullLinkControl. DecodeFullLinkControl decodes a FullLinkControl. */
int dmrgo_pdu_decode_full_link_control(const uint8_t data[12], dmrgo_enums_data_type_t burst_data_type, dmrgo_pdu_full_link_control_t *out);
/* Go: pdu.DecodeFullLinkControlBytes. DecodeFullLinkControlBytes decodes the 72 LC bits lc, without RS(12,9) parity, as a FullLinkControl. */
int dmrgo_pdu_decode_full_link_control_bytes(const uint8_t lc[9], dmrgo_pdu_full_link_control_t *out);
/* Go: pdu.DecodeMBCContinuation. DecodeMBCContinuation decodes an MBCContinuation. */
int dmrgo_pdu_decode_mbc_continuation(const uint8_t data[12], dmrgo_pdu_mbc_continuation_t *out);
/* Go: pdu.DecodeMBCHeader. DecodeMBCHeader decodes an MBCHeader. */
int dmrgo_pdu_decode_mbc_header(const uint8_t data[12], dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.DecodePIHeader. DecodePIHeader decodes a PIHeader. */
int dmrgo_pdu_decode_pi_header(const uint8_t data[12], dmrgo_pdu_pi_header_t *out);
/* Go: pdu.DecodeRate12Data. DecodeRate12Data decodes a Rate12Data. */
int dmrgo_pdu_decode_rate12_data(const uint8_t data[12], dmrgo_pdu_rate12_data_t *out);
/* Go: pdu.DecodeRate1Data. DecodeRate1Data decodes a Rate1Data. */
int dmrgo_pdu_decode_rate1_data(const uint8_t data[24], dmrgo_pdu_rate1_data_t *out);
/* Go: pdu.DecodeRate34Data. DecodeRate34Data decodes a Rate34Data. */
int dmrgo_pdu_decode_rate34_data(const uint8_t data[18], dmrgo_pdu_rate34_data_t *out);
/* Go: pdu.DecodeReverseChannel. DecodeReverseChannel decodes an RC PDU from its 11 information bits, after the Single Burst BPTC decode: the 4-bit RC command and the masked CRC-7. */
int dmrgo_pdu_decode_reverse_channel(const uint8_t info[2], dmrgo_pdu_reverse_channel_t *out);
/* Go: pdu.DecodeShortLC. DecodeShortLC decodes a ShortLC. */
int dmrgo_pdu_decode_short_lc(const uint8_t data[5], dmrgo_pdu_short_lc_t *out);
/* Go: pdu.DecodeSlotType. DecodeSlotType decodes a SlotType. */
int dmrgo_pdu_decode_slot_type(const uint8_t data[3], dmrgo_pdu_slot_type_t *out);
/* Go: pdu.DecodeSlotTypeCodeword. DecodeSlotTypeCodeword decodes the 20-bit Golay(20,8) codeword in the low 20 bits of cw, first bit most significant, as DecodeSlotType does. */
int dmrgo_pdu_decode_slot_type_codeword(uint32_t cw, dmrgo_pdu_slot_type_info_t *slot_type_info, dmrgo_fec_result_t *fec);
/* Go: pdu.DecodeTACT. DecodeTACT decodes a TACT. */
int dmrgo_pdu_decode_tact(const uint8_t data[1], dmrgo_pdu_tact_t *out);
/* Go: pdu.DecodeUDPIPv4CompressedHeader. DecodeUDPIPv4CompressedHeader decodes a UDPIPv4CompressedHeader. */
int dmrgo_pdu_decode_udp_ipv4_compressed_header(const uint8_t data[9], dmrgo_pdu_udp_ipv4_compressed_header_t *out);
/* Go: pdu.DecodeUnifiedSingleBlockData. DecodeUnifiedSingleBlockData decodes a UnifiedSingleBlockData. */
int dmrgo_pdu_decode_unified_single_block_data(const uint8_t data[12], dmrgo_pdu_unified_single_block_data_t *out);
/* Go: pdu.DefinedDataHeader.DataHeader. DataHeader returns the DataHeader that carries s, as dmrgo_pdu_data_header_set_defined_data sets it, with the other fields zero. */
int dmrgo_pdu_defined_data_header_data_header(const dmrgo_pdu_defined_data_header_t *self, dmrgo_pdu_data_header_t *out);
/* Go: pdu.DefinedDataHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_defined_data_header_string(const dmrgo_pdu_defined_data_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.DuplexPrivateDataGrantPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_duplex_private_data_grant sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_duplex_private_data_grant_pdu_csbk(const dmrgo_pdu_duplex_private_data_grant_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.DuplexPrivateDataGrantPDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_duplex_private_data_grant sets it, with the other fields zero. */
int dmrgo_pdu_duplex_private_data_grant_pdu_mbc_header(const dmrgo_pdu_duplex_private_data_grant_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.DuplexPrivateDataGrantPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_duplex_private_data_grant_pdu_string(const dmrgo_pdu_duplex_private_data_grant_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.DuplexPrivateVoiceGrantPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_duplex_private_voice_grant sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_duplex_private_voice_grant_pdu_csbk(const dmrgo_pdu_duplex_private_voice_grant_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.DuplexPrivateVoiceGrantPDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_duplex_private_voice_grant sets it, with the other fields zero. */
int dmrgo_pdu_duplex_private_voice_grant_pdu_mbc_header(const dmrgo_pdu_duplex_private_voice_grant_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.DuplexPrivateVoiceGrantPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_duplex_private_voice_grant_pdu_string(const dmrgo_pdu_duplex_private_voice_grant_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.EMBInfo.Codeword. Codeword returns the 16-bit QR(16,7,6) codeword of e, the 7 information bits followed by the 9 parity bits, first bit most significant (ETSI TS 102 361-1 clause B.3.2). */
int dmrgo_pdu_emb_info_codeword(dmrgo_pdu_emb_info_t self, uint16_t *out);
/* Go: pdu.EMBInfo.ColorCode. ColorCode returns the 4-bit color code, bits 7 to 4. */
int dmrgo_pdu_emb_info_color_code(dmrgo_pdu_emb_info_t self, dmrgo_enums_color_code_t *out);
/* Go: pdu.EMBInfo.EmbeddedSignalling. EmbeddedSignalling returns the fields of e as an EmbeddedSignalling with a zero FEC result. */
int dmrgo_pdu_emb_info_embedded_signalling(dmrgo_pdu_emb_info_t self, dmrgo_pdu_embedded_signalling_t *out);
/* Go: pdu.EMBInfo.LCSS. LCSS returns the Link Control Start/Stop, bits 2 and 1. */
int dmrgo_pdu_emb_info_lcss(dmrgo_pdu_emb_info_t self, dmrgo_enums_lcss_t *out);
/* Go: pdu.EMBInfo.PI. PI returns the Pre-emption and power control Indicator, bit 3. */
int dmrgo_pdu_emb_info_pi(dmrgo_pdu_emb_info_t self, bool *out);
/* Go: pdu.EMBInfo.SetColorCode. SetColorCode writes cc into bits 7 to 4. */
int dmrgo_pdu_emb_info_set_color_code(dmrgo_pdu_emb_info_t *self, dmrgo_enums_color_code_t cc);
/* Go: pdu.EMBInfo.SetLCSS. SetLCSS writes l into bits 2 and 1. */
int dmrgo_pdu_emb_info_set_lcss(dmrgo_pdu_emb_info_t *self, dmrgo_enums_lcss_t l);
/* Go: pdu.EMBInfo.SetPI. SetPI writes the Pre-emption and power control Indicator into bit 3. */
int dmrgo_pdu_emb_info_set_pi(dmrgo_pdu_emb_info_t *self, bool pi);
/* Go: pdu.EmbeddedSignalling.Encode. Encode encodes an EmbeddedSignalling. */
int dmrgo_pdu_embedded_signalling_encode(const dmrgo_pdu_embedded_signalling_t *self, uint8_t out[2]);
/* Go: pdu.EmbeddedSignalling.Info. Info returns the information bits of s as an EMBInfo with bit 0 clear: the color code, the PI and the LCSS. */
int dmrgo_pdu_embedded_signalling_info(const dmrgo_pdu_embedded_signalling_t *self, dmrgo_pdu_emb_info_t *out);
/* Go: pdu.EmbeddedSignalling.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_embedded_signalling_string(const dmrgo_pdu_embedded_signalling_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.EncodeTalkerAlias. EncodeTalkerAlias returns the Talker Alias header LC and the block LCs that carry alias in the given format, with the SFID. It returns DMRGO_ERR_PDU_TALKER_ALIAS_LENGTH when the alias needs more than 31 Code Units or more than three blocks, DMRGO_ERR_PDU_TALKER_ALIAS_CHARACTER when a character is not in the format, and a DMRGO_ERR_FIELD_RANGE for a format over 3. */
int dmrgo_pdu_encode_talker_alias(const char *alias, size_t alias_len, dmrgo_layer3_talker_alias_data_format_t format, dmrgo_pdu_full_link_control_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.EncodeTalkerAliasInto. EncodeTalkerAliasInto writes the LCs that EncodeTalkerAlias returns into dst and returns their number, with the errors of EncodeTalkerAlias. */
int dmrgo_pdu_encode_talker_alias_into(dmrgo_pdu_full_link_control_t dst[4], const char *alias, size_t alias_len, dmrgo_layer3_talker_alias_data_format_t format, int64_t *out);
/* Go: pdu.FLCGPSInfo.FullLinkControl. FullLinkControl returns the FullLinkControl that carries s, as dmrgo_pdu_full_link_control_set_gps_info sets it, with the other fields zero. */
int dmrgo_pdu_flc_gps_info_full_link_control(const dmrgo_pdu_flc_gps_info_t *self, dmrgo_pdu_full_link_control_t *out);
/* Go: pdu.FLCGPSInfo.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_flc_gps_info_string(const dmrgo_pdu_flc_gps_info_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.FLCGroupVoice.FullLinkControl. FullLinkControl returns the FullLinkControl that carries s, as dmrgo_pdu_full_link_control_set_group_voice sets it, with the other fields zero. */
int dmrgo_pdu_flc_group_voice_full_link_control(const dmrgo_pdu_flc_group_voice_t *self, dmrgo_pdu_full_link_control_t *out);
/* Go: pdu.FLCGroupVoice.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_flc_group_voice_string(const dmrgo_pdu_flc_group_voice_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.FLCTalkerAliasBlock.FullLinkControl. FullLinkControl returns the FullLinkControl that carries s, as dmrgo_pdu_full_link_control_set_talker_alias_block sets it with flco, with the other fields zero. */
int dmrgo_pdu_flc_talker_alias_block_full_link_control(const dmrgo_pdu_flc_talker_alias_block_t *self, dmrgo_enums_flco_t flco, dmrgo_pdu_full_link_control_t *out);
/* Go: pdu.FLCTalkerAliasBlock.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_flc_talker_alias_block_string(const dmrgo_pdu_flc_talker_alias_block_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.FLCTalkerAliasHeader.FullLinkControl. FullLinkControl returns the FullLinkControl that carries s, as dmrgo_pdu_full_link_control_set_talker_alias_header sets it, with the other fields zero. */
int dmrgo_pdu_flc_talker_alias_header_full_link_control(const dmrgo_pdu_flc_talker_alias_header_t *self, dmrgo_pdu_full_link_control_t *out);
/* Go: pdu.FLCTalkerAliasHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_flc_talker_alias_header_string(const dmrgo_pdu_flc_talker_alias_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.FLCTerminatorDataLinkControl.FullLinkControl. FullLinkControl returns the FullLinkControl that carries s, as dmrgo_pdu_full_link_control_set_terminator_data_link_control sets it, with the other fields zero. */
int dmrgo_pdu_flc_terminator_data_link_control_full_link_control(const dmrgo_pdu_flc_terminator_data_link_control_t *self, dmrgo_pdu_full_link_control_t *out);
/* Go: pdu.FLCTerminatorDataLinkControl.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_flc_terminator_data_link_control_string(const dmrgo_pdu_flc_terminator_data_link_control_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.FLCUnitToUnit.FullLinkControl. FullLinkControl returns the FullLinkControl that carries s, as dmrgo_pdu_full_link_control_set_unit_to_unit sets it, with the other fields zero. */
int dmrgo_pdu_flc_unit_to_unit_full_link_control(const dmrgo_pdu_flc_unit_to_unit_t *self, dmrgo_pdu_full_link_control_t *out);
/* Go: pdu.FLCUnitToUnit.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_flc_unit_to_unit_string(const dmrgo_pdu_flc_unit_to_unit_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.Format.String. String returns a human-readable name for a DataHeader Format. */
int dmrgo_pdu_format_string(dmrgo_pdu_format_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.FullLCParityOK. FullLCParityOK reports whether the RS(12,9) parity of the codeword cw, with the mask of dt removed, equals the parity of its 9 LC octets. */
int dmrgo_pdu_full_lc_parity_ok(const uint8_t cw[12], dmrgo_enums_data_type_t dt, bool *out);
/* Go: pdu.FullLinkControl.Addresses. Addresses returns the 24-bit target and source addresses of a Grp_V_Ch_Usr (FLCO 0) or UU_V_Ch_Usr (FLCO 3) LC. */
int dmrgo_pdu_full_link_control_addresses(const dmrgo_pdu_full_link_control_t *self, uint32_t *target, uint32_t *source, bool *ok);
/* Go: pdu.FullLinkControl.AsCapacityPlusGroupVoiceGrant. AsCapacityPlusGroupVoiceGrant decodes the RawPayload of a Capacity Plus group voice call grant. */
int dmrgo_pdu_full_link_control_as_capacity_plus_group_voice_grant(const dmrgo_pdu_full_link_control_t *self, dmrgo_pdu_capacity_plus_group_voice_grant_t *p, bool *ok);
/* Go: pdu.FullLinkControl.AsCapacityPlusPrivateVoiceGrant. AsCapacityPlusPrivateVoiceGrant decodes the RawPayload of a Capacity Plus private voice call grant. */
int dmrgo_pdu_full_link_control_as_capacity_plus_private_voice_grant(const dmrgo_pdu_full_link_control_t *self, dmrgo_pdu_capacity_plus_private_voice_grant_t *p, bool *ok);
/* Go: pdu.FullLinkControl.AsGPSInfo. AsGPSInfo decodes RawPayload as an FLCGPSInfo payload. */
int dmrgo_pdu_full_link_control_as_gps_info(const dmrgo_pdu_full_link_control_t *self, dmrgo_pdu_flc_gps_info_t *p, bool *ok);
/* Go: pdu.FullLinkControl.AsGroupVoice. AsGroupVoice decodes RawPayload as an FLCGroupVoice payload. */
int dmrgo_pdu_full_link_control_as_group_voice(const dmrgo_pdu_full_link_control_t *self, dmrgo_pdu_flc_group_voice_t *p, bool *ok);
/* Go: pdu.FullLinkControl.AsTalkerAliasBlock. AsTalkerAliasBlock decodes RawPayload as an FLCTalkerAliasBlock payload. */
int dmrgo_pdu_full_link_control_as_talker_alias_block(const dmrgo_pdu_full_link_control_t *self, dmrgo_pdu_flc_talker_alias_block_t *p, bool *ok);
/* Go: pdu.FullLinkControl.AsTalkerAliasHeader. AsTalkerAliasHeader decodes RawPayload as an FLCTalkerAliasHeader payload. */
int dmrgo_pdu_full_link_control_as_talker_alias_header(const dmrgo_pdu_full_link_control_t *self, dmrgo_pdu_flc_talker_alias_header_t *p, bool *ok);
/* Go: pdu.FullLinkControl.AsTerminatorDataLinkControl. AsTerminatorDataLinkControl decodes RawPayload as an FLCTerminatorDataLinkControl payload. */
int dmrgo_pdu_full_link_control_as_terminator_data_link_control(const dmrgo_pdu_full_link_control_t *self, dmrgo_pdu_flc_terminator_data_link_control_t *p, bool *ok);
/* Go: pdu.FullLinkControl.AsUnitToUnit. AsUnitToUnit decodes RawPayload as an FLCUnitToUnit payload. */
int dmrgo_pdu_full_link_control_as_unit_to_unit(const dmrgo_pdu_full_link_control_t *self, dmrgo_pdu_flc_unit_to_unit_t *p, bool *ok);
/* Go: pdu.FullLinkControl.Bytes. Bytes returns the 72 LC bits of s packed most significant bit first, without RS(12,9) parity. It ignores BurstDataType and returns the errors that Encode returns for the fields, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_pdu_full_link_control_bytes(const dmrgo_pdu_full_link_control_t *self, uint8_t out[9]);
/* Go: pdu.FullLinkControl.Call. Call returns the call of a Grp_V_Ch_Usr (FLCO 0) or UU_V_Ch_Usr (FLCO 3) LC: group for FLCO 0, the 24-bit target and the source. */
int dmrgo_pdu_full_link_control_call(const dmrgo_pdu_full_link_control_t *self, bool *group, uint32_t *target, uint32_t *source, bool *ok);
/* Go: pdu.FullLinkControl.DataType. DataType returns BurstDataType. */
int dmrgo_pdu_full_link_control_data_type(const dmrgo_pdu_full_link_control_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.FullLinkControl.Encode. Encode encodes a FullLinkControl. */
int dmrgo_pdu_full_link_control_encode(const dmrgo_pdu_full_link_control_t *self, uint8_t out[12]);
/* Go: pdu.FullLinkControl.ServiceOptions. ServiceOptions returns the Service Options of a Grp_V_Ch_Usr (FLCO 0) or UU_V_Ch_Usr (FLCO 3) LC. */
int dmrgo_pdu_full_link_control_service_options(const dmrgo_pdu_full_link_control_t *self, dmrgo_layer3_service_options_t *so, bool *ok);
/* Go: pdu.FullLinkControl.SetAddresses. SetAddresses sets the target and source addresses of a Grp_V_Ch_Usr or UU_V_Ch_Usr LC of any FID in RawPayload. It returns DMRGO_ERR_PDU_NO_ADDRESSES for other FLCOs and a DMRGO_ERR_FIELD_RANGE when an address does not fit in 24 bits, and then changes nothing. */
int dmrgo_pdu_full_link_control_set_addresses(dmrgo_pdu_full_link_control_t *self, uint32_t target, uint32_t source);
/* Go: pdu.FullLinkControl.SetGPSInfo. SetGPSInfo makes s carry p as an FLCGPSInfo payload: it sets FLCO to DMRGO_ENUMS_FLCO_GPS_INFO, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_full_link_control_set_gps_info(dmrgo_pdu_full_link_control_t *self, const dmrgo_pdu_flc_gps_info_t *p);
/* Go: pdu.FullLinkControl.SetGroupVoice. SetGroupVoice makes s carry p as an FLCGroupVoice payload: it sets FLCO to DMRGO_ENUMS_FLCO_GROUP_VOICE_CHANNEL_USER, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_full_link_control_set_group_voice(dmrgo_pdu_full_link_control_t *self, const dmrgo_pdu_flc_group_voice_t *p);
/* Go: pdu.FullLinkControl.SetTalkerAliasBlock. SetTalkerAliasBlock makes s carry p as an FLCTalkerAliasBlock payload: it sets FLCO to flco, FID to 0 and RawPayload, and keeps the other fields. It returns DMRGO_ERR_PDU_WRONG_OPCODE when flco is not DMRGO_ENUMS_FLCO_TALKER_ALIAS_BLOCK1, DMRGO_ENUMS_FLCO_TALKER_ALIAS_BLOCK2 or DMRGO_ENUMS_FLCO_TALKER_ALIAS_BLOCK3 and a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_full_link_control_set_talker_alias_block(dmrgo_pdu_full_link_control_t *self, dmrgo_enums_flco_t flco, const dmrgo_pdu_flc_talker_alias_block_t *p);
/* Go: pdu.FullLinkControl.SetTalkerAliasHeader. SetTalkerAliasHeader makes s carry p as an FLCTalkerAliasHeader payload: it sets FLCO to DMRGO_ENUMS_FLCO_TALKER_ALIAS_HEADER, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_full_link_control_set_talker_alias_header(dmrgo_pdu_full_link_control_t *self, const dmrgo_pdu_flc_talker_alias_header_t *p);
/* Go: pdu.FullLinkControl.SetTerminatorDataLinkControl. SetTerminatorDataLinkControl makes s carry p as an FLCTerminatorDataLinkControl payload: it sets FLCO to DMRGO_ENUMS_FLCO_TERMINATOR_DATA_LINK_CONTROL, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_full_link_control_set_terminator_data_link_control(dmrgo_pdu_full_link_control_t *self, const dmrgo_pdu_flc_terminator_data_link_control_t *p);
/* Go: pdu.FullLinkControl.SetUnitToUnit. SetUnitToUnit makes s carry p as an FLCUnitToUnit payload: it sets FLCO to DMRGO_ENUMS_FLCO_UNIT_TO_UNIT_VOICE_CHANNEL_USER, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_full_link_control_set_unit_to_unit(dmrgo_pdu_full_link_control_t *self, const dmrgo_pdu_flc_unit_to_unit_t *p);
/* Go: pdu.FullLinkControl.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_full_link_control_string(const dmrgo_pdu_full_link_control_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.GenSiteParms.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_gen_site_parms_string(const dmrgo_pdu_gen_site_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.IsPRFill. IsPRFill reports whether the 96 information bits info, packed as PRFillBits returns them, are the PR FILL bits of Table D.2. */
int dmrgo_pdu_is_pr_fill(const uint8_t info[12], bool *out);
/* Go: pdu.LCBytes.Addresses. Addresses returns the 24-bit target (octets 3 to 5) and source (octets 6 to 8) addresses of a Grp_V_Ch_Usr (FLCO 0) or UU_V_Ch_Usr (FLCO 3) LC. */
int dmrgo_pdu_lc_bytes_addresses(const dmrgo_pdu_lc_bytes_t *self, uint32_t *target, uint32_t *source, bool *ok);
/* Go: pdu.LCBytes.Call. Call returns the call of a Grp_V_Ch_Usr (FLCO 0) or UU_V_Ch_Usr (FLCO 3) LC: group for FLCO 0, the 24-bit target and the source. */
int dmrgo_pdu_lc_bytes_call(const dmrgo_pdu_lc_bytes_t *self, bool *group, uint32_t *target, uint32_t *source, bool *ok);
/* Go: pdu.LCBytes.Codeword. Codeword returns the 12-octet on-air codeword of l in a burst of dt: l followed by its RS(12,9) parity XORed with the mask of dt. */
int dmrgo_pdu_lc_bytes_codeword(const dmrgo_pdu_lc_bytes_t *self, dmrgo_enums_data_type_t dt, uint8_t out[12]);
/* Go: pdu.LCBytes.FID. FID returns the Feature set ID, octet 1. */
int dmrgo_pdu_lc_bytes_fid(const dmrgo_pdu_lc_bytes_t *self, dmrgo_enums_fid_t *out);
/* Go: pdu.LCBytes.FLCO. FLCO returns the 6-bit FLCO, bits 2 to 7 of octet 0. */
int dmrgo_pdu_lc_bytes_flco(const dmrgo_pdu_lc_bytes_t *self, dmrgo_enums_flco_t *out);
/* Go: pdu.LCBytes.ProtectFlag. ProtectFlag returns the PF bit, bit 0 of octet 0. */
int dmrgo_pdu_lc_bytes_protect_flag(const dmrgo_pdu_lc_bytes_t *self, bool *out);
/* Go: pdu.LCBytes.Reserved. Reserved returns the Reserved bit, bit 1 of octet 0. */
int dmrgo_pdu_lc_bytes_reserved(const dmrgo_pdu_lc_bytes_t *self, bool *out);
/* Go: pdu.LCBytes.ServiceOptions. ServiceOptions returns octet 2, the Service Options of a Grp_V_Ch_Usr (FLCO 0) or UU_V_Ch_Usr (FLCO 3) LC. */
int dmrgo_pdu_lc_bytes_service_options(const dmrgo_pdu_lc_bytes_t *self, dmrgo_layer3_service_options_t *so, bool *ok);
/* Go: pdu.LCBytes.SetAddresses. SetAddresses writes target into octets 3 to 5 and source into octets 6 to 8 of a Grp_V_Ch_Usr or UU_V_Ch_Usr LC, whatever the FID. It returns DMRGO_ERR_PDU_NO_ADDRESSES for other FLCOs and a DMRGO_ERR_FIELD_RANGE when an address does not fit in 24 bits, and then changes nothing. */
int dmrgo_pdu_lc_bytes_set_addresses(dmrgo_pdu_lc_bytes_t *self, uint32_t target, uint32_t source);
/* Go: pdu.LCBytes.SetCall. SetCall sets the FLCO to Grp_V_Ch_Usr (0) when group is true and to UU_V_Ch_Usr (3) when it is false, and writes the target and source addresses. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when an address does not fit in 24 bits. */
int dmrgo_pdu_lc_bytes_set_call(dmrgo_pdu_lc_bytes_t *self, bool group, uint32_t target, uint32_t source);
/* Go: pdu.LCBytes.SetFID. SetFID writes fid into octet 1. */
int dmrgo_pdu_lc_bytes_set_fid(dmrgo_pdu_lc_bytes_t *self, dmrgo_enums_fid_t fid);
/* Go: pdu.LCBytes.SetFLCO. SetFLCO writes f into the FLCO and keeps the PF and Reserved bits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when f does not fit in 6 bits. */
int dmrgo_pdu_lc_bytes_set_flco(dmrgo_pdu_lc_bytes_t *self, dmrgo_enums_flco_t f);
/* Go: pdu.LCBytes.SetGroup. SetGroup sets the FLCO to Grp_V_Ch_Usr (0) when group is true and to UU_V_Ch_Usr (3) when it is false, and keeps every other bit, so the Service Options and addresses carry over. It returns DMRGO_ERR_PDU_NO_GROUP_FLAG, and changes nothing, unless the FLCO is already one of the two. */
int dmrgo_pdu_lc_bytes_set_group(dmrgo_pdu_lc_bytes_t *self, bool group);
/* Go: pdu.LCBytes.SetProtectFlag. SetProtectFlag writes the PF bit, bit 0 of octet 0. */
int dmrgo_pdu_lc_bytes_set_protect_flag(dmrgo_pdu_lc_bytes_t *self, bool pf);
/* Go: pdu.LCBytes.SetReserved. SetReserved writes the Reserved bit, bit 1 of octet 0. */
int dmrgo_pdu_lc_bytes_set_reserved(dmrgo_pdu_lc_bytes_t *self, bool r);
/* Go: pdu.LCBytes.SetServiceOptions. SetServiceOptions writes so into octet 2 of a Grp_V_Ch_Usr or UU_V_Ch_Usr LC. It returns DMRGO_ERR_PDU_NO_SERVICE_OPTIONS for other FLCOs and a NULL l, and a DMRGO_ERR_FIELD_RANGE when a field of so does not fit its bits, and then changes nothing. */
int dmrgo_pdu_lc_bytes_set_service_options(dmrgo_pdu_lc_bytes_t *self, const dmrgo_layer3_service_options_t *so);
/* Go: pdu.LocalTimeParms.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_local_time_parms_string(const dmrgo_pdu_local_time_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.MBCContinuation.BCAP. BCAP decodes the block as the BC_AP continuation of a C_BCAST MBC (ETSI TS 102 361-4 Table 7.21), as CGAP does. */
int dmrgo_pdu_mbc_continuation_bcap(const dmrgo_pdu_mbc_continuation_t *self, dmrgo_pdu_bcap_continuation_t *out);
/* Go: pdu.MBCContinuation.CGAP. CGAP decodes the block as the CG_AP continuation of a grant MBC. */
int dmrgo_pdu_mbc_continuation_cgap(const dmrgo_pdu_mbc_continuation_t *self, dmrgo_pdu_cgap_continuation_t *out);
/* Go: pdu.MBCContinuation.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_MBC_CONTINUATION. */
int dmrgo_pdu_mbc_continuation_data_type(const dmrgo_pdu_mbc_continuation_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.MBCContinuation.Encode. Encode encodes an MBCContinuation. */
int dmrgo_pdu_mbc_continuation_encode(const dmrgo_pdu_mbc_continuation_t *self, uint8_t out[12]);
/* Go: pdu.MBCContinuation.MVAP. MVAP decodes the block as the MV_AP continuation of a C_MOVE MBC (ETSI TS 102 361-4 Table 7.18), as CGAP does. */
int dmrgo_pdu_mbc_continuation_mvap(const dmrgo_pdu_mbc_continuation_t *self, dmrgo_pdu_mvap_continuation_t *out);
/* Go: pdu.MBCContinuation.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_mbc_continuation_string(const dmrgo_pdu_mbc_continuation_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.MBCContinuation.VNAP. VNAP decodes the block as the VN_AP continuation of a C_BCAST Vote_Now MBC (ETSI TS 102 361-4 Table 7.72), as CGAP does. */
int dmrgo_pdu_mbc_continuation_vnap(const dmrgo_pdu_mbc_continuation_t *self, dmrgo_pdu_vnap_continuation_t *out);
/* Go: pdu.MBCHeader.AsBroadcast. AsBroadcast decodes RawPayload as a BroadcastPDU payload. */
int dmrgo_pdu_mbc_header_as_broadcast(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_broadcast_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.AsBroadcastTalkgroupVoiceGrant. AsBroadcastTalkgroupVoiceGrant decodes RawPayload as a BroadcastTalkgroupVoiceGrantPDU payload. */
int dmrgo_pdu_mbc_header_as_broadcast_talkgroup_voice_grant(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.AsDuplexPrivateDataGrant. AsDuplexPrivateDataGrant decodes RawPayload as a DuplexPrivateDataGrantPDU payload. */
int dmrgo_pdu_mbc_header_as_duplex_private_data_grant(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_duplex_private_data_grant_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.AsDuplexPrivateVoiceGrant. AsDuplexPrivateVoiceGrant decodes RawPayload as a DuplexPrivateVoiceGrantPDU payload. */
int dmrgo_pdu_mbc_header_as_duplex_private_voice_grant(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_duplex_private_voice_grant_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.AsMove. AsMove decodes RawPayload as a MovePDU payload. */
int dmrgo_pdu_mbc_header_as_move(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_move_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.AsPrivateDataGrant. AsPrivateDataGrant decodes RawPayload as a PrivateDataGrantPDU payload. */
int dmrgo_pdu_mbc_header_as_private_data_grant(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_private_data_grant_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.AsPrivateDataGrantMultiItem. AsPrivateDataGrantMultiItem decodes RawPayload as a PrivateDataGrantMultiItemPDU payload. */
int dmrgo_pdu_mbc_header_as_private_data_grant_multi_item(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_private_data_grant_multi_item_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.AsPrivateVoiceGrant. AsPrivateVoiceGrant decodes RawPayload as a PrivateVoiceGrantPDU payload. */
int dmrgo_pdu_mbc_header_as_private_voice_grant(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_private_voice_grant_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.AsTalkgroupDataGrant. AsTalkgroupDataGrant decodes RawPayload as a TalkgroupDataGrantPDU payload. */
int dmrgo_pdu_mbc_header_as_talkgroup_data_grant(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_talkgroup_data_grant_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.AsTalkgroupDataGrantMultiItem. AsTalkgroupDataGrantMultiItem decodes RawPayload as a TalkgroupDataGrantMultiItemPDU payload. */
int dmrgo_pdu_mbc_header_as_talkgroup_data_grant_multi_item(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.AsTalkgroupVoiceGrant. AsTalkgroupVoiceGrant decodes RawPayload as a TalkgroupVoiceGrantPDU payload. */
int dmrgo_pdu_mbc_header_as_talkgroup_voice_grant(const dmrgo_pdu_mbc_header_t *self, dmrgo_pdu_talkgroup_voice_grant_pdu_t *p, bool *ok);
/* Go: pdu.MBCHeader.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_MBC_HEADER. */
int dmrgo_pdu_mbc_header_data_type(const dmrgo_pdu_mbc_header_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.MBCHeader.Encode. Encode encodes an MBCHeader. */
int dmrgo_pdu_mbc_header_encode(const dmrgo_pdu_mbc_header_t *self, uint8_t out[12]);
/* Go: pdu.MBCHeader.SetBroadcast. SetBroadcast makes s carry p as a BroadcastPDU payload: it sets Opcode to DMRGO_PDU_CSBK_BROADCAST, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_broadcast(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_broadcast_pdu_t *p);
/* Go: pdu.MBCHeader.SetBroadcastTalkgroupVoiceGrant. SetBroadcastTalkgroupVoiceGrant makes s carry p as a BroadcastTalkgroupVoiceGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_BROADCAST_TALKGROUP_VOICE_GRANT, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_broadcast_talkgroup_voice_grant(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_broadcast_talkgroup_voice_grant_pdu_t *p);
/* Go: pdu.MBCHeader.SetDuplexPrivateDataGrant. SetDuplexPrivateDataGrant makes s carry p as a DuplexPrivateDataGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_DUPLEX_PRIVATE_DATA_GRANT, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_duplex_private_data_grant(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_duplex_private_data_grant_pdu_t *p);
/* Go: pdu.MBCHeader.SetDuplexPrivateVoiceGrant. SetDuplexPrivateVoiceGrant makes s carry p as a DuplexPrivateVoiceGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_DUPLEX_PRIVATE_VOICE_GRANT, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_duplex_private_voice_grant(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_duplex_private_voice_grant_pdu_t *p);
/* Go: pdu.MBCHeader.SetMove. SetMove makes s carry p as a MovePDU payload: it sets Opcode to DMRGO_PDU_CSBK_MOVE, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_move(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_move_pdu_t *p);
/* Go: pdu.MBCHeader.SetPrivateDataGrant. SetPrivateDataGrant makes s carry p as a PrivateDataGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_PRIVATE_DATA_GRANT, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_private_data_grant(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_private_data_grant_pdu_t *p);
/* Go: pdu.MBCHeader.SetPrivateDataGrantMultiItem. SetPrivateDataGrantMultiItem makes s carry p as a PrivateDataGrantMultiItemPDU payload: it sets Opcode to DMRGO_PDU_CSBK_PRIVATE_DATA_GRANT_MULTI_ITEM, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_private_data_grant_multi_item(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_private_data_grant_multi_item_pdu_t *p);
/* Go: pdu.MBCHeader.SetPrivateVoiceGrant. SetPrivateVoiceGrant makes s carry p as a PrivateVoiceGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_PRIVATE_VOICE_GRANT, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_private_voice_grant(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_private_voice_grant_pdu_t *p);
/* Go: pdu.MBCHeader.SetTalkgroupDataGrant. SetTalkgroupDataGrant makes s carry p as a TalkgroupDataGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_TALKGROUP_DATA_GRANT, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_talkgroup_data_grant(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_talkgroup_data_grant_pdu_t *p);
/* Go: pdu.MBCHeader.SetTalkgroupDataGrantMultiItem. SetTalkgroupDataGrantMultiItem makes s carry p as a TalkgroupDataGrantMultiItemPDU payload: it sets Opcode to DMRGO_PDU_CSBK_TALKGROUP_DATA_GRANT_MULTI_ITEM, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_talkgroup_data_grant_multi_item(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_t *p);
/* Go: pdu.MBCHeader.SetTalkgroupVoiceGrant. SetTalkgroupVoiceGrant makes s carry p as a TalkgroupVoiceGrantPDU payload: it sets Opcode to DMRGO_PDU_CSBK_TALKGROUP_VOICE_GRANT, FID to 0 and RawPayload, and keeps the other fields. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_mbc_header_set_talkgroup_voice_grant(dmrgo_pdu_mbc_header_t *self, const dmrgo_pdu_talkgroup_voice_grant_pdu_t *p);
/* Go: pdu.MBCHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_mbc_header_string(const dmrgo_pdu_mbc_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.MBCLastBlockCRCOK. MBCLastBlockCRCOK reports whether bits 80 to 95 of the last of blocks hold the last-block CRC-CCITT that SetMBCLastBlockCRC writes. */
int dmrgo_pdu_mbc_last_block_crc_ok(const uint8_t (*blocks)[12], size_t blocks_len, bool *out);
/* Go: pdu.MVAPContinuation.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_MBC_CONTINUATION. */
int dmrgo_pdu_mvap_continuation_data_type(const dmrgo_pdu_mvap_continuation_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.MVAPContinuation.Encode. Encode encodes an MVAPContinuation. */
int dmrgo_pdu_mvap_continuation_encode(const dmrgo_pdu_mvap_continuation_t *self, uint8_t out[12]);
/* Go: pdu.MVAPContinuation.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_mvap_continuation_string(const dmrgo_pdu_mvap_continuation_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.MaintenancePDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_maintenance sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_maintenance_pdu_csbk(const dmrgo_pdu_maintenance_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.MaintenancePDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_maintenance_pdu_string(const dmrgo_pdu_maintenance_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.MassRegParms.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_mass_reg_parms_string(const dmrgo_pdu_mass_reg_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.MotorolaCallAlertAckPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_motorola_call_alert_ack sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_motorola_call_alert_ack_pdu_csbk(const dmrgo_pdu_motorola_call_alert_ack_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.MotorolaCallAlertAckPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_motorola_call_alert_ack_pdu_string(const dmrgo_pdu_motorola_call_alert_ack_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.MotorolaCallAlertPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_motorola_call_alert sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_motorola_call_alert_pdu_csbk(const dmrgo_pdu_motorola_call_alert_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.MotorolaCallAlertPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_motorola_call_alert_pdu_string(const dmrgo_pdu_motorola_call_alert_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.MotorolaRadioCheckPDU.Addresses. Addresses returns the target and source of the CSBK that carries p: the checked radio and the requester for a request, and the reverse for an answer. */
int dmrgo_pdu_motorola_radio_check_pdu_addresses(const dmrgo_pdu_motorola_radio_check_pdu_t *self, uint32_t *target, uint32_t *source, bool *ok);
/* Go: pdu.MotorolaRadioCheckPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_motorola_radio_check sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_motorola_radio_check_pdu_csbk(const dmrgo_pdu_motorola_radio_check_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.MotorolaRadioCheckPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_motorola_radio_check_pdu_string(const dmrgo_pdu_motorola_radio_check_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.MovePDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_move sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_move_pdu_csbk(const dmrgo_pdu_move_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.MovePDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_move sets it, with the other fields zero. */
int dmrgo_pdu_move_pdu_mbc_header(const dmrgo_pdu_move_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.MovePDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_move_pdu_string(const dmrgo_pdu_move_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.NegativeAcknowledgementPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_negative_acknowledgement sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_negative_acknowledgement_pdu_csbk(const dmrgo_pdu_negative_acknowledgement_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.NegativeAcknowledgementPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_negative_acknowledgement_pdu_string(const dmrgo_pdu_negative_acknowledgement_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.NetworkModel.NetBits. NetBits returns the width of the NET field for the model. It returns a DMRGO_ERR_FIELD_RANGE when m does not fit in 2 bits. */
int dmrgo_pdu_network_model_net_bits(dmrgo_pdu_network_model_t self, int64_t *out);
/* Go: pdu.NetworkModel.SiteBits. SiteBits returns the width of the SITE field for the model, with the errors of NetBits. */
int dmrgo_pdu_network_model_site_bits(dmrgo_pdu_network_model_t self, int64_t *out);
/* Go: pdu.NewBSOutboundActivation. NewBSOutboundActivation returns the BS_Dwn_Act CSBK, with LastBlock set, that an MS sends to wake up the BS with address bs. It returns a DMRGO_ERR_FIELD_RANGE when an address does not fit in 24 bits. */
int dmrgo_pdu_new_bs_outbound_activation(uint32_t bs, uint32_t source, dmrgo_pdu_csbk_t *out);
/* Go: pdu.NewVoiceLC. NewVoiceLC returns the DMRGO_ENUMS_DATA_TYPE_VOICE_LC_HEADER standard FID Full LC of a voice call: Grp_V_Ch_Usr when group is true, else UU_V_Ch_Usr, with Service Options so. It returns a DMRGO_ERR_FIELD_RANGE when an address does not fit in 24 bits. */
int dmrgo_pdu_new_voice_lc(bool group, uint32_t target, uint32_t source, const dmrgo_layer3_service_options_t *so, dmrgo_pdu_full_link_control_t *out);
/* Go: pdu.NewVoiceLCBytes. NewVoiceLCBytes returns the LC octets of the voice call LC that NewVoiceLC returns: octet 0 holds the FLCO with PF and Reserved clear, octet 1 the standard FID, octet 2 the octet of dmrgo_layer3_service_options_encode on so and octets 3 to 8 the addresses. It returns a DMRGO_ERR_FIELD_RANGE when an address does not fit in 24 bits or a field of so does not fit its bits. */
int dmrgo_pdu_new_voice_lc_bytes(bool group, uint32_t target, uint32_t source, const dmrgo_layer3_service_options_t *so, dmrgo_pdu_lc_bytes_t *out);
/* Go: pdu.PIHeader.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_PI_HEADER. */
int dmrgo_pdu_pi_header_data_type(const dmrgo_pdu_pi_header_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.PIHeader.Encode. Encode encodes a PIHeader. */
int dmrgo_pdu_pi_header_encode(const dmrgo_pdu_pi_header_t *self, uint8_t out[12]);
/* Go: pdu.PIHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_pi_header_string(const dmrgo_pdu_pi_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.PRFill.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_IDLE. */
int dmrgo_pdu_pr_fill_data_type(const dmrgo_pdu_pr_fill_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.PRFill.Encode. Encode returns PRFillBits and DMRGO_OK. */
int dmrgo_pdu_pr_fill_encode(const dmrgo_pdu_pr_fill_t *self, uint8_t out[12]);
/* Go: pdu.PRFill.String. String returns a string representation of the PR FILL PDU. */
int dmrgo_pdu_pr_fill_string(const dmrgo_pdu_pr_fill_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.PRFillBits. PRFillBits returns a copy of the 96 pseudo-random fill bits from Table D.2, packed, the first bit in the most significant bit of byte 0. */
int dmrgo_pdu_pr_fill_bits(uint8_t out[12]);
/* Go: pdu.PreamblePDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_preamble sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_preamble_pdu_csbk(const dmrgo_pdu_preamble_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.PreamblePDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_preamble_pdu_string(const dmrgo_pdu_preamble_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.PrivateDataGrantMultiItemPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_private_data_grant_multi_item sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_private_data_grant_multi_item_pdu_csbk(const dmrgo_pdu_private_data_grant_multi_item_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.PrivateDataGrantMultiItemPDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_private_data_grant_multi_item sets it, with the other fields zero. */
int dmrgo_pdu_private_data_grant_multi_item_pdu_mbc_header(const dmrgo_pdu_private_data_grant_multi_item_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.PrivateDataGrantMultiItemPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_private_data_grant_multi_item_pdu_string(const dmrgo_pdu_private_data_grant_multi_item_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.PrivateDataGrantPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_private_data_grant sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_private_data_grant_pdu_csbk(const dmrgo_pdu_private_data_grant_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.PrivateDataGrantPDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_private_data_grant sets it, with the other fields zero. */
int dmrgo_pdu_private_data_grant_pdu_mbc_header(const dmrgo_pdu_private_data_grant_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.PrivateDataGrantPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_private_data_grant_pdu_string(const dmrgo_pdu_private_data_grant_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.PrivateVoiceGrantPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_private_voice_grant sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_private_voice_grant_pdu_csbk(const dmrgo_pdu_private_voice_grant_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.PrivateVoiceGrantPDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_private_voice_grant sets it, with the other fields zero. */
int dmrgo_pdu_private_voice_grant_pdu_mbc_header(const dmrgo_pdu_private_voice_grant_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.PrivateVoiceGrantPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_private_voice_grant_pdu_string(const dmrgo_pdu_private_voice_grant_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ProprietaryHeader.DataHeader. DataHeader returns the DataHeader that carries s, as dmrgo_pdu_data_header_set_proprietary sets it, with the other fields zero. */
int dmrgo_pdu_proprietary_header_data_header(const dmrgo_pdu_proprietary_header_t *self, dmrgo_pdu_data_header_t *out);
/* Go: pdu.ProprietaryHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_proprietary_header_string(const dmrgo_pdu_proprietary_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ProtectPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_protect sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_protect_pdu_csbk(const dmrgo_pdu_protect_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.ProtectPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_protect_pdu_string(const dmrgo_pdu_protect_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.RandomAccessPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_random_access sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_random_access_pdu_csbk(const dmrgo_pdu_random_access_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.RandomAccessPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_random_access_pdu_string(const dmrgo_pdu_random_access_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.Rate12Data.ConfirmedCRC9. ConfirmedCRC9 returns the received (masked) CRC-9 of a confirmed block. */
int dmrgo_pdu_rate12_data_confirmed_crc9(const dmrgo_pdu_rate12_data_t *self, uint16_t *out);
/* Go: pdu.Rate12Data.ConfirmedCRC9OK. ConfirmedCRC9OK reports whether the CRC-9 of a confirmed block is valid. */
int dmrgo_pdu_rate12_data_confirmed_crc9_ok(const dmrgo_pdu_rate12_data_t *self, bool *out);
/* Go: pdu.Rate12Data.ConfirmedDBSN. ConfirmedDBSN returns the Data Block Serial Number of a confirmed block. */
int dmrgo_pdu_rate12_data_confirmed_dbsn(const dmrgo_pdu_rate12_data_t *self, uint8_t *out);
/* Go: pdu.Rate12Data.ConfirmedUserData. ConfirmedUserData returns the 10 user data octets of a confirmed block. */
int dmrgo_pdu_rate12_data_confirmed_user_data(const dmrgo_pdu_rate12_data_t *self, uint8_t out[10]);
/* Go: pdu.Rate12Data.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_RATE12. */
int dmrgo_pdu_rate12_data_data_type(const dmrgo_pdu_rate12_data_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.Rate12Data.Encode. Encode encodes a Rate12Data. */
int dmrgo_pdu_rate12_data_encode(const dmrgo_pdu_rate12_data_t *self, uint8_t out[12]);
/* Go: pdu.Rate12Data.SetConfirmed. SetConfirmed fills Data as a confirmed block (Table 9.15A) and computes the masked CRC-9. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when dbsn does not fit in 7 bits. */
int dmrgo_pdu_rate12_data_set_confirmed(dmrgo_pdu_rate12_data_t *self, uint8_t dbsn, const uint8_t user_data[10]);
/* Go: pdu.Rate12Data.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_rate12_data_string(const dmrgo_pdu_rate12_data_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.Rate1Data.ConfirmedCRC9. ConfirmedCRC9 returns the received (masked) CRC-9 of a confirmed block. */
int dmrgo_pdu_rate1_data_confirmed_crc9(const dmrgo_pdu_rate1_data_t *self, uint16_t *out);
/* Go: pdu.Rate1Data.ConfirmedCRC9OK. ConfirmedCRC9OK reports whether the CRC-9 of a confirmed block is valid. */
int dmrgo_pdu_rate1_data_confirmed_crc9_ok(const dmrgo_pdu_rate1_data_t *self, bool *out);
/* Go: pdu.Rate1Data.ConfirmedDBSN. ConfirmedDBSN returns the Data Block Serial Number of a confirmed block. */
int dmrgo_pdu_rate1_data_confirmed_dbsn(const dmrgo_pdu_rate1_data_t *self, uint8_t *out);
/* Go: pdu.Rate1Data.ConfirmedUserData. ConfirmedUserData returns the 22 user data octets of a confirmed block. */
int dmrgo_pdu_rate1_data_confirmed_user_data(const dmrgo_pdu_rate1_data_t *self, uint8_t out[22]);
/* Go: pdu.Rate1Data.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_RATE1. */
int dmrgo_pdu_rate1_data_data_type(const dmrgo_pdu_rate1_data_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.Rate1Data.Encode. Encode encodes a Rate1Data. */
int dmrgo_pdu_rate1_data_encode(const dmrgo_pdu_rate1_data_t *self, uint8_t out[24]);
/* Go: pdu.Rate1Data.SetConfirmed. SetConfirmed fills Data as a confirmed block (Table 9.18) and computes the masked CRC-9. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when dbsn does not fit in 7 bits. */
int dmrgo_pdu_rate1_data_set_confirmed(dmrgo_pdu_rate1_data_t *self, uint8_t dbsn, const uint8_t user_data[22]);
/* Go: pdu.Rate1Data.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_rate1_data_string(const dmrgo_pdu_rate1_data_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.Rate34Data.ConfirmedCRC9. ConfirmedCRC9 returns the received (masked) CRC-9 of a confirmed block. */
int dmrgo_pdu_rate34_data_confirmed_crc9(const dmrgo_pdu_rate34_data_t *self, uint16_t *out);
/* Go: pdu.Rate34Data.ConfirmedCRC9OK. ConfirmedCRC9OK reports whether the CRC-9 of a confirmed block is valid. */
int dmrgo_pdu_rate34_data_confirmed_crc9_ok(const dmrgo_pdu_rate34_data_t *self, bool *out);
/* Go: pdu.Rate34Data.ConfirmedDBSN. ConfirmedDBSN returns the Data Block Serial Number of a confirmed block. */
int dmrgo_pdu_rate34_data_confirmed_dbsn(const dmrgo_pdu_rate34_data_t *self, uint8_t *out);
/* Go: pdu.Rate34Data.ConfirmedUserData. ConfirmedUserData returns the 16 user data octets of a confirmed block. */
int dmrgo_pdu_rate34_data_confirmed_user_data(const dmrgo_pdu_rate34_data_t *self, uint8_t out[16]);
/* Go: pdu.Rate34Data.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_RATE34. */
int dmrgo_pdu_rate34_data_data_type(const dmrgo_pdu_rate34_data_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.Rate34Data.Encode. Encode encodes a Rate34Data. */
int dmrgo_pdu_rate34_data_encode(const dmrgo_pdu_rate34_data_t *self, uint8_t out[18]);
/* Go: pdu.Rate34Data.SetConfirmed. SetConfirmed fills Data as a confirmed block (Table 9.11) and computes the masked CRC-9. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when dbsn does not fit in 7 bits. */
int dmrgo_pdu_rate34_data_set_confirmed(dmrgo_pdu_rate34_data_t *self, uint8_t dbsn, const uint8_t user_data[16]);
/* Go: pdu.Rate34Data.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_rate34_data_string(const dmrgo_pdu_rate34_data_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.RawDataHeader.DataHeader. DataHeader returns the DataHeader that carries s, as dmrgo_pdu_data_header_set_raw_data sets it, with the other fields zero. */
int dmrgo_pdu_raw_data_header_data_header(const dmrgo_pdu_raw_data_header_t *self, dmrgo_pdu_data_header_t *out);
/* Go: pdu.RawDataHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_raw_data_header_string(const dmrgo_pdu_raw_data_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.RegWindowTime. RegWindowTime returns TReg_Window, the time in which an MS makes its registration for the Reg_Window w, and false for 0, which cancels the mass registration, or a w over 15 (ETSI TS 102 361-4 clause 6.4.5.1, Table 6.12). */
int dmrgo_pdu_reg_window_time(uint8_t w, dmrgo_duration_t *duration, bool *ok);
/* Go: pdu.ResponsePacketHeader.DataHeader. DataHeader returns the DataHeader that carries s, as dmrgo_pdu_data_header_set_response sets it, with the other fields zero. */
int dmrgo_pdu_response_packet_header_data_header(const dmrgo_pdu_response_packet_header_t *self, dmrgo_pdu_data_header_t *out);
/* Go: pdu.ResponsePacketHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_response_packet_header_string(const dmrgo_pdu_response_packet_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ReverseChannel.Encode. Encode encodes an RC PDU into its 11 information bits: the 4-bit RC command and the CRC-7 masked with DMRGO_PDU_CRC7_MASK_RC, packed as DecodeReverseChannel takes them, with the low 5 bits of byte 1 0. */
int dmrgo_pdu_reverse_channel_encode(const dmrgo_pdu_reverse_channel_t *self, uint8_t out[2]);
/* Go: pdu.ReverseChannel.String. String returns a human-readable string representation of the RC PDU. */
int dmrgo_pdu_reverse_channel_string(const dmrgo_pdu_reverse_channel_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.Seal. Seal rewrites the check bits of the BPTC(196,96) payload p of a burst of dt: the masked RS(12,9) parity in octets 9 to 11 for a Voice LC Header or Terminator with LC, and the masked CRC-CCITT of octets 0 to 9 in octets 10 and 11 for a PI Header, CSBK, MBC Header, Data Header or USBD. For other data types it returns an error that wraps DMRGO_ERR_PDU_NO_BLOCK_CRC, and for a NULL p DMRGO_ERR_NIL_ARGUMENT, and leaves p unchanged. p may be NULL. */
int dmrgo_pdu_seal(uint8_t p[12], dmrgo_enums_data_type_t dt);
/* Go: pdu.ServiceType.String. String returns a human-readable name for a ServiceType. */
int dmrgo_pdu_service_type_string(dmrgo_pdu_service_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.SetMBCLastBlockCRC. SetMBCLastBlockCRC writes the last-block CRC-CCITT into bits 80 to 95 of the last of blocks, which holds every continuation block of the MBC in order, packed as MBCLastBlockCRCOK takes them. */
int dmrgo_pdu_set_mbc_last_block_crc(uint8_t (*blocks)[12], size_t blocks_len);
/* Go: pdu.ShortLC.AsActivityUpdate. AsActivityUpdate decodes RawPayload as a ShortLCActivityUpdate payload. */
int dmrgo_pdu_short_lc_as_activity_update(const dmrgo_pdu_short_lc_t *self, dmrgo_pdu_short_lc_activity_update_t *p, bool *ok);
/* Go: pdu.ShortLC.AsCSysParms. AsCSysParms decodes RawPayload as a ShortLCCSysParms payload. */
int dmrgo_pdu_short_lc_as_c_sys_parms(const dmrgo_pdu_short_lc_t *self, dmrgo_pdu_short_lc_c_sys_parms_t *p, bool *ok);
/* Go: pdu.ShortLC.AsCapacityPlusRestChannel. AsCapacityPlusRestChannel decodes the RawPayload of a Capacity Plus rest channel Short LC. */
int dmrgo_pdu_short_lc_as_capacity_plus_rest_channel(const dmrgo_pdu_short_lc_t *self, dmrgo_pdu_capacity_plus_rest_channel_t *p, bool *ok);
/* Go: pdu.ShortLC.AsNullMessage. AsNullMessage decodes RawPayload as a ShortLCNullMessage payload. */
int dmrgo_pdu_short_lc_as_null_message(const dmrgo_pdu_short_lc_t *self, dmrgo_pdu_short_lc_null_message_t *p, bool *ok);
/* Go: pdu.ShortLC.AsPSysParms. AsPSysParms decodes RawPayload as a ShortLCPSysParms payload. */
int dmrgo_pdu_short_lc_as_p_sys_parms(const dmrgo_pdu_short_lc_t *self, dmrgo_pdu_short_lc_p_sys_parms_t *p, bool *ok);
/* Go: pdu.ShortLC.Encode. Encode encodes a ShortLC. */
int dmrgo_pdu_short_lc_encode(const dmrgo_pdu_short_lc_t *self, uint8_t out[5]);
/* Go: pdu.ShortLC.SetActivityUpdate. SetActivityUpdate makes s carry p as a ShortLCActivityUpdate payload: it sets SLCO to DMRGO_ENUMS_SLCO_ACTIVITY_UPDATE and RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_short_lc_set_activity_update(dmrgo_pdu_short_lc_t *self, const dmrgo_pdu_short_lc_activity_update_t *p);
/* Go: pdu.ShortLC.SetCSysParms. SetCSysParms makes s carry p as a ShortLCCSysParms payload: it sets SLCO to DMRGO_ENUMS_SLCO_C_SYS_PARMS and RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_short_lc_set_c_sys_parms(dmrgo_pdu_short_lc_t *self, const dmrgo_pdu_short_lc_c_sys_parms_t *p);
/* Go: pdu.ShortLC.SetNullMessage. SetNullMessage makes s carry p as a ShortLCNullMessage payload: it sets SLCO to DMRGO_ENUMS_SLCO_NULL_MESSAGE and RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_short_lc_set_null_message(dmrgo_pdu_short_lc_t *self, const dmrgo_pdu_short_lc_null_message_t *p);
/* Go: pdu.ShortLC.SetPSysParms. SetPSysParms makes s carry p as a ShortLCPSysParms payload: it sets SLCO to DMRGO_ENUMS_SLCO_P_SYS_PARMS and RawPayload, and keeps FEC. It returns a DMRGO_ERR_FIELD_RANGE when a field of p does not fit its bits, and then leaves s as it is. */
int dmrgo_pdu_short_lc_set_p_sys_parms(dmrgo_pdu_short_lc_t *self, const dmrgo_pdu_short_lc_p_sys_parms_t *p);
/* Go: pdu.ShortLC.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_short_lc_string(const dmrgo_pdu_short_lc_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ShortLCActivityUpdate.ShortLC. ShortLC returns the ShortLC that carries s, as dmrgo_pdu_short_lc_set_activity_update sets it, with the other fields zero. */
int dmrgo_pdu_short_lc_activity_update_short_lc(const dmrgo_pdu_short_lc_activity_update_t *self, dmrgo_pdu_short_lc_t *out);
/* Go: pdu.ShortLCActivityUpdate.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_short_lc_activity_update_string(const dmrgo_pdu_short_lc_activity_update_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ShortLCCSysParms.NetID. NetID returns the network ID based on the MODEL field: Tiny 9 bits, Small 7 bits, Large 4 bits, Huge 2 bits. It returns a DMRGO_ERR_FIELD_RANGE when MODEL or NetSiteRaw does not fit its bits. */
int dmrgo_pdu_short_lc_c_sys_parms_net_id(const dmrgo_pdu_short_lc_c_sys_parms_t *self, uint16_t *out);
/* Go: pdu.ShortLCCSysParms.SetSysCode. SetSysCode sets MODEL and NetSiteRaw from c. */
int dmrgo_pdu_short_lc_c_sys_parms_set_sys_code(dmrgo_pdu_short_lc_c_sys_parms_t *self, const dmrgo_pdu_sys_code_t *c);
/* Go: pdu.ShortLCCSysParms.ShortLC. ShortLC returns the ShortLC that carries s, as dmrgo_pdu_short_lc_set_c_sys_parms sets it, with the other fields zero. */
int dmrgo_pdu_short_lc_c_sys_parms_short_lc(const dmrgo_pdu_short_lc_c_sys_parms_t *self, dmrgo_pdu_short_lc_t *out);
/* Go: pdu.ShortLCCSysParms.SiteID. SiteID returns the site ID based on the MODEL field: Tiny 3 bits, Small 5 bits, Large 8 bits, Huge 10 bits. */
int dmrgo_pdu_short_lc_c_sys_parms_site_id(const dmrgo_pdu_short_lc_c_sys_parms_t *self, uint16_t *out);
/* Go: pdu.ShortLCCSysParms.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_short_lc_c_sys_parms_string(const dmrgo_pdu_short_lc_c_sys_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ShortLCCSysParms.SysCode. SysCode returns the MODEL, NET and SITE carried in the C_SYS_Parms. It returns a DMRGO_ERR_FIELD_RANGE when MODEL or NetSiteRaw does not fit its bits. */
int dmrgo_pdu_short_lc_c_sys_parms_sys_code(const dmrgo_pdu_short_lc_c_sys_parms_t *self, dmrgo_pdu_sys_code_t *out);
/* Go: pdu.ShortLCNullMessage.ShortLC. ShortLC returns the ShortLC that carries s, as dmrgo_pdu_short_lc_set_null_message sets it, with the other fields zero. */
int dmrgo_pdu_short_lc_null_message_short_lc(const dmrgo_pdu_short_lc_null_message_t *self, dmrgo_pdu_short_lc_t *out);
/* Go: pdu.ShortLCNullMessage.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_short_lc_null_message_string(const dmrgo_pdu_short_lc_null_message_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ShortLCPSysParms.NetID. NetID returns the network ID based on the MODEL field (ETSI TS 102 361-4 Table 6.5), with the errors of dmrgo_pdu_short_lc_c_sys_parms_net_id. */
int dmrgo_pdu_short_lc_p_sys_parms_net_id(const dmrgo_pdu_short_lc_p_sys_parms_t *self, uint16_t *out);
/* Go: pdu.ShortLCPSysParms.SetSysCode. SetSysCode sets MODEL and NetSiteRaw from c. */
int dmrgo_pdu_short_lc_p_sys_parms_set_sys_code(dmrgo_pdu_short_lc_p_sys_parms_t *self, const dmrgo_pdu_sys_code_t *c);
/* Go: pdu.ShortLCPSysParms.ShortLC. ShortLC returns the ShortLC that carries s, as dmrgo_pdu_short_lc_set_p_sys_parms sets it, with the other fields zero. */
int dmrgo_pdu_short_lc_p_sys_parms_short_lc(const dmrgo_pdu_short_lc_p_sys_parms_t *self, dmrgo_pdu_short_lc_t *out);
/* Go: pdu.ShortLCPSysParms.SiteID. SiteID returns the site ID based on the MODEL field (ETSI TS 102 361-4 Table 6.5), with the errors of dmrgo_pdu_short_lc_c_sys_parms_net_id. */
int dmrgo_pdu_short_lc_p_sys_parms_site_id(const dmrgo_pdu_short_lc_p_sys_parms_t *self, uint16_t *out);
/* Go: pdu.ShortLCPSysParms.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_short_lc_p_sys_parms_string(const dmrgo_pdu_short_lc_p_sys_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.ShortLCPSysParms.SysCode. SysCode returns the MODEL, NET and SITE carried in the P_SYS_Parms, with the errors of dmrgo_pdu_short_lc_c_sys_parms_sys_code. */
int dmrgo_pdu_short_lc_p_sys_parms_sys_code(const dmrgo_pdu_short_lc_p_sys_parms_t *self, dmrgo_pdu_sys_code_t *out);
/* Go: pdu.SlotType.Encode. Encode encodes a SlotType. */
int dmrgo_pdu_slot_type_encode(const dmrgo_pdu_slot_type_t *self, uint8_t out[3]);
/* Go: pdu.SlotType.Info. Info returns the information bits of s as a SlotTypeInfo: the color code and the data type. */
int dmrgo_pdu_slot_type_info(const dmrgo_pdu_slot_type_t *self, dmrgo_pdu_slot_type_info_t *out);
/* Go: pdu.SlotType.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_slot_type_string(const dmrgo_pdu_slot_type_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.SlotTypeInfo.Codeword. Codeword returns the 20-bit Golay(20,8) codeword of s in the low 20 bits: the 8 information bits followed by the 12 parity bits, first bit most significant (ETSI TS 102 361-1 clause B.3.1). */
int dmrgo_pdu_slot_type_info_codeword(dmrgo_pdu_slot_type_info_t self, uint32_t *out);
/* Go: pdu.SlotTypeInfo.ColorCode. ColorCode returns the 4-bit color code, the high 4 bits. */
int dmrgo_pdu_slot_type_info_color_code(dmrgo_pdu_slot_type_info_t self, dmrgo_enums_color_code_t *out);
/* Go: pdu.SlotTypeInfo.DataType. DataType returns the Data Type, the low 4 bits. */
int dmrgo_pdu_slot_type_info_data_type(dmrgo_pdu_slot_type_info_t self, dmrgo_enums_data_type_t *out);
/* Go: pdu.SlotTypeInfo.SetColorCode. SetColorCode writes cc into the high 4 bits. */
int dmrgo_pdu_slot_type_info_set_color_code(dmrgo_pdu_slot_type_info_t *self, dmrgo_enums_color_code_t cc);
/* Go: pdu.SlotTypeInfo.SetDataType. SetDataType writes dt into the low 4 bits. */
int dmrgo_pdu_slot_type_info_set_data_type(dmrgo_pdu_slot_type_info_t *self, dmrgo_enums_data_type_t dt);
/* Go: pdu.SlotTypeInfo.SlotType. SlotType returns the fields of s as a SlotType with a zero FEC result. */
int dmrgo_pdu_slot_type_info_slot_type(dmrgo_pdu_slot_type_info_t self, dmrgo_pdu_slot_type_t *out);
/* Go: pdu.StatusPrecodedHeader.DataHeader. DataHeader returns the DataHeader that carries s, as dmrgo_pdu_data_header_set_status_precoded sets it, with the other fields zero. */
int dmrgo_pdu_status_precoded_header_data_header(const dmrgo_pdu_status_precoded_header_t *self, dmrgo_pdu_data_header_t *out);
/* Go: pdu.StatusPrecodedHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_status_precoded_header_string(const dmrgo_pdu_status_precoded_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.SysCode.NetSite. NetSite returns the 12 NET and SITE bits as in the NetSiteRaw field of ShortLCCSysParms and ShortLCPSysParms. */
int dmrgo_pdu_sys_code_net_site(const dmrgo_pdu_sys_code_t *self, uint16_t *out);
/* Go: pdu.SysCode.Pack. Pack returns the 16-bit C_SYScode, as in the SysIdentCode field of C_ALOHA and C_BCAST. It returns a DMRGO_ERR_FIELD_RANGE when a field does not fit its bits. */
int dmrgo_pdu_sys_code_pack(const dmrgo_pdu_sys_code_t *self, uint16_t *out);
/* Go: pdu.SysCode.Pack14. Pack14 returns the 14 most significant bits of the C_SYScode, the form in the CACH Short LC. */
int dmrgo_pdu_sys_code_pack14(const dmrgo_pdu_sys_code_t *self, uint16_t *out);
/* Go: pdu.SysCode.Unpack. Unpack sets s to the fields of the 16-bit C_SYScode v. The call sets all of *self and does not read it. */
int dmrgo_pdu_sys_code_unpack(dmrgo_pdu_sys_code_t *self, uint16_t v);
/* Go: pdu.SysCode.Unpack14. Unpack14 sets s to the fields of the 14-bit CACH form v of a C_SYScode, with Par 0. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit in 14 bits. */
int dmrgo_pdu_sys_code_unpack14(dmrgo_pdu_sys_code_t *self, uint16_t v);
/* Go: pdu.TACT.Encode. Encode encodes a TACT. */
int dmrgo_pdu_tact_encode(const dmrgo_pdu_tact_t *self, uint8_t out[1]);
/* Go: pdu.TACT.Slot. Slot returns the TDMA channel that TDMAChannel gives for the next outbound burst: DMRGO_ENUMS_SLOT2 when it is set, else DMRGO_ENUMS_SLOT1, in the form that dmrgo_bs_cach_next takes. */
int dmrgo_pdu_tact_slot(const dmrgo_pdu_tact_t *self, dmrgo_enums_slot_t *out);
/* Go: pdu.TACT.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_tact_string(const dmrgo_pdu_tact_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.TalkerAlias. TalkerAlias returns the alias carried by a Talker Alias header and its blocks, given in order block 1, 2, 3, without the NUL Code Units at the end of the Talker Alias Data Length of the header (ETSI TS 102 361-2 clause 7.2.19). It returns DMRGO_ERR_NIL_ARGUMENT for a NULL header, DMRGO_ERR_PDU_TALKER_ALIAS_INCOMPLETE when fewer blocks are given or a block is NULL, and DMRGO_ERR_PDU_TALKER_ALIAS_INVALID_UTF8, with the alias, when the Code Units of the UTF-8 format are not valid UTF-8. header may be NULL. */
int dmrgo_pdu_talker_alias(const dmrgo_pdu_flc_talker_alias_header_t *header, const dmrgo_pdu_flc_talker_alias_block_t *blocks, size_t blocks_len, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_pdu_talker_alias_assembler_new makes a zero dmrgo_pdu_talker_alias_assembler_t. */
int dmrgo_pdu_talker_alias_assembler_new(dmrgo_pdu_talker_alias_assembler_t **out);
/* dmrgo_pdu_talker_alias_assembler_free frees the handle. self may be NULL. */
int dmrgo_pdu_talker_alias_assembler_free(dmrgo_pdu_talker_alias_assembler_t *self);
/* dmrgo_pdu_talker_alias_assembler_add_need sets *items and *arena to the room that dmrgo_pdu_talker_alias_assembler_add needs for these arguments, without a change to the handle. */
int dmrgo_pdu_talker_alias_assembler_add_need(dmrgo_pdu_talker_alias_assembler_t *self, const dmrgo_pdu_full_link_control_t *lc, size_t *items, size_t *arena);
/* Go: pdu.TalkerAliasAssembler.Add. Add adds a Full LC. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_pdu_talker_alias_assembler_add_need gives (DMRGO_PDU_TALKER_ALIAS_ASSEMBLER_ADD_MAX_ITEMS items). lc may be NULL. */
int dmrgo_pdu_talker_alias_assembler_add(dmrgo_pdu_talker_alias_assembler_t *self, const dmrgo_pdu_full_link_control_t *lc, char *alias, size_t alias_cap, size_t *alias_len, size_t *alias_need, bool *ok);
/* Go: pdu.TalkerAliasAssembler.AddInto. AddInto adds lc as Add does, and writes the alias that Add returns to dst as UTF-8 instead of returning it as a string. lc may be NULL. */
int dmrgo_pdu_talker_alias_assembler_add_into(dmrgo_pdu_talker_alias_assembler_t *self, uint8_t dst[93], const dmrgo_pdu_full_link_control_t *lc, int64_t *n, bool *ok);
/* dmrgo_pdu_talker_alias_assembler_append_add_need sets *items and *arena to the room that dmrgo_pdu_talker_alias_assembler_append_add needs for these arguments, without a change to the handle. */
int dmrgo_pdu_talker_alias_assembler_append_add_need(dmrgo_pdu_talker_alias_assembler_t *self, const dmrgo_pdu_full_link_control_t *lc, size_t *items, size_t *arena);
/* Go: pdu.TalkerAliasAssembler.AppendAdd. AppendAdd adds lc as Add does, and appends the alias that Add returns to dst as UTF-8 instead of returning it as a string. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_pdu_talker_alias_assembler_append_add_need gives (DMRGO_PDU_TALKER_ALIAS_ASSEMBLER_APPEND_ADD_MAX_ITEMS items). lc may be NULL. */
int dmrgo_pdu_talker_alias_assembler_append_add(dmrgo_pdu_talker_alias_assembler_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_pdu_full_link_control_t *lc, bool *ok);
/* Go: pdu.TalkerAliasAssembler.Reset. Reset discards the stored header and blocks. */
int dmrgo_pdu_talker_alias_assembler_reset(dmrgo_pdu_talker_alias_assembler_t *self);
/* Go: pdu.TalkerAliasBlocks. TalkerAliasBlocks returns the number of Talker Alias block LCs (0 to 3) that follow a header with the given format and length in Code Units (ETSI TS 102 361-2 clause 5.4.3). */
int dmrgo_pdu_talker_alias_blocks(dmrgo_layer3_talker_alias_data_format_t format, int64_t length, int64_t *out);
/* Go: pdu.TalkgroupDataGrantMultiItemPDU.CSBK. CSBK returns the TD_GRANT_MI CSBK that carries s, as dmrgo_pdu_csbk_set_talkgroup_data_grant_multi_item sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_csbk(const dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.TalkgroupDataGrantMultiItemPDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_talkgroup_data_grant_multi_item sets it, with the other fields zero. */
int dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_mbc_header(const dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.TalkgroupDataGrantMultiItemPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_string(const dmrgo_pdu_talkgroup_data_grant_multi_item_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.TalkgroupDataGrantPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_talkgroup_data_grant sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_talkgroup_data_grant_pdu_csbk(const dmrgo_pdu_talkgroup_data_grant_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.TalkgroupDataGrantPDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_talkgroup_data_grant sets it, with the other fields zero. */
int dmrgo_pdu_talkgroup_data_grant_pdu_mbc_header(const dmrgo_pdu_talkgroup_data_grant_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.TalkgroupDataGrantPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_talkgroup_data_grant_pdu_string(const dmrgo_pdu_talkgroup_data_grant_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.TalkgroupVoiceGrantPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_talkgroup_voice_grant sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_talkgroup_voice_grant_pdu_csbk(const dmrgo_pdu_talkgroup_voice_grant_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.TalkgroupVoiceGrantPDU.MBCHeader. MBCHeader returns the MBCHeader that carries s, as dmrgo_pdu_mbc_header_set_talkgroup_voice_grant sets it, with the other fields zero. */
int dmrgo_pdu_talkgroup_voice_grant_pdu_mbc_header(const dmrgo_pdu_talkgroup_voice_grant_pdu_t *self, dmrgo_pdu_mbc_header_t *out);
/* Go: pdu.TalkgroupVoiceGrantPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_talkgroup_voice_grant_pdu_string(const dmrgo_pdu_talkgroup_voice_grant_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.UDPIPv4CompressedHeader.Encode. Encode encodes a UDPIPv4CompressedHeader. */
int dmrgo_pdu_udp_ipv4_compressed_header_encode(const dmrgo_pdu_udp_ipv4_compressed_header_t *self, uint8_t out[9]);
/* Go: pdu.UDPIPv4CompressedHeader.Octets. Octets returns the length of the compressed header: 5 octets, plus 2 for each port that an Extended Header carries because its SPID or DPID is 0. */
int dmrgo_pdu_udp_ipv4_compressed_header_octets(const dmrgo_pdu_udp_ipv4_compressed_header_t *self, int64_t *out);
/* Go: pdu.UDPIPv4CompressedHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_udp_ipv4_compressed_header_string(const dmrgo_pdu_udp_ipv4_compressed_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.UDTHeader.DataHeader. DataHeader returns the DataHeader that carries s, as dmrgo_pdu_data_header_set_udt sets it, with the other fields zero. */
int dmrgo_pdu_udt_header_data_header(const dmrgo_pdu_udt_header_t *self, dmrgo_pdu_data_header_t *out);
/* Go: pdu.UDTHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_udt_header_string(const dmrgo_pdu_udt_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.UDTOpcode.String. String returns the alias of a UDT opcode. */
int dmrgo_pdu_udt_opcode_string(dmrgo_pdu_udt_opcode_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.UnconfirmedDataHeader.DataHeader. DataHeader returns the DataHeader that carries s, as dmrgo_pdu_data_header_set_unconfirmed sets it, with the other fields zero. */
int dmrgo_pdu_unconfirmed_data_header_data_header(const dmrgo_pdu_unconfirmed_data_header_t *self, dmrgo_pdu_data_header_t *out);
/* Go: pdu.UnconfirmedDataHeader.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_unconfirmed_data_header_string(const dmrgo_pdu_unconfirmed_data_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.UnifiedSingleBlockData.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_UNIFIED_SINGLE_BLOCK. */
int dmrgo_pdu_unified_single_block_data_data_type(const dmrgo_pdu_unified_single_block_data_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.UnifiedSingleBlockData.Encode. Encode encodes a UnifiedSingleBlockData. */
int dmrgo_pdu_unified_single_block_data_encode(const dmrgo_pdu_unified_single_block_data_t *self, uint8_t out[12]);
/* Go: pdu.UnifiedSingleBlockData.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_unified_single_block_data_string(const dmrgo_pdu_unified_single_block_data_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.UnitToUnitVoiceServiceAnswerResponsePDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_unit_to_unit_voice_service_answer_response sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_unit_to_unit_voice_service_answer_response_pdu_csbk(const dmrgo_pdu_unit_to_unit_voice_service_answer_response_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.UnitToUnitVoiceServiceAnswerResponsePDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_unit_to_unit_voice_service_answer_response_pdu_string(const dmrgo_pdu_unit_to_unit_voice_service_answer_response_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.UnitToUnitVoiceServiceRequestPDU.CSBK. CSBK returns the CSBK that carries s, as dmrgo_pdu_csbk_set_unit_to_unit_voice_service_request sets it, with LastBlock true and the other fields zero. */
int dmrgo_pdu_unit_to_unit_voice_service_request_pdu_csbk(const dmrgo_pdu_unit_to_unit_voice_service_request_pdu_t *self, dmrgo_pdu_csbk_t *out);
/* Go: pdu.UnitToUnitVoiceServiceRequestPDU.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_unit_to_unit_voice_service_request_pdu_string(const dmrgo_pdu_unit_to_unit_voice_service_request_pdu_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.VNAPContinuation.DataType. DataType returns DMRGO_ENUMS_DATA_TYPE_MBC_CONTINUATION. */
int dmrgo_pdu_vnap_continuation_data_type(const dmrgo_pdu_vnap_continuation_t *self, dmrgo_enums_data_type_t *out);
/* Go: pdu.VNAPContinuation.Encode. Encode encodes a VNAPContinuation. */
int dmrgo_pdu_vnap_continuation_encode(const dmrgo_pdu_vnap_continuation_t *self, uint8_t out[12]);
/* Go: pdu.VNAPContinuation.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_vnap_continuation_string(const dmrgo_pdu_vnap_continuation_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: pdu.VoteNowParms.String. String returns the fields of s as text, for printing. */
int dmrgo_pdu_vote_now_parms_string(const dmrgo_pdu_vote_now_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.AdditionalInformationField.String. */
int dmrgo_layer3_additional_information_field_string(dmrgo_layer3_additional_information_field_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.CdefParms.Encode. Encode encodes a CdefParms. */
int dmrgo_layer3_cdef_parms_encode(const dmrgo_layer3_cdef_parms_t *self, uint8_t out[8]);
/* Go: layer3.CdefParms.RXFrequencyHz. RXFrequencyHz returns the receive frequency in Hz, RXMHz MHz plus RXKHz steps of 125 Hz. */
int dmrgo_layer3_cdef_parms_rx_frequency_hz(const dmrgo_layer3_cdef_parms_t *self, uint64_t *out);
/* Go: layer3.CdefParms.RXFrequencyMHz. RXFrequencyMHz returns the receive frequency in MHz, RXMHz plus RXKHz times 0.000125 (ETSI TS 102 361-4 Annex C). */
int dmrgo_layer3_cdef_parms_rx_frequency_mhz(const dmrgo_layer3_cdef_parms_t *self, double *out);
/* Go: layer3.CdefParms.String. String returns the fields of s as text, for printing. */
int dmrgo_layer3_cdef_parms_string(const dmrgo_layer3_cdef_parms_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.CdefParms.TXFrequencyHz. TXFrequencyHz returns the transmit frequency in Hz, TXMHz MHz plus TXKHz steps of 125 Hz. */
int dmrgo_layer3_cdef_parms_tx_frequency_hz(const dmrgo_layer3_cdef_parms_t *self, uint64_t *out);
/* Go: layer3.CdefParms.TXFrequencyMHz. TXFrequencyMHz returns the transmit frequency in MHz, TXMHz plus TXKHz times 0.000125 (ETSI TS 102 361-4 Annex C). */
int dmrgo_layer3_cdef_parms_tx_frequency_mhz(const dmrgo_layer3_cdef_parms_t *self, double *out);
/* Go: layer3.DataServiceOptions.Encode. Encode encodes a DataServiceOptions. */
int dmrgo_layer3_data_service_options_encode(const dmrgo_layer3_data_service_options_t *self, uint8_t out[1]);
/* Go: layer3.DataServiceOptions.Field. Field returns s as the 7-bit ServiceOptions of a C_RAND, in the low bits of the octet, with the errors of Encode. */
int dmrgo_layer3_data_service_options_field(const dmrgo_layer3_data_service_options_t *self, uint8_t *out);
/* Go: layer3.DataServiceOptions.String. String returns the fields of s as text, for printing. */
int dmrgo_layer3_data_service_options_string(const dmrgo_layer3_data_service_options_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.DataServiceOptionsOf. DataServiceOptionsOf decodes a DataServiceOptions from the 7-bit ServiceOptions of a C_RAND in the low bits of field, as Field returns it. */
int dmrgo_layer3_data_service_options_of(uint8_t field, dmrgo_layer3_data_service_options_t *out);
/* Go: layer3.DecodeCdefParms. DecodeCdefParms decodes a CdefParms. */
int dmrgo_layer3_decode_cdef_parms(const uint8_t data[8], dmrgo_layer3_cdef_parms_t *out);
/* Go: layer3.DecodeDataServiceOptions. DecodeDataServiceOptions decodes a DataServiceOptions. */
int dmrgo_layer3_decode_data_service_options(const uint8_t data[1], dmrgo_layer3_data_service_options_t *out);
/* Go: layer3.DecodeDiversionServiceOptions. DecodeDiversionServiceOptions decodes a DiversionServiceOptions. */
int dmrgo_layer3_decode_diversion_service_options(const uint8_t data[1], dmrgo_layer3_diversion_service_options_t *out);
/* Go: layer3.DecodePollingServiceOptions. DecodePollingServiceOptions decodes a PollingServiceOptions. */
int dmrgo_layer3_decode_polling_service_options(const uint8_t data[1], dmrgo_layer3_polling_service_options_t *out);
/* Go: layer3.DecodeRegistrationServiceOptions. DecodeRegistrationServiceOptions decodes a RegistrationServiceOptions. */
int dmrgo_layer3_decode_registration_service_options(const uint8_t data[1], dmrgo_layer3_registration_service_options_t *out);
/* Go: layer3.DecodeServiceOptions. DecodeServiceOptions decodes a ServiceOptions. */
int dmrgo_layer3_decode_service_options(const uint8_t data[1], dmrgo_layer3_service_options_t *out);
/* Go: layer3.DecodeShortDataServiceOptions. DecodeShortDataServiceOptions decodes a ShortDataServiceOptions. */
int dmrgo_layer3_decode_short_data_service_options(const uint8_t data[1], dmrgo_layer3_short_data_service_options_t *out);
/* Go: layer3.DecodeStatusServiceOptions. DecodeStatusServiceOptions decodes a StatusServiceOptions. */
int dmrgo_layer3_decode_status_service_options(const uint8_t data[1], dmrgo_layer3_status_service_options_t *out);
/* Go: layer3.DecodeVoiceServiceOptions. DecodeVoiceServiceOptions decodes a VoiceServiceOptions. */
int dmrgo_layer3_decode_voice_service_options(const uint8_t data[1], dmrgo_layer3_voice_service_options_t *out);
/* Go: layer3.DiversionServiceOptions.Encode. Encode encodes a DiversionServiceOptions. */
int dmrgo_layer3_diversion_service_options_encode(const dmrgo_layer3_diversion_service_options_t *self, uint8_t out[1]);
/* Go: layer3.DiversionServiceOptions.Field. Field returns s as the 7-bit ServiceOptions of a C_RAND, in the low bits of the octet, with the errors of Encode. */
int dmrgo_layer3_diversion_service_options_field(const dmrgo_layer3_diversion_service_options_t *self, uint8_t *out);
/* Go: layer3.DiversionServiceOptions.String. String returns the fields of s as text, for printing. */
int dmrgo_layer3_diversion_service_options_string(const dmrgo_layer3_diversion_service_options_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.DiversionServiceOptionsOf. DiversionServiceOptionsOf decodes a DiversionServiceOptions from the 7-bit ServiceOptions of a C_RAND in the low bits of field, as Field returns it. */
int dmrgo_layer3_diversion_service_options_of(uint8_t field, dmrgo_layer3_diversion_service_options_t *out);
/* Go: layer3.MotorolaServiceOptions. MotorolaServiceOptions returns the Service Options octet 0x20 seen in Motorola IPSC voice traffic: no flag set and only the first Reserved bit (0x20) set, so Reserved is 2. */
int dmrgo_layer3_motorola_service_options(dmrgo_layer3_service_options_t *out);
/* Go: layer3.PollingServiceOptions.Encode. Encode encodes a PollingServiceOptions. */
int dmrgo_layer3_polling_service_options_encode(const dmrgo_layer3_polling_service_options_t *self, uint8_t out[1]);
/* Go: layer3.PollingServiceOptions.Field. Field returns s as the 7-bit ServiceOptions of a C_RAND, in the low bits of the octet, with the errors of Encode. */
int dmrgo_layer3_polling_service_options_field(const dmrgo_layer3_polling_service_options_t *self, uint8_t *out);
/* Go: layer3.PollingServiceOptions.String. String returns the fields of s as text, for printing. */
int dmrgo_layer3_polling_service_options_string(const dmrgo_layer3_polling_service_options_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.PollingServiceOptionsOf. PollingServiceOptionsOf decodes a PollingServiceOptions from the 7-bit ServiceOptions of a C_RAND in the low bits of field, as Field returns it. */
int dmrgo_layer3_polling_service_options_of(uint8_t field, dmrgo_layer3_polling_service_options_t *out);
/* Go: layer3.PositionAccuracy.String. */
int dmrgo_layer3_position_accuracy_string(dmrgo_layer3_position_accuracy_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.RegistrationServiceOptions.Encode. Encode encodes a RegistrationServiceOptions. */
int dmrgo_layer3_registration_service_options_encode(const dmrgo_layer3_registration_service_options_t *self, uint8_t out[1]);
/* Go: layer3.RegistrationServiceOptions.Field. Field returns s as the 7-bit ServiceOptions of a C_RAND, in the low bits of the octet, with the errors of Encode. */
int dmrgo_layer3_registration_service_options_field(const dmrgo_layer3_registration_service_options_t *self, uint8_t *out);
/* Go: layer3.RegistrationServiceOptions.String. String returns the fields of s as text, for printing. */
int dmrgo_layer3_registration_service_options_string(const dmrgo_layer3_registration_service_options_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.RegistrationServiceOptionsOf. RegistrationServiceOptionsOf decodes a RegistrationServiceOptions from the 7-bit ServiceOptions of a C_RAND in the low bits of field, as Field returns it. */
int dmrgo_layer3_registration_service_options_of(uint8_t field, dmrgo_layer3_registration_service_options_t *out);
/* Go: layer3.ServiceOptions.Encode. Encode encodes a ServiceOptions. */
int dmrgo_layer3_service_options_encode(const dmrgo_layer3_service_options_t *self, uint8_t out[1]);
/* Go: layer3.ServiceOptions.Field. Field returns s as the 8-bit Service Options field, the octet of Encode, with the errors of Encode. */
int dmrgo_layer3_service_options_field(const dmrgo_layer3_service_options_t *self, uint8_t *out);
/* Go: layer3.ServiceOptions.String. String returns the fields of s as text, for printing. */
int dmrgo_layer3_service_options_string(const dmrgo_layer3_service_options_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.ShortDataServiceOptions.Encode. Encode encodes a ShortDataServiceOptions. */
int dmrgo_layer3_short_data_service_options_encode(const dmrgo_layer3_short_data_service_options_t *self, uint8_t out[1]);
/* Go: layer3.ShortDataServiceOptions.Field. Field returns s as the 7-bit ServiceOptions of a C_RAND, in the low bits of the octet, with the errors of Encode. */
int dmrgo_layer3_short_data_service_options_field(const dmrgo_layer3_short_data_service_options_t *self, uint8_t *out);
/* Go: layer3.ShortDataServiceOptions.String. String returns the fields of s as text, for printing. */
int dmrgo_layer3_short_data_service_options_string(const dmrgo_layer3_short_data_service_options_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.ShortDataServiceOptionsOf. ShortDataServiceOptionsOf decodes a ShortDataServiceOptions from the 7-bit ServiceOptions of a C_RAND in the low bits of field, as Field returns it. */
int dmrgo_layer3_short_data_service_options_of(uint8_t field, dmrgo_layer3_short_data_service_options_t *out);
/* Go: layer3.SourceType.String. */
int dmrgo_layer3_source_type_string(dmrgo_layer3_source_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.StatusServiceOptions.Encode. Encode encodes a StatusServiceOptions. */
int dmrgo_layer3_status_service_options_encode(const dmrgo_layer3_status_service_options_t *self, uint8_t out[1]);
/* Go: layer3.StatusServiceOptions.Field. Field returns s as the 7-bit ServiceOptions of a C_RAND, in the low bits of the octet, with the errors of Encode. */
int dmrgo_layer3_status_service_options_field(const dmrgo_layer3_status_service_options_t *self, uint8_t *out);
/* Go: layer3.StatusServiceOptions.String. String returns the fields of s as text, for printing. */
int dmrgo_layer3_status_service_options_string(const dmrgo_layer3_status_service_options_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.StatusServiceOptionsOf. StatusServiceOptionsOf decodes a StatusServiceOptions from the 7-bit ServiceOptions of a C_RAND in the low bits of field, as Field returns it. */
int dmrgo_layer3_status_service_options_of(uint8_t field, dmrgo_layer3_status_service_options_t *out);
/* Go: layer3.TalkerAliasDataFormat.String. */
int dmrgo_layer3_talker_alias_data_format_string(dmrgo_layer3_talker_alias_data_format_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.VoiceServiceOptions.Encode. Encode encodes a VoiceServiceOptions. */
int dmrgo_layer3_voice_service_options_encode(const dmrgo_layer3_voice_service_options_t *self, uint8_t out[1]);
/* Go: layer3.VoiceServiceOptions.Field. Field returns s as the 7-bit ServiceOptions of a C_RAND, in the low bits of the octet, with the errors of Encode. */
int dmrgo_layer3_voice_service_options_field(const dmrgo_layer3_voice_service_options_t *self, uint8_t *out);
/* Go: layer3.VoiceServiceOptions.String. String returns the fields of s as text, for printing. */
int dmrgo_layer3_voice_service_options_string(const dmrgo_layer3_voice_service_options_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: layer3.VoiceServiceOptionsOf. VoiceServiceOptionsOf decodes a VoiceServiceOptions from the 7-bit ServiceOptions of a C_RAND in the low bits of field, as Field returns it. */
int dmrgo_layer3_voice_service_options_of(uint8_t field, dmrgo_layer3_voice_service_options_t *out);
/* Go: lip.AppendElement. AppendElement adds a type 5 element with the identifier id and the first n bits of data, packed the first bit most significant, at bit offset bits of the PDU dst, such as the output of an Encode. It returns DMRGO_ERR_LIP_ELEMENT for an n out of 1 to 1072 or longer than data, or an id over 30, and DMRGO_ERR_LIP_SHORT for a dst shorter than bits. */
int dmrgo_lip_append_element(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t bits, dmrgo_lip_element_id_t id, const uint8_t *data, size_t data_len, int64_t n, int64_t *n2);
/* Go: lip.DecodeEnableDisable. DecodeEnableDisable decodes the LOCATION REPORTING ENABLE/DISABLE REQUEST or RESPONSE PDU pdu. It returns DMRGO_ERR_LIP_PDU_TYPE for another PDU and DMRGO_ERR_LIP_SHORT for a PDU that ends early. */
int dmrgo_lip_decode_enable_disable(const uint8_t *pdu, size_t pdu_len, dmrgo_lip_enable_disable_t *out);
/* Go: lip.DecodeHeader. DecodeHeader decodes the start of the LIP PDU pdu. It returns DMRGO_ERR_LIP_SHORT for a PDU without the bits of the header, and DMRGO_ERR_LIP_PDU_TYPE for the reserved PDU types 2 and 3. */
int dmrgo_lip_decode_header(const uint8_t *pdu, size_t pdu_len, dmrgo_lip_header_t *out);
/* Go: lip.DecodeImmediateRequest. DecodeImmediateRequest decodes the IMMEDIATE LOCATION REPORT REQUEST PDU pdu. It returns DMRGO_ERR_LIP_PDU_TYPE for another PDU or a response, and DMRGO_ERR_LIP_SHORT for a PDU that ends early. */
int dmrgo_lip_decode_immediate_request(const uint8_t *pdu, size_t pdu_len, dmrgo_lip_immediate_request_t *out);
/* Go: lip.DecodeLongReport. DecodeLongReport decodes the LONG LOCATION REPORT PDU pdu. It returns DMRGO_ERR_LIP_PDU_TYPE for another PDU, DMRGO_ERR_LIP_SHORT for a PDU that ends early, and DMRGO_ERR_LIP_TIME_TYPE and DMRGO_ERR_LIP_SHAPE for a reserved time type or location shape. */
int dmrgo_lip_decode_long_report(const uint8_t *pdu, size_t pdu_len, dmrgo_lip_long_report_t *out);
/* Go: lip.DecodeReportAck. DecodeReportAck decodes the LOCATION REPORT ACKNOWLEDGEMENT PDU pdu. It returns DMRGO_ERR_LIP_PDU_TYPE for another PDU and DMRGO_ERR_LIP_SHORT for a PDU that ends early. */
int dmrgo_lip_decode_report_ack(const uint8_t *pdu, size_t pdu_len, dmrgo_lip_report_ack_t *out);
/* Go: lip.Element.AppendData. AppendData appends the data of e in the PDU pdu to dst, packed the first bit in the most significant bit of the first octet and 0 bits after the last, and returns dst. */
int dmrgo_lip_element_append_data(const dmrgo_lip_element_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t *pdu, size_t pdu_len);
/* Go: lip.Element.Uint. Uint returns the data of e in the PDU pdu as an unsigned integer, the first bit most significant, for an element of up to 64 bits, such as the location message reference or the result code. */
int dmrgo_lip_element_uint(const dmrgo_lip_element_t *self, const uint8_t *pdu, size_t pdu_len, uint64_t *out);
/* Go: lip.ElementID.String. String returns the name of the ElementID. */
int dmrgo_lip_element_id_string(dmrgo_lip_element_id_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lip.EnableDisable.Encode. Encode appends the PDU of e to dst, with 0 bits after its last bit, and returns dst and the number of bits of the PDU. It returns DMRGO_ERR_ARG for a NULL self, and allocates only to grow dst. */
int dmrgo_lip_enable_disable_encode(const dmrgo_lip_enable_disable_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t *n);
/* Go: lip.Extension.HasResponseBit. HasResponseBit reports whether a PDU with the extension e carries the request/response bit after the extension: the immediate location report request and the request and response PDUs from DMRGO_LIP_EXTENSION_BASIC_PARAMETERS to DMRGO_LIP_EXTENSION_BACKLOG. */
int dmrgo_lip_extension_has_response_bit(dmrgo_lip_extension_t self, bool *out);
/* Go: lip.Extension.String. String returns the name of the Extension. */
int dmrgo_lip_extension_string(dmrgo_lip_extension_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lip.ImmediateRequest.Encode. Encode appends the PDU of q to dst, with 0 bits after its last bit, and returns dst and the number of bits of the PDU. It returns a DMRGO_ERR_FIELD_RANGE for a ReportType over 3 and DMRGO_ERR_ARG for a NULL self, and allocates only to grow dst. */
int dmrgo_lip_immediate_request_encode(const dmrgo_lip_immediate_request_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t *n);
/* Go: lip.LongReport.Encode. Encode appends the PDU of l to dst, with 0 bits after its last bit, and returns dst and the number of bits of the PDU. It returns a DMRGO_ERR_FIELD_RANGE for a field that does not fit, DMRGO_ERR_LIP_TIME_TYPE and DMRGO_ERR_LIP_SHAPE for a reserved time type or location shape, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_lip_long_report_encode(const dmrgo_lip_long_report_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t *n);
/* Go: lip.NextElement. NextElement reads the type 5 element that starts at bit at of the PDU pdu, such as the Elements offset of a decoded PDU or the Next of the element before. It returns DMRGO_ERR_LIP_SHORT for an element that ends after the PDU or an at out of range, and DMRGO_ERR_LIP_ELEMENT for the extended identifier or the reserved length extension. */
int dmrgo_lip_next_element(const uint8_t *pdu, size_t pdu_len, int64_t at, dmrgo_lip_element_t *e, bool *ok);
/* Go: lip.ReportAck.Encode. Encode appends the PDU of a to dst, with 0 bits after its last bit, and returns dst and the number of bits of the PDU. It returns DMRGO_ERR_ARG for a NULL self, and allocates only to grow dst. */
int dmrgo_lip_report_ack_encode(const dmrgo_lip_report_ack_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t *n);
/* Go: lip.ReportType.String. String returns the name of the ReportType. */
int dmrgo_lip_report_type_string(dmrgo_lip_report_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lip.Shape.String. String returns the name of the Shape. */
int dmrgo_lip_shape_string(dmrgo_lip_shape_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lip.TimeType.String. String returns the name of the TimeType. */
int dmrgo_lip_time_type_string(dmrgo_lip_time_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lip.VelocityType.String. String returns the name of the VelocityType. */
int dmrgo_lip_velocity_type_string(dmrgo_lip_velocity_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: location.AppendPacket. AppendPacket appends the user data of the position f to dst, sets h to the data header to send it with, and returns dst. A valid f gives status A, the position and mode A; an f that is not valid gives status V, no position and mode N, which Decode returns with DMRGO_ERR_LOCATION_NO_POSITION. It returns dst unchanged and DMRGO_ERR_LOCATION_FORMAT for a Format other than DMRGO_LOCATION_FORMAT_NMEA, DMRGO_ERR_NIL_ARGUMENT for a NULL f or h, and DMRGO_ERR_NMEA_FIELD or the errors of the packages that build the message. f and h may be NULL. */
int dmrgo_location_append_packet(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_location_fix_t *f, dmrgo_location_header_t *h);
/* dmrgo_location_decoder_new makes a zero dmrgo_location_decoder_t. */
int dmrgo_location_decoder_new(dmrgo_location_decoder_t **out);
/* dmrgo_location_decoder_free frees the handle. self may be NULL. */
int dmrgo_location_decoder_free(dmrgo_location_decoder_t *self);
/* Go: location.Decoder.Decode. Decode returns the position in a data packet, with header h and user data data: an NMEA RMC sentence to UDP port 10110, an LRRP report or answer to UDP port 4001, or a Hytera HDAP location protocol answer or report to UDP port 3003. For a report or answer without a position, such as the answer of a radio without a GNSS fix, an NMEA sentence with an empty position or an HDAP standard answer whose Result is not 0, it returns the Fix, with its Format, addresses, Result, RequestID and the fields that the message has, and DMRGO_ERR_LOCATION_NO_POSITION. It returns DMRGO_ERR_LOCATION_NO_FIX for a packet in none of these formats, for an LRRP request and for an HDAP position out of range, DMRGO_ERR_NIL_ARGUMENT for a NULL h, the errors of the ip, lrrp, nmea and hdap packages for a message that does not decode, and the Fix with DMRGO_ERR_IP_CHECKSUM for a position whose IPv4 or UDP checksum does not match, as the block CRCs of the packet already checked its octets. h may be NULL. */
int dmrgo_location_decoder_decode(dmrgo_location_decoder_t *self, const dmrgo_pdu_data_header_t *h, const uint8_t *data, size_t data_len, dmrgo_location_fix_t *out);
/* Go: location.Format.String. String returns the name of f. */
int dmrgo_location_format_string(dmrgo_location_format_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ars.DecodeMessage. DecodeMessage decodes a Message from data. It returns DMRGO_ERR_ARS_SHORT when data ends inside a field and DMRGO_ERR_ARS_LENGTH when a length does not match the data. */
int dmrgo_ars_decode_message(const uint8_t *data, size_t data_len, dmrgo_ars_message_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ars.Encoding.String. String returns the name of e. */
int dmrgo_ars_encoding_string(dmrgo_ars_encoding_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ars.Event.String. String returns the name of e. */
int dmrgo_ars_event_string(dmrgo_ars_event_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ars.FailureReason.String. String returns the name of r: "Device Not Authorized" for 0, its meaning in a DMRGO_ARS_TYPE_ACK, though in a DMRGO_ARS_TYPE_USER_ACK 0 is a transmission failure, and "Transmission Failure" for each value from 3 to 127. */
int dmrgo_ars_failure_reason_string(dmrgo_ars_failure_reason_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ars.Header.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_ars_header_append_binary(const dmrgo_ars_header_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ars.Header.String. String returns the fields of s as text, for printing. */
int dmrgo_ars_header_string(const dmrgo_ars_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ars.Message.AppendBinary. AppendBinary appends s to dst, with Length set to the length of the data. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_ars_message_append_binary(const dmrgo_ars_message_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ars.Message.DeviceID. DeviceID returns the radio ID that Device holds, and false when Device is empty, holds a character that is not a digit or a number over 24 bits. */
int dmrgo_ars_message_device_id(const dmrgo_ars_message_t *self, uint32_t *value, bool *ok);
/* Go: ars.Message.SetDeviceID. SetDeviceID appends the radio ID id to dst in decimal ASCII digits, points Device at them and returns dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when id does not fit in 24 bits, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_ars_message_set_device_id(dmrgo_ars_message_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, uint32_t id, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ars.Message.String. String returns the fields of s as text, for printing. */
int dmrgo_ars_message_string(const dmrgo_ars_message_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ars.NewAck. NewAck returns the answer to a successful device registration, with the refresh time in units of 30 minutes, 0 for none. It returns a DMRGO_ERR_FIELD_RANGE when refresh does not fit in 7 bits. */
int dmrgo_ars_new_ack(uint8_t refresh, dmrgo_ars_message_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ars.NewFailure. NewFailure returns the answer to a device registration that failed, with the reason reason, 00 02 FF 00 on the wire for DMRGO_ARS_FAILURE_DEVICE_NOT_AUTHORIZED. The answer defines only that reason (MOTOTRBO ARS specification 02.00 clause 3.4.3), so NewFailure returns a DMRGO_ERR_CONFIG for each other value. */
int dmrgo_ars_new_failure(dmrgo_ars_failure_reason_t reason, dmrgo_ars_message_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ars.NewQuery. NewQuery returns the query that requests a radio to register again, with the header bits that servers send: acknowledgement required and priority, 00 01 74 on the wire. */
int dmrgo_ars_new_query(dmrgo_ars_message_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ars.NewRegistration. NewRegistration returns a device registration with the header bits that radios send. */
int dmrgo_ars_new_registration(dmrgo_ars_event_t event, dmrgo_ars_message_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ars.Registration.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_ars_registration_append_binary(const dmrgo_ars_registration_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ars.Registration.String. String returns the fields of s as text, for printing. */
int dmrgo_ars_registration_string(const dmrgo_ars_registration_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ars.Response.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_ars_response_append_binary(const dmrgo_ars_response_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ars.Response.String. String returns the fields of s as text, for printing. */
int dmrgo_ars_response_string(const dmrgo_ars_response_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ars.Type.String. String returns the name of t. */
int dmrgo_ars_type_string(dmrgo_ars_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Circle2D.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_circle2d_append_binary(const dmrgo_lrrp_circle2d_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Circle2D.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_circle2d_string(const dmrgo_lrrp_circle2d_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Circle3D.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_circle3d_append_binary(const dmrgo_lrrp_circle3d_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Circle3D.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_circle3d_string(const dmrgo_lrrp_circle3d_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Circle3DWhole.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_circle3d_whole_append_binary(const dmrgo_lrrp_circle3d_whole_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Circle3DWhole.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_circle3d_whole_string(const dmrgo_lrrp_circle3d_whole_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.DecodeMessageInto. DecodeMessageInto decodes a Message from data. It returns DMRGO_ERR_LRRP_SHORT when data ends inside a field, DMRGO_ERR_LRRP_LENGTH when a length does not match the data and DMRGO_ERR_LRRP_VARINT for a number that does not fit its field. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL m. The call sets all of *m and does not read it. m may be NULL. */
int dmrgo_lrrp_decode_message_into(dmrgo_lrrp_message_t *m, const uint8_t *data, size_t data_len, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: lrrp.DocumentID.String. String returns the name of d. */
int dmrgo_lrrp_document_id_string(dmrgo_lrrp_document_id_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Message.AppendBinary. AppendBinary appends s to dst, with Length set to the length of the data. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_message_append_binary(const dmrgo_lrrp_message_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Message.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_message_string(const dmrgo_lrrp_message_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.OperationError.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_operation_error_append_binary(const dmrgo_lrrp_operation_error_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.OperationError.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_operation_error_string(const dmrgo_lrrp_operation_error_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Point2D.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_point2d_append_binary(const dmrgo_lrrp_point2d_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Point2D.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_point2d_string(const dmrgo_lrrp_point2d_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Point3D.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_point3d_append_binary(const dmrgo_lrrp_point3d_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Point3D.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_point3d_string(const dmrgo_lrrp_point3d_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Point3DAccuracy.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_point3d_accuracy_append_binary(const dmrgo_lrrp_point3d_accuracy_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Point3DAccuracy.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_point3d_accuracy_string(const dmrgo_lrrp_point3d_accuracy_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Point3DWhole.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_point3d_whole_append_binary(const dmrgo_lrrp_point3d_whole_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Point3DWhole.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_point3d_whole_string(const dmrgo_lrrp_point3d_whole_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Report.AppendBinary. AppendBinary appends s to dst: each field that is set, as its token and value, in the order of the fields. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_report_append_binary(const dmrgo_lrrp_report_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Report.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_report_string(const dmrgo_lrrp_report_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Request.AppendBinary. AppendBinary appends s to dst: each field that is set, as its token and value, in the order of the fields. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_lrrp_request_append_binary(const dmrgo_lrrp_request_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Request.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_request_string(const dmrgo_lrrp_request_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.ResultCode.String. String returns the name of r. */
int dmrgo_lrrp_result_code_string(dmrgo_lrrp_result_code_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.Time.AppendBinary. AppendBinary appends the 5 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_lrrp_time_append_binary(const dmrgo_lrrp_time_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: lrrp.Time.String. String returns the fields of s as text, for printing. */
int dmrgo_lrrp_time_string(const dmrgo_lrrp_time_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: lrrp.TriggerCondition.String. String returns the name of c. */
int dmrgo_lrrp_trigger_condition_string(dmrgo_lrrp_trigger_condition_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: tms.DecodeMessage. DecodeMessage decodes a Message from data. It returns DMRGO_ERR_TMS_SHORT when data ends inside a field and DMRGO_ERR_TMS_LENGTH when a length does not match the data. */
int dmrgo_tms_decode_message(const uint8_t *data, size_t data_len, dmrgo_tms_message_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: tms.Encoding.String. String returns the name of e. */
int dmrgo_tms_encoding_string(dmrgo_tms_encoding_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: tms.Header.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_tms_header_append_binary(const dmrgo_tms_header_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: tms.Header.String. String returns the fields of s as text, for printing. */
int dmrgo_tms_header_string(const dmrgo_tms_header_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: tms.Message.AppendBinary. AppendBinary appends s to dst, with Length set to the length of the data. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_tms_message_append_binary(const dmrgo_tms_message_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: tms.Message.Sequence. Sequence returns the 7-bit sequence number of a text message or an acknowledgement, and false when the message has none. */
int dmrgo_tms_message_sequence(const dmrgo_tms_message_t *self, uint8_t *value, bool *ok);
/* Go: tms.Message.SetTextUTF8. SetTextUTF8 appends text, UTF-8, to dst as UTF-16LE, points Text at the appended octets and returns dst. */
int dmrgo_tms_message_set_text_utf8(dmrgo_tms_message_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t *text, size_t text_len, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: tms.Message.String. String returns the fields of s as text, for printing. */
int dmrgo_tms_message_string(const dmrgo_tms_message_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: tms.Message.TextUTF8. TextUTF8 appends Text, UTF-16LE text, to dst as UTF-8 and returns dst. */
int dmrgo_tms_message_text_utf8(const dmrgo_tms_message_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: tms.NewAck. NewAck returns the acknowledgement of the text message with sequence number seq. It returns a DMRGO_ERR_FIELD_RANGE when seq does not fit in 7 bits. */
int dmrgo_tms_new_ack(uint8_t seq, dmrgo_tms_message_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: tms.NewText. NewText returns a text message with sequence number seq, with the header bits that radios send: both extension octets and the UTF-16LE encoding. It returns a DMRGO_ERR_FIELD_RANGE when seq does not fit in 7 bits. */
int dmrgo_tms_new_text(uint8_t seq, bool ack_required, dmrgo_tms_message_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: tms.SequenceHigh.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_tms_sequence_high_append_binary(const dmrgo_tms_sequence_high_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: tms.SequenceHigh.String. String returns the fields of s as text, for printing. */
int dmrgo_tms_sequence_high_string(const dmrgo_tms_sequence_high_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: tms.SequenceLow.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_tms_sequence_low_append_binary(const dmrgo_tms_sequence_low_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: tms.SequenceLow.String. String returns the fields of s as text, for printing. */
int dmrgo_tms_sequence_low_string(const dmrgo_tms_sequence_low_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: tms.Type.String. String returns the name of t. */
int dmrgo_tms_type_string(dmrgo_tms_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: nmea.AppendRMC. AppendRMC appends r to dst as an RMC sentence in the layout that AnyTone radios send, and returns dst: the time as hhmmss.sss, the latitude as ddmm.mmmm, the longitude as dddmm.mmmm, the speed and the course with two decimals, the date as ddmmyy, the magnetic variation with one decimal or empty when it rounds to 0, the mode indicator, then the checksum and CR LF, as in $GPRMC,200037.000,A,3412.7300,N,10850.0000,E,0.00,121.00,021225,,,A*60. It returns dst unchanged and DMRGO_ERR_NMEA_FIELD for a Talker with a byte that is not printable ASCII or is $, * or a comma, a Mode that is not an upper case letter, a field out of the range that ParseRMC accepts, a Speed of 10^13 knots or more, or a value that is not a number, and DMRGO_ERR_NIL_ARGUMENT for a NULL r. r may be NULL. */
int dmrgo_nmea_append_rmc(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_nmea_rmc_t *r);
/* Go: nmea.ParseRMC. ParseRMC decodes one RMC sentence from s, from the $ to the two hex digits of the checksum, with an optional CR LF or LF after them. It returns DMRGO_ERR_NMEA_SENTENCE, DMRGO_ERR_NMEA_CHECKSUM or DMRGO_ERR_NMEA_FIELD. */
int dmrgo_nmea_parse_rmc(const uint8_t *s, size_t s_len, dmrgo_nmea_rmc_t *out);
/* Go: privacy.Algorithm.String. String returns the name of the algorithm. */
int dmrgo_privacy_algorithm_string(dmrgo_privacy_algorithm_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: privacy.FromPIHeader. FromPIHeader returns the Info of the PI header h: Encrypted and Header set and the fields of h. h may be NULL. */
int dmrgo_privacy_from_pi_header(const dmrgo_pdu_pi_header_t *h, dmrgo_privacy_info_t *out);
/* Go: privacy.FromProprietaryHeader. FromProprietaryHeader returns the Info of the privacy header h of a data packet: a P_HEAD with FID 0x10 whose first manufacturer octet holds the algorithm in bits 1 to 3 and 1 in its low 4 bits, followed by the key ID, 2 octets and the 32-bit MI. h may be NULL. */
int dmrgo_privacy_from_proprietary_header(const dmrgo_pdu_proprietary_header_t *h, dmrgo_privacy_info_t *out);
/* dmrgo_privacy_key_free frees the handle. self may be NULL. */
int dmrgo_privacy_key_free(dmrgo_privacy_key_t *self);
/* Go: privacy.Key.Algorithm. Algorithm returns the algorithm of the key, or DMRGO_PRIVACY_ALGORITHM_BASIC for a NULL Key. */
int dmrgo_privacy_key_algorithm(dmrgo_privacy_key_t *self, dmrgo_privacy_algorithm_t *out);
/* Go: privacy.Key.ID. ID returns the key ID of the key, or 0 for a NULL Key. */
int dmrgo_privacy_key_id(dmrgo_privacy_key_t *self, uint8_t *out);
/* Go: privacy.NewAESKey. NewAESKey returns the AES key with the key ID id: AES-128 for 16 octets and AES-256 for 32. It returns a DMRGO_ERR_CONFIG for another length. */
int dmrgo_privacy_new_aes_key(uint8_t id, uint8_t *key, size_t key_len, dmrgo_privacy_key_t **out);
/* Go: privacy.NewARC4Key. NewARC4Key returns the 40-bit ARC4 key with the key ID id. */
int dmrgo_privacy_new_arc4_key(uint8_t id, const uint8_t key[5], dmrgo_privacy_key_t **out);
/* Go: privacy.NewBasicKey. NewBasicKey returns the Basic Privacy key with the 16-bit value key. */
int dmrgo_privacy_new_basic_key(uint16_t key, dmrgo_privacy_key_t **out);
/* Go: privacy.NewBasicKeyNumber. NewBasicKeyNumber returns the Basic Privacy key of the key number n that a radio shows, 1 to 255. */
int dmrgo_privacy_new_basic_key_number(uint8_t n, dmrgo_privacy_key_t **out);
/* Go: privacy.NewReceiver. NewReceiver returns a Receiver without keys. */
int dmrgo_privacy_new_receiver(dmrgo_privacy_receiver_t **out);
/* Go: privacy.NewTransmitter. NewTransmitter returns a Transmitter for cfg. It returns DMRGO_ERR_PRIVACY_AMATEUR when cfg->service is DMRGO_PRIVACY_SERVICE_AMATEUR, whatever the key, and a DMRGO_ERR_CONFIG for DMRGO_PRIVACY_SERVICE_UNKNOWN or a Service out of range, so that no encrypting Transmitter exists in the amateur service or in a service not stated. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL cfg or a NULL cfg->key, and a DMRGO_ERR_CONFIG for a Key that is not made with its constructor. cfg may be NULL. */
int dmrgo_privacy_new_transmitter(const dmrgo_privacy_transmitter_config_t *cfg, dmrgo_privacy_transmitter_t **out);
/* dmrgo_privacy_receiver_free frees the handle. self may be NULL. */
int dmrgo_privacy_receiver_free(dmrgo_privacy_receiver_t *self);
/* Go: privacy.Receiver.AddKey. AddKey adds k to the keys of the Receiver. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL k and DMRGO_ERR_PRIVACY_KEYS_FULL when the Receiver holds DMRGO_PRIVACY_MAX_KEYS other keys. k may be NULL. */
int dmrgo_privacy_receiver_add_key(dmrgo_privacy_receiver_t *self, dmrgo_privacy_key_t *k);
/* Go: privacy.Receiver.Data. Data removes the privacy of the data packet m in place and returns its Info. m may be NULL. */
int dmrgo_privacy_receiver_data(dmrgo_privacy_receiver_t *self, dmrgo_data_message_t *m, dmrgo_privacy_info_t *out);
/* Go: privacy.Receiver.Event. Event takes the next event e of the dmrgo_voice_receiver_t and returns the Info of its call. e and frames may be NULL. */
int dmrgo_privacy_receiver_event(dmrgo_privacy_receiver_t *self, const dmrgo_voice_event_t *e, dmrgo_vocoder_ambe_frame_t frames[3], dmrgo_privacy_info_t *out);
/* Go: privacy.Receiver.ForceBasic. ForceBasic sets whether the Receiver applies its Basic Privacy key to every voice call without a PI header, also when the LC does not set the Privacy service option, as some radios send Basic Privacy. */
int dmrgo_privacy_receiver_force_basic(dmrgo_privacy_receiver_t *self, bool on);
/* Go: privacy.Receiver.Info. Info returns the data that the Receiver holds for the current call. */
int dmrgo_privacy_receiver_info(dmrgo_privacy_receiver_t *self, dmrgo_privacy_info_t *out);
/* Go: privacy.Receiver.Reset. Reset clears the current call. */
int dmrgo_privacy_receiver_reset(dmrgo_privacy_receiver_t *self);
/* dmrgo_privacy_transmitter_free frees the handle. self may be NULL. */
int dmrgo_privacy_transmitter_free(dmrgo_privacy_transmitter_t *self);
/* Go: privacy.Transmitter.Data. Data applies ARC4 privacy to payload in place, the user data of a data packet without the pad octets and the message CRC, with the message indicator mi, and returns the privacy header of the packet: a P_HEAD with FID 0x10 and the SAP sap of the user data that holds the algorithm, the key ID and mi, the layout that FromProprietaryHeader reads. It returns DMRGO_ERR_PRIVACY_DATA_ALGORITHM for a key other than ARC4, as no public capture with a key proves the data framing of the others, and a DMRGO_ERR_CONFIG for a sap over 15, and then leaves payload as it is. */
int dmrgo_privacy_transmitter_data(dmrgo_privacy_transmitter_t *self, uint32_t mi, dmrgo_enums_sap_t sap, uint8_t *payload, size_t payload_len, dmrgo_pdu_proprietary_header_t *out);
/* Go: privacy.Transmitter.Output. Output applies the privacy to o in place when it is a voice burst: the three AMBE+2 frames of the burst, fill and silence frames too. It returns DMRGO_ERR_PRIVACY_NOT_STARTED before Start, DMRGO_ERR_NIL_ARGUMENT for a NULL o, and the errors of dmrgo_layer2_raw_burst_set_ambe_frames, which then change nothing. o may be NULL. */
int dmrgo_privacy_transmitter_output(dmrgo_privacy_transmitter_t *self, dmrgo_voice_output_t *o);
/* Go: privacy.Transmitter.PIHeader. PIHeader returns the PI header of the call that Start began, for the destination address target. */
int dmrgo_privacy_transmitter_pi_header(dmrgo_privacy_transmitter_t *self, uint32_t target, dmrgo_pdu_pi_header_t *h, bool *ok);
/* Go: privacy.Transmitter.Start. Start begins a call with the message indicator mi. */
int dmrgo_privacy_transmitter_start(dmrgo_privacy_transmitter_t *self, uint32_t mi);
/* dmrgo_rf_audio_receiver_free frees the handle. self may be NULL. */
int dmrgo_rf_audio_receiver_free(dmrgo_rf_audio_receiver_t *self);
/* Go: rf.AudioReceiver.Active. Active reports whether the stream is inside a transmission that the receiver is locked to. */
int dmrgo_rf_audio_receiver_active(dmrgo_rf_audio_receiver_t *self, bool *out);
/* dmrgo_rf_audio_receiver_append_bursts_need sets *items and *arena to the room that dmrgo_rf_audio_receiver_append_bursts needs for these arguments, without a change to the handle. */
int dmrgo_rf_audio_receiver_append_bursts_need(dmrgo_rf_audio_receiver_t *self, const int16_t *x, size_t x_len, size_t *items, size_t *arena);
/* Go: rf.AudioReceiver.AppendBursts. AppendBursts processes the discriminator samples x in append mode, appends the bursts that they complete to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_rf_audio_receiver_append_bursts_need gives. */
int dmrgo_rf_audio_receiver_append_bursts(dmrgo_rf_audio_receiver_t *self, dmrgo_rf_burst_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const int16_t *x, size_t x_len);
/* dmrgo_rf_audio_receiver_append_flush_need sets *items and *arena to the room that dmrgo_rf_audio_receiver_append_flush needs for these arguments, without a change to the handle. */
int dmrgo_rf_audio_receiver_append_flush_need(dmrgo_rf_audio_receiver_t *self, size_t *items, size_t *arena);
/* Go: rf.AudioReceiver.AppendFlush. AppendFlush ends the stream in append mode, appends the remaining bursts to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_rf_audio_receiver_append_flush_need gives. */
int dmrgo_rf_audio_receiver_append_flush(dmrgo_rf_audio_receiver_t *self, dmrgo_rf_burst_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: rf.AudioReceiver.Flush. Flush ends the stream in stream mode and hands the remaining bursts to OnBursts. */
int dmrgo_rf_audio_receiver_flush(dmrgo_rf_audio_receiver_t *self);
/* Go: rf.AudioReceiver.Init. Init sets up r for c, in place of any state it holds, in DMRGO_RF_TIER0. It returns DMRGO_ERR_HANDLE for a NULL self, and a DMRGO_ERR_CONFIG, with r unchanged, when a field of c is out of range. */
int dmrgo_rf_audio_receiver_init(dmrgo_rf_audio_receiver_t *self, const dmrgo_rf_audio_rx_config_t *c);
/* Go: rf.AudioReceiver.Lag. Lag returns the most samples between the last sample of a burst and the call that hands the burst out. */
int dmrgo_rf_audio_receiver_lag(dmrgo_rf_audio_receiver_t *self, int64_t *out);
/* Go: rf.AudioReceiver.Level. Level returns the outer level of the last locked stream: the code of a run of symbol +3 (1944 Hz) less the DC code. */
int dmrgo_rf_audio_receiver_level(dmrgo_rf_audio_receiver_t *self, int64_t *out);
/* Go: rf.AudioReceiver.MaxOutput. MaxOutput returns the most bursts that AppendBursts can append for n samples, and for n == 0 the most that AppendFlush can append. */
int dmrgo_rf_audio_receiver_max_output(dmrgo_rf_audio_receiver_t *self, int64_t n, int64_t *out);
/* Go: rf.AudioReceiver.Offset. Offset returns the DC code of the last locked stream: the code of the carrier, from its offset and the offset of the converter. */
int dmrgo_rf_audio_receiver_offset(dmrgo_rf_audio_receiver_t *self, int64_t *out);
/* Go: rf.AudioReceiver.Write. Write processes the discriminator samples x in stream mode and hands the bursts that they complete to OnBursts. It returns len(x) and NULL, DMRGO_ERR_HANDLE for a NULL self, DMRGO_ERR_RF_NOT_SET_UP before Init or NewAudioReceiver, and a DMRGO_ERR_CONFIG for OnBursts in append mode. */
int dmrgo_rf_audio_receiver_write(dmrgo_rf_audio_receiver_t *self, const int16_t *x, size_t x_len, int64_t *out);
/* dmrgo_rf_audio_transmitter_free frees the handle. self may be NULL. */
int dmrgo_rf_audio_transmitter_free(dmrgo_rf_audio_transmitter_t *self);
/* Go: rf.AudioTransmitter.Active. Active reports whether the stream is inside a transmission: from the key-up of its first burst to the key-down after its last, the time that the radio must be keyed. */
int dmrgo_rf_audio_transmitter_active(dmrgo_rf_audio_transmitter_t *self, bool *out);
/* dmrgo_rf_audio_transmitter_append_flush_need sets *items and *arena to the room that dmrgo_rf_audio_transmitter_append_flush needs for these arguments, without a change to the handle. */
int dmrgo_rf_audio_transmitter_append_flush_need(dmrgo_rf_audio_transmitter_t *self, size_t *items, size_t *arena);
/* Go: rf.AudioTransmitter.AppendFlush. AppendFlush ends the transmission in append mode, appends the tail of the pulse to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_rf_audio_transmitter_append_flush_need gives. */
int dmrgo_rf_audio_transmitter_append_flush(dmrgo_rf_audio_transmitter_t *self, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_rf_audio_transmitter_append_samples_need sets *items and *arena to the room that dmrgo_rf_audio_transmitter_append_samples needs for these arguments, without a change to the handle. */
int dmrgo_rf_audio_transmitter_append_samples_need(dmrgo_rf_audio_transmitter_t *self, const dmrgo_rf_burst_t *x, size_t x_len, size_t *items, size_t *arena);
/* Go: rf.AudioTransmitter.AppendSamples. AppendSamples turns the bursts x into samples in append mode, appends them to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_rf_audio_transmitter_append_samples_need gives. */
int dmrgo_rf_audio_transmitter_append_samples(dmrgo_rf_audio_transmitter_t *self, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_rf_burst_t *x, size_t x_len);
/* Go: rf.AudioTransmitter.Flush. Flush ends the transmission in stream mode: it hands the tail of the pulse to OnSamples. */
int dmrgo_rf_audio_transmitter_flush(dmrgo_rf_audio_transmitter_t *self);
/* Go: rf.AudioTransmitter.Init. Init sets up t for c, in place of any state it holds, in DMRGO_RF_TIER0 at a Rate of 24000 or 48000. */
int dmrgo_rf_audio_transmitter_init(dmrgo_rf_audio_transmitter_t *self, const dmrgo_rf_audio_tx_config_t *c);
/* Go: rf.AudioTransmitter.Lag. Lag returns the most samples between the start of a burst in its slot and its first sample. */
int dmrgo_rf_audio_transmitter_lag(dmrgo_rf_audio_transmitter_t *self, int64_t *out);
/* Go: rf.AudioTransmitter.Level. Level returns the code of a run of symbol +3 less the center that t sends, after the 0 default resolves. */
int dmrgo_rf_audio_transmitter_level(dmrgo_rf_audio_transmitter_t *self, int64_t *out);
/* Go: rf.AudioTransmitter.MaxOutput. MaxOutput returns the most samples that AppendSamples can append for n bursts, and for n == 0 the most that AppendFlush can append. */
int dmrgo_rf_audio_transmitter_max_output(dmrgo_rf_audio_transmitter_t *self, int64_t n, int64_t *out);
/* Go: rf.AudioTransmitter.Offset. Offset returns the DC code that t sends: the center and Offset. */
int dmrgo_rf_audio_transmitter_offset(dmrgo_rf_audio_transmitter_t *self, int64_t *out);
/* Go: rf.AudioTransmitter.Write. Write turns the bursts x into samples in stream mode and hands them to OnSamples. */
int dmrgo_rf_audio_transmitter_write(dmrgo_rf_audio_transmitter_t *self, const dmrgo_rf_burst_t *x, size_t x_len, int64_t *out);
/* Go: rf.Burst.Decoded. Decoded returns the burst and CACH bits to decode: Fixed and FixedCACH when the burst has them, Data and CACH otherwise. */
int dmrgo_rf_burst_decoded(const dmrgo_rf_burst_t *self, dmrgo_layer2_raw_burst_t *raw_burst, uint8_t data[3]);
/* Go: rf.Burst.Hint. Hint returns the data of the Receiver about b besides its bits, for a machine that takes a dmrgo_layer2_raw_burst_t with a dmrgo_layer2_hint_t. */
int dmrgo_rf_burst_hint(const dmrgo_rf_burst_t *self, dmrgo_layer2_hint_t *out);
/* Go: rf.Burst.Timed. Timed reports whether the burst was placed by timing instead of a SYNC. */
int dmrgo_rf_burst_timed(const dmrgo_rf_burst_t *self, bool *out);
/* dmrgo_rf_monitor_new makes a zero dmrgo_rf_monitor_t. */
int dmrgo_rf_monitor_new(dmrgo_rf_monitor_t **out);
/* dmrgo_rf_monitor_free frees the handle. self may be NULL. */
int dmrgo_rf_monitor_free(dmrgo_rf_monitor_t *self);
/* Go: rf.Monitor.Burst. Burst decodes b into dst, finds its TDMA channel and updates the call of the channel. Burst returns DMRGO_ERR_RF_NIL_BURST for a NULL m, dst or b, and the error of dmrgo_layer2_burst_decode_from_bytes_with, with dst and Hint set but the call of the channel unchanged. b may be NULL. */
int dmrgo_rf_monitor_burst(dmrgo_rf_monitor_t *self, dmrgo_layer2_burst_t *dst, const dmrgo_rf_burst_t *b, dmrgo_rf_monitor_burst_t *out);
/* Go: rf.Monitor.Reset. Reset clears the streams and the calls of every channel. */
int dmrgo_rf_monitor_reset(dmrgo_rf_monitor_t *self);
/* Go: rf.NewAudioReceiver. NewAudioReceiver returns an AudioReceiver of c. It returns a DMRGO_ERR_CONFIG when a field of c is out of range. c may be NULL. */
int dmrgo_rf_new_audio_receiver(const dmrgo_rf_audio_rx_config_t *c, dmrgo_rf_audio_receiver_t **out);
/* Go: rf.NewAudioTransmitter. NewAudioTransmitter returns an AudioTransmitter of c. c may be NULL. */
int dmrgo_rf_new_audio_transmitter(const dmrgo_rf_audio_tx_config_t *c, dmrgo_rf_audio_transmitter_t **out);
/* Go: rf.NewPreEmphasis. NewPreEmphasis allocates a PreEmphasis and returns it set up. */
int dmrgo_rf_new_pre_emphasis(dmrgo_rf_pre_emphasis_t **out);
/* Go: rf.NewReceiver. NewReceiver returns a Receiver of c. It allocates every buffer of the Receiver, and it returns a DMRGO_ERR_CONFIG when a field of c is out of range. c may be NULL. */
int dmrgo_rf_new_receiver(const dmrgo_rf_rx_config_t *c, dmrgo_rf_receiver_t **out);
/* Go: rf.NewRxPreEmphasis. NewRxPreEmphasis allocates a RxPreEmphasis and returns it set up. */
int dmrgo_rf_new_rx_pre_emphasis(dmrgo_rf_rx_pre_emphasis_t **out);
/* Go: rf.NewTransmitter. NewTransmitter returns a Transmitter of c. It returns a DMRGO_ERR_CONFIG when a field of c is out of range or names a setup that the modulator cannot make, and a DMRGO_ERR_RF_REGION when the limits of the Region, Service and Power do not allow the setup. c may be NULL. */
int dmrgo_rf_new_transmitter(const dmrgo_rf_tx_config_t *c, dmrgo_rf_transmitter_t **out);
/* dmrgo_rf_pre_emphasis_free frees the handle. self may be NULL. */
int dmrgo_rf_pre_emphasis_free(dmrgo_rf_pre_emphasis_t *self);
/* Go: rf.PreEmphasis.Init. Init sets up p, in place of any state it holds, and returns p, for dmrgo_rf_audio_tx_config_t.pre_emphasis. In C, *out is self when the result is the receiver. */
int dmrgo_rf_pre_emphasis_init(dmrgo_rf_pre_emphasis_t *self, dmrgo_rf_pre_emphasis_t **out);
/* dmrgo_rf_receiver_free frees the handle. self may be NULL. */
int dmrgo_rf_receiver_free(dmrgo_rf_receiver_t *self);
/* Go: rf.Receiver.Active. Active reports whether the stream is inside a transmission that the receiver is locked to. */
int dmrgo_rf_receiver_active(dmrgo_rf_receiver_t *self, bool *out);
/* dmrgo_rf_receiver_append_bursts_need sets *items and *arena to the room that dmrgo_rf_receiver_append_bursts needs for these arguments, without a change to the handle. */
int dmrgo_rf_receiver_append_bursts_need(dmrgo_rf_receiver_t *self, const uint8_t *x, size_t x_len, size_t *items, size_t *arena);
/* Go: rf.Receiver.AppendBursts. AppendBursts processes the I/Q samples x in append mode, appends the bursts that they complete to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_rf_receiver_append_bursts_need gives. */
int dmrgo_rf_receiver_append_bursts(dmrgo_rf_receiver_t *self, dmrgo_rf_burst_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t *x, size_t x_len);
/* dmrgo_rf_receiver_append_flush_need sets *items and *arena to the room that dmrgo_rf_receiver_append_flush needs for these arguments, without a change to the handle. */
int dmrgo_rf_receiver_append_flush_need(dmrgo_rf_receiver_t *self, size_t *items, size_t *arena);
/* Go: rf.Receiver.AppendFlush. AppendFlush ends the stream in append mode, appends the remaining bursts to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_rf_receiver_append_flush_need gives. */
int dmrgo_rf_receiver_append_flush(dmrgo_rf_receiver_t *self, dmrgo_rf_burst_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: rf.Receiver.DeviationHz. DeviationHz returns the outer deviation of the last locked stream, in Hz. */
int dmrgo_rf_receiver_deviation_hz(dmrgo_rf_receiver_t *self, double *out);
/* Go: rf.Receiver.Flush. Flush ends the stream in stream mode and hands the remaining bursts to OnBursts. */
int dmrgo_rf_receiver_flush(dmrgo_rf_receiver_t *self);
/* Go: rf.Receiver.Init. Init sets up r for c, in place of any state it holds, in DMRGO_RF_TIER0 at a Rate of 9600 or 12000. Init returns DMRGO_ERR_HANDLE for a NULL self, and a DMRGO_ERR_CONFIG, with r unchanged, when a field of c is out of range. */
int dmrgo_rf_receiver_init(dmrgo_rf_receiver_t *self, const dmrgo_rf_rx_config_t *c);
/* Go: rf.Receiver.Lag. Lag returns the most samples between the last sample of a burst and the call that hands the burst out. */
int dmrgo_rf_receiver_lag(dmrgo_rf_receiver_t *self, int64_t *out);
/* Go: rf.Receiver.MaxOutput. MaxOutput returns the most bursts that AppendBursts can append for n samples, and for n == 0 the most that AppendFlush can append. */
int dmrgo_rf_receiver_max_output(dmrgo_rf_receiver_t *self, int64_t n, int64_t *out);
/* Go: rf.Receiver.OffsetHz. OffsetHz returns the carrier offset of the last stream that ended, in Hz. */
int dmrgo_rf_receiver_offset_hz(dmrgo_rf_receiver_t *self, double *out);
/* Go: rf.Receiver.SampleBytes. SampleBytes returns the bytes of one I/Q sample in the Format of r. */
int dmrgo_rf_receiver_sample_bytes(dmrgo_rf_receiver_t *self, int64_t *out);
/* Go: rf.Receiver.Write. Write processes the I/Q samples x in stream mode and hands the bursts that they complete to OnBursts. It returns len(x) and NULL, DMRGO_ERR_HANDLE for a NULL self, DMRGO_ERR_RF_NOT_SET_UP before Init or NewReceiver, and a DMRGO_ERR_CONFIG for OnBursts in append mode. */
int dmrgo_rf_receiver_write(dmrgo_rf_receiver_t *self, const uint8_t *x, size_t x_len, int64_t *out);
/* Go: rf.Region.String. String returns the name of the region. */
int dmrgo_rf_region_string(dmrgo_rf_region_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: rf.RegionError.Error. Error returns the message of e. */
int dmrgo_rf_region_error_error(const dmrgo_rf_region_error_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_rf_region_error_last sets *ok when the last error of this thread holds a dmrgo_rf_region_error_t and copies it to *out. Its strings point into thread-local memory that the next failed call on the thread reuses. */
int dmrgo_rf_region_error_last(dmrgo_rf_region_error_t *out, bool *ok);
/* dmrgo_rf_rx_pre_emphasis_free frees the handle. self may be NULL. */
int dmrgo_rf_rx_pre_emphasis_free(dmrgo_rf_rx_pre_emphasis_t *self);
/* Go: rf.RxPreEmphasis.Init. Init sets up p, in place of any state it holds, and returns p, for dmrgo_rf_audio_rx_config_t.pre_emphasis. In C, *out is self when the result is the receiver. */
int dmrgo_rf_rx_pre_emphasis_init(dmrgo_rf_rx_pre_emphasis_t *self, dmrgo_rf_rx_pre_emphasis_t **out);
/* dmrgo_rf_transmitter_free frees the handle. self may be NULL. */
int dmrgo_rf_transmitter_free(dmrgo_rf_transmitter_t *self);
/* Go: rf.Transmitter.Active. Active reports whether the stream is inside a transmission: from the key-up of its first burst to the key-down after its last. */
int dmrgo_rf_transmitter_active(dmrgo_rf_transmitter_t *self, bool *out);
/* dmrgo_rf_transmitter_append_flush_need sets *items and *arena to the room that dmrgo_rf_transmitter_append_flush needs for these arguments, without a change to the handle. */
int dmrgo_rf_transmitter_append_flush_need(dmrgo_rf_transmitter_t *self, size_t *items, size_t *arena);
/* Go: rf.Transmitter.AppendFlush. AppendFlush ends the transmission in append mode, appends the tail of the pulse and the power ramp down to dst and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_rf_transmitter_append_flush_need gives. */
int dmrgo_rf_transmitter_append_flush(dmrgo_rf_transmitter_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_rf_transmitter_append_samples_need sets *items and *arena to the room that dmrgo_rf_transmitter_append_samples needs for these arguments, without a change to the handle. */
int dmrgo_rf_transmitter_append_samples_need(dmrgo_rf_transmitter_t *self, const dmrgo_rf_burst_t *x, size_t x_len, size_t *items, size_t *arena);
/* Go: rf.Transmitter.AppendSamples. AppendSamples turns the bursts x into samples in append mode, appends them to dst in Format and returns the extended slice. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_rf_transmitter_append_samples_need gives. */
int dmrgo_rf_transmitter_append_samples(dmrgo_rf_transmitter_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_rf_burst_t *x, size_t x_len);
/* Go: rf.Transmitter.DeviationHz. DeviationHz returns the outer deviation that t sends, 1944 Hz. */
int dmrgo_rf_transmitter_deviation_hz(dmrgo_rf_transmitter_t *self, double *out);
/* Go: rf.Transmitter.Flush. Flush ends the transmission in stream mode: it hands the tail of the pulse and the power ramp down to OnSamples. */
int dmrgo_rf_transmitter_flush(dmrgo_rf_transmitter_t *self);
/* Go: rf.Transmitter.Init. Init sets up t for c, in place of any state it holds, in DMRGO_RF_TIER0 at a Rate of 96000. It returns DMRGO_ERR_HANDLE for a NULL self, and a DMRGO_ERR_CONFIG or DMRGO_ERR_RF_REGION, with t unchanged, as NewTransmitter does. */
int dmrgo_rf_transmitter_init(dmrgo_rf_transmitter_t *self, const dmrgo_rf_tx_config_t *c);
/* Go: rf.Transmitter.Lag. Lag returns the most samples between the start of a burst in its slot and its first sample. */
int dmrgo_rf_transmitter_lag(dmrgo_rf_transmitter_t *self, int64_t *out);
/* Go: rf.Transmitter.MaxOutput. MaxOutput returns the most samples that AppendSamples can append for n bursts, and for n == 0 the most that AppendFlush can append. */
int dmrgo_rf_transmitter_max_output(dmrgo_rf_transmitter_t *self, int64_t n, int64_t *out);
/* Go: rf.Transmitter.OffsetHz. OffsetHz returns the carrier offset that t sends, in Hz, as DMRGO_RF_TIER0 rounds it. */
int dmrgo_rf_transmitter_offset_hz(dmrgo_rf_transmitter_t *self, double *out);
/* Go: rf.Transmitter.SampleBytes. SampleBytes returns the bytes of one I/Q sample in the Format of t. */
int dmrgo_rf_transmitter_sample_bytes(dmrgo_rf_transmitter_t *self, int64_t *out);
/* Go: rf.Transmitter.Write. Write turns the bursts x into samples in stream mode and hands them to OnSamples. It returns len(x) and NULL, DMRGO_ERR_HANDLE for a NULL self, DMRGO_ERR_RF_NOT_SET_UP before Init or NewTransmitter, a DMRGO_ERR_CONFIG for OnSamples in append mode, and for a burst that it does not accept the count of bursts before it with DMRGO_ERR_RF_BURST_ORDER. */
int dmrgo_rf_transmitter_write(dmrgo_rf_transmitter_t *self, const dmrgo_rf_burst_t *x, size_t x_len, int64_t *out);
/* Go: shortdata.AppendText. AppendText appends the UTF-8 text to dst, coded as format selects, and returns dst. It returns dst unchanged and DMRGO_ERR_SHORTDATA_FORMAT for a reserved format, or DMRGO_ERR_SHORTDATA_CHARACTER for a character that BCD, 7-bit text or the ISO/IEC 8859 part cannot hold. Invalid UTF-8 gives U+FFFD, or DMRGO_ERR_SHORTDATA_CHARACTER for BCD, 7-bit text and ISO/IEC 8859. */
int dmrgo_shortdata_append_text(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, dmrgo_enums_dd_format_t format, const uint8_t *text, size_t text_len);
/* Go: shortdata.DecodeHyteraText. DecodeHyteraText decodes a HyteraText from data. It returns DMRGO_ERR_SHORTDATA_SHORT when data ends inside a field. */
int dmrgo_shortdata_decode_hytera_text(const uint8_t *data, size_t data_len, dmrgo_shortdata_hytera_text_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: shortdata.DecodeText. DecodeText appends the text in data, coded as format selects, to dst as UTF-8 and returns dst. It returns dst unchanged and DMRGO_ERR_SHORTDATA_FORMAT for a reserved format. */
int dmrgo_shortdata_decode_text(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, dmrgo_enums_dd_format_t format, const uint8_t *data, size_t data_len);
/* Go: shortdata.HyteraText.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_shortdata_hytera_text_append_binary(const dmrgo_shortdata_hytera_text_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: shortdata.HyteraText.SetTextUTF8. SetTextUTF8 appends text, UTF-8, to dst as UTF-16LE, then a NUL character, points Text at the appended octets and returns dst. */
int dmrgo_shortdata_hytera_text_set_text_utf8(dmrgo_shortdata_hytera_text_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t *text, size_t text_len, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: shortdata.HyteraText.String. String returns the fields of s as text, for printing. */
int dmrgo_shortdata_hytera_text_string(const dmrgo_shortdata_hytera_text_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: shortdata.HyteraText.TextUTF8. TextUTF8 appends Text, UTF-16LE text, to dst as UTF-8 and returns dst. */
int dmrgo_shortdata_hytera_text_text_utf8(const dmrgo_shortdata_hytera_text_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: sms.AnyToneText.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_sms_anytone_text_append_binary(const dmrgo_sms_anytone_text_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: sms.AnyToneText.SetTextUTF8. SetTextUTF8 appends text, UTF-8, to dst as UTF-16LE, then a NUL character, points Text at the appended octets and returns dst. */
int dmrgo_sms_anytone_text_set_text_utf8(dmrgo_sms_anytone_text_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t *text, size_t text_len, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: sms.AnyToneText.String. String returns the fields of s as text, for printing. */
int dmrgo_sms_anytone_text_string(const dmrgo_sms_anytone_text_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: sms.AnyToneText.TextUTF8. TextUTF8 appends Text, UTF-16LE text, to dst as UTF-8 and returns dst. */
int dmrgo_sms_anytone_text_text_utf8(const dmrgo_sms_anytone_text_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: sms.AppendAck. AppendAck appends to dst the TMS acknowledgement of the DMRGO_SMS_FORMAT_TMS text t, as Decode returns it, sets h to the data header to send it with, and returns dst. It returns dst unchanged and DMRGO_ERR_SMS_FORMAT for another format and for a group text, which gets no acknowledgement, DMRGO_ERR_NIL_ARGUMENT for a NULL t or h, or the errors of the packages that build the message. t and h may be NULL. */
int dmrgo_sms_append_ack(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_sms_text_t *t, dmrgo_sms_header_t *h);
/* Go: sms.AppendPacket. AppendPacket appends the user data of t in its format to dst, sets h to the data header to send it with, and returns dst. It returns DMRGO_ERR_SMS_TEXT_LENGTH for a DMRGO_SMS_FORMAT_UDT text that is empty or too long, and DMRGO_ERR_SHORTDATA_CHARACTER for a character that its UDT Format cannot hold. It returns dst unchanged and DMRGO_ERR_SMS_FORMAT for an unknown format, for DMRGO_SMS_FORMAT_DEFINED_DATA with DD format binary, which holds no text, for a DMRGO_SMS_FORMAT_UDT text with a UDT Format that holds no text, and for a DMRGO_SMS_FORMAT_HYTERA text without the HyteraText layout, which Decode reads as DMRGO_SMS_FORMAT_DEFINED_DATA: a Body that is empty, starts with a NUL, or has a character other than NUL after a NUL, and for a DMRGO_SMS_FORMAT_IP text with a Body that starts with CR LF, which Decode reads as DMRGO_SMS_FORMAT_ANYTONE. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL t or h, or the errors of the packages that build the message. t and h may be NULL. */
int dmrgo_sms_append_packet(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_sms_text_t *t, dmrgo_sms_header_t *h);
/* Go: sms.Decode. Decode appends the text of a data packet, with header h and user data data, to dst as UTF-8, and returns dst and the Text, whose Body points into dst. It returns DMRGO_ERR_SMS_LENGTH for a UDT whose Pad Nibble counts more nibbles than its blocks hold, and DMRGO_ERR_SMS_NOT_TEXT for a UDT in another UDT Format. It returns DMRGO_ERR_SMS_NOT_TEXT for a packet in none of these formats and for defined data with DD format binary, the errors of the ip, tms and shortdata packages for a message that does not decode, the Text with DMRGO_ERR_IP_CHECKSUM for a text whose IPv4 or UDP checksum does not match, as the block CRCs of the packet already checked its octets, and DMRGO_ERR_NIL_ARGUMENT for a NULL h. h may be NULL. */
int dmrgo_sms_decode(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const dmrgo_pdu_data_header_t *h, const uint8_t *data, size_t data_len, dmrgo_sms_text_t *text, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: sms.DecodeAnyToneText. DecodeAnyToneText decodes an AnyToneText from data. It returns DMRGO_ERR_SMS_SHORT when data ends inside a field and DMRGO_ERR_SMS_SIGNATURE when a fixed field does not hold its value. */
int dmrgo_sms_decode_anytone_text(const uint8_t *data, size_t data_len, dmrgo_sms_anytone_text_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: sms.DecodeIPText. DecodeIPText decodes an IPText from data. It returns DMRGO_ERR_SMS_SHORT when data ends inside a field. */
int dmrgo_sms_decode_ip_text(const uint8_t *data, size_t data_len, dmrgo_sms_ip_text_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: sms.Format.String. String returns the name of f. */
int dmrgo_sms_format_string(dmrgo_sms_format_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: sms.IPText.AppendBinary. AppendBinary appends s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE or another error when a field does not fit. */
int dmrgo_sms_ip_text_append_binary(const dmrgo_sms_ip_text_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: sms.IPText.SetTextUTF8. SetTextUTF8 appends text, UTF-8, to dst as UTF-16BE, points Text at the appended octets and returns dst. */
int dmrgo_sms_ip_text_set_text_utf8(dmrgo_sms_ip_text_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t *text, size_t text_len, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: sms.IPText.String. String returns the fields of s as text, for printing. */
int dmrgo_sms_ip_text_string(const dmrgo_sms_ip_text_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: sms.IPText.TextUTF8. TextUTF8 appends Text, UTF-16BE text, to dst as UTF-8 and returns dst. */
int dmrgo_sms_ip_text_text_utf8(const dmrgo_sms_ip_text_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: dmrd.AppendFreeDMRStatic. AppendFreeDMRStatic appends to dst the static talkgroups of slot s in a FreeDMR options text, as FreeDMR reads them: the DMR+ keys TS1_1 to TS1_9 (TS2_1 to TS2_9 for slot 2) when TS1_1 is there, else the comma list of TS1 or TS1_STATIC. */
int dmrgo_dmrd_append_free_dmr_static(uint32_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t *text, size_t text_len, dmrgo_enums_slot_t s);
/* Go: dmrd.Bridge.AppendBinary. AppendBinary appends the packet b to dst in the form of self->version, with self->signature as it is: sign the packet afterward with package dmrdauth. A NULL b gives DMRGO_ERR_NIL_RECEIVER. */
int dmrgo_dmrd_bridge_append_binary(const dmrgo_dmrd_bridge_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: dmrd.BridgeControl.AppendBinary. AppendBinary appends the packet c to dst, with self->signature as it is. It returns dst unchanged and an error for another Command, and a DMRGO_ERR_FIELD_RANGE when TalkGroup does not fit in 24 bits, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_dmrd_bridge_control_append_binary(const dmrgo_dmrd_bridge_control_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: dmrd.Classify. Classify returns the command of packet p in dialect d by its tag, or DMRGO_DMRD_COMMAND_UNKNOWN when no tag of d matches. */
int dmrgo_dmrd_classify(const uint8_t *p, size_t p_len, dmrgo_dmrd_dialect_t d, dmrgo_dmrd_command_t *out);
/* Go: dmrd.Command.String. String returns the tag of the command. */
int dmrgo_dmrd_command_string(dmrgo_dmrd_command_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.Control.AppendBinary. AppendBinary appends the message c in dialect d to dst. It returns dst unchanged and an error when d has no such message, or when Text is set on a message without text, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_dmrd_control_append_binary(const dmrgo_dmrd_control_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, dmrgo_dmrd_dialect_t d);
/* Go: dmrd.Control.LoginSalt. LoginSalt returns the salt of the acknowledgement c that answers RPTL: the 4 octets of a DMRGO_DMRD_DIALECT_MMDVM RPTACK, or Salt of a DMRGO_DMRD_DIALECT_HBRP MSTACK with HasSalt. */
int dmrgo_dmrd_control_login_salt(const dmrgo_dmrd_control_t *self, uint32_t *salt, bool *ok);
/* Go: dmrd.DMRPlusOptions.AppendText. AppendText appends the options that are not DMRGO_DMRD_OPTION_ABSENT to dst as a DMR+ startup options text, each followed by a semicolon, in the order of the fields. It returns dst unchanged and DMRGO_ERR_ARG for a NULL self, and no other error. */
int dmrgo_dmrd_dmr_plus_options_append_text(const dmrgo_dmrd_dmr_plus_options_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: dmrd.Data.AppendBinary. AppendBinary appends the 53, 55 or 71 octets of s to dst: Size selects the length, and 0 means 55. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit, or an error that wraps DMRGO_ERR_DMRD_LENGTH when Size is not one of the lengths. */
int dmrgo_dmrd_data_append_binary(const dmrgo_dmrd_data_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: dmrd.Data.Call. Call returns the call of the packet: group is Group, target is Destination and source is Source. */
int dmrgo_dmrd_data_call(const dmrgo_dmrd_data_t *self, bool *group, uint32_t *target, uint32_t *source);
/* Go: dmrd.Data.Hint. Hint returns the data that the packet gives about its burst, for the service machines: the slot, the voice position or data type, the sequence number (8 bits), the stream ID, and now, the time at which the packet arrived, as At. */
int dmrgo_dmrd_data_hint(const dmrgo_dmrd_data_t *self, dmrgo_duration_t now, dmrgo_layer2_hint_t *out);
/* Go: dmrd.Data.SetCall. SetCall sets Group, Destination and Source from the call. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when target or source does not fit in 24 bits, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_dmrd_data_set_call(dmrgo_dmrd_data_t *self, bool group, uint32_t target, uint32_t source);
/* Go: dmrd.Data.SetCallHint. SetCallHint sets the call as SetCall does and the burst kind as SetHint does, from the Call and Hint of a machine Output. */
int dmrgo_dmrd_data_set_call_hint(dmrgo_dmrd_data_t *self, const dmrgo_layer2_hint_t *h, const dmrgo_layer2_call_t *c);
/* Go: dmrd.Data.SetHint. SetHint sets Frame and Value from the burst kind in h, as a machine Output gives it: DMRGO_LAYER2_KIND_VOICE with a VoiceBurst of A to F, or DMRGO_LAYER2_KIND_DATA with a DataType. The position and data type errors wrap DMRGO_ERR_LAYER2_VOICE_POSITION and DMRGO_ERR_LAYER2_DATA_TYPE. */
int dmrgo_dmrd_data_set_hint(dmrgo_dmrd_data_t *self, const dmrgo_layer2_hint_t *h);
/* Go: dmrd.Data.String. String returns the fields of s as text, for printing. */
int dmrgo_dmrd_data_string(const dmrgo_dmrd_data_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.DecodeBridge. DecodeBridge decodes the OpenBridge data packet p: a 73-octet DMRD or an 85 or 89-octet DMRE packet. It returns DMRGO_ERR_DMRD_COMMAND when p is neither, DMRGO_ERR_DMRD_SHORT or DMRGO_ERR_DMRD_LENGTH for another length, DMRGO_ERR_DMRD_SIGNATURE when the version octet of a DMRE packet is not 4 for 85 octets or 5 for 89, and the errors of DecodeData. */
int dmrgo_dmrd_decode_bridge(const uint8_t *p, size_t p_len, dmrgo_dmrd_bridge_t *out);
/* Go: dmrd.DecodeBridgeControl. DecodeBridgeControl decodes the FreeDMR OpenBridge control packet p. It returns DMRGO_ERR_DMRD_COMMAND when p is not one, and DMRGO_ERR_DMRD_SHORT and DMRGO_ERR_DMRD_LENGTH for a wrong length. */
int dmrgo_dmrd_decode_bridge_control(const uint8_t *p, size_t p_len, dmrgo_dmrd_bridge_control_t *out);
/* Go: dmrd.DecodeControl. DecodeControl decodes the control message p of dialect d. It returns DMRGO_ERR_DMRD_COMMAND when p is not a control message of d, and DMRGO_ERR_DMRD_SHORT, DMRGO_ERR_DMRD_LENGTH and DMRGO_ERR_DMRD_TEXT as DecodeData does. */
int dmrgo_dmrd_decode_control(const uint8_t *p, size_t p_len, dmrgo_dmrd_dialect_t d, dmrgo_dmrd_control_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: dmrd.DecodeData. DecodeData decodes a Data from data, a frame of 53, 55 or 71 octets. It returns DMRGO_ERR_DMRD_SHORT when data is shorter than 53 octets, DMRGO_ERR_DMRD_LENGTH when its length is not one of these and DMRGO_ERR_DMRD_SIGNATURE when octets 0 to 3 do not hold "DMRD". */
int dmrgo_dmrd_decode_data(const uint8_t *data, size_t data_len, dmrgo_dmrd_data_t *out);
/* Go: dmrd.DecodeLocalPosition. DecodeLocalPosition decodes a LocalPosition from data, a frame of 14 octets. It returns DMRGO_ERR_DMRD_SHORT when data is shorter than 14 octets, DMRGO_ERR_DMRD_LENGTH when it is longer and DMRGO_ERR_DMRD_SIGNATURE when octets 0 to 3 do not hold "DMRG". */
int dmrgo_dmrd_decode_local_position(const uint8_t *data, size_t data_len, dmrgo_dmrd_local_position_t *out);
/* Go: dmrd.DecodeLocalTalkerAlias. DecodeLocalTalkerAlias decodes a LocalTalkerAlias from data, a frame of 15 octets. It returns DMRGO_ERR_DMRD_SHORT when data is shorter than 15 octets, DMRGO_ERR_DMRD_LENGTH when it is longer and DMRGO_ERR_DMRD_SIGNATURE when octets 0 to 3 do not hold "DMRA". */
int dmrgo_dmrd_decode_local_talker_alias(const uint8_t *data, size_t data_len, dmrgo_dmrd_local_talker_alias_t *out);
/* Go: dmrd.DecodePosition. DecodePosition decodes a Position from data, a frame of 14 or 18 octets. It returns DMRGO_ERR_DMRD_SHORT when data is shorter than 14 octets, DMRGO_ERR_DMRD_LENGTH when its length is not one of these and DMRGO_ERR_DMRD_SIGNATURE when octets 0 to 3 do not hold "DMRG". */
int dmrgo_dmrd_decode_position(const uint8_t *data, size_t data_len, dmrgo_dmrd_position_t *out);
/* Go: dmrd.DecodeTalkerAlias. DecodeTalkerAlias decodes a TalkerAlias from data, a frame of 15 or 19 octets. It returns DMRGO_ERR_DMRD_SHORT when data is shorter than 15 octets, DMRGO_ERR_DMRD_LENGTH when its length is not one of these and DMRGO_ERR_DMRD_SIGNATURE when octets 0 to 3 do not hold "DMRA". */
int dmrgo_dmrd_decode_talker_alias(const uint8_t *data, size_t data_len, dmrgo_dmrd_talker_alias_t *out);
/* Go: dmrd.Dialect.String. String returns the name of the dialect. */
int dmrgo_dmrd_dialect_string(dmrgo_dmrd_dialect_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.FrameType.String. String returns the name of the frame type. */
int dmrgo_dmrd_frame_type_string(dmrgo_dmrd_frame_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.HBRPConfig.Callsign. Callsign returns the callsign of the repeater. */
int dmrgo_dmrd_hbrp_config_callsign(const dmrgo_dmrd_hbrp_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.HBRPConfig.ColorCode. ColorCode returns the color code, 2 digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_hbrp_config_color_code(const dmrgo_dmrd_hbrp_config_t *self, dmrgo_enums_color_code_t *out);
/* Go: dmrd.HBRPConfig.Description. Description returns the description of the repeater as free text. */
int dmrgo_dmrd_hbrp_config_description(const dmrgo_dmrd_hbrp_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.HBRPConfig.Height. Height returns the antenna height above ground in meters, 3 digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_hbrp_config_height(const dmrgo_dmrd_hbrp_config_t *self, uint16_t *out);
/* Go: dmrd.HBRPConfig.ID. ID returns the repeater ID, 8 hex digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_hbrp_config_id(const dmrgo_dmrd_hbrp_config_t *self, uint32_t *out);
/* Go: dmrd.HBRPConfig.Latitude. Latitude returns the latitude as text, 8 characters, North positive. */
int dmrgo_dmrd_hbrp_config_latitude(const dmrgo_dmrd_hbrp_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.HBRPConfig.Location. Location returns the location of the repeater as free text. */
int dmrgo_dmrd_hbrp_config_location(const dmrgo_dmrd_hbrp_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.HBRPConfig.Longitude. Longitude returns the longitude as text, 9 characters, East positive. */
int dmrgo_dmrd_hbrp_config_longitude(const dmrgo_dmrd_hbrp_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.HBRPConfig.PackageID. PackageID returns the package and its version. */
int dmrgo_dmrd_hbrp_config_package_id(const dmrgo_dmrd_hbrp_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.HBRPConfig.Power. Power returns the transmit power in dBm, 2 digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_hbrp_config_power(const dmrgo_dmrd_hbrp_config_t *self, uint8_t *out);
/* Go: dmrd.HBRPConfig.RXFrequency. RXFrequency returns the receive frequency in Hz, 9 digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_hbrp_config_rx_frequency(const dmrgo_dmrd_hbrp_config_t *self, uint32_t *out);
/* Go: dmrd.HBRPConfig.Reset. Reset sets c to an empty HBRPConfig: the fixed octets, spaces in the text fields and zero in the number fields. */
int dmrgo_dmrd_hbrp_config_reset(dmrgo_dmrd_hbrp_config_t *self);
/* Go: dmrd.HBRPConfig.SetCallsign. SetCallsign sets the callsign of the repeater. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 8 octets. */
int dmrgo_dmrd_hbrp_config_set_callsign(dmrgo_dmrd_hbrp_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.HBRPConfig.SetColorCode. SetColorCode sets the color code, 2 digits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_hbrp_config_set_color_code(dmrgo_dmrd_hbrp_config_t *self, dmrgo_enums_color_code_t v);
/* Go: dmrd.HBRPConfig.SetDescription. SetDescription sets the description of the repeater as free text. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 20 octets. */
int dmrgo_dmrd_hbrp_config_set_description(dmrgo_dmrd_hbrp_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.HBRPConfig.SetHeight. SetHeight sets the antenna height above ground in meters, 3 digits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_hbrp_config_set_height(dmrgo_dmrd_hbrp_config_t *self, uint16_t v);
/* Go: dmrd.HBRPConfig.SetID. SetID sets the repeater ID, 8 hex digits. */
int dmrgo_dmrd_hbrp_config_set_id(dmrgo_dmrd_hbrp_config_t *self, uint32_t v);
/* Go: dmrd.HBRPConfig.SetLatitude. SetLatitude sets the latitude as text, 8 characters, North positive. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 8 octets. */
int dmrgo_dmrd_hbrp_config_set_latitude(dmrgo_dmrd_hbrp_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.HBRPConfig.SetLocation. SetLocation sets the location of the repeater as free text. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 20 octets. */
int dmrgo_dmrd_hbrp_config_set_location(dmrgo_dmrd_hbrp_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.HBRPConfig.SetLongitude. SetLongitude sets the longitude as text, 9 characters, East positive. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 9 octets. */
int dmrgo_dmrd_hbrp_config_set_longitude(dmrgo_dmrd_hbrp_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.HBRPConfig.SetPackageID. SetPackageID sets the package and its version. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 40 octets. */
int dmrgo_dmrd_hbrp_config_set_package_id(dmrgo_dmrd_hbrp_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.HBRPConfig.SetPower. SetPower sets the transmit power in dBm, 2 digits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_hbrp_config_set_power(dmrgo_dmrd_hbrp_config_t *self, uint8_t v);
/* Go: dmrd.HBRPConfig.SetRXFrequency. SetRXFrequency sets the receive frequency in Hz, 9 digits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_hbrp_config_set_rx_frequency(dmrgo_dmrd_hbrp_config_t *self, uint32_t v);
/* Go: dmrd.HBRPConfig.SetSoftwareID. SetSoftwareID sets the software and its version. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 40 octets. */
int dmrgo_dmrd_hbrp_config_set_software_id(dmrgo_dmrd_hbrp_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.HBRPConfig.SetTXFrequency. SetTXFrequency sets the transmit frequency in Hz, 9 digits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_hbrp_config_set_tx_frequency(dmrgo_dmrd_hbrp_config_t *self, uint32_t v);
/* Go: dmrd.HBRPConfig.SetURL. SetURL sets the web page of the repeater. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 124 octets. */
int dmrgo_dmrd_hbrp_config_set_url(dmrgo_dmrd_hbrp_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.HBRPConfig.SoftwareID. SoftwareID returns the software and its version. */
int dmrgo_dmrd_hbrp_config_software_id(const dmrgo_dmrd_hbrp_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.HBRPConfig.TXFrequency. TXFrequency returns the transmit frequency in Hz, 9 digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_hbrp_config_tx_frequency(const dmrgo_dmrd_hbrp_config_t *self, uint32_t *out);
/* Go: dmrd.HBRPConfig.URL. URL returns the web page of the repeater. */
int dmrgo_dmrd_hbrp_config_url(const dmrgo_dmrd_hbrp_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.HBRPConfigOf. It copies p into *out, which does not keep p. */
int dmrgo_dmrd_hbrp_config_of(const uint8_t *p, size_t p_len, dmrgo_dmrd_hbrp_config_t *out, bool *out_ok);
/* Go: dmrd.LocalPosition.AppendBinary. AppendBinary appends the 14 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_dmrd_local_position_append_binary(const dmrgo_dmrd_local_position_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: dmrd.LocalPosition.LC. LC decodes the position as dmrgo_dmrd_position_lc does. */
int dmrgo_dmrd_local_position_lc(const dmrgo_dmrd_local_position_t *self, dmrgo_pdu_full_link_control_t *out);
/* Go: dmrd.LocalPosition.String. String returns the fields of s as text, for printing. */
int dmrgo_dmrd_local_position_string(const dmrgo_dmrd_local_position_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.LocalTalkerAlias.AppendBinary. AppendBinary appends the 15 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_dmrd_local_talker_alias_append_binary(const dmrgo_dmrd_local_talker_alias_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: dmrd.LocalTalkerAlias.LC. LC decodes the talker alias block as dmrgo_dmrd_talker_alias_lc does. */
int dmrgo_dmrd_local_talker_alias_lc(const dmrgo_dmrd_local_talker_alias_t *self, dmrgo_pdu_full_link_control_t *out);
/* Go: dmrd.LocalTalkerAlias.String. String returns the fields of s as text, for printing. */
int dmrgo_dmrd_local_talker_alias_string(const dmrgo_dmrd_local_talker_alias_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.MMDVMConfig.Callsign. Callsign returns the callsign of the repeater. */
int dmrgo_dmrd_mmdvm_config_callsign(const dmrgo_dmrd_mmdvm_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.MMDVMConfig.ColorCode. ColorCode returns the color code, 2 digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_mmdvm_config_color_code(const dmrgo_dmrd_mmdvm_config_t *self, dmrgo_enums_color_code_t *out);
/* Go: dmrd.MMDVMConfig.Description. Description returns the description of the repeater as free text. */
int dmrgo_dmrd_mmdvm_config_description(const dmrgo_dmrd_mmdvm_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.MMDVMConfig.Height. Height returns the antenna height above ground in meters, 3 digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_mmdvm_config_height(const dmrgo_dmrd_mmdvm_config_t *self, uint16_t *out);
/* Go: dmrd.MMDVMConfig.ID. ID returns the repeater ID. */
int dmrgo_dmrd_mmdvm_config_id(const dmrgo_dmrd_mmdvm_config_t *self, uint32_t *out);
/* Go: dmrd.MMDVMConfig.Latitude. Latitude returns the latitude as text, 8 characters, North positive. */
int dmrgo_dmrd_mmdvm_config_latitude(const dmrgo_dmrd_mmdvm_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.MMDVMConfig.Location. Location returns the location of the repeater as free text. */
int dmrgo_dmrd_mmdvm_config_location(const dmrgo_dmrd_mmdvm_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.MMDVMConfig.Longitude. Longitude returns the longitude as text, 9 characters, East positive. */
int dmrgo_dmrd_mmdvm_config_longitude(const dmrgo_dmrd_mmdvm_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.MMDVMConfig.PackageID. PackageID returns the package and its version. */
int dmrgo_dmrd_mmdvm_config_package_id(const dmrgo_dmrd_mmdvm_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.MMDVMConfig.Power. Power returns the transmit power in dBm, 2 digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_mmdvm_config_power(const dmrgo_dmrd_mmdvm_config_t *self, uint8_t *out);
/* Go: dmrd.MMDVMConfig.RXFrequency. RXFrequency returns the receive frequency in Hz, 9 digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_mmdvm_config_rx_frequency(const dmrgo_dmrd_mmdvm_config_t *self, uint32_t *out);
/* Go: dmrd.MMDVMConfig.Reset. Reset sets c to an empty MMDVMConfig: the fixed octets, spaces in the text fields and zero in the number fields. */
int dmrgo_dmrd_mmdvm_config_reset(dmrgo_dmrd_mmdvm_config_t *self);
/* Go: dmrd.MMDVMConfig.SetCallsign. SetCallsign sets the callsign of the repeater. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 8 octets. */
int dmrgo_dmrd_mmdvm_config_set_callsign(dmrgo_dmrd_mmdvm_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.MMDVMConfig.SetColorCode. SetColorCode sets the color code, 2 digits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_mmdvm_config_set_color_code(dmrgo_dmrd_mmdvm_config_t *self, dmrgo_enums_color_code_t v);
/* Go: dmrd.MMDVMConfig.SetDescription. SetDescription sets the description of the repeater as free text. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 19 octets. */
int dmrgo_dmrd_mmdvm_config_set_description(dmrgo_dmrd_mmdvm_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.MMDVMConfig.SetHeight. SetHeight sets the antenna height above ground in meters, 3 digits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_mmdvm_config_set_height(dmrgo_dmrd_mmdvm_config_t *self, uint16_t v);
/* Go: dmrd.MMDVMConfig.SetID. SetID sets the repeater ID. */
int dmrgo_dmrd_mmdvm_config_set_id(dmrgo_dmrd_mmdvm_config_t *self, uint32_t v);
/* Go: dmrd.MMDVMConfig.SetLatitude. SetLatitude sets the latitude as text, 8 characters, North positive. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 8 octets. */
int dmrgo_dmrd_mmdvm_config_set_latitude(dmrgo_dmrd_mmdvm_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.MMDVMConfig.SetLocation. SetLocation sets the location of the repeater as free text. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 20 octets. */
int dmrgo_dmrd_mmdvm_config_set_location(dmrgo_dmrd_mmdvm_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.MMDVMConfig.SetLongitude. SetLongitude sets the longitude as text, 9 characters, East positive. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 9 octets. */
int dmrgo_dmrd_mmdvm_config_set_longitude(dmrgo_dmrd_mmdvm_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.MMDVMConfig.SetPackageID. SetPackageID sets the package and its version. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 40 octets. */
int dmrgo_dmrd_mmdvm_config_set_package_id(dmrgo_dmrd_mmdvm_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.MMDVMConfig.SetPower. SetPower sets the transmit power in dBm, 2 digits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_mmdvm_config_set_power(dmrgo_dmrd_mmdvm_config_t *self, uint8_t v);
/* Go: dmrd.MMDVMConfig.SetRXFrequency. SetRXFrequency sets the receive frequency in Hz, 9 digits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_mmdvm_config_set_rx_frequency(dmrgo_dmrd_mmdvm_config_t *self, uint32_t v);
/* Go: dmrd.MMDVMConfig.SetSlots. SetSlots sets the slots digit: 1 or 2 for one slot, 3 for both in duplex, 4 for simplex (DMO). It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_mmdvm_config_set_slots(dmrgo_dmrd_mmdvm_config_t *self, uint8_t v);
/* Go: dmrd.MMDVMConfig.SetSoftwareID. SetSoftwareID sets the software and its version. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 40 octets. */
int dmrgo_dmrd_mmdvm_config_set_software_id(dmrgo_dmrd_mmdvm_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.MMDVMConfig.SetTXFrequency. SetTXFrequency sets the transmit frequency in Hz, 9 digits. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v does not fit. */
int dmrgo_dmrd_mmdvm_config_set_tx_frequency(dmrgo_dmrd_mmdvm_config_t *self, uint32_t v);
/* Go: dmrd.MMDVMConfig.SetURL. SetURL sets the web page of the repeater. It pads v with spaces, and returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when v is longer than 124 octets. */
int dmrgo_dmrd_mmdvm_config_set_url(dmrgo_dmrd_mmdvm_config_t *self, const uint8_t *v, size_t v_len);
/* Go: dmrd.MMDVMConfig.Slots. Slots returns the slots digit: 1 or 2 for one slot, 3 for both in duplex, 4 for simplex (DMO). It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_mmdvm_config_slots(const dmrgo_dmrd_mmdvm_config_t *self, uint8_t *out);
/* Go: dmrd.MMDVMConfig.SoftwareID. SoftwareID returns the software and its version. */
int dmrgo_dmrd_mmdvm_config_software_id(const dmrgo_dmrd_mmdvm_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.MMDVMConfig.TXFrequency. TXFrequency returns the transmit frequency in Hz, 9 digits. It returns DMRGO_ERR_DMRD_TEXT when the field holds a character that is not a digit. */
int dmrgo_dmrd_mmdvm_config_tx_frequency(const dmrgo_dmrd_mmdvm_config_t *self, uint32_t *out);
/* Go: dmrd.MMDVMConfig.URL. URL returns the web page of the repeater. */
int dmrgo_dmrd_mmdvm_config_url(const dmrgo_dmrd_mmdvm_config_t *self, uint8_t *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.MMDVMConfigOf. It copies p into *out, which does not keep p. It returns DMRGO_ERR_DMRD_SHORT, DMRGO_ERR_DMRD_LENGTH, or DMRGO_ERR_DMRD_SIGNATURE when p does not start with "RPTC". */
int dmrgo_dmrd_mmdvm_config_of(const uint8_t *p, size_t p_len, dmrgo_dmrd_mmdvm_config_t *out, bool *out_ok);
/* Go: dmrd.ParseDMRPlusOptions. ParseDMRPlusOptions parses a DMR+ startup options text: Key=Value pairs separated by semicolons, with spaces around them ignored. It skips pairs with an unknown key or without "=", and returns DMRGO_ERR_DMRD_TEXT, with the options parsed so far, when a value is not a decimal number below 2^32. */
int dmrgo_dmrd_parse_dmr_plus_options(const uint8_t *text, size_t text_len, dmrgo_dmrd_dmr_plus_options_t *out);
/* Go: dmrd.ParseFreeDMROptions. ParseFreeDMROptions parses a FreeDMR options text as FreeDMR does: Key=Value pairs separated by semicolons, keys in the exact case, the last pair of a key wins, and pairs with no "=" or more than one are skipped. It returns DMRGO_ERR_DMRD_TEXT and no options for a text longer than DMRGO_DMRD_MAX_FREE_DMR_OPTIONS_LEN, and DMRGO_ERR_DMRD_TEXT with all the valid options when a value is not a number, or is out of range for a 0 or 1 option or DirectDialSlot. */
int dmrgo_dmrd_parse_free_dmr_options(const uint8_t *text, size_t text_len, dmrgo_dmrd_free_dmr_options_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: dmrd.Position.AppendBinary. AppendBinary appends the 14 or 18 octets of s to dst: Size selects the length, and 0 means 14. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit, or an error that wraps DMRGO_ERR_DMRD_LENGTH when Size is not one of the lengths. */
int dmrgo_dmrd_position_append_binary(const dmrgo_dmrd_position_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: dmrd.Position.LC. LC decodes the position as the GPS Info Full LC it came from: FLCO GPS Info, standard FID, and Data. It returns DMRGO_ERR_ARG for a NULL self. */
int dmrgo_dmrd_position_lc(const dmrgo_dmrd_position_t *self, dmrgo_pdu_full_link_control_t *out);
/* Go: dmrd.Position.String. String returns the fields of s as text, for printing. */
int dmrgo_dmrd_position_string(const dmrgo_dmrd_position_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrd.RepeaterID. RepeaterID returns the repeater ID of the message p of dialect d, by its command as Classify gives it: the repeater of a DMRD, DMRA or DMRG, the ID of an RPTC, and the ID of every control message that carries one. */
int dmrgo_dmrd_repeater_id(const uint8_t *p, size_t p_len, dmrgo_dmrd_dialect_t d, uint32_t *id, bool *ok);
/* Go: dmrd.TalkerAlias.AppendBinary. AppendBinary appends the 15 or 19 octets of s to dst: Size selects the length, and 0 means 15. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit, or an error that wraps DMRGO_ERR_DMRD_LENGTH when Size is not one of the lengths. */
int dmrgo_dmrd_talker_alias_append_binary(const dmrgo_dmrd_talker_alias_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: dmrd.TalkerAlias.LC. LC decodes the talker alias block as the Full LC it came from: FLCO Talker Alias Header plus Type, standard FID, and Data. It returns a DMRGO_ERR_FIELD_RANGE when Type is above 3, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_dmrd_talker_alias_lc(const dmrgo_dmrd_talker_alias_t *self, dmrgo_pdu_full_link_control_t *out);
/* Go: dmrd.TalkerAlias.String. String returns the fields of s as text, for printing. */
int dmrgo_dmrd_talker_alias_string(const dmrgo_dmrd_talker_alias_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_dmrdauth_bridge_key_free frees the handle. self may be NULL. */
int dmrgo_dmrdauth_bridge_key_free(dmrgo_dmrdauth_bridge_key_t *self);
/* Go: dmrdauth.BridgeKey.SignInPlace. SignInPlace writes the signature of the OpenBridge packet p, as dmrgo_dmrd_bridge_append_binary and dmrgo_dmrd_bridge_control_append_binary encode it with space for the signature, into its last octets: HMAC-SHA1 over the first 53 octets of a version 1 packet and over the tag (and talkgroup and stream of BCSQ, or only the version octet of BCVE) of a control packet, and keyed BLAKE2b-128 over the octets before the hash of a DMRE packet. It changes nothing and returns an error that wraps DMRGO_ERR_DMRD_COMMAND when the packet is none of these, and DMRGO_ERR_HANDLE for a NULL self. */
int dmrgo_dmrdauth_bridge_key_sign_in_place(dmrgo_dmrdauth_bridge_key_t *self, uint8_t *p, size_t p_len);
/* dmrgo_dmrdauth_bridge_key_verify_need sets *items and *arena to the room that dmrgo_dmrdauth_bridge_key_verify needs for these arguments, without a change to the handle. */
int dmrgo_dmrdauth_bridge_key_verify_need(dmrgo_dmrdauth_bridge_key_t *self, const uint8_t *p, size_t p_len, size_t *items, size_t *arena);
/* Go: dmrdauth.BridgeKey.Verify. Verify reports whether the OpenBridge packet p carries the signature of the key, as SignInPlace would write it, and then returns p without its signature. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdauth_bridge_key_verify_need gives. */
int dmrgo_dmrdauth_bridge_key_verify(dmrgo_dmrdauth_bridge_key_t *self, const uint8_t *p, size_t p_len, uint8_t *body, size_t body_cap, size_t *body_len, size_t *body_need, bool *ok);
/* Go: dmrdauth.NewBridgeKey. NewBridgeKey returns a BridgeKey for key, the passphrase of the OpenBridge link as plain octets. */
int dmrgo_dmrdauth_new_bridge_key(const uint8_t *key, size_t key_len, dmrgo_dmrdauth_bridge_key_t **out);
/* Go: dmrdauth.Token. Token returns the login token of an RPTK message for the salt of the master and the password: SHA-256 of the salt and the password. It returns an error that wraps DMRGO_ERR_DMRD_COMMAND for another dialect, and does not allocate. */
int dmrgo_dmrdauth_token(dmrgo_dmrd_dialect_t d, uint32_t salt, const uint8_t *password, size_t password_len, uint8_t out[32]);
/* Go: dmrdauth.VerifyToken. VerifyToken reports whether token, from an RPTK message, is the login token of the salt and the password, as Token computes it. */
int dmrgo_dmrdauth_verify_token(dmrgo_dmrd_dialect_t d, uint32_t salt, const uint8_t *password, size_t password_len, const uint8_t *token, size_t token_len, bool *out);
/* dmrgo_dmrdsession_bridge_free frees the handle. self may be NULL. */
int dmrgo_dmrdsession_bridge_free(dmrgo_dmrdsession_bridge_t *self);
/* Go: dmrdsession.Bridge.Deadline. Deadline returns the time at which the Bridge needs a Tick. */
int dmrgo_dmrdsession_bridge_deadline(dmrgo_dmrdsession_bridge_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_dmrdsession_bridge_packet_need sets *items and *arena to the room that dmrgo_dmrdsession_bridge_packet needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_bridge_packet_need(dmrgo_dmrdsession_bridge_t *self, dmrgo_duration_t now, const uint8_t *p, size_t p_len, size_t *items, size_t *arena);
/* Go: dmrdsession.Bridge.Packet. Packet takes the packet p from the peer. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_bridge_packet_need gives. */
int dmrgo_dmrdsession_bridge_packet(dmrgo_dmrdsession_bridge_t *self, dmrgo_duration_t now, const uint8_t *p, size_t p_len, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: dmrdsession.Bridge.SignInPlace. SignInPlace writes the signature of the OpenBridge packet p into its last octets, as dmrgo_dmrdauth_bridge_key_sign_in_place does. It returns DMRGO_ERR_ZERO_VALUE for a Bridge that NewBridge did not make. */
int dmrgo_dmrdsession_bridge_sign_in_place(dmrgo_dmrdsession_bridge_t *self, uint8_t *p, size_t p_len);
/* Go: dmrdsession.Bridge.State. State returns DMRGO_DMRDSESSION_STATE_RUNNING when the peer sent a packet with a good signature within Timeout, with or without dmrgo_dmrdsession_bridge_config_t.enhanced, and DMRGO_DMRDSESSION_STATE_IDLE before that and after. */
int dmrgo_dmrdsession_bridge_state(dmrgo_dmrdsession_bridge_t *self, dmrgo_dmrdsession_state_t *out);
/* dmrgo_dmrdsession_bridge_tick_need sets *items and *arena to the room that dmrgo_dmrdsession_bridge_tick needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_bridge_tick_need(dmrgo_dmrdsession_bridge_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: dmrdsession.Bridge.Tick. Tick reports DMRGO_DMRDSESSION_OUTPUT_DOWN with DMRGO_DMRDSESSION_REASON_TIMEOUT when the peer sent nothing for Timeout, and sends the BCKA of an enhanced Bridge when it is due, the first at the first Tick. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_bridge_tick_need gives. */
int dmrgo_dmrdsession_bridge_tick(dmrgo_dmrdsession_bridge_t *self, dmrgo_duration_t now, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_dmrdsession_master_free frees the handle. self may be NULL. */
int dmrgo_dmrdsession_master_free(dmrgo_dmrdsession_master_t *self);
/* dmrgo_dmrdsession_master_accept_need sets *items and *arena to the room that dmrgo_dmrdsession_master_accept needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_master_accept_need(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: dmrdsession.Master.Accept. Accept answers the RPTC of DMRGO_DMRDSESSION_OUTPUT_CONFIG with an acknowledgement. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_master_accept_need gives. */
int dmrgo_dmrdsession_master_accept(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_dmrdsession_master_admit_need sets *items and *arena to the room that dmrgo_dmrdsession_master_admit needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_master_admit_need(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, uint32_t salt, const uint8_t *password, size_t password_len, size_t *items, size_t *arena);
/* Go: dmrdsession.Master.Admit. Admit answers the RPTL of DMRGO_DMRDSESSION_OUTPUT_LOGIN with the salt, which the caller draws at random, and keeps the login token of the salt and the password of the repeater, of any length, to check the RPTK. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_master_admit_need gives. */
int dmrgo_dmrdsession_master_admit(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, uint32_t salt, const uint8_t *password, size_t password_len, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_dmrdsession_master_close_need sets *items and *arena to the room that dmrgo_dmrdsession_master_close needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_master_close_need(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: dmrdsession.Master.Close. Close ends a session with MSTCL, as a master that shuts down sends it, and DMRGO_DMRDSESSION_OUTPUT_DOWN with DMRGO_DMRDSESSION_REASON_STOPPED. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_master_close_need gives. */
int dmrgo_dmrdsession_master_close(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: dmrdsession.Master.Deadline. Deadline returns the time at which the Master needs a Tick. */
int dmrgo_dmrdsession_master_deadline(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t *at, bool *ok);
/* Go: dmrdsession.Master.ID. ID returns the repeater ID of the session, from its last RPTL. */
int dmrgo_dmrdsession_master_id(dmrgo_dmrdsession_master_t *self, uint32_t *out);
/* dmrgo_dmrdsession_master_packet_need sets *items and *arena to the room that dmrgo_dmrdsession_master_packet needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_master_packet_need(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, const uint8_t *b, size_t b_len, size_t *items, size_t *arena);
/* Go: dmrdsession.Master.Packet. Packet takes the packet b from the repeater. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_master_packet_need gives. */
int dmrgo_dmrdsession_master_packet(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, const uint8_t *b, size_t b_len, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_dmrdsession_master_refuse_need sets *items and *arena to the room that dmrgo_dmrdsession_master_refuse needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_master_refuse_need(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: dmrdsession.Master.Refuse. Refuse answers the RPTL of DMRGO_DMRDSESSION_OUTPUT_LOGIN or the RPTC of DMRGO_DMRDSESSION_OUTPUT_CONFIG, or ends a session, with MSTNAK and DMRGO_DMRDSESSION_OUTPUT_DOWN with DMRGO_DMRDSESSION_REASON_REFUSED. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_master_refuse_need gives. */
int dmrgo_dmrdsession_master_refuse(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: dmrdsession.Master.Reset. Reset ends the session without a packet or an output. */
int dmrgo_dmrdsession_master_reset(dmrgo_dmrdsession_master_t *self);
/* dmrgo_dmrdsession_master_resume_need sets *items and *arena to the room that dmrgo_dmrdsession_master_resume needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_master_resume_need(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, uint32_t id, size_t *items, size_t *arena);
/* Go: dmrdsession.Master.Resume. Resume starts the logged-in session of the repeater id without a login, for a repeater that logged in to another Master, such as one of another replica of a server, and now sends its packets here. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_master_resume_need gives. */
int dmrgo_dmrdsession_master_resume(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, uint32_t id, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: dmrdsession.Master.State. State returns the state of the session. */
int dmrgo_dmrdsession_master_state(dmrgo_dmrdsession_master_t *self, dmrgo_dmrdsession_state_t *out);
/* dmrgo_dmrdsession_master_tick_need sets *items and *arena to the room that dmrgo_dmrdsession_master_tick needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_master_tick_need(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: dmrdsession.Master.Tick. Tick ends the session with DMRGO_DMRDSESSION_OUTPUT_DOWN and DMRGO_DMRDSESSION_REASON_TIMEOUT when the repeater sent nothing for Timeout. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_master_tick_need gives. */
int dmrgo_dmrdsession_master_tick(dmrgo_dmrdsession_master_t *self, dmrgo_duration_t now, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: dmrdsession.NewBridge. NewBridge returns a Bridge for cfg. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL cfg and a DMRGO_ERR_CONFIG for a negative Keepalive or Timeout. cfg may be NULL. */
int dmrgo_dmrdsession_new_bridge(const dmrgo_dmrdsession_bridge_config_t *cfg, dmrgo_dmrdsession_bridge_t **out);
/* Go: dmrdsession.NewMaster. NewMaster returns a Master for cfg in DMRGO_DMRDSESSION_STATE_IDLE. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL cfg and a DMRGO_ERR_CONFIG for a Dialect other than DMRGO_DMRD_DIALECT_MMDVM or DMRGO_DMRD_DIALECT_HBRP, or a negative Timeout or LoginTimeout. cfg may be NULL. */
int dmrgo_dmrdsession_new_master(const dmrgo_dmrdsession_master_config_t *cfg, dmrgo_dmrdsession_master_t **out);
/* Go: dmrdsession.NewPeer. NewPeer returns a Peer for cfg. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL cfg and a DMRGO_ERR_CONFIG for a Dialect other than DMRGO_DMRD_DIALECT_MMDVM or DMRGO_DMRD_DIALECT_HBRP, a Config that is not an RPTC of the dialect for ID, Options in DMRGO_DMRD_DIALECT_HBRP or longer than DMRGO_DMRDSESSION_MAX_OPTIONS, or a negative timer. cfg may be NULL. */
int dmrgo_dmrdsession_new_peer(const dmrgo_dmrdsession_peer_config_t *cfg, dmrgo_dmrdsession_peer_t **out);
/* Go: dmrdsession.OutputKind.String. String returns the name of the OutputKind. */
int dmrgo_dmrdsession_output_kind_string(dmrgo_dmrdsession_output_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_dmrdsession_peer_free frees the handle. self may be NULL. */
int dmrgo_dmrdsession_peer_free(dmrgo_dmrdsession_peer_t *self);
/* dmrgo_dmrdsession_peer_close_need sets *items and *arena to the room that dmrgo_dmrdsession_peer_close needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_peer_close_need(dmrgo_dmrdsession_peer_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: dmrdsession.Peer.Close. Close ends the session: it sends RPTCL when the Peer is logged in, as DMRGateway does when it closes, and reports DMRGO_DMRDSESSION_OUTPUT_DOWN with DMRGO_DMRDSESSION_REASON_STOPPED. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_peer_close_need gives. */
int dmrgo_dmrdsession_peer_close(dmrgo_dmrdsession_peer_t *self, dmrgo_duration_t now, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: dmrdsession.Peer.Deadline. Deadline returns the time at which the Peer needs a Tick. */
int dmrgo_dmrdsession_peer_deadline(dmrgo_dmrdsession_peer_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_dmrdsession_peer_packet_need sets *items and *arena to the room that dmrgo_dmrdsession_peer_packet needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_peer_packet_need(dmrgo_dmrdsession_peer_t *self, dmrgo_duration_t now, const uint8_t *b, size_t b_len, size_t *items, size_t *arena);
/* Go: dmrdsession.Peer.Packet. Packet takes the packet b from the master. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_peer_packet_need gives. */
int dmrgo_dmrdsession_peer_packet(dmrgo_dmrdsession_peer_t *self, dmrgo_duration_t now, const uint8_t *b, size_t b_len, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: dmrdsession.Peer.Reset. Reset ends the session without a packet and makes the Peer as NewPeer returned it, so the next Tick sends the RPTL. */
int dmrgo_dmrdsession_peer_reset(dmrgo_dmrdsession_peer_t *self);
/* Go: dmrdsession.Peer.State. State returns the state of the Peer. */
int dmrgo_dmrdsession_peer_state(dmrgo_dmrdsession_peer_t *self, dmrgo_dmrdsession_state_t *out);
/* dmrgo_dmrdsession_peer_tick_need sets *items and *arena to the room that dmrgo_dmrdsession_peer_tick needs for these arguments, without a change to the handle. */
int dmrgo_dmrdsession_peer_tick_need(dmrgo_dmrdsession_peer_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: dmrdsession.Peer.Tick. Tick runs the timers that are due at now: the first RPTL, the sends again of the login step, the pings, the timeout and the new login. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dmrdsession_peer_tick_need gives. */
int dmrgo_dmrdsession_peer_tick(dmrgo_dmrdsession_peer_t *self, dmrgo_duration_t now, dmrgo_dmrdsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: dmrdsession.Reason.String. String returns the name of the Reason. */
int dmrgo_dmrdsession_reason_string(dmrgo_dmrdsession_reason_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dmrdsession.State.String. String returns the name of the State. */
int dmrgo_dmrdsession_state_string(dmrgo_dmrdsession_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hytera.DecodeFrame. DecodeFrame decodes the 72-octet DMR frame p. It returns DMRGO_ERR_HYTERA_SHORT, DMRGO_ERR_HYTERA_LENGTH, or DMRGO_ERR_HYTERA_CODE for a slot or color code field that is not one of its values. */
int dmrgo_hytera_decode_frame(const uint8_t *p, size_t p_len, dmrgo_hytera_frame_t *out);
/* Go: hytera.DecodeHeartbeat. DecodeHeartbeat decodes a heartbeat (20 octets) or a keepalive (1 octet). It returns DMRGO_ERR_HYTERA_SHORT, DMRGO_ERR_HYTERA_LENGTH, or DMRGO_ERR_HYTERA_SIGNATURE when a heartbeat does not start with "ZZZZ". */
int dmrgo_hytera_decode_heartbeat(const uint8_t *p, size_t p_len, dmrgo_hytera_heartbeat_t *out);
/* Go: hytera.DecodeP2P. DecodeP2P decodes the P2P command p. It returns DMRGO_ERR_HYTERA_SHORT, or DMRGO_ERR_HYTERA_SIGNATURE when p does not start with "P2P". */
int dmrgo_hytera_decode_p2p(const uint8_t *p, size_t p_len, dmrgo_hytera_p2p_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: hytera.Frame.AppendBinary. AppendBinary appends the 72-octet frame to dst. It returns dst unchanged and an error that wraps DMRGO_ERR_HYTERA_CODE when Slot is not DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, and a DMRGO_ERR_FIELD_RANGE when ColorCode is above 15 or Destination or Source does not fit in 24 bits. A NULL f gives DMRGO_ERR_NIL_RECEIVER. */
int dmrgo_hytera_frame_append_binary(const dmrgo_hytera_frame_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hytera.Frame.Call. Call returns the call of the frame: target is Destination and source is Source. */
int dmrgo_hytera_frame_call(const dmrgo_hytera_frame_t *self, bool *group, uint32_t *target, uint32_t *source);
/* Go: hytera.Frame.HasBurst. HasBurst reports whether Burst holds a burst: false for DMRGO_HYTERA_SLOT_TYPE_SYNC and DMRGO_HYTERA_SLOT_TYPE_WAKEUP, whose payload is not an ETSI burst, and for a NULL f. */
int dmrgo_hytera_frame_has_burst(const dmrgo_hytera_frame_t *self, bool *out);
/* Go: hytera.Frame.Hint. Hint returns the data that the frame gives about its burst, for the service machines: the slot, the voice position or data type from SlotType, and the sequence number (8 bits), and now, the time at which the frame arrived, as At. */
int dmrgo_hytera_frame_hint(const dmrgo_hytera_frame_t *self, dmrgo_duration_t now, dmrgo_layer2_hint_t *out);
/* Go: hytera.Frame.SetCall. SetCall sets CallType to 0x01 for a group call and 0x00 for a private call, as a Hytera repeater sends them, and Destination and Source. It returns a DMRGO_ERR_FIELD_RANGE when target or source does not fit in 24 bits, and DMRGO_ERR_ARG for a NULL self, and then changes nothing. */
int dmrgo_hytera_frame_set_call(dmrgo_hytera_frame_t *self, bool group, uint32_t target, uint32_t source);
/* Go: hytera.Frame.SetCallHint. SetCallHint sets the call as SetCall does and the slot type as SetHint does, from the Call and Hint of a machine Output. */
int dmrgo_hytera_frame_set_call_hint(dmrgo_hytera_frame_t *self, const dmrgo_layer2_hint_t *h, const dmrgo_layer2_call_t *c);
/* Go: hytera.Frame.SetHint. SetHint sets SlotType from the burst kind in h, as a machine Output gives it: DMRGO_LAYER2_KIND_VOICE with a VoiceBurst of A to F, or DMRGO_LAYER2_KIND_DATA with a DataType. The kind, position and data type errors wrap DMRGO_ERR_LAYER2_KIND, DMRGO_ERR_LAYER2_VOICE_POSITION and DMRGO_ERR_LAYER2_DATA_TYPE. */
int dmrgo_hytera_frame_set_hint(dmrgo_hytera_frame_t *self, const dmrgo_layer2_hint_t *h);
/* Go: hytera.Heartbeat.AppendBinary. AppendBinary appends the heartbeat, or the keepalive, to dst. It returns DMRGO_ERR_ARG for a NULL self. */
int dmrgo_hytera_heartbeat_append_binary(const dmrgo_hytera_heartbeat_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hytera.P2P.AppendBinary. AppendBinary appends the command and its body to dst. It returns DMRGO_ERR_ARG for a NULL self. */
int dmrgo_hytera_p2p_append_binary(const dmrgo_hytera_p2p_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: hytera.P2P.RedirectPort. RedirectPort returns the UDP port of a redirect: a body that ends in FF 01 and the port, little-endian. */
int dmrgo_hytera_p2p_redirect_port(const dmrgo_hytera_p2p_t *self, uint16_t *port, bool *ok);
/* Go: hytera.P2P.Service. Service returns octet 20, the service that the command is about. */
int dmrgo_hytera_p2p_service(const dmrgo_hytera_p2p_t *self, dmrgo_hytera_service_t *s, bool *ok);
/* Go: hytera.Service.String. String returns the name of the service. */
int dmrgo_hytera_service_string(dmrgo_hytera_service_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: hytera.SlotType.String. String returns the name of the slot type. */
int dmrgo_hytera_slot_type_string(dmrgo_hytera_slot_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ipsc.AppendPeerListReply. AppendPeerListReply appends a DMRGO_IPSC_OP_PEER_LIST_REPLY of master with entries to dst. */
int dmrgo_ipsc_append_peer_list_reply(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, uint32_t master, const dmrgo_ipsc_peer_entry_t *entries, size_t entries_len);
/* Go: ipsc.BurstType.DataType. DataType returns the DMR data type of a data burst, 0x00 to 0x08. */
int dmrgo_ipsc_burst_type_data_type(dmrgo_ipsc_burst_type_t self, dmrgo_enums_data_type_t *data_type, bool *ok);
/* Go: ipsc.BurstType.String. String returns the name of b: the data type, Voice, SyncLost or Raw, with " slot 2" when bit 7 is set. */
int dmrgo_ipsc_burst_type_string(dmrgo_ipsc_burst_type_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ipsc.BurstType.Type. Type returns b without bit 7, the slot 2 bit of voice and DMRGO_IPSC_BURST_SYNC_LOST, for a comparison with DMRGO_IPSC_BURST_VOICE, DMRGO_IPSC_BURST_SYNC_LOST, DMRGO_IPSC_BURST_RAW and the data types. */
int dmrgo_ipsc_burst_type_type(dmrgo_ipsc_burst_type_t self, dmrgo_ipsc_burst_type_t *out);
/* Go: ipsc.CallInfo.End. End reports bit 6, the end flag. */
int dmrgo_ipsc_call_info_end(dmrgo_ipsc_call_info_t self, bool *out);
/* Go: ipsc.CallInfo.Privacy. Privacy reports bit 7: the call is encrypted. */
int dmrgo_ipsc_call_info_privacy(dmrgo_ipsc_call_info_t self, bool *out);
/* Go: ipsc.CallInfo.SetEnd. SetEnd writes bit 6, the end flag. */
int dmrgo_ipsc_call_info_set_end(dmrgo_ipsc_call_info_t *self, bool on);
/* Go: ipsc.CallInfo.SetPrivacy. SetPrivacy writes bit 7, the call is encrypted. */
int dmrgo_ipsc_call_info_set_privacy(dmrgo_ipsc_call_info_t *self, bool on);
/* Go: ipsc.CallInfo.SetSlot. SetSlot writes bit 5: set for DMRGO_ENUMS_SLOT2, clear for DMRGO_ENUMS_SLOT1. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, for another slot, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_ipsc_call_info_set_slot(dmrgo_ipsc_call_info_t *self, dmrgo_enums_slot_t s);
/* Go: ipsc.CallInfo.Slot. Slot returns DMRGO_ENUMS_SLOT2 for bit 5 and DMRGO_ENUMS_SLOT1 otherwise. */
int dmrgo_ipsc_call_info_slot(dmrgo_ipsc_call_info_t self, dmrgo_enums_slot_t *out);
/* Go: ipsc.Control.AppendBinary. AppendBinary appends the packet c to dst, without the authentication trailer. Control holds no peer entries, so a DMRGO_IPSC_OP_PEER_LIST_REPLY appends an empty list, and with a ListLen other than 0 it returns dst unchanged and an error that wraps DMRGO_ERR_IPSC_LENGTH: use AppendPeerListReply for the entries. It returns dst unchanged and an error that wraps DMRGO_ERR_IPSC_COMMAND for an opcode that is not a peer control packet, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_ipsc_control_append_binary(const dmrgo_ipsc_control_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ipsc.DecodeControl. DecodeControl decodes the peer control packet p, without the authentication trailer (see package ipscauth). It returns DMRGO_ERR_IPSC_COMMAND for another opcode, and DMRGO_ERR_IPSC_SHORT or DMRGO_ERR_IPSC_LENGTH for a length that does not match the opcode. */
int dmrgo_ipsc_decode_control(const uint8_t *p, size_t p_len, dmrgo_ipsc_control_t *out);
/* Go: ipsc.DecodeRaw. DecodeRaw splits p into its opcode, sender ID and body. It returns DMRGO_ERR_IPSC_SHORT for a packet shorter than 5 octets. */
int dmrgo_ipsc_decode_raw(const uint8_t *p, size_t p_len, dmrgo_ipsc_raw_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ipsc.DecodeUser. DecodeUser decodes the user packet p, without the authentication trailer (see package ipscauth). It returns DMRGO_ERR_IPSC_COMMAND for another opcode, DMRGO_ERR_IPSC_SHORT, and DMRGO_ERR_IPSC_LENGTH when the length does not match a voice layout or a data packet is too short for its payload size. */
int dmrgo_ipsc_decode_user(const uint8_t *p, size_t p_len, dmrgo_ipsc_user_t *out);
/* Go: ipsc.Flags.Has. Has reports whether flag f is set. */
int dmrgo_ipsc_flags_has(const dmrgo_ipsc_flags_t *self, dmrgo_ipsc_flag_t flag, bool *out);
/* Go: ipsc.Flags.Set. Set sets or clears flag f. */
int dmrgo_ipsc_flags_set(dmrgo_ipsc_flags_t *self, dmrgo_ipsc_flag_t flag, bool on);
/* Go: ipsc.Mode.Analog. Analog reports that bits 5 and 4 hold analog. */
int dmrgo_ipsc_mode_analog(dmrgo_ipsc_mode_t self, bool *out);
/* Go: ipsc.Mode.Digital. Digital reports that bits 5 and 4 hold digital. */
int dmrgo_ipsc_mode_digital(dmrgo_ipsc_mode_t self, bool *out);
/* Go: ipsc.Mode.Operational. Operational reports bit 6, the peer is operational. */
int dmrgo_ipsc_mode_operational(dmrgo_ipsc_mode_t self, bool *out);
/* Go: ipsc.Mode.TS1. TS1 returns the 2-bit link state of slot 1, bits 3 and 2. */
int dmrgo_ipsc_mode_ts1(dmrgo_ipsc_mode_t self, uint8_t *out);
/* Go: ipsc.Mode.TS2. TS2 returns the 2-bit link state of slot 2, bits 1 and 0. */
int dmrgo_ipsc_mode_ts2(dmrgo_ipsc_mode_t self, uint8_t *out);
/* Go: ipsc.Opcode.String. String returns the name of the opcode. */
int dmrgo_ipsc_opcode_string(dmrgo_ipsc_opcode_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ipsc.Payload.RSSI. RSSI returns the last two trailer octets and whether the packet has them. */
int dmrgo_ipsc_payload_rssi(const dmrgo_ipsc_payload_t *self, uint16_t *value, bool *ok);
/* Go: ipsc.Payload.SlotType. SlotType returns the slot type octet of the trailer and whether the packet has one. */
int dmrgo_ipsc_payload_slot_type(const dmrgo_ipsc_payload_t *self, dmrgo_pdu_slot_type_info_t *slot_type_info, bool *ok);
/* dmrgo_ipsc_peer_list_new makes a zero dmrgo_ipsc_peer_list_t. */
int dmrgo_ipsc_peer_list_new(dmrgo_ipsc_peer_list_t **out);
/* dmrgo_ipsc_peer_list_free frees the handle. self may be NULL. */
int dmrgo_ipsc_peer_list_free(dmrgo_ipsc_peer_list_t *self);
/* Go: ipsc.PeerList.Entry. Entry returns entry i, or the zero PeerEntry when i is not below Len. */
int dmrgo_ipsc_peer_list_entry(dmrgo_ipsc_peer_list_t *self, int64_t i, dmrgo_ipsc_peer_entry_t *out);
/* Go: ipsc.PeerList.Len. Len returns the number of entries, 0 for a NULL l. */
int dmrgo_ipsc_peer_list_len(dmrgo_ipsc_peer_list_t *self, int64_t *out);
/* Go: ipsc.PeerListOf. It copies p into *out, which does not keep p. It returns DMRGO_ERR_IPSC_COMMAND for another opcode, DMRGO_ERR_IPSC_SHORT, and DMRGO_ERR_IPSC_LENGTH when the length field does not match the packet or is not a multiple of 11. */
int dmrgo_ipsc_peer_list_of(const uint8_t *p, size_t p_len, dmrgo_ipsc_peer_list_t *out);
/* Go: ipsc.Raw.AppendBinary. AppendBinary appends r to dst. It returns dst unchanged and DMRGO_ERR_ARG for a NULL self, and no other error. */
int dmrgo_ipsc_raw_append_binary(const dmrgo_ipsc_raw_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ipsc.Stream.Fill. Fill sets CallSeq, CallControl and the RTP header of u: Flags 0x80, the marker bit on the first packet of the call, PayloadType 0x5D, or 0x5E with the end flag of Info on the last packet, and Seq and Timestamp. u may be NULL. */
int dmrgo_ipsc_stream_fill(dmrgo_ipsc_stream_t *self, dmrgo_ipsc_user_t *u, bool last);
/* Go: ipsc.Stream.Skip. Skip counts Seq up by n and Timestamp by 480 for each of n bursts that were lost, so that the next packet shows the gap. */
int dmrgo_ipsc_stream_skip(dmrgo_ipsc_stream_t *self, uint16_t n);
/* Go: ipsc.User.AppendBinary. AppendBinary appends the packet u to dst, without the authentication trailer. It returns dst unchanged and an error for an opcode that is not a user packet, an unknown voice layout, a data payload that does not fit, and a DMRGO_ERR_FIELD_RANGE for a Source or Destination over 24 bits or a PayloadType over 7. A NULL u gives DMRGO_ERR_NIL_RECEIVER. */
int dmrgo_ipsc_user_append_binary(const dmrgo_ipsc_user_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ipsc.User.Call. Call returns the call of the packet: group for DMRGO_IPSC_OP_GROUP_VOICE and DMRGO_IPSC_OP_GROUP_DATA, target is Destination and source is Source. */
int dmrgo_ipsc_user_call(const dmrgo_ipsc_user_t *self, bool *group, uint32_t *target, uint32_t *source);
/* Go: ipsc.User.Hint. Hint returns the data that the packet gives about its burst, for the service machines: the slot from the call info, the RTP sequence number (16 bits), the call control as the stream, burst A or E from the voice layout (a dmrgo_layer2_position_tracker_t places B, C, D and F), the data type of a data packet, DMRGO_LAYER2_END_WEAK for the end flag on a voice packet, DMRGO_LAYER2_END_STRONG on a terminator or a data packet, SyncLost for DMRGO_IPSC_BURST_SYNC_LOST, and now, the time at which the packet arrived, as At. */
int dmrgo_ipsc_user_hint(const dmrgo_ipsc_user_t *self, dmrgo_duration_t now, dmrgo_layer2_hint_t *out);
/* Go: ipsc.User.IsVoice. IsVoice reports whether u carries a voice burst. */
int dmrgo_ipsc_user_is_voice(const dmrgo_ipsc_user_t *self, bool *out);
/* Go: ipsc.User.RawBurst. RawBurst rebuilds the 264-bit burst of the packet. */
int dmrgo_ipsc_user_raw_burst(const dmrgo_ipsc_user_t *self, dmrgo_enums_color_code_t cc, dmrgo_layer2_sync_source_t src, dmrgo_layer2_raw_burst_t *out);
/* Go: ipsc.User.SetCall. SetCall sets Destination, Source and the group or private opcode of the call. It returns a DMRGO_ERR_FIELD_RANGE, and changes nothing, when target or source does not fit in 24 bits, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_ipsc_user_set_call(dmrgo_ipsc_user_t *self, bool group, uint32_t target, uint32_t source);
/* Go: ipsc.User.SetRawBurst. SetRawBurst sets Burst and Voice or Data from the 264-bit burst raw and the burst kind in h, as a machine Output gives it, in the form an XPR 8400 sends: DMRGO_LAYER2_KIND_VOICE with a VoiceBurst of A to F, which picks the layout (the full LC of burst E stays as it is in self->voice.lc), or DMRGO_LAYER2_KIND_DATA with a DataType. The position and data type errors wrap DMRGO_ERR_LAYER2_VOICE_POSITION and DMRGO_ERR_LAYER2_DATA_TYPE. */
int dmrgo_ipsc_user_set_raw_burst(dmrgo_ipsc_user_t *self, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_fec_result_t *out);
/* Go: ipsc.UserOpcode. UserOpcode returns the opcode of a user packet: DMRGO_IPSC_OP_GROUP_VOICE, DMRGO_IPSC_OP_PRIVATE_VOICE, DMRGO_IPSC_OP_GROUP_DATA or DMRGO_IPSC_OP_PRIVATE_DATA. */
int dmrgo_ipsc_func_user_opcode(bool group, bool data, dmrgo_ipsc_opcode_t *out);
/* dmrgo_ipscauth_key_free frees the handle. self may be NULL. */
int dmrgo_ipscauth_key_free(dmrgo_ipscauth_key_t *self);
/* dmrgo_ipscauth_key_sign_need sets *items and *arena to the room that dmrgo_ipscauth_key_sign needs for these arguments, without a change to the handle. */
int dmrgo_ipscauth_key_sign_need(dmrgo_ipscauth_key_t *self, size_t *items, size_t *arena);
/* Go: ipscauth.Key.Sign. Sign appends the authentication trailer of the packet in dst to dst. It returns dst unchanged and DMRGO_ERR_HANDLE for a NULL self. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscauth_key_sign_need gives (DMRGO_IPSCAUTH_KEY_SIGN_MAX_ITEMS items). */
int dmrgo_ipscauth_key_sign(dmrgo_ipscauth_key_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_ipscauth_key_verify_need sets *items and *arena to the room that dmrgo_ipscauth_key_verify needs for these arguments, without a change to the handle. */
int dmrgo_ipscauth_key_verify_need(dmrgo_ipscauth_key_t *self, const uint8_t *p, size_t p_len, size_t *items, size_t *arena);
/* Go: ipscauth.Key.Verify. Verify reports whether the last DMRGO_IPSCAUTH_TRAILER_LEN octets of p are the trailer of the rest, and then returns the rest of p, the packet without its trailer. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscauth_key_verify_need gives. */
int dmrgo_ipscauth_key_verify(dmrgo_ipscauth_key_t *self, const uint8_t *p, size_t p_len, uint8_t *body, size_t body_cap, size_t *body_len, size_t *body_need, bool *ok);
/* Go: ipscauth.NewKey. NewKey returns a Key for the 20-octet key k. */
int dmrgo_ipscauth_new_key(const uint8_t k[20], dmrgo_ipscauth_key_t **out);
/* Go: ipscauth.ParseKey. ParseKey parses the hex key of a MOTOTRBO or DMRlink configuration: up to 40 hex digits, padded on the left with zeros to 20 octets as DMRlink does. It returns a DMRGO_ERR_FIELD_RANGE for more than 40 digits or a character that is not a hex digit, and does not allocate. */
int dmrgo_ipscauth_parse_key(const char *s, size_t s_len, uint8_t out[20]);
/* Go: ipscsession.AddrOf. AddrOf returns the Addr of the IP address ip and the UDP port port, as a UDP socket address holds them: ip is 4 octets, or 16 octets of an IPv4-mapped IPv6 address. */
int dmrgo_ipscsession_addr_of(const uint8_t *ip, size_t ip_len, int64_t port, dmrgo_ipscsession_addr_t *a, bool *ok);
/* Go: ipscsession.AliveVersionDefault. AliveVersionDefault returns the protocol version that a Peer or Master sends in a keepalive request or reply (0x96, 0x97) when its config leaves AliveVersion zero: 04 08 04 00, the version of an XPR 8400. */
int dmrgo_ipscsession_alive_version_default(uint8_t out[4]);
/* dmrgo_ipscsession_master_free frees the handle. self may be NULL. */
int dmrgo_ipscsession_master_free(dmrgo_ipscsession_master_t *self);
/* dmrgo_ipscsession_master_adopt_need sets *items and *arena to the room that dmrgo_ipscsession_master_adopt needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_master_adopt_need(dmrgo_ipscsession_master_t *self, dmrgo_duration_t now, const dmrgo_ipscsession_addr_t *from, uint32_t id, const uint8_t key[20], size_t *items, size_t *arena);
/* Go: ipscsession.Master.Adopt. Adopt registers the peer id at from without a registration request and without a reply, for a peer that registered with another Master, such as one of another replica of a server, and now sends its packets here. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_master_adopt_need gives. key may be NULL. */
int dmrgo_ipscsession_master_adopt(dmrgo_ipscsession_master_t *self, dmrgo_duration_t now, const dmrgo_ipscsession_addr_t *from, uint32_t id, const uint8_t key[20], dmrgo_ipscsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_ipscsession_master_close_need sets *items and *arena to the room that dmrgo_ipscsession_master_close needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_master_close_need(dmrgo_ipscsession_master_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: ipscsession.Master.Close. Close sends a de-registration request to every registered peer, as DMRlink does when it shuts down, reports DMRGO_IPSCSESSION_OUTPUT_DOWN with DMRGO_IPSCSESSION_REASON_STOPPED for each, and stops the Master until Reset. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_master_close_need gives. */
int dmrgo_ipscsession_master_close(dmrgo_ipscsession_master_t *self, dmrgo_duration_t now, dmrgo_ipscsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ipscsession.Master.Deadline. Deadline returns the time at which the Master needs a Tick: when the first peer times out. */
int dmrgo_ipscsession_master_deadline(dmrgo_ipscsession_master_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_ipscsession_master_drop_need sets *items and *arena to the room that dmrgo_ipscsession_master_drop needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_master_drop_need(dmrgo_ipscsession_master_t *self, uint32_t id, size_t *items, size_t *arena);
/* Go: ipscsession.Master.Drop. Drop removes the registered peer id at once, as Tick does when the peer times out: it reports DMRGO_IPSCSESSION_OUTPUT_DOWN with DMRGO_IPSCSESSION_REASON_DROPPED and sends the new peer list to the peers left, but sends nothing to the peer, as DMRlink sends nothing to a peer that times out. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_master_drop_need gives. */
int dmrgo_ipscsession_master_drop(dmrgo_ipscsession_master_t *self, uint32_t id, dmrgo_ipscsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, bool *ok, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ipscsession.Master.MaxOutputOctets. MaxOutputOctets returns the most octets that the packets of the outputs of one call of the Master hold, where outputs that share a packet count it once: the packet that the call builds, the body of a DMRGO_IPSCSESSION_OUTPUT_DATA and the de-registration of each peer. */
int dmrgo_ipscsession_master_max_output_octets(dmrgo_ipscsession_master_t *self, int64_t *out);
/* Go: ipscsession.Master.MaxOutputs. MaxOutputs returns the most outputs that one call of the Master appends. */
int dmrgo_ipscsession_master_max_outputs(dmrgo_ipscsession_master_t *self, int64_t *out);
/* dmrgo_ipscsession_master_packet_need sets *items and *arena to the room that dmrgo_ipscsession_master_packet needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_master_packet_need(dmrgo_ipscsession_master_t *self, dmrgo_duration_t now, const dmrgo_ipscsession_addr_t *from, const uint8_t *p, size_t p_len, const uint8_t key[20], size_t *items, size_t *arena);
/* Go: ipscsession.Master.Packet. Packet takes the packet p from the address from. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_master_packet_need gives. key may be NULL. */
int dmrgo_ipscsession_master_packet(dmrgo_ipscsession_master_t *self, dmrgo_duration_t now, const dmrgo_ipscsession_addr_t *from, const uint8_t *p, size_t p_len, const uint8_t key[20], dmrgo_ipscsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ipscsession.Master.Peer. Peer returns the registered peer id. */
int dmrgo_ipscsession_master_peer(dmrgo_ipscsession_master_t *self, uint32_t id, dmrgo_ipscsession_peer_info_t *info, bool *ok);
/* Go: ipscsession.Master.PeerAt. PeerAt returns registered peer i, or the zero PeerInfo when i is not below Peers. */
int dmrgo_ipscsession_master_peer_at(dmrgo_ipscsession_master_t *self, int64_t i, dmrgo_ipscsession_peer_info_t *out);
/* Go: ipscsession.Master.Peers. Peers returns the number of registered peers. */
int dmrgo_ipscsession_master_peers(dmrgo_ipscsession_master_t *self, int64_t *out);
/* Go: ipscsession.Master.Reset. Reset clears every peer without a packet and runs the Master again after Close. */
int dmrgo_ipscsession_master_reset(dmrgo_ipscsession_master_t *self);
/* dmrgo_ipscsession_master_sign_need sets *items and *arena to the room that dmrgo_ipscsession_master_sign needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_master_sign_need(dmrgo_ipscsession_master_t *self, size_t *items, size_t *arena);
/* Go: ipscsession.Master.Sign. Sign appends the authentication trailer of the packet in dst to dst when the config has Auth, and returns dst as it is without. It returns dst unchanged and DMRGO_ERR_HANDLE for a NULL self. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_master_sign_need gives (DMRGO_IPSCSESSION_MASTER_SIGN_MAX_ITEMS items). */
int dmrgo_ipscsession_master_sign(dmrgo_ipscsession_master_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_ipscsession_master_sign_for_need sets *items and *arena to the room that dmrgo_ipscsession_master_sign_for needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_master_sign_for_need(dmrgo_ipscsession_master_t *self, uint32_t id, size_t *items, size_t *arena);
/* Go: ipscsession.Master.SignFor. SignFor appends the authentication trailer of the packet in dst for the registered peer id to dst: with the own key of the peer when it registered with one, and else as Sign does. It returns dst unchanged and DMRGO_ERR_HANDLE for a NULL self. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_master_sign_for_need gives (DMRGO_IPSCSESSION_MASTER_SIGN_FOR_MAX_ITEMS items). */
int dmrgo_ipscsession_master_sign_for(dmrgo_ipscsession_master_t *self, uint32_t id, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ipscsession.Master.State. State returns DMRGO_IPSCSESSION_STATE_RUNNING, or DMRGO_IPSCSESSION_STATE_IDLE after Close and for a Master that NewMaster did not make. */
int dmrgo_ipscsession_master_state(dmrgo_ipscsession_master_t *self, dmrgo_ipscsession_state_t *out);
/* dmrgo_ipscsession_master_tick_need sets *items and *arena to the room that dmrgo_ipscsession_master_tick needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_master_tick_need(dmrgo_ipscsession_master_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: ipscsession.Master.Tick. Tick drops the peers that sent nothing for Timeout, with DMRGO_IPSCSESSION_OUTPUT_DOWN and DMRGO_IPSCSESSION_REASON_TIMEOUT, and then sends the new peer list to the peers left. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_master_tick_need gives. */
int dmrgo_ipscsession_master_tick(dmrgo_ipscsession_master_t *self, dmrgo_duration_t now, dmrgo_ipscsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ipscsession.NewMaster. NewMaster returns a Master for cfg. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL cfg and a DMRGO_ERR_CONFIG for a negative Timeout or a MaxPeers outside [0, DMRGO_IPSCSESSION_MAX_PEERS_LIMIT]. cfg may be NULL. */
int dmrgo_ipscsession_new_master(const dmrgo_ipscsession_master_config_t *cfg, dmrgo_ipscsession_master_t **out);
/* Go: ipscsession.NewPeer. NewPeer returns a Peer for cfg. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL cfg and a DMRGO_ERR_CONFIG for a negative Alive or MaxMissed, or a MaxPeers outside [0, DMRGO_IPSCSESSION_MAX_PEERS_LIMIT]. cfg may be NULL. */
int dmrgo_ipscsession_new_peer(const dmrgo_ipscsession_peer_config_t *cfg, dmrgo_ipscsession_peer_t **out);
/* Go: ipscsession.OutputKind.String. String returns the name of the OutputKind. */
int dmrgo_ipscsession_output_kind_string(dmrgo_ipscsession_output_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_ipscsession_peer_free frees the handle. self may be NULL. */
int dmrgo_ipscsession_peer_free(dmrgo_ipscsession_peer_t *self);
/* dmrgo_ipscsession_peer_close_need sets *items and *arena to the room that dmrgo_ipscsession_peer_close needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_peer_close_need(dmrgo_ipscsession_peer_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: ipscsession.Peer.Close. Close sends a de-registration request to the master and to every peer whose link is up, as DMRlink does when it leaves, reports DMRGO_IPSCSESSION_OUTPUT_DOWN with DMRGO_IPSCSESSION_REASON_STOPPED for the master, and stops the Peer until Reset. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_peer_close_need gives. */
int dmrgo_ipscsession_peer_close(dmrgo_ipscsession_peer_t *self, dmrgo_duration_t now, dmrgo_ipscsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ipscsession.Peer.Deadline. Deadline returns the time at which the Peer needs a Tick. */
int dmrgo_ipscsession_peer_deadline(dmrgo_ipscsession_peer_t *self, dmrgo_duration_t *at, bool *ok);
/* Go: ipscsession.Peer.Master. Master returns the ID of the master, which its registration reply gave. */
int dmrgo_ipscsession_peer_master(dmrgo_ipscsession_peer_t *self, uint32_t *id, bool *ok);
/* Go: ipscsession.Peer.MaxOutputOctets. MaxOutputOctets returns the most octets that the packets of the outputs of one call of the Peer hold, where outputs that share a packet count it once: the body of a DMRGO_IPSCSESSION_OUTPUT_DATA and the four control packets that the Peer builds. */
int dmrgo_ipscsession_peer_max_output_octets(dmrgo_ipscsession_peer_t *self, int64_t *out);
/* Go: ipscsession.Peer.MaxOutputs. MaxOutputs returns the most outputs that one call of the Peer appends. */
int dmrgo_ipscsession_peer_max_outputs(dmrgo_ipscsession_peer_t *self, int64_t *out);
/* dmrgo_ipscsession_peer_packet_need sets *items and *arena to the room that dmrgo_ipscsession_peer_packet needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_peer_packet_need(dmrgo_ipscsession_peer_t *self, dmrgo_duration_t now, const dmrgo_ipscsession_addr_t *from, const uint8_t *b, size_t b_len, size_t *items, size_t *arena);
/* Go: ipscsession.Peer.Packet. Packet takes the packet p from the address from. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_peer_packet_need gives. */
int dmrgo_ipscsession_peer_packet(dmrgo_ipscsession_peer_t *self, dmrgo_duration_t now, const dmrgo_ipscsession_addr_t *from, const uint8_t *b, size_t b_len, dmrgo_ipscsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ipscsession.Peer.Peer. Peer returns the peer id of the list. */
int dmrgo_ipscsession_peer_peer(dmrgo_ipscsession_peer_t *self, uint32_t id, dmrgo_ipscsession_peer_info_t *info, bool *ok);
/* Go: ipscsession.Peer.PeerAt. PeerAt returns peer i of the list, or the zero PeerInfo when i is not below Peers. */
int dmrgo_ipscsession_peer_peer_at(dmrgo_ipscsession_peer_t *self, int64_t i, dmrgo_ipscsession_peer_info_t *out);
/* Go: ipscsession.Peer.Peers. Peers returns the number of other peers that the Peer has from the peer list. */
int dmrgo_ipscsession_peer_peers(dmrgo_ipscsession_peer_t *self, int64_t *out);
/* Go: ipscsession.Peer.Reset. Reset clears the master and the peers without a packet, so the next Tick registers again. */
int dmrgo_ipscsession_peer_reset(dmrgo_ipscsession_peer_t *self);
/* dmrgo_ipscsession_peer_sign_need sets *items and *arena to the room that dmrgo_ipscsession_peer_sign needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_peer_sign_need(dmrgo_ipscsession_peer_t *self, size_t *items, size_t *arena);
/* Go: ipscsession.Peer.Sign. Sign appends the authentication trailer of the packet in dst to dst when the config has Auth, and returns dst as it is without. It returns dst unchanged and DMRGO_ERR_HANDLE for a NULL self. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_peer_sign_need gives (DMRGO_IPSCSESSION_PEER_SIGN_MAX_ITEMS items). */
int dmrgo_ipscsession_peer_sign(dmrgo_ipscsession_peer_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: ipscsession.Peer.State. State returns the state of the Peer. */
int dmrgo_ipscsession_peer_state(dmrgo_ipscsession_peer_t *self, dmrgo_ipscsession_state_t *out);
/* dmrgo_ipscsession_peer_tick_need sets *items and *arena to the room that dmrgo_ipscsession_peer_tick needs for these arguments, without a change to the handle. */
int dmrgo_ipscsession_peer_tick_need(dmrgo_ipscsession_peer_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: ipscsession.Peer.Tick. Tick sends, when Alive is due, the registration request or the keepalive to the master, the peer list request until the list arrives, and the registration request or the keepalive to each peer of the list. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_ipscsession_peer_tick_need gives. */
int dmrgo_ipscsession_peer_tick(dmrgo_ipscsession_peer_t *self, dmrgo_duration_t now, dmrgo_ipscsession_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: ipscsession.Reason.String. String returns the name of the Reason. */
int dmrgo_ipscsession_reason_string(dmrgo_ipscsession_reason_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: ipscsession.RegisterVersionDefault. RegisterVersionDefault returns the protocol version that a Peer or Master sends in a register request or reply (0x90, 0x91, 0x94, 0x95) when its config leaves RegisterVersion zero: 04 08 04 00, the version that an XPR 8400 sends in its register request. */
int dmrgo_ipscsession_register_version_default(uint8_t out[4]);
/* Go: ipscsession.State.String. String returns the name of the State. */
int dmrgo_ipscsession_state_string(dmrgo_ipscsession_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.Ack.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_mmdvm_ack_append_binary(const dmrgo_mmdvm_ack_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.Ack.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_ack_string(const dmrgo_mmdvm_ack_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.AppendFrame. AppendFrame appends a frame of c with payload to dst: the short form up to 255 octets in all, the long form above. */
int dmrgo_mmdvm_append_frame(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, dmrgo_mmdvm_command_t c, const uint8_t *payload, size_t payload_len);
/* Go: mmdvm.Capabilities.Has. Has reports whether c has every bit of m. */
int dmrgo_mmdvm_capabilities_has(dmrgo_mmdvm_capabilities_t self, dmrgo_mmdvm_capabilities_t m, bool *out);
/* Go: mmdvm.Command.String. String returns the name of the command. */
int dmrgo_mmdvm_command_string(dmrgo_mmdvm_command_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.ConfigV1.AppendBinary. AppendBinary appends the 23 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_mmdvm_config_v1_append_binary(const dmrgo_mmdvm_config_v1_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.ConfigV1.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_config_v1_string(const dmrgo_mmdvm_config_v1_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.ConfigV2.AppendBinary. AppendBinary appends the 37 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_mmdvm_config_v2_append_binary(const dmrgo_mmdvm_config_v2_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.ConfigV2.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_config_v2_string(const dmrgo_mmdvm_config_v2_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.Control.DataSync. DataSync reports a burst with a data SYNC. */
int dmrgo_mmdvm_control_data_sync(dmrgo_mmdvm_control_t self, bool *out);
/* Go: mmdvm.Control.DataType. DataType returns the data type of a burst with a data SYNC: the low nibble. */
int dmrgo_mmdvm_control_data_type(dmrgo_mmdvm_control_t self, dmrgo_enums_data_type_t *out);
/* Go: mmdvm.Control.Idle. Idle reports a burst that the modem heard while idle. */
int dmrgo_mmdvm_control_idle(dmrgo_mmdvm_control_t self, bool *out);
/* Go: mmdvm.Control.N. N returns the low nibble: 1 to 5 for voice bursts B to F. */
int dmrgo_mmdvm_control_n(dmrgo_mmdvm_control_t self, uint8_t *out);
/* Go: mmdvm.Control.VoiceSync. VoiceSync reports voice burst A. */
int dmrgo_mmdvm_control_voice_sync(dmrgo_mmdvm_control_t self, bool *out);
/* Go: mmdvm.DMRAbort.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_mmdvm_dmr_abort_append_binary(const dmrgo_mmdvm_dmr_abort_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.DMRAbort.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_dmr_abort_string(const dmrgo_mmdvm_dmr_abort_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.DMRAloha.AppendBinary. AppendBinary appends the 33 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_mmdvm_dmr_aloha_append_binary(const dmrgo_mmdvm_dmr_aloha_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.DMRAloha.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_dmr_aloha_string(const dmrgo_mmdvm_dmr_aloha_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.DMRData.AppendBinary. AppendBinary appends the payload to dst: nothing for a lost frame, else the control octet, the burst and the RSSI when HasRSSI is set. It does not allocate when dst has room for DMRGO_MMDVM_DMR_DATA_LEN+2 more octets, and fails only for a NULL d, with DMRGO_ERR_NIL_RECEIVER. */
int dmrgo_mmdvm_dmr_data_append_binary(const dmrgo_mmdvm_dmr_data_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.DMRData.Command. Command returns the command of the frame: DMRGO_MMDVM_COMMAND_DMR_DATA1 or DMRGO_MMDVM_COMMAND_DMR_DATA2, or DMRGO_MMDVM_COMMAND_DMR_LOST1 or DMRGO_MMDVM_COMMAND_DMR_LOST2 when Lost is set. */
int dmrgo_mmdvm_dmr_data_command(const dmrgo_mmdvm_dmr_data_t *self, dmrgo_mmdvm_command_t *out);
/* Go: mmdvm.DMRData.Hint. Hint returns the data that the frame gives about its burst, for the service machines: the slot, and from Control the data type, voice burst A, or voice bursts B to F from N 1 to 5. */
int dmrgo_mmdvm_dmr_data_hint(const dmrgo_mmdvm_dmr_data_t *self, dmrgo_layer2_hint_t *out);
/* Go: mmdvm.DMRData.SetHint. SetHint sets Control from the burst kind in h, as a machine Output gives it: DMRGO_MMDVM_CONTROL_DATA_SYNC with the data type for DMRGO_LAYER2_KIND_DATA, DMRGO_MMDVM_CONTROL_VOICE_SYNC for voice burst A, and N 1 to 5 for voice bursts B to F. It returns an error, and changes nothing, for another kind, a position that is not A to F, a DMRGO_LAYER2_KIND_DATA hint without a data type, or a data type above 15, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_mmdvm_dmr_data_set_hint(dmrgo_mmdvm_dmr_data_t *self, const dmrgo_layer2_hint_t *h);
/* Go: mmdvm.DMRShortLC.AppendBinary. AppendBinary appends the 9 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_mmdvm_dmr_short_lc_append_binary(const dmrgo_mmdvm_dmr_short_lc_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.DMRShortLC.ShortLC. ShortLC decodes the Short LC that s carries. */
int dmrgo_mmdvm_dmr_short_lc_short_lc(const dmrgo_mmdvm_dmr_short_lc_t *self, dmrgo_pdu_short_lc_t *out);
/* Go: mmdvm.DMRShortLC.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_dmr_short_lc_string(const dmrgo_mmdvm_dmr_short_lc_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.DMRStart.AppendBinary. AppendBinary appends the 1 octet of s to dst. */
int dmrgo_mmdvm_dmr_start_append_binary(const dmrgo_mmdvm_dmr_start_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.DMRStart.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_dmr_start_string(const dmrgo_mmdvm_dmr_start_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.Debug.AppendBinary. AppendBinary appends the payload to dst: the text and the numbers. It returns dst unchanged and an error when Command is not a debug command, and DMRGO_ERR_ARG for a NULL self. */
int dmrgo_mmdvm_debug_append_binary(const dmrgo_mmdvm_debug_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.Debug.Count. Count returns the number of numbers: 0 for DMRGO_MMDVM_COMMAND_DEBUG1 and DMRGO_MMDVM_COMMAND_DEBUG_DUMP and a NULL d, up to 4 for DMRGO_MMDVM_COMMAND_DEBUG5. */
int dmrgo_mmdvm_debug_count(const dmrgo_mmdvm_debug_t *self, int64_t *out);
/* Go: mmdvm.DecodeAck. DecodeAck decodes an Ack from data, a payload of 1 octet. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 1 octet and DMRGO_ERR_MMDVM_LENGTH when it is longer. */
int dmrgo_mmdvm_decode_ack(const uint8_t *data, size_t data_len, dmrgo_mmdvm_ack_t *out);
/* Go: mmdvm.DecodeConfigV1. DecodeConfigV1 decodes a ConfigV1 from data, a payload of 23 octets or more. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 23 octets and a DMRGO_ERR_FIELD_RANGE when TXDelay is not 0 to 50 or DMRColorCode is not 0 to 15. */
int dmrgo_mmdvm_decode_config_v1(const uint8_t *data, size_t data_len, dmrgo_mmdvm_config_v1_t *out);
/* Go: mmdvm.DecodeConfigV2. DecodeConfigV2 decodes a ConfigV2 from data, a payload of 37 octets or more. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 37 octets and a DMRGO_ERR_FIELD_RANGE when TXDelay is not 0 to 50 or DMRColorCode is not 0 to 15. */
int dmrgo_mmdvm_decode_config_v2(const uint8_t *data, size_t data_len, dmrgo_mmdvm_config_v2_t *out);
/* Go: mmdvm.DecodeDMRAbort. DecodeDMRAbort decodes a DMRAbort from data, a payload of 1 octet. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 1 octet, DMRGO_ERR_MMDVM_LENGTH when it is longer and a DMRGO_ERR_FIELD_RANGE when Slot is not 1 or 2. */
int dmrgo_mmdvm_decode_dmr_abort(const uint8_t *data, size_t data_len, dmrgo_mmdvm_dmr_abort_t *out);
/* Go: mmdvm.DecodeDMRAloha. DecodeDMRAloha decodes a DMRAloha from data, a payload of 33 octets. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 33 octets and DMRGO_ERR_MMDVM_LENGTH when it is longer. */
int dmrgo_mmdvm_decode_dmr_aloha(const uint8_t *data, size_t data_len, dmrgo_mmdvm_dmr_aloha_t *out);
/* Go: mmdvm.DecodeDMRData. DecodeDMRData decodes a DMR data or lost frame. It returns DMRGO_ERR_MMDVM_COMMAND for another command, DMRGO_ERR_MMDVM_SHORT, and DMRGO_ERR_MMDVM_LENGTH for a payload that is not 34 or 36 octets, or a lost frame with a payload. */
int dmrgo_mmdvm_decode_dmr_data(const dmrgo_mmdvm_frame_t *f, dmrgo_mmdvm_dmr_data_t *out);
/* Go: mmdvm.DecodeDMRShortLC. DecodeDMRShortLC decodes a DMRShortLC from data, a payload of 9 octets. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 9 octets and DMRGO_ERR_MMDVM_LENGTH when it is longer. */
int dmrgo_mmdvm_decode_dmr_short_lc(const uint8_t *data, size_t data_len, dmrgo_mmdvm_dmr_short_lc_t *out);
/* Go: mmdvm.DecodeDMRStart. DecodeDMRStart decodes a DMRStart from data, a payload of 1 octet. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 1 octet, DMRGO_ERR_MMDVM_LENGTH when it is longer and a DMRGO_ERR_FIELD_RANGE when the octet is not 0x00 or 0x01. */
int dmrgo_mmdvm_decode_dmr_start(const uint8_t *data, size_t data_len, dmrgo_mmdvm_dmr_start_t *out);
/* Go: mmdvm.DecodeDebug. DecodeDebug decodes a debug frame. It returns DMRGO_ERR_MMDVM_COMMAND for another command, and DMRGO_ERR_MMDVM_SHORT for a payload shorter than its numbers. */
int dmrgo_mmdvm_decode_debug(const dmrgo_mmdvm_frame_t *f, dmrgo_mmdvm_debug_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: mmdvm.DecodeNak. DecodeNak decodes a Nak from data, a payload of 2 octets. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 2 octets and DMRGO_ERR_MMDVM_LENGTH when it is longer. */
int dmrgo_mmdvm_decode_nak(const uint8_t *data, size_t data_len, dmrgo_mmdvm_nak_t *out);
/* Go: mmdvm.DecodeSetFreq. DecodeSetFreq decodes a SetFreq from data, a payload of 9, 10 or 14 octets or more. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 9 octets and DMRGO_ERR_MMDVM_LENGTH when it is shorter than 14 octets and its length is not one of these. */
int dmrgo_mmdvm_decode_set_freq(const uint8_t *data, size_t data_len, dmrgo_mmdvm_set_freq_t *out);
/* Go: mmdvm.DecodeSetMode. DecodeSetMode decodes a SetMode from data, a payload of 1 octet. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 1 octet and DMRGO_ERR_MMDVM_LENGTH when it is longer. */
int dmrgo_mmdvm_decode_set_mode(const uint8_t *data, size_t data_len, dmrgo_mmdvm_set_mode_t *out);
/* Go: mmdvm.DecodeStatusV1. DecodeStatusV1 decodes a StatusV1 from data, a payload of 7, 8, 9, 10 or 11 octets or more. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 7 octets. */
int dmrgo_mmdvm_decode_status_v1(const uint8_t *data, size_t data_len, dmrgo_mmdvm_status_v1_t *out);
/* Go: mmdvm.DecodeStatusV2. DecodeStatusV2 decodes a StatusV2 from data, a payload of 17 octets. It returns DMRGO_ERR_MMDVM_SHORT when data is shorter than 17 octets and DMRGO_ERR_MMDVM_LENGTH when it is longer. */
int dmrgo_mmdvm_decode_status_v2(const uint8_t *data, size_t data_len, dmrgo_mmdvm_status_v2_t *out);
/* Go: mmdvm.DecodeVersion. DecodeVersion decodes the payload of a DMRGO_MMDVM_COMMAND_GET_VERSION reply. It returns DMRGO_ERR_MMDVM_SHORT. */
int dmrgo_mmdvm_decode_version(const uint8_t *p, size_t p_len, dmrgo_mmdvm_version_t *out, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: mmdvm.Mode.String. String returns the name of the mode. */
int dmrgo_mmdvm_mode_string(dmrgo_mmdvm_mode_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.Nak.AppendBinary. AppendBinary appends the 2 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_mmdvm_nak_append_binary(const dmrgo_mmdvm_nak_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.Nak.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_nak_string(const dmrgo_mmdvm_nak_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.NewDMRShortLC. NewDMRShortLC returns the DMRGO_MMDVM_COMMAND_DMR_SHORT_LC payload that carries slc: its BPTC coding, the 4 CACH fragments of 17 bits one after the other, as MMDVMHost CDMRShortLC encodes it. It returns the errors of dmrgo_pdu_short_lc_encode on slc, and DMRGO_ERR_NIL_ARGUMENT for a NULL slc (ETSI TS 102 361-1 clause 7.1.4, Annex B.2.3). slc may be NULL. */
int dmrgo_mmdvm_new_dmr_short_lc(const dmrgo_pdu_short_lc_t *slc, dmrgo_mmdvm_dmr_short_lc_t *out);
/* Go: mmdvm.Next. Next finds the frame at the start of p, as the firmware and MMDVMHost read the stream. */
int dmrgo_mmdvm_next(const uint8_t *p, size_t p_len, dmrgo_mmdvm_frame_t *f, int64_t *n, dmrgo_mmdvm_next_result_t *r, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: mmdvm.SetFreq.AppendBinary. AppendBinary appends the 9, 10 or 14 octets of s to dst: Size selects the length, and 0 means 14. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit, or an error that wraps DMRGO_ERR_MMDVM_LENGTH when Size is not one of the lengths. */
int dmrgo_mmdvm_set_freq_append_binary(const dmrgo_mmdvm_set_freq_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.SetFreq.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_set_freq_string(const dmrgo_mmdvm_set_freq_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.SetMode.AppendBinary. AppendBinary appends the 1 octet of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_mmdvm_set_mode_append_binary(const dmrgo_mmdvm_set_mode_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.SetMode.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_set_mode_string(const dmrgo_mmdvm_set_mode_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.StatusV1.AppendBinary. AppendBinary appends the 7, 8, 9, 10 or 11 octets of s to dst: Size selects the length, and 0 means 11. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit, or an error that wraps DMRGO_ERR_MMDVM_LENGTH when Size is not one of the lengths. */
int dmrgo_mmdvm_status_v1_append_binary(const dmrgo_mmdvm_status_v1_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.StatusV1.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_status_v1_string(const dmrgo_mmdvm_status_v1_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.StatusV2.AppendBinary. AppendBinary appends the 17 octets of s to dst. It returns dst unchanged and a DMRGO_ERR_FIELD_RANGE when a field does not fit. */
int dmrgo_mmdvm_status_v2_append_binary(const dmrgo_mmdvm_status_v2_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: mmdvm.StatusV2.String. String returns the fields of s as text, for printing. */
int dmrgo_mmdvm_status_v2_string(const dmrgo_mmdvm_status_v2_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: mmdvm.Version.AppendBinary. AppendBinary appends the payload to dst: for protocol 2 the protocol, the capabilities, the CPU, the UDID and the description, else the protocol and the description. It allocates only to grow dst, and fails only for a NULL v, with DMRGO_ERR_NIL_RECEIVER. */
int dmrgo_mmdvm_version_append_binary(const dmrgo_mmdvm_version_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.Access.Applies. Applies reports whether the C_ALOHA population subdivision lets the MS with address ms make a random access (ETSI TS 102 361-4 clause 6.2.1.1.1). */
int dmrgo_trunk_access_applies(const dmrgo_trunk_access_t *self, uint32_t ms, bool emergency, bool *out);
/* Go: trunk.Appended.Addresses. Addresses returns the addresses of a in the address format. It returns DMRGO_ERR_TRUNK_UDT_FORMAT for another format and DMRGO_ERR_TRUNK_UDT_LENGTH for a Blocks out of range. */
int dmrgo_trunk_appended_addresses(const dmrgo_trunk_appended_t *self, dmrgo_trunk_address_list_t *out);
/* Go: trunk.Appended.Binary. Binary appends the data of a in the binary format to dst, packed most significant bit first, and returns dst and the number of bits. It returns DMRGO_ERR_TRUNK_UDT_FORMAT for another format and DMRGO_ERR_TRUNK_UDT_LENGTH when a has no end marker or no data before it. */
int dmrgo_trunk_appended_binary(const dmrgo_trunk_appended_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t *n);
/* Go: trunk.Appended.Digits. Digits appends the dialled digits of a in the BCD format to dst as the characters '0' to '9', '*' and '#', and returns dst. It returns DMRGO_ERR_TRUNK_UDT_FORMAT for another format, DMRGO_ERR_TRUNK_UDT_LENGTH for a PadNibble over the size of the blocks, and DMRGO_ERR_TRUNK_UDT_CHARACTER for a reserved digit code. */
int dmrgo_trunk_appended_digits(const dmrgo_trunk_appended_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.Appended.IP. IP returns the IP address of a in the IP format, and whether it is IPv6. It returns DMRGO_ERR_TRUNK_UDT_FORMAT for another format and DMRGO_ERR_TRUNK_UDT_LENGTH for other than 1 or 2 blocks. */
int dmrgo_trunk_appended_ip(const dmrgo_trunk_appended_t *self, uint8_t ip[16], bool *v6);
/* Go: trunk.Appended.LIP. LIP appends the octets of the LIP PDU of a to dst and returns dst. It returns DMRGO_ERR_TRUNK_UDT_FORMAT for another format and DMRGO_ERR_TRUNK_UDT_LENGTH for a PadNibble over the size of the blocks. */
int dmrgo_trunk_appended_lip(const dmrgo_trunk_appended_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.Appended.Mixed. Mixed returns the address of a in the mixed format, and whether it is the One-key_talkgroup of DGNA. It returns DMRGO_ERR_TRUNK_UDT_FORMAT for another format. */
int dmrgo_trunk_appended_mixed(const dmrgo_trunk_appended_t *self, uint32_t *addr, bool *one_key);
/* Go: trunk.Appended.NMEALong. NMEALong returns the Long NMEA Format Specified of a. It returns DMRGO_ERR_TRUNK_UDT_FORMAT for another format, or an NMEA format with other than 2 blocks. */
int dmrgo_trunk_appended_nmea_long(const dmrgo_trunk_appended_t *self, dmrgo_trunk_nmea_long_t *out);
/* Go: trunk.Appended.NMEAShort. NMEAShort returns the Short NMEA format of a. It returns DMRGO_ERR_TRUNK_UDT_FORMAT for another format, or an NMEA format with other than 1 block. */
int dmrgo_trunk_appended_nmea_short(const dmrgo_trunk_appended_t *self, dmrgo_trunk_nmea_short_t *out);
/* Go: trunk.Appended.SetAddresses. SetAddresses sets a to the 1 to 15 addresses of list in the address format, in the fewest blocks that hold them. It returns DMRGO_ERR_TRUNK_UDT_LENGTH for a list out of range, or for an address over 24 bits. */
int dmrgo_trunk_appended_set_addresses(dmrgo_trunk_appended_t *self, bool one_key, const uint32_t *list, size_t list_len);
/* Go: trunk.Appended.SetBinary. SetBinary sets a to the first n bits of b, packed most significant bit first, in the binary format with the end marker for variable length data: a 0 bit after the data and 1 bits to the end of the last block. It returns DMRGO_ERR_TRUNK_UDT_LENGTH for n out of range or a b too short for n. */
int dmrgo_trunk_appended_set_binary(dmrgo_trunk_appended_t *self, const uint8_t *b, size_t b_len, int64_t n);
/* Go: trunk.Appended.SetDigits. SetDigits sets a to the 1 to 92 dialled digits of digits in the BCD format. It returns DMRGO_ERR_TRUNK_UDT_LENGTH for a count out of range and DMRGO_ERR_TRUNK_UDT_CHARACTER for another character. */
int dmrgo_trunk_appended_set_digits(dmrgo_trunk_appended_t *self, const uint8_t *digits, size_t digits_len);
/* Go: trunk.Appended.SetIP. SetIP sets a to the IP address ip in the IP format: the first 4 octets of ip in one block for IPv4, or all 16 in two blocks for IPv6. */
int dmrgo_trunk_appended_set_ip(dmrgo_trunk_appended_t *self, const uint8_t ip[16], bool v6);
/* Go: trunk.Appended.SetLIP. SetLIP sets a to the 1 to 46 octets of a LIP PDU in the LIP format, such as an encoded LIPShortReport. It returns DMRGO_ERR_TRUNK_UDT_LENGTH for a count out of range. */
int dmrgo_trunk_appended_set_lip(dmrgo_trunk_appended_t *self, const uint8_t *pdu, size_t pdu_len);
/* Go: trunk.Appended.SetMixed. SetMixed sets a to the address addr and the UTF-8 text in the mixed format: up to 21 UTF-16 code units. It returns DMRGO_ERR_TRUNK_UDT_LENGTH for a too long text or an address over 24 bits. */
int dmrgo_trunk_appended_set_mixed(dmrgo_trunk_appended_t *self, bool one_key, uint32_t addr, const uint8_t *text, size_t text_len);
/* Go: trunk.Appended.SetNMEALong. SetNMEALong sets a to the Long NMEA Format Specified of n in two blocks. It returns the errors of dmrgo_trunk_nmea_long_encode, and DMRGO_ERR_NIL_ARGUMENT for a NULL n. n may be NULL. */
int dmrgo_trunk_appended_set_nmea_long(dmrgo_trunk_appended_t *self, const dmrgo_trunk_nmea_long_t *n);
/* Go: trunk.Appended.SetNMEAShort. SetNMEAShort sets a to the Short NMEA format of n in one block. It returns the errors of dmrgo_trunk_nmea_short_encode, and DMRGO_ERR_NIL_ARGUMENT for a NULL n. n may be NULL. */
int dmrgo_trunk_appended_set_nmea_short(dmrgo_trunk_appended_t *self, const dmrgo_trunk_nmea_short_t *n);
/* Go: trunk.Appended.SetText. SetText sets a to the UTF-8 text in the format f: DMRGO_ENUMS_UDT_ISO7 (up to 52 characters of ISO/IEC 646), DMRGO_ENUMS_UDT_ISO8 (up to 46 characters of ISO/IEC 8859-1) or DMRGO_ENUMS_UDT_UTF16BE (up to 23 UTF-16 code units). It returns DMRGO_ERR_TRUNK_UDT_FORMAT for another format, DMRGO_ERR_TRUNK_UDT_LENGTH for an empty or a too long text, and DMRGO_ERR_TRUNK_UDT_CHARACTER for a character that the format cannot hold. */
int dmrgo_trunk_appended_set_text(dmrgo_trunk_appended_t *self, dmrgo_enums_udt_format_t f, const uint8_t *text, size_t text_len);
/* Go: trunk.Appended.Text. Text appends the text of a to dst as UTF-8 and returns dst, for the formats DMRGO_ENUMS_UDT_ISO7, DMRGO_ENUMS_UDT_ISO8 (read as ISO/IEC 8859-1), DMRGO_ENUMS_UDT_UTF16BE and DMRGO_ENUMS_UDT_MIXED (the text after the address). It returns DMRGO_ERR_TRUNK_UDT_FORMAT for another format and DMRGO_ERR_TRUNK_UDT_LENGTH for a PadNibble over the size of the blocks. */
int dmrgo_trunk_appended_text(const dmrgo_trunk_appended_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_trunk_authenticator_free frees the handle. self may be NULL. */
int dmrgo_trunk_authenticator_free(dmrgo_trunk_authenticator_t *self);
/* Go: trunk.Authenticator.Response. Response returns the response of the MS addr to challenge. */
int dmrgo_trunk_authenticator_response(dmrgo_trunk_authenticator_t *self, uint32_t addr, uint32_t challenge, uint32_t *response, bool *ok);
/* dmrgo_trunk_authenticator_from_vtable makes a Authenticator whose methods call the functions of vt with vt->user. */
int dmrgo_trunk_authenticator_from_vtable(const dmrgo_trunk_authenticator_vtable_t *vt, dmrgo_trunk_authenticator_t **out);
/* dmrgo_trunkauth_key_as_authenticator makes a dmrgo_trunk_authenticator_t from self, which it copies. */
int dmrgo_trunkauth_key_as_authenticator(const dmrgo_trunkauth_key_t *self, dmrgo_trunk_authenticator_t **out);
/* dmrgo_trunkauth_keys_as_authenticator makes a dmrgo_trunk_authenticator_t from self, which it copies. */
int dmrgo_trunkauth_keys_as_authenticator(const dmrgo_trunkauth_keys_t *self, dmrgo_trunk_authenticator_t **out);
/* dmrgo_trunk_capacity_plus_follower_free frees the handle. self may be NULL. */
int dmrgo_trunk_capacity_plus_follower_free(dmrgo_trunk_capacity_plus_follower_t *self);
/* dmrgo_trunk_capacity_plus_follower_burst_need sets *items and *arena to the room that dmrgo_trunk_capacity_plus_follower_burst needs for these arguments, without a change to the handle. */
int dmrgo_trunk_capacity_plus_follower_burst_need(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], size_t *items, size_t *arena);
/* Go: trunk.CapacityPlusFollower.Burst. Burst decodes the burst raw with the data in the Hint h, and the CACH field before it when cach is not NULL, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_capacity_plus_follower_burst_need gives (DMRGO_TRUNK_CAPACITY_PLUS_FOLLOWER_BURST_MAX_ITEMS items). raw and cach may be NULL. */
int dmrgo_trunk_capacity_plus_follower_burst(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.CapacityPlusFollower.Call. Call returns the grant of the call that the Follower follows. */
int dmrgo_trunk_capacity_plus_follower_call(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_trunk_grant_t *g, bool *ok);
/* Go: trunk.CapacityPlusFollower.Deadline. Deadline returns the time at which the Follower needs a Tick. */
int dmrgo_trunk_capacity_plus_follower_deadline(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_trunk_capacity_plus_follower_decoded_need sets *items and *arena to the room that dmrgo_trunk_capacity_plus_follower_decoded needs for these arguments, without a change to the handle. */
int dmrgo_trunk_capacity_plus_follower_decoded_need(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], size_t *items, size_t *arena);
/* Go: trunk.CapacityPlusFollower.Decoded. Decoded runs the decoded burst b through the Follower as Burst does, with the Hint h and the CACH field cach. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_capacity_plus_follower_decoded_need gives (DMRGO_TRUNK_CAPACITY_PLUS_FOLLOWER_DECODED_MAX_ITEMS items). b and cach may be NULL. */
int dmrgo_trunk_capacity_plus_follower_decoded(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_trunk_capacity_plus_follower_lost_need sets *items and *arena to the room that dmrgo_trunk_capacity_plus_follower_lost needs for these arguments, without a change to the handle. */
int dmrgo_trunk_capacity_plus_follower_lost_need(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: trunk.CapacityPlusFollower.Lost. Lost records that the receiver lost the signal. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_capacity_plus_follower_lost_need gives (DMRGO_TRUNK_CAPACITY_PLUS_FOLLOWER_LOST_MAX_ITEMS items). */
int dmrgo_trunk_capacity_plus_follower_lost(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_duration_t now, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.CapacityPlusFollower.Reset. Reset clears the site and the call and starts hunting again, as after NewCapacityPlusFollower. */
int dmrgo_trunk_capacity_plus_follower_reset(dmrgo_trunk_capacity_plus_follower_t *self);
/* Go: trunk.CapacityPlusFollower.RestLSN. RestLSN returns the last rest LSN that the site announced. */
int dmrgo_trunk_capacity_plus_follower_rest_lsn(dmrgo_trunk_capacity_plus_follower_t *self, uint8_t *lsn, bool *ok);
/* Go: trunk.CapacityPlusFollower.SiteNumber. SiteNumber returns the site number of a Linked Capacity Plus site, from the rest channel Short LC or the neighbor report. */
int dmrgo_trunk_capacity_plus_follower_site_number(dmrgo_trunk_capacity_plus_follower_t *self, uint8_t *site, bool *ok);
/* Go: trunk.CapacityPlusFollower.State. State returns the state of the Follower: DMRGO_TRUNK_STATE_HUNTING, DMRGO_TRUNK_STATE_CONTROL on the rest channel, or DMRGO_TRUNK_STATE_PAYLOAD in a call. */
int dmrgo_trunk_capacity_plus_follower_state(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_trunk_state_t *out);
/* dmrgo_trunk_capacity_plus_follower_tick_need sets *items and *arena to the room that dmrgo_trunk_capacity_plus_follower_tick needs for these arguments, without a change to the handle. */
int dmrgo_trunk_capacity_plus_follower_tick_need(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: trunk.CapacityPlusFollower.Tick. Tick runs the timers that are due at now and appends their outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_capacity_plus_follower_tick_need gives (DMRGO_TRUNK_CAPACITY_PLUS_FOLLOWER_TICK_MAX_ITEMS items). */
int dmrgo_trunk_capacity_plus_follower_tick(dmrgo_trunk_capacity_plus_follower_t *self, dmrgo_duration_t now, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_trunk_channel_plan_new makes a zero dmrgo_trunk_channel_plan_t. */
int dmrgo_trunk_channel_plan_new(dmrgo_trunk_channel_plan_t **out);
/* dmrgo_trunk_channel_plan_free frees the handle. self may be NULL. */
int dmrgo_trunk_channel_plan_free(dmrgo_trunk_channel_plan_t *self);
/* Go: trunk.ChannelPlan.Add. Add adds c to the plan, or replaces the entry with the same number. It returns DMRGO_ERR_TRUNK_CHANNEL_NUMBER for a number that is CHNULL, DMRGO_TRUNK_CHANNEL_ABSOLUTE or over 12 bits, and DMRGO_ERR_TRUNK_PLAN_FULL when DMRGO_TRUNK_MAX_CHANNELS other numbers are in the plan. */
int dmrgo_trunk_channel_plan_add(dmrgo_trunk_channel_plan_t *self, const dmrgo_trunk_channel_t *c);
/* Go: trunk.ChannelPlan.AddCdef. AddCdef adds the channel of the CdefParms of a CG_AP, MV_AP or BC_AP block to the plan, as Add does. c may be NULL. */
int dmrgo_trunk_channel_plan_add_cdef(dmrgo_trunk_channel_plan_t *self, const dmrgo_layer3_cdef_parms_t *c);
/* Go: trunk.ChannelPlan.AddRule. AddRule adds r to the plan. It returns DMRGO_ERR_TRUNK_CHANNEL_NUMBER when r->first is CHNULL, r->last is below r->first or not below DMRGO_TRUNK_CHANNEL_ABSOLUTE, and DMRGO_ERR_TRUNK_PLAN_FULL when the plan holds DMRGO_TRUNK_MAX_RULES rules. */
int dmrgo_trunk_channel_plan_add_rule(dmrgo_trunk_channel_plan_t *self, const dmrgo_trunk_channel_rule_t *r);
/* Go: trunk.ChannelPlan.Len. Len returns the number of entries that Add made. */
int dmrgo_trunk_channel_plan_len(dmrgo_trunk_channel_plan_t *self, int64_t *out);
/* Go: trunk.ChannelPlan.Lookup. Lookup returns the channel with number n. */
int dmrgo_trunk_channel_plan_lookup(dmrgo_trunk_channel_plan_t *self, uint16_t n, dmrgo_trunk_channel_t *c, bool *ok);
/* Go: trunk.DecodeLIPShortReport. DecodeLIPShortReport decodes an LIPShortReport. */
int dmrgo_trunk_decode_lip_short_report(const uint8_t data[10], dmrgo_trunk_lip_short_report_t *out);
/* Go: trunk.DecodeNMEALong. DecodeNMEALong decodes an NMEALong. */
int dmrgo_trunk_decode_nmea_long(const uint8_t data[22], dmrgo_trunk_nmea_long_t *out);
/* Go: trunk.DecodeNMEAShort. DecodeNMEAShort decodes an NMEAShort. */
int dmrgo_trunk_decode_nmea_short(const uint8_t data[10], dmrgo_trunk_nmea_short_t *out);
/* Go: trunk.DecodeUSBDLIPResponse. DecodeUSBDLIPResponse decodes a USBDLIPResponse. */
int dmrgo_trunk_decode_usbd_lip_response(const uint8_t data[10], dmrgo_trunk_usbd_lip_response_t *out);
/* Go: trunk.DecodeUSBDPollRequest. DecodeUSBDPollRequest decodes a USBDPollRequest. */
int dmrgo_trunk_decode_usbd_poll_request(const uint8_t data[10], dmrgo_trunk_usbd_poll_request_t *out);
/* dmrgo_trunk_follower_free frees the handle. self may be NULL. */
int dmrgo_trunk_follower_free(dmrgo_trunk_follower_t *self);
/* dmrgo_trunk_follower_burst_need sets *items and *arena to the room that dmrgo_trunk_follower_burst needs for these arguments, without a change to the handle. */
int dmrgo_trunk_follower_burst_need(dmrgo_trunk_follower_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], size_t *items, size_t *arena);
/* Go: trunk.Follower.Burst. Burst decodes the burst raw with the data in the Hint h, and the CACH field before it when cach is not NULL, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_follower_burst_need gives (DMRGO_TRUNK_FOLLOWER_BURST_MAX_ITEMS items). raw and cach may be NULL. */
int dmrgo_trunk_follower_burst(dmrgo_trunk_follower_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.Follower.Call. Call returns the grant of the call that the Follower follows. */
int dmrgo_trunk_follower_call(dmrgo_trunk_follower_t *self, dmrgo_trunk_grant_t *g, bool *ok);
/* Go: trunk.Follower.Deadline. Deadline returns the time at which the Follower needs a Tick. */
int dmrgo_trunk_follower_deadline(dmrgo_trunk_follower_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_trunk_follower_decoded_need sets *items and *arena to the room that dmrgo_trunk_follower_decoded needs for these arguments, without a change to the handle. */
int dmrgo_trunk_follower_decoded_need(dmrgo_trunk_follower_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], size_t *items, size_t *arena);
/* Go: trunk.Follower.Decoded. Decoded runs the decoded burst b through the Follower as Burst does, with the Hint h and the CACH field cach. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_follower_decoded_need gives (DMRGO_TRUNK_FOLLOWER_DECODED_MAX_ITEMS items). b and cach may be NULL. */
int dmrgo_trunk_follower_decoded(dmrgo_trunk_follower_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.Follower.Hunt. Hunt returns the hunt list, with the changes of Ann_WD_TSCC broadcasts. */
int dmrgo_trunk_follower_hunt(dmrgo_trunk_follower_t *self, dmrgo_trunk_hunt_list_t *out);
/* Go: trunk.Follower.Lookup. Lookup returns the channel with number n from the channel plan, as dmrgo_trunk_channel_plan_lookup does. */
int dmrgo_trunk_follower_lookup(dmrgo_trunk_follower_t *self, uint16_t n, dmrgo_trunk_channel_t *c, bool *ok);
/* dmrgo_trunk_follower_lost_need sets *items and *arena to the room that dmrgo_trunk_follower_lost needs for these arguments, without a change to the handle. */
int dmrgo_trunk_follower_lost_need(dmrgo_trunk_follower_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: trunk.Follower.Lost. Lost records that the receiver lost the signal. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_follower_lost_need gives (DMRGO_TRUNK_FOLLOWER_LOST_MAX_ITEMS items). */
int dmrgo_trunk_follower_lost(dmrgo_trunk_follower_t *self, dmrgo_duration_t now, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.Follower.Plan. Plan returns a copy of the channel plan, with the channels that CG_AP and Chan_Freq announced. */
int dmrgo_trunk_follower_plan(dmrgo_trunk_follower_t *self, dmrgo_trunk_channel_plan_t *out);
/* Go: trunk.Follower.Reset. Reset clears the site and the call and starts hunting again, as after NewFollower. */
int dmrgo_trunk_follower_reset(dmrgo_trunk_follower_t *self);
/* Go: trunk.Follower.Site. Site returns the data that the Follower holds about the TSCC. */
int dmrgo_trunk_follower_site(dmrgo_trunk_follower_t *self, dmrgo_trunk_site_t *out);
/* Go: trunk.Follower.State. State returns the state of the Follower. */
int dmrgo_trunk_follower_state(dmrgo_trunk_follower_t *self, dmrgo_trunk_state_t *out);
/* dmrgo_trunk_follower_tick_need sets *items and *arena to the room that dmrgo_trunk_follower_tick needs for these arguments, without a change to the handle. */
int dmrgo_trunk_follower_tick_need(dmrgo_trunk_follower_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: trunk.Follower.Tick. Tick runs the timers that are due at now and appends their outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_follower_tick_need gives (DMRGO_TRUNK_FOLLOWER_TICK_MAX_ITEMS items). */
int dmrgo_trunk_follower_tick(dmrgo_trunk_follower_t *self, dmrgo_duration_t now, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.Follower.UDT. UDT returns a copy of the UDT delivery of the last DMRGO_TRUNK_OUTPUT_UDT. */
int dmrgo_trunk_follower_udt(dmrgo_trunk_follower_t *self, dmrgo_trunk_udt_t *u, bool *ok);
/* Go: trunk.Grant.Call. Call returns the dmrgo_voice_call_t of a voice grant, for dmrgo_voice_receiver_expect. */
int dmrgo_trunk_grant_call(const dmrgo_trunk_grant_t *self, dmrgo_voice_call_t *out);
/* Go: trunk.Grant.Data. Data reports whether the grant is for packet data. */
int dmrgo_trunk_grant_data(const dmrgo_trunk_grant_t *self, bool *out);
/* dmrgo_trunk_hunt_list_new makes a zero dmrgo_trunk_hunt_list_t. */
int dmrgo_trunk_hunt_list_new(dmrgo_trunk_hunt_list_t **out);
/* dmrgo_trunk_hunt_list_free frees the handle. self may be NULL. */
int dmrgo_trunk_hunt_list_free(dmrgo_trunk_hunt_list_t *self);
/* Go: trunk.HuntList.Add. Add adds e to the end of the list, or updates the entry with the same channel. It returns DMRGO_ERR_TRUNK_CHANNEL_NUMBER for CHNULL or a number that is not below DMRGO_TRUNK_CHANNEL_ABSOLUTE, and DMRGO_ERR_TRUNK_PLAN_FULL when the list is full. */
int dmrgo_trunk_hunt_list_add(dmrgo_trunk_hunt_list_t *self, const dmrgo_trunk_hunt_entry_t *e);
/* Go: trunk.HuntList.At. At returns entry i, for i from 0 to Len() - 1. */
int dmrgo_trunk_hunt_list_at(dmrgo_trunk_hunt_list_t *self, int64_t i, dmrgo_trunk_hunt_entry_t *out);
/* Go: trunk.HuntList.Len. Len returns the number of channels in the list. */
int dmrgo_trunk_hunt_list_len(dmrgo_trunk_hunt_list_t *self, int64_t *out);
/* Go: trunk.HuntList.Withdraw. Withdraw removes the channel from the list and keeps the order of the others. */
int dmrgo_trunk_hunt_list_withdraw(dmrgo_trunk_hunt_list_t *self, uint16_t channel, bool *out);
/* Go: trunk.LIPShortReport.Encode. Encode encodes an LIPShortReport. */
int dmrgo_trunk_lip_short_report_encode(const dmrgo_trunk_lip_short_report_t *self, uint8_t out[10]);
/* Go: trunk.LIPShortReport.String. String returns the fields of s as text, for printing. */
int dmrgo_trunk_lip_short_report_string(const dmrgo_trunk_lip_short_report_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_trunk_ms_free frees the handle. self may be NULL. */
int dmrgo_trunk_ms_free(dmrgo_trunk_ms_t *self);
/* Go: trunk.MS.AdviseIP. AdviseIP sends an IP connection advice: a registration by random access with IP_Inform, and the address by UDT when the TSCC requests it with a C_AHOY from IPI. It returns DMRGO_ERR_TRUNK_NOT_ON_CONTROL and DMRGO_ERR_TRUNK_BUSY as Call does. */
int dmrgo_trunk_ms_advise_ip(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, const uint8_t ip[16], bool ipv6, bool remove);
/* Go: trunk.MS.Asleep. Asleep reports whether the MS sleeps in power save until its next power save frame (ETSI TS 102 361-4 clause 6.4.7). */
int dmrgo_trunk_ms_asleep(dmrgo_trunk_ms_t *self, bool *out);
/* Go: trunk.MS.AssignGroups. AssignGroups requests the TSCC to give the MS target the DGNA talkgroups of a, by random access to DGNAI (ETSI TS 102 361-4 clause 6.6.8.3). It returns the errors of Call, and DMRGO_ERR_TRUNK_UDT_FORMAT for another format. a may be NULL. */
int dmrgo_trunk_ms_assign_groups(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, uint32_t target, const dmrgo_trunk_appended_t *a);
/* dmrgo_trunk_ms_auth_response_need sets *items and *arena to the room that dmrgo_trunk_ms_auth_response needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_auth_response_need(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, uint32_t response, size_t *items, size_t *arena);
/* Go: trunk.MS.AuthResponse. AuthResponse sends response, the answer to the challenge of the last DMRGO_TRUNK_OUTPUT_AUTH_CHALLENGE that dmrgo_trunkauth_response computes, to the TSCC: a C_ACKU, or a P_ACKU on a payload channel, with reason Authentication Response, in the slot after the challenge. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_auth_response_need gives (DMRGO_TRUNK_MS_AUTH_RESPONSE_MAX_ITEMS items). */
int dmrgo_trunk_ms_auth_response(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, uint32_t response, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_trunk_ms_burst_need sets *items and *arena to the room that dmrgo_trunk_ms_burst needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_burst_need(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], size_t *items, size_t *arena);
/* Go: trunk.MS.Burst. Burst decodes the burst raw with the data in the Hint h, and the CACH field before it, in transmit order, when cach is not NULL, as dmrgo_trunk_follower_burst does, runs the random access and the requests, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_burst_need gives (DMRGO_TRUNK_MS_BURST_MAX_ITEMS items). raw and cach may be NULL. */
int dmrgo_trunk_ms_burst(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.MS.Busy. Busy reports whether a registration, de-registration or call request runs. */
int dmrgo_trunk_ms_busy(dmrgo_trunk_ms_t *self, bool *out);
/* Go: trunk.MS.Call. Call requests from the TSCC a voice call to the talkgroup or MS target, by random access. It returns DMRGO_ERR_TRUNK_NOT_ON_CONTROL when the MS is not on a confirmed TSCC, DMRGO_ERR_TRUNK_BUSY while another request runs, DMRGO_ERR_TRUNK_NOT_REGISTERED when the TSCC requests a registration that the MS does not hold, and a DMRGO_ERR_CONFIG for a target or options out of range. */
int dmrgo_trunk_ms_call(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, bool group, uint32_t target, const dmrgo_layer3_voice_service_options_t *opts);
/* Go: trunk.MS.CallAmbient. CallAmbient requests from the TSCC an individual voice call to the MS target with the Ambient Listening Service, by random access, as Call does: the called MS transmits without an action of its user (ETSI TS 102 361-4 clause 6.6.2.6.2). */
int dmrgo_trunk_ms_call_ambient(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, uint32_t target, const dmrgo_layer3_voice_service_options_t *opts);
/* Go: trunk.MS.CallData. CallData requests from the TSCC a packet data call to the talkgroup or MS target, as Call does. */
int dmrgo_trunk_ms_call_data(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, bool group, uint32_t target, const dmrgo_layer3_data_service_options_t *opts);
/* Go: trunk.MS.CallDuplex. CallDuplex requests from the TSCC a full-duplex voice call to the MS target, by random access, as Call does (ETSI TS 102 361-4 clause 6.6.9.2). */
int dmrgo_trunk_ms_call_duplex(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, uint32_t target, const dmrgo_layer3_voice_service_options_t *opts);
/* Go: trunk.MS.CallDuplexData. CallDuplexData requests from the TSCC a full-duplex packet data call to the MS target, by random access, as CallData does (ETSI TS 102 361-4 clause 6.6.10.2). */
int dmrgo_trunk_ms_call_duplex_data(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, uint32_t target, const dmrgo_layer3_data_service_options_t *opts);
/* dmrgo_trunk_ms_cancel_need sets *items and *arena to the room that dmrgo_trunk_ms_cancel needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_cancel_need(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: trunk.MS.Cancel. Cancel stops the running request. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_cancel_need gives (DMRGO_TRUNK_MS_CANCEL_MAX_ITEMS items). */
int dmrgo_trunk_ms_cancel(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.MS.Deadline. Deadline returns the time at which the MS needs a Tick. */
int dmrgo_trunk_ms_deadline(dmrgo_trunk_ms_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_trunk_ms_decoded_need sets *items and *arena to the room that dmrgo_trunk_ms_decoded needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_decoded_need(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], size_t *items, size_t *arena);
/* Go: trunk.MS.Decoded. Decoded runs the decoded burst b through the MS as Burst does, with the Hint h and the CACH field cach. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_decoded_need gives (DMRGO_TRUNK_MS_DECODED_MAX_ITEMS items). b and cach may be NULL. */
int dmrgo_trunk_ms_decoded(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, const uint8_t cach[3], dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.MS.Divert. Divert requests the TSCC to divert the calls of the MS, or to stop diverting them, by random access (ETSI TS 102 361-4 clause 6.6.7.1). It returns the errors of Call, and a DMRGO_ERR_CONFIG for another gateway or a missing a. a may be NULL. */
int dmrgo_trunk_ms_divert(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, uint32_t gateway, const dmrgo_layer3_diversion_service_options_t *opts, const dmrgo_trunk_appended_t *a);
/* dmrgo_trunk_ms_end_call_need sets *items and *arena to the room that dmrgo_trunk_ms_end_call needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_end_call_need(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: trunk.MS.EndCall. EndCall ends the own call on the payload channel: it appends the N_Maint P_MAINT DISCON bursts, one per TDMA frame from the first slot of the call at or after now, and returns to the TSCC (ETSI TS 102 361-4 clause 6.6.2.3). It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_end_call_need gives (DMRGO_TRUNK_MS_END_CALL_MAX_ITEMS items). */
int dmrgo_trunk_ms_end_call(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_trunk_ms_group_alias_need sets *items and *arena to the room that dmrgo_trunk_ms_group_alias needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_group_alias_need(dmrgo_trunk_ms_t *self, uint32_t tg, size_t *items, size_t *arena);
/* Go: trunk.MS.GroupAlias. GroupAlias appends the DGNA alias of the talkgroup tg to dst as UTF-8, without trailing DEL characters, and returns dst; it appends nothing for a talkgroup without an alias. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_group_alias_need gives (DMRGO_TRUNK_MS_GROUP_ALIAS_MAX_ITEMS items). */
int dmrgo_trunk_ms_group_alias(dmrgo_trunk_ms_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, uint32_t tg);
/* Go: trunk.MS.Groups. Groups returns the DGNA talkgroups of the MS. */
int dmrgo_trunk_ms_groups(dmrgo_trunk_ms_t *self, dmrgo_trunk_dynamic_groups_t *out);
/* dmrgo_trunk_ms_interrupt_need sets *items and *arena to the room that dmrgo_trunk_ms_interrupt needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_interrupt_need(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, bool terminate, size_t *items, size_t *arena);
/* Go: trunk.MS.Interrupt. Interrupt requests the TSCC to stop the transmission on the voice call that the MS follows on a payload channel. It returns DMRGO_ERR_TRUNK_NO_CALL when the MS is not on the payload channel of a voice call, DMRGO_ERR_TRUNK_STUNNED and DMRGO_ERR_TRUNK_BUSY. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_interrupt_need gives (DMRGO_TRUNK_MS_INTERRUPT_MAX_ITEMS items). */
int dmrgo_trunk_ms_interrupt(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, bool terminate, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.MS.Killed. Killed reports whether a TSCC killed the MS (ETSI TS 102 361-4 clause 6.4.10). */
int dmrgo_trunk_ms_killed(dmrgo_trunk_ms_t *self, bool *out);
/* dmrgo_trunk_ms_lost_need sets *items and *arena to the room that dmrgo_trunk_ms_lost needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_lost_need(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: trunk.MS.Lost. Lost records that the receiver lost the signal, as dmrgo_trunk_follower_lost does. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_lost_need gives (DMRGO_TRUNK_MS_LOST_MAX_ITEMS items). */
int dmrgo_trunk_ms_lost(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.MS.Off. Off reports whether the MS completed PowerOff or a TSCC killed it. */
int dmrgo_trunk_ms_off(dmrgo_trunk_ms_t *self, bool *out);
/* Go: trunk.MS.PollShortData. PollShortData requests the TSCC to poll the MS target for UDT short data in the format f, in the given number of appended blocks, by random access (ETSI TS 102 361-4 clause 6.6.5). It returns the errors of Call, and DMRGO_ERR_TRUNK_UDT_LENGTH for blocks out of range. */
int dmrgo_trunk_ms_poll_short_data(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, uint32_t target, dmrgo_enums_udt_format_t f, int64_t blocks);
/* Go: trunk.MS.PollStatus. PollStatus requests the status of the MS target by random access. */
int dmrgo_trunk_ms_poll_status(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, uint32_t target);
/* dmrgo_trunk_ms_power_off_need sets *items and *arena to the room that dmrgo_trunk_ms_power_off needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_power_off_need(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: trunk.MS.PowerOff. PowerOff de-registers the MS before it is switched off: it sends the de-registration by random access and appends DMRGO_TRUNK_OUTPUT_POWER_OFF when the TSCC accepts it or after T_Dereg (ETSI TS 102 361-4 clause 6.4.6). It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_power_off_need gives (DMRGO_TRUNK_MS_POWER_OFF_MAX_ITEMS items). */
int dmrgo_trunk_ms_power_off(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.MS.PowerSaveOffset. PowerSaveOffset returns the PowerSave_Offset that the TSCC gave the MS with its registration, or 0 when the MS uses no power save (ETSI TS 102 361-4 clause 6.4.7.2.1). */
int dmrgo_trunk_ms_power_save_offset(dmrgo_trunk_ms_t *self, uint8_t *out);
/* dmrgo_trunk_ms_quality_need sets *items and *arena to the room that dmrgo_trunk_ms_quality needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_quality_need(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, int64_t level, size_t *items, size_t *arena);
/* Go: trunk.MS.Quality. Quality gives the MS the signal level of the TSCC, for the confirmation of a TSCC and for leaving it. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_quality_need gives (DMRGO_TRUNK_MS_QUALITY_MAX_ITEMS items). */
int dmrgo_trunk_ms_quality(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, int64_t level, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.MS.Registered. Registered reports whether the MS holds a registration record for the SYS_AREA of the TSCC that it is on. */
int dmrgo_trunk_ms_registered(dmrgo_trunk_ms_t *self, bool *out);
/* Go: trunk.MS.Reset. Reset clears the site, the registration, the denied list, the DGNA talkgroups and any request, as after NewMS. */
int dmrgo_trunk_ms_reset(dmrgo_trunk_ms_t *self);
/* Go: trunk.MS.SendShortData. SendShortData requests the TSCC to deliver the appended data a as UDT short data to the talkgroup or MS target, or to a gateway, by random access (ETSI TS 102 361-4 clause 6.6.4). It returns the errors of Call, and DMRGO_ERR_TRUNK_UDT_LENGTH for an a with Blocks out of range. a may be NULL. */
int dmrgo_trunk_ms_send_short_data(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, bool group, uint32_t target, const dmrgo_trunk_appended_t *a, const dmrgo_layer3_short_data_service_options_t *opts);
/* Go: trunk.MS.SendStatus. SendStatus sends the status s to the talkgroup or MS target by random access. It returns the errors of Call, DMRGO_ERR_TRUNK_STUNNED for a stunned MS, and a DMRGO_ERR_CONFIG for a status over 126. */
int dmrgo_trunk_ms_send_status(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, bool group, uint32_t target, dmrgo_trunk_status_t s);
/* Go: trunk.MS.SetPollResponse. SetPollResponse sets the data that the MS sends when the TSCC polls it for UDT short data with a C_AHOY. a may be NULL. */
int dmrgo_trunk_ms_set_poll_response(dmrgo_trunk_ms_t *self, const dmrgo_trunk_appended_t *a);
/* Go: trunk.MS.SetStatus. SetStatus sets the status with which the MS answers a status poll. It returns a DMRGO_ERR_CONFIG for a status over 126. */
int dmrgo_trunk_ms_set_status(dmrgo_trunk_ms_t *self, dmrgo_trunk_status_t s);
/* Go: trunk.MS.SetSupplementary. SetSupplementary sets the appended data a as the supplementary_user data of the next request that takes it: a SendStatus, or a Call or CallData with IsSuppData. It returns DMRGO_ERR_TRUNK_UDT_LENGTH for an a with Blocks or PadNibble out of range, and DMRGO_ERR_TRUNK_UDT_FORMAT for a Format over 15. a may be NULL. */
int dmrgo_trunk_ms_set_supplementary(dmrgo_trunk_ms_t *self, const dmrgo_trunk_appended_t *a);
/* Go: trunk.MS.SetUSBDResponse. SetUSBDResponse sets the Poll Response that the MS sends to a USBD Poll Request of the same Service Type for it, such as a USBDLIPResponse in its Payload. p may be NULL. */
int dmrgo_trunk_ms_set_usbd_response(dmrgo_trunk_ms_t *self, const dmrgo_pdu_unified_single_block_data_t *p);
/* Go: trunk.MS.Site. Site returns the data that the MS holds about the TSCC. */
int dmrgo_trunk_ms_site(dmrgo_trunk_ms_t *self, dmrgo_trunk_site_t *out);
/* Go: trunk.MS.State. State returns the channel state of the MS. */
int dmrgo_trunk_ms_state(dmrgo_trunk_ms_t *self, dmrgo_trunk_state_t *out);
/* Go: trunk.MS.Stunned. Stunned reports whether a TSCC stunned the MS: it then refuses the user services and follows no calls (ETSI TS 102 361-4 clause 6.4.9). */
int dmrgo_trunk_ms_stunned(dmrgo_trunk_ms_t *self, bool *out);
/* dmrgo_trunk_ms_tick_need sets *items and *arena to the room that dmrgo_trunk_ms_tick needs for these arguments, without a change to the handle. */
int dmrgo_trunk_ms_tick_need(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: trunk.MS.Tick. Tick runs the timers that are due at now and appends their outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_ms_tick_need gives (DMRGO_TRUNK_MS_TICK_MAX_ITEMS items). */
int dmrgo_trunk_ms_tick(dmrgo_trunk_ms_t *self, dmrgo_duration_t now, dmrgo_trunk_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.MS.UDT. UDT returns a copy of the UDT delivery of the last DMRGO_TRUNK_OUTPUT_UDT, as dmrgo_trunk_follower_udt does. */
int dmrgo_trunk_ms_udt(dmrgo_trunk_ms_t *self, dmrgo_trunk_udt_t *u, bool *ok);
/* Go: trunk.NMEALong.Encode. Encode encodes an NMEALong. */
int dmrgo_trunk_nmea_long_encode(const dmrgo_trunk_nmea_long_t *self, uint8_t out[22]);
/* Go: trunk.NMEALong.String. String returns the fields of s as text, for printing. */
int dmrgo_trunk_nmea_long_string(const dmrgo_trunk_nmea_long_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: trunk.NMEAShort.Encode. Encode encodes an NMEAShort. */
int dmrgo_trunk_nmea_short_encode(const dmrgo_trunk_nmea_short_t *self, uint8_t out[10]);
/* Go: trunk.NMEAShort.String. String returns the fields of s as text, for printing. */
int dmrgo_trunk_nmea_short_string(const dmrgo_trunk_nmea_short_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: trunk.NewCapacityPlusFollower. NewCapacityPlusFollower returns a CapacityPlusFollower for cfg. It returns a DMRGO_ERR_CONFIG for a TalkgroupsLen out of range. cfg may be NULL. */
int dmrgo_trunk_new_capacity_plus_follower(const dmrgo_trunk_capacity_plus_config_t *cfg, dmrgo_trunk_capacity_plus_follower_t **out);
/* Go: trunk.NewFollower. NewFollower returns a Follower for cfg. It returns a DMRGO_ERR_CONFIG for a TalkgroupsLen out of range, a talkgroup over 24 bits, a negative SysErrors, or a SysCode whose fields do not fit. cfg may be NULL. */
int dmrgo_trunk_new_follower(const dmrgo_trunk_follower_config_t *cfg, dmrgo_trunk_follower_t **out);
/* Go: trunk.NewMS. NewMS returns an MS for cfg. It returns a DMRGO_ERR_CONFIG for an Address out of range, a Slot that is not DMRGO_ENUMS_SLOT_UNKNOWN, DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, and for the errors of NewFollower. cfg may be NULL. */
int dmrgo_trunk_new_ms(const dmrgo_trunk_ms_config_t *cfg, dmrgo_trunk_ms_t **out);
/* Go: trunk.NewTSCC. NewTSCC returns a TSCC for cfg. It returns a DMRGO_ERR_CONFIG for a SysCode whose fields do not fit, a color code over 15, a Channel that names no channel, a PayloadLen out of range, a payload channel that names no channel, repeats another or is Channel, a negative GrantRepeats or ClearRepeats, a Lead out of range, or a MaxRegistrations out of range. cfg may be NULL. */
int dmrgo_trunk_new_tscc(const dmrgo_trunk_tscc_config_t *cfg, dmrgo_trunk_tscc_t **out);
/* Go: trunk.OutputKind.String. String returns the name of the OutputKind. */
int dmrgo_trunk_output_kind_string(dmrgo_trunk_output_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: trunk.Reason.String. String returns the name of the Reason. */
int dmrgo_trunk_reason_string(dmrgo_trunk_reason_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: trunk.State.String. String returns the name of the State. */
int dmrgo_trunk_state_string(dmrgo_trunk_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: trunk.StunAction.String. String returns the name of the StunAction. */
int dmrgo_trunk_stun_action_string(dmrgo_trunk_stun_action_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_trunk_tscc_free frees the handle. self may be NULL. */
int dmrgo_trunk_tscc_free(dmrgo_trunk_tscc_t *self);
/* Go: trunk.TSCC.AssignGroups. AssignGroups sends the DGNA talkgroups of a from the gateway DGNAI to the MS target, in the UDT outbound phase of ETSI TS 102 361-4 clause 6.6.8.2.2. It returns the errors of SendShortData, and DMRGO_ERR_TRUNK_UDT_FORMAT for another format. a may be NULL. */
int dmrgo_trunk_tscc_assign_groups(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, uint32_t target, const dmrgo_trunk_appended_t *a);
/* Go: trunk.TSCC.Deadline. Deadline returns the time of the next Tick: the start of the next 30 ms slot minus dmrgo_trunk_tscc_config_t.lead, or 0 before the first Tick. */
int dmrgo_trunk_tscc_deadline(dmrgo_trunk_tscc_t *self, dmrgo_duration_t *at, bool *ok);
/* Go: trunk.TSCC.Diverted. Diverted returns the call diversion that the MS addr set, with the services that it diverts and the diversion address. */
int dmrgo_trunk_tscc_diverted(dmrgo_trunk_tscc_t *self, uint32_t addr, dmrgo_layer3_diversion_service_options_t *opts, dmrgo_trunk_appended_t *to, bool *ok);
/* Go: trunk.TSCC.ExpectAuth. ExpectAuth sets response as the answer that the TSCC accepts from the MS addr to the challenge of the last DMRGO_TRUNK_TSCC_AUTH_CHALLENGE for addr. */
int dmrgo_trunk_tscc_expect_auth(dmrgo_trunk_tscc_t *self, uint32_t addr, uint32_t response);
/* dmrgo_trunk_tscc_inbound_need sets *items and *arena to the room that dmrgo_trunk_tscc_inbound needs for these arguments, without a change to the handle. */
int dmrgo_trunk_tscc_inbound_need(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, uint16_t ch, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: trunk.TSCC.Inbound. Inbound takes the burst raw that the TSCC received on the inbound channel of carrier ch in the slot h->slot, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_tscc_inbound_need gives (DMRGO_TRUNK_TSCC_INBOUND_MAX_ITEMS items). raw may be NULL. */
int dmrgo_trunk_tscc_inbound(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, uint16_t ch, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_trunk_tscc_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.TSCC.Interrupt. Interrupt sends the RC command cmd to the MS that transmits on slot s of the payload channel ch, in the embedded signalling of the other slot of the carrier. It returns DMRGO_ERR_TRUNK_NO_CALL for a slot without a call and a DMRGO_ERR_CONFIG for a reserved command. */
int dmrgo_trunk_tscc_interrupt(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, uint16_t ch, dmrgo_enums_slot_t s, dmrgo_enums_rc_command_t cmd);
/* Go: trunk.TSCC.Kill. Kill requests the MS addr to disable itself for good, with a C_AHOY from KILLI, as Stun does. */
int dmrgo_trunk_tscc_kill(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, uint32_t addr);
/* Go: trunk.TSCC.MassRegister. MassRegister sends a C_BCAST MassReg, which requests the MSs whose Mask least significant address bits match addr to register again within the TReg_Window of window. It returns a DMRGO_ERR_CONFIG for a window over 15, a mask over 24 or an addr over 24 bits. */
int dmrgo_trunk_tscc_mass_register(dmrgo_trunk_tscc_t *self, uint8_t window, uint8_t mask, uint32_t addr);
/* Go: trunk.TSCC.PollShortData. PollShortData polls the MS target for UDT short data in the given number of appended blocks with a C_AHOY from SDMI (ETSI TS 102 361-4 clause 6.6.5.1.5). It returns DMRGO_ERR_TRUNK_BUSY when the table of UDT transactions is full, DMRGO_ERR_TRUNK_UDT_LENGTH for blocks out of range and a DMRGO_ERR_CONFIG for a target out of range. */
int dmrgo_trunk_tscc_poll_short_data(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, uint32_t target, int64_t blocks);
/* Go: trunk.TSCC.PollUSBD. PollUSBD sends a USBD Poll Request of the Service Type st to the MS target, which answers after the Response Delay rd, 0 to 3 (ETSI TS 102 361-4 clause 6.6.11.1). It returns DMRGO_ERR_TRUNK_BUSY while another download runs or the table of UDT transactions is full, and a DMRGO_ERR_CONFIG for a target or rd out of range. */
int dmrgo_trunk_tscc_poll_usbd(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, uint32_t target, dmrgo_pdu_service_type_t st, uint8_t rd);
/* Go: trunk.TSCC.Registered. Registered reports whether the MS addr is in the registration table. */
int dmrgo_trunk_tscc_registered(dmrgo_trunk_tscc_t *self, uint32_t addr, bool *out);
/* Go: trunk.TSCC.SendShortData. SendShortData sends the appended data a as UDT short data from the gateway SDMI to the talkgroup or MS target, in the download phase of ETSI TS 102 361-4 clause 6.6.4.1.4. It returns DMRGO_ERR_TRUNK_BUSY while another download or the table of UDT transactions is full, DMRGO_ERR_TRUNK_UDT_LENGTH for an a with Blocks out of range and a DMRGO_ERR_CONFIG for a target out of range. a may be NULL. */
int dmrgo_trunk_tscc_send_short_data(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, bool group, uint32_t target, const dmrgo_trunk_appended_t *a);
/* Go: trunk.TSCC.SendStatus. SendStatus sends the status s from source, an MS or a gateway such as DISPATI, to the talkgroup or MS target with a C_AHOY. It returns DMRGO_ERR_TRUNK_BUSY when too many status calls run, and a DMRGO_ERR_CONFIG for an address out of range or a poll of a talkgroup. */
int dmrgo_trunk_tscc_send_status(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, bool group, uint32_t target, uint32_t source, dmrgo_trunk_status_t s);
/* Go: trunk.TSCC.Skipped. Skipped returns the number of slots that Tick did not send because it came a slot or more late. */
int dmrgo_trunk_tscc_skipped(dmrgo_trunk_tscc_t *self, int64_t *out);
/* Go: trunk.TSCC.Stun. Stun requests the MS addr to stop, or with revive to give back, its user services, with a C_AHOY from STUNI. It returns DMRGO_ERR_TRUNK_BUSY when a stun or kill for addr runs or too many run, and a DMRGO_ERR_CONFIG for an addr out of range. */
int dmrgo_trunk_tscc_stun(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, uint32_t addr, bool revive);
/* dmrgo_trunk_tscc_tick_need sets *items and *arena to the room that dmrgo_trunk_tscc_tick needs for these arguments, without a change to the handle. */
int dmrgo_trunk_tscc_tick_need(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: trunk.TSCC.Tick. Tick runs the call timers that are due at now and sends the outbound bursts of the slot that is due: on the TSCC a queued PDU or a C_ALOHA, and on each payload channel with a call the relayed inbound burst, P_CLEAR or an idle burst, each with its CACH. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_trunk_tscc_tick_need gives (DMRGO_TRUNK_TSCC_TICK_MAX_ITEMS items). */
int dmrgo_trunk_tscc_tick(dmrgo_trunk_tscc_t *self, dmrgo_duration_t now, dmrgo_trunk_tscc_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: trunk.TSCC.UDT. UDT returns a copy of the UDT that the TSCC received for itself with the last DMRGO_TRUNK_TSCC_UDT, such as the answer to PollShortData. */
int dmrgo_trunk_tscc_udt(dmrgo_trunk_tscc_t *self, dmrgo_trunk_udt_t *u, bool *ok);
/* Go: trunk.TSCC.USBD. USBD returns the USBD Poll Response of the last DMRGO_TRUNK_TSCC_USBD. */
int dmrgo_trunk_tscc_usbd(dmrgo_trunk_tscc_t *self, dmrgo_pdu_unified_single_block_data_t *out);
/* Go: trunk.TSCCOutputKind.String. String returns the name of the TSCCOutputKind. */
int dmrgo_trunk_tscc_output_kind_string(dmrgo_trunk_tscc_output_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: trunk.UDT.Appended. Appended returns the appended data of u, with the UDT Format and the pad nibbles of its header. */
int dmrgo_trunk_udt_appended(const dmrgo_trunk_udt_t *self, dmrgo_trunk_appended_t *out);
/* Go: trunk.USBDLIPResponse.Encode. Encode encodes a USBDLIPResponse. */
int dmrgo_trunk_usbd_lip_response_encode(const dmrgo_trunk_usbd_lip_response_t *self, uint8_t out[10]);
/* Go: trunk.USBDLIPResponse.ShortReport. ShortReport returns the LIP short location report that a TSCC rebuilds from the USBD poll response r for end to end LIP: the position, its error, the velocity and the direction of r, and the reason for sending 32, a response to an immediate request. */
int dmrgo_trunk_usbd_lip_response_short_report(const dmrgo_trunk_usbd_lip_response_t *self, dmrgo_trunk_lip_short_report_t *s, bool *ok);
/* Go: trunk.USBDLIPResponse.String. String returns the fields of s as text, for printing. */
int dmrgo_trunk_usbd_lip_response_string(const dmrgo_trunk_usbd_lip_response_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: trunk.USBDPollRequest.Encode. Encode encodes a USBDPollRequest. */
int dmrgo_trunk_usbd_poll_request_encode(const dmrgo_trunk_usbd_poll_request_t *self, uint8_t out[10]);
/* Go: trunk.USBDPollRequest.String. String returns the fields of s as text, for printing. */
int dmrgo_trunk_usbd_poll_request_string(const dmrgo_trunk_usbd_poll_request_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: trunkauth.Key.Response. Response returns the response of the MS to challenge, as the package function Response computes it, and true, for any address. */
int dmrgo_trunkauth_key_response(const dmrgo_trunkauth_key_t *self, uint32_t addr, uint32_t challenge, uint32_t *response, bool *ok);
/* Go: trunkauth.Keys.Response. Response returns the response of the MS addr to challenge, and false when Entries has no key for addr or k is NULL. */
int dmrgo_trunkauth_keys_response(const dmrgo_trunkauth_keys_t *self, uint32_t addr, uint32_t challenge, uint32_t *response, bool *ok);
/* Go: trunkauth.Response. Response returns the 24-bit response to the challenge for the key K: the octets 257 to 259 of the RC4 keystream keyed with the 3 octets of the challenge, most significant first, and the 16 octets of K, exclusive-or psn. */
int dmrgo_trunkauth_response(uint32_t challenge, const uint8_t key[16], uint32_t psn, uint32_t *out);
/* Go: vocoder.AMBESilence. AMBESilence returns the AMBE+2 frame of silence that MMDVMHost sends to fill a voice burst (DMR_SILENCE_DATA); EncodeAMBE72 of it is the slot B9E881526173002A6B. */
int dmrgo_vocoder_ambe_silence(dmrgo_vocoder_ambe_frame_t *out);
/* Go: vocoder.AMBESilenceSlot. AMBESilenceSlot returns the 72 on-air bits of the AMBE+2 silence frame, EncodeAMBE72(AMBESilence()), the slot B9E881526173002A6B. */
int dmrgo_vocoder_ambe_silence_slot(uint8_t out[9]);
/* dmrgo_vocoder_codec_free frees the handle. self may be NULL. */
int dmrgo_vocoder_codec_free(dmrgo_vocoder_codec_t *self);
/* Go: vocoder.Codec.Close. */
int dmrgo_vocoder_codec_close(dmrgo_vocoder_codec_t *self);
/* dmrgo_vocoder_codec_decode_need sets *items and *arena to the room that dmrgo_vocoder_codec_decode needs for these arguments, without a change to the handle. */
int dmrgo_vocoder_codec_decode_need(dmrgo_vocoder_codec_t *self, const uint8_t slot[9], size_t *items, size_t *arena);
/* Go: vocoder.Codec.Decode. Decode decodes one 72-bit frame, appends its FrameSamples samples to dst and returns the extended slice and a report on the frame. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_vocoder_codec_decode_need gives. */
int dmrgo_vocoder_codec_decode(dmrgo_vocoder_codec_t *self, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t slot[9], dmrgo_vocoder_frame_report_t *frame_report);
/* dmrgo_vocoder_codec_decode_lost_need sets *items and *arena to the room that dmrgo_vocoder_codec_decode_lost needs for these arguments, without a change to the handle. */
int dmrgo_vocoder_codec_decode_lost_need(dmrgo_vocoder_codec_t *self, size_t *items, size_t *arena);
/* Go: vocoder.Codec.DecodeLost. DecodeLost appends FrameSamples samples in place of a frame that never arrived, such as a repeat of the frame before or silence, and returns the extended slice and a report with Frame DMRGO_VOCODER_FRAME_LOST. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_vocoder_codec_decode_lost_need gives. */
int dmrgo_vocoder_codec_decode_lost(dmrgo_vocoder_codec_t *self, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, dmrgo_vocoder_frame_report_t *frame_report);
/* Go: vocoder.Codec.Encode. Encode encodes exactly FrameSamples samples into one 72-bit frame. */
int dmrgo_vocoder_codec_encode(dmrgo_vocoder_codec_t *self, const int16_t *pcm, size_t pcm_len, uint8_t out[9]);
/* Go: vocoder.Codec.FID. FID returns the Feature set ID to send in the Full LC of calls that use this codec. */
int dmrgo_vocoder_codec_fid(dmrgo_vocoder_codec_t *self, dmrgo_enums_fid_t *out);
/* Go: vocoder.Codec.FrameSamples. FrameSamples returns the number of PCM samples in one frame. */
int dmrgo_vocoder_codec_frame_samples(dmrgo_vocoder_codec_t *self, int64_t *out);
/* Go: vocoder.Codec.Reset. Reset starts a new call: the decoder drops the state that it got from the frames of the call before, such as a detected mode. */
int dmrgo_vocoder_codec_reset(dmrgo_vocoder_codec_t *self);
/* Go: vocoder.Codec.Silence. Silence returns a frame that decodes to silence, for padding the last burst of a call. */
int dmrgo_vocoder_codec_silence(dmrgo_vocoder_codec_t *self, uint8_t out[9]);
/* dmrgo_vocoder_codec_from_vtable makes a Codec whose methods call the functions of vt with vt->user. */
int dmrgo_vocoder_codec_from_vtable(const dmrgo_vocoder_codec_vtable_t *vt, dmrgo_vocoder_codec_t **out);
/* dmrgo_codec2_codec_as_codec makes a dmrgo_vocoder_codec_t from self, which it shares; free both handles. */
int dmrgo_codec2_codec_as_codec(dmrgo_codec2_codec_t *self, dmrgo_vocoder_codec_t **out);
/* dmrgo_dvsi_codec_as_codec makes a dmrgo_vocoder_codec_t from self, which it shares; free both handles. */
int dmrgo_dvsi_codec_as_codec(dmrgo_dvsi_codec_t *self, dmrgo_vocoder_codec_t **out);
/* Go: vocoder.DecodeAMBE72. DecodeAMBE72 reverses EncodeAMBE72 and corrects the bit errors that the Golay codes allow. */
int dmrgo_vocoder_decode_ambe72(const uint8_t slot[9], dmrgo_vocoder_ambe_frame_t *ambe_frame, dmrgo_fec_result_t *fec);
/* Go: vocoder.EncodeAMBE72. EncodeAMBE72 applies the AMBE+2 frame FEC to 49 vocoder information bits and returns the 72 on-air bits of one vocoder frame, packed, the first bit in the most significant bit of byte 0: Golay(24,12) on the first 12 bits, PN-scrambled Golay(23,12) on the next 12, the last 25 bits unprotected, interleaved into the slot. It returns a DMRGO_ERR_FIELD_RANGE when a padding bit of info is set. */
int dmrgo_vocoder_encode_ambe72(const dmrgo_vocoder_ambe_frame_t *info, uint8_t out[9]);
/* Go: vocoder.FrameOutput.String. String returns the name of the output. */
int dmrgo_vocoder_frame_output_string(dmrgo_vocoder_frame_output_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: vocoder.FrameStatus.String. String returns the name of the status. */
int dmrgo_vocoder_frame_status_string(dmrgo_vocoder_frame_status_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: vocoder.PackAMBEVoice. PackAMBEVoice packs the three frames of a voice burst into the 19-byte IPSC AMBE payload. */
int dmrgo_vocoder_pack_ambe_voice(const dmrgo_vocoder_ambe_frame_t frames[3], uint8_t out[19]);
/* Go: vocoder.PackAMBEVoiceFlags. PackAMBEVoiceFlags is PackAMBEVoice that also sets bit 49 when bad[1] is true and bit 99 when bad[2] is true, to flag frames 2 and 3 as bad. */
int dmrgo_vocoder_pack_ambe_voice_flags(const dmrgo_vocoder_ambe_frame_t frames[3], const bool bad[3], uint8_t out[19]);
/* Go: vocoder.UnpackAMBEVoice. UnpackAMBEVoice is the reverse of PackAMBEVoice. */
int dmrgo_vocoder_unpack_ambe_voice(const uint8_t data[19], dmrgo_vocoder_ambe_frame_t out[3]);
/* Go: vocoder.UnpackAMBEVoiceFlags. UnpackAMBEVoiceFlags is the reverse of PackAMBEVoiceFlags. */
int dmrgo_vocoder_unpack_ambe_voice_flags(const uint8_t data[19], dmrgo_vocoder_ambe_frame_t frames[3], bool bad[3]);
/* dmrgo_codec2_codec_free frees the handle. self may be NULL. */
int dmrgo_codec2_codec_free(dmrgo_codec2_codec_t *self);
/* Go: codec2.Codec.Close. Close frees the libcodec2 states. Later Encode, Decode and DecodeLost calls return DMRGO_ERR_CODEC2_CLOSED. */
int dmrgo_codec2_codec_close(dmrgo_codec2_codec_t *self);
/* dmrgo_codec2_codec_decode_need sets *items and *arena to the room that dmrgo_codec2_codec_decode needs for these arguments, without a change to the handle. */
int dmrgo_codec2_codec_decode_need(dmrgo_codec2_codec_t *self, const uint8_t slot[9], size_t *items, size_t *arena);
/* Go: codec2.Codec.Decode. Decode decodes one 72-bit frame, appends its DMRGO_CODEC2_FRAME_SAMPLES samples to dst and returns the extended slice and a report on the frame. It returns DMRGO_ERR_CODEC2_CLOSED after Close, with dst unchanged and a zero report. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_codec2_codec_decode_need gives. */
int dmrgo_codec2_codec_decode(dmrgo_codec2_codec_t *self, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t slot[9], dmrgo_vocoder_frame_report_t *frame_report);
/* dmrgo_codec2_codec_decode_lost_need sets *items and *arena to the room that dmrgo_codec2_codec_decode_lost needs for these arguments, without a change to the handle. */
int dmrgo_codec2_codec_decode_lost_need(dmrgo_codec2_codec_t *self, size_t *items, size_t *arena);
/* Go: codec2.Codec.DecodeLost. DecodeLost appends DMRGO_CODEC2_FRAME_SAMPLES zero samples in place of a frame that never arrived, and returns the extended slice and a report with Frame DMRGO_VOCODER_FRAME_LOST and Output DMRGO_VOCODER_OUTPUT_SILENCE. It returns DMRGO_ERR_CODEC2_CLOSED after Close, with dst unchanged. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_codec2_codec_decode_lost_need gives. */
int dmrgo_codec2_codec_decode_lost(dmrgo_codec2_codec_t *self, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, dmrgo_vocoder_frame_report_t *frame_report);
/* Go: codec2.Codec.DecodeMode. DecodeMode returns the mode of the frames of the current call: the configured mode, or for DMRGO_CODEC2_MODE_AUTO the detected mode. */
int dmrgo_codec2_codec_decode_mode(dmrgo_codec2_codec_t *self, dmrgo_codec2_mode_t *out);
/* Go: codec2.Codec.Encode. Encode encodes exactly DMRGO_CODEC2_FRAME_SAMPLES samples into one 72-bit frame, in DMRGO_CODEC2_MODE2400 for DMRGO_CODEC2_MODE_AUTO. */
int dmrgo_codec2_codec_encode(dmrgo_codec2_codec_t *self, const int16_t *pcm, size_t pcm_len, uint8_t out[9]);
/* Go: codec2.Codec.FID. FID returns the configured Feature set ID. */
int dmrgo_codec2_codec_fid(dmrgo_codec2_codec_t *self, dmrgo_enums_fid_t *out);
/* Go: codec2.Codec.FrameSamples. FrameSamples returns DMRGO_CODEC2_FRAME_SAMPLES. */
int dmrgo_codec2_codec_frame_samples(dmrgo_codec2_codec_t *self, int64_t *out);
/* Go: codec2.Codec.Mode. Mode returns the configured Codec2 mode, DMRGO_CODEC2_MODE_AUTO for a Codec that detects the mode. */
int dmrgo_codec2_codec_mode(dmrgo_codec2_codec_t *self, dmrgo_codec2_mode_t *out);
/* Go: codec2.Codec.Reset. Reset starts a new call: a DMRGO_CODEC2_MODE_AUTO Codec detects the mode again from the next frame. */
int dmrgo_codec2_codec_reset(dmrgo_codec2_codec_t *self);
/* Go: codec2.Codec.Silence. Silence returns 20 ms of digital silence encoded with a fresh encoder state in the mode that Encode uses. */
int dmrgo_codec2_codec_silence(dmrgo_codec2_codec_t *self, uint8_t out[9]);
/* dmrgo_codec2_module_free frees the handle. self may be NULL. */
int dmrgo_codec2_module_free(dmrgo_codec2_module_t *self);
/* Go: codec2.Module.Close. Close does nothing. */
int dmrgo_codec2_module_close(dmrgo_codec2_module_t *self);
/* Go: codec2.New. New creates a Codec2 codec with the given configuration. It returns DMRGO_ERR_CODEC2_UNSUPPORTED_MODE for a Mode other than DMRGO_CODEC2_MODE_AUTO, DMRGO_CODEC2_MODE2400 or DMRGO_CODEC2_MODE3200, and an error that wraps DMRGO_ERR_CODEC2_UNAVAILABLE when libcodec2 cannot create a codec state. p may be NULL. */
int dmrgo_codec2_new(const dmrgo_codec2_config_t *p, dmrgo_codec2_codec_t **out);
/* Go: codec2.NewModule. NewModule returns DMRGO_ERR_CODEC2_NOT_WASM because this build has no WebAssembly backend. */
int dmrgo_codec2_new_module(const uint8_t *data, size_t data_len, dmrgo_codec2_module_t **out);
/* Go: dvsi.AppendChannel. AppendChannel appends a channel packet that requests the chip to decode bits channel bits, packed MSB first in data, which must hold (bits+7)/8 bytes (AMBE-3000R manual Table 106). It returns DMRGO_ERR_DVSI_CHANNEL for a channel outside 0 to DMRGO_DVSI_MAX_CHANNEL and DMRGO_ERR_DVSI_BITS for bits outside DMRGO_DVSI_MIN_BITS to DMRGO_DVSI_MAX_BITS or data of another length, with dst unchanged. */
int dmrgo_dvsi_append_channel(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t channel, const uint8_t *data, size_t data_len, int64_t bits, bool parity);
/* Go: dvsi.AppendParityMode. AppendParityMode appends a control packet with a PKT_PARITYMODE field that turns the parity field of later packets on or off. */
int dmrgo_dvsi_append_parity_mode(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, bool on, bool parity);
/* Go: dvsi.AppendQuery. AppendQuery appends a control packet with PKT_PRODID and PKT_VERSTRING fields. */
int dmrgo_dvsi_append_query(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, bool parity);
/* Go: dvsi.AppendRateDMR. AppendRateDMR appends a control packet that sets the channel to the DMR AMBE+2 rate, 3600 bit/s with 2450 bit/s of speech and 1150 bit/s of FEC, with the rate control words 0x0431 0x0754 0x2400 0x0000 0x0000 0x6F48 in a PKT_RATEP field, and then initializes its encoder and decoder with a PKT_INIT field (AMBE-3000R manual Tables 43, 46 and 115, rate index 33). It returns DMRGO_ERR_DVSI_CHANNEL for a channel outside 0 to DMRGO_DVSI_MAX_CHANNEL. */
int dmrgo_dvsi_append_rate_dmr(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t channel, bool parity);
/* Go: dvsi.AppendReset. AppendReset appends a control packet with a PKT_RESET field, which resets the chip to its power-up state. */
int dmrgo_dvsi_append_reset(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, bool parity);
/* Go: dvsi.AppendSpeech. AppendSpeech appends a speech packet that requests the chip to encode pcm, 8 kHz 16-bit samples, each sent most significant byte first (AMBE-3000R manual Table 98). It returns DMRGO_ERR_DVSI_CHANNEL for a channel outside 0 to DMRGO_DVSI_MAX_CHANNEL and DMRGO_ERR_DVSI_SAMPLES for other than DMRGO_DVSI_MIN_SAMPLES to DMRGO_DVSI_MAX_SAMPLES samples, with dst unchanged. */
int dmrgo_dvsi_append_speech(uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t channel, const int16_t *pcm, size_t pcm_len, bool parity);
/* dmrgo_dvsi_codec_free frees the handle. self may be NULL. */
int dmrgo_dvsi_codec_free(dmrgo_dvsi_codec_t *self);
/* Go: dvsi.Codec.Close. Close marks the Codec closed; later Encode, Decode and DecodeLost calls return DMRGO_ERR_DVSI_CLOSED. When the last decode request was DecodeLost, Close first clears LOST_FRAME with a PKT_DCMODE field of 0x0000, so that the chip does not keep repeating frames for the next user of the channel, and returns DMRGO_ERR_DVSI_TIMEOUT when the chip does not reply, DMRGO_ERR_DVSI_STATUS when it rejects the field, and the errors of the Port; the Codec is closed in any case. */
int dmrgo_dvsi_codec_close(dmrgo_dvsi_codec_t *self);
/* dmrgo_dvsi_codec_decode_need sets *items and *arena to the room that dmrgo_dvsi_codec_decode needs for these arguments, without a change to the handle. */
int dmrgo_dvsi_codec_decode_need(dmrgo_dvsi_codec_t *self, const uint8_t slot[9], size_t *items, size_t *arena);
/* Go: dvsi.Codec.Decode. Decode has the chip decode one 72-bit frame with FEC, appends the DMRGO_DVSI_FRAME_SAMPLES samples to dst and returns the extended slice and a report from the DCMODE_OUT flags of the chip (AMBE-3000R manual Table 15): Output is DMRGO_VOCODER_OUTPUT_TONE for TONE_FRAME, else DMRGO_VOCODER_OUTPUT_SILENCE when VOICE_ACTIVE is 0, else DMRGO_VOCODER_OUTPUT_REPEAT when DATA_INVALID is 1, else DMRGO_VOCODER_OUTPUT_VOICE; Frame is DMRGO_VOCODER_FRAME_ERASED when DATA_INVALID is 1, else DMRGO_VOCODER_FRAME_GOOD. It returns DMRGO_ERR_DVSI_CLOSED after Close, DMRGO_ERR_DVSI_TIMEOUT when the chip does not reply, and the errors of the Port, with dst unchanged and a zero report. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dvsi_codec_decode_need gives. */
int dmrgo_dvsi_codec_decode(dmrgo_dvsi_codec_t *self, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, const uint8_t slot[9], dmrgo_vocoder_frame_report_t *frame_report);
/* dmrgo_dvsi_codec_decode_lost_need sets *items and *arena to the room that dmrgo_dvsi_codec_decode_lost needs for these arguments, without a change to the handle. */
int dmrgo_dvsi_codec_decode_lost_need(dmrgo_dvsi_codec_t *self, size_t *items, size_t *arena);
/* Go: dvsi.Codec.DecodeLost. DecodeLost has the chip fill a frame that never arrived: it sends a channel packet with no channel bits and a CMODE field that sets LOST_FRAME, and the chip repeats the frame before, or after more than 2 repeats outputs comfort noise (AMBE-3000R manual Tables 14 and 105). It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dvsi_codec_decode_lost_need gives. */
int dmrgo_dvsi_codec_decode_lost(dmrgo_dvsi_codec_t *self, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, dmrgo_vocoder_frame_report_t *frame_report);
/* Go: dvsi.Codec.Encode. Encode has the chip encode exactly DMRGO_DVSI_FRAME_SAMPLES samples into one 72-bit frame with FEC. It returns DMRGO_ERR_DVSI_SAMPLES for another number of samples, DMRGO_ERR_DVSI_CLOSED after Close, DMRGO_ERR_DVSI_TIMEOUT when the chip does not reply, and the errors of the Port. */
int dmrgo_dvsi_codec_encode(dmrgo_dvsi_codec_t *self, const int16_t *pcm, size_t pcm_len, uint8_t out[9]);
/* Go: dvsi.Codec.FID. FID returns DMRGO_ENUMS_FID_STANDARDIZED, the Feature set ID of calls with the ETSI standard vocoder, AMBE+2. */
int dmrgo_dvsi_codec_fid(dmrgo_dvsi_codec_t *self, dmrgo_enums_fid_t *out);
/* Go: dvsi.Codec.FrameSamples. FrameSamples returns DMRGO_DVSI_FRAME_SAMPLES. */
int dmrgo_dvsi_codec_frame_samples(dmrgo_dvsi_codec_t *self, int64_t *out);
/* dmrgo_dvsi_codec_product_need sets *items and *arena to the room that dmrgo_dvsi_codec_product needs for these arguments, without a change to the handle. */
int dmrgo_dvsi_codec_product_need(dmrgo_dvsi_codec_t *self, size_t *items, size_t *arena);
/* Go: dvsi.Codec.Product. Product returns the product name that the chip reported in New, such as "AMBE3000R". It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dvsi_codec_product_need gives (DMRGO_DVSI_CODEC_PRODUCT_MAX_ITEMS items). */
int dmrgo_dvsi_codec_product(dmrgo_dvsi_codec_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dvsi.Codec.Reset. Reset does nothing. */
int dmrgo_dvsi_codec_reset(dmrgo_dvsi_codec_t *self);
/* Go: dvsi.Codec.Silence. Silence returns dmrgo_vocoder_ambe_silence_slot. */
int dmrgo_dvsi_codec_silence(dmrgo_dvsi_codec_t *self, uint8_t out[9]);
/* dmrgo_dvsi_codec_version_need sets *items and *arena to the room that dmrgo_dvsi_codec_version needs for these arguments, without a change to the handle. */
int dmrgo_dvsi_codec_version_need(dmrgo_dvsi_codec_t *self, size_t *items, size_t *arena);
/* Go: dvsi.Codec.Version. Version returns the version string that the chip reported in New. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_dvsi_codec_version_need gives (DMRGO_DVSI_CODEC_VERSION_MAX_ITEMS items). */
int dmrgo_dvsi_codec_version(dmrgo_dvsi_codec_t *self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: dvsi.New. New sets up the chip behind port for the DMR AMBE+2 rate and returns a Codec for it. It returns DMRGO_ERR_NIL_ARGUMENT for a NULL port, DMRGO_ERR_DVSI_CHANNEL for a channel outside 0 to DMRGO_DVSI_MAX_CHANNEL, DMRGO_ERR_DVSI_TIMEOUT when the chip does not reply, DMRGO_ERR_DVSI_SPEECH_FORMAT when it rejects the PKT_SPCHFMT field, DMRGO_ERR_DVSI_STATUS when it rejects another field, with a text that names PKT_DCMODE for that field, and the errors of port. port and cfg may be NULL. */
int dmrgo_dvsi_new(dmrgo_dvsi_port_t *port, const dmrgo_dvsi_config_t *cfg, dmrgo_dvsi_codec_t **out);
/* Go: dvsi.Packet.AppendChannelData. AppendChannelData appends the bits of the CHAND field of a channel packet, packed MSB first, to dst and returns the extended slice, the number of bits and the channel of the field. It returns DMRGO_ERR_DVSI_FIELD when p is not a channel packet with one CHAND field and known fields only, and DMRGO_ERR_DVSI_BITS for bits outside DMRGO_DVSI_MIN_BITS to DMRGO_DVSI_MAX_BITS, with dst unchanged. */
int dmrgo_dvsi_packet_append_channel_data(const dmrgo_dvsi_packet_t *self, uint8_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t *n, int64_t *n2);
/* Go: dvsi.Packet.AppendSamples. AppendSamples appends the samples of the SPEECHD field of a speech packet to dst and returns the extended slice and the channel of the field. It returns DMRGO_ERR_DVSI_FIELD when p is not a speech packet with one SPEECHD field and known fields only, and DMRGO_ERR_DVSI_SAMPLES for other than DMRGO_DVSI_MIN_SAMPLES to DMRGO_DVSI_MAX_SAMPLES samples, with dst unchanged. */
int dmrgo_dvsi_packet_append_samples(const dmrgo_dvsi_packet_t *self, int16_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, int64_t *n);
/* Go: dvsi.Packet.Response. Response returns the data of response field f of a control packet: the status byte, 0 for success, for most fields, the text without its terminating zero byte for DMRGO_DVSI_FIELD_PROD_ID and DMRGO_DVSI_FIELD_VER_STRING, and no bytes for DMRGO_DVSI_FIELD_READY. */
int dmrgo_dvsi_packet_response(const dmrgo_dvsi_packet_t *self, dmrgo_dvsi_field_t f, uint8_t *data, size_t data_cap, size_t *data_len, size_t *data_need, bool *ok);
/* Go: dvsi.Parse. Parse parses the packet at the start of b and returns it with its length in bytes. It returns DMRGO_ERR_DVSI_INCOMPLETE when b holds only the start of a packet, and DMRGO_ERR_DVSI_START, DMRGO_ERR_DVSI_TYPE, DMRGO_ERR_DVSI_LENGTH or DMRGO_ERR_DVSI_PARITY when b does not start with a packet; a reader then drops b[0] and looks for the next DMRGO_DVSI_START_BYTE. */
int dmrgo_dvsi_parse(const uint8_t *b, size_t b_len, bool parity, dmrgo_dvsi_packet_t *packet, int64_t *n, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* dmrgo_dvsi_port_free frees the handle. self may be NULL. */
int dmrgo_dvsi_port_free(dmrgo_dvsi_port_t *self);
/* Go: dvsi.Port.Read. Read reads bytes from the chip into p. */
int dmrgo_dvsi_port_read(dmrgo_dvsi_port_t *self, uint8_t *p, size_t p_len, int64_t *out);
/* Go: dvsi.Port.Write. Write writes the bytes of p to the chip. */
int dmrgo_dvsi_port_write(dmrgo_dvsi_port_t *self, const uint8_t *p, size_t p_len, int64_t *out);
/* dmrgo_dvsi_port_from_vtable makes a Port whose methods call the functions of vt with vt->user. */
int dmrgo_dvsi_port_from_vtable(const dmrgo_dvsi_port_vtable_t *vt, dmrgo_dvsi_port_t **out);
/* Go: voice.EndReason.String. String returns the name of the reason. */
int dmrgo_voice_end_reason_string(dmrgo_voice_end_reason_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: voice.EventKind.String. String returns the name of the kind. */
int dmrgo_voice_event_kind_string(dmrgo_voice_event_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_voice_interrupter_free frees the handle. self may be NULL. */
int dmrgo_voice_interrupter_free(dmrgo_voice_interrupter_t *self);
/* dmrgo_voice_interrupter_burst_need sets *items and *arena to the room that dmrgo_voice_interrupter_burst needs for these arguments, without a change to the handle. */
int dmrgo_voice_interrupter_burst_need(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: voice.Interrupter.Burst. Burst decodes the burst raw of the call with the data in the Hint h, runs it through the Interrupter as Decoded does, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_interrupter_burst_need gives (DMRGO_VOICE_INTERRUPTER_BURST_MAX_ITEMS items). raw may be NULL. */
int dmrgo_voice_interrupter_burst(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_voice_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* dmrgo_voice_interrupter_cancel_need sets *items and *arena to the room that dmrgo_voice_interrupter_cancel needs for these arguments, without a change to the handle. */
int dmrgo_voice_interrupter_cancel_need(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: voice.Interrupter.Cancel. Cancel ends the interrupt request, and appends DMRGO_VOICE_OUTPUT_INTERRUPT_CANCELED at now to dst while one runs. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_interrupter_cancel_need gives (DMRGO_VOICE_INTERRUPTER_CANCEL_MAX_ITEMS items). */
int dmrgo_voice_interrupter_cancel(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, dmrgo_voice_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: voice.Interrupter.Deadline. Deadline returns the time at which the Interrupter needs a Tick. */
int dmrgo_voice_interrupter_deadline(dmrgo_voice_interrupter_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_voice_interrupter_decoded_need sets *items and *arena to the room that dmrgo_voice_interrupter_decoded needs for these arguments, without a change to the handle. */
int dmrgo_voice_interrupter_decoded_need(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, size_t *items, size_t *arena);
/* Go: voice.Interrupter.Decoded. Decoded takes the decoded burst b of the call, which may be NULL, and appends the outputs to dst: DMRGO_VOICE_OUTPUT_INTERRUPTED when b is a Terminator with LC after the first standalone RC burst went out. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_interrupter_decoded_need gives (DMRGO_VOICE_INTERRUPTER_DECODED_MAX_ITEMS items). b may be NULL. */
int dmrgo_voice_interrupter_decoded(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, dmrgo_voice_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: voice.Interrupter.Interrupt. Interrupt starts an interrupt request with the RC command cmd, whose first standalone RC burst is due at now plus dmrgo_voice_interrupter_config_t.lead: DMRGO_ENUMS_RC_CEASE_TRANSMISSION_REQUEST for a radio that is party to the call, DMRGO_ENUMS_RC_CEASE_TRANSMISSION_COMMAND for an emergency call. It returns DMRGO_ERR_VOICE_INTERRUPT_BUSY while a request runs, and a DMRGO_ERR_CONFIG for another command. */
int dmrgo_voice_interrupter_interrupt(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, dmrgo_enums_rc_command_t cmd);
/* dmrgo_voice_interrupter_lost_need sets *items and *arena to the room that dmrgo_voice_interrupter_lost needs for these arguments, without a change to the handle. */
int dmrgo_voice_interrupter_lost_need(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: voice.Interrupter.Lost. Lost takes a transport event without a burst, such as an MMDVM TAG_LOST. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_interrupter_lost_need gives (DMRGO_VOICE_INTERRUPTER_LOST_MAX_ITEMS items). */
int dmrgo_voice_interrupter_lost(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, dmrgo_voice_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: voice.Interrupter.Reset. Reset ends any interrupt request without an output. */
int dmrgo_voice_interrupter_reset(dmrgo_voice_interrupter_t *self);
/* Go: voice.Interrupter.State. State returns the state of the Interrupter. */
int dmrgo_voice_interrupter_state(dmrgo_voice_interrupter_t *self, dmrgo_voice_interrupter_state_t *out);
/* dmrgo_voice_interrupter_tick_need sets *items and *arena to the room that dmrgo_voice_interrupter_tick needs for these arguments, without a change to the handle. */
int dmrgo_voice_interrupter_tick_need(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: voice.Interrupter.Tick. Tick runs the timers that are due at now and appends their outputs to dst: at most one standalone RC burst, with Position DMRGO_ENUMS_VOICE_BURST_UNKNOWN, and DMRGO_VOICE_OUTPUT_INTERRUPT_FAILED when T_RCtimer ran out after the last try. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_interrupter_tick_need gives (DMRGO_VOICE_INTERRUPTER_TICK_MAX_ITEMS items). */
int dmrgo_voice_interrupter_tick(dmrgo_voice_interrupter_t *self, dmrgo_duration_t now, dmrgo_voice_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: voice.InterrupterState.String. String returns the name of the state. */
int dmrgo_voice_interrupter_state_string(dmrgo_voice_interrupter_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_voice_jitter_free frees the handle. self may be NULL. */
int dmrgo_voice_jitter_free(dmrgo_voice_jitter_t *self);
/* Go: voice.Jitter.Deadline. Deadline returns the time at which the next packet is to be popped: its Due time less Lead. */
int dmrgo_voice_jitter_deadline(dmrgo_voice_jitter_t *self, dmrgo_duration_t *at, bool *ok);
/* Go: voice.Jitter.Len. Len returns the number of packets that wait. */
int dmrgo_voice_jitter_len(dmrgo_voice_jitter_t *self, int64_t *out);
/* Go: voice.Jitter.Pop. Pop returns in p the next packet when now has reached its Due time less Lead, and reports whether it did. p may be NULL. */
int dmrgo_voice_jitter_pop(dmrgo_voice_jitter_t *self, dmrgo_duration_t now, dmrgo_voice_jitter_packet_t *p, bool *out);
/* Go: voice.Jitter.Push. Push takes the packet raw with Hint h from the sender src, such as a peer ID, at the time now, and returns what it did with it. raw may be NULL. */
int dmrgo_voice_jitter_push(dmrgo_voice_jitter_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, uint32_t src, dmrgo_voice_jitter_result_t *out);
/* Go: voice.Jitter.Reset. Reset drops every packet and clears the streams and the counts. */
int dmrgo_voice_jitter_reset(dmrgo_voice_jitter_t *self);
/* Go: voice.Jitter.Stats. Stats returns the counts since NewJitter or Reset. */
int dmrgo_voice_jitter_stats(dmrgo_voice_jitter_t *self, dmrgo_voice_jitter_stats_t *out);
/* Go: voice.JitterResult.String. String returns the name of the result. */
int dmrgo_voice_jitter_result_string(dmrgo_voice_jitter_result_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: voice.NewInterrupter. NewInterrupter returns an Interrupter for cfg. It returns a DMRGO_ERR_CONFIG for a color code above 15, a Slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, so also for a NULL cfg, Retries above DMRGO_VOICE_MAX_RETRIES, Repeats out of range, or a negative Lead. cfg may be NULL. */
int dmrgo_voice_new_interrupter(const dmrgo_voice_interrupter_config_t *cfg, dmrgo_voice_interrupter_t **out);
/* Go: voice.NewJitter. NewJitter returns a Jitter for cfg. It returns a DMRGO_ERR_CONFIG for a field out of range. cfg may be NULL. */
int dmrgo_voice_new_jitter(const dmrgo_voice_jitter_config_t *cfg, dmrgo_voice_jitter_t **out);
/* Go: voice.NewReceiver. NewReceiver returns a Receiver for cfg. It returns a DMRGO_ERR_CONFIG when the color code is above 15. cfg may be NULL. */
int dmrgo_voice_new_receiver(const dmrgo_voice_receiver_config_t *cfg, dmrgo_voice_receiver_t **out);
/* Go: voice.NewTransmitter. NewTransmitter returns a Transmitter for cfg. It returns a DMRGO_ERR_CONFIG for a field out of range, and for a Slot other than DMRGO_ENUMS_SLOT1 or DMRGO_ENUMS_SLOT2, so also for a NULL cfg. cfg may be NULL. */
int dmrgo_voice_new_transmitter(const dmrgo_voice_transmitter_config_t *cfg, dmrgo_voice_transmitter_t **out);
/* Go: voice.Origin.String. String returns the name of the origin. */
int dmrgo_voice_origin_string(dmrgo_voice_origin_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* Go: voice.OutputKind.String. String returns the name of the kind. */
int dmrgo_voice_output_kind_string(dmrgo_voice_output_kind_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_voice_receiver_free frees the handle. self may be NULL. */
int dmrgo_voice_receiver_free(dmrgo_voice_receiver_t *self);
/* dmrgo_voice_receiver_burst_need sets *items and *arena to the room that dmrgo_voice_receiver_burst needs for these arguments, without a change to the handle. */
int dmrgo_voice_receiver_burst_need(dmrgo_voice_receiver_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: voice.Receiver.Burst. Burst decodes the burst raw with the data in the Hint h, runs it through the Receiver as Decoded does, and appends the events to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_receiver_burst_need gives. raw may be NULL. */
int dmrgo_voice_receiver_burst(dmrgo_voice_receiver_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_voice_event_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: voice.Receiver.Deadline. Deadline returns the time at which the Receiver needs a Tick. */
int dmrgo_voice_receiver_deadline(dmrgo_voice_receiver_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_voice_receiver_decoded_need sets *items and *arena to the room that dmrgo_voice_receiver_decoded needs for these arguments, without a change to the handle. */
int dmrgo_voice_receiver_decoded_need(dmrgo_voice_receiver_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: voice.Receiver.Decoded. Decoded runs the decoded burst b through the Receiver and appends the events to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_receiver_decoded_need gives. b may be NULL. */
int dmrgo_voice_receiver_decoded(dmrgo_voice_receiver_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *h, dmrgo_voice_event_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: voice.Receiver.Expect. Expect gives the call of voice that arrives without an LC before until, such as after a Tier III grant, or a network stream that starts without a header. */
int dmrgo_voice_receiver_expect(dmrgo_voice_receiver_t *self, dmrgo_duration_t now, const dmrgo_voice_call_t *c, dmrgo_duration_t until);
/* dmrgo_voice_receiver_lost_need sets *items and *arena to the room that dmrgo_voice_receiver_lost needs for these arguments, without a change to the handle. */
int dmrgo_voice_receiver_lost_need(dmrgo_voice_receiver_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: voice.Receiver.Lost. Lost records that the transport lost the signal, such as an MMDVM TAG_LOST. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_receiver_lost_need gives. */
int dmrgo_voice_receiver_lost(dmrgo_voice_receiver_t *self, dmrgo_duration_t now, dmrgo_voice_event_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: voice.Receiver.Reset. Reset ends any call and session without events and clears the expected call. */
int dmrgo_voice_receiver_reset(dmrgo_voice_receiver_t *self);
/* Go: voice.Receiver.State. State returns the state of the Receiver. */
int dmrgo_voice_receiver_state(dmrgo_voice_receiver_t *self, dmrgo_voice_state_t *out);
/* dmrgo_voice_receiver_tick_need sets *items and *arena to the room that dmrgo_voice_receiver_tick needs for these arguments, without a change to the handle. */
int dmrgo_voice_receiver_tick_need(dmrgo_voice_receiver_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: voice.Receiver.Tick. Tick runs the timers that are due at now and appends their events to dst: the end of a call after dmrgo_voice_receiver_config_t.lost without a burst, and the end of the hang time. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_receiver_tick_need gives. */
int dmrgo_voice_receiver_tick(dmrgo_voice_receiver_t *self, dmrgo_duration_t now, dmrgo_voice_event_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need, void *arena, size_t arena_cap, size_t *arena_len, size_t *arena_need);
/* Go: voice.State.String. String returns the name of the state. */
int dmrgo_voice_state_string(dmrgo_voice_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
/* dmrgo_voice_transmitter_free frees the handle. self may be NULL. */
int dmrgo_voice_transmitter_free(dmrgo_voice_transmitter_t *self);
/* dmrgo_voice_transmitter_burst_need sets *items and *arena to the room that dmrgo_voice_transmitter_burst needs for these arguments, without a change to the handle. */
int dmrgo_voice_transmitter_burst_need(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, size_t *items, size_t *arena);
/* Go: voice.Transmitter.Burst. Burst decodes the outbound burst raw with the data in the Hint h, runs it through the Transmitter as Decoded does, and appends the outputs to dst. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_transmitter_burst_need gives (DMRGO_VOICE_TRANSMITTER_BURST_MAX_ITEMS items). raw may be NULL. */
int dmrgo_voice_transmitter_burst(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now, const dmrgo_layer2_raw_burst_t *raw, const dmrgo_layer2_hint_t *h, dmrgo_voice_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: voice.Transmitter.Channel. Channel reports whether the logical channel is busy, from the activity that the caller detects on it, such as the AT bit of the CACH, the carrier, or a call with its own color code. */
int dmrgo_voice_transmitter_channel(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now, bool busy);
/* Go: voice.Transmitter.Deadline. Deadline returns the time at which the Transmitter needs a Tick: the Due time of the next burst minus dmrgo_voice_transmitter_config_t.lead. */
int dmrgo_voice_transmitter_deadline(dmrgo_voice_transmitter_t *self, dmrgo_duration_t *at, bool *ok);
/* dmrgo_voice_transmitter_decoded_need sets *items and *arena to the room that dmrgo_voice_transmitter_decoded needs for these arguments, without a change to the handle. */
int dmrgo_voice_transmitter_decoded_need(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, size_t *items, size_t *arena);
/* Go: voice.Transmitter.Decoded. Decoded takes the decoded outbound burst b of the slot, which may be NULL for a burst that did not decode, while the Transmitter waits in DMRGO_VOICE_TRANSMITTER_CHAN_AUTH. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_transmitter_decoded_need gives (DMRGO_VOICE_TRANSMITTER_DECODED_MAX_ITEMS items). b may be NULL. */
int dmrgo_voice_transmitter_decoded(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now, dmrgo_layer2_burst_t *b, const dmrgo_layer2_hint_t *hint, dmrgo_voice_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: voice.Transmitter.Dropped. Dropped returns the number of relayed voice bursts that the Transmitter dropped: voice before the LC was known, and voice that did not fit in the queue. */
int dmrgo_voice_transmitter_dropped(dmrgo_voice_transmitter_t *self, int64_t *out);
/* Go: voice.Transmitter.Frame. Frame queues one AMBE+2 frame. It returns DMRGO_ERR_VOICE_QUEUE_FULL when Room is 0, DMRGO_ERR_VOICE_TIMED_OUT after T_TO, DMRGO_ERR_VOICE_NOT_ACTIVE when no call takes voice, and the errors of dmrgo_vocoder_encode_ambe72. */
int dmrgo_voice_transmitter_frame(dmrgo_voice_transmitter_t *self, const dmrgo_vocoder_ambe_frame_t *f);
/* Go: voice.Transmitter.Frames. Frames queues AMBE+2 frames as Frame does. */
int dmrgo_voice_transmitter_frames(dmrgo_voice_transmitter_t *self, const dmrgo_vocoder_ambe_frame_t *f, size_t f_len);
/* dmrgo_voice_transmitter_lost_need sets *items and *arena to the room that dmrgo_voice_transmitter_lost needs for these arguments, without a change to the handle. */
int dmrgo_voice_transmitter_lost_need(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: voice.Transmitter.Lost. Lost takes a transport event without a burst, such as an MMDVM TAG_LOST. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_transmitter_lost_need gives (DMRGO_VOICE_TRANSMITTER_LOST_MAX_ITEMS items). */
int dmrgo_voice_transmitter_lost(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now, dmrgo_voice_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: voice.Transmitter.Relay. Relay takes an event of a Receiver and sends the call again: a DMRGO_VOICE_EVENT_CALL_START starts it with its headers, the first due at now plus dmrgo_voice_transmitter_config_t.lead, so that each burst goes out as it comes and is due Lead later, voice is queued, a PI Header is sent after the headers, and a DMRGO_VOICE_EVENT_CALL_END ends it. It returns DMRGO_ERR_VOICE_BUSY for a DMRGO_VOICE_EVENT_CALL_START while a call that is not ending runs, and DMRGO_ERR_NIL_ARGUMENT for a NULL e. e may be NULL. */
int dmrgo_voice_transmitter_relay(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now, const dmrgo_voice_event_t *e);
/* Go: voice.Transmitter.Reset. Reset ends any transmission without an output, empties the queue and clears the channel state. */
int dmrgo_voice_transmitter_reset(dmrgo_voice_transmitter_t *self);
/* Go: voice.Transmitter.ReverseChannel. ReverseChannel takes a Tier 2 RC command that the reverse channel of the call carried, and reports whether the Transmitter ends the call for it. */
int dmrgo_voice_transmitter_reverse_channel(dmrgo_voice_transmitter_t *self, const dmrgo_pdu_reverse_channel_t *rc, bool *out);
/* Go: voice.Transmitter.Room. Room returns the number of vocoder slots that the queue can take. */
int dmrgo_voice_transmitter_room(dmrgo_voice_transmitter_t *self, int64_t *out);
/* Go: voice.Transmitter.Start. Start begins the call c, whose first burst is due at the time at. Start returns DMRGO_ERR_VOICE_BUSY while a transmission runs, and a DMRGO_ERR_CONFIG when c does not make an LC. opts may be NULL. */
int dmrgo_voice_transmitter_start(dmrgo_voice_transmitter_t *self, dmrgo_duration_t at, const dmrgo_voice_call_t *c, const dmrgo_voice_call_options_t *opts);
/* Go: voice.Transmitter.State. State returns the state of the Transmitter. */
int dmrgo_voice_transmitter_state(dmrgo_voice_transmitter_t *self, dmrgo_voice_transmitter_state_t *out);
/* Go: voice.Transmitter.Stop. Stop ends the call at now: the queued voice is sent, the last superframe is padded with silence to burst F, and the terminators follow. */
int dmrgo_voice_transmitter_stop(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now);
/* dmrgo_voice_transmitter_tick_need sets *items and *arena to the room that dmrgo_voice_transmitter_tick needs for these arguments, without a change to the handle. */
int dmrgo_voice_transmitter_tick_need(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now, size_t *items, size_t *arena);
/* Go: voice.Transmitter.Tick. Tick appends the next burst when now has reached its Due time minus dmrgo_voice_transmitter_config_t.lead, and DMRGO_VOICE_OUTPUT_ENDED after the last terminator, or with DMRGO_VOICE_END_DENIED for a polite call that the channel denied for T_IdleSrch. It returns DMRGO_ERR_SHORT and changes nothing when the room is less than dmrgo_voice_transmitter_tick_need gives (DMRGO_VOICE_TRANSMITTER_TICK_MAX_ITEMS items). */
int dmrgo_voice_transmitter_tick(dmrgo_voice_transmitter_t *self, dmrgo_duration_t now, dmrgo_voice_output_t *dst, size_t dst_cap, size_t *dst_len, size_t *dst_need);
/* Go: voice.Transmitter.VocoderSlot. VocoderSlot queues one 72-bit vocoder slot of any codec, packed as dmrgo_layer2_raw_burst_voice_slots returns it, as Frame does. */
int dmrgo_voice_transmitter_vocoder_slot(dmrgo_voice_transmitter_t *self, const uint8_t s[9]);
/* Go: voice.Transmitter.VocoderSlots. VocoderSlots queues 72-bit vocoder slots as VocoderSlot does. */
int dmrgo_voice_transmitter_vocoder_slots(dmrgo_voice_transmitter_t *self, const uint8_t (*s)[9], size_t s_len);
/* Go: voice.TransmitterState.String. String returns the name of the state. */
int dmrgo_voice_transmitter_state_string(dmrgo_voice_transmitter_state_t self, char *out, size_t out_cap, size_t *out_len, size_t *out_need);
#endif
#ifdef __cplusplus
}
#endif
#endif