zmq fixed to have additional json headers using rx_zmqjsonheader

This commit is contained in:
2018-04-09 16:33:14 +02:00
parent ccdc7d22e9
commit 2bd8e6c166
14 changed files with 195 additions and 10 deletions

View File

@@ -83,6 +83,7 @@ void UDPBaseImplementation::initializeMembers(){
dataStreamEnable = false;
streamingPort = 0;
memset(streamingSrcIP, 0, sizeof(streamingSrcIP));
memset(additionalJsonHeader, 0, sizeof(additionalJsonHeader));
//***receiver parameters***
silentMode = 0;
@@ -232,6 +233,16 @@ char *UDPBaseImplementation::getStreamingSourceIP() const{
return output;
}
char *UDPBaseImplementation::getAdditionalJsonHeader() const{
FILE_LOG(logDEBUG) << __AT__ << " starting";
char* output = new char[MAX_STR_LENGTH]();
memset(output, 0, MAX_STR_LENGTH);
strcpy(output,additionalJsonHeader);
//freed by calling function
return output;
}
/*************************************************************************
* Setters ***************************************************************
* They modify the local cache of configuration or detector parameters ***
@@ -597,6 +608,11 @@ void UDPBaseImplementation::setStreamingSourceIP(const char c[]){
FILE_LOG(logINFO) << "Streaming Source IP: " << streamingSrcIP;
}
void UDPBaseImplementation::setAdditionalJsonHeader(const char c[]){
FILE_LOG(logDEBUG) << __AT__ << " starting";
strcpy(additionalJsonHeader, c);
FILE_LOG(logINFO) << "Additional JSON Header: " << additionalJsonHeader;
}
int UDPBaseImplementation::restreamStop() {
FILE_LOG(logERROR) << __AT__ << " doing nothing...";