Esempio n. 1
0
xdc_Void A110x2500Radio::serviceInterrupt(xdc_UArg arg0, xdc_UArg arg1) {
  while(1) {
    Semaphore_pend(sem, BIOS_WAIT_FOREVER);

    GateMutex_enter(GateMutex_handle(&mygate));

    // Note: It is assumed that interrupts are disabled.

    // The GDO0 ISR will only look for the EOP edge. Therefore, if the radio
    // is not transmitting the EOP, it must be receiving an EOP signal.
    if (gDataTransmitting)
    {
      /**
       *  Note: GDO0 is issued prior to the transmitter being completely
       *  finished. The state machine will remain in TX_END until transmission
       *  completes. The following waits for TX_END to correct the hardware
       *  behavior.
       */ 
      while (CC1101GetMarcState(&gPhyInfo.cc1101) == eCC1101MarcStateTx_end);
      gDataTransmitting = false;
    }
    else
    {
      gDataReceived = true;
      readDataStream();
    }

    // Always go back to sleep.
    sleep();
    GateMutex_leave(GateMutex_handle(&mygate), 0);
  }
}
Esempio n. 2
0
void A110x2500Radio::gdo0Isr()
{
  // Note: It is assumed that interrupts are disabled.
  
  // The GDO0 ISR will only look for the EOP edge. Therefore, if the radio
  // is not transmitting the EOP, it must be receiving an EOP signal.
  if (gDataTransmitting)
  {
    /**
     *  Note: GDO0 is issued prior to the transmitter being completely
     *  finished. The state machine will remain in TX_END until transmission
     *  completes. The following waits for TX_END to correct the hardware
     *  behavior.
     */ 
    while (CC1101GetMarcState(&gPhyInfo.cc1101) == eCC1101MarcStateTx_end);
    gDataTransmitting = false;
  }
  else
  {
    gDataReceived = true;
    readDataStream();
  }
  
  // Always go back to sleep.
  sleep();
}
void NodeInstanceClientProxy::initializeSocket()
{
    QLocalSocket *localSocket = new QLocalSocket(this);
    connect(localSocket, SIGNAL(readyRead()), this, SLOT(readDataStream()));
    connect(localSocket, SIGNAL(error(QLocalSocket::LocalSocketError)), QCoreApplication::instance(), SLOT(quit()));
    connect(localSocket, SIGNAL(disconnected()), QCoreApplication::instance(), SLOT(quit()));
    localSocket->connectToServer(QCoreApplication::arguments().at(1), QIODevice::ReadWrite | QIODevice::Unbuffered);
    localSocket->waitForConnected(-1);

    m_inputIoDevice = localSocket;
    m_outputIoDevice = localSocket;
}
Esempio n. 4
0
mpegStream::mpegStream(QTcpSocket *parent)
:socket(parent)
{
	//file=new QFile;
	//file->open(QIODevice::ReadOnly);
	blockcount=0;
	read_buffer_size=61440/2;
	th=new jvcMpegThread(&dataArray,read_buffer_size);
	connect(th,SIGNAL(newImageSignal(QByteArray*)),this,SIGNAL(newDataSignal(QByteArray*)));
	connect(th,SIGNAL(giveMoreData()),this,SLOT(readDataStream()));
	connect(this,SIGNAL(newDataForDecode(uint)),th,SLOT(getPacket(uint)));
	block.clear();
	
	
}
Qt5NodeInstanceClientProxy::Qt5NodeInstanceClientProxy(QObject *parent) :
    NodeInstanceClientProxy(parent)
{
    prioritizeDown();
    DesignerSupport::activateDesignerWindowManager();
    if (QCoreApplication::arguments().at(1) == QLatin1String("--readcapturedstream")) {
        qputenv("DESIGNER_DONT_USE_SHARED_MEMORY", "1");
        setNodeInstanceServer(new Qt5TestNodeInstanceServer(this));
        initializeCapturedStream(QCoreApplication::arguments().at(2));
        readDataStream();
        QCoreApplication::exit();
    } else if (QCoreApplication::arguments().at(2) == QLatin1String("previewmode")) {
        setNodeInstanceServer(new Qt5PreviewNodeInstanceServer(this));
        initializeSocket();
    } else if (QCoreApplication::arguments().at(2) == QLatin1String("editormode")) {
        setNodeInstanceServer(new Qt5InformationNodeInstanceServer(this));
        initializeSocket();
    } else if (QCoreApplication::arguments().at(2) == QLatin1String("rendermode")) {
        setNodeInstanceServer(new Qt5RenderNodeInstanceServer(this));
        initializeSocket();
    }
}