Search in sources :

Example 1 with RoleSelection

use of org.dcm4che3.net.pdu.RoleSelection in project dcm4chee-arc-light by dcm4che.

the class UPSEventSCP method mkAAssociateRQ.

private static AAssociateRQ mkAAssociateRQ(ApplicationEntity localAE, String subscriberAET) {
    AAssociateRQ aarq = new AAssociateRQ();
    aarq.setCalledAET(subscriberAET);
    TransferCapability tc = localAE.getTransferCapabilityFor(UID.UnifiedProcedureStepEvent, TransferCapability.Role.SCP);
    aarq.addPresentationContext(new PresentationContext(1, UID.UnifiedProcedureStepEvent, tc != null ? tc.getTransferSyntaxes() : new String[] { UID.ImplicitVRLittleEndian }));
    aarq.addRoleSelection(new RoleSelection(UID.UnifiedProcedureStepEvent, false, true));
    return aarq;
}
Also used : AAssociateRQ(org.dcm4che3.net.pdu.AAssociateRQ) RoleSelection(org.dcm4che3.net.pdu.RoleSelection) PresentationContext(org.dcm4che3.net.pdu.PresentationContext)

Example 2 with RoleSelection

use of org.dcm4che3.net.pdu.RoleSelection in project dcm4che by dcm4che.

the class PDUEncoder method encodeUserInfo.

private void encodeUserInfo(AAssociateRQAC rqac) {
    encodeItemHeader(ItemType.USER_INFO, rqac.userInfoLength());
    encodeMaxPDULength(rqac.getMaxPDULength());
    encodeStringItem(ItemType.IMPL_CLASS_UID, rqac.getImplClassUID());
    if (rqac.isAsyncOps())
        encodeAsyncOpsWindow(rqac);
    for (RoleSelection rs : rqac.getRoleSelections()) encode(rs);
    encodeStringItem(ItemType.IMPL_VERSION_NAME, rqac.getImplVersionName());
    for (ExtendedNegotiation extNeg : rqac.getExtendedNegotiations()) encode(extNeg);
    for (CommonExtendedNegotiation extNeg : rqac.getCommonExtendedNegotiations()) encode(extNeg);
    encode(rqac.getUserIdentityRQ());
    encode(rqac.getUserIdentityAC());
}
Also used : RoleSelection(org.dcm4che3.net.pdu.RoleSelection) ExtendedNegotiation(org.dcm4che3.net.pdu.ExtendedNegotiation) CommonExtendedNegotiation(org.dcm4che3.net.pdu.CommonExtendedNegotiation) CommonExtendedNegotiation(org.dcm4che3.net.pdu.CommonExtendedNegotiation)

Example 3 with RoleSelection

use of org.dcm4che3.net.pdu.RoleSelection in project dcm4chee-arc-light by dcm4che.

the class StgCmtImpl method mkAAssociateRQ.

private AAssociateRQ mkAAssociateRQ(ApplicationEntity localAE, TransferCapability.Role role) {
    AAssociateRQ aarq = new AAssociateRQ();
    TransferCapability tc = localAE.getTransferCapabilityFor(UID.StorageCommitmentPushModel, role);
    aarq.addPresentationContext(new PresentationContext(1, UID.StorageCommitmentPushModel, tc.getTransferSyntaxes()));
    if (role == TransferCapability.Role.SCP)
        aarq.addRoleSelection(new RoleSelection(UID.StorageCommitmentPushModel, false, true));
    return aarq;
}
Also used : AAssociateRQ(org.dcm4che3.net.pdu.AAssociateRQ) RoleSelection(org.dcm4che3.net.pdu.RoleSelection) PresentationContext(org.dcm4che3.net.pdu.PresentationContext)

Example 4 with RoleSelection

use of org.dcm4che3.net.pdu.RoleSelection in project dcm4che by dcm4che.

the class SendStgCmtResult method makeAAssociateRQ.

private AAssociateRQ makeAAssociateRQ() {
    AAssociateRQ aarq = new AAssociateRQ();
    aarq.setCallingAET(as.getLocalAET());
    aarq.setCalledAET(as.getRemoteAET());
    ApplicationEntity ae = as.getApplicationEntity();
    TransferCapability tc = ae.getTransferCapabilityFor(UID.StorageCommitmentPushModel, TransferCapability.Role.SCP);
    aarq.addPresentationContext(new PresentationContext(1, UID.StorageCommitmentPushModel, tc.getTransferSyntaxes()));
    aarq.addRoleSelection(new RoleSelection(UID.StorageCommitmentPushModel, false, true));
    return aarq;
}
Also used : AAssociateRQ(org.dcm4che3.net.pdu.AAssociateRQ) ApplicationEntity(org.dcm4che3.net.ApplicationEntity) RoleSelection(org.dcm4che3.net.pdu.RoleSelection) TransferCapability(org.dcm4che3.net.TransferCapability) PresentationContext(org.dcm4che3.net.pdu.PresentationContext)

Example 5 with RoleSelection

use of org.dcm4che3.net.pdu.RoleSelection in project dcm4che by dcm4che.

the class ApplicationEntity method negotiate.

protected PresentationContext negotiate(AAssociateRQ rq, AAssociateAC ac, PresentationContext rqpc) {
    String as = rqpc.getAbstractSyntax();
    TransferCapability tc = roleSelection(rq, ac, as);
    int pcid = rqpc.getPCID();
    if (tc == null)
        return new PresentationContext(pcid, PresentationContext.ABSTRACT_SYNTAX_NOT_SUPPORTED, rqpc.getTransferSyntax());
    String ts = tc.selectTransferSyntax(rqpc.getTransferSyntaxes());
    if (ts == null)
        return new PresentationContext(pcid, PresentationContext.TRANSFER_SYNTAX_NOT_SUPPORTED, rqpc.getTransferSyntax());
    byte[] info = negotiate(rq.getExtNegotiationFor(as), tc);
    if (info != null)
        ac.addExtendedNegotiation(new ExtendedNegotiation(as, info));
    return new PresentationContext(pcid, PresentationContext.ACCEPTANCE, ts);
}
Also used : ExtendedNegotiation(org.dcm4che3.net.pdu.ExtendedNegotiation) CommonExtendedNegotiation(org.dcm4che3.net.pdu.CommonExtendedNegotiation) PresentationContext(org.dcm4che3.net.pdu.PresentationContext)

Aggregations

RoleSelection (org.dcm4che3.net.pdu.RoleSelection)5 PresentationContext (org.dcm4che3.net.pdu.PresentationContext)4 AAssociateRQ (org.dcm4che3.net.pdu.AAssociateRQ)3 CommonExtendedNegotiation (org.dcm4che3.net.pdu.CommonExtendedNegotiation)2 ExtendedNegotiation (org.dcm4che3.net.pdu.ExtendedNegotiation)2 ApplicationEntity (org.dcm4che3.net.ApplicationEntity)1 TransferCapability (org.dcm4che3.net.TransferCapability)1