protected IZclFrame parseZoneStatusChangeNotification(IASZoneClient o, IZclFrame zclFrame)
      throws ApplianceException, ServiceClusterException {
    int ZoneStatus = ZclDataTypeBitmap16.zclParse(zclFrame);
    short ExtendedStatus = ZclDataTypeBitmap8.zclParse(zclFrame);
    short ZoneID = 0xff;
    int Delay = 0;
    boolean gotZoneId = false;

    // Added the following code to mantain the compatibility with HA 1.1
    // devices
    try {
      ZoneID = ZclDataTypeUI8.zclParse(zclFrame);
      gotZoneId = true;
      Delay = ZclDataTypeUI16.zclParse(zclFrame);
    } catch (Exception e) {
      if (gotZoneId)
        throw new ZclValidationException("missing Delay in ZoneStatusChangeNotification");
    }

    if (o == null) {
      return null;
    }
    o.execZoneStatusChangeNotification(
        ZoneStatus, ExtendedStatus, ZoneID, Delay, endPoint.getDefaultRequestContext());
    return null;
  }
 protected IZclFrame parseZoneEnrollRequest(IASZoneClient o, IZclFrame zclFrame)
     throws ApplianceException, ServiceClusterException {
   int ZoneType = ZclDataTypeEnum16.zclParse(zclFrame);
   int ManufacturerCode = ZclDataTypeUI16.zclParse(zclFrame);
   ZoneEnrollResponse r =
       o.execZoneEnrollRequest(ZoneType, ManufacturerCode, endPoint.getDefaultRequestContext());
   int size = ZclZoneEnrollResponse.zclSize(r);
   IZclFrame zclResponseFrame = zclFrame.createResponseFrame(size);
   zclResponseFrame.setCommandId(0);
   ZclZoneEnrollResponse.zclSerialize(zclResponseFrame, r);
   return zclResponseFrame;
 }
 public static void zclSerialize(IZclFrame zclFrame, GetUsertypeResponse r)
     throws ZclValidationException {
   ZclDataTypeUI16.zclSerialize(zclFrame, r.UserID);
   ZclDataTypeEnum8.zclSerialize(zclFrame, r.UserType);
 }
 public static int zclSize(GetUsertypeResponse r) throws ZclValidationException {
   int size = 0;
   size += ZclDataTypeUI16.zclSize(r.UserID);
   size += ZclDataTypeEnum8.zclSize(r.UserType);
   return size;
 }
 public static GetUsertypeResponse zclParse(IZclFrame zclFrame) throws ZclValidationException {
   GetUsertypeResponse r = new GetUsertypeResponse();
   r.UserID = ZclDataTypeUI16.zclParse(zclFrame);
   r.UserType = ZclDataTypeEnum8.zclParse(zclFrame);
   return r;
 }