pynetdicom.service_class.StorageServiceClass

class pynetdicom.service_class.StorageServiceClass(assoc)

Implementation of the Storage Service Class.

__init__(assoc)

Create a new ServiceClass.

Methods

SCP(req, context)

The SCP implementation for the Storage Service Class.

__init__(assoc)

Create a new ServiceClass.

is_cancelled(msg_id)

Return True if a C-CANCEL message with msg_id has been received.

is_valid_status(status)

Return True if status is valid for the service class.

validate_status(status, rsp)

Validate status and set rsp.Status accordingly.

Attributes

ae

Return the AE.

dimse

Return the DIMSE service provider.

statuses

uid

SCP(req, context)

The SCP implementation for the Storage Service Class.

Parameters

See also

association.Association.send_c_store()

Notes

C-STORE Request

Parameters

(M) Message ID
(M) Affected SOP Class UID
(M) Affected SOP Instance UID
(M) Priority
(U) Move Originator Application Entity Title
(U) Move Originator Message ID
(M) Data Set

C-STORE Response

Parameters

(U) Message ID
(M) Message ID Being Responded To
(U) Affected SOP Class UID
(U) Affected SOP Instance UID
(M) Status

Status

Success
0x0000 Success
Warning
0xB000 Warning: Coercion of Data Elements
0xB006 Warning: Elements Discarded
0xB007 Warning: Data Set Does Not Match SOP Class
Failure
0x0117 Refused: Invalid SOP Instance
0x0122 Refused: SOP Class Not Supported
0x0124 Refused: Not Authorised
0x0210 Refused: Duplicate Invocation
0x0211 Refused: Unrecognised Operation
0x0212 Refused: Mistyped Argument
0xA700 to 0xA7FF Refused: Out of Resources
0xA900 to 0xA9FF Error: Data Set Does Not Match SOP Class
0xC000 to 0xCFFF Error: Cannot Understand

References

property ae

Return the AE.

property dimse

Return the DIMSE service provider.

is_cancelled(msg_id)

Return True if a C-CANCEL message with msg_id has been received.

Parameters

msg_id (int) – The (0000,0120) Message ID Being Responded To value to use to match against.

Returns

True if a C-CANCEL message has been received with a Message ID Being Responded To corresponding to msg_id, False otherwise.

Return type

bool

is_valid_status(status)

Return True if status is valid for the service class.

Parameters

status (int) – The Status value to check for validity.

Returns

True if the status is valid, False otherwise.

Return type

bool

validate_status(status, rsp)

Validate status and set rsp.Status accordingly.

Parameters
  • status (pydicom.dataset.Dataset or int) – A Dataset containing a Status element or an int.

  • rsp (dimse_primitive) – The response primitive to be sent to the peer.

Returns

rsp – The response primitie to be sent to the peer (containing a valid Status parameter).

Return type

dimse_primitive