ADD: added message callback to udp listener

This commit is contained in:
Henry Winkel
2023-08-16 15:01:23 +02:00
parent aa7418ebc9
commit f794f4c5d0
7 changed files with 42 additions and 19 deletions

View File

@@ -47,7 +47,7 @@ SCENARIO("A test scenario","[keywords]")
listener->subscribe(WHISPER::DATA);
// listener->start();
// listener->stop();
auto stringMsg = WHISPER::StringData(1,1,WHISPER::SourceType::SENSOR,"hello world");
auto stringMsg = WHISPER::StringData("11","hello world");
sender->send(stringMsg,WHISPER::DATA);
LOG_S(INFO)<<"wating";
std::this_thread::sleep_for(std::chrono::milliseconds(200));

View File

@@ -34,7 +34,7 @@ SCENARIO("A test scenario","[keywords]")
{
GIVEN("Preliminaries")
{
WHISPER::InternalUDPService service(0,1,WHISPER::SourceType::SIMCOMTROLER,8000,"127.0.0.255","127.0.0.1");
WHISPER::InternalUDPService service("01",8000,"127.0.0.255","127.0.0.1");
auto receiver = std::make_shared<WHISPER::threadSafeQueue<WHISPER::Message>>();
service.connect(receiver) ;
// service.subscribe(WHISPER::MsgTopicsMap[WHISPER::MsgTopics::TRACK]);