Mercurial > hg > orthanc
comparison OrthancServer/main.cpp @ 3614:4543ffad256d storage-commitment
storage commitment requests/responses to/from self are working
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 21 Jan 2020 17:48:43 +0100 |
parents | c1e2b91c2ab4 |
children | 169d57e18b39 |
comparison
equal
deleted
inserted
replaced
3613:c1e2b91c2ab4 | 3614:4543ffad256d |
---|---|
97 ServerContext& server_; | 97 ServerContext& server_; |
98 | 98 |
99 // TODO - Remove this | 99 // TODO - Remove this |
100 static void Toto(std::string* t) | 100 static void Toto(std::string* t) |
101 { | 101 { |
102 std::auto_ptr<std::string> tt(t); | 102 try |
103 { | |
104 std::auto_ptr<std::string> tt(t); | |
103 | 105 |
104 printf("Sleeping\n"); | 106 printf("Sleeping\n"); |
105 boost::this_thread::sleep(boost::posix_time::milliseconds(100)); | 107 boost::this_thread::sleep(boost::posix_time::milliseconds(100)); |
106 printf("Connect back\n"); | 108 printf("Connect back\n"); |
107 | 109 |
108 RemoteModalityParameters p("STGCMTSCU", "localhost", 11114, ModalityManufacturer_Generic); | 110 //RemoteModalityParameters p("STGCMTSCU", "localhost", 11114, ModalityManufacturer_Generic); |
109 DicomUserConnection scu("ORTHANC", p); | 111 RemoteModalityParameters p("ORTHANC", "localhost", 4242, ModalityManufacturer_Generic); |
110 | 112 DicomUserConnection scu("ORTHANC", p); |
111 std::vector<std::string> a, b, c, d; | 113 |
112 a.push_back("a"); b.push_back("b"); | 114 std::vector<std::string> a, b, c, d; |
113 a.push_back("c"); b.push_back("d"); | 115 a.push_back("a"); b.push_back("b"); |
116 a.push_back("c"); b.push_back("d"); | |
114 | 117 |
115 scu.ReportStorageCommitment(tt->c_str(), a, b, c, d); | 118 //scu.ReportStorageCommitment(tt->c_str(), a, b, c, d); |
116 //scu.ReportStorageCommitment("transaction", a, b, a, b); | 119 scu.ReportStorageCommitment(tt->c_str(), a, b, a, b); |
120 } | |
121 catch (OrthancException& e) | |
122 { | |
123 LOG(ERROR) << "EXCEPTION: " << e.What(); | |
124 } | |
117 | 125 |
118 /** | 126 /** |
119 * "After the N-EVENT-REPORT has been sent, the Transaction UID is | 127 * "After the N-EVENT-REPORT has been sent, the Transaction UID is |
120 * no longer active and shall not be reused for other | 128 * no longer active and shall not be reused for other |
121 * transactions." | 129 * transactions." |