4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
7 * Sooyoung Ha <yoosah.ha@samsung.com>
8 * Sungmin Ha <sungmin82.ha@samsung.com>
9 * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
11 * This library is free software; you can redistribute it and/or modify it under
12 * the terms of the GNU Lesser General Public License as published by the
13 * Free Software Foundation; either version 2.1 of the License, or (at your option)
16 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
17 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
19 * License for more details.
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this library; if not, write to the Free Software Foundation, Inc., 51
23 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30 /////////////////////////////////////////////////////////////////////
38 #include "at_tx_func.h"
40 static const int max_proactive_command_length = 0x100;
42 int TxSAT_ATGetProactiveCommand(GSM_SatProactiveCmd const* pProactiveCmd)
44 unsigned char data[2 + max_proactive_command_length];
47 TRACE(MSGL_VGSM_INFO, "\n");
49 // this is always passed because (pProactiveCmd->length&0xff00) is always 0, so comment out
50 //assert(!(pProactiveCmd->length&0xff00));
52 data[n++] = (pProactiveCmd->length)&0xff;
53 // this is always 0 because (pProactiveCmd->length >> 8) is 0, so fix like below
54 //data[n++] = (pProactiveCmd->length >> 8)&0xff;
57 memcpy(&data[n], pProactiveCmd->cmd, pProactiveCmd->length);
58 n += pProactiveCmd->length;
60 assert(n <= sizeof data);
62 TRACE(MSGL_VGSM_INFO, "\n");
64 // return at_msg_send(ACK_SEQ_RESPONSE, data, n);