APC AP9212 User's Guide Page 34

  • Download
  • Add to my manuals
  • Print
  • Page
    / 147
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 33
34
which is represented internally as .1.3.6.1.4.1.318.1.1.4.5.2.1.3”.This string is then
appended with .<outlet-number>” to specify the outlet. The OID, and some data, if the
operation is a SET, are packaged into a PDU which is then sent to the Masterswitch using the
JSNMP SnmpSession object.
The SNMP agent on the Masterswitch interface board then performs the appropriate action,
resulting in an SNMP response being returned. The response packet is processed, resulting in the
executing thread returning to the caller.
4.3.4 Synchronisation
The SNMPMasterswitch is a multithreaded object. Calls to Masterswitch methods are blocked
and queued implicitly by Java synchronization. The blocked threads are then woken by either
a timeout or an SNMP response message from the device.
4.3.5 Event notification
There are two alternative methods used to notify MasterswitchListeners of any state
changes:
Responding to SNMP Traps
The Masterswitch generates SNMP traps for numerous events. These traps can be
decoded to discover events that have occurred on the Masterswitch. A complete
specification of Masterswitch traps is provided in [ 27 ] and [ 28 ]. Root permissions are
required by the SNMPTrapDaemon to bind itself to UDP port 162. This method is more
efficient and also provides more accurate error information.
Polling
A TimerTask periodically queries the state of the Masterswitch and compares the new
information with cached values. A Masterswitch event is triggered if a change is
detected.
Upon initialisation, the SNMPMasterswitch will attempt to listen to SNMP traps by starting the trap
daemon. If this fails, a polling technique will be used, querying the Masterswitch every three
seconds.
4.4 JAS integration
To allow portability, all code integrating the Masterswitch to the JAS is handled in the
JASMasterswitch and Command Objects. Leaving the apt.masterswitch package an
independent software module.
The JASMasterswitch object has several responsibilities:
Initialise the SNMP implementation of the Masterswitch
Send status information as JASStatusMessages to clients
Page view 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 146 147

Comments to this Manuals

No comments