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;
}
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());
}
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;
}
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;
}
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);
}
Aggregations