![Redpine Signals RS9113 Скачать руководство пользователя страница 31](http://html.mh-extra.com/html/redpine-signals/rs9113/rs9113_installation-manual_1429984031.webp)
-
-
Redpine Signals, Inc. Proprietary and Confidential
Page 31
R
R
S
S
9
9
1
1
1
1
3
3
-
-
n
n
-
-
L
L
i
i
n
n
k
k
-
-
M
M
o
o
d
d
u
u
l
l
e
e
-
-
D
D
r
r
i
i
v
v
e
e
r
r
-
-
I
I
n
n
s
s
t
t
a
a
l
l
l
l
a
a
t
t
i
i
o
o
n
n
-
-
G
G
u
u
i
i
d
d
e
e
V
V
e
e
r
r
s
s
i
i
o
o
n
n
3
3
.
.
0
0
The folders in the host_api are
1)
core – contains the host mode API implementation
2)
hal – contains HW abstraction
3)
intf – contains code related to interface dependent
4)
ref_apps – contains reference HA switch application
3.
Application state machine
The sample application architecture is based on the state machine.
The state machine will have different states. Please refer to the
app_stateMachine.h file for the defined states and the events.
The important sates in the state machine are
1)
STATE_STACK_NOT_READY – Stack is not initializez
2)
STATE_NO_NETWORK - Stack is initialized and the not joined any
network or formed network
3)
STATE_SCAN_ACTIVE_COMPLETE – Active scan is compete and ready
to join the network
4)
STATE_NETWORK_JOINED – Joined the network
4.
Stack callbacks
The application callbacks that are being called by stack are provided in
the file app_callbacks.c which is in “/ref_apps/src”
The callback functions that are available in the app_callbacks.c are given
bellow.
1)
AppScanCompleteHandler()
2)
AppEnergyScanResultHandler()
3)
AppNetworkFoundHandler()
4)
AppZigBeeStackStatusHandler()
5)
AppIncomingManyToOneRouteRequestHandler()
6)
AppHandleDataIndication()
7)
AppHandleDataConfirmation()
8)
AppChildJoinHandler()