Example #1
0
  public static long oHpiDomainAdd(
      SaHpiTextBufferT Host,
      int Port,
      SaHpiEntityPathT EntityRoot,
      oHpiDomainAddOutputParamsT out) {
    if (out == null) {
      return SA_ERR_HPI_INVALID_PARAMS;
    }

    String s = HpiUtil.fromSaHpiTextBufferT(Host);
    if (s == null) {
      return SA_ERR_HPI_INVALID_PARAMS;
    }

    HpiDomain d = HpiCore.createDomain(s, Port, EntityRoot);
    if (d == null) {
      return SA_ERR_HPI_INTERNAL_ERROR;
    }

    out.DomainId = d.getLocalDid();

    return SA_OK;
  }