void VSDPM_CDT::DisplaySimWnd(int nModule)
{
emit moduleDatarcvd(nModule);
}
void VSDPM_CDT::DisplaySimWnd(int nModule)
{
emit moduleDatarcvd(nModule);
}
To copy to clipboard, switch view to plain text mode
Here i am emitting a signal i.e n module and at receiver side:
connect (this, SIGNAL(moduleDatarcvd(int)), this, SLOT(ShowModuleSimWnd(int)),Qt::BlockingQueuedConnection);
connect (this, SIGNAL(moduleDatarcvd(int)), this, SLOT(ShowModuleSimWnd(int)),Qt::BlockingQueuedConnection);
To copy to clipboard, switch view to plain text mode
and my ShowmoduleSimWnd is a method which will be called when it is received a signal i.e
void VSDPM_CDT::ShowModuleSimWnd(int nModule)
{
if(nModule == 0)
{
OnClickCanSimulation();
}
else if(nModule == 1)
{
OnClickLinSimulation();
}
else if(nModule == 2)
{
OnClickADCSimulation();
}
else if(nModule == 3)
{
OnClickDIOSimulation();
}
else if(nModule == 4)
{
OnClickPWMSimulation();
}
else if(nModule == 5)
{
ShowLogMessage("test","Inside module");
OnClickTCPIPSimulation();
}
else if(nModule == 6)
{
OnClickBTSimulation();
}
}
void VSDPM_CDT::ShowModuleSimWnd(int nModule)
{
if(nModule == 0)
{
OnClickCanSimulation();
}
else if(nModule == 1)
{
OnClickLinSimulation();
}
else if(nModule == 2)
{
OnClickADCSimulation();
}
else if(nModule == 3)
{
OnClickDIOSimulation();
}
else if(nModule == 4)
{
OnClickPWMSimulation();
}
else if(nModule == 5)
{
ShowLogMessage("test","Inside module");
OnClickTCPIPSimulation();
}
else if(nModule == 6)
{
OnClickBTSimulation();
}
}
To copy to clipboard, switch view to plain text mode
in lin if(nModule == 5) i am getting a problem. Actually i am blocking the queue here to wait for a signal to come. please help me in this scenario
Bookmarks