pynetdicom.pdu_items.UserIdentitySubItemAC

class pynetdicom.pdu_items.UserIdentitySubItemAC[source]

A User Identity (AC) Sub-item.

A User Identity (AC) Sub-item is used to response with the server identity to the association requestor.

Notes

A User Identity (RQ) Sub-item requires the following parameters:

  • Item type (1, fixed, 0x59)

  • Item length (1)

  • Server response length (1)

  • Server response (1)

Encoding

When encoded, a User Identity (AC) Sub-item has the following structure, taken from Tables D.3-15 of the DICOM Standard (offsets shown with Python indexing). Items are always encoded using Big Endian.

Offset

Length

Description

0

1

Item type

1

1

Reserved

2

2

Item length

4

2

Server response length

6

Variable

Server response

References

__init__() None[source]

Initialise a new User Identity (AC) Item.

Methods

__init__()

Initialise a new User Identity (AC) Item.

decode(bytestream)

Decode bytestream and use the result to set the field values of the PDU item.

encode()

Return the encoded PDU as bytes.

from_primitive(primitive)

Set the item's values using an User Identity primitive.

to_primitive()

Return an User Identity primitive from the current Item.

Attributes

item_length

Return the item's Item Length field value as int.

item_type

Return the item's Item Type field value as int.

response

Return the item's Server Response field value.

server_response_length

Return the item's Server Response Length field value.

from_primitive(primitive: UserIdentityNegotiation) None[source]

Set the item’s values using an User Identity primitive.

Parameters:

primitive (pdu_primitives.UserIdentityNegotiation) – The primitive to use to set the Item’s field values.

property item_length: int

Return the item’s Item Length field value as int.

property response: bytes | None

Return the item’s Server Response field value.

property server_response_length: int

Return the item’s Server Response Length field value.

to_primitive() UserIdentityNegotiation[source]

Return an User Identity primitive from the current Item.

Returns:

The primitive representation of the current Item.

Return type:

pdu_primitives.UserIdentityNegotiation