almRemovalBlocked = false;
almCode = code;
almDescriptor = flags;
almData = data;
almDevice = device;
TEquipmentModule eqm = null;
// fix the code for what happens below ...
if (isLinkErrorAlarm(code))
code = TErrorList.link_error;
else if (isDiskSpaceAlarm(code))
code = (code & 0xff);
else
code = getBaseCode(code);
if (almDevice != null && (eqm=almDevice.getEqm()) != null)
{ // try the configured definitions list
almDef = (TAlarmDefinition)eqm.getAlarmDefinitionList().get(code);
}
if (almDef == null)
{ // now try the stock definitions
// almDef = (TAlarmDefinition)eqm.getEquipmentModuleFactory().getStockAlarmDefinitions().get(Integer.toString(code));
almDef = (TAlarmDefinition)TAlarmStockAlarm.getStockAlarmDefinitions().get(Integer.toString(code));