I have NSData and i would like to parse it by bytes. Here is an example.
data is <8283010c ec4f483f 0d00000c 0c0f2840 >
I would like to pass 8 bytes to each object i create (8283010c ec4f483f for first object,0d00000c 0c0f2840 for the second)
, and then parse those each bytes like this.
// First byte > Action = 82
// 2nd and 3rd byte > Status = 83 01
// 4,5,6,7 byte > Time = 0c ec 4f48
// 8 byte > Number = 3f
How could i parse NSData to such structure, what types should i use for my variables (Action)?
unsigned char aBuffer[8];
[data getBytes:aBuffer length:8];
Tried to do a little test in such way, but NSLog prints aBuffer with strange symbols, instead of byte values.