From 2d46e0af01128d34029f10301c51d3ce714a668d Mon Sep 17 00:00:00 2001 From: Steve Underwood Date: Fri, 12 Feb 2016 13:37:32 +0800 Subject: [PATCH] FAX now applies the T1 timer properly after mid call returns to phase B. --- libs/spandsp/spandsp/fax-tests.xml | 90 +- libs/spandsp/src/t30.c | 113 +- libs/spandsp/tests/tsb85_extra_tests.sh | 2 +- libs/spandsp/tests/v18_tests.c | 2724 ++++++++++++----------- 4 files changed, 1507 insertions(+), 1422 deletions(-) diff --git a/libs/spandsp/spandsp/fax-tests.xml b/libs/spandsp/spandsp/fax-tests.xml index 1428bb97f5..8c03d0e22f 100644 --- a/libs/spandsp/spandsp/fax-tests.xml +++ b/libs/spandsp/spandsp/fax-tests.xml @@ -621,20 +621,10 @@ - - - - - - - - - - - - - - + + + + @@ -650,6 +640,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/spandsp/src/t30.c b/libs/spandsp/src/t30.c index 189a16b00c..7bb81ddec1 100644 --- a/libs/spandsp/src/t30.c +++ b/libs/spandsp/src/t30.c @@ -439,9 +439,9 @@ static void start_final_pause(t30_state_t *s); static void decode_20digit_msg(t30_state_t *s, char *msg, const uint8_t *pkt, int len); static void decode_url_msg(t30_state_t *s, char *msg, const uint8_t *pkt, int len); static int decode_nsf_nss_nsc(t30_state_t *s, uint8_t *msg[], const uint8_t *pkt, int len); -static void set_min_scan_time(t30_state_t *s); static int send_cfr_sequence(t30_state_t *s, int start); static int build_dcs(t30_state_t *s); +static void set_min_scan_time(t30_state_t *s); static void timer_t2_start(t30_state_t *s); static void timer_t2_flagged_start(t30_state_t *s); static void timer_t2_dropped_start(t30_state_t *s); @@ -2521,6 +2521,9 @@ static void send_dcn(t30_state_t *s) static void return_to_phase_b(t30_state_t *s, int with_fallback) { /* This is what we do after things like T30_EOM is exchanged. */ + span_log(&s->logging, SPAN_LOG_PROTOCOL_WARNING, "Returning to phase B\n"); + /* Run the T1 timer, like we do on first detecting the far end. */ + s->timer_t0_t1 = ms_to_samples(DEFAULT_TIMER_T1); set_state(s, (s->calling_party) ? T30_STATE_T : T30_STATE_R); } /*- End of function --------------------------------------------------------*/ @@ -3143,6 +3146,58 @@ static int process_rx_dcs(t30_state_t *s, const uint8_t *msg, int len) } /*- End of function --------------------------------------------------------*/ +static void assess_copy_quality(t30_state_t *s, uint8_t fcf) +{ + int quality; + + quality = copy_quality(s); + switch (quality) + { + case T30_COPY_QUALITY_PERFECT: + case T30_COPY_QUALITY_GOOD: + rx_end_page(s); + break; + case T30_COPY_QUALITY_POOR: + rx_end_page(s); + break; + case T30_COPY_QUALITY_BAD: + /* Some people want to keep even the bad pages */ + if (s->keep_bad_pages) + rx_end_page(s); + /*endif*/ + break; + } + /*endswitch*/ + + if (s->phase_d_handler) + s->phase_d_handler(s->phase_d_user_data, fcf); + /*endif*/ + if (fcf == T30_EOP) + terminate_operation_in_progress(s); + else + rx_start_page(s); + /*endif*/ + + switch (quality) + { + case T30_COPY_QUALITY_PERFECT: + case T30_COPY_QUALITY_GOOD: + s->last_rx_page_result = T30_MCF; + break; + case T30_COPY_QUALITY_POOR: + s->last_rx_page_result = T30_RTP; + break; + case T30_COPY_QUALITY_BAD: + default: + s->last_rx_page_result = T30_RTN; + break; + } + /*endswitch*/ + set_state(s, T30_STATE_III_Q); + send_simple_frame(s, s->last_rx_page_result); +} +/*- End of function --------------------------------------------------------*/ + static int send_response_to_pps(t30_state_t *s) { queue_phase(s, T30_PHASE_D_TX); @@ -3290,6 +3345,7 @@ static int process_rx_pps(t30_state_t *s, const uint8_t *msg, int len) /* Use the length of the first frame as our model for what the length should be */ if (s->ecm_len[frame_no] == 64) expected_len = 64; + /*endif*/ first = false; } /*endif*/ @@ -4083,58 +4139,6 @@ static void process_state_f_doc_non_ecm(t30_state_t *s, const uint8_t *msg, int } /*- End of function --------------------------------------------------------*/ -static void assess_copy_quality(t30_state_t *s, uint8_t fcf) -{ - int quality; - - quality = copy_quality(s); - switch (quality) - { - case T30_COPY_QUALITY_PERFECT: - case T30_COPY_QUALITY_GOOD: - rx_end_page(s); - break; - case T30_COPY_QUALITY_POOR: - rx_end_page(s); - break; - case T30_COPY_QUALITY_BAD: - /* Some people want to keep even the bad pages */ - if (s->keep_bad_pages) - rx_end_page(s); - /*endif*/ - break; - } - /*endswitch*/ - - if (s->phase_d_handler) - s->phase_d_handler(s->phase_d_user_data, fcf); - /*endif*/ - if (fcf == T30_EOP) - terminate_operation_in_progress(s); - else - rx_start_page(s); - /*endif*/ - - switch (quality) - { - case T30_COPY_QUALITY_PERFECT: - case T30_COPY_QUALITY_GOOD: - s->last_rx_page_result = T30_MCF; - break; - case T30_COPY_QUALITY_POOR: - s->last_rx_page_result = T30_RTP; - break; - case T30_COPY_QUALITY_BAD: - default: - s->last_rx_page_result = T30_RTN; - break; - } - /*endswitch*/ - set_state(s, T30_STATE_III_Q); - send_simple_frame(s, s->last_rx_page_result); -} -/*- End of function --------------------------------------------------------*/ - static void process_state_f_post_doc_non_ecm(t30_state_t *s, const uint8_t *msg, int len) { uint8_t fcf; @@ -4725,6 +4729,7 @@ static void process_state_ii_q(t30_state_t *s, const uint8_t *msg, int len) t30_set_status(s, T30_ERR_TX_BADPG); break; } + /*endswitch*/ terminate_call(s); break; case T30_CRP: @@ -6088,6 +6093,8 @@ static void timer_t2_expired(t30_state_t *s) /* We didn't receive a response to our T30_MCF after T30_EOM, so we must be OK to proceed to phase B, and pretty much act like its the beginning of a call. */ span_log(&s->logging, SPAN_LOG_FLOW, "Returning to phase B after %s\n", t30_frametype(s->next_rx_step)); + /* Run the T1 timer, like we do on first detecting the far end. */ + s->timer_t0_t1 = ms_to_samples(DEFAULT_TIMER_T1); s->dis_received = false; set_phase(s, T30_PHASE_B_TX); timer_t2_start(s); diff --git a/libs/spandsp/tests/tsb85_extra_tests.sh b/libs/spandsp/tests/tsb85_extra_tests.sh index 25f7ab77ab..7d4b10146b 100755 --- a/libs/spandsp/tests/tsb85_extra_tests.sh +++ b/libs/spandsp/tests/tsb85_extra_tests.sh @@ -28,7 +28,7 @@ run_tsb85_test() fi } -for TEST in PPS-MPS-lost-PPS V17-12000-V29-9600 Phase-D-collision Modem-change-at-CTC ECM-DCN-clipped Non-ECM-DCN-clipped Tx-EOP-echo Tx-PPS-echo Invalid-signalling-rate No-caller-response No-answerer-response +for TEST in PPS-MPS-lost-PPS V17-12000-V29-9600 Phase-D-collision Modem-change-at-CTC ECM-DCN-clipped Non-ECM-DCN-clipped Tx-EOP-echo Tx-PPS-echo Invalid-signalling-rate No-caller-response No-answerer-response T1-after-EOM T1-after-EOMx do run_tsb85_test done diff --git a/libs/spandsp/tests/v18_tests.c b/libs/spandsp/tests/v18_tests.c index a767eac263..866eac8027 100644 --- a/libs/spandsp/tests/v18_tests.c +++ b/libs/spandsp/tests/v18_tests.c @@ -45,6 +45,11 @@ #define SAMPLES_PER_CHUNK 160 +#define CHUNKS_PER_SECOND 50 + +#define TESTER 0 +#define TUT 1 + int log_audio = false; SNDFILE *outhandle = NULL; char result[2][1024]; @@ -56,8 +61,19 @@ int good_message_received; both_ways_line_model_state_t *model; int rbs_pattern = 0; -float noise_level = -70.0f; int line_model_no = 0; +#if 0 +float echo_level_cpe1 = -15.0f; +float echo_level_co1 = -15.0f; +float echo_level_cpe2 = -15.0f; +float echo_level_co2 = -15.0f; +#else +float echo_level_cpe1 = -99.0f; +float echo_level_co1 = -99.0f; +float echo_level_cpe2 = -99.0f; +float echo_level_co2 = -99.0f; +#endif +float noise_level = -70.0f; int channel_codec = MUNGE_CODEC_NONE; v18_state_t *v18[2]; @@ -96,23 +112,23 @@ static void basic_tests(int mode) int j; printf("Testing %s\n", v18_mode_to_str(mode)); - v18[0] = v18_init(NULL, true, mode, V18_AUTOMODING_GLOBAL, put_text_msg, NULL); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, mode, V18_AUTOMODING_GLOBAL, put_text_msg, NULL); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, mode, V18_AUTOMODING_GLOBAL, put_text_msg, NULL); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, mode, V18_AUTOMODING_GLOBAL, put_text_msg, NULL); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -123,19 +139,19 @@ static void basic_tests(int mode) /* Fake an OK condition for the first message test */ good_message_received = true; push = 0; - if (v18_put(v18[0], qbf_tx, -1) != strlen(qbf_tx)) + if (v18_put(v18[TESTER], qbf_tx, -1) != strlen(qbf_tx)) { printf("V.18 put failed\n"); exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { if (push == 0) { - if ((samples = v18_tx(v18[0], amp[0], SAMPLES_PER_CHUNK)) == 0) + if ((samples = v18_tx(v18[TESTER], amp[0], SAMPLES_PER_CHUNK)) == 0) push = 10; } else @@ -150,7 +166,7 @@ static void basic_tests(int mode) exit(2); } good_message_received = false; - if (v18_put(v18[0], qbf_tx, -1) != strlen(qbf_tx)) + if (v18_put(v18[TESTER], qbf_tx, -1) != strlen(qbf_tx)) { printf("V.18 put failed\n"); exit(2); @@ -162,7 +178,7 @@ static void basic_tests(int mode) vec_zeroi16(&[0][samples], SAMPLES_PER_CHUNK - samples); samples = SAMPLES_PER_CHUNK; } - if ((samples = v18_tx(v18[1], amp[1], SAMPLES_PER_CHUNK)) == 0) + if ((samples = v18_tx(v18[TUT], amp[1], SAMPLES_PER_CHUNK)) == 0) push = 10; if (samples < SAMPLES_PER_CHUNK) { @@ -194,11 +210,11 @@ static void basic_tests(int mode) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); } /*- End of function --------------------------------------------------------*/ @@ -229,23 +245,23 @@ static int test_misc_01(void) TUT should continue to probe until the test is terminated. Comments: This feature should also be verified by observation during the automoding tests. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_01_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_01_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_01_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_01_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -253,8 +269,8 @@ static int test_misc_01(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -292,12 +308,12 @@ static int test_misc_01(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -334,23 +350,23 @@ static int test_misc_02(void) Comments: The TUT should indicate that carrier has been lost at some time after the 1650Hz signal is lost. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_02_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_02_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_02_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_02_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -358,8 +374,8 @@ static int test_misc_02(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -397,12 +413,12 @@ static int test_misc_02(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -439,23 +455,23 @@ static int test_misc_03(void) Comments: The TUT should indicate that carrier has been lost at some time after the carrier signal is removed and not disconnect. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_03_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_03_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_03_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_03_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -463,8 +479,8 @@ static int test_misc_03(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -502,12 +518,12 @@ static int test_misc_03(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -543,23 +559,23 @@ static int test_misc_04(void) automatically hang up when busy tone is detected. PABX busy tones may differ in frequency and cadence from national parameters. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_04_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_04_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_04_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_04_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -567,8 +583,8 @@ static int test_misc_04(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -606,12 +622,12 @@ static int test_misc_04(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -644,23 +660,23 @@ static int test_misc_05(void) Pass criteria: The RINGING condition should be visually indicated by the TUT. Comments: This test should be repeated across a range of valid timings and ring voltages. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_05_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_05_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_05_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_05_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -668,8 +684,8 @@ static int test_misc_05(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -707,12 +723,12 @@ static int test_misc_05(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -748,23 +764,23 @@ static int test_misc_06(void) mode. There may be other cases, e.g. where the V.18 DCE is used in a gateway, when automatic disconnection is required. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_06_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_06_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_06_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_06_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -772,8 +788,8 @@ static int test_misc_06(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -811,12 +827,12 @@ static int test_misc_06(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -850,23 +866,23 @@ static int test_misc_07(void) However, this may possibly not be indicated by the DTE. Comments: The possible modes are: V.21, V.23, Baudot 45, Baudot 50, EDT, Bell 103, DTMF. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_07_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_07_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_07_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_07_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -874,8 +890,8 @@ static int test_misc_07(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -913,12 +929,12 @@ static int test_misc_07(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -953,23 +969,23 @@ static int test_misc_08(void) Comment: The response times and signal level thresholds of Circuit 135 are not specified in ITU-T V.18 or V.24 and therefore the pattern indicated may vary. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_08_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_08_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_08_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_08_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -977,8 +993,8 @@ static int test_misc_08(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -1016,12 +1032,12 @@ static int test_misc_08(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -1053,23 +1069,23 @@ static int test_misc_09(void) Pass criteria: TBD Comment: TBD */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_09_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_09_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_09_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, misc_09_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -1077,8 +1093,8 @@ static int test_misc_09(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -1116,12 +1132,12 @@ static int test_misc_09(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -1162,23 +1178,23 @@ static int test_org_01(void) 8) The whole sequence should be repeated until the call is cleared. 9) When V.18 to V.18, the XCI must not force V.23 or Minitel mode. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_01_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_01_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_01_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_01_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -1186,8 +1202,8 @@ static int test_org_01(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -1225,12 +1241,12 @@ static int test_org_01(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -1265,23 +1281,23 @@ static int test_org_02(void) 2) The TUT should reply with transmission of TXP as defined in 5.1.2. 3) Verify that TXP sequence has correct bit pattern. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_02_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_02_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_02_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_02_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -1289,8 +1305,8 @@ static int test_org_02(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -1328,12 +1344,12 @@ static int test_org_02(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -1366,23 +1382,23 @@ static int test_org_03(void) Pass criteria: The TUT should stop sending TXP at the end of the current sequence when ANS tone ceases. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_03_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_03_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_03_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_03_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -1390,8 +1406,8 @@ static int test_org_03(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -1429,12 +1445,12 @@ static int test_org_03(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -1471,23 +1487,23 @@ static int test_org_04(void) with the V.18 operational requirements. Comments: The TUT should indicate that V.18 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_04_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_04_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_04_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_04_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -1495,8 +1511,8 @@ static int test_org_04(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -1534,12 +1550,12 @@ static int test_org_04(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -1577,23 +1593,23 @@ static int test_org_05(void) examination of TUT. If there is no visual indication, verify by use of ITU-T T.50 for ITU-T V.21 as opposed to UTF-8 coded ISO 10646 character set for ITU-T V.18. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_05_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_05_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_05_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_05_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -1601,8 +1617,8 @@ static int test_org_05(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -1640,12 +1656,12 @@ static int test_org_05(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -1682,23 +1698,23 @@ static int test_org_06(void) by the TUT to comply with Annex E. Comments: The TUT should indicate that V.23 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_06_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_06_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_06_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_06_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -1706,8 +1722,8 @@ static int test_org_06(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -1745,12 +1761,12 @@ static int test_org_06(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -1787,23 +1803,23 @@ static int test_org_07(void) literally. It may however, occur when connected to certain Swedish textphones if the handset is lifted just after the start of an automatically answered incoming call. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_07_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_07_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_07_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_07_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -1811,8 +1827,8 @@ static int test_org_07(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -1850,12 +1866,12 @@ static int test_org_07(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -1888,23 +1904,23 @@ static int test_org_08(void) 2) Data should be transmitted and received at 300 bit/s to comply with Annex D. Comments: The TUT should indicate that Bell 103 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_08_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_08_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_08_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_08_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -1912,8 +1928,8 @@ static int test_org_08(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -1951,12 +1967,12 @@ static int test_org_08(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -1989,23 +2005,23 @@ static int test_org_09(void) 2) Data should be transmitted and received at 300 bit/s to comply with Annex F. Comments: The TUT should indicate that V.21 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_09_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_09_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_09_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_09_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -2013,8 +2029,8 @@ static int test_org_09(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -2052,12 +2068,12 @@ static int test_org_09(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -2091,23 +2107,23 @@ static int test_org_10(void) by the TUT to comply with Annex E. Comments: The TUT should indicate that V.23 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_10_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_10_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_10_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_10_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -2115,8 +2131,8 @@ static int test_org_10(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -2154,12 +2170,12 @@ static int test_org_10(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -2196,23 +2212,23 @@ static int test_org_11(void) Comments: The TUT should indicate that V.23 mode has been selected at least 3s after the start of the 390Hz tone. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_11_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_11_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_11_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_11_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -2220,8 +2236,8 @@ static int test_org_11(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -2259,12 +2275,12 @@ static int test_org_11(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -2306,23 +2322,23 @@ static int test_org_12(void) automode answer state. The TUT may then select either 45.45 or 50 bit/s for the transmission. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_12_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_12_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_12_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_12_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -2330,8 +2346,8 @@ static int test_org_12(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -2369,12 +2385,12 @@ static int test_org_12(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -2410,23 +2426,23 @@ static int test_org_13(void) TUT should comply with ITU-T Q.24 for the Danish Administration while receiving for best possible performance. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_13_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_13_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_13_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_13_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -2434,8 +2450,8 @@ static int test_org_13(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -2473,12 +2489,12 @@ static int test_org_13(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -2516,23 +2532,23 @@ static int test_org_14(void) the number lost should be minimal. The data bits and parity are specified in Annex C. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_14_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_14_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_14_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_14_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -2540,8 +2556,8 @@ static int test_org_14(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -2579,12 +2595,12 @@ static int test_org_14(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -2617,23 +2633,23 @@ static int test_org_15(void) the CI signal. Comments: Echoes of the CI sequences may be detected at 300 bit/s. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_15_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_15_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_15_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_15_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -2641,8 +2657,8 @@ static int test_org_15(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -2680,12 +2696,12 @@ static int test_org_15(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -2718,23 +2734,23 @@ static int test_org_16(void) 2) Data should be transmitted and received at 300 bit/s complying with Annex F. Comments: The TUT should indicate that V.21 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_16_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_16_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_16_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_16_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -2742,8 +2758,8 @@ static int test_org_16(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -2781,12 +2797,12 @@ static int test_org_16(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -2817,23 +2833,23 @@ static int test_org_17(void) Pass criteria: TUT should not respond to the 980Hz tone and resume sending CI signals after a maximum of 2.4s from the end of the 980Hz tone. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_17_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_17_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_17_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_17_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -2841,8 +2857,8 @@ static int test_org_17(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -2880,12 +2896,12 @@ static int test_org_17(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -2918,23 +2934,23 @@ static int test_org_18(void) Comments: This implies timer Tr has expired 2s after the start of the 980Hz tone and then 1650Hz has been detected for 0.5s. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_18_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_18_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_18_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_18_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -2942,8 +2958,8 @@ static int test_org_18(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -2981,12 +2997,12 @@ static int test_org_18(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -3018,23 +3034,23 @@ static int test_org_19(void) 2) Data should be transmitted and received at 300 bit/s complying with Annex D. Comments: The TUT should indicate that Bell 103 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_19_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_19_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_19_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_19_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -3042,8 +3058,8 @@ static int test_org_19(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -3081,12 +3097,12 @@ static int test_org_19(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -3125,23 +3141,23 @@ static int test_org_20(void) presence and cadence of the tones for instance by a flashing light. The TUT may disconnect on reception of tones indicating a failed call attempt. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_20_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_20_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_20_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_20_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -3149,8 +3165,8 @@ static int test_org_20(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -3188,12 +3204,12 @@ static int test_org_20(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -3228,23 +3244,23 @@ static int test_org_21(void) Comments: Some high speed modems may fall back to a compatibility mode, e.g. V.21 or V.23 that should be correctly detected by the TUT. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_21_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_21_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_21_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_21_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -3252,8 +3268,8 @@ static int test_org_21(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -3291,12 +3307,12 @@ static int test_org_21(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -3330,23 +3346,23 @@ static int test_org_22(void) Comments: Ideally the TUT should detect the presence of a fax machine and report it back to the user. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_22_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_22_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_22_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_22_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -3354,8 +3370,8 @@ static int test_org_22(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -3393,12 +3409,12 @@ static int test_org_22(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -3432,23 +3448,23 @@ static int test_org_23(void) Comments: Ideally the TUT should report the presence of speech back to the user, e.g. via circuit 135. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_23_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_23_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_23_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_23_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -3456,8 +3472,8 @@ static int test_org_23(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -3495,12 +3511,12 @@ static int test_org_23(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -3536,23 +3552,23 @@ static int test_org_24(void) 2) The TUT should reply with transmission of CM as defined in 5.2.13. 3) Verify that CM sequence has correct bit pattern. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_24_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_24_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_24_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_24_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -3560,8 +3576,8 @@ static int test_org_24(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -3599,12 +3615,12 @@ static int test_org_24(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -3635,23 +3651,23 @@ static int test_org_25(void) Method: The Test System waits for the TUT to start transmitting V.21 carrier (1). Pass criteria: The TUT should connect by sending V.21 carrier (1). */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_25_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_25_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_25_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, org_25_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -3659,8 +3675,8 @@ static int test_org_25(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -3698,12 +3714,12 @@ static int test_org_25(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -3735,23 +3751,23 @@ static int test_ans_01(void) answers the call. It will then monitor for any signal. Pass criteria: The TUT should start probing 3s after answering the call. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_01_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_01_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_01_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_01_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -3759,8 +3775,8 @@ static int test_ans_01(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -3798,12 +3814,12 @@ static int test_ans_01(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -3837,23 +3853,23 @@ static int test_ans_02(void) Comments: The ANSam tone is a modulated 2100Hz tone. It may have phase reversals. The XCI signal is tested in a separate test. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_02_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_02_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_02_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_02_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -3861,8 +3877,8 @@ static int test_ans_02(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -3900,12 +3916,12 @@ static int test_ans_02(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -3943,23 +3959,23 @@ static int test_ans_03(void) V.18 mode connection is completed. Comments: The TUT should indicate V.18 mode. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_03_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_03_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_03_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_03_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -3967,8 +3983,8 @@ static int test_ans_03(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -4006,12 +4022,12 @@ static int test_ans_03(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -4043,23 +4059,23 @@ static int test_ans_04(void) Pass criteria: The TUT should start probing 3s after ANSam disappears. Comments: It is assumed that timer Ta is restarted on return to Monitor A. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_04_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_04_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_04_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_04_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -4067,8 +4083,8 @@ static int test_ans_04(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -4106,12 +4122,12 @@ static int test_ans_04(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -4144,23 +4160,23 @@ static int test_ans_05(void) Pass criteria: TUT should respond with 1650Hz within 400+-100ms of start of 980Hz. Comments: The TUT should indicate that V.21 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_05_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_05_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_05_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_05_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -4168,8 +4184,8 @@ static int test_ans_05(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -4207,12 +4223,12 @@ static int test_ans_05(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -4245,23 +4261,23 @@ static int test_ans_06(void) Pass criteria: TUT should respond with 390Hz after 1.7(+0.2-0.0)s of start of 1300Hz. Comments: The TUT should indicate that V.23 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_06_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_06_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_06_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_06_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -4269,8 +4285,8 @@ static int test_ans_06(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -4308,12 +4324,12 @@ static int test_ans_06(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -4346,23 +4362,23 @@ static int test_ans_07(void) Pass criteria: TUT should respond with 980Hz within 400+-100ms of start of 1650Hz. Comments: The TUT should indicate that V.21 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_07_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_07_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_07_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_07_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -4370,8 +4386,8 @@ static int test_ans_07(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -4409,12 +4425,12 @@ static int test_ans_07(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -4449,23 +4465,23 @@ static int test_ans_08(void) Comments: The TUT should indicate a V.21 connection. The time for which each frequency is transmitted is random and varies between 0.64 and 2.56s. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_08_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_08_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_08_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_08_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -4473,8 +4489,8 @@ static int test_ans_08(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -4512,12 +4528,12 @@ static int test_ans_08(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -4551,23 +4567,23 @@ static int test_ans_09(void) 700ms followed by 1s of silence. Comments: The probe sent by the TUT will depend on the country setting. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_09_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_09_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_09_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_09_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -4575,8 +4591,8 @@ static int test_ans_09(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -4614,12 +4630,12 @@ static int test_ans_09(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -4651,23 +4667,23 @@ static int test_ans_10(void) Pass criteria: The TUT should respond with a 1650Hz tone in 1.5+-0.1s. Comments: The TUT should indicate that V.21 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_10_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_10_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_10_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_10_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -4675,8 +4691,8 @@ static int test_ans_10(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -4714,12 +4730,12 @@ static int test_ans_10(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -4755,23 +4771,23 @@ static int test_ans_11(void) be lost during the detection process. However, the number lost should be minimal. The data bits and parity are specified in Annex C. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_11_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_11_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_11_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_11_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -4779,8 +4795,8 @@ static int test_ans_11(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -4818,12 +4834,12 @@ static int test_ans_11(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -4860,23 +4876,23 @@ static int test_ans_12(void) (1650Hz) probe. However, it is catered for in V.18. It is more likely that this is where CI or TXP characters would be detected (see test ANS-02). */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_12_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_12_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_12_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_12_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -4884,8 +4900,8 @@ static int test_ans_12(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -4923,12 +4939,12 @@ static int test_ans_12(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -4964,23 +4980,23 @@ static int test_ans_13(void) when timer Tr will start. It is assumed that timer Ta is restarted on re-entering the Monitor A state. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_13_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_13_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_13_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_13_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -4988,8 +5004,8 @@ static int test_ans_13(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -5027,12 +5043,12 @@ static int test_ans_13(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -5065,23 +5081,23 @@ static int test_ans_14(void) Comments: It is assumed that timer Ta (3s) is restarted on re-entering the Monitor A state. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_14_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_14_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_14_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_14_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -5089,8 +5105,8 @@ static int test_ans_14(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -5128,12 +5144,12 @@ static int test_ans_14(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -5176,23 +5192,23 @@ static int test_ans_15(void) automode answer state. The TUT may then select either 45.45 or 50 bit/s for the transmission. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_15_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_15_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_15_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_15_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -5200,8 +5216,8 @@ static int test_ans_15(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -5239,12 +5255,12 @@ static int test_ans_15(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -5278,23 +5294,23 @@ static int test_ans_16(void) Comments: The TUT should indicate that it has selected DTMF mode. The DTMF capabilities of the TUT should comply with ITU-T Q.24 for the Danish Administration. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_16_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_16_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_16_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_16_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -5302,8 +5318,8 @@ static int test_ans_16(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -5341,12 +5357,12 @@ static int test_ans_16(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -5377,23 +5393,23 @@ static int test_ans_17(void) Pass criteria: TUT should respond with 2225Hz tone after 0.7+-0.1s. Comments: The TUT should indicate that Bell 103 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_17_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_17_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_17_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_17_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -5401,8 +5417,8 @@ static int test_ans_17(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -5440,12 +5456,12 @@ static int test_ans_17(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -5477,23 +5493,23 @@ static int test_ans_18(void) Comments: The TUT should indicate that Bell 103 mode has been selected. Bell 103 modems use 2225Hz as both answer tone and higher frequency of the upper channel. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_18_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_18_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_18_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_18_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -5501,8 +5517,8 @@ static int test_ans_18(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -5540,12 +5556,12 @@ static int test_ans_18(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -5576,23 +5592,23 @@ static int test_ans_19(void) Pass criteria: The TUT should respond with 980Hz after 0.4+-0.2s. Comments: The TUT should indicate that V.21 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_19_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_19_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_19_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_19_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -5600,8 +5616,8 @@ static int test_ans_19(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -5639,12 +5655,12 @@ static int test_ans_19(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -5678,23 +5694,23 @@ static int test_ans_20(void) 700ms followed by 1s of silence. Comments: The probe sent by the TUT will depend on the country setting. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_20_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_20_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_20_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_20_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -5702,8 +5718,8 @@ static int test_ans_20(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -5741,12 +5757,12 @@ static int test_ans_20(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -5777,23 +5793,23 @@ static int test_ans_21(void) Pass criteria: The TUT should respond with 390Hz after 1.7+-0.1s. Comments: The TUT should indicate that V.23 mode has been selected. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_21_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_21_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_21_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_21_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -5801,8 +5817,8 @@ static int test_ans_21(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -5840,12 +5856,12 @@ static int test_ans_21(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -5876,23 +5892,23 @@ static int test_ans_22(void) silent for 500ms then transmit the TXP signal in V.21 (1) mode. Pass criteria: The TUT should respond with TXP using V.21 (2) and select V.18 mode. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_22_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_22_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_22_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_22_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -5900,8 +5916,8 @@ static int test_ans_22(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -5939,12 +5955,12 @@ static int test_ans_22(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -5978,23 +5994,23 @@ static int test_ans_23(void) Pass criteria: The TUT should use the orders described in Appendix I. Comments: The order of the probes is not mandatory. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_23_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_23_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_23_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_23_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -6002,8 +6018,8 @@ static int test_ans_23(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -6041,12 +6057,12 @@ static int test_ans_23(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -6080,23 +6096,23 @@ static int test_ans_24(void) modes followed by a pause of Tm (default 3)s. Comments: The carrierless modes are those described in Annexes A, B and C. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_24_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_24_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_24_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_24_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -6104,8 +6120,8 @@ static int test_ans_24(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -6143,12 +6159,12 @@ static int test_ans_24(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -6182,23 +6198,23 @@ static int test_ans_25(void) Pass criteria: The TUT should transmit silence on detecting the 1270Hz tone and then continue probing starting with the V.23 probe 20s after the end of the 1270Hz signal. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_25_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_25_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_25_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_25_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -6206,8 +6222,8 @@ static int test_ans_25(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -6245,12 +6261,12 @@ static int test_ans_25(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -6284,23 +6300,23 @@ static int test_ans_26(void) 75+-5ms and then the 1650Hz, 1300Hz and 2225Hz probes for time Tc. Comments: The carrier modes are those described in Annexes D, E, and F. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_26_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_26_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_26_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_26_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -6308,8 +6324,8 @@ static int test_ans_26(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -6347,12 +6363,12 @@ static int test_ans_26(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -6390,23 +6406,23 @@ static int test_ans_27(void) 390Hz. When the 1300Hz probe is not being transmitted, a 390Hz tone may be interpreted as a 400Hz network tone. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_27_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_27_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_27_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_27_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -6414,8 +6430,8 @@ static int test_ans_27(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -6453,12 +6469,12 @@ static int test_ans_27(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -6494,23 +6510,23 @@ static int test_ans_28(void) Comments: It is most likely that the TUT will return to probing time Ta (3s) after the 1270Hz tone ceases. This condition needs further clarification. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_28_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_28_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_28_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_28_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -6518,8 +6534,8 @@ static int test_ans_28(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -6557,12 +6573,12 @@ static int test_ans_28(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -6597,23 +6613,23 @@ static int test_ans_29(void) Comments: The TUT may not respond to any signals while a carrierless mode probe is being sent since these modes are half duplex. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_29_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_29_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_29_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_29_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -6621,8 +6637,8 @@ static int test_ans_29(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -6660,12 +6676,12 @@ static int test_ans_29(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -6702,23 +6718,23 @@ static int test_ans_30(void) tones may be ignored. Some devices may only provide a visual indication of the presence and cadence of the tones for instance by a flashing light. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_30_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_30_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_30_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_30_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -6726,8 +6742,8 @@ static int test_ans_30(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -6765,12 +6781,12 @@ static int test_ans_30(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -6804,23 +6820,23 @@ static int test_ans_31(void) Comments: This is an optional test as detection of the fax calling tone is not required by ITU-T V.18. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_31_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_31_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_31_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_31_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -6828,8 +6844,8 @@ static int test_ans_31(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -6867,12 +6883,12 @@ static int test_ans_31(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -6906,23 +6922,23 @@ static int test_ans_32(void) Comments: Ideally the TUT should report the presence of speech back to the user. This is an optional test. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_32_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_32_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_32_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_32_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -6930,8 +6946,8 @@ static int test_ans_32(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -6969,12 +6985,12 @@ static int test_ans_32(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -7013,23 +7029,23 @@ static int test_ans_33(void) V.18 mode connection is completed. Comments: The TUT should indicate V.18 mode. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_33_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_33_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_33_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, ans_33_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -7037,8 +7053,8 @@ static int test_ans_33(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -7076,12 +7092,12 @@ static int test_ans_33(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -7125,23 +7141,23 @@ static int test_mon_21(void) for 1 minute. Pass criteria: The TUT should not start probing. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_21_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_21_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_21_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_21_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -7149,8 +7165,8 @@ static int test_mon_21(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -7188,12 +7204,12 @@ static int test_mon_21(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -7229,23 +7245,23 @@ static int test_mon_22(void) Comments: In automode answer, the 1300Hz calling causes the DCE to start probing. In monitor mode it should only report detection to the DTE. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_22_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_22_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_22_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_22_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -7253,8 +7269,8 @@ static int test_mon_22(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -7292,12 +7308,12 @@ static int test_mon_22(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -7333,23 +7349,23 @@ static int test_mon_23(void) Comments: In automode answer, the 980Hz calling causes the DCE to start probing. In monitor mode it should only report detection to the DTE. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_23_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_23_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_23_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, mon_23_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -7357,8 +7373,8 @@ static int test_mon_23(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -7396,12 +7412,12 @@ static int test_mon_23(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -7411,9 +7427,9 @@ static void x_01_put_text_msg(void *user_data, const uint8_t *msg, int len) { printf("1-1 %d '%s'\n", len, msg); if (user_data == NULL) - strcat(result[1], (const char *) msg); + strcat(result[TUT], (const char *) msg); else - v18_put(v18[1], "abcdefghij", 10); + v18_put(v18[TUT], "abcdefghij", 10); } /*- End of function --------------------------------------------------------*/ @@ -7444,23 +7460,23 @@ static int test_x_01(void) 3) The tester will confirm that 1 start bit and at least 1.5 stop bits are used. Comments: The carrier should be maintained during the 300ms after a character. */ - v18[0] = v18_init(NULL, true, V18_MODE_5BIT_4545, V18_AUTOMODING_GLOBAL, x_01_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_5BIT_4545, V18_AUTOMODING_GLOBAL, x_01_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_5BIT_4545, V18_AUTOMODING_GLOBAL, x_01_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_5BIT_4545, V18_AUTOMODING_GLOBAL, x_01_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -7468,9 +7484,9 @@ static int test_x_01(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; - v18_put(v18[0], "zabcdefghijklmnopq", -1); + result[TESTER][0] = + result[TUT][0] = '\0'; + v18_put(v18[TESTER], "zabcdefghijklmnopq", -1); for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -7508,16 +7524,16 @@ static int test_x_01(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); ref = "cdefghij"; - printf("Result:\n%s\n", result[1]); + printf("Result:\n%s\n", result[TUT]); printf("Reference result:\n%s\n", ref); - if (unexpected_echo || strcmp(result[1], ref) != 0) + if (unexpected_echo || strcmp(result[TUT], ref) != 0) return -1; return 1; } @@ -7549,23 +7565,23 @@ static int test_x_02(void) transmit the string "abcdef" at each rate. Pass criteria: The tester will measure the bit timings and confirm the rates. */ - v18[0] = v18_init(NULL, true, V18_MODE_5BIT_4545, V18_AUTOMODING_GLOBAL, x_02_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_5BIT_4545, V18_AUTOMODING_GLOBAL, x_02_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_5BIT_4545, V18_AUTOMODING_GLOBAL, x_02_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_5BIT_4545, V18_AUTOMODING_GLOBAL, x_02_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -7573,8 +7589,8 @@ static int test_x_02(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -7612,12 +7628,12 @@ static int test_x_02(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -7652,23 +7668,23 @@ static int test_x_03(void) Comments: The probe message must be long enough for the tester to establish the bit rate. "GA" may not be sufficient. */ - v18[0] = v18_init(NULL, true, V18_MODE_5BIT_4545, V18_AUTOMODING_USA, x_03_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_5BIT_4545, V18_AUTOMODING_USA, x_03_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_5BIT_4545, V18_AUTOMODING_USA, x_03_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_5BIT_4545, V18_AUTOMODING_USA, x_03_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -7676,8 +7692,8 @@ static int test_x_03(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -7715,12 +7731,12 @@ static int test_x_03(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 1; } @@ -7730,16 +7746,16 @@ static void x_04_put_text_msg(void *user_data, const uint8_t *msg, int len) { if (user_data == NULL) { - strcat(result[0], (const char *) msg); + strcat(result[TESTER], (const char *) msg); printf("Unexpected ECHO received (%d) '%s'\n", len, msg); unexpected_echo = true; } else { printf("1-1 %d '%s'\n", len, msg); - strcat(result[1], (const char *) msg); + strcat(result[TUT], (const char *) msg); /* Echo each received character */ - //v18_put(v18[1], msg, len); + //v18_put(v18[TUT], msg, len); } } /*- End of function --------------------------------------------------------*/ @@ -7775,23 +7791,23 @@ static int test_x_04(void) assumed that the character conversion is the same for Baudot at 50 bit/s and any other supported speed. */ - v18[0] = v18_init(NULL, true, V18_MODE_5BIT_4545 | V18_MODE_REPETITIVE_SHIFTS_OPTION, V18_AUTOMODING_GLOBAL, x_04_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_5BIT_4545 | V18_MODE_REPETITIVE_SHIFTS_OPTION, V18_AUTOMODING_GLOBAL, x_04_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_5BIT_4545 | V18_MODE_REPETITIVE_SHIFTS_OPTION, V18_AUTOMODING_GLOBAL, x_04_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_5BIT_4545 | V18_MODE_REPETITIVE_SHIFTS_OPTION, V18_AUTOMODING_GLOBAL, x_04_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -7799,13 +7815,13 @@ static int test_x_04(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; unexpected_echo = false; for (i = 0; i < 127; i++) msg[i] = i + 1; msg[127] = '\0'; - v18_put(v18[0], msg, 127); + v18_put(v18[TESTER], msg, 127); for (i = 0; i < 2000; i++) { @@ -7843,16 +7859,16 @@ static int test_x_04(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); - printf("Result:\n%s\n", result[0]); - printf("Result:\n%s\n", result[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); + printf("Result:\n%s\n", result[TESTER]); + printf("Result:\n%s\n", result[TUT]); printf("Reference result:\n%s\n", full_baudot_rx); - if (unexpected_echo || strcmp(result[1], full_baudot_rx) != 0) + if (unexpected_echo || strcmp(result[TUT], full_baudot_rx) != 0) return -1; return 0; } @@ -7864,14 +7880,14 @@ static void x_05_put_text_msg(void *user_data, const uint8_t *msg, int len) { /* Gather the received characters, which should be like the transmitted characters, but with the first three characters missing. */ - strcat(result[0], (const char *) msg); + strcat(result[TESTER], (const char *) msg); } else { /* Receiving a character from the far end should block out its receiver for a while. If we send a stream of DTMF back, the first few characters (actually 3 for this particular text string) should be lost. */ - v18_put(v18[1], "behknqtwz", 9); + v18_put(v18[TUT], "behknqtwz", 9); } } /*- End of function --------------------------------------------------------*/ @@ -7900,23 +7916,23 @@ static int test_x_05(void) display will show when its receiver is re-enabled. Pass criteria: The receiver should be re-enabled after 300ms. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_05_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_05_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_05_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_05_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -7924,10 +7940,10 @@ static int test_x_05(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; /* Sending a character should block out the receiver for a while */ - v18_put(v18[0], "z", 1); + v18_put(v18[TESTER], "z", 1); for (i = 0; i < 1000; i++) { @@ -7966,16 +7982,16 @@ static int test_x_05(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); ref = "knqtwz"; - printf("Result:\n%s\n", result[0]); + printf("Result:\n%s\n", result[TESTER]); printf("Reference result:\n%s\n", ref); - if (strcmp(result[0], ref) != 0) + if (strcmp(result[TESTER], ref) != 0) return -1; return 0; } @@ -7986,7 +8002,7 @@ static void x_06_put_text_msg(void *user_data, const uint8_t *msg, int len) if (user_data == NULL) ; else - strcat(result[1], (const char *) msg); + strcat(result[TUT], (const char *) msg); } /*- End of function --------------------------------------------------------*/ @@ -8018,23 +8034,23 @@ static int test_x_06(void) receiving character from the TUT. It is assumed that the echo delay in the test system is negligible. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_06_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_06_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_06_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_06_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -8042,12 +8058,12 @@ static int test_x_06(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 127; i++) msg[i] = i + 1; msg[127] = '\0'; - v18_put(v18[0], msg, 127); + v18_put(v18[TESTER], msg, 127); for (i = 0; i < 10000; i++) { @@ -8086,19 +8102,19 @@ static int test_x_06(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } ref = "\b \n\n\n?\n\n\n !%+().+,-.0123456789:;(=)?" "XABCDEFGHIJKLMNOPQRSTUVWXYZ\xC6\xD8\xC5" " abcdefghijklmnopqrstuvwxyz\xE6\xF8\xE5 \b"; - printf("Result:\n%s\n", result[0]); + printf("Result:\n%s\n", result[TESTER]); printf("Reference result:\n%s\n", ref); - v18_free(v18[0]); - v18_free(v18[1]); - if (strcmp(result[1], ref) != 0) + v18_free(v18[TESTER]); + v18_free(v18[TUT]); + if (strcmp(result[TUT], ref) != 0) return -1; return 0; } @@ -8135,23 +8151,23 @@ static int test_x_07(void) 3) The tester will confirm that 1 start bit and at least 1.5 stop bits are used. Comments: The carrier should be maintained during the 300ms after a character. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_07_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_07_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_07_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_07_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -8159,8 +8175,8 @@ static int test_x_07(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -8198,12 +8214,12 @@ static int test_x_07(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 0; } @@ -8236,23 +8252,23 @@ static int test_x_08(void) 2) The tester should confirm that 1 start bit, 7 data bits, 1 even parity bit and 2 stop bits are used. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_08_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_08_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_08_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_08_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -8260,8 +8276,8 @@ static int test_x_08(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -8299,12 +8315,12 @@ static int test_x_08(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 0; } @@ -8340,23 +8356,23 @@ static int test_x_09(void) that there are no duplicate characters on the TUT display. 3) The received string should be correctly displayed despite the incorrect parity. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_09_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_09_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_09_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_09_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -8364,8 +8380,8 @@ static int test_x_09(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -8403,12 +8419,12 @@ static int test_x_09(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 0; } @@ -8447,23 +8463,23 @@ static int test_x_10(void) Comments: This test is only applicable to Minitel Dialogue terminals. Prestel and Minitel Normal terminals cannot operate in this mode. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_10_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_10_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_10_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_10_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -8471,8 +8487,8 @@ static int test_x_10(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -8510,12 +8526,12 @@ static int test_x_10(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 0; } @@ -8552,23 +8568,23 @@ static int test_x_11(void) 4) The last five characters on the TUT display should be "12345" (no "6") correctly displayed despite the incorrect parity. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_11_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_11_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_11_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_11_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -8576,8 +8592,8 @@ static int test_x_11(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -8615,12 +8631,12 @@ static int test_x_11(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 0; } @@ -8654,23 +8670,23 @@ static int test_x_12(void) Pass criteria: The tester should confirm UTF8 encoded UNICODE characters are used with the controls specified in ITU-T T.140. */ - v18[0] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_12_put_text_msg, (void *) (intptr_t) 0); - logging = v18_get_logging_state(v18[0]); + v18[TESTER] = v18_init(NULL, true, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_12_put_text_msg, (void *) (intptr_t) 0); + logging = v18_get_logging_state(v18[TESTER]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "Tester"); - v18[1] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_12_put_text_msg, (void *) (intptr_t) 1); - logging = v18_get_logging_state(v18[1]); + v18[TUT] = v18_init(NULL, false, V18_MODE_DTMF, V18_AUTOMODING_GLOBAL, x_12_put_text_msg, (void *) (intptr_t) 1); + logging = v18_get_logging_state(v18[TUT]); span_log_set_level(logging, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW); span_log_set_tag(logging, "TUT"); if ((model = both_ways_line_model_init(line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe1, + echo_level_co1, line_model_no, - (float) noise_level, - -15.0f, - -15.0f, + noise_level, + echo_level_cpe2, + echo_level_co2, channel_codec, rbs_pattern)) == NULL) { @@ -8678,8 +8694,8 @@ static int test_x_12(void) exit(2); } - result[0][0] = - result[1][0] = '\0'; + result[TESTER][0] = + result[TUT][0] = '\0'; for (i = 0; i < 10000; i++) { for (j = 0; j < 2; j++) @@ -8717,12 +8733,12 @@ static int test_x_12(void) vec_copyi16(model_amp[0], amp[0], samples); vec_copyi16(model_amp[1], amp[1], samples); #endif - v18_rx(v18[0], model_amp[1], samples); - v18_rx(v18[1], model_amp[0], samples); + v18_rx(v18[TESTER], model_amp[1], samples); + v18_rx(v18[TUT], model_amp[0], samples); } - v18_free(v18[0]); - v18_free(v18[1]); + v18_free(v18[TESTER]); + v18_free(v18[TUT]); printf("Test not yet implemented\n"); return 0; }