comparison src/g23m-aci/aci/aci_bat_sat.c @ 162:53929b40109c

src/g23m-aci: initial import from TCS3.2/LoCosto
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 11 Oct 2016 02:02:43 +0000
parents
children
comparison
equal deleted inserted replaced
161:4557e2a9c18e 162:53929b40109c
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-F&D (8411)
4 | Modul : ACI_BAT
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : This BAT wrapper modul is ...
18 |
19 +-----------------------------------------------------------------------------
20 */
21
22 #include "aci_all.h" /* includes prim.h, which includes p_bat.h */
23 #include "aci_cmh.h" /* prototypes of sAT_,qAT_,tAT_ */
24 #include "aci_bat_cmh.h" /* prototypes of sBAT_,qBAT_,tBAT_ */
25 #include "aci_bat.h"
26
27 /*
28 +--------------------------------------------------------------------+
29 | PROJECT : GSM-F&D (8411) MODULE : ACI_BAT |
30 | STATE : code ROUTINE : sBAT_PercentSATC |
31 +--------------------------------------------------------------------+
32
33 PURPOSE :
34 */
35 GLOBAL T_ACI_BAT_RSLT sBAT_PercentSATC(T_ACI_DTI_PRC_PSI *src_infos_psi,
36 T_BAT_cmd_send *cmd)
37 {
38 T_ACI_BAT_RSLT ret;
39
40 TRACE_FUNCTION ("sBAT_PercentSATC()");
41
42 ret = (T_ACI_BAT_RSLT)sAT_PercentSATC((T_ACI_CMD_SRC)src_infos_psi->srcId,
43 (SHORT)cmd->params.ptr_set_percent_satc->c_satprfl,
44 (UBYTE *)cmd->params.ptr_set_percent_satc->satprfl);
45 return (ret);
46 }
47
48 /*
49 +--------------------------------------------------------------------+
50 | PROJECT : GSM-F&D (8411) MODULE : ACI_BAT |
51 | STATE : code ROUTINE : qBAT_PercentSATC |
52 +--------------------------------------------------------------------+
53
54 PURPOSE :
55 */
56 GLOBAL T_ACI_BAT_RSLT qBAT_PercentSATC(T_ACI_DTI_PRC_PSI *src_infos_psi,
57 T_BAT_cmd_send *cmd)
58 {
59 T_ACI_BAT_RSLT ret;
60 T_BAT_cmd_response resp;
61 T_BAT_res_que_percent_satc satc;
62
63 TRACE_FUNCTION ("qBAT_PercentSATC()");
64
65 resp.ctrl_response = BAT_RES_QUE_PERCENT_SATC;
66 resp.response.ptr_que_percent_satc = &satc;
67
68 ret =(T_ACI_BAT_RSLT) qAT_PercentSATC((T_ACI_CMD_SRC)src_infos_psi->srcId,
69 (S16*)&satc.c_satprfl, satc.satprfl);
70
71 aci_bat_send(src_infos_psi, &resp);
72 return (ret);
73 }
74
75 /*
76 +--------------------------------------------------------------------+
77 | PROJECT : GSM-F&D (8411) MODULE : ACI_BAT |
78 | STATE : code ROUTINE : sBAT_PercentSATE |
79 +--------------------------------------------------------------------+
80
81 PURPOSE :
82 */
83 GLOBAL T_ACI_BAT_RSLT sBAT_PercentSATE(T_ACI_DTI_PRC_PSI *src_infos_psi,
84 T_BAT_cmd_send *cmd)
85 {
86 T_ACI_BAT_RSLT ret;
87
88 TRACE_FUNCTION ("sBAT_PercentSATE()");
89
90 ret = (T_ACI_BAT_RSLT)sAT_PercentSATE((T_ACI_CMD_SRC)src_infos_psi->srcId,
91 (SHORT)cmd->params.ptr_set_percent_sate->c_satcmd,
92 (UBYTE *)cmd->params.ptr_set_percent_sate->satcmd);
93 return (ret);
94 }
95
96 /*
97 +--------------------------------------------------------------------+
98 | PROJECT : GSM-F&D (8411) MODULE : ACI_BAT |
99 | STATE : code ROUTINE : sBAT_PercentSATR |
100 +--------------------------------------------------------------------+
101
102 PURPOSE :
103 */
104 GLOBAL T_ACI_BAT_RSLT sBAT_PercentSATR(T_ACI_DTI_PRC_PSI *src_infos_psi,
105 T_BAT_cmd_send *cmd)
106 {
107 T_ACI_BAT_RSLT ret;
108
109 TRACE_FUNCTION ("sBAT_PercentSATR()");
110
111 ret =(T_ACI_BAT_RSLT) sAT_PercentSATR((T_ACI_CMD_SRC)src_infos_psi->srcId,
112 (SHORT)cmd->params.ptr_set_percent_satr->c_satrsp,
113 (UBYTE *)cmd->params.ptr_set_percent_satr->satrsp);
114 return (ret);
115 }
116
117 /*
118 +--------------------------------------------------------------------+
119 | PROJECT : GSM-F&D (8411) MODULE : ACI_BAT |
120 | STATE : code ROUTINE : sBAT_PercentSATT |
121 +--------------------------------------------------------------------+
122
123 PURPOSE :
124 */
125 GLOBAL T_ACI_BAT_RSLT sBAT_PercentSATT(T_ACI_DTI_PRC_PSI *src_infos_psi,
126 T_BAT_cmd_send *cmd)
127 {
128 T_ACI_BAT_RSLT ret;
129
130 TRACE_FUNCTION ("sBAT_PercentSATT()");
131
132 ret =(T_ACI_BAT_RSLT) sAT_PercentSATT((T_ACI_CMD_SRC)src_infos_psi->srcId,
133 (T_ACI_SATT_CS)cmd->params.ptr_set_percent_satt->cs);
134 return (ret);
135 }
136
137