Skip navigation.
Home
The QNX Community Portal

View topic - QNX function to parse a binary data

QNX function to parse a binary data

For discussion of realtime and/or embedded programming.

QNX function to parse a binary data

Postby wantrg » Mon Jan 31, 2011 9:48 am

Hello everyone,

I would like to read a binary data that coming on serial port in stream format.
The stream data is a reading data from 6 channels of sensor and for one channel data is represented as 2 bytes. So, the stream data will be 14bytes and the start of a new message will be two words 0xF0, 0xF0 to indicate this is the right data that I want following by 16-bit words organized as LSB and then MSB for one channel.

Is there any QNX API/function that I can use to parse/extract this data byte by byte? Hopefully somebody can help and give me some advice.

Thank you.
wantrg
New Member
 
Posts: 6
Joined: Thu Mar 11, 2010 6:52 pm

RE: QNX function to parse a binary data

Postby maschoen » Mon Jan 31, 2011 5:36 pm

getc()
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 3 guests