Simulacrum  1.2
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Simulacrum::SDICOM_Server Class Reference

#include <sdicom-net.h>

Inheritance diagram for Simulacrum::SDICOM_Server:
Inheritance graph
Collaboration diagram for Simulacrum::SDICOM_Server:
Collaboration graph

Public Types

enum  DIMSE_CMD {
  DCM_UNKNOWN_CMD =-1 , DCM_CSTORE =0x1 , DCM_FIND =0x20 , DCM_MOVE =0x21 ,
  DCM_ECHO =0x30
}
 
enum  DIMSE_RSP { DCM_SUCCESS =0x0 , DCM_CANCEL =0xFE00 , DCM_ERROR =0x0211 }
 
enum  DIMSE_LEV { DCM_PATIENT , DCM_STUDY , DCM_SERIES , DCM_INSTANCE }
 

Public Member Functions

 SDICOM_Server ()
 
virtual ~SDICOM_Server ()
 
void setDiskStoreMode (bool)
 
bool diskStoreMode () const
 
void setTargetStoreDirectory (const std::string &)
 
std::string targetStoreDirectory () const
 
std::string aetitle () const
 
void setAETitle (const std::string &)
 
void setRestrictedMode (bool)
 
bool restrictedMode () const
 
void setReceptionCallback (std::function< void(SDICOM *)>)
 
- Public Member Functions inherited from Simulacrum::SServer
 SServer ()
 
virtual ~SServer ()
 
void start ()
 
void stop ()
 
void setPort (short port)
 
short port ()
 
void setMaxActiveHandlers (unsigned long)
 
unsigned long maxConnections ()
 
void wait ()
 
bool isRunning () const
 

Static Public Member Functions

static int readPDU (ssocket_t &, SDICOM_Generic_PDU &)
 
static int sendPDU (SDICOM_PDU_Serialisable &, ssocket_t &)
 
static DIMSE_CMD decodeDIMSECMD (Data_PDU::accumset_t &, DIMSE_CMD_TYPE msgid, DCMTag *tags=nullptr)
 
static int encodeDIMSECMD (DIMSE_CMD, SDICOM &, std::vector< char > &, bool hasdata=true)
 
static DCMTag extractDIMSEMessage (std::string &)
 

Protected Member Functions

int respondDIMSE (ssocket_t &, Data_PDU::accumset_t &, DICOM_PDU_TYPE presid, DIMSE_RSP)
 
void handleCStore (const Associate_PDU &association, Data_PDU::accumset_t &, DIMSE_CMD_TYPE msgid)
 
virtual bool handleAcceptedPDU (const Associate_PDU &, const SDICOM_Generic_PDU &, ssocket_t &, Associate_PDU &, Data_PDU::accumset_t &, Data_PDU::accumset_t &)
 
void handleConnection (ssocket_t &)
 
void termAssociation (ssocket_t &, DICOM_PDU_TYPE val=ASSOCS_PDU)
 
bool validateAssociation (const Associate_PDU &)
 

Static Protected Member Functions

static unsigned short genMessageID ()
 

Member Enumeration Documentation

◆ DIMSE_CMD

Enumerator
DCM_UNKNOWN_CMD 
DCM_CSTORE 
DCM_FIND 
DCM_MOVE 
DCM_ECHO 

◆ DIMSE_LEV

Enumerator
DCM_PATIENT 
DCM_STUDY 
DCM_SERIES 
DCM_INSTANCE 

◆ DIMSE_RSP

Enumerator
DCM_SUCCESS 
DCM_CANCEL 
DCM_ERROR 

Constructor & Destructor Documentation

◆ SDICOM_Server()

SDICOM_Server::SDICOM_Server ( )

◆ ~SDICOM_Server()

SDICOM_Server::~SDICOM_Server ( )
virtual

Member Function Documentation

◆ aetitle()

std::string SDICOM_Server::aetitle ( ) const

◆ decodeDIMSECMD()

SDICOM_Server::DIMSE_CMD SDICOM_Server::decodeDIMSECMD ( Data_PDU::accumset_t cmds,
DIMSE_CMD_TYPE  msgid,
DCMTag tags = nullptr 
)
static

◆ diskStoreMode()

bool SDICOM_Server::diskStoreMode ( ) const

◆ encodeDIMSECMD()

int SDICOM_Server::encodeDIMSECMD ( SDICOM_Server::DIMSE_CMD  command,
SDICOM exemplar,
std::vector< char > &  target,
bool  hasdata = true 
)
static

◆ extractDIMSEMessage()

DCMTag SDICOM_Server::extractDIMSEMessage ( std::string &  msgstr)
static

◆ genMessageID()

short unsigned int SDICOM_Server::genMessageID ( )
staticprotected

◆ handleAcceptedPDU()

bool SDICOM_Server::handleAcceptedPDU ( const Associate_PDU association,
const SDICOM_Generic_PDU newpdu,
ssocket_t &  sourcesocket,
Associate_PDU ,
Data_PDU::accumset_t dicomobjs,
Data_PDU::accumset_t dicomcmds 
)
protectedvirtual

◆ handleConnection()

void SDICOM_Server::handleConnection ( ssocket_t &  source)
protectedvirtual

Implements Simulacrum::SServer.

◆ handleCStore()

void SDICOM_Server::handleCStore ( const Associate_PDU association,
Data_PDU::accumset_t msgsource,
DIMSE_CMD_TYPE  msgid 
)
protected

◆ readPDU()

int SDICOM_Server::readPDU ( ssocket_t &  source,
SDICOM_Generic_PDU read_pdu 
)
static

◆ respondDIMSE()

int SDICOM_Server::respondDIMSE ( ssocket_t &  target,
Data_PDU::accumset_t cmdset,
DICOM_PDU_TYPE  presid,
SDICOM_Server::DIMSE_RSP  response 
)
protected

◆ restrictedMode()

bool SDICOM_Server::restrictedMode ( ) const

◆ sendPDU()

int SDICOM_Server::sendPDU ( SDICOM_PDU_Serialisable source,
ssocket_t &  target 
)
static

◆ setAETitle()

void SDICOM_Server::setAETitle ( const std::string &  nae)

◆ setDiskStoreMode()

void SDICOM_Server::setDiskStoreMode ( bool  nds)

◆ setReceptionCallback()

void SDICOM_Server::setReceptionCallback ( std::function< void(SDICOM *)>  )

◆ setRestrictedMode()

void SDICOM_Server::setRestrictedMode ( bool  nres)

◆ setTargetStoreDirectory()

void SDICOM_Server::setTargetStoreDirectory ( const std::string &  ndir)

◆ targetStoreDirectory()

std::string SDICOM_Server::targetStoreDirectory ( ) const

◆ termAssociation()

void SDICOM_Server::termAssociation ( ssocket_t &  targ,
DICOM_PDU_TYPE  val = ASSOCS_PDU 
)
protected

◆ validateAssociation()

bool SDICOM_Server::validateAssociation ( const Associate_PDU reqassoc)
protected

The documentation for this class was generated from the following files:
Simulacrum Project