diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2017-07-19 16:37:17 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2017-07-19 16:37:17 -0400 |
commit | 67e5b140530f1affb04ec8ecf218a26679398eec (patch) | |
tree | 6d1e1f7c4202d241b9079e17103a6a77a9821a3c | |
parent | 9fdd18c0cf02fe50d5f0bf2b7a8573ead691bf8c (diff) | |
download | sdl_ios-67e5b140530f1affb04ec8ecf218a26679398eec.tar.gz |
First pass at start service control message
-rw-r--r-- | SmartDeviceLink-iOS.xcodeproj/project.pbxproj | 32 | ||||
-rw-r--r-- | SmartDeviceLink/SDLControlFrameStartService.h | 17 | ||||
-rw-r--r-- | SmartDeviceLink/SDLControlFrameStartService.m | 53 | ||||
-rw-r--r-- | SmartDeviceLink/SDLControlMessage.h | 13 | ||||
-rw-r--r-- | SmartDeviceLink/SDLControlMessage.m | 13 | ||||
-rw-r--r-- | SmartDeviceLink/SDLProtocol.m | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLProtocolHeader.h | 1 | ||||
-rw-r--r-- | SmartDeviceLink/SDLProtocolHeader.m | 16 | ||||
-rw-r--r-- | SmartDeviceLink/SDLProtocolMessage.h | 5 | ||||
-rw-r--r-- | SmartDeviceLink/SDLProtocolMessage.m | 39 | ||||
-rw-r--r-- | SmartDeviceLink/SDLProtocolReceivedMessageRouter.m | 22 | ||||
-rw-r--r-- | SmartDeviceLink/SDLV2ProtocolHeader.m | 2 |
12 files changed, 174 insertions, 41 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj index e30eb7e92..da9f28665 100644 --- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj +++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj @@ -873,6 +873,10 @@ 5DA49CD91F1E890500E65FC5 /* bson_util.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA49CD31F1E890500E65FC5 /* bson_util.h */; }; 5DA49CDC1F1E890D00E65FC5 /* emhashmap.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DA49CDA1F1E890D00E65FC5 /* emhashmap.c */; }; 5DA49CDD1F1E890D00E65FC5 /* emhashmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA49CDB1F1E890D00E65FC5 /* emhashmap.h */; }; + 5DA49CE51F1EA83300E65FC5 /* SDLControlFrameStartService.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA49CE31F1EA83300E65FC5 /* SDLControlFrameStartService.h */; }; + 5DA49CE61F1EA83300E65FC5 /* SDLControlFrameStartService.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DA49CE41F1EA83300E65FC5 /* SDLControlFrameStartService.m */; }; + 5DA49CED1F1FD9F600E65FC5 /* SDLControlMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA49CEB1F1FD9F600E65FC5 /* SDLControlMessage.h */; }; + 5DA49CEE1F1FD9F600E65FC5 /* SDLControlMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DA49CEC1F1FD9F600E65FC5 /* SDLControlMessage.m */; }; 5DAE06731BDEC6C000F9B498 /* SDLFileSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAE06721BDEC6C000F9B498 /* SDLFileSpec.m */; }; 5DAE06751BDEC6D600F9B498 /* SDLArtworkSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAE06741BDEC6D600F9B498 /* SDLArtworkSpec.m */; }; 5DB1BCD31D243A8E002FFC37 /* SDLDeleteFileOperationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DB1BCD01D243A8E002FFC37 /* SDLDeleteFileOperationSpec.m */; }; @@ -1942,6 +1946,10 @@ 5DA49CD31F1E890500E65FC5 /* bson_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bson_util.h; sourceTree = "<group>"; }; 5DA49CDA1F1E890D00E65FC5 /* emhashmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = emhashmap.c; sourceTree = "<group>"; }; 5DA49CDB1F1E890D00E65FC5 /* emhashmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = emhashmap.h; sourceTree = "<group>"; }; + 5DA49CE31F1EA83300E65FC5 /* SDLControlFrameStartService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLControlFrameStartService.h; sourceTree = "<group>"; }; + 5DA49CE41F1EA83300E65FC5 /* SDLControlFrameStartService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLControlFrameStartService.m; sourceTree = "<group>"; }; + 5DA49CEB1F1FD9F600E65FC5 /* SDLControlMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLControlMessage.h; sourceTree = "<group>"; }; + 5DA49CEC1F1FD9F600E65FC5 /* SDLControlMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLControlMessage.m; sourceTree = "<group>"; }; 5DAE06721BDEC6C000F9B498 /* SDLFileSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLFileSpec.m; path = DevAPISpecs/SDLFileSpec.m; sourceTree = "<group>"; }; 5DAE06741BDEC6D600F9B498 /* SDLArtworkSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLArtworkSpec.m; path = DevAPISpecs/SDLArtworkSpec.m; sourceTree = "<group>"; }; 5DB1BCD01D243A8E002FFC37 /* SDLDeleteFileOperationSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLDeleteFileOperationSpec.m; path = DevAPISpecs/SDLDeleteFileOperationSpec.m; sourceTree = "<group>"; }; @@ -3325,6 +3333,7 @@ 5D5935021A851D8700687FB9 /* Message */ = { isa = PBXGroup; children = ( + 5DA49CE21F1EA77900E65FC5 /* Control Frames */, 5D61FB5B1A84238B00846EE7 /* SDLProtocolMessage.h */, 5D61FB5C1A84238B00846EE7 /* SDLProtocolMessage.m */, 5D61FC0A1A84238C00846EE7 /* SDLV1ProtocolMessage.h */, @@ -3668,12 +3677,12 @@ 5DA49C8C1F1E549000E65FC5 /* BSON */ = { isa = PBXGroup; children = ( - 5DA49CCE1F1E890500E65FC5 /* bson_array.c */, 5DA49CCF1F1E890500E65FC5 /* bson_array.h */, - 5DA49CD01F1E890500E65FC5 /* bson_object.c */, + 5DA49CCE1F1E890500E65FC5 /* bson_array.c */, 5DA49CD11F1E890500E65FC5 /* bson_object.h */, - 5DA49CD21F1E890500E65FC5 /* bson_util.c */, + 5DA49CD01F1E890500E65FC5 /* bson_object.c */, 5DA49CD31F1E890500E65FC5 /* bson_util.h */, + 5DA49CD21F1E890500E65FC5 /* bson_util.c */, 5DA49CB51F1E64BB00E65FC5 /* emhashmap */, ); name = BSON; @@ -3682,13 +3691,24 @@ 5DA49CB51F1E64BB00E65FC5 /* emhashmap */ = { isa = PBXGroup; children = ( - 5DA49CDA1F1E890D00E65FC5 /* emhashmap.c */, 5DA49CDB1F1E890D00E65FC5 /* emhashmap.h */, + 5DA49CDA1F1E890D00E65FC5 /* emhashmap.c */, 5DA49CCA1F1E653800E65FC5 /* emhashmap_LICENSE */, ); name = emhashmap; sourceTree = "<group>"; }; + 5DA49CE21F1EA77900E65FC5 /* Control Frames */ = { + isa = PBXGroup; + children = ( + 5DA49CEB1F1FD9F600E65FC5 /* SDLControlMessage.h */, + 5DA49CEC1F1FD9F600E65FC5 /* SDLControlMessage.m */, + 5DA49CE31F1EA83300E65FC5 /* SDLControlFrameStartService.h */, + 5DA49CE41F1EA83300E65FC5 /* SDLControlFrameStartService.m */, + ); + name = "Control Frames"; + sourceTree = "<group>"; + }; 5DAE06711BDEC68700F9B498 /* Developer API Tests */ = { isa = PBXGroup; children = ( @@ -4239,6 +4259,7 @@ 5D61FE011A84238C00846EE7 /* SDLVehicleDataNotificationStatus.h in Headers */, 5D61FDC91A84238C00846EE7 /* SDLTextField.h in Headers */, 5D6F7A351BC5B9B60070BF37 /* SDLLockScreenViewController.h in Headers */, + 5DA49CED1F1FD9F600E65FC5 /* SDLControlMessage.h in Headers */, DA9F7E7F1DCC028B00ACAE48 /* SDLOnWaypointChange.h in Headers */, 5D61FCE41A84238C00846EE7 /* SDLKeyboardProperties.h in Headers */, 5D61FDED1A84238C00846EE7 /* SDLUnsubscribeVehicleDataResponse.h in Headers */, @@ -4255,6 +4276,7 @@ 5D6F7A2B1BC45BF70070BF37 /* SDLRequestHandler.h in Headers */, 5D61FDB51A84238C00846EE7 /* SDLSyncMsgVersion.h in Headers */, 5DA102A41D4122C700C15826 /* NSMutableDictionary+SafeRemove.h in Headers */, + 5DA49CE51F1EA83300E65FC5 /* SDLControlFrameStartService.h in Headers */, 5D61FE031A84238C00846EE7 /* SDLVehicleDataResult.h in Headers */, 5D61FD911A84238C00846EE7 /* SDLShowConstantTBT.h in Headers */, 5D61FC331A84238C00846EE7 /* SDLAddSubMenuResponse.h in Headers */, @@ -4577,6 +4599,7 @@ 5D61FC971A84238C00846EE7 /* SDLECallConfirmationStatus.m in Sources */, 5D61FC4A1A84238C00846EE7 /* SDLAudioType.m in Sources */, 5D61FDE61A84238C00846EE7 /* SDLUnregisterAppInterfaceResponse.m in Sources */, + 5DA49CEE1F1FD9F600E65FC5 /* SDLControlMessage.m in Sources */, 5D61FC481A84238C00846EE7 /* SDLAudioStreamingState.m in Sources */, 5D61FCC81A84238C00846EE7 /* SDLIAPTransport.m in Sources */, 5D61FE101A84238C00846EE7 /* SDLVrHelpItem.m in Sources */, @@ -4775,6 +4798,7 @@ 5D61FE021A84238C00846EE7 /* SDLVehicleDataNotificationStatus.m in Sources */, 5D61FDD81A84238C00846EE7 /* SDLTouchType.m in Sources */, 5D61FDD61A84238C00846EE7 /* SDLTouchEventCapabilities.m in Sources */, + 5DA49CE61F1EA83300E65FC5 /* SDLControlFrameStartService.m in Sources */, 5DA102A51D4122C700C15826 /* NSMutableDictionary+SafeRemove.m in Sources */, 5D61FCF11A84238C00846EE7 /* SDLLockScreenStatusManager.m in Sources */, 5D61FDAC1A84238C00846EE7 /* SDLStartTime.m in Sources */, diff --git a/SmartDeviceLink/SDLControlFrameStartService.h b/SmartDeviceLink/SDLControlFrameStartService.h new file mode 100644 index 000000000..d3423a23f --- /dev/null +++ b/SmartDeviceLink/SDLControlFrameStartService.h @@ -0,0 +1,17 @@ +// +// SDLControlFrameStartService.h +// SmartDeviceLink-iOS +// +// Created by Joel Fischer on 7/18/17. +// Copyright © 2017 smartdevicelink. All rights reserved. +// + +#import <SmartDeviceLink/SmartDeviceLink.h> + +@interface SDLControlFrameStartService : SDLProtocolMessage + +@property (copy, nonatomic, readonly) NSString *versionNumber; + +- (instancetype)initWithMajorVersion:(int32_t)majorVersion minorVersion:(int32_t)minorVersion patchVersion:(int32_t)patchVersion; + +@end diff --git a/SmartDeviceLink/SDLControlFrameStartService.m b/SmartDeviceLink/SDLControlFrameStartService.m new file mode 100644 index 000000000..808ea6d11 --- /dev/null +++ b/SmartDeviceLink/SDLControlFrameStartService.m @@ -0,0 +1,53 @@ +// +// SDLControlFrameStartService.m +// SmartDeviceLink-iOS +// +// Created by Joel Fischer on 7/18/17. +// Copyright © 2017 smartdevicelink. All rights reserved. +// + +#import "SDLControlFrameStartService.h" + +#import "bson_object.h" + +char *const versionKey = "protocolVersion"; + +@interface SDLControlFrameStartService () + +@property (copy, nonatomic, readwrite) NSString *versionNumber; + +@end + + +@implementation SDLControlFrameStartService + +- (instancetype)initWithMajorVersion:(int32_t)majorVersion minorVersion:(int32_t)minorVersion patchVersion:(int32_t)patchVersion { + self = [super init]; + if (!self) return nil; + + _versionNumber = [NSString stringWithFormat:@"%d.%d.%d", majorVersion, minorVersion, patchVersion]; + + return self; +} + +- (NSData *)payload { + BsonObject payloadObject; + bson_object_initialize_default(&payloadObject); + + bson_object_put_string(&payloadObject, versionKey, (char *)self.versionNumber.UTF8String); + + BytePtr bsonData = bson_object_to_bytes(&payloadObject); + NSUInteger length = bson_object_size(&payloadObject); + + bson_object_deinitialize(&payloadObject); + + return [[NSData alloc] initWithBytes:bsonData length:length]; +} + +- (void)setPayload:(NSData *)payload { + BsonObject payloadObject = bson_object_from_bytes((BytePtr)payload.bytes); + + self.versionNumber = [NSString stringWithUTF8String:bson_object_get_string(&payloadObject, versionKey)]; +} + +@end diff --git a/SmartDeviceLink/SDLControlMessage.h b/SmartDeviceLink/SDLControlMessage.h new file mode 100644 index 000000000..def843584 --- /dev/null +++ b/SmartDeviceLink/SDLControlMessage.h @@ -0,0 +1,13 @@ +// +// SDLControlMessage.h +// SmartDeviceLink-iOS +// +// Created by Joel Fischer on 7/19/17. +// Copyright © 2017 smartdevicelink. All rights reserved. +// + +#import <SmartDeviceLink/SmartDeviceLink.h> + +@interface SDLControlMessage : SDLProtocolMessage + +@end diff --git a/SmartDeviceLink/SDLControlMessage.m b/SmartDeviceLink/SDLControlMessage.m new file mode 100644 index 000000000..9927c2582 --- /dev/null +++ b/SmartDeviceLink/SDLControlMessage.m @@ -0,0 +1,13 @@ +// +// SDLControlMessage.m +// SmartDeviceLink-iOS +// +// Created by Joel Fischer on 7/19/17. +// Copyright © 2017 smartdevicelink. All rights reserved. +// + +#import "SDLControlMessage.h" + +@implementation SDLControlMessage + +@end diff --git a/SmartDeviceLink/SDLProtocol.m b/SmartDeviceLink/SDLProtocol.m index 6261e02ee..fc998963a 100644 --- a/SmartDeviceLink/SDLProtocol.m +++ b/SmartDeviceLink/SDLProtocol.m @@ -348,7 +348,7 @@ typedef NSNumber SDLServiceTypeBox; - (void)processMessages { NSMutableString *logMessage = [[NSMutableString alloc] init]; - UInt8 incomingVersion = [SDLProtocolMessage determineVersion:self.receiveBuffer]; + UInt8 incomingVersion = [SDLProtocolHeader determineVersion:self.receiveBuffer]; // If we have enough bytes, create the header. SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:incomingVersion]; diff --git a/SmartDeviceLink/SDLProtocolHeader.h b/SmartDeviceLink/SDLProtocolHeader.h index dc8cbb788..908a675c7 100644 --- a/SmartDeviceLink/SDLProtocolHeader.h +++ b/SmartDeviceLink/SDLProtocolHeader.h @@ -58,5 +58,6 @@ typedef NS_ENUM(UInt8, SDLFrameData) { - (void)parse:(NSData *)data; - (NSString *)description; + (__kindof SDLProtocolHeader *)headerForVersion:(UInt8)version; ++ (UInt8)determineVersion:(NSData *)data; @end diff --git a/SmartDeviceLink/SDLProtocolHeader.m b/SmartDeviceLink/SDLProtocolHeader.m index 65e025c61..7a2c23161 100644 --- a/SmartDeviceLink/SDLProtocolHeader.m +++ b/SmartDeviceLink/SDLProtocolHeader.m @@ -55,14 +55,24 @@ } break; case 2: // Fallthrough case 3: // Fallthrough - case 4: { + case 4: // Fallthrough + case 5: { return [[SDLV2ProtocolHeader alloc] initWithVersion:version]; } break; default: { - NSString *reason = [NSString stringWithFormat:@"The version of header that is being created is unknown: %@", @(version)]; - @throw [NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo:@{ @"requestedVersion": @(version) }]; + // Assume V2 header for unknown header versions and hope it doesn't break + return [[SDLV2ProtocolHeader alloc] initWithVersion:version]; } break; } } +// For use in decoding a stream of bytes. +// Pass in bytes representing message (or beginning of message) +// Looks at and parses first byte to determine version. ++ (UInt8)determineVersion:(NSData *)data { + UInt8 firstByte = ((UInt8 *)data.bytes)[0]; + UInt8 version = firstByte >> 4; + return version; +} + @end diff --git a/SmartDeviceLink/SDLProtocolMessage.h b/SmartDeviceLink/SDLProtocolMessage.h index 62abd6226..3548091ef 100644 --- a/SmartDeviceLink/SDLProtocolMessage.h +++ b/SmartDeviceLink/SDLProtocolMessage.h @@ -11,13 +11,10 @@ @property (strong) NSData *payload; @property (strong, readonly) NSData *data; -+ (id)messageWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload; // Returns a V1 or V2 object ++ (instancetype)messageWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload; // Returns a V1 or V2 object - (NSUInteger)size; - (NSString *)description; - (NSDictionary *)rpcDictionary; // Use for RPC type messages to obtain the data in a dictionary -+ (UInt8)determineVersion:(NSData *)data; - - @end diff --git a/SmartDeviceLink/SDLProtocolMessage.m b/SmartDeviceLink/SDLProtocolMessage.m index bfc33c4d7..12eeb60a9 100644 --- a/SmartDeviceLink/SDLProtocolMessage.m +++ b/SmartDeviceLink/SDLProtocolMessage.m @@ -17,19 +17,20 @@ @implementation SDLProtocolMessage -// For use in decoding a stream of bytes. -// Pass in bytes representing message (or beginning of message) -// Looks at and parses first byte to determine version. -+ (UInt8)determineVersion:(NSData *)data { - UInt8 firstByte = ((UInt8 *)data.bytes)[0]; - UInt8 version = firstByte >> 4; - return version; -} +// Returns a V1 or V2 object ++ (instancetype)messageWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload { + SDLProtocolMessage *newMessage = nil; -- (instancetype)init { - if (self = [super init]) { + UInt8 version = header.version; + if (version == 1) { + newMessage = [[SDLV1ProtocolMessage alloc] initWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload]; + } else if (version >= 2) { + newMessage = [[SDLV2ProtocolMessage alloc] initWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload]; + } else { + @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Attempted to create an SDLMessage, but the version of the header passed was 0" userInfo:nil]; } - return self; + + return newMessage; } - (NSDictionary *)rpcDictionary { @@ -82,20 +83,4 @@ return description; } -// Returns a V1 or V2 object -+ (id)messageWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload { - SDLProtocolMessage *newMessage = nil; - - UInt8 version = header.version; - if (version == 1) { - newMessage = [[SDLV1ProtocolMessage alloc] initWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload]; - } else if (version >= 2) { - newMessage = [[SDLV2ProtocolMessage alloc] initWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload]; - } else { - @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Attempted to create an SDLMessage, but the version of the header passed was 0" userInfo:nil]; - } - - return newMessage; -} - @end diff --git a/SmartDeviceLink/SDLProtocolReceivedMessageRouter.m b/SmartDeviceLink/SDLProtocolReceivedMessageRouter.m index 11c4ce0ea..412b39a9c 100644 --- a/SmartDeviceLink/SDLProtocolReceivedMessageRouter.m +++ b/SmartDeviceLink/SDLProtocolReceivedMessageRouter.m @@ -52,6 +52,22 @@ } - (void)sdl_dispatchControlMessage:(SDLProtocolMessage *)message { + // VERSION DEPENDENT CODE + switch (message.header.version) { + case 1: // fallthrough + case 2: // fallthrough + case 3: // fallthrough + case 4: { + [self sdl_dispatchV1ControlMessage:message]; + } break; + case 5: { + // TODO: New delegates + [self sdl_dispatchV5ControlMessage:message]; + } break; + } +} + +- (void)sdl_dispatchV1ControlMessage:(SDLProtocolMessage *)message { switch (message.header.frameData) { case SDLFrameData_StartSessionACK: { if ([self.delegate respondsToSelector:@selector(handleProtocolStartSessionACK:sessionID:version:)]) { @@ -92,10 +108,14 @@ [self.delegate handleHeartbeatACK]; } } break; - default: break; + default: break; // Other frame data is possible, but we don't care about them } } +- (void)sdl_dispatchV5ControlMessage:(SDLProtocolMessage *)message { + // TODO +} + - (void)sdl_dispatchMultiPartMessage:(SDLProtocolMessage *)message { // Pass multipart messages to an assembler and call delegate when done. NSNumber *sessionID = [NSNumber numberWithUnsignedChar:message.header.sessionID]; diff --git a/SmartDeviceLink/SDLV2ProtocolHeader.m b/SmartDeviceLink/SDLV2ProtocolHeader.m index eb97f4102..b0e2050d7 100644 --- a/SmartDeviceLink/SDLV2ProtocolHeader.m +++ b/SmartDeviceLink/SDLV2ProtocolHeader.m @@ -107,7 +107,7 @@ const int V2PROTOCOL_HEADERSIZE = 12; } NSMutableString *description = [[NSMutableString alloc] init]; - [description appendFormat:@"Version:%i, compressed:%i, frameType:%@(%i), serviceType:%i, frameData:%@(%i), sessionID:%i, dataSize:%i, messageID:%i ", + [description appendFormat:@"Version:%i, encrypted:%i, frameType:%@(%i), serviceType:%i, frameData:%@(%i), sessionID:%i, dataSize:%i, messageID:%i ", self.version, self.encrypted, frameTypeString, |