Ejemplo n.º 1
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();
    }
 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;
 }
Ejemplo n.º 3
0
 ~WorkingThread()
 {
     port_command_out.interrupt();
     port_command_out.close();
     port_command_joints.interrupt();
     port_command_joints.close();
 }
Ejemplo n.º 4
0
 bool close()
 {
     iPort.close();
     oPort.close();
     bPort.close();
     return true;
 }
Ejemplo n.º 5
0
 bool close()
 {
     rpcPort.close();
     iPort.close();
     oPort.close();
     return true;
 }
Ejemplo n.º 6
0
 virtual bool close()
 {
    portImgIn.close();
    portImgOut.close();
    cvReleaseImage(&_mapx);
    cvReleaseImage(&_mapy);
    return true;
 };
Ejemplo n.º 7
0
 /*
 * Close function, to perform cleanup.
 */
 bool close()
 {
     cout<<"Calling close function\n";
     handlerPort.close();
     gazeIn.interrupt();
     gazeIn.close();
     speechOut.close();
     return true;
 }
Ejemplo n.º 8
0
    bool close()
    {
        imgInPort.close();
        imgOutPort.close();
        dataOutPort.close();
        rpcPort.close();

        return true;
    }
    bool close()
    {
        if (!portOut.isClosed())
            portOut.close();

        if (!portIn.isClosed())
            portIn.close();

        return true;
    }
Ejemplo n.º 10
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;
 }
Ejemplo n.º 11
0
 bool close()
 {
     portDispIn.close();
     portDispOut.close();
     portOutPoints.close();
     portImgIn.close();
     portContour.close();
     portSFM.close();
     portRpc.close();
     return true;
 }
Ejemplo n.º 12
0
void sigproc(int sig){
  signal(SIGINT, sigproc); /*  */
  /* NOTE some versions of UNIX will reset signal to default
     after each call. So for portability reset signal each time */

  cout << " * Exiting now!" << endl;
  LocalAdminOutPort.close();
  LocalAdminInPort.close();
  Network::fini();
  cout << "*******************************" << endl;
  exit(0);
}
Ejemplo n.º 13
0
    virtual void threadRelease()
    {
        if (I)
            delete I;

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

        qdPort.close();
        voPort.close();
        qoPort.close();
    }
Ejemplo n.º 14
0
    bool close()
    {        
        // Close ports
        rpcPort.close();

        imInPort.close();
        imOutPort.close();
        tempOutPort.close();
        coordsInPort.close();
        trackInPort.close();
        coordsOutPort.close();

        return true;
    }
Ejemplo n.º 15
0
        bool interruptModule()
        {
            Network::unregisterContact(gtw_contactTactileLeftInputPort);
            Network::unregisterContact(gtw_contactTactileRightInputPort);
            Network::unregisterContact(gtw_contactTactileLeftOutputPort);
            Network::unregisterContact(gtw_contactTactileRightOutputPort);

            gtw_tactileLeftInputPort.close();
            gtw_tactileRightInputPort.close();
            gtw_tactileLeftOutputPort.close();
            gtw_tactileRightOutputPort.close();

            return true;
        }
Ejemplo n.º 16
0
void sigproc(int sig) {
    signal(SIGINT, sigproc); /*  */
    /* NOTE some versions of UNIX will reset signal to default
       after each call. So for portability reset signal each time */

    cout << " * Exiting now!" << endl;
    toRessacPositionPort.close();
    toRessacVelocityPort.close();
    toRessacAttitudePort.close();
    toTargetPositionPort.close();
    toTargetVelocityPort.close();
    Network::fini();
    cout << "*******************************" << endl;
    exit(0);
}
Ejemplo n.º 17
0
    bool close()
    {
        igaze->restoreContext(startup_context_gaze);
        drvGaze.close();

        iarm->restoreContext(startup_context_arm);
        drvArm.close();

        imgLPortIn.close();
        imgRPortIn.close();
        imgLPortOut.close();
        imgRPortOut.close();
        rpcPort.close();
        return true;
    }
Ejemplo n.º 18
0
    /*
    * Close function, to perform cleanup.
    */
    bool close()
    {
        vergencePort.close();
		handlerPort.close();
		suspendPort.close();
		return true;
    }
Ejemplo n.º 19
0
    bool close()
    {
        // Terminate model
        Controller_terminate(Controller_M);

        imod->setControlMode(joint,VOCAB_CM_POSITION);
        if (compliant)
            iint->setInteractionMode(joint,VOCAB_IM_STIFF);
        
        rpc.close();
        dataOut.close();
        dataIn.close();        
        drv.close();

        return true;
    }
Ejemplo n.º 20
0
    bool acquirePoints(int &file_provided, ResourceFinder &rf)
    {
        if(file_provided==1)
        {
            if (!rf.check("pointCloudFile"))
            {
                yError()<<"point clouds file not provided!";
                return false;
            }

            pointCloudFileName=rf.find("pointCloudFile"). asString().c_str();

            ifstream pointCloudFile(pointCloudFileName.c_str());
            if (!pointCloudFile.is_open())
            {
                yError()<<"problem opening point clouds file!";
                pointCloudFile.close();
                return false;
            }

            if (!readPoints(pointCloudFile))
            {
                yError()<<"problem reading point clouds file!";
                pointCloudFile.close();
                return false;
            }

            pointCloudFile.close();

        }
        else
        {
            cout<<"point_cloud is reading from port..."<<endl;
            Bottle *pointIn=portInPoints.read(true);
              if (pointIn!=NULL)
              {
                  int bsize=pointIn->size();
                  cout<<"size of bottle received:  "<<bsize<<endl;
                  for(size_t i=0; i<bsize; i++)
                  {
                      Bottle *pointList=pointIn->get(i).asList();

                      point[0]=pointList->get(0).asDouble();
                      point[1]=pointList->get(1).asDouble();
                      point[2]=pointList->get(2).asDouble();

                      point_cloud.push_back(point);
                      cout<<"point received "<<point.toString().c_str()<<endl;

                       nPointsC++;
                  }
                  cout<<"points acquired " << nPointsC<<endl;
                  return true;
               }

            portInPoints.close();

             }
        }
Ejemplo n.º 21
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;
	}
Ejemplo n.º 22
0
 bool close()
 {
     // order does matter!
     imageInPort.close();
     coordPort.close();        
     imageOutPort.close();
     return true;
 }
Ejemplo n.º 23
0
    bool close()
    {        
        // Close ports
        inVec.close();
        printf("inVec closed\n");
        
        pred.close();
        printf("pred closed\n");
        
        perf.close();
        printf("perf closed\n");
        
        rpcPort.close();
        printf("rpcPort closed\n");

        return true;
    }
Ejemplo n.º 24
0
    bool close() {
        if (action != NULL)
            delete action;

        inPort.close();
        rpcPort.close();

        return true;
    }
 bool close() {
     port.close();
     mutex.wait(); // onRead never gets called again once it finishes
     
     //free the memory that's been mapped to write the audio data
     munmap(mappedAudioData,kMappedFileSize_samples*sizeof(short));
     
     return true;
 }
Ejemplo n.º 26
0
    void terminate()
    {

        imgInPort.close();
        imgOutPort.close();
        dataInPort.close();     // close prior to shutting down motor-interfaces
        logPort.close();
        rpcPort.close();

        if (drvArmL.isValid())
            drvArmL.close();

        if (drvArmR.isValid())
            drvArmR.close();

        if (drvGaze.isValid())
            drvGaze.close();
    }
Ejemplo n.º 27
0
JNIEXPORT jboolean JNICALL Java_com_alecive_yarpdroid_yarpviewFragment_destroyBufferedImgPortL
  (JNIEnv *env, jobject obj)
{
    __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, "I'm destroying the image port");
    BufferedPort<ImageOf<PixelRgb> >  *ImgPortL = getHandle<BufferedPort<ImageOf<PixelRgb> >  >(env, javaObj, "viewLeftHandle");
    ImgPortL->close();
    delete ImgPortL;
    ImgPortL = 0;
    return (jboolean)true;
}
Ejemplo n.º 28
0
 bool close()
 {
     rpcPort.interrupt();
     rpcPort.close();
     dumpPort.interrupt();
     dumpPort.close();
     opc.interrupt();
     opc.close();
     return true;
 }
Ejemplo n.º 29
0
    void terminate()
    {
        if (!imgInPort.isClosed())
            imgInPort.close();

        if (!imgOutPort.isClosed())
            imgOutPort.close();

        if (drvGaze.isValid())
            drvGaze.close();

        if (drvCart.isValid())
            drvCart.close();

        if (drvArm.isValid())
            drvArm.close();

        if (drvAnalog.isValid())
            drvAnalog.close();
    }
Ejemplo n.º 30
0
    bool close()
    {
        if(meas_given!=1)
        {
            portIn.close();
            rpcOut.close();
        }
        rpcPort.close();
        return true;

    }