spandsp 3.0.0
private/v150_1_sse.h
1/*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * private/v150_1_sse.h - An implementation of the state signaling events
5 * (SSE), protocol defined in V.150.1 Annex C, less
6 * the packet exchange part
7 *
8 * Written by Steve Underwood <steveu@coppice.org>
9 *
10 * Copyright (C) 2022 Steve Underwood
11 *
12 * All rights reserved.
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2, as
16 * published by the Free Software Foundation.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#if !defined(_SPANDSP_PRIVATE_V150_1_SSE_H_)
29#define _SPANDSP_PRIVATE_V150_1_SSE_H_
30
32{
33 int reliability_method;
34
35 int repetition_count; /* Default 3 See V.150.1 C.4.1 */
36 int repetition_interval; /* Defautl 20ms See V.150.1 C.4.1 */
37
38 int ack_n0count; /* Default 3 See V.150.1 C.4.3.1 */
39 int ack_t0interval; /* Default 10ms See V.150.1 C.4.3.1 */
40 int ack_t1interval; /* Default 300ms See V.150.1 C.4.3.1 */
41
42 int recovery_n; /* Default 5 See V.150.1 C.5.4.1 */
43 int recovery_t1; /* Default 1s See V.150.1 C.5.4.1 */
44 int recovery_t2; /* Default 1s See V.150.1 C.5.4.1 */
45
46 span_timestamp_t latest_timer;
47
48 /* Explicit acknowledgement variables. */
49 bool explicit_ack_enabled;
50
51 span_timestamp_t recovery_timer_t1; /* See V.150.1 C.5.4.1 */
52 span_timestamp_t recovery_timer_t2; /* See V.150.1 C.5.4.1 */
53 int recovery_counter_n; /* See V.150.1 C.5.4.1 */
54
55 /* Timer to control repetition transmission */
56 span_timestamp_t repetition_timer; /* See V.150.1 C.4.1 */
57 /* Counter used to control repetition transmission */
58 int repetition_counter; /* See V.150.1 C.4.1 */
59
60 /* Timer to control sending mode change messages to the remote node */
61 span_timestamp_t ack_timer_t0; /* See V.150.1 C.4.3.1 */
62 /* Timer to recover from lost acknowledgements sent by the remote node */
63 span_timestamp_t ack_timer_t1; /* See V.150.1 C.4.3.1 */
64 /* Counter used to control sending mode change messages to the remote node */
65 int ack_counter_n0; /* See V.150.1 C.4.3.1 */
66 bool force_response;
67
68 bool immediate_timer;
69
70 uint8_t last_tx_pkt[256];
71 int last_tx_len;
72
73 /* The last timestamp received from the remote gateway or endpoint */
74 uint32_t previous_rx_timestamp;
75
76 v150_1_sse_tx_packet_handler_t tx_packet_handler;
77 void *tx_packet_user_data;
78};
79
80#endif
81/*- End of file ------------------------------------------------------------*/
Definition private/v150_1_sse.h:32