Motorola 6806800C44B 用户手册
A
Availability Service Programmer’s Reference (6806800C44B)
35
A
Sample Application
A.1
Overview
The sample AvSv application is a 'counter' application that is run in a 2N-redundancy model.
The active entity counts periodically. When it fails, the standby entity becomes active and
resumes counting from where the previous active entity failed.
The active entity counts periodically. When it fails, the standby entity becomes active and
resumes counting from where the previous active entity failed.
The sample application shows you how to use some APIs defined in the SAI-AIS AMF service.
It also demonstrates the following features:
It also demonstrates the following features:
z
Passive monitoring
z
Protection Group tracking
z
Component failover (triggered by a component-generated error report) followed by
component restart repair.
component restart repair.
z
AMF-invoked health check
A.1.1
Sequence of Events in the Sample Application
When the demo is started, AvSv instantiates two instances of the sample application per the
configuration in the BOM. The sequence of events in both the applications is described below
configuration in the BOM. The sequence of events in both the applications is described below
Create 3 threads (one each for the counter application, AMF-INTF, and CKPT-INTF)
In the AMF-INTF thread:
1.
Initialize with AMF
2.
Call the AMF selection object
3.
Call the API to get the component name
4.
Register the component
5.
Wait on the AMF selection object for callback events.
In the CKPT-INTF thread:
z
Open the local checkpoint
z
Initialize with CKPT
z
Register the arrival callback
z
Call the CKPT selection object
z
Wait on the CKPT selection object for callback events
AMF dispatches CsiSetCallback with active/standby HA state.