Skip to content
Snippets Groups Projects
Select Git revision
  • d4bcaa97b55525972c4d043ebb93fab358d9448f
  • master default protected
  • Binary
  • add-version-information
  • os-path-join
  • develop-GA
  • timeFstatmap
  • add-higher-spindown-components
  • develop-DK
  • adds-header-to-grid-search
  • v1.3
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
15 results

sliding_window.py

Blame
  • Forked from Gregory Ashton / PyFstat
    Source project has a limited visibility.
    BOINCClientAdapter.cpp 7.06 KiB
    /***************************************************************************
     *   Copyright (C) 2008 by Oliver Bock                                     *
     *   oliver.bock[AT]aei.mpg.de                                             *
     *                                                                         *
     *   This file is part of Einstein@Home.                                   *
     *                                                                         *
     *   Einstein@Home 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, version 2 of the License.            *
     *                                                                         *
     *   Einstein@Home 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 Einstein@Home. If not, see <http://www.gnu.org/licenses/>. *
     *                                                                         *
     ***************************************************************************/
    
    #include "BOINCClientAdapter.h"
    #include "Libxml2Adapter.h"
    
    #include <sstream>
    
    BOINCClientAdapter::BOINCClientAdapter(string sharedMemoryIdentifier)
    {
    	m_Initialized = false;
    	m_SharedMemoryAreaIdentifier = sharedMemoryIdentifier;
    	m_SharedMemoryAreaAvailable = false;
    
    	m_xmlIFace = new Libxml2Adapter();
    
    	m_GraphicsFrameRate = 20;
    	m_GraphicsQualitySetting = BOINCClientAdapter::LowGraphicsQualitySetting;
    	m_GraphicsWindowWidth = 800;
    	m_GraphicsWindowHeight = 600;
    }
    
    BOINCClientAdapter::~BOINCClientAdapter()
    {
    	if(m_xmlIFace) delete m_xmlIFace;
    }
    
    void BOINCClientAdapter::initialize()
    {
    	if(!m_Initialized) {
    		readUserInfo();
    		readSharedMemoryArea();
    		readProjectPreferences();
    
    		m_Initialized = true;
    	}
    }
    
    void BOINCClientAdapter::refresh()
    {
    	if(m_Initialized) {
    		readUserInfo();
    		readSharedMemoryArea();
    
    		/// \todo Check that we're still watching our own WU (or science app)!
    	}
    	else {
    		cerr << "The BOINC Client Adapter has not yet been initialized! Doing so now..." << endl;
    		initialize();
    	}
    }
    
    void BOINCClientAdapter::readUserInfo()