Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

Class WiProProtocol

Hierarchy

java.lang.Object
     com.smartdevicelink.protocol.AbstractProtocol

Package
com.smartdevicelink.protocol

Fields

MAX_PROTOCOL_VERSION

public static final com.smartdevicelink.util.Version MAX_PROTOCOL_VERSION

V1_V2_MTU_SIZE

public static final int V1_V2_MTU_SIZE
Constant Value
1500

V3_V4_MTU_SIZE

public static final int V3_V4_MTU_SIZE
Constant Value
131072

V1_HEADER_SIZE

public static final int V1_HEADER_SIZE
Constant Value
8

V2_HEADER_SIZE

public static final int V2_HEADER_SIZE
Constant Value
12

Constructors

WiProProtocol( IProtocolListener protocolListener )

public WiProProtocol(IProtocolListener protocolListener)

Parameters

protocolListener

Methods

getMtu()

Retrieves the max payload size for a packet to be sent to the module

public int getMtu()

getMtu( SessionType type )

public long getMtu(SessionType type)

Parameters

type

getVersion()

Deprecated
Use getProtocolVersion() or getMajorVersionByte instead.
Returns the Major version of the currently used protocol version

public byte getVersion()

getProtocolVersion()

public com.smartdevicelink.util.Version getProtocolVersion()

getMajorVersionByte()

public byte getMajorVersionByte()

setVersion( byte version )

This method will set the major protocol version that we should use. It will also set the default MTU based on version.

public void setVersion(byte version)

Parameters

version

StartProtocolSession( SessionType sessionType )

public void StartProtocolSession(SessionType sessionType)

Parameters

sessionType

EndProtocolSession( SessionType sessionType, byte sessionID, int hashId )

public void EndProtocolSession(SessionType sessionType,byte sessionID,int hashId)

Parameters

sessionType
sessionID
hashId

SendMessage( ProtocolMessage protocolMsg )

public void SendMessage(ProtocolMessage protocolMsg)

Parameters

protocolMsg

handlePacketReceived( SdlPacket packet )

public void handlePacketReceived(SdlPacket packet)

Parameters

packet

getFrameAssemblerForFrame( SdlPacket packet )

protected com.smartdevicelink.protocol.WiProProtocol.MessageFrameAssembler getFrameAssemblerForFrame(SdlPacket packet)

Parameters

packet

StartProtocolService( SessionType sessionType, byte sessionID, boolean isEncrypted )

public void StartProtocolService(SessionType sessionType,byte sessionID,boolean isEncrypted)

Parameters

sessionType
sessionID
isEncrypted

SetHeartbeatSendInterval( int heartbeatSendInterval_ms )

public void SetHeartbeatSendInterval(int heartbeatSendInterval_ms)

Parameters

heartbeatSendInterval_ms

SetHeartbeatReceiveInterval( int heartbeatReceiveInterval_ms )

public void SetHeartbeatReceiveInterval(int heartbeatReceiveInterval_ms)

Parameters

heartbeatReceiveInterval_ms

SendHeartBeat( byte sessionID )

public void SendHeartBeat(byte sessionID)

Parameters

sessionID

SendHeartBeatACK( byte sessionID )

public void SendHeartBeatACK(byte sessionID)

Parameters

sessionID

EndProtocolService( SessionType serviceType, byte sessionID )

public void EndProtocolService(SessionType serviceType,byte sessionID)

Parameters

serviceType
sessionID

Inherited Methods

From Class Methods
com.smartdevicelink.protocol.AbstractProtocol SendMessage, getMtu, getMtu, handlePacketReceived, StartProtocolSession, StartProtocolService, EndProtocolService, EndProtocolSession, SetHeartbeatSendInterval, SetHeartbeatReceiveInterval, SendHeartBeat, SendHeartBeatACK, handleProtocolFrameReceived, handlePacketToSend, handleProtocolMessageReceived, handleProtocolSessionEndedNACK, handleProtocolSessionEnded, handleProtocolSessionStarted, handleProtocolSessionNACKed, handleProtocolError, handleProtocolHeartbeat, handleProtocolHeartbeatACK, handleProtocolServiceDataACK, onResetIncomingHeartbeat
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section