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

Class SdlPacket

Hierarchy

java.lang.Object

Package
com.smartdevicelink.protocol
All Implemented Interfaces
android.os.Parcelable

Overview

This class is only intended to be parcelable from the transport broker to the SDL Router Service. Any other binder transactions must include an additional int flag into their bundle or the parsing of this object will fail.

Quick Jump

Fields
Constructors
Methods

Fields

HEADER_SIZE

public static final int HEADER_SIZE
Constant Value
12

HEADER_SIZE_V1

public static final int HEADER_SIZE_V1
Constant Value
8

FRAME_TYPE_CONTROL

public static final int FRAME_TYPE_CONTROL

FRAME_TYPE_SINGLE

public static final int FRAME_TYPE_SINGLE
Constant Value
1

FRAME_TYPE_FIRST

public static final int FRAME_TYPE_FIRST
Constant Value
2

FRAME_TYPE_CONSECUTIVE

public static final int FRAME_TYPE_CONSECUTIVE
Constant Value
3

SERVICE_TYPE_CONTROL

public static final int SERVICE_TYPE_CONTROL

SERVICE_TYPE_RPC

public static final int SERVICE_TYPE_RPC
Constant Value
7

SERVICE_TYPE_PCM

public static final int SERVICE_TYPE_PCM
Constant Value
10

SERVICE_TYPE_VIDEO

public static final int SERVICE_TYPE_VIDEO
Constant Value
11

SERVICE_TYPE_BULK_DATA

public static final int SERVICE_TYPE_BULK_DATA
Constant Value
15

FRAME_INFO_HEART_BEAT

public static final int FRAME_INFO_HEART_BEAT

FRAME_INFO_START_SERVICE

public static final int FRAME_INFO_START_SERVICE
Constant Value
1

FRAME_INFO_START_SERVICE_ACK

public static final int FRAME_INFO_START_SERVICE_ACK
Constant Value
2

FRAME_INFO_START_SERVICE_NAK

public static final int FRAME_INFO_START_SERVICE_NAK
Constant Value
3

FRAME_INFO_END_SERVICE

public static final int FRAME_INFO_END_SERVICE
Constant Value
4

FRAME_INFO_END_SERVICE_ACK

public static final int FRAME_INFO_END_SERVICE_ACK
Constant Value
5

FRAME_INFO_END_SERVICE_NAK

public static final int FRAME_INFO_END_SERVICE_NAK
Constant Value
6

FRAME_INFO_REGISTER_SECONDARY_TRANSPORT

public static final int FRAME_INFO_REGISTER_SECONDARY_TRANSPORT
Constant Value
7

FRAME_INFO_REGISTER_SECONDARY_TRANSPORT_ACK

public static final int FRAME_INFO_REGISTER_SECONDARY_TRANSPORT_ACK
Constant Value
8

FRAME_INFO_REGISTER_SECONDARY_TRANSPORT_NAK

public static final int FRAME_INFO_REGISTER_SECONDARY_TRANSPORT_NAK
Constant Value
9

FRAME_INFO_TRANSPORT_EVENT_UPDATE

public static final int FRAME_INFO_TRANSPORT_EVENT_UPDATE
Constant Value
253

FRAME_INFO_SERVICE_DATA_ACK

public static final int FRAME_INFO_SERVICE_DATA_ACK
Constant Value
254

FRAME_INFO_HEART_BEAT_ACK

public static final int FRAME_INFO_HEART_BEAT_ACK
Constant Value
255

FRAME_INFO_FINAL_CONNESCUTIVE_FRAME

public static final int FRAME_INFO_FINAL_CONNESCUTIVE_FRAME

FRAME_INFO_RESERVED

public static final int FRAME_INFO_RESERVED

CREATOR

public static final android.os.Parcelable.Creator CREATOR

Constructors

SdlPacket( int version, boolean encryption, int frameType, int serviceType, int frameInfo, int sessionId, int dataSize, int messageId, byte[] payload )

public SdlPacket(int version,boolean encryption,int frameType,int serviceType,int frameInfo,int sessionId,int dataSize,int messageId,byte[] payload)

Parameters

version
encryption
frameType
serviceType
frameInfo
sessionId
dataSize
messageId
payload

SdlPacket( int version, boolean encryption, int frameType, int serviceType, int frameInfo, int sessionId, int dataSize, int messageId, byte[] payload, int offset, int bytesToWrite )

public SdlPacket(int version,boolean encryption,int frameType,int serviceType,int frameInfo,int sessionId,int dataSize,int messageId,byte[] payload,int offset,int bytesToWrite)

Parameters

version
encryption
frameType
serviceType
frameInfo
sessionId
dataSize
messageId
payload
offset
bytesToWrite

SdlPacket()

This constructor is available as a protected method. A few defaults have been set, however a few things MUST be set before use. The rest will "work" however, it won't be valid data.

Frame Type

Service Type

Frame Info

protected SdlPacket()

SdlPacket( SdlPacket packet )

Creates a new packet based on previous packet definitions

protected SdlPacket(SdlPacket packet)

Parameters

packet

SdlPacket( Parcel p )

public SdlPacket(Parcel p)

Parameters

p

Methods

getVersion()

public int getVersion()

isEncrypted()

public boolean isEncrypted()

getFrameType()

public com.smartdevicelink.protocol.enums.FrameType getFrameType()

getServiceType()

public int getServiceType()

getFrameInfo()

public int getFrameInfo()

getSessionId()

public int getSessionId()

getMessageId()

public int getMessageId()

getDataSize()

public long getDataSize()

getPayload()

public byte getPayload()

constructPacket()

public byte constructPacket()

setPayload( byte[] bytes )

public void setPayload(byte[] bytes)

Parameters

bytes

setPriorityCoefficient( int priority )

Set the priority for this packet. The lower the number the higher the priority.
0 is the highest priority and the default.

public void setPriorityCoefficient(int priority)

Parameters

priority

getPrioirtyCoefficient()

public int getPrioirtyCoefficient()

setTransportRecord( TransportRecord transportRecord )

public void setTransportRecord(TransportRecord transportRecord)

Parameters

transportRecord

getTransportRecord()

public com.smartdevicelink.transport.utl.TransportRecord getTransportRecord()

constructPacket( int version, boolean encryption, int frameType, int serviceType, int controlFrameInfo, int sessionId, int dataSize, int messageId, byte[] payload )

This method takes in the various components to the SDL packet structure and creates a new byte array that can be sent via the transport

public static byte constructPacket(int version,boolean encryption,int frameType,int serviceType,int controlFrameInfo,int sessionId,int dataSize,int messageId,byte[] payload)

Parameters

version
encryption
frameType
serviceType
controlFrameInfo
sessionId
dataSize
messageId
payload

getEncryptionBit( boolean encryption )

public static int getEncryptionBit(boolean encryption)

Parameters

encryption

toString()

public java.lang.String toString()

setMessagingVersion( int version )

public void setMessagingVersion(int version)

Parameters

version

describeContents()

public int describeContents()

writeToParcel( Parcel dest, int flags )

public void writeToParcel(Parcel dest,int flags)

Parameters

dest
flags

putTag( String tag, Object data )

public void putTag(String tag,Object data)

Parameters

tag
data

getTag( String tag )

public java.lang.Object getTag(String tag)

Parameters

tag

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section