summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2016-03-11 09:08:36 -0500
committerMuller, Alexander (A.) <amulle19@ford.com>2016-03-11 09:08:36 -0500
commita702ea3b1238503cb4ba58a5e01729f621503148 (patch)
tree8954fde80030350611416122cb4040f30eb61b3a
parent1c7c8cd61ab928e31df9d36224093ab9e689ea01 (diff)
downloadsdl_ios-a702ea3b1238503cb4ba58a5e01729f621503148.tar.gz
Re-added the sendHeartbeat function to avoid doesNotRespondSelector error because of removed deprecated implementation.
-rw-r--r--SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocol.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocol.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocol.m
index 005af0182..95f7a617a 100644
--- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocol.m
+++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocol.m
@@ -256,6 +256,16 @@
[self processMessages];
}
+- (void)sendHeartbeat {
+ SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals globals].protocolVersion];
+ header.frameType = SDLFrameType_Control;
+ header.serviceType = SDLServiceType_Control;
+ header.frameData = SDLFrameData_Heartbeat;
+ header.sessionID = self.sessionID;
+ SDLProtocolMessage *message = [SDLProtocolMessage messageWithHeader:header andPayload:nil];
+ [self sendDataToTransport:message.data withPriority:header.serviceType];
+}
+
- (void)sendRawData:(NSData *)data withServiceType:(SDLServiceType)serviceType {
SDLV2ProtocolHeader *header = [[SDLV2ProtocolHeader alloc] initWithVersion:[SDLGlobals globals].protocolVersion];
header.frameType = SDLFrameType_Single;