9 #ifndef _a52696bc_5c6e_402d_a343_6cb085eb0138
10 #define _a52696bc_5c6e_402d_a343_6cb085eb0138
45 ULServiceProviderACSERelatedFunction=2,
46 ULServiceProvderPresentationRelatedFunction=3,
57 ApplicationContextNameNotSupported=2,
58 CallingAETitleNotRecognized=3,
59 CallingAPInvocationIdentifierNotRecognized=4,
60 CallingAEQualifierNotRecognized=5,
61 CallingAEInvocationIdentifierNotRecognized=6,
62 CalledAETitleNotRecognized=7,
63 CalledAPInvocationIdentifierNotRecognized=8,
64 CalledAEQualifierNotRecognized=9,
65 CalledAEInvocationIdentifierNotRecognized=10,
71 TemporaryCongestion=1,
73 CalledPresentationAddressUnknown=3,
74 PresentationProtocolVersionNotSupported=4,
75 NoPresentationServiceAccessPointAvailable=7,
151 boost::asio::ip::tcp
const & protocol,
unsigned short port,
177 std::shared_ptr<message::Message const> message,
178 std::string
const & abstract_syntax);
188 std::string _peer_host;
194 std::map<std::string, std::pair<uint8_t, std::string>>
195 _transfer_syntaxes_by_abstract_syntax;
196 std::map<uint8_t, std::string> _transfer_syntaxes_by_id;
198 uint16_t _next_message_id;
Exception reported when receiving a message after the association was aborted.
Definition: Association.h:217
uint8_t source
Source of the error.
Definition: Association.h:220
virtual ~AssociationAborted() noexcept
AssociationAborted(unsigned char source, unsigned char reason)
uint8_t reason
Reason of the error.
Definition: Association.h:223
Encapsulate association parameters.
Definition: AssociationParameters.h:27
Exception reported when receiving a message after the association was released.
Definition: Association.h:206
virtual ~AssociationReleased() noexcept
Association.
Definition: Association.h:31
Association()
Create a default, un-associated, association.
Diagnostic
Diagnostic of association result.
Definition: Association.h:54
AssociationParameters const & get_parameters() const
Return the association parameters.
std::shared_ptr< message::Message > receive_message()
Receive a generic DIMSE message.
void send_message(std::shared_ptr< message::Message const > message, std::string const &abstract_syntax)
Send a DIMSE message.
void receive_association(boost::asio::ip::tcp const &protocol, unsigned short port, AssociationAcceptor acceptor=default_association_acceptor)
Receive an association from a peer.
void reject(Result result, ResultSource result_source, Diagnostic diagnostic)
Reject the received association request.
ResultSource
Source of association result (PS 3.8, 7.1.1.8 and PS 3.8, 9.3.4).
Definition: Association.h:43
Association(Association const &other)
Create an un-associated association.
void set_tcp_timeout(duration_type const &duration)
Set the timeout.
dul::Transport & get_transport()
Return the TCP transport.
AssociationParameters & update_parameters()
Return the association parameters.
void set_parameters(AssociationParameters const &value)
Set the association parameters, throw an exception when associated.
Result
Association result (ITU-T X.227, PS 3.8, 7.1.1.7 and PS 3.8, 9.3.4).
Definition: Association.h:35
duration_type get_message_timeout() const
Return the DIMSE timeout, default to 30s.
void abort(int source, int reason)
Forcefully release the association. Throws an exception if not associated.
dul::StateMachine::duration_type duration_type
Duration of the timeout.
Definition: Association.h:79
~Association()
Destroy the association, release it if necessary.
void set_peer_port(uint16_t port)
Set the port of the peer.
bool is_associated() const
Test whether the object is currently associated to its peer.
void set_peer_host(std::string const &host)
Set the host name of the peer.
AssociationParameters const & get_negotiated_parameters() const
Return the negotiated association parameters.
Association & operator=(Association const &other)
Assign an un-associated association; it remains un-associated.
void set_message_timeout(duration_type const &duration)
Set the DIMSE timeout.
uint16_t next_message_id()
Return the next available message id.
duration_type get_tcp_timeout() const
Return the TCP timeout, default to infinity.
void associate()
Request an association with the peer. Throws an exception if the endpoint can not be reached.
uint16_t get_peer_port() const
Return the port of the peer. Defaults to 104.
void release()
Gracefully release the association. Throws an exception if not associated.
std::string const & get_peer_host() const
Return the host name of the peer. Defaults to "".
Base class for odil exceptions.
Definition: Exception.h:22
State machine for the DICOM upper layer.
Definition: StateMachine.h:32
boost::asio::deadline_timer::duration_type duration_type
Duration of the timeout.
Definition: StateMachine.h:67
Definition: Association.h:25
AssociationParameters default_association_acceptor(AssociationParameters const &input)
Default association acceptor.
std::function< AssociationParameters(AssociationParameters const &)> AssociationAcceptor
Callback to check whether the association request is acceptable.
Definition: AssociationAcceptor.h:30
#define ODIL_API
Definition: odil.h:28
TCP transport for the DICOM Upper Layer.
Definition: Transport.h:34