Door Access
Door Access Device Controling Pass and Thunder series devices
Description of functional types
DoorDeviceAccessProxy
Control the overall initialization, configuration, and resource release operations of communication devices such as GPIO ports and serial ports of the control device, and perform specific door opening operations.
Member Function
Description
Version Introduced
DoorAccessConfig getConfig()
Get Door Access Configuration
2.0.0
DoorAccessDevice getDevice(int deviceType)
Get Device
2.0.0
void changeOpenDoorDevice(int mode)
Change Open Door Mode
2.0.0
void closeRelayDoor()
Close Relay Door
2.0.0
void init()
Initialization
2.0.0
void init(String uartName)
Initialization
2.0.0
void openDoor(String cardNumber)
Open Door
2.0.0
void release()
Release Resouce
2.0.0
void setConfig(DoorAccessConfig config)
set Door Access Configuration
2.0.0
void setCardReaderCallback
(WiegandReaderDevice.CardReaderCallback cardReaderCallback)
set Wiegand Card Reader Callback
2.0.0
void setCustomWiegandDataReceivedCallback
(WiegandReaderDevice.OnDataReceivedCallback dataReceivedCallback)
Set Custom Wiegand Data Interface Callback
2.0.0
void setICardNumberAnalysis
(WiegandDoorDevice.ICardNumberAnalysis cardNumberAnalysis)
Set Wiegand Card Number Analysis Mode
2.0.0
Description of Member Function
DoorAccessConfig getConfig()
Get Door Access Configuration
Parameter
None
Return
Returned Value
Description
Note
Version Introduced
DoorAccessConfig
Door Access Configuration Instance
None
2.0.0
Exception
None
DoorAccessDevice getDevice(int deviceType)
Get device reference according to device type
Parameter
Parameter Name
Type
Description
Note
Version Introduced
deviceType
int
Device Type
None
2.0.0
Return
Returned Value
Description
Note
Version Introduced
DoorAccessDevice
Door Access Device
None
2.0.0
Exception
None
void changeOpenDoorDevice(int mode)
Change Open Door Mode
Parameter
Parameter Name
Type
Description
Note
Version Introduced
mode
int
Open Door Mode
DoorAccessConfig Door Access Configuration
2.0.0
Return
None
Exception
None
void closeRelayDoor()
Close Relay Door
Parameter
None
Return
None
Exception
None
void init()
Initialization without serial port number, refer to [void init(String uartName)](#void init(String uartName))
Parameter
None
Return
None
Exception
None
void init(String uartName)
Initialization with serial port number
Parameter
Parameter Name
Type
Description
Note
Version Introduced
uartName
String
Serial port name
None
2.0.0
Return
None
Exception
None
void openDoor(String cardNumber)
Open the door, execute the door opening action according to the set open door mode
Parameter
Parameter Name
Type
Description
Note
Version Introduced
cardNumber
String
IC Card Number
None
2.0.0
Return
No
Exception
No
void release()
Release Resource
Parameter
None
Return
None
Exception
None
void setConfig(DoorAccessConfig config)
Set Door Access Configuration
Parameter
Parameter Name
Type
Description
Note
Version Introduced
config
DoorAccessConfig
Door Access Configuration
None
2.0.0
Return
None
Exception
None
void setCardReaderCallback(WiegandReaderDevice.CardReaderCallback cardReaderCallback)
Set Card Read Callback
Parameter
Parameter Name
Type
Description
Note
Version Introduced
cardReaderCallback
WiegandReaderDevice.CardReaderCallback
Wiegand Card Reader Callback
None
2.0.0
Return
None
Exception
None
void setCustomWiegandDataReceivedCallback(WiegandReaderDevice.OnDataReceivedCallback dataReceivedCallback)
Set Custom Wiegand Data Interface Callback
Parameter
Parameter Name
Type
Description
Note
Version Introduced
dataReceivedCallback
WiegandReaderDevice.OnDataReceivedCallback
Wiegand Passthough Data Received Callback
None
2.0.0
Return
No
Exception
No
void setICardNumberAnalysis(WiegandDoorDevice.ICardNumberAnalysis cardNumberAnalysis)
Set Wiegand Card Number String Parsing Method
Parameter
Parameter Name
Type
Description
Note
Version Introduced
cardNumberAnalysis
WiegandDoorDevice.ICardNumberAnalysis
Card Number String Parsing Method
None
2.0.0
Return
No
Exception
No
PassDoorDeviceAccessProxy
Control some door access devices of Pass and Thunder series
Member Function
Description
Version Introduced
void closeBackLight()
Close Back Light
2.0.0
void enableRS485(RS485Device.RS485ReceiveListener listener)
enable RS485
2.0.0
void enableRS485(int baudrate, int readBufferSize, RS485Device.RS485ReceiveListener listener)
enable RS485
2.0.0
void enableRS485(int baudrate, int readBufferSize, RS485Device.RS485ReceiveListener listener, int readTimeout, SerialPortReader.OnReadTimeOutListener timeOutListener)
enable RS485
2.0.0
void openBackLight()
Open Back Light
2.0.0
void pressBuzzer()
press Buzzer
2.0.0
void pressDoorBell(int pressDownDuration)
press Door Bell
2.0.0
void pressAlarmBell()
press Alarm Bell
2.0.0
void releaseAlarmBell()
release Alarm Bell
2.0.0
void releaseBuzzer()
release Buzzer
2.0.0
void setDoorStateCallback(DoorMagnetismStateCallback callback)
set Door State Callback
2.0.0
void setOnClickDoorButtonListener
(DoorButtonDevice.DoorButtonOnClickListener listener)
Door Button On Click Listener
2.0.0
void setReceiveFireSignListener
(FireSignalDevice.ReceiveFireSignListener listener)
Fire Sign Listener
2.0.0
void sendDataByRS485(byte[] data)
send Data By RS485
2.0.0
void turnOnIrLight()
turn On IR Light
2.0.0
void turnOffIrLight()
turn Off IR Light
2.0.0
Description of Member Function
void closeBackLight()
Close Back Light
Parameter
None
Return
None
Exception
None
void enableRS485(RS485Device.RS485ReceiveListener listener)
Enable RS485
Parameter
Parameter Name
Type
Description
Note
Version Introduced
listener
RS485Device.RS485ReceiveListener
Data Receive Callback
None
2.0.0
Return
None
Exception
None
void enableRS485(int baudrate, int readBufferSize, RS485Device.RS485ReceiveListener listener)
Enable RS485
Parameter
Parameter Name
Type
Description
Note
Version Introduced
baudrate
int
baudrate
None
2.0.0
readBufferSize
int
The length of the data to be read
None
2.0.0
listener
RS485Device.RS485ReceiveListener
Data Receive Callback
None
2.0.0
Return
None
Exception
None
void enableRS485(int baudrate, int readBufferSize, RS485Device.RS485ReceiveListener listener, int readTimeout, SerialPortReader.OnReadTimeOutListener timeOutListener)
Enable RS485
Parameter
Parameter Name
Type
Description
Note
Version Introduced
baudrate
int
baudrate
None
2.0.0
readBufferSize
int
The length of the data to be read
None
2.0.0
listener
RS485Device.RS485ReceiveListener
Data Receive Callback
None
2.0.0
readTimeout
int
Data read timeout period
None
2.0.0
timeOutListener
SerialPortReader.OnReadTimeOutListener
Data read timeout callback
None
2.0.0
Return
None
Exception
None
void openBackLight()
Open Back Light
Parameter
None
Return
None
Exception
None
void pressBuzzer()
press Buzzer (Only support SensePass and SenseThunderE-mini)
Parameter
None
Return
None
Exception
None
void pressDoorBell(int pressDownDuration)
press Door Bell
Parameter
Parameter Name
Type
Description
Note
Version Introduced
pressDownDuration
int
press Down Duration, unit millisecond
None
2.0.0
Return
None
Exception
None
void pressAlarmBell()
Press Alarm Bell to Turn the Alarm On
Parameter
None
Return
None
Exception
None
void releaseAlarmBell()
Release Alarm Bell
Parameter
None
Return
None
Exception
None
void releaseBuzzer()
Buzzer Off (Only supports SensePass020)
Parameter
None
Return
None
Exception
None
void setDoorStateCallback(DoorMagnetismStateCallback callback)
Set Door State Callback, Door Open/Close Status Listener
Parameter
Parameter Name
Type
Description
Note
Version Introduced
callback
DoorMagnetismStateCallback
State Callback
None
2.0.0
Return
None
Exception
None
void setOnClickDoorButtonListener(DoorButtonDevice.DoorButtonOnClickListener listener)
Door Button On Click Listener
Parameter
Parameter Name
Type
Description
Note
Version Introduced
listener
DoorButtonDevice.DoorButtonOnClickListener
Door Button On Click Listener
None
2.0.0
Return
None
Exception
None
void setReceiveFireSignListener(FireSignalDevice.ReceiveFireSignListener listener)
Receive Fire Sign Listener
Parameter
Parameter Name
Type
Description
Note
Version Introduced
listener
FireSignalDevice.ReceiveFireSignListener
Fire Sign Listener
None
2.0.0
Return
None
Exception
None
void sendDataByRS485(byte[] data)
Send Data By RS485
Parameter
Parameter Name
Type
Description
Note
Version Introduced
data
byte[]
Data to be Sent
None
2.0.0
Return
None
Exception
None
void turnOnIrLight()
Turn on IR Light, Support Pass and Thunder series
Parameter
None
Return
None
Exception
None
void turnOffIrLight()
Turn off IR Light, Support Pass and Thunder series
Parameter
None
Return
None
Exception
None
Description of Entities
DoorAccessConfig
Door Access Configuration
Description of Properties
OPEN_DOOR_MODE
Member
Description
Note
Version Introduced
static final int OPEN_DOOR_MODE_RELAY
Open Local Relay Door,
constant
2.0.0
static final int OPEN_DOOR_MODE_IP_RELAY
network relay
constant
2.0.0
static final int OPEN_DOOR_MODE_WIEGAND26_24_BIT
WIEGAND26(24bit)
constant
2.0.0
static final int OPEN_DOOR_MODE_WIEGAND26_8_16_BIT
WIEGAND26(8 + 16 bit)
constant
2.0.0
static final int OPEN_DOOR_MODE_WIEGAND32
WIEGAND32
constant
2.0.0
static final int OPEN_DOOR_MODE_WIEGAND34
WIEGAND34
Constant
2.0.0
static final int OPEN_DOOR_MODE_CUSTOM
Wiegand Custom (Output)
Constant
2.0.0
Wiegand Input
Member
Description
Note
Version Introduced
static final int WIEGAND26_24_BIT
WIEGAND26(24bit)
Constant
2.0.0
static final int WIEGAND26_8_16_BIT
WIEGAND26(8 + 16bit)
Constant
2.0.0
static final int WIEGAND32
WIEGAND32
Constant
2.0.0
static final int WIEGAND34
WIEGAND34
Constant
2.0.0
static final int WIEGAND_INPUT_CUSTOM
WIEGAND CUSTOM (INPUT)
Constant
2.0.0
GPIO Configuration
Member
Description
Note
Version Introduced
static final int GPIO_IN_NONE
GPIO Input not Configured
Constant
2.0.0
static final int GPIO_IN_DOOR_MAGNETISM
GPIO Input Configuration DOOR MAGNETISM
Constant
2.0.0
static final int GPIO_IN_DOOR_BUTTON
GPIO Input Configuration DOOR BUTTON
Constant
2.0.0
static final int GPIO_IN_FIRE_SIGNAL
GPIO Input Configuration FIRE SIGNAL
Constant
2.0.0
static final int GPIO_OUT_NONE
GPIO Output not configured
Constant
2.0.0
static final int GPIO_OUT_DOOR_BELL
GPIO Output Configuration DOOR BELL
Constant
2.0.0
static final int GPIO_OUT_ALARM
GPIO Output Configuration ALARM
Constant
2.0.0
Settable Properties
Member
Description
Note
Version Introduced
int mOpenDoorTime
Open Door Time
None
2.0.0
int mOpenDoorMode
Open Door Mode
None
2.0.0
int mGpioOut
GPIO Output Port
None
2.0.0
int mGpioInA
GPIO Input A
None
2.0.0
int mGpioInB
GPIO Input B
None
2.0.0
int mWiegandInput
Wiegand Input
None
2.0.0
int mDoorMagnetismTimeout
Door Magnetism Timeout
None
2.0.0
String mRelayIp
Network Relay IP
None
2.0.0
int mRS485BaudRate
RS485 Serial Port Baud Rate
Default 9600
2.0.0
int mRS485BufferSize
RS485 buffer size
Default 64
2.0.0
boolean mIsSupportRS485GpioAutoControl
Support RS485 GPIO Auto Control
None
2.0.0
int mPulseCycle
Pulse Cycle
Default 2400
2.0.0
int mPulseWidth
Pulse Width
Default 380
2.0.0
boolean mReverseCardNumber
Reverse Card Number
None
2.0.0
Description of Method
Member Function
Description
Note
Version Introduced
DoorAccessConfig build()
Build an Instance of DoorAccessConfig
None
2.0.0
DoorAccessDevice
Door Access Device
Description of Method
Member Function
Description
Note
Version Introduced
int getDeviceId()
Return Device ID
None
2.0.0
void setConfig(DoorAccessConfig config)
add Device Configuration
None
2.0.0
void destroyDevice()
Destroy Device
None
2.0.0
boolean isDeviceCreated()
Device Created
None
2.0.0
void createDevice()
Create Device
None
2.0.0
CardReaderCallback
WIEGAND Device Card Reader Callback
Description of Method
Member Function
Description
Note
Version Introduced
void onRead(String cardNumber)
Card Read Successful and Get Card Number
None
2.0.0
OnDataReceivedCallback
Wiegand Passthough Data Received Callback
Description of Method
Member Function
Description
Note
Version Introduced
void onDataReceived(byte[] cardData)
Data Receive Callback
cardData: Customized Wiegand Card Number Data
2.0.0
ICardNumberAnalysis
Analysis of Customized Wiegand Card Number Data
Description of Method
Member Function
Description
Note
Version Introduced
byte[] analysis(String cardDataString)
The card string is parsed into byte[] data
cardDataString card Data String Return the custom Wiegand data corresponding to the card
2.0.0
DoorMagnetismStateCallback
Door Magnetism State Callback
Description of Method
Member Function
Description
Note
Version Introduced
void onDoorStateChanged(int state)
Door Magnetism State Callback
state 0-OFF, 1-ON
2.0.0
ReceiveFireSignListener
Fire Sign Listener
Description of Method
Member Function
Description
Note
Version Introduced
void onReceive()
Fire Sign Listener
None
2.0.0
ReceiveDismantleSignListener
Dismantle Sign Listener
Description of Method
Member Function
Description
Note
Version Introduced
void onReceive()
Dismantle Sign Listener
None
2.0.0
SensorListener
Sensor Data change interface
Description of Method
Member Function
Description
Note
Version Introduced
void onSensorChanged(String value)
Data Change Callback
None
2.0.0
OnSensorChangedListener
Ir Listener
Description of Method
Member Function
Description
Note
Version Introduced
void onInfraredSignalRead()
Ir Callback
None
2.0.0
RS485ReceiveListener
RS485 Data Read Listener
Description of Method
Member Function
Description
Note
Version Introduced
void onReceive(byte[] data,long dataLength)
RS485 Data Read Listener
dataLength: Data Length; data: Data Read
2.0.0
OnReadTimeOutListener
RS485 Data Read Time Out Callback
Description of Method
Member Function
Description
Note
Version Introduced
void onTimeout(byte[] data,long dataLength)
RS485 Data Read Time Out Callback
dataLength: Data Length; data: Data read when timeout
2.0.0
DoorButtonOnClickListener
Door Button On Click Listener
Description of Method
Member Function
Description
Note
Version Introduced
void onClick()
Door Button On Click Callback
None
2.0.0
最終更新