IDBLUE logo
IDBluePacket.h
00001 
00002 // Copyright © 2013 Cathexis Innovations Inc. All rights reserved.
00003 
00004 
00005 #import <Foundation/Foundation.h>
00006 #import "CByteArray.h"
00007 
00027 @interface IDBluePacket : CByteArray {
00028 @private        
00029         // The header byte
00030         byte _header;
00031         
00032         // The checksum byte
00033         byte _checksum;
00034                 
00035         // The date / time when the IDBluePacket was created
00036         NSDate* _timestamp;
00037 }
00038 
00044 -(id) initWithPacketSize: (int)packetSize;
00045 
00053 -(id) initWithHeader: (int) packetSize withHeader: (byte) header;
00054 
00059 -(NSDate*) timestamp;
00060 
00066 -(int) payloadSize;
00067 
00074 -(int) packetSize;
00075 
00081 -(byte*) payload;
00082 
00087 -(BOOL) isAsyncPacket;
00088 
00092 -(byte) header;
00093 
00098 -(void) setHeader: (byte) header;
00099 
00103 -(byte) checksum;
00104 
00109 -(void) setChecksum: (byte) checksum;
00110 
00116 -(byte) computeChecksum;
00117 
00124 -(int) computePayloadSize;
00125 
00130 -(void) computePayloadSizeAndChecksum;
00131 
00132 @end

 

Generated on Mon Jan 19 2015 15:47:37
Copyright © 2015 Cathexis Innovations Inc. All Rights Reserved.