
USB Controlled Multicolor Signal Beacon User Manual
32
⑦
NE_GetDeviceState
Item
Description
Name
byte[] NE_GetDeviceState ()
Overview
Acquires the LED and alarm status of the connected this product.
Argument
None
Return Value
1
st
byte
:
LED / alarm status
4
th
bit
:
Alarm status 0
:
Stopped 1
:
Sounding
0
th
bit
:
LED status 0
:
Off 1
:
On
2
nd
byte
:
Error status, input status to touch sensor
4
th
bit
:
Error status 0
:
No error 1
:
Error occurred
0
th
bit
:
Touch status 0
:
No input 1
:
Touching input
(NE-SN-USB and NE-WN-USB, returns 0.)
If this product is not connected, returns 0.
1
st
byte
2
nd
byte
bit
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
BCD
0
0
0
0/1
0
0
0
0/1
0
0
0
0/1
0
0
0
0/1
Alarm Status
0
:
Stopped
1
:
Sounding
LED Status
0
:
Off
1
:
On
Error Status
0
:
No error
1
:
Error occurred
Touch Status
0
:
No input
1
:
Touching input
Precautions
It is necessary to call “NE_OpenDevice” before calling this function.
Program
Example
int open_state, send_state;
open_state = NE_OpenDevice();
if(open_state == 0){
byte[] state = NE_GetDeviceState();
/* Get Device State */
}
NE_CloseDevice();