Hi guys, im here with a pure C++ question. Im working with String message passing. Here is a sample code:
Code:
strcpy (comando, "Æ" FS "2"); printf ("Comando: %s\n", comando); MandaPaqueteFiscal (handler, comando); UltimaRespuesta (handler, buffer); printf ("Respuesta: %s %s", buffer);
FS is the value to sepparate the fields: (It is used in an example howto of the printer)
The documentation says that "UltimaRespuesta" stores in buffer a 50 byte word like this:Quote:
#define FS "\x1c"
- Status of the printer (4 bytes)
- Field Separator {FS} (1 byte)
- Status Fiscal (4 bytes)
- FS (1 byte)
- Text (40bytes)
An example answer for the first 3 fields could be (as the documentation explains): C080 FS 0600.. that meaning it uses hexa values for the answer.
The thing is that when i look at the application output i recieve the following text:
if i run it in debug modeQuote:
Comando: Æ2
Respuesta:
or:
if I just run the program....Quote:
Comando: Æ2
Respuesta: 0S?
So my question is, how can i read the "0S?" in a way i can interpret it?
I appreciate all the help thank u all in advance