/// <summary> /// Get a string repesentation of the command. /// </summary> /// <param name="dimseCommand">Specifies the type of message encoded by the <see cref="CommandSet"/></param> private string ToString(DimseCommand dimseCommand) { string command; switch(dimseCommand) { case DimseCommand.CCANCELRQ: command = "C-CANCEL-RQ"; break; case DimseCommand.CECHORQ: command = "C-ECHO-RQ"; break; case DimseCommand.CECHORSP: command = "C-ECHO-RSP"; break; case DimseCommand.CFINDRQ: command = "C-FIND-RQ"; break; case DimseCommand.CFINDRSP: command = "C-FIND-RSP"; break; case DimseCommand.CGETRQ: command = "C-GET-RQ"; break; case DimseCommand.CGETRSP: command = "C-GET-RSP"; break; case DimseCommand.CMOVERQ: command = "C-MOVE-RQ"; break; case DimseCommand.CMOVERSP: command = "C-MOVE-RSP"; break; case DimseCommand.CSTORERQ: command = "C-STORE-RQ"; break; case DimseCommand.CSTORERSP: command = "C-STORE-RSP"; break; case DimseCommand.NACTIONRQ: command = "N-ACTION-RQ"; break; case DimseCommand.NACTIONRSP: command = "N-ACTION-RSP"; break; case DimseCommand.NCREATERQ: command = "N-CREATE-RQ"; break; case DimseCommand.NCREATERSP: command = "N-CREATE-RSP"; break; case DimseCommand.NDELETERQ: command = "N-DELETE-RQ"; break; case DimseCommand.NDELETERSP: command = "N-DELETE-RSP"; break; case DimseCommand.NEVENTREPORTRQ: command = "N-EVENT-REPORT-RQ"; break; case DimseCommand.NEVENTREPORTRSP: command = "N-EVENT-REPORT-RSP"; break; case DimseCommand.NGETRQ: command = "N-GET-RQ"; break; case DimseCommand.NGETRSP: command = "N-GET-RSP"; break; case DimseCommand.NSETRQ: command = "N-SET-RQ"; break; case DimseCommand.NSETRSP: command = "N-SET-RSP"; break; case DimseCommand.UNDEFINED: command = "UNDEFINED"; break; default: throw new System.ArgumentException(); } return command; }
public IodId(DimseCommand m_DimseCommand, System.String sopClassUID) { // TODO: determine IodId from definition component }
/// <summary> /// Constructor with specific DIMSE command identifier specified. /// </summary> /// <param name="dimseCommand">Specifies the type of message encoded by the <see cref="CommandSet"/></param> public CommandSet(DimseCommand dimseCommand) { switch(dimseCommand) { case DimseCommand.CCANCELRQ: case DimseCommand.CECHORQ: case DimseCommand.CECHORSP: case DimseCommand.CFINDRQ: case DimseCommand.CFINDRSP: case DimseCommand.CGETRQ: case DimseCommand.CGETRSP: case DimseCommand.CMOVERQ: case DimseCommand.CMOVERSP: case DimseCommand.CSTORERQ: case DimseCommand.CSTORERSP: case DimseCommand.NACTIONRQ: case DimseCommand.NACTIONRSP: case DimseCommand.NCREATERQ: case DimseCommand.NCREATERSP: case DimseCommand.NDELETERQ: case DimseCommand.NDELETERSP: case DimseCommand.NEVENTREPORTRQ: case DimseCommand.NEVENTREPORTRSP: case DimseCommand.NGETRQ: case DimseCommand.NGETRSP: case DimseCommand.NSETRQ: case DimseCommand.NSETRSP: { System.Int16 commandFieldInt16 = (System.Int16)dimseCommand; byte[] bytes = System.BitConverter.GetBytes(commandFieldInt16); System.UInt16 commandFieldUInt16 = System.BitConverter.ToUInt16(bytes, 0); this.AddAttribute( 0x0000, 0x0100, VR.US, commandFieldUInt16); break; } case DimseCommand.UNDEFINED: // Do not add command field attribute. break; default: throw new System.ArgumentException(); } }