Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
Android Documentation
MultiplexBaseTransport

Class MultiplexBaseTransport

Hierarchy

java.lang.Object

Package
com.smartdevicelink.transport
All Known Subclasses
com.smartdevicelink.transport.MultiplexBluetoothTransport, com.smartdevicelink.transport.MultiplexTcpTransport, com.smartdevicelink.transport.MultiplexUsbTransport

Fields

STATE_NONE

public static final int STATE_NONE

STATE_LISTEN

public static final int STATE_LISTEN
Constant Value
1

STATE_CONNECTING

public static final int STATE_CONNECTING
Constant Value
2

STATE_CONNECTED

public static final int STATE_CONNECTED
Constant Value
3

STATE_ERROR

public static final int STATE_ERROR
Constant Value
4

ERROR_REASON_KEY

public static final java.lang.String ERROR_REASON_KEY
Constant Value
"ERROR_REASON"

REASON_SPP_ERROR

public static final byte REASON_SPP_ERROR
Constant Value
1

REASON_NONE

public static final byte REASON_NONE

LOG

public static final java.lang.String LOG
Constant Value
"log"

DEVICE_NAME

public static final java.lang.String DEVICE_NAME
Constant Value
"device_name"

DEVICE_ADDRESS

public static final java.lang.String DEVICE_ADDRESS
Constant Value
"device_address"

mState

protected int mState

handler

protected final android.os.Handler handler

transportType

protected final com.smartdevicelink.transport.enums.TransportType transportType

transportRecord

protected com.smartdevicelink.transport.utl.TransportRecord transportRecord

connectedDeviceName

protected java.lang.String connectedDeviceName

connectedDeviceAddress

public java.lang.String connectedDeviceAddress

Constructors

MultiplexBaseTransport( Handler handler, TransportType transportType )

protected MultiplexBaseTransport(Handler handler,TransportType transportType)

Constructor Parameters

handler
transportType

Methods

setState( int state )

protected synchronized void setState(int state)

Method Parameters

state

setState( int state, Bundle bundle )

protected synchronized void setState(int state,Bundle bundle)

Method Parameters

state
bundle

getAddress()

public java.lang.String getAddress()

getDeviceName()

public java.lang.String getDeviceName()

getTransportRecord()

Should only be called after a connection has been established

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

getState()

Return the current connection state.

public synchronized int getState()

isConnected()

public boolean isConnected()

stop()

public synchronized void stop()

stop( int state )

protected abstract void stop(int state)

Method Parameters

state

stop( int state, byte error )

protected void stop(int state,byte error)

Method Parameters

state
error

write( byte[] out, int offset, int count )

public abstract void write(byte[] out,int offset,int count)

Method Parameters

out
offset
count

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