diff OrthancServer/main.cpp @ 3606:33ba63637d48 storage-commitment

DicomUserConnection: sending N-EVENT-REPORT-RQ
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 16 Jan 2020 19:24:52 +0100
parents e327b44780bb
children d0ecb355db33
line wrap: on
line diff
--- a/OrthancServer/main.cpp	Thu Jan 16 18:26:47 2020 +0100
+++ b/OrthancServer/main.cpp	Thu Jan 16 19:24:52 2020 +0100
@@ -96,6 +96,24 @@
 private:
   ServerContext& server_;
 
+  // TODO - Remove this
+  static void Toto()
+  {
+    printf("Sleeping\n");
+    boost::this_thread::sleep(boost::posix_time::milliseconds(100));
+    printf("Connect back\n");
+    
+    RemoteModalityParameters p("STGCMTSCU", "localhost", 11114, ModalityManufacturer_Generic);        
+    DicomUserConnection scu("ORTHANC", p);
+
+    std::vector<std::string> a, b, c, d;
+    a.push_back("a");  b.push_back("b");
+    a.push_back("c");  b.push_back("d");
+    
+    //scu.ReportStorageCommitment("transaction", a, b, c, d);
+    scu.ReportStorageCommitment("transaction", a, b, a, b);
+  }
+  
 public:
   OrthancStorageCommitmentRequestHandler(ServerContext& context) :
     server_(context)
@@ -110,6 +128,8 @@
                       const std::string& calledAet)
   {
     // TODO - Enqueue a Storage commitment job
+
+    boost::thread t(Toto);
   }
 };