comparison rvinterf/tmsh/audioresp.c @ 159:8fac4aaec230

fc-tmsh: beginning of intelligent ETM_AUDIO response handling
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 17 Mar 2017 07:34:29 +0000
parents
children e4c98a2c1673
comparison
equal deleted inserted replaced
158:86e4d8aea021 159:8fac4aaec230
1 /*
2 * In this module we are going to implement the handling of ETM_AUDIO responses.
3 */
4
5 #include <sys/types.h>
6 #include <stdio.h>
7 #include <string.h>
8 #include <strings.h>
9 #include <stdlib.h>
10 #include "pktmux.h"
11 #include "limits.h"
12 #include "localtypes.h"
13 #include "etm.h"
14
15 extern u_char rvi_msg[];
16 extern int rvi_msg_len;
17
18 static void
19 aul_response()
20 {
21 print_etm_pkt_raw("aul response");
22 }
23
24 static void
25 aus_response()
26 {
27 print_etm_pkt_raw("aus response");
28 }
29
30 static void
31 aur_response()
32 {
33 print_etm_pkt_raw("aur response");
34 }
35
36 static void
37 auw_response()
38 {
39 print_etm_pkt_raw("auw response");
40 }
41
42 void
43 etm_audio_msg_rx()
44 {
45 switch (rvi_msg[4]) {
46 case 'L':
47 aul_response();
48 return;
49 case 'S':
50 aus_response();
51 return;
52 case 'R':
53 aur_response();
54 return;
55 case 'W':
56 auw_response();
57 return;
58 default:
59 unknown:
60 print_etm_pkt_raw("ETM_AUDIO");
61 }
62 }