Example #1
0
 bool interruptModule()
 {
     iPort.interrupt();
     oPort.interrupt();
     bPort.interrupt();
     return true; 
 }
 bool close()
 {
     yInfo("Stopping ppsAggregEventsForiCubGui module..");
     
     mySkinContactList.clear();
     
     yInfo("Closing ports..\n");
         if (tactile)
         {
             aggregSkinEventsInPort.interrupt();
             aggregSkinEventsInPort.close();
             yInfo("aggregSkinEventsInPort successfully closed");
         } 
         if (pps)
         {
             aggregPPSeventsInPort.interrupt();
             aggregPPSeventsInPort.close();
             yInfo("aggregPPSeventsInPort successfully closed");
         }
         //if (aggregEventsForiCubGuiPort.isOpen())
         //{
             aggregEventsForiCubGuiPort.interrupt();
             aggregEventsForiCubGuiPort.close();
             yInfo("aggregEventsForiCubGuiPort successfully closed");
         //}
    
    
    return true;
 }
Example #3
0
    void threadRelease()
    {
        fprintf(stdout,"cleaning up \n");
        port_in0.interrupt();
        port_in0.close();
        port_in1.interrupt();
        port_in1.close();
        port_in2.interrupt();
        port_in2.close();
        port_in3.interrupt();
        port_in3.close();
        port_in4.interrupt();
        port_in4.close();
        port_in5.interrupt();
        port_in5.close();
        port_in6.interrupt();
        port_in6.close();
        port_in7.interrupt();
        port_in7.close();
        port_in8.interrupt();
        port_in8.close();

        remove_cog("COG");
        remove_cog("LL_COM");
        remove_cog("LA_COM");
        remove_cog("RL_COM");
        remove_cog("RA_COM");
        remove_cog("HD_COM");
        remove_cog("UPP_COM");
        remove_cog("LOW_COM");
        
        port_out.interrupt();
        port_out.close();
    }
Example #4
0
 ~WorkingThread()
 {
     port_command_out.interrupt();
     port_command_out.close();
     port_command_joints.interrupt();
     port_command_joints.close();
 }
 bool interruptModule()
 {
     imgLPortIn.interrupt();
     imgRPortIn.interrupt();
     igaze->stopControl();
     iarm->stopControl();
     return true;
 }
Example #6
0
    bool interruptModule()
    {
        imgInPort.interrupt();
        imgOutPort.interrupt();
        dataOutPort.interrupt();
        rpcPort.interrupt();

        return true;
    }
Example #7
0
 bool interruptModule()
 {
     portDispIn.interrupt();
     portDispOut.interrupt();
     portOutPoints.interrupt();
     portImgIn.interrupt();
     portContour.interrupt();
     portSFM.interrupt();
     portRpc.interrupt();
     return true;
 }
Example #8
0
    virtual void threadRelease()
    {
        if (I)
            delete I;

        qdPort.interrupt();
        voPort.interrupt();
        qoPort.interrupt();

        qdPort.close();
        voPort.close();
        qoPort.close();
    }
Example #9
0
    bool interruptModule()
    {
        rpcPort.interrupt();
        // Interrupt any blocking reads on the input port
        imInPort.interrupt();
        imOutPort.interrupt();
        tempOutPort.close();
        coordsInPort.interrupt();
        trackInPort.interrupt();
        coordsOutPort.interrupt();

        return true;
    }
Example #10
0
 void interrupt()
 {
     inPort.interrupt();
     outPort.interrupt();
     for(int i=0; i<huePorts.size(); i++) {
         huePorts[i]->interrupt();
     }
     for(int i=0; i<satPorts.size(); i++) {
         satPorts[i]->interrupt();
     }
     for(int i=0; i<intPorts.size(); i++) {
         intPorts[i]->interrupt();
     }    
 }
Example #11
0
	virtual void threadRelease()
	{

		portImgIn->interrupt();
		portRefIn->interrupt();
		portImgOut->interrupt();
		portObjOut->interrupt();

		delete portImgIn;
		delete portRefIn;
		delete portImgOut;
		delete portObjOut;

	}
Example #12
0
 bool interruptModule()
 {
     rpcPort.interrupt();
     dumpPort.interrupt();
     opc.interrupt();
     return true;
 }
Example #13
0
    bool interruptModule()
    {
        inVec.interrupt();
        printf("inVec interrupted\n");

        pred.interrupt();
        printf("pred interrupted\n");
        
        perf.interrupt();
        printf("perf interrupted\n");
        
        rpcPort.interrupt();
        printf("rpcPort interrupted\n");

        return true;
    }
Example #14
0
    /*
    * Interrupt function.
    */
    bool interruptModule()
    {
        vergencePort.interrupt();
        handlerPort.interrupt();
		suspendPort.interrupt();
        return true;
    }
Example #15
0
 bool interruptModule()
 {
     // order does matter!
     imageInPort.interrupt();
     coordPort.interrupt();        
     imageOutPort.interrupt();
     return true;
 }
Example #16
0
	virtual void threadRelease(){
		armPlan->interrupt(); armPred->interrupt();
		armPlan->close(); armPred->close();
		delete armPlan; delete armPred;
		armLocJ->interrupt(); headLoc->interrupt();
		armLocJ->close(); headLoc->close();
		delete armLocJ; delete headLoc;
		gsl_rng_free(r);
		//delete r;
		//clientGazeCtrl->close();
		//robotDevice->close();
		//delete igaze;
		//delete pos;
		//delete enc;
		//delete command;
		//delete tmp;
	}
Example #17
0
 /*
 * Close function, to perform cleanup.
 */
 bool close()
 {
     cout<<"Calling close function\n";
     handlerPort.close();
     gazeIn.interrupt();
     gazeIn.close();
     speechOut.close();
     return true;
 }
Example #18
0
    virtual bool interruptModule()
    {

       portIn.interrupt();
       for(int i = 0; i < levels; i++)
          portOut[i].interrupt();
       
       return true;
    };
Example #19
0
 bool close()
 {
     rpcPort.interrupt();
     rpcPort.close();
     dumpPort.interrupt();
     dumpPort.close();
     opc.interrupt();
     opc.close();
     return true;
 }
Example #20
0
    bool interruptModule() {
        // since a call to checkActionsDone() blocks
        // the execution until it's done, we need to
        // take control and exit from the waiting state
        action->syncCheckInterrupt(true);

        inPort.interrupt();
        rpcPort.interrupt();

        return true;
    }
Example #21
0
	virtual void threadRelease()
	{

		acousticOut->interrupt();
		areaOut->interrupt();
		actuationIn->interrupt();

		acousticOut->close();
		areaOut->close();
		actuationIn->close();
        
		delete acousticOut;
		delete areaOut;
		delete actuationIn;

        delete apa;
        delete controller;
        delete speaker;

	}
Example #22
0
 /*
 * Close function, to perform cleanup.
 */
 bool close()
 {
     cout<<"Calling close function\n";
     handlerPort.close();
     imageIn.interrupt();
     imageIn.close();
     imageOut.close();
     targetPort.close();
     
     return true;
 }
Example #23
0
    void threadRelease()
    {
        // we require an immediate stop
        // before closing the client for safety reason
        igaze->stopControl();

        // it's a good rule to restore the controller
        // context as it was before opening the module
        igaze->restoreContext(startup_context_id);

        clientGaze.close();

        port.interrupt();
        port.close();
    }
Example #24
0
    bool interruptModule()
    {
        if(meas_given!=1)
        {
            portIn.interrupt();
            rpcOut.interrupt();
        }

        rpcPort.close();

        if(state==1)
            delete loc5;
        return true;

    }
Example #25
0
    virtual void threadRelease()
    {        
        armRest();
        gazeRest();

        igaze->restoreContext(startup_gazeContext_id);
        clientGaze.close();

        if (arm!="none")
        {
            iarm->restoreContext(startup_armContext_id);
            clientArm.close();
        }

        portImgIn.interrupt();
        portImgOut.interrupt();
        portTopDown.interrupt();
        portSetFace.interrupt();

        portImgIn.close();
        portImgOut.close();
        portTopDown.close();
        portSetFace.close();
    }
 // try to interrupt any communications or resource usage
 bool interruptModule() {
     port.interrupt();
     return true;
 }
Example #27
0
 bool interruptModule()
 {
     imgInPort.interrupt();
     return true;
 }
Example #28
0
 virtual bool interruptModule()
 {
    portImgIn.interrupt();
    portImgOut.interrupt();
    return true;
 };
Example #29
0
 ~BroadcastingThread()
 {
     port_data_out.interrupt();
     port_data_out.close();
 }
Example #30
0
    void close()
    {
        locOutPort.interrupt();
        locOutPort.close();

        locInPort.interrupt();
        locInPort.close();

        if(camCheck[LEFT])
        {
            imgInPort[LEFT].interrupt();
            imgInPort[LEFT].close();

            imgOutPort[LEFT].interrupt();
            imgOutPort[LEFT].close();

            blobsPort[LEFT].interrupt();
            blobsPort[LEFT].close();

            bkgSubPort[LEFT].interrupt();
            bkgSubPort[LEFT].close();

            if(track[LEFT]!=NULL)
                cvReleaseImage(&track[LEFT]);
        }

        if(camCheck[RIGHT])
        {
            imgInPort[RIGHT].interrupt();
            imgInPort[RIGHT].close();

            imgOutPort[RIGHT].interrupt();
            imgOutPort[RIGHT].close();

            blobsPort[RIGHT].interrupt();
            blobsPort[RIGHT].close();

            bkgSubPort[RIGHT].interrupt();
            bkgSubPort[RIGHT].close();

            if(track[RIGHT]!=NULL)
                cvReleaseImage(&track[RIGHT]);
        }

        for(int cam=0; cam<2; cam++)
        {
            for(map<string,deque<double> *>::iterator itr=margins[cam].begin(); itr!=margins[cam].end(); itr++)
            {
                delete (*itr).second;
            }
            
            for(map<string,deque<vector<CvPoint> > *>::iterator itr=histories[cam].begin(); itr!=histories[cam].end(); itr++)
            {
                delete (*itr).second;
            }
        }

        for(map<string,int *>::iterator itr=colors.begin(); itr!=colors.end(); itr++)
        {
            delete [] (*itr).second;
        }


    }