Home > Class Reference > ENSLIB namespace > EnsLib.DICOM.Adapter.TCP
Private  Storage   

EnsLib.DICOM.Adapter.TCP


class EnsLib.DICOM.Adapter.TCP extends EnsLib.TCP.DuplexAdapter

This adapter is the principal means for DICOM peers to communicate with Ensemble

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
4 24 76


Summary


Properties
%CredentialsObj %WarnedLatest %isTCPEventDevice AssociationId
BusinessHost CallInterval ContextId Credentials
EventDevice EventPort IPAddress IPDevice
IPPort InboundDocument IsConnected IsSpawnedJob
JobPerConnection KeepaliveInterval LocalAET LocalInterface
MessageId NextState PrincipalDevice QSize
RegistryID RemoteAET Role SSLConfig
TCPReadTimeout TraceVerbosity TransferSyntax

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
AbortAssociation AbortReasonGet AbortSourceGet AssignOneSetting
AssociationIsEstablishedGet ClearAllAppData ClearEventDevice ClearRuntimeAppData
ClearStaticAppData ClearTCPEventDevice CloseDevice CloseEventDevice
CloseTCPEventDevice ComposeAssociationContext CredentialsSet EnumerateSettingsClose
EnumerateSettingsExecute EnumerateSettingsFetch EstablishAssociation EventDeviceSet
FindContextForOutboundTransfer GetAssociationDetail GetCurrentAbstractSyntax GetCurrentTransferSyntax
GetNextMessageId GetSettings LoadAssociationData OnCloseConnection
OnDeviceDisconnected OnDeviceTimeout OnInit OnKeepalive
OnOpenConnection OnTask OnTearDown OpenDevice
OpenEventDevice OpenTCPEventDevice OutputData PDU2EYE
PrepareForIncomingDocument RecordAbortDetails ReleaseAssociation ResetDevice
RoleGet SendDocument TraceMessage connectedJob


Parameters


• parameter DOMAIN = "EnsDICOM";
Domain for $$$Text()
• parameter SERVICEINPUTCLASS = "EnsLib.DICOM.Document";
• parameter SERVICEOUTPUTCLASS = "EnsLib.DICOM.Document";
• parameter SETTINGS = "LocalAET,RemoteAET,TraceVerbosity,ARTIM,TXTIM";
Configurable settings

Properties


• property AssociationId as %String;
This holds the association identifier. Each established association has its own unique value.
• property ContextId as %Integer;
This holds the context id. For each message exchanged within an association the context id indicates the index of the Presentation Context that should be used.
• property InboundDocument as EnsLib.DICOM.Document;
This holds the incoming Document
• property LocalAET as %String(MAXLEN=16);
This holds the Called Application Entity Title (AET) that remote DICOM peers should use to communicate with US. When the adapter is in the role of Service Class Provider (SCP, server), it may contain the special wild card value '*'. Wildcard values for both LocalAET and RemoteAET force the adapter to accept any combination of Local and Remote AET provided a predefined AssociationContext exists which matches these values.
• property MessageId as %Integer;
This holds the outgoing message id counter.
• property NextState as %String [ InitialExpression = $$$NOSTATE ];
This holds the next state to switch to
• property RemoteAET as %String(MAXLEN="");
This holds the Calling Application Entity Title(s) of remote DICOM peers. When the adapter is in the role of Service Class Provider (SCP, server) it should contain either a wildcard '*' or a comma delimited list of 'names' of the DICOM peers which are allowed to connect. A name can either be a literal string or a pattern/substitution specification of the form ?Pattern/Substitution. For the pattern/substitution form a calling AET is matches against the pattern,If there is a match then the substitution is used for the purposes of association validation. Example ?1"B".E/JD-SCU would match any calling AET that starts with 'B' and substitutes JD-SCU. To accept ANY AET use ?.E for a pattern When the adapter is in the role of Service Class User (SCU, client) it MUST contain the AET of the DICOM peer to which WE are connecting.
• property Role as %Integer;
This holds the Role. If this adapter is associatied with a DuplexService then the role is ServiceClassProvider (SCP, server) otherwise the role is ServiceClassUser (SCU, client)
• property TraceVerbosity as %Integer [ InitialExpression = 0 ];
This holds the debug flag, set to 1 for terse debug information, 2 for verbose, 0 for none.
• property TransferSyntax as %String(MAXLEN="");
This holds the (overriden) transfer syntax

Methods


• method AbortAssociation(pSource As %Integer, pReason As %Integer) as %Status
Use this method to abort an Association
• method AbortReasonGet() as %Integer
Accessor for AbortReason
• method AbortSourceGet() as %Integer
Accessor for AbortSource
• method AssociationIsEstablishedGet() as %Boolean
Accessor for AssociationIsEstablished
• method ComposeAssociationContext(pAssociationType As %Integer, ByRef pDataToInsert As %String, Output pBytes As %String)
Compose an AssocationContext
• method EstablishAssociation(pRequest As EnsLib.DICOM.Command.Establish) as %Status
Use this method to Establish an Association (when role is SCU)
• method FindContextForOutboundTransfer(pAbstractSyntax As %String, pTransferSyntax As %String, Output pContextId As %Integer) as %Status
Given an abstract syntax, find the context id for the accepted presentation context. The alogrithm employed is VERY important. Ideally we want an EXACT match between negotiated transfer syntax and the transfer syntax which the document is encoded in as this involves as expensive conversion process. Additionally some conversions may NOT be possible, for example, converting a compressed/encapsulated transfer syntax to one of the basic syntaxes would or vice versa would require a compression/decompresssion step which is currently NOT supported. If an exact match cannot be found then the next best thing is to find a match where a supported conversion IS possible.
• method GetAssociationDetail(pDirection As %Integer, pContextId, Output pAbstractSyntax As %String, Output pTransferSyntax As %String) as %Status
• method GetCurrentAbstractSyntax(pPCId) as %String
Given a presentation context id, return the negotiated syntax
• method GetCurrentTransferSyntax(pPCId) as %String
Given a presentation context id, return the negotiated syntax
• method GetNextMessageId() as %Integer
Increment the message id. This is done when sending out a new message
• method LoadAssociationData(pCallingAET As %String, pCalledAET As %String, ByRef pREQUEST As %String) as %Status
Load the Association Data to Send. This loads the stored AssociationContext instance for the Called/CallingAET tuple and makes a list of the presentation contexts to be presented to the DICOM peer, as well as (crucially ), the maximum PDU length
• method OnCloseConnection() as %Status
• method OnDeviceDisconnected() as %Status
• method OnDeviceTimeout(pShouldQuit As %Boolean) as %Status
This method is called when the timeout expires
• method OnInit() as %Status
This user callback method is called just after %OnNew()
• method OnOpenConnection() as %Status
This method is called by the business host when a connection is opened For a service this will be called when the external AE connects in a TCP sense For an operation when the adapter is instructed to open the Association.
• method OnTearDown() as %Status
This user callback method is called just before %OnClose()
• method PDU2EYE(pType As %Integer)
This method expands a PDU type into eye-readable format
• method PrepareForIncomingDocument() as %Status
This method prepares for an incoming message
• method RecordAbortDetails(pSource As %Integer, pReason As %Integer)
This method records details regarding an error situation so the correct abort information can be sent to the peer.
• method ReleaseAssociation() as %Status
Use this method to close an Association
• method RoleGet() as %Integer
Accessor for Role
• method SendDocument(pDocument As EnsLib.DICOM.Document) as %Status
This method sends the specified document to the connected peer
• method TraceMessage(pVerbosity As %Integer, pMessage As %String)
Write a message to the console