Developers guide
117
log.log(Level.WARNING, "Request ignored by apt.masterswitch.masterswitch. Another user is probably
logged in");
}
String returnedState = outletIntToOutletStr(returnedVal.getValue());
return returnedState;
}
/**
* The hardware revision of the PDU (Power Distribution Unit). This value
* is set at the factory.
*/
public synchronized String getHardwareRevision() throws MasterswitchException{
String oid = mibModule.getNode(sPDUIdentHardwareRev).getOID().toJavaValue().toString();
String hardwareRev = doSNMPGet(oid).toString();
return hardwareRev;
}
/**
* An 8 byte ID string identifying the PDU firmware revision.
*/
public synchronized String getFirmwareRevision() throws MasterswitchException {
String oid = mibModule.getNode(sPDUIdentFirmwareRev).getOID().toJavaValue().toString();
String firmwareRev = doSNMPGet(oid).toString();
return firmwareRev;
}
/**
* The date when the PDU was manufactured in mm/dd/yy format.
* This value is set at the factory. The year 2000 will be
* represented by 00.
*/
public synchronized String getDateOfManufacture() throws MasterswitchException {
String oid = mibModule.getNode(sPDUIdentDateOfManufacture).getOID().toJavaValue().toString();
String dateOfMF = doSNMPGet(oid).toString();
return dateOfMF;
}
/**
* A 10-character string identifying the model number of
* the PDU internal. This value is set at the factory.
*/
public synchronized String getModelNumber() throws MasterswitchException {
String oid = mibModule.getNode(sPDUIdentModelNumber).getOID().toJavaValue().toString();
String modelNum = doSNMPGet(oid).toString();
return modelNum;
}
/**
* A 12-character string identifying the serial number of
* the PDU internal microprocessor. This value is set at
* the factory.
*/
public synchronized String getSerialNumber() throws MasterswitchException{
String oid = mibModule.getNode(sPDUIdentSerialNumber).getOID().toJavaValue().toString();
String serialNum = doSNMPGet(oid).toString();
return serialNum;
}
/**
*
* SnmpHandler interface
*
*/
/**
* <P>This method is invoked when a pdu is successfully
* returned from the peer agent. The command argument
* is recovered from the received pdu.</P>
* <p>
* @param session The SNMP session
* @param command The PDU command
* @param pdu The SNMP pdu
*
*/
public void snmpReceivedPdu(SnmpSession session,










