MsgReceivePulse problem

Hi all,

I have a problem with pulse receiving. My resource manager should handle interrupt’s, and on each interrupt send to the client’s application pulse. The interval between interrupt’s is 10 ms.
The function ChannelCreate() invoked on an application side ahd then ChId send to RM with devctl().

There is my code on RM side:


	rmStateParams.coid = ConnectAttach( 0, 0, rmStateParams.chid, _NTO_SIDE_CHANNEL, 0 );

	//...
	
	//waiting for interrupt
	
	InterruptWait(0, NULL);

	int sts = MsgSendPulse(	 rmStateParams.coid,
				 10,
				 MI_PULSE_WRITE_COMPLETED,
				 MI_PULSE_VAL_SUCCESS);

…and on application side:

    

    int chid = ChannelCreate(0);
    /* After that we transferred chid to RM */	
    struct _pulse pulse;
    pulse.code = MI_PULSE_WRITE_COMPLETED;
    struct sigevent event;
    event.sigev_notify   = SIGEV_UNBLOCK;

    coid = ConnectAttach( 0, 0, chid, _NTO_SIDE_CHANNEL, 0 );
    SIGEV_PULSE_INIT( &event, coid, SIGEV_PULSE_PRIO_INHERIT , MI_PULSE_WRITE_COMPLETED, 0 );
    _Uint64t timeout = 10000;

    SIGEV_UNBLOCK_INIT( &event);
    if ( TimerTimeout( CLOCK_MONOTONIC,_NTO_TIMEOUT_RECEIVE, &event, &timeout, NULL ) < 0 )
    {
         msgError = new QMessageBox(QMessageBox::Critical, "qMI", "Error on timer timeout setting", QMessageBox::Ok);
         msgError->exec();
         return;
    }
    int rcvid = MsgReceivePulse( chid, &pulse, sizeof( pulse ), NULL );
    if(!rcvid)
	    ui->txtOut->append(tr("Pulse was received!"));

ChannelCreate(), ConnectAttach() and MsgSendPulse() works correct (returns success), but pulse is not received,and MsgReceivePulse() finished by timeout.

Could you help me please?

You are leaving out a lot of code, so it’s hard to know where the problem might be. I don’t see anything obviously wrong.

As just a guess, have you verified that the coid you create in the client is the same as the one that MsgSendPulse() is using in the RM?