RISA
risa::ReceiverModule Class Reference

Each ReceiverModule is bound to one DetectorModule. More...

#include <ReceiverModule.h>

Collaboration diagram for risa::ReceiverModule:

Public Member Functions

 ReceiverModule (const std::string &address, const std::string &configPath, const int moduleID, std::vector< unsigned short > &buffer, OnlineReceiverNotification &notification)
 
auto run () -> void
 
auto stop () -> void
 

Private Member Functions

auto readConfig (const std::string &configFile) -> bool
 

Private Attributes

UDPServer udpServer_
 the class, which performs the UDP transaction More...
 
std::vector< unsigned short > & buffer_
 the input buffer, which stores a configurable amount of sinograms More...
 
std::size_t lastIndex_ {0u}
 identifier to check, whether a packet was lost More...
 
int numberOfDetectorModules_
 the number of detector modules More...
 
int numberOfDetectors_
 the number of detectors in the fan beam sinogram More...
 
int numberOfProjections_
 the number of projections in the fan beam sinogram More...
 
int numberOfProjectionsPerPacket_
 the number of projections per packet More...
 
int numberOfDetectorsPerModule_
 the number of detectors per module More...
 
int port_
 the port, to which the object listens More...
 
std::string address_
 the ip address of the sender More...
 
transportProtocol transportProtocol_
 specifies the prefered transport protocol More...
 
int timeout_
 after this duration in s, the connection is closed More...
 
OnlineReceiverNotificationnotification_
 
bool run_
 
int moduleID_
 
unsigned int bufferSize_
 

Detailed Description

Each ReceiverModule is bound to one DetectorModule.

It receives the packets via an interconnection network. So far, UDP and TCP transport protocols are implemented. The number of projections per packet needs to be a multiple of the number of projections per sinogram

Definition at line 47 of file ReceiverModule.h.

Constructor & Destructor Documentation

risa::ReceiverModule::ReceiverModule ( const std::string &  address,
const std::string &  configPath,
const int  moduleID,
std::vector< unsigned short > &  buffer,
OnlineReceiverNotification notification 
)

Definition at line 37 of file ReceiverModule.cpp.

Member Function Documentation

auto risa::ReceiverModule::readConfig ( const std::string &  configFile) -> bool
private

Definition at line 118 of file ReceiverModule.cpp.

auto risa::ReceiverModule::run ( ) -> void

Definition at line 56 of file ReceiverModule.cpp.

auto risa::ReceiverModule::stop ( ) -> void
inline

Definition at line 53 of file ReceiverModule.h.

Member Data Documentation

std::string risa::ReceiverModule::address_
private

the ip address of the sender

Definition at line 70 of file ReceiverModule.h.

std::vector<unsigned short>& risa::ReceiverModule::buffer_
private

the input buffer, which stores a configurable amount of sinograms

Definition at line 59 of file ReceiverModule.h.

unsigned int risa::ReceiverModule::bufferSize_
private

Definition at line 80 of file ReceiverModule.h.

std::size_t risa::ReceiverModule::lastIndex_ {0u}
private

identifier to check, whether a packet was lost

Definition at line 61 of file ReceiverModule.h.

int risa::ReceiverModule::moduleID_
private

Definition at line 78 of file ReceiverModule.h.

OnlineReceiverNotification& risa::ReceiverModule::notification_
private

Definition at line 74 of file ReceiverModule.h.

int risa::ReceiverModule::numberOfDetectorModules_
private

the number of detector modules

Definition at line 63 of file ReceiverModule.h.

int risa::ReceiverModule::numberOfDetectors_
private

the number of detectors in the fan beam sinogram

Definition at line 64 of file ReceiverModule.h.

int risa::ReceiverModule::numberOfDetectorsPerModule_
private

the number of detectors per module

Definition at line 67 of file ReceiverModule.h.

int risa::ReceiverModule::numberOfProjections_
private

the number of projections in the fan beam sinogram

Definition at line 65 of file ReceiverModule.h.

int risa::ReceiverModule::numberOfProjectionsPerPacket_
private

the number of projections per packet

Definition at line 66 of file ReceiverModule.h.

int risa::ReceiverModule::port_
private

the port, to which the object listens

Definition at line 69 of file ReceiverModule.h.

bool risa::ReceiverModule::run_
private

Definition at line 76 of file ReceiverModule.h.

int risa::ReceiverModule::timeout_
private

after this duration in s, the connection is closed

Definition at line 72 of file ReceiverModule.h.

transportProtocol risa::ReceiverModule::transportProtocol_
private

specifies the prefered transport protocol

Definition at line 71 of file ReceiverModule.h.

UDPServer risa::ReceiverModule::udpServer_
private

the class, which performs the UDP transaction

Definition at line 57 of file ReceiverModule.h.


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