GetBoxStatus
Query the current status of the locker.
Note: This method is only applicable to lockers. the vending machine type
is 2
Attribute | Type | Default Value | Description |
---|---|---|---|
addr | int | Slave address. | |
no | int | Locker number. | |
type | int | Channel 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
Attribute | Type | Default Value | Description |
---|---|---|---|
status | int | 0 - Open state | |
1 - Closed state | |||
no | int | Locker number. |