bladox.com Forum Index bladox.com
Turbo SIM Toolkit Adapter Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Spider help

 
Post new topic   Reply to topic    bladox.com Forum Index -> Development
View previous topic :: View next topic  
Author Message
jplaschke



Joined: 04 Mar 2009
Posts: 23

PostPosted: Fri Mar 20, 2009 4:02 pm    Post subject: Spider help Reply with quote

I took the locate example and changed the menus such that locate was a sub menu

Sometimes, it seems to get lost as far as what menu it is in.

I do a query location (from a sub-menu) and the information is returned.

The following is done in the Answer. The query is called from a submenu.
I think the display_text and display_text_raw provide a "OK" "BACK" and this confuses spider

Also, the display sometimes does not go to the current menu. It is only shown when "Back" or "OK" from menu where query was done.



I followed the example but am not sure about the return from a callback.
called in answer query

====================================
r = sprintc (r, '\0');
display_text (buf, NULL);
//Q_DISPLAY_TEXT_HIGH_PRIORITY | Q_DISPLAY_TEXT_USER_CLEAR);
free (buf);
======================================

SNodeP cb_n = { lc_Demo, NULL };
SNodeP cb_GetInfo_n = { lc_GetInfo, cb_GetInfo };
SNodeP cb_StoreInfo_n = { lc_StoreInfo, cb_StoreInfo };

/* *INDENT-OFF* */

SEdgeP cb_edges_p[] = {
{&cb_n, &cb_GetInfo_n},
{&cb_n, &cb_ReadEfLoci_n},
NULL
};


u8 cb_GetInfo (SCtx * ctx, u8 action)
{
u8 *tmp, *res, *ms2;
u8 *ms;
u8 *q;
u8 l, j, i;
u8 alpha[ALPHA_LEN];

if (action == APP_ENTER)
{

tmp = NULL;
ms = NULL;
//u8 *pAlpha = NULL;

res =
get_input (locale (lc_Service_Nr), 7, MAX_NR_LEN - 1, NULL,
Q_GET_INPUT_DIGITS);

if (res == ENULL)
return APP_END; // APP_END;

if (res == NULL)
return APP_BACK; // APP_BACK;

//res[res[1] + 1] = '\0';

if (res != ENULL && res != NULL)
{
ms = str2msisdn(&res[2],MSISDN_ADN, MEM_R);
tmp = malloc (20);
q = create_head_q (tmp, t_Position_mime, ms, MSISDN_ADN);
send_sms (tmp, q - tmp, ms, MSISDN_ADN,0x16, 0x7F, alphastr,
NULL);
}

free (tmp);
free (ms);

//spider_back(ctx);
return APP_BACK;
}
return action;
}



u8 cb_StoreInfo (SCtx * ctx, u8 action)
{
u8 *buf = malloc (200);
u8 *r = buf;
u8 i, rtn;
u8 file_buf[18];

if (action == APP_ENTER)
{
// details removed

rtn = display_text (buf, NULL);
rtn = APP_BACK;

if (rtn != APP_END)
return APP_BACK;
return rtn;
}
return action;
}
Back to top
View user's profile Send private message
jplaschke



Joined: 04 Mar 2009
Posts: 23

PostPosted: Fri Mar 20, 2009 9:08 pm    Post subject: Reply with quote

The problem is fixed. The query message was too big. Greater than 140
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    bladox.com Forum Index -> Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group