赞
踩
https://blog.csdn.net/woshigaowei5146/article/details/128443892?spm=1001.2014.3001.5501
虚拟机:VMware
Ubuntu:20.04LTS
Tango:9.3.5
启动Tango,jive,pogo,astor
sudo /usr/local/tango/bin/tango start
/usr/local/tango/bin/jive &
/usr/local/tango/bin/pogo &
/usr/local/tango/bin/astor &
后来发现pogo经常出现加载不出来的情况。但是偶尔会有一次可以打开,暂未找到规律,随机事件。
https://github.com/tango-controls/pogo/issues/83
在Pogo中定义类及变量
File-Export package,检查所有的headers。该工具将创建一个包含packages的新文件夹。
File -> Generate 点击 OK。
cd packaging
./autogen.sh
./configure --prefix=$HOME/packaging
make
make install
如果报错:./autogen.sh: 3: autoreconf: not found
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install libtool
https://www.iteye.com/blog/shangxun-1938687
如果提示:Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.,在bashrc添加:并重新configure
export PKG_CONFIG_PATH=/usr/local/tango/lib/pkgconfig
如果一切正常,您将在src目录中看到这些文件:
打开 Jive - Edit -> Create Server
填写如下表格:
TangoQuickStart/test
TangoQuickStart
training-laboratory/quick-start/0
点击 Register server.
为了启动设备,使用命令行,转到编译c++类的文件夹
cd packaging/src/
使用下面的命令:
<TangoClassName> <instance>
TangoClassName是Pogo和Jive创建的类名称,instance 是TANGO数据库的实例名称(在Jive创建)
输入:
./TangoQuickStart test
修改 TangoQuickStart.cpp:主要是增加:set_state(Tango::RUNNING);
/*----- PROTECTED REGION ID(TangoQuickStart.cpp) ENABLED START -----*/ //============================================================================= // // file : TangoQuickStart.cpp // // description : C++ source for the TangoQuickStart class and its commands. // The class is derived from Device. It represents the // CORBA servant object which will be accessed from the // network. All commands which can be executed on the // TangoQuickStart are implemented in this file. // // project : test // // This file is part of Tango device class. // // Tango is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Tango is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Tango. If not, see <http://www.gnu.org/licenses/>. // // // //============================================================================= // This file is generated by POGO // (Program Obviously used to Generate tango Object) //============================================================================= #include <TangoQuickStart.h> #include <TangoQuickStartClass.h> /*----- PROTECTED REGION END -----*/ // TangoQuickStart.cpp /** * TangoQuickStart class description: * test description */ //=====&#
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。