void retornnarJSONCorrespondiente(unsigned char procesoCliente, char *retorno)
{
unsigned char i;
char bufferJSON[256];
memset(bufferJSON
,0x00, sizeof(bufferJSON
)); switch(procesoCliente)
{
case SOLICITANDO_CONEXION:
{
"{" \
"\"Tipo\":1" \
"," \
"\"Uid\":\"abcdefghi\"" \
"," \
"\"Puerto\":6777" \
"," \
"\"TipoDeConeccion\":0" \
\
"}"
,255); //longitud - 0x01
break;
}
default: break;
}
i = 0x00;
while(bufferJSON[i] > 0x00)
{
*retorno = bufferJSON[i];
i++;
retorno++;
}
*retorno = 0x00; //pongo en null el último byte
}