示例#1
0
 private File getDir(Association as) {
   File dir = cache.getCacheRootDir();
   if (called2dir != null) {
     dir = new File(dir, called2dir.getProperty(as.getCalledAET(), calleddefdir));
   }
   if (calling2dir != null) {
     dir = new File(dir, calling2dir.getProperty(as.getCallingAET(), callingdefdir));
   }
   return dir;
 }
示例#2
0
    @Override
    public void onDimseRSP(Association as, DicomObject cmd, DicomObject data) {
      int status = cmd.getInt(Tag.Status);

      switch (status) {
        case 0x0000:
        case 0x0001:
        case 0x0002:
        case 0x0003:
          break;
        case 0x0116:
          LOG.warn(
              "Received Warning Status 116H (=Attribute Value Out of Range) from remote AE {}",
              as.getCalledAET());
          break;
        default:
          LOG.error(
              "Sending IAN(SCN) failed with status {}H at calledAET:{}",
              StringUtils.shortToHex(status),
              as.getCalledAET());
      }
    }
示例#3
0
 @Override
 public void onDimseRSP(Association as, DicomObject cmd, DicomObject data) {
   int status = cmd.getInt(Tag.Status);
   switch (status) {
     case 0:
       {
         LOG.debug("Dataset stored at {}", as.getCalledAET());
         break;
       }
     case 0xA700:
       {
         LOG.error(
             "Failed to store dataset - Out Of Resources! (status: {}H, calledAET:{}, comment:{})",
             new Object[] {
               StringUtils.shortToHex(status), as.getCalledAET(), cmd.getString(Tag.ErrorComment)
             });
         break;
       }
     case 0xA900:
       {
         LOG.error(
             "Failed to store dataset - Dataset doesn't match SOP class! (status: {}H, calledAET:{}, comment:{})",
             new Object[] {
               StringUtils.shortToHex(status), as.getCalledAET(), cmd.getString(Tag.ErrorComment)
             });
         break;
       }
     case 0xC000:
       {
         LOG.error(
             "Failed to store dataset - Can't understand! (status: {}H, calledAET:{}, comment:{})",
             new Object[] {
               StringUtils.shortToHex(status), as.getCalledAET(), cmd.getString(Tag.ErrorComment)
             });
         break;
       }
     case 0xB000:
     case 0xB006:
     case 0xB007:
       LOG.warn(
           "Dataset stored at {} with status {}H",
           as.getCalledAET(),
           StringUtils.shortToHex(status));
       break;
     default:
       LOG.error(
           "Failed to store dataset! (status: {}H, calledAET:{}, comment:{})",
           new Object[] {
             StringUtils.shortToHex(status), as.getCalledAET(), cmd.getString(Tag.ErrorComment)
           });
   }
 }