public long get_serialized_key_max_size(
      Object endpoint_data,
      boolean include_encapsulation,
      short encapsulation_id,
      long currentAlignment) {

    long encapsulation_size = currentAlignment;

    long origAlignment = currentAlignment;

    if (include_encapsulation) {
      if (!CdrEncapsulation.isValidEncapsulationKind(encapsulation_id)) {
        throw new RETCODE_ERROR("Unsupported encapsulation");
      }

      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size -= currentAlignment;
      currentAlignment = 0;
      origAlignment = 0;
    }

    currentAlignment += CdrPrimitiveType.INT.getMaxSizeSerialized(currentAlignment);

    if (include_encapsulation) {
      currentAlignment += encapsulation_size;
    }

    return currentAlignment - origAlignment;
  }
  public long get_serialized_key_max_size(
      Object endpoint_data,
      boolean include_encapsulation,
      short encapsulation_id,
      long currentAlignment) {

    long origAlignment = currentAlignment;
    long encapsulation_size = currentAlignment;

    if (include_encapsulation) {
      if (!CdrEncapsulation.isValidEncapsulationKind(encapsulation_id)) {
        throw new RETCODE_ERROR("Unsupported encapsulation");
      }

      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size -= currentAlignment;
      currentAlignment = 0;
      origAlignment = 0;
    }

    currentAlignment +=
        org.openfmb.model.dds.rti.common.SetPointTypeSupport.get_instance()
            .get_sequence_max_size_serialized(
                endpoint_data,
                currentAlignment,
                ((org.openfmb.model.dds.rti.generation.MaxLengthGenerationControlSetPoints.VALUE)));

    if (include_encapsulation) {
      currentAlignment += encapsulation_size;
    }

    return currentAlignment - origAlignment;
  }
  public long get_serialized_sample_size(
      Object endpoint_data,
      boolean include_encapsulation,
      short encapsulation_id,
      long currentAlignment,
      Object sample) {
    SequenceOfGenerationControlSetPoints typedSrc = (SequenceOfGenerationControlSetPoints) sample;
    long origAlignment = currentAlignment;
    long encapsulation_size = currentAlignment;

    if (include_encapsulation) {
      if (!CdrEncapsulation.isValidEncapsulationKind(encapsulation_id)) {
        throw new RETCODE_ERROR("Unsupported encapsulation");
      }

      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size -= currentAlignment;
      currentAlignment = 0;
      origAlignment = 0;
    }

    currentAlignment +=
        org.openfmb.model.dds.rti.common.SetPointTypeSupport.get_instance()
            .get_sequence_serialized_size(endpoint_data, currentAlignment, typedSrc.userData);

    if (include_encapsulation) {
      currentAlignment += encapsulation_size;
    }
    return currentAlignment - origAlignment;
  }
  public long get_serialized_sample_size(
      Object endpoint_data,
      boolean include_encapsulation,
      short encapsulation_id,
      long currentAlignment,
      Object sample) {
    SunRadiationData typedSrc = (SunRadiationData) sample;
    long origAlignment = currentAlignment;
    long encapsulation_size = currentAlignment;

    if (include_encapsulation) {
      if (!CdrEncapsulation.isValidEncapsulationKind(encapsulation_id)) {
        throw new RETCODE_ERROR("Unsupported encapsulation");
      }

      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size -= currentAlignment;
      currentAlignment = 0;
      origAlignment = 0;
    }

    currentAlignment += CdrPrimitiveType.LONG.getMaxSizeSerialized(currentAlignment);
    currentAlignment += CdrPrimitiveType.FLOAT.getMaxSizeSerialized(currentAlignment);

    if (include_encapsulation) {
      currentAlignment += encapsulation_size;
    }
    return currentAlignment - origAlignment;
  }
  public long get_serialized_sample_size(
      Object endpoint_data,
      boolean include_encapsulation,
      short encapsulation_id,
      long currentAlignment,
      Object sample) {
    EndDeviceControl typedSrc = (EndDeviceControl) sample;
    long origAlignment = currentAlignment;
    long encapsulation_size = currentAlignment;

    if (include_encapsulation) {
      if (!CdrEncapsulation.isValidEncapsulationKind(encapsulation_id)) {
        throw new RETCODE_ERROR("Unsupported encapsulation");
      }

      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size -= currentAlignment;
      currentAlignment = 0;
      origAlignment = 0;
    }

    currentAlignment +=
        CdrPrimitiveType.getStringSerializedSize(currentAlignment, typedSrc.issueID);
    currentAlignment += CdrPrimitiveType.getStringSerializedSize(currentAlignment, typedSrc.name);
    currentAlignment +=
        org.openfmb.model.dds.rti.openfmb.commonmodule.EndDeviceControlTypeTypeSupport
            .get_instance()
            .get_serialized_sample_size(
                endpoint_data,
                false,
                encapsulation_id,
                currentAlignment,
                typedSrc.endDeviceControlType);
    currentAlignment +=
        org.openfmb.model.dds.rti.openfmb.commonmodule.DateTimeIntervalTypeSupport.get_instance()
            .get_serialized_sample_size(
                endpoint_data,
                false,
                encapsulation_id,
                currentAlignment,
                typedSrc.scheduledInterval);
    currentAlignment +=
        org.openfmb.model.dds.rti.openfmb.commonmodule
            .SequenceOfEndDeviceControlSetPointsTypeSupport.get_instance()
            .get_serialized_sample_size(
                endpoint_data, false, encapsulation_id, currentAlignment, typedSrc.setPoints);

    if (include_encapsulation) {
      currentAlignment += encapsulation_size;
    }
    return currentAlignment - origAlignment;
  }
  @Override
  public long get_serialized_sample_size(
      Object endpoint_data,
      boolean include_encapsulation,
      short encapsulation_id,
      long currentAlignment,
      Object sample) {
    long origAlignment = currentAlignment;

    long encapsulation_size = currentAlignment;
    MDSConnectivity typedSrc = (MDSConnectivity) sample;

    if (include_encapsulation) {
      if (!CdrEncapsulation.isValidEncapsulationKind(encapsulation_id)) {
        throw new RETCODE_ERROR("Unsupported encapsulation");
      }

      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size += CdrPrimitiveType.SHORT.getMaxSizeSerialized(encapsulation_size);
      encapsulation_size -= currentAlignment;
      currentAlignment = 0;
      origAlignment = 0;
    }

    currentAlignment +=
        CdrPrimitiveType.getStringSerializedSize(
            currentAlignment, typedSrc.unique_device_identifier);

    currentAlignment +=
        CdrPrimitiveType.getStringSerializedSize(currentAlignment, typedSrc.partition);

    if (include_encapsulation) {
      currentAlignment += encapsulation_size;
    }

    return currentAlignment - origAlignment;
  }