org.ccsds.moims.mo.mal.structures.Union类的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(31.1k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中org.ccsds.moims.mo.mal.structures.Union类的一些代码示例,展示了Union类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Union类的具体详情如下:
包路径:org.ccsds.moims.mo.mal.structures.Union
类名称:Union

Union介绍

暂无

代码示例

代码示例来源:origin: int.esa.nmf.core.moservices.api/platform

/**
 * Asynchronous version of method enableUnit.
 * @param enable The enable field holds the boolean value to enable or disable the unit.
 * @param unitObjInstId The unitObjInstId field holds the object instance identifier of the unit to be enabled or disabled.
 * @param adapter adapter Listener in charge of receiving the messages from the service provider.
 * @return the MAL message sent to initiate the interaction.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification.
 * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception.
 */
public org.ccsds.moims.mo.mal.transport.MALMessage asyncEnableUnit(Boolean enable, Long unitObjInstId, org.ccsds.moims.mo.platform.powercontrol.consumer.PowerControlAdapter adapter) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 return consumer.asyncRequest(org.ccsds.moims.mo.platform.powercontrol.PowerControlHelper.ENABLEUNIT_OP, adapter, (enable == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(enable), (unitObjInstId == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(unitObjInstId));
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/software-management

/**
 * The dumpMemory operation allows a consumer to dump memory areas of a selected device from a provider. The dumping process can be aborted by using the identifier provided in the acknowledge phase.
 * @param deviceName The deviceName field shall contain the name of the destination device. The interpretation of the value is implementation-specific.
 * @param base The base field shall contain the base reference of the memory within the memory block.
 * @param memoryAreas The memoryAreas field shall contain the memory areas to be dumped.
 * @param adapter adapter Listener in charge of receiving the messages from the service provider.
 * @return The acknowledge value of the interaction.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification.
 * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception.
 */
public Long dumpMemory(org.ccsds.moims.mo.mal.structures.Identifier deviceName, org.ccsds.moims.mo.mal.structures.UInteger base, org.ccsds.moims.mo.softwaremanagement.memorymanagement.structures.MemoryAreaList memoryAreas, org.ccsds.moims.mo.softwaremanagement.memorymanagement.consumer.MemoryManagementAdapter adapter) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.progress(org.ccsds.moims.mo.softwaremanagement.memorymanagement.MemoryManagementHelper.DUMPMEMORY_OP, adapter, deviceName, base, memoryAreas);
 Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE));
 return (body0 == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body0).getLongValue();
}

代码示例来源:origin: int.esa.nmf.core/helper-tools

Integer typeShortForm = ((Union) obj).getTypeShortForm();
  return (boolean) ((Union) obj).getBooleanValue();
  return (int) ((Union) obj).getIntegerValue();
  return (long) ((Union) obj).getLongValue();
  return ((Union) obj).getStringValue();
  return (double) ((Union) obj).getDoubleValue();
  return (float) ((Union) obj).getFloatValue();
  return (byte) ((Union) obj).getOctetValue();
  return (short) ((Union) obj).getShortValue();

代码示例来源:origin: int.esa.nmf.core.moservices.impl/ccsds-mc

public static double getDouble(Attribute attr) {
  int type = attr.getTypeShortForm();
  switch (type) {
    case Attribute._DOUBLE_TYPE_SHORT_FORM:
      //Already double.
      return ((Union) attr).getDoubleValue();
    case Attribute._SHORT_TYPE_SHORT_FORM:
      // Short.
      return ((Union) attr).getShortValue();
    case Attribute._USHORT_TYPE_SHORT_FORM:
      // UShort
      return ((UShort) attr).getValue();
    case Attribute._INTEGER_TYPE_SHORT_FORM:
      // Integer
      return ((Union) attr).getIntegerValue();
    case Attribute._UINTEGER_TYPE_SHORT_FORM:
      // UInteger
      return ((UInteger) attr).getValue();
    case Attribute._LONG_TYPE_SHORT_FORM:
      // Long
      return ((Union) attr).getLongValue();
  }
  return 0;
}

代码示例来源:origin: int.esa.ccsds.mo/API_COMMON

/**
 * Called by the provider MAL layer on reception of a message to handle the interaction.
 * @param interaction interaction the interaction object.
 * @param body body the message body.
 * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error.
 */
public void handleRequest(org.ccsds.moims.mo.mal.provider.MALRequest interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 switch (interaction.getOperation().getNumber().getValue())
 {
  case org.ccsds.moims.mo.common.login.LoginHelper._LOGIN_OP_NUMBER:
   org.ccsds.moims.mo.common.login.body.LoginResponse loginRt = delegate.login((org.ccsds.moims.mo.common.login.structures.Profile) body.getBodyElement(0, new org.ccsds.moims.mo.common.login.structures.Profile()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction);
   interaction.sendResponse(loginRt.getBodyElement0(), (loginRt.getBodyElement1() == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(loginRt.getBodyElement1()));
   break;
  case org.ccsds.moims.mo.common.login.LoginHelper._LISTROLES_OP_NUMBER:
   interaction.sendResponse(delegate.listRoles((org.ccsds.moims.mo.mal.structures.Identifier) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Identifier()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction));
   break;
  case org.ccsds.moims.mo.common.login.LoginHelper._HANDOVER_OP_NUMBER:
   org.ccsds.moims.mo.common.login.body.HandoverResponse handoverRt = delegate.handover((org.ccsds.moims.mo.common.login.structures.Profile) body.getBodyElement(0, new org.ccsds.moims.mo.common.login.structures.Profile()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction);
   interaction.sendResponse(handoverRt.getBodyElement0(), (handoverRt.getBodyElement1() == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(handoverRt.getBodyElement1()));
   break;
  default:
   interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation")));
 }
}

代码示例来源:origin: int.esa.ccsds.mo/API_COMMON

/**
 * Called by the provider MAL layer on reception of a message to handle the interaction.
 * @param interaction interaction the interaction object.
 * @param body body the message body.
 * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error.
 */
public void handleInvoke(org.ccsds.moims.mo.mal.provider.MALInvoke interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 switch (interaction.getOperation().getNumber().getValue())
 {
  case org.ccsds.moims.mo.common.configuration.ConfigurationHelper._STORECURRENT_OP_NUMBER:
   storeCurrent((org.ccsds.moims.mo.com.structures.ObjectKey) body.getBodyElement(0, new org.ccsds.moims.mo.com.structures.ObjectKey()), (org.ccsds.moims.mo.common.structures.ServiceKey) body.getBodyElement(1, new org.ccsds.moims.mo.common.structures.ServiceKey()), (body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE))).getBooleanValue(), new StoreCurrentInteraction(interaction));
   break;
  default:
   interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/software-management

/**
 * Called by the provider MAL layer on reception of a message to handle the interaction.
 * @param interaction interaction the interaction object.
 * @param body body the message body.
 * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error.
 */
public void handleInvoke(org.ccsds.moims.mo.mal.provider.MALInvoke interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 switch (interaction.getOperation().getNumber().getValue())
 {
  case org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper._CHECKIMAGEINTEGRITY_OP_NUMBER:
   checkImageIntegrity((org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), new CheckImageIntegrityInteraction(interaction));
   break;
  case org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper._CLONEIMAGE_OP_NUMBER:
   cloneImage((org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.IdentifierList()), new CloneImageInteraction(interaction));
   break;
  case org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper._PATCHIMAGE_OP_NUMBER:
   patchImage((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE))).getLongValue(), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE))).getLongValue(), new PatchImageInteraction(interaction));
   break;
  default:
   interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/platform

/**
 * Called by the provider MAL layer on reception of a message to handle the interaction.
 * @param interaction interaction the interaction object.
 * @param body body the message body.
 * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error.
 */
public void handleRequest(org.ccsds.moims.mo.mal.provider.MALRequest interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 switch (interaction.getOperation().getNumber().getValue())
 {
  case org.ccsds.moims.mo.platform.powercontrol.PowerControlHelper._LISTUNITSAVAILABLE_OP_NUMBER:
   org.ccsds.moims.mo.platform.powercontrol.body.ListUnitsAvailableResponse listUnitsAvailableRt = listUnitsAvailable((org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()), interaction);
   interaction.sendResponse(listUnitsAvailableRt.getBodyElement0(), listUnitsAvailableRt.getBodyElement1());
   break;
  case org.ccsds.moims.mo.platform.powercontrol.PowerControlHelper._ENABLEUNIT_OP_NUMBER:
   enableUnit((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE))).getBooleanValue(), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE))).getLongValue(), interaction);
   interaction.sendResponse();
   break;
  default:
   interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.impl/ccsds-mc

private Attribute applyPolyConversion(final PolyConversionDetails conversionDetails, final Attribute value) {
  //requirement: 3.8.3.e => no entry in the points-list returns null
  final PairList points = conversionDetails.getPoints();
  if (points.size() == 0) {
    return null;
  }
  double convertedValue = 0;
  for (Pair point : points) {
    double midStep = Math.pow(HelperAttributes.attribute2double(value), ((Union) point.getFirst()).getIntegerValue());
    convertedValue += HelperAttributes.attribute2double(point.getSecond()) * midStep;
  }
  return new Union(convertedValue);
}

代码示例来源:origin: int.esa.ccsds.mo/API_COMMON

/**
 * Called by the provider MAL layer on reception of a message to handle the interaction.
 * @param interaction interaction the interaction object.
 * @param body body the message body.
 * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error.
 */
public void handleRequest(org.ccsds.moims.mo.mal.provider.MALRequest interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 switch (interaction.getOperation().getNumber().getValue())
 {
  case org.ccsds.moims.mo.common.login.LoginHelper._LOGIN_OP_NUMBER:
   org.ccsds.moims.mo.common.login.body.LoginResponse loginRt = login((org.ccsds.moims.mo.common.login.structures.Profile) body.getBodyElement(0, new org.ccsds.moims.mo.common.login.structures.Profile()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction);
   interaction.sendResponse(loginRt.getBodyElement0(), (loginRt.getBodyElement1() == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(loginRt.getBodyElement1()));
   break;
  case org.ccsds.moims.mo.common.login.LoginHelper._LISTROLES_OP_NUMBER:
   interaction.sendResponse(listRoles((org.ccsds.moims.mo.mal.structures.Identifier) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Identifier()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction));
   break;
  case org.ccsds.moims.mo.common.login.LoginHelper._HANDOVER_OP_NUMBER:
   org.ccsds.moims.mo.common.login.body.HandoverResponse handoverRt = handover((org.ccsds.moims.mo.common.login.structures.Profile) body.getBodyElement(0, new org.ccsds.moims.mo.common.login.structures.Profile()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction);
   interaction.sendResponse(handoverRt.getBodyElement0(), (handoverRt.getBodyElement1() == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(handoverRt.getBodyElement1()));
   break;
  default:
   interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation")));
 }
}

代码示例来源:origin: int.esa.ccsds.mo/API_COMMON

/**
 * Called by the provider MAL layer on reception of a message to handle the interaction.
 * @param interaction interaction the interaction object.
 * @param body body the message body.
 * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error.
 */
public void handleInvoke(org.ccsds.moims.mo.mal.provider.MALInvoke interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 switch (interaction.getOperation().getNumber().getValue())
 {
  case org.ccsds.moims.mo.common.configuration.ConfigurationHelper._STORECURRENT_OP_NUMBER:
   delegate.storeCurrent((org.ccsds.moims.mo.com.structures.ObjectKey) body.getBodyElement(0, new org.ccsds.moims.mo.com.structures.ObjectKey()), (org.ccsds.moims.mo.common.structures.ServiceKey) body.getBodyElement(1, new org.ccsds.moims.mo.common.structures.ServiceKey()), (body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE))).getBooleanValue(), new StoreCurrentInteraction(interaction));
   break;
  default:
   interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/software-management

/**
 * Called by the provider MAL layer on reception of a message to handle the interaction.
 * @param interaction interaction the interaction object.
 * @param body body the message body.
 * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error.
 */
public void handleInvoke(org.ccsds.moims.mo.mal.provider.MALInvoke interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 switch (interaction.getOperation().getNumber().getValue())
 {
  case org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper._CHECKIMAGEINTEGRITY_OP_NUMBER:
   delegate.checkImageIntegrity((org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), new CheckImageIntegrityInteraction(interaction));
   break;
  case org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper._CLONEIMAGE_OP_NUMBER:
   delegate.cloneImage((org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.IdentifierList()), new CloneImageInteraction(interaction));
   break;
  case org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper._PATCHIMAGE_OP_NUMBER:
   delegate.patchImage((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE))).getLongValue(), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE))).getLongValue(), new PatchImageInteraction(interaction));
   break;
  default:
   interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/platform

/**
 * Called by the provider MAL layer on reception of a message to handle the interaction.
 * @param interaction interaction the interaction object.
 * @param body body the message body.
 * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error.
 */
public void handleRequest(org.ccsds.moims.mo.mal.provider.MALRequest interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 switch (interaction.getOperation().getNumber().getValue())
 {
  case org.ccsds.moims.mo.platform.powercontrol.PowerControlHelper._LISTUNITSAVAILABLE_OP_NUMBER:
   org.ccsds.moims.mo.platform.powercontrol.body.ListUnitsAvailableResponse listUnitsAvailableRt = delegate.listUnitsAvailable((org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()), interaction);
   interaction.sendResponse(listUnitsAvailableRt.getBodyElement0(), listUnitsAvailableRt.getBodyElement1());
   break;
  case org.ccsds.moims.mo.platform.powercontrol.PowerControlHelper._ENABLEUNIT_OP_NUMBER:
   delegate.enableUnit((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE))).getBooleanValue(), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE))).getLongValue(), interaction);
   interaction.sendResponse();
   break;
  default:
   interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/platform

/**
 * The enableUnit operation allows a consumer to enable and disable a specific Unit. .
 * @param enable The enable field holds the boolean value to enable or disable the unit.
 * @param unitObjInstId The unitObjInstId field holds the object instance identifier of the unit to be enabled or disabled.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification.
 * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception.
 */
public void enableUnit(Boolean enable, Long unitObjInstId) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 consumer.request(org.ccsds.moims.mo.platform.powercontrol.PowerControlHelper.ENABLEUNIT_OP, (enable == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(enable), (unitObjInstId == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(unitObjInstId));
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/com-nmf

/**
 * The.
 * @param from .
 * @param until .
 * @param objectTypes .
 * @param compression .
 * @param adapter adapter Listener in charge of receiving the messages from the service provider.
 * @return The acknowledge value of the interaction.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification.
 * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception.
 */
public Long retrieveRange(org.ccsds.moims.mo.mal.structures.FineTime from, org.ccsds.moims.mo.mal.structures.FineTime until, org.ccsds.moims.mo.com.structures.ObjectTypeList objectTypes, org.ccsds.moims.mo.mal.structures.Identifier compression, org.ccsds.moims.mo.com.archivesync.consumer.ArchiveSyncAdapter adapter) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.progress(org.ccsds.moims.mo.com.archivesync.ArchiveSyncHelper.RETRIEVERANGE_OP, adapter, from, until, objectTypes, compression);
 Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE));
 return (body0 == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body0).getLongValue();
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/platform

/**
 * Called by the provider MAL layer on reception of a message to handle the interaction.
 * @param interaction interaction the interaction object.
 * @param body body the message body.
 * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error.
 */
public void handleInvoke(org.ccsds.moims.mo.mal.provider.MALInvoke interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 switch (interaction.getOperation().getNumber().getValue())
 {
  case org.ccsds.moims.mo.platform.gps.GPSHelper._GETNMEASENTENCE_OP_NUMBER:
   getNMEASentence((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), new GetNMEASentenceInteraction(interaction));
   break;
  case org.ccsds.moims.mo.platform.gps.GPSHelper._GETPOSITION_OP_NUMBER:
   getPosition(new GetPositionInteraction(interaction));
   break;
  case org.ccsds.moims.mo.platform.gps.GPSHelper._GETSATELLITESINFO_OP_NUMBER:
   getSatellitesInfo(new GetSatellitesInfoInteraction(interaction));
   break;
  default:
   interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/com-nmf

/**
 * Called by the provider MAL layer on reception of a message to handle the interaction.
 * @param interaction interaction the interaction object.
 * @param body body the message body.
 * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error.
 */
public void handleProgress(org.ccsds.moims.mo.mal.provider.MALProgress interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 switch (interaction.getOperation().getNumber().getValue())
 {
  case org.ccsds.moims.mo.com.archive.ArchiveHelper._QUERY_OP_NUMBER:
   delegate.query((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Boolean.FALSE))).getBooleanValue(), (org.ccsds.moims.mo.com.structures.ObjectType) body.getBodyElement(1, new org.ccsds.moims.mo.com.structures.ObjectType()), (org.ccsds.moims.mo.com.archive.structures.ArchiveQueryList) body.getBodyElement(2, new org.ccsds.moims.mo.com.archive.structures.ArchiveQueryList()), (org.ccsds.moims.mo.com.archive.structures.QueryFilterList) body.getBodyElement(3, null), new QueryInteraction(interaction));
   break;
  default:
   interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation")));
 }
}

代码示例来源:origin: int.esa.nmf.core/helper-tools

if (((Union) in).getTypeShortForm().equals(Union.BOOLEAN_TYPE_SHORT_FORM)) {  // 2
  double dou = ((Union) in).getBooleanValue() ? 1 : 0;
  return dou;
if (((Union) in).getTypeShortForm().equals(Union.FLOAT_TYPE_SHORT_FORM)) {  // 4
  return new Double(((Union) in).getFloatValue());
if (((Union) in).getTypeShortForm().equals(Union.DOUBLE_TYPE_SHORT_FORM)) {  // 5
  return ((Union) in).getDoubleValue();
if (((Union) in).getTypeShortForm().equals(Union.OCTET_TYPE_SHORT_FORM)) {  // 7
  return new Double((short) ((Union) in).getOctetValue());
if (((Union) in).getTypeShortForm().equals(Union.SHORT_TYPE_SHORT_FORM)) {  // 9
  return new Double(((Union) in).getShortValue());
if (((Union) in).getTypeShortForm().equals(Union.INTEGER_TYPE_SHORT_FORM)) {  // 11
  return new Double(((Union) in).getIntegerValue());
if (((Union) in).getTypeShortForm().equals(Union.LONG_TYPE_SHORT_FORM)) {  // 13
  return new Double(((Union) in).getLongValue());
if (((Union) in).getTypeShortForm().equals(Union.STRING_TYPE_SHORT_FORM)) {  // 15
  Double dou;
  try {
    dou = Double.parseDouble(((Union) in).getStringValue());
  } catch (NumberFormatException ex) {
    return null;  // Return a null

代码示例来源:origin: int.esa.nmf.core.moservices.api/software-management

/**
 * Asynchronous version of method patchImage.
 * @param baselineImage .
 * @param patchObjId .
 * @param adapter adapter Listener in charge of receiving the messages from the service provider.
 * @return the MAL message sent to initiate the interaction.
 * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification.
 * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception.
 */
public org.ccsds.moims.mo.mal.transport.MALMessage asyncPatchImage(Long baselineImage, Long patchObjId, org.ccsds.moims.mo.softwaremanagement.softwareimage.consumer.SoftwareImageAdapter adapter) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
{
 return consumer.asyncInvoke(org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper.PATCHIMAGE_OP, adapter, (baselineImage == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(baselineImage), (patchObjId == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(patchObjId));
}

代码示例来源:origin: int.esa.ccsds.mo/API_COMMON

/**
  * The publishProvider operation adds a new or updates an existing entry in the list of service providers held in the directory service.
  * @param newProviderDetails The newProviderDetails field shall hold the provider details of the service to be added or updated in the directory service.
If any of the fields of the newProviderDetails domain/sessionType/SessionName/network fields are either empty or contain the wildcard '*' an INVALID error shall be returned.
If the providerName field of the PublishDetails structure is empty or contains the wildcard '*' an INVALID error shall be returned.
If the area/service/version fields of the PublishDetails structure contain '0' or the supportedCapabilities list is empty or contains '0' then an INVALID error shall be returned.
For each contained ProviderAddressDetails structure if the supportedLevels list is empty or the priorityLevels field is '0' then an INVALID error shall be returned.
If an error is being returned then no changes shall be made.
  * @return The return value of the interaction.
  * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification.
  * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception.
  */
 public org.ccsds.moims.mo.common.directory.body.PublishProviderResponse publishProvider(org.ccsds.moims.mo.common.directory.structures.PublishDetails newProviderDetails) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException
 {
  org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.request(org.ccsds.moims.mo.common.directory.DirectoryHelper.PUBLISHPROVIDER_OP, newProviderDetails);
  Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE));
  Object body1 = (Object) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE));
  return new org.ccsds.moims.mo.common.directory.body.PublishProviderResponse((body0 == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body0).getLongValue(), (body1 == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body1).getLongValue());
 }

相关文章