• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setting函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setting函数的典型用法代码示例。如果您正苦于以下问题:C++ setting函数的具体用法?C++ setting怎么用?C++ setting使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: setting

static char *wallet_filename(void)
{
	char *filename = setting("wallet");
	if (!filename)
		filename = setting("w");
	return filename;
}
开发者ID:Artogn,项目名称:picocoin,代码行数:7,代码来源:wallet.c


示例2: init_peers

static void init_peers(struct net_child_info *nci)
{
	/*
	 * read network peers
	 */
	struct peer_manager *peers;

	peers = peerman_read();
	if (!peers) {
		fprintf(plog, "net: initializing empty peer list\n");

		peers = peerman_seed(setting("no_dns") == NULL ? true : false);
		if (!peerman_write(peers)) {
			fprintf(plog, "net: failed to write peer list\n");
			exit(1);
		}
	}

	char *addnode = setting("addnode");
	if (addnode)
		peerman_addstr(peers, addnode);

	peerman_sort(peers);

	if (debugging)
		fprintf(plog, "net: have %u/%zu peers\n",
			bp_hashtab_size(peers->map_addr),
			clist_length(peers->addrlist));

	nci->peers = peers;
}
开发者ID:gitter-badger,项目名称:picocoin,代码行数:31,代码来源:brd.c


示例3: loadSamples

void loadSamples(const char* sndDir, const char* musicFile)
{
  loadSample( packGetFile(sndDir,"click.ogg"), SND_CLICK );
  loadSample( packGetFile(sndDir,"brickmove.ogg"), SND_BRICKMOVE );
  loadSample( packGetFile(sndDir,"brickgrab.ogg"), SND_BRICKGRAB );
  loadSample( packGetFile(sndDir,"brickbreak.ogg"), SND_BRICKBREAK );
  loadSample( packGetFile(sndDir,"scoretick.ogg"), SND_SCORECOUNT );
  loadSample( packGetFile(sndDir,"countdown.ogg"), SND_COUNTDOWNTOSTART );
  loadSample( packGetFile(sndDir,"start.ogg"), SND_START );
  loadSample( packGetFile(sndDir,"timeout.ogg"), SND_TIMEOUT );
  loadSample( packGetFile(sndDir,"victory.ogg"), SND_VICTORY );
  loadSample( packGetFile(sndDir,"timeout.ogg"), SND_TIMEOUT );
  loadSample( packGetFile(sndDir,"onewaymove.ogg"), SND_ONEWAY_MOVE );
  loadSample( packGetFile(sndDir,"teleported.ogg"), SND_TELEPORTED );
  loadSample( packGetFile(sndDir,"switchactivate.ogg"), SND_SWITCH_ACTIVATED );
  loadSample( packGetFile(sndDir,"switchinactive.ogg"), SND_SWITCH_DEACTIVATED );
  loadSample( packGetFile(sndDir,"brickswap.ogg"), SND_BRICKSWAP );
  loadSample( packGetFile(sndDir,"brickcopy.ogg"), SND_BRICKCOPY );
  loadSample( packGetFile(sndDir,"brickswapdenied.ogg"), SND_BRICKSWAP );
  loadSample( packGetFile(sndDir,"brickcopydenied.ogg"), SND_BRICKCOPY );
  loadSample( packGetFile(sndDir, "winner.ogg"), SND_WINNER);
  loadSample( packGetFile(sndDir, "loser.ogg"), SND_LOSER);

  //Music load code
  if(setting()->disableMusic) return;
  if( !musicFile ) return;

  //Load ingame song if not allready loaded.
  if(strcmp(lastLoadedSongFn, packGetFile("./",musicFile))!=0 && !setting()->userMusic)
  {
    //Free old song if loaded.
    if(mus[1])
    {
      Mix_FreeMusic(mus[1]);
    }
    strcpy(lastLoadedSongFn, packGetFile("./",musicFile));
    mus[1]=Mix_LoadMUS( lastLoadedSongFn );
    if(!mus[1])
      printf("Couldn't load music: '%s'\n",packGetFile("./",musicFile));

    mPos[1] = 0.0f;

    if( !Mix_PlayingMusic() )
    {
      Mix_FadeInMusicPos(mus[1], -1, MUSIC_FADETIME,mPos[1]);
    }
  }

}
开发者ID:DusteDdk,项目名称:Wizznic,代码行数:49,代码来源:sound.c


示例4: switch_keys

static void switch_keys() {
	rotated = TRUE;

	if (n_keyset < 1) {
		plugin_print("mcp game", "cannot switch CD key set (no key sets loaded)\n");
		return;
	}

	i_keyset = (i_keyset + 1) % n_keyset;

	plugin_print("mcp game", "switching to CD key set %i\n", i_keyset + 1);

	strcpy(setting("ClassicKey")->s_var, keyset[i_keyset].classic);
	strcpy(setting("ExpansionKey")->s_var, keyset[i_keyset].expansion);
}
开发者ID:Bigorneau,项目名称:motoko,代码行数:15,代码来源:mcp_game.c


示例5: locker

//-------------------------------------------------------------------------------------------------
void tNdp2kTableDataSources::OnMyRowChanged( int row )
{
    tDataType dataType;
    tSourceSelections selections;
    {
        tQMutexLocker locker( &m_Lock );
        if (row >= m_Table.count())
            return;
        dataType = m_Table[ row ].dataType;
        selections = m_Table[ row ].selections;
    }

    if (row < m_DefaultFormatRows && m_ShareChanges == true)
    {
        tDataType type = m_pDefaultFormatTypes[ row ];
        Assert( type == dataType );
        eDigitalDataSourceSettingId settingID =  m_pSourceSettings->DataTypeToSettingId( type );
        if (m_pSourceSettings->SettingIdToDataType( settingID ) == type)
        {
            tDigitalDataSourceSettings::tGlobalSetting setting(*m_pSourceSettings);
            setting.SetDataSourceList( selections );
            setting.Save( settingID, eDDSFrom_Table );
        }
    }
    Settings().SetValue( QString::number(row), ToVariant( dataType, selections ) );
}
开发者ID:dulton,项目名称:53_hero,代码行数:27,代码来源:tNdp2kTableDataSources.cpp


示例6: SetFormat

//---------------------------------------------------------------------------------------
void tNdp2kTableDataSources::LoadFromGlobalSettings()
{
    SetFormat( m_DefaultFormat );

    int errors = 0;
    m_Table.resize( m_DefaultFormatRows );
    for (int row = 0; row < m_DefaultFormatRows; ++row)
    {
        tDataType type = m_pDefaultFormatTypes[row];
        eDigitalDataSourceSettingId settingID = m_pSourceSettings->DataTypeToSettingId( type );

        tRow& info = m_Table[ row ];
        info.dataType = type;
        info.dirty = false;

        bool ok = false;
        if (m_pSourceSettings->SettingIdToDataType( settingID ) == type)
        {
            tDigitalDataSourceSettings::tGlobalSetting setting(*m_pSourceSettings);
            if (setting.Load( settingID ))
            {
                info.selections = setting.DataSourceList();
                ok = true;
            }
        }
        if (ok == false)
        {
            info.selections = tSourceSelections();
            ++errors;
        }
    }
}
开发者ID:dulton,项目名称:53_hero,代码行数:33,代码来源:tNdp2kTableDataSources.cpp


示例7: setting

void CopySenderServer::loadCompressPath(){
    QSettings setting("settings.ini",QSettings::IniFormat);
    //grouping the settings
    setting.beginGroup("FileCopy");

    //default settings values
    QVariant defaultfileCompressPath;
    QString theDefaultPathCompress = "buildCompressed";
    defaultfileCompressPath.setValue(theDefaultPathCompress);

    //send in the default values in case it does not exist...
    QString loadedFileCompressPath = setting.value("fileCompressPath", defaultfileCompressPath).toString();

    setting.endGroup();

    if(!QDir(loadedFileCompressPath).exists()){
        //firstly try and create that directory...
        bool successCreate = QDir().mkdir(loadedFileCompressPath);
        //...if it fails, revert to default
        if(!successCreate){
            fileCompressPath = "buildCompressed";
            QDir().mkdir(fileCompressPath);
        }
    }
    else{
        fileCompressPath = loadedFileCompressPath;
    }
}
开发者ID:hhvvkk,项目名称:COS301DistrobutedApplicationManger,代码行数:28,代码来源:copysenderserver.cpp


示例8: QChar

void MainPage::init(){
    this->man = NULL;
    ToolUtil::initStyle(this);
    IconHelper::Instance()->SetIcon(ui->btnMenu_Close, QChar(0xf00d), 10);
    IconHelper::Instance()->SetIcon(ui->btnMenu_Min, QChar(0xf068), 10);
    IconHelper::Instance()->SetIcon(ui->btnMenu, QChar(0xf0c9), 10);
//    IconHelper::Instance()->Set(ui->lab_Ico, QChar(0xf19c), 12);
    IconHelper::Instance()->SetBackground(ui->lab_Ico, "logo.png");

    main_menu = new MainMenu();
    icon_menu = new IconMenu();

    //信号量注册
    connect(ui->bt_quit,SIGNAL(clicked()),this,SLOT(userLogout()));

    /***********menu slot****************/
    connect(main_menu,SIGNAL(setting()),this,SLOT(menuSetting()));
    connect(main_menu,SIGNAL(aboutus()),this,SLOT(menuAboutus()));

    connect(icon_menu,SIGNAL(login()),this,SLOT(menuLogin()));
    connect(icon_menu,SIGNAL(logout()),this,SLOT(userLogout()));
    connect(icon_menu,SIGNAL(min()),this,SLOT(on_btnMenu_Min_clicked()));
    connect(icon_menu,SIGNAL(useradd()),this,SLOT(userAdd()));
    connect(icon_menu,SIGNAL(clo()),this,SLOT(close()));
    connect(icon_menu,SIGNAL(pwdchange()),this,SLOT(menuPwdChange()));

    /*********login************/
    this->showLoginDlg();
}
开发者ID:DingYong4223,项目名称:EConnect,代码行数:29,代码来源:mainpage.cpp


示例9: setting

/**
 * Updates preferences
 */
void MainWindow::updatePreferences()
{
    QSettings setting("rk", "scribo");
    setting.beginGroup("writing");

    QString style = "#textEdit_mainWindow_surface { margin: " +
            setting.value("marginTop", 35).toString() +
            " " +
            setting.value("marginRight", 35).toString() +
            " " +
            setting.value("marginBottom", 0).toString() +
            " " +
            setting.value("marginLeft", 35).toString() + "; " +
            "padding: " +
            setting.value("paddingTop", 20).toString() +
            " " +
            setting.value("paddingRight", 20).toString() +
            " " +
            setting.value("paddingBottom", 0).toString() +
            " " +
            setting.value("paddingLeft", 20).toString() +
            "; background: " +
            "rgb(" +
                setting.value("red", 255).toString() + "," +
                setting.value("green", 255).toString() + "," +
                setting.value("blue", 255).toString() + "); " +
            "}";
    ui->textEdit_mainWindow_surface->setStyleSheet(style);
    passwordUsed = setting.value("passwordUsed", false).toBool();
    setting.endGroup();
}
开发者ID:1cy1c3,项目名称:scribo,代码行数:34,代码来源:mainwindow.cpp


示例10: main

int main(int argc, char** argv)
{
    Application app(argc, argv);
    if (!app.parseArgs()) {
        qDebug() << "Wrong usage!";
        return 42;
    }

#ifdef Q_OS_LINUX
//    int d = daemon(0, 0);
//    Q_UNUSED(d);
#endif

    QString pathToConfig = app.config();

    if (app.logFile().size()) {
        if (Logger::configure(app.logFile()))
            qInstallMessageHandler(Logger::logger);
        else
            qDebug() << "Log file not been set";
    }

    Settings setting(pathToConfig);
    pSaver saver;
    pThreadPool pool(Settings::threads());

    pServer server;

    app.exec();
}
开发者ID:AnatolyRugalev,项目名称:Pastexen,代码行数:30,代码来源:main.cpp


示例11: do_start_document

 void do_start_document(const Settings& settings)
 {
   seen_root_ = false;
   settings_ = settings;
   if(setting("indent") == "yes")
     indent_ = 0;
 } // do_start_document
开发者ID:KITSVictorGubin,项目名称:jornal,代码行数:7,代码来源:xslt_sink.hpp


示例12: setting

bool Configuration::loadConfig(QString& path){
    QSettings setting(path, QSettings::IniFormat);
    setting.sync();
    this->threads_num_ = setting.value("settings/threads_num",0).toInt();
    this->queue_size_ = setting.value("settings/queue_size",0).toInt();
    this->servers_nb_ = setting.value("settings/servers_number",0).toInt();
    this->DBServers_nb_ = setting.value("settings/servers_DB_number",0).toInt();
    this->interval_ = setting.value("master_settings/interval",0).toInt();
    for(int i = 1; i<=this->servers_nb_ + this->DBServers_nb_; ++i) {
        QString ip = setting.value("serwer"+QString::number(i)+"/ip","0.0.0.0").toString();
        int portExt = setting.value("serwer"+QString::number(i)+"/portExt", 0).toInt();
        int portDB = setting.value("serwer"+QString::number(i)+"/portDB", 0).toInt();
        int portClient = setting.value("serwer"+QString::number(i)+"/portClient", 0).toInt();
        QString stype = setting.value("serwer"+QString::number(i)+"/type","srv").toString();
        SrvType type;
        if(stype == "srv"){
            type = SrvType::SRV;
        }
        else{
            if(stype == "db"){
                type = SrvType::DB;
            }
        }
        QString pubKey = setting.value("serwer"+QString::number(i)+"/key","").toString();
        SServer srv(i, ip, portExt, portDB, portClient, pubKey, type);

        addServer(srv);
    }
}
开发者ID:Gonz8,项目名称:RSO-16L,代码行数:29,代码来源:configuration.cpp


示例13: listWidget_show

void NetEin:: listWidget_show()
{
extern int dialog_auswertung;
int row = 1;
QString key_;
QString key;
QStringList comNet_;
    key = " ";
    row = listWidget_net->currentRow();
    comNet = widget_net[row];
    if (comNet.indexOf(" ") != -1){
    comNet_ = comNet.split(" ");
    comNet = comNet_[0];
    comNet_name = comNet_[1];}
    else
         comNet_name = "";
    // Prüfen ob Daten in setting
   QSettings setting("qt5-fsarchiver", "qt5-fsarchiver");
   setting.beginGroup(comNet_name);
   user = setting.value("Name").toString();
   key_ = setting.value("key").toString();
   setting.endGroup();
   //Netzwerk-Daten in Textfeld eintragen
   //key entschlüsseln 
   key = decrypt(key_);
   dummykey = key;
   txt_user ->setText(user);
   txt_key ->setText(key);
}
开发者ID:DieterBaum,项目名称:qt5-fsarchiver,代码行数:29,代码来源:net_ein.cpp


示例14: QTcpServer

Server::Server(Management *m,QObject *parent) :
    QTcpServer(parent),
    management(m)
{
    QSettings setting("settings.ini",QSettings::IniFormat);
    //grouping the settings
    setting.beginGroup("Connection");

    //default settings values
    QVariant defaultPort;
    defaultPort.setValue(4450);

    //send in the default values in case it does not exist...
    QString loadedPort = setting.value("port", defaultPort).toString();

    setting.endGroup();

    bool validPort;
    int aPort = loadedPort.toInt(&validPort);

    if(!validPort) {
        showMessage("The loaded port a valid number(1024-65000), reverting to default(4450)", "error");
        port = 4450;
    } else {
        if(aPort >= 1024 && aPort <= 65000)
            port = aPort;
        else {
            showMessage("The loaded port was not within range(1024-65000), reverting to default(4450)", "error");
            port = 4450;
        }
    }
}
开发者ID:hhvvkk,项目名称:COS301DistrobutedApplicationManger,代码行数:32,代码来源:server.cpp


示例15: do_register_setting

		i_setting::id_type do_register_setting(const string& aSettingCategory, const string& aSettingName, simple_variant::type_e aSettingType, const simple_variant& aDefaultValue = simple_variant(), bool aHidden = false)
		{
			setting_by_name_list::iterator iterCheck = iSettingsByName.find(setting_by_name_list::key_type(aSettingCategory, aSettingName));
			if (iterCheck != iSettingsByName.end())
				throw setting_already_registered();
			simple_variant currentValue = aDefaultValue;
			if (iStore.get() != 0)
			{
				xml::element::iterator xmlIterCategory = iStore->root().find(aSettingCategory.c_str());
				if (xmlIterCategory != iStore->root().end())
				{
					xml::element::iterator xmlIterSetting = xmlIterCategory->find(aSettingName.c_str());
					if (xmlIterSetting != xmlIterCategory->end())
					{
						if (aSettingType != i_simple_variant::CustomType)
							currentValue = from_string(xmlIterSetting->attribute_value("value"), aSettingType);
						else
						{
							string valueType = xmlIterSetting->attribute_value("type");
							string valueData = xmlIterSetting->attribute_value("value");
							currentValue = simple_variant(auto_ref<i_custom_type>(iCustomSettingTypeFactory->create(valueType, valueData)));
						}
					}
				}
			}
			setting_list::iterator iter = iSettings.insert(setting(*this, iNextSettingId++, aSettingCategory, aSettingName, aSettingType, currentValue, aHidden));
			iSettingsByName[std::pair<string, string>(aSettingCategory, aSettingName)] = iter->id();
			return iter->id();
		}
开发者ID:AndreasMartin72,项目名称:neolib,代码行数:29,代码来源:settings.hpp


示例16: QWidget

QSimpleDownloader::QSimpleDownloader(QWidget *parent)
    : QWidget(parent)
{
    labelUrl = new QLabel(tr("&URL:"));
    labelUrl->setFixedWidth(60);
    labelUrl->setAlignment(Qt::AlignRight);
    editUrl = new QLineEdit();
    labelUrl->setBuddy(editUrl);
    QHBoxLayout *topLayout = new QHBoxLayout();
    topLayout->addWidget(labelUrl);
    topLayout->addWidget(editUrl);

    labelSaveTo = new QLabel(tr("&Save To:"));
    labelSaveTo->setFixedWidth(60);
    labelSaveTo->setAlignment(Qt::AlignRight);
    editSaveTo = new QLineEdit();
    labelSaveTo->setBuddy(editSaveTo);
    btnBrowse = new QPushButton(tr("&Browse..."));
    QHBoxLayout *midLayout = new QHBoxLayout();
    midLayout->addWidget(labelSaveTo);
    midLayout->addWidget(editSaveTo);
    midLayout->addWidget(btnBrowse);

    btnSetting = new QPushButton(tr("Se&tting..."));
    btnAbout = new QPushButton(tr("&About..."));
    btnAboutQt = new QPushButton(tr("About &Qt..."));
    btnAboutQt->setStatusTip(tr("Show the Qt library's About box"));
    btnDownload = new QPushButton(tr("&Download"));
    btnExit = new QPushButton(tr("E&xit"));
    QHBoxLayout *midLayout2 = new QHBoxLayout();
    midLayout2->addWidget(btnSetting);
    midLayout2->addWidget(btnAbout);
    midLayout2->addWidget(btnAboutQt);
    midLayout2->addStretch();
    midLayout2->addWidget(btnDownload);
    midLayout2->addWidget(btnExit);

    outputList = new QListWidget();

    QVBoxLayout *mainLayout = new QVBoxLayout();
    mainLayout->addLayout(topLayout);
    mainLayout->addLayout(midLayout);
    mainLayout->addLayout(midLayout2);
    mainLayout->addWidget(outputList);
    setLayout(mainLayout);

    setWindowTitle(tr("Qt Simple Downloader"));
    this->resize(600, 480);

    optionDlg = new OptionDlg(this);
    optionDlg->setWindowTitle(tr("Option"));
    optionDlg->resize(480, 320);

    connect(btnBrowse, SIGNAL(clicked()), this, SLOT(browse()));
    connect(btnSetting, SIGNAL(clicked()), this, SLOT(setting()));
    connect(btnAbout, SIGNAL(clicked()), this, SLOT(about()));
    connect(btnAboutQt, SIGNAL(clicked()), qApp, SLOT(aboutQt()));
    connect(btnDownload, SIGNAL(clicked()), this, SLOT(download()));
    connect(btnExit, SIGNAL(clicked()), this, SLOT(close()));
}
开发者ID:yuanjian113,项目名称:qt,代码行数:60,代码来源:QSimpleDownloader.cpp


示例17: tr

void QSimpleDownloader::download()
{
    if(jobScheduler.isRunning()) {
        jobScheduler.stop();
        btnDownload->setText(tr("&Download"));
    }
    else {
        if(editUrl->text().isEmpty()) {
            QMessageBox::warning(this, tr("Qt Simple Downloader"),
                                 tr("URL must be not empty"));
            editUrl->setFocus();
            return;
        }
        std::vector<Target> targets, allTargets = optionDlg->getTargets();
        foreach(Target target, allTargets) {
            if(target.selected)
                targets.push_back(target);
        }
        if(targets.size() == 0) {
            QMessageBox::warning(this, tr("Qt Simple Downloader"),
                                 tr("You must select one target at least to download"));
            setting();
            return;
        }
        targets.push_back(Target("Hyperlink", "a", "href", QStringList()));

        jobScheduler.setMinFileSize(optionDlg->getMinFileSize());
        jobScheduler.setSaveInSingleDir(optionDlg->getSaveInSingleDir());
        jobScheduler.setFileExistsAction(optionDlg->getFileExistsAction());
        jobScheduler.start(editUrl->text(), editSaveTo->text(),
                           optionDlg->getRecursiveLayer(), targets);
        btnDownload->setText(tr("Sto&p"));
        outputList->addItem("start downloading...");
    }
}
开发者ID:yuanjian113,项目名称:qt,代码行数:35,代码来源:QSimpleDownloader.cpp


示例18: testInput

void InputDialogue::okClicked(){
    if(what == "port"){
        bool parsed = false;
        //try parse port
        try{
            parsed = testInput(1024,65000);
        }catch(ErrorClass ec){
            showErrorMessage(ec.message, "error");
            return;
        }

        if(!parsed){
            QString message = "Incorrect input for port. Port must be between 1200 and 65000";
            showErrorMessage(message, "error");
            return;
        }

        QSettings setting("settings.ini",QSettings::IniFormat);
        //grouping the settings
        setting.beginGroup("Connection");

        setting.setValue("port", ui->lineEdit->text().toInt());

        setting.endGroup();
        management->setPort(ui->lineEdit->text().toInt());
        this->close();
    }
}
开发者ID:hhvvkk,项目名称:COS301DistrobutedApplicationManger,代码行数:28,代码来源:inputdialogue.cpp


示例19: ConvUTF8

void COptions::SetXmlValue(unsigned int nID, wxString value)
{
	if (!m_pXmlFile)
		return;

	// No checks are made about the validity of the value, that's done in SetOption

	char *utf8 = ConvUTF8(value);
	if (!utf8)
		return;

	TiXmlElement *settings = m_pXmlFile->GetElement()->FirstChildElement("Settings");
	if (!settings)
	{
		TiXmlNode *node = m_pXmlFile->GetElement()->InsertEndChild(TiXmlElement("Settings"));
		if (!node)
		{
			delete [] utf8;
			return;
		}
		settings = node->ToElement();
		if (!settings)
		{
			delete [] utf8;
			return;
		}
	}
	else
	{
		TiXmlNode *node = 0;
		while ((node = settings->IterateChildren("Setting", node)))
		{
			TiXmlElement *setting = node->ToElement();
			if (!setting)
				continue;

			const char *attribute = setting->Attribute("name");
			if (!attribute)
				continue;
			if (strcmp(attribute, options[nID].name))
				continue;

			setting->RemoveAttribute("type");
			setting->Clear();
			setting->SetAttribute("type", (options[nID].type == string) ? "string" : "number");
			setting->InsertEndChild(TiXmlText(utf8));

			delete [] utf8;
			return;
		}
	}
	wxASSERT(options[nID].name[0]);
	TiXmlElement setting("Setting");
	setting.SetAttribute("name", options[nID].name);
	setting.SetAttribute("type", (options[nID].type == string) ? "string" : "number");
	setting.InsertEndChild(TiXmlText(utf8));
	settings->InsertEndChild(setting);

	delete [] utf8;
}
开发者ID:ErichKrause,项目名称:filezilla,代码行数:60,代码来源:Options.cpp


示例20: minimumConfigure

    bool soem_SGDV::configureHook() 
    {

	minimumConfigure();
	
	PDOmapping();
	setting();	
	
	if(useDC)
	{
	  //To change the error tolerance before starting
	  SDOwrite(0x1F01,2,false,4,PDOerrorsTolerance);
	  
	  //To set the desired shift of the outputs in the slave
	  SDOwrite(0x1C33,0x03,false,4,SHIFT);
	  
	  //To let know the master that this slave will use DC
	  configmyDC = this->getPeer("Master")->getOperation("configDC");
	  configmyDC(internalNumber,true,SYNC0TIME,SHIFTMASTER);
	}

	Logger::log(Logger::Info) << soem_SGDV::getName()<<" configured !" <<endlog();
	
	return true;
    }
开发者ID:joseparnau,项目名称:rosjac,代码行数:25,代码来源:soem_SGDV.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ settings函数代码示例发布时间:2022-05-30
下一篇:
C++ settime函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap