|
Odil
A C++11 library for the DICOM standard
|
#include <Association.h>
Public Member Functions | |
| Association () | |
| Create a default, un-associated, association. More... | |
| Association (Association const &other) | |
| Create an un-associated association. More... | |
| ~Association () | |
| Destroy the association, release it if necessary. More... | |
| dul::Transport & | get_transport () |
| Return the TCP transport. More... | |
| Association & | operator= (Association const &other) |
| Assing an un-associated association; it remains un-associated. More... | |
| AssociationParameters const & | get_parameters () const |
| Return the association parameters. More... | |
| AssociationParameters & | update_parameters () |
| Return the association parameters. More... | |
| void | set_parameters (AssociationParameters const &value) |
| Set the association parameters, throw an exception when associated. More... | |
| AssociationParameters const & | get_negotiated_parameters () const |
| Return the negotiated association parameters. More... | |
Peer | |
| std::string const & | get_peer_host () const |
| Return the host name of the peer. Defaults to "". More... | |
| void | set_peer_host (std::string const &host) |
| Set the host name of the peer. More... | |
| uint16_t | get_peer_port () const |
| Return the port of the peer. Defaults to 104. More... | |
| void | set_peer_port (uint16_t port) |
| Set the port of the peer. More... | |
Timeouts | |
| duration_type | get_tcp_timeout () const |
| Return the TCP timeout, default to infinity. More... | |
| void | set_tcp_timeout (duration_type const &duration) |
| Set the timeout. More... | |
| duration_type | get_message_timeout () const |
| Return the DIMSE timeout, default to 30s. More... | |
| void | set_message_timeout (duration_type const &duration) |
| Set the DIMSE timeout. More... | |
Association | |
| bool | is_associated () const |
| Test whether the object is currently associated to its peer. More... | |
| void | associate () |
| Request an association with the peer. Throws an exception if the endpoint can not be reached. More... | |
| void | receive_association (boost::asio::ip::tcp const &protocol, unsigned short port, AssociationAcceptor acceptor=default_association_acceptor) |
| Receive an association from a peer. More... | |
| void | reject (Result result, ResultSource result_source, Diagnostic diagnostic) |
| Reject the received association request. More... | |
| void | release () |
| Gracefully release the association. Throws an exception if not associated. More... | |
| void | abort (int source, int reason) |
| Forcefully release the association. Throws an exception if not associated. More... | |
DIMSE messages sending and reception. | |
| message::Message | receive_message () |
| Receive a generic DIMSE message. More... | |
| void | send_message (message::Message const &message, std::string const &abstract_syntax) |
| Send a DIMSE message. More... | |
| uint16_t | next_message_id () |
| Return the next available message id. More... | |
Duration of the timeout.
Diagnostic of association result.
Association result (ITU-T X.227, PS 3.8, 7.1.1.7 and PS 3.8, 9.3.4).
| Enumerator | |
|---|---|
| Accepted | |
| RejectedPermanent | |
| RejectedTransient | |
| odil::Association::Association | ( | ) |
Create a default, un-associated, association.
| odil::Association::Association | ( | Association const & | other | ) |
Create an un-associated association.
| odil::Association::~Association | ( | ) |
Destroy the association, release it if necessary.
| void odil::Association::abort | ( | int | source, |
| int | reason | ||
| ) |
Forcefully release the association. Throws an exception if not associated.
| void odil::Association::associate | ( | ) |
Request an association with the peer. Throws an exception if the endpoint can not be reached.
| duration_type odil::Association::get_message_timeout | ( | ) | const |
Return the DIMSE timeout, default to 30s.
| AssociationParameters const& odil::Association::get_negotiated_parameters | ( | ) | const |
Return the negotiated association parameters.
| AssociationParameters const& odil::Association::get_parameters | ( | ) | const |
Return the association parameters.
| std::string const& odil::Association::get_peer_host | ( | ) | const |
Return the host name of the peer. Defaults to "".
| uint16_t odil::Association::get_peer_port | ( | ) | const |
Return the port of the peer. Defaults to 104.
| duration_type odil::Association::get_tcp_timeout | ( | ) | const |
Return the TCP timeout, default to infinity.
| dul::Transport& odil::Association::get_transport | ( | ) |
Return the TCP transport.
| bool odil::Association::is_associated | ( | ) | const |
Test whether the object is currently associated to its peer.
| uint16_t odil::Association::next_message_id | ( | ) |
Return the next available message id.
| Association& odil::Association::operator= | ( | Association const & | other | ) |
Assing an un-associated association; it remains un-associated.
| void odil::Association::receive_association | ( | boost::asio::ip::tcp const & | protocol, |
| unsigned short | port, | ||
| AssociationAcceptor | acceptor = default_association_acceptor |
||
| ) |
Receive an association from a peer.
| message::Message odil::Association::receive_message | ( | ) |
Receive a generic DIMSE message.
Throw an AssociationReleased or AssociationAborted if the peer released or aborted the association.
| void odil::Association::reject | ( | Result | result, |
| ResultSource | result_source, | ||
| Diagnostic | diagnostic | ||
| ) |
Reject the received association request.
| void odil::Association::release | ( | ) |
Gracefully release the association. Throws an exception if not associated.
| void odil::Association::send_message | ( | message::Message const & | message, |
| std::string const & | abstract_syntax | ||
| ) |
Send a DIMSE message.
| void odil::Association::set_message_timeout | ( | duration_type const & | duration | ) |
Set the DIMSE timeout.
| void odil::Association::set_parameters | ( | AssociationParameters const & | value | ) |
Set the association parameters, throw an exception when associated.
| void odil::Association::set_peer_host | ( | std::string const & | host | ) |
Set the host name of the peer.
| void odil::Association::set_peer_port | ( | uint16_t | port | ) |
Set the port of the peer.
| void odil::Association::set_tcp_timeout | ( | duration_type const & | duration | ) |
Set the timeout.
| AssociationParameters& odil::Association::update_parameters | ( | ) |
Return the association parameters.
1.8.13