case RES_UCD:
// Cast to ResUcdQuery type to reflect fields format of the command
ResUcdQuery ruqPacket = (ResUcdQuery) packet;
// Resolve request ucode(s)
DataEntry entry;
// Construct response packet
ResUcdRecieve rurPacket = new ResUcdRecieve();
rurPacket.setSerialNumber( (byte) ( ruqPacket.getSerialNumber() + 1 ) );
rurPacket.setResolveMode( ResolveMode.valueOf( ruqPacket.getQueryMode().getCode() ) );
try {
entry = resolveUcodeLocal(ruqPacket.getQueryUcode(), ruqPacket.getQueryMask(), ruqPacket.getQueryAttribute(), ruqPacket.getQueryMode());
// If entry match found, define Recieve Packet
if(entry != null) {
rurPacket.setErrorCode(Error.E_UIDC_OK);
rurPacket.setTTL(entry.getTTL());
rurPacket.setDataVersion(entry.getDataVersion());
rurPacket.setDataAttribute(entry.getDataAttribute());
rurPacket.setDataType(entry.getDataType());
rurPacket.addResUcdData(entry.getData());
rurPacket.addMask(entry.getUcodeMask().getLongArray());
} else { // entry == null means the cascade search is in action
rurPacket = (ResUcdRecieve) tempRecievePacket;
}
} catch (Exception e) {