Skip to content

GetBoxStatus

Query the current status of the locker.

Note: This method is only applicable to lockers. the vending machine type is 2

AttributeTypeDefault ValueDescription
addrintSlave address.
nointLocker number.
typeintChannel type:
1 — Spring motor
2 — Electromagnetic lock
3 — Conveyor belt channel
4 — Motor timing control
kotlin
// serial driver
private lateinit var driver: UBoard

fun your_method() {
    // addr
    val para = BSReplyPara(
        addr,
        code % 100
    ).apply {
        driver.GetBoxStatus(this)
    }
    if (!para.isOK) {
        throw Exception("get box status failed")
    }
}

TempReplyPara Attribute Description

AttributeTypeDefault ValueDescription
statusint0 - Open state
1 - Closed state
nointLocker number.

© All rights reserved. Dingshang Metal Products Co., Ltd.