increasing default rx tcp port (#562)

* increasing rx tcp port by default when creating shm
This commit is contained in:
Dhanya Thattil
2022-10-18 15:24:04 +02:00
committed by GitHub
parent d9e34e1657
commit d2c4827b31
18 changed files with 30 additions and 28 deletions

View File

@ -281,7 +281,7 @@ void DetectorImpl::setHostname(const std::vector<std::string> &name) {
void DetectorImpl::addModule(const std::string &hostname) {
LOG(logINFO) << "Adding module " << hostname;
int port = DEFAULT_PORTNO;
int port = DEFAULT_TCP_CNTRL_PORTNO;
std::string host = hostname;
auto res = split(hostname, ':');
if (res.size() > 1) {

View File

@ -3195,11 +3195,11 @@ void Module::initializeModuleStructure(detectorType type) {
shm()->detType = type;
shm()->numberOfModule.x = 0;
shm()->numberOfModule.y = 0;
shm()->controlPort = DEFAULT_PORTNO;
shm()->stopPort = DEFAULT_PORTNO + 1;
shm()->controlPort = DEFAULT_TCP_CNTRL_PORTNO;
shm()->stopPort = DEFAULT_TCP_STOP_PORTNO;
strcpy_safe(shm()->settingsDir, getenv("HOME"));
strcpy_safe(shm()->rxHostname, "none");
shm()->rxTCPPort = DEFAULT_PORTNO + 2;
shm()->rxTCPPort = DEFAULT_TCP_RX_PORTNO + moduleIndex;
shm()->useReceiverFlag = false;
shm()->numUDPInterfaces = 1;
shm()->zmqport =

View File

@ -95,8 +95,9 @@ class Module : public virtual slsDetectorDefs {
int64_t getSerialNumber() const;
int getModuleId() const;
int64_t getReceiverSoftwareVersion() const;
static detectorType getTypeFromDetector(const std::string &hostname,
int cport = DEFAULT_PORTNO);
static detectorType
getTypeFromDetector(const std::string &hostname,
int cport = DEFAULT_TCP_CNTRL_PORTNO);
/** Get Detector type from shared memory */
detectorType getDetectorType() const;