code: public void encodeData(AsnOutputStream asnOs) throws MAPException {
          if (this.deferredLocationEventType == null) {
              throw new MAPException("Encdoing of " + _PrimitiveName
                      + " failed. Missing mandatory parameter deferredLocationEventType DeferredLocationEventType");
          }
  
          ((DeferredLocationEventTypeImpl) this.deferredLocationEventType).encodeAll(asnOs);
  
          if (this.terminationCause != null) {
              try {
                  asnOs.writeInteger(Tag.CLASS_CONTEXT_SPECIFIC, _TAG_TERMINATION_CAUSE, this.terminationCause.getCause());
              } catch (IOException e) {
                  throw new MAPException("IOException when encoding " + _PrimitiveName + ".terminationCause: " + e.getMessage(),
                          e);
              } catch (AsnException e) {
                  throw new MAPException("AsnException when encoding " + _PrimitiveName + ".terminationCause: " + e.getMessage(),
                          e);
              }
          }
  
          if (this.lcsLocationInfo != null) {
              ((LCSLocationInfoImpl) this.lcsLocationInfo).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _TAG_LCS_LOCATION_INFO);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.map.api.primitives.MAPAsnPrimitive#encodeData
  (org.mobicents.protocols.asn.AsnOutputStream)