Hi. Excusime, i not write has ben english.
I need a Help.
I have a code:
/************************************************************************8
void AEDRead (u32 Parametro)
{
int Rsp;
char msg[20];
adl_adInfo_t Info;
if(lAeDFormat == FALSE || lAeDRecompact == FALSE)
return;
AeDHDL = adl_adSubscribe(Parametro,20);
Rsp = adl_adInfo(AeDHDL, &Info);
if(Rsp == 0)
{
strncpy(msg,Info.data,Info.size);
}
adl_adUnsubscribe(AeDHDL);
}
void AEDWrite (s32 Parametro)
{
int Rsp;
int datasize;
char teste[4];
teste[0] = 'A';
teste[1] = 'B';
teste[2] = 'C';
teste[3] = 'D';
teste[4] = 0;
datasize = wm_strlen(teste);
if(lAeDFormat == FALSE || lAeDRecompact == FALSE)
return;
AeDHDL = adl_adSubscribe(Parametro,datasize );
Rsp = adl_adWrite(AeDHDL,datasize , teste);
if(Rsp==-21)
{
AEDDelete(Parametro);
Rsp = adl_adWrite(AeDHDL,datasize , teste);
}
adl_adUnsubscribe(AeDHDL);
}
*****************************************************/
His code is a example for read and write in AeD data storage and AeDHDL his a public variable.
when i call write function , “AEDWrite(1);” is recording a data in AeD, but when read a data return “yyyy”.
how is correct format for work with AeD?
what is wrong in my code?
Someone have any example?