当前位置: 首页>>代码示例>>C++>>正文


C++ PolyDriver::close方法代码示例

本文整理汇总了C++中PolyDriver::close方法的典型用法代码示例。如果您正苦于以下问题:C++ PolyDriver::close方法的具体用法?C++ PolyDriver::close怎么用?C++ PolyDriver::close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PolyDriver的用法示例。


在下文中一共展示了PolyDriver::close方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: threadRelease

	virtual void threadRelease() {

		/* Stop and close ports */
		cportL->interrupt();
		cportR->interrupt();
		susPort->interrupt();

		cportL->close();
		cportR->close();
		susPort->close();

		delete cportL;
		delete cportR;
		delete susPort;

		/* stop motor interfaces and close */
		gaze->stopControl();
		clientGazeCtrl.close();
		carm->stopControl();
		clientArmCart.close();

		robotTorso.close();
		robotHead.close();
		robotArm.close();

	}
开发者ID:oosuagwu,项目名称:uiuc-lar,代码行数:26,代码来源:objectMover.cpp

示例2: close

    bool close()
    {
        if (serverArmR.isValid())
            serverArmR.close();

        if (serverArmL.isValid())
            serverArmL.close();

        if (serverLegR.isValid())
            serverLegR.close();

        if (serverLegL.isValid())
            serverLegL.close();

        if (torso.isValid())
            torso.close();

        if (armR.isValid())
            armR.close();

        if (armL.isValid())
            armL.close();

        if (legR.isValid())
            legR.close();

        if (legL.isValid())
            legL.close();

        return true;
    }
开发者ID:apaikan,项目名称:icub-main,代码行数:31,代码来源:main.cpp

示例3: close

    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;
    }
开发者ID:miladmalekzadeh,项目名称:iCub-course-exam,代码行数:15,代码来源:main.cpp

示例4: close

    //********************************************
    bool close()
    {
        yInfo("[demoAvoidance] Closing module..");

        dataPort.close();

        if (useLeftArm)
        {
            if (driverCartL.isValid())
            {
                data["left"].iarm->stopControl();
                data["left"].iarm->restoreContext(contextL);
                driverCartL.close();
            }

            if (driverJointL.isValid())
            {
                IInteractionMode *imode;
                driverJointL.view(imode);
                for (int j=0; j<5; j++)
                    imode->setInteractionMode(j,VOCAB_IM_STIFF);

                driverJointL.close();
            }
        }

        if (useRightArm)
        {
            if (driverCartR.isValid())
            {
                data["right"].iarm->stopControl();
                data["right"].iarm->restoreContext(contextR);
                driverCartR.close();
            }

            if (driverJointR.isValid())
            {
                IInteractionMode *imode;
                driverJointR.view(imode);
                for (int j=0; j<5; j++)
                    imode->setInteractionMode(j,VOCAB_IM_STIFF);

                driverJointR.close();
            }
        }

        return true;
    }
开发者ID:robotology,项目名称:peripersonal-space,代码行数:49,代码来源:demoAvoidance.cpp

示例5: close

    bool close()
    {
        if (driver.isValid())
            driver.close();

        return true;
    }
开发者ID:robotology,项目名称:icub-tutorials,代码行数:7,代码来源:main.cpp

示例6: threadRelease

    void threadRelease()
    {
        printf("ControlThread:stopping the robot\n");
        
        ivel->stop();

        dd.close();

        printf("Done, goodbye from ControlThread\n");
    }
开发者ID:robotology,项目名称:icub-tutorials,代码行数:10,代码来源:tutorial_periodic_thread.cpp

示例7: close

    bool close()
    {
        driver.close();

        Property options;
        model->toProperty(options);
        fprintf(stdout,"model options: %s\n",options.toString().c_str());
        
        return true;
    }
开发者ID:apaikan,项目名称:icub-main,代码行数:10,代码来源:main.cpp

示例8: terminate

    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();
    }
开发者ID:pattacini,项目名称:icub-contrib,代码行数:20,代码来源:main.cpp

示例9: close

    //********************************************
    bool close()
    {
        dataPort.close();

        if (driverCartL.isValid())
        {
            data["left"].iarm->stopControl();
            data["left"].iarm->restoreContext(contextL);
            driverCartL.close(); 
        }

        if (driverCartR.isValid())
        {
            data["right"].iarm->stopControl();
            data["right"].iarm->restoreContext(contextR);
            driverCartR.close();
        }

        if (driverJointL.isValid())
        {
            IInteractionMode *imode;
            driverJointL.view(imode);
            for (int j=0; j<5; j++)
                imode->setInteractionMode(j,VOCAB_IM_STIFF);

            driverJointL.close();
        }

        if (driverJointR.isValid())
        {
            IInteractionMode *imode;
            driverJointR.view(imode);
            for (int j=0; j<5; j++)
                imode->setInteractionMode(j,VOCAB_IM_STIFF);

            driverJointR.close();
        }

        return true;
    }
开发者ID:towardthesea,项目名称:peripersonal-space,代码行数:41,代码来源:demoAvoidance.cpp

示例10: close

    virtual bool close()
    {
        yInfo("Closing module [%s]\n", partName);
        pThread->stop();
        pThread->halt();
        delete pThread;
        yInfo("Thread [%s] stopped\n", partName);

        driver.close();
        rpc_port.close();

        yInfo("Module [%s] closed\n", partName);
        return true;
    }
开发者ID:AbuMussabRaja,项目名称:icub-main,代码行数:14,代码来源:main.cpp

示例11: close

    virtual bool close()
    {
        yInfo("Stopping dumper class\n");
        for(int i = 0; i < nData; i++)
            myDumper[i].stop();

        yInfo("Deleting dumper class\n");
        delete[] myDumper;

        //finally close the dd of the remote control board
        yInfo("Closing the device driver\n");
        if (ddBoard.isValid()) ddBoard.close();
        yInfo("Device driver closed\n");

        //finally close the dd of the debug interface clien
        yInfo("Closing the debug interface\n");
        if (ddDebug.isValid()) ddDebug.close();
        yInfo("Debug interface closed\n");

        delete[] thetaMap;
        delete[] dataToDump;
        return true;
    }
开发者ID:robotology,项目名称:icub-main,代码行数:23,代码来源:main.cpp

示例12: close

    virtual bool close()
    {
        fprintf(stderr, "Closing module [%s]\n", partName);
        vc->stop();
        vc->halt();
        delete vc;
        fprintf(stderr, "Thead [%s] stopped\n", partName);

        driver.close();
        input_port.close();

        fprintf(stderr, "Module [%s] closed\n", partName);

        return true;
    }
开发者ID:serena-ivaldi,项目名称:iCub_crawling_old,代码行数:15,代码来源:main.cpp

示例13: close

    bool close()
    {
        iarm->stopControl();
        iarm->restoreContext(startup_context);
        drvCart.close();

        ivel->stop(joints.size(),joints.getFirst());
        for (size_t i=0; i<modes.size(); i++)
            modes[i]=VOCAB_CM_POSITION;
        imod->setControlModes(joints.size(),joints.getFirst(),modes.getFirst());
        drvHand.close();

        if (simulator)
        {
            Bottle cmd,reply;
            cmd.addString("world");
            cmd.addString("del");
            cmd.addString("all");
            simPort.write(cmd,reply);

            simPort.close();
        }

        if (gaze)
        {
            igaze->stopControl();
            drvGaze.close();
        }

        igeo->stopFeedback();
        igeo->setTransformation(eye(4,4));
        drvGeomagic.close();
        forceFbPort.close();

        return true;
    }
开发者ID:robotology,项目名称:haptic-devices,代码行数:36,代码来源:main.cpp

示例14: close

    bool close()
    {
        printMessage(0,"Closing stuff..\n");
        igaze -> restoreContext(contextGaze);
        igaze -> stopControl();
        drvGaze.close();

        ictrl -> setPositionMode(0);
        ictrl -> setPositionMode(1);
        ictrl -> setPositionMode(2);
        ictrl -> setPositionMode(3);
        ictrl -> setPositionMode(2);
        ictrl -> setPositionMode(4);
        drvArm.close();

        iarm -> restoreContext(contextCart);
        iarm -> stopControl();
        drvCart.close();

        delete detectorL;
        detectorL = 0;

        return true;
    }
开发者ID:alecive,项目名称:demoINNOROBO,代码行数:24,代码来源:demoINNOROBO.cpp

示例15: threadRelease

    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();
    }
开发者ID:xufango,项目名称:contrib_bk,代码行数:24,代码来源:main.cpp


注:本文中的PolyDriver::close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。