You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > ASI Library > getState

21.7.3 getState

state = port:getState()

Returns the current state of the port as a constant from the asi table.

State

Description

asi.DISCONNECTED

Port is disconnected.

asi.CONNECTING

Port is connecting.

asi.CONNECTED

Port is connected.

asi.DISCONNECTING

Port is disconnecting.

asi.INVALID

Port is invalid or no longer present in the system.

Introduced in platform.apiLevel = '2.7'.