//========================================================================== GPhotoCCD::GPhotoCCD() { // For now let's set name to default name. In the future, we need to to support multiple devices per one driver if (*getDeviceName() == '\0') strncpy(name, getDefaultName(), MAXINDINAME); else strncpy(name, getDeviceName(), MAXINDINAME); gphotodrv = NULL; frameInitialized=false; on_off[0] = strdup("On"); on_off[1] = strdup("Off"); setVersion(INDI_GPHOTO_VERSION_MAJOR, INDI_GPHOTO_VERSION_MINOR); }
CartoComponent::CartoComponent() : BaseComponent("org.carousel.demos.Carto") { IScriptExtension *scriptExtension = new CartoScriptExtension(this); registerExtension<IScriptExtension>(scriptExtension); addParent("org.carousel.QmlScripting", 1, 0); addParent("org.carousel.demos.Display", 1, 0); addParent("org.carousel.demos.Geodatabase", 1, 0); addParent("org.carousel.demos.Geometry", 1, 0); setShortName("Carto"); setProductName(productName); setProvider("Carousel"); setVersion(1, 0); }
pagauss::pagauss() { setDescriptorId("0d63a7b0-6c16-11e0-ae3e-0800200c9a66}"); setName("Gaussian blur"); setVersion("Sample"); setDescription("Perform gaussian blur on a given image " "of the provided raster element."); setCreator("Pratik Anand"); setCopyright("Copyright (C) 2008, Ball Aerospace & Technologies Corp."); setProductionStatus(false); setType("Sample"); setSubtype("Edge Detection"); setMenuLocation("[Tutorial]/pagauss_res"); setAbortSupported(true); }
Scharr::Scharr() { setDescriptorId("{2100746F-68FD-4ABB-BF84-02C887D4F896}"); setName("Scharr Edge Detection"); setVersion("Sample"); setDescription("Calculate and return an edge detection raster element for first band " "of the provided raster element."); setCreator("Opticks Community"); setCopyright("Copyright (C) 2008, Ball Aerospace & Technologies Corp."); setProductionStatus(false); setType("Sample"); setSubtype("Edge Detection"); setMenuLocation("[Edge Detection]/Scharr Filter"); setAbortSupported(true); }
Prewitt::Prewitt() { setDescriptorId("{90FDF5C6-C1DD-4D31-9291-8DFA6B654F2D}"); setName("Prewitt Edge Detection"); setVersion("Sample"); setDescription("Calculate and return an edge detection raster element for first band " "of the provided raster element."); setCreator("Opticks Community"); setCopyright("Copyright (C) 2008, Ball Aerospace & Technologies Corp."); setProductionStatus(false); setType("Sample"); setSubtype("Edge Detection"); setMenuLocation("[Edge Detection]/Prewitt Filter"); setAbortSupported(true); }
EarthquakePlugin::EarthquakePlugin() : m_isInitialized( false ), m_configDialog( 0 ) { setNameId( "earthquake" ); setVersion( "1.0" ); setCopyrightYears( QList<int>() << 2010 << 2011 ); addAuthor( QString::fromUtf8( "Utku Aydın" ), "*****@*****.**" ); addAuthor( "Daniel Marth", "*****@*****.**" ); setEnabled( true ); // Plugin is enabled by default setVisible( false ); // Plugin is invisible by default connect( this, SIGNAL( settingsChanged( QString ) ), this, SLOT( updateSettings() ) ); }
NavigationOperationsComponent::NavigationOperationsComponent(QObject *parent /*= nullptr*/) : BaseComponent("org.carousel.demos.NavigationOperations", parent) { IInteractiveExtension *interactiveExtension = new NavigationOperationsInteractiveExtension(this); registerExtension<IInteractiveExtension>(interactiveExtension); addParent("org.carousel.demos.Geodatabase", 1, 0); addParent("org.carousel.demos.Display", 1, 0); addParent("org.carousel.demos.Carto", 1, 0); addParent("org.carousel.demos.CartoUI", 1, 0); setShortName("Navigation Operations"); setProductName(productName); setProvider("Carousel"); setVersion(1, 0); }
void IDBDatabaseBackendImpl::close(PassRefPtr<IDBDatabaseCallbacks> prpCallbacks) { RefPtr<IDBDatabaseCallbacks> callbacks = prpCallbacks; ASSERT(m_databaseCallbacksSet.contains(callbacks)); m_databaseCallbacksSet.remove(callbacks); if (m_databaseCallbacksSet.size() > 1) return; while (!m_pendingSetVersionCalls.isEmpty()) { ExceptionCode ec = 0; RefPtr<PendingSetVersionCall> pendingSetVersionCall = m_pendingSetVersionCalls.takeFirst(); setVersion(pendingSetVersionCall->version(), pendingSetVersionCall->callbacks(), pendingSetVersionCall->databaseCallbacks(), ec); ASSERT(!ec); } }
adaptive_median::adaptive_median() { setDescriptorId("{FF1EFA03-0888-4199-AB40-0503C9FABC80}"); setName("adaptive_median"); setDescription ("Perform noise reduction on an image using an adaptive median filter"); setCreator("Pratik Anand"); setVersion("0.1"); setCopyright("Copyright (C) 2011, Pratik Anand <*****@*****.**>"); setProductionStatus(true); setType("Algorithm"); setSubtype("Noise reduction"); setMenuLocation("[Photography]/adaptive_median"); setAbortSupported(false); }
void HTTPRequest::read(std::istream& istr) { static const int eof = std::char_traits<char>::eof(); std::string method; std::string uri; std::string version; method.reserve(16); uri.reserve(64); version.reserve(16); int ch = istr.get(); if (ch == eof) throw NoMessageException(); while (Poco::Ascii::isSpace(ch)) ch = istr.get(); if (ch == eof) throw MessageException("No HTTP request header"); while (!Poco::Ascii::isSpace(ch) && ch != eof && method.length() < MAX_METHOD_LENGTH) { method += (char) ch; ch = istr.get(); } if (!Poco::Ascii::isSpace(ch)) throw MessageException("HTTP request method invalid or too long"); while (Poco::Ascii::isSpace(ch)) ch = istr.get(); while (!Poco::Ascii::isSpace(ch) && ch != eof && uri.length() < MAX_URI_LENGTH) { uri += (char) ch; ch = istr.get(); } if (!Poco::Ascii::isSpace(ch)) throw MessageException("HTTP request URI invalid or too long"); while (Poco::Ascii::isSpace(ch)) ch = istr.get(); while (!Poco::Ascii::isSpace(ch) && ch != eof && version.length() < MAX_VERSION_LENGTH) { version += (char) ch; ch = istr.get(); } if (!Poco::Ascii::isSpace(ch)) throw MessageException("Invalid HTTP version string"); while (ch != '\n' && ch != eof) { ch = istr.get(); } HTTPMessage::read(istr); ch = istr.get(); while (ch != '\n' && ch != eof) { ch = istr.get(); } setMethod(method); setURI(uri); setVersion(version); }
CodeRevision::CodeRevision() : _buffer(NULL), _bytecode(NULL), _parsed_program(NULL), _parse_tree(NULL), _selected(false), _tmp_fd(NULL), _branch_count( 0 ), _original(NULL) { _setupButtons(); _buffer = new TextBuffer(); _id = IDManager::instance()->getPickID(); setVersion(); _status = rev_NEW; }
QSICCD::QSICCD() : FilterInterface(this) { canSetGain = false; canControlFan = false; canSetAB = false; canFlush = false; canChangeReadoutSpeed = false; // Initial setting. Updated after connction to camera. FilterSlotN[0].min = 1; FilterSlotN[0].max = 5; QSICam.put_UseStructuredExceptions(true); setVersion(QSI_VERSION_MAJOR, QSI_VERSION_MINOR); }
Deconvolution::Deconvolution() { setDescriptorId("{CC472EDD-2FD5-42E1-8138-DF1519A480D8}"); setName("Deconvolution Enhancement"); setDescription("Image Enhancement through deconvolution"); setCreator("Yiwei Zhang"); setVersion("Sample"); setCopyright("Copyright (C) 2008, Ball Aerospace & Technologies Corp."); setProductionStatus(false); setType("Sample"); setSubtype("Image Enhancement"); setMenuLocation("[Astronomy]/Deconvolution"); setAbortSupported(true); pOriginalImage = NULL; }
void backToHomeScreen (void* button) { ((button_t*) button)->hasBeenAcknowledged = 1; aScreen = BOARD_SELECTION; selected_board->board.writeBytes[1] = 128; cycleSelected = 128; rampSelected = 128; BSP_LCD_Clear(LCD_COLOR_WHITE); setVersion(version); drawHomeScreen(); }
TextureSegmentation::TextureSegmentation() { setDescriptorId("{21860EDB-3761-4e7f-B4DF-169369576749}"); setName("SAR Image Segmentation"); setDescription("Segmentation for SAR"); setCreator("Yiwei Zhang"); setVersion("Sample"); setCopyright("Copyright (C) 2008, Ball Aerospace & Technologies Corp."); setProductionStatus(false); setType("Sample"); setSubtype("Segmentation"); setMenuLocation("[SAR]/Segmentation"); setAbortSupported(true); pBuffer = NULL; }
MICCD::MICCD(int camId, bool eth) : FilterInterface(this) { cameraId = camId; isEth = eth; if (isEth) cameraHandle = gxccd_initialize_eth(cameraId); else cameraHandle = gxccd_initialize_usb(cameraId); if (!cameraHandle) IDLog("Error connecting MI camera!\n"); char sp[MAXINDINAME]; if (gxccd_get_string_parameter(cameraHandle, GSP_CAMERA_DESCRIPTION, sp, sizeof(sp)) < 0) { gxccd_get_last_error(cameraHandle, sp, sizeof(sp)); IDLog("Error getting MI camera info: %s.\n", sp); strncpy(name, "MI CCD", MAXINDIDEVICE); } else { // trim trailing spaces char *end = sp + strlen(sp) - 1; while (end > sp && isspace(*end)) end--; *(end + 1) = '\0'; snprintf(name, MAXINDINAME, "MI CCD %s", sp); IDLog("Detected camera: %s.\n", name); } gxccd_get_integer_parameter(cameraHandle, GIP_READ_MODES, &numReadModes); gxccd_get_integer_parameter(cameraHandle, GIP_FILTERS, &numFilters); gxccd_get_integer_parameter(cameraHandle, GIP_MAX_FAN, &maxFanValue); gxccd_get_integer_parameter(cameraHandle, GIP_MAX_WINDOW_HEATING, &maxHeatingValue); gxccd_release(cameraHandle); cameraHandle = nullptr; hasGain = false; useShutter = true; canDoPreflash = false; setDeviceName(name); setVersion(INDI_MI_VERSION_MAJOR, INDI_MI_VERSION_MINOR); }
HTTPCookie::HTTPCookie(const NameValueCollection& nvc): _version(0), _secure(false), _maxAge(-1) { for (NameValueCollection::ConstIterator it = nvc.begin(); it != nvc.end(); ++it) { const std::string& name = it->first; const std::string& value = it->second; if (icompare(name, "comment") == 0) { setComment(value); } else if (icompare(name, "domain") == 0) { setDomain(value); } else if (icompare(name, "path") == 0) { setPath(value); } else if (icompare(name, "max-age") == 0) { setMaxAge(NumberParser::parse(value)); } else if (icompare(name, "secure") == 0) { setSecure(true); } else if (icompare(name, "expires") == 0) { int tzd; DateTime exp = DateTimeParser::parse(value, tzd); Timestamp now; setMaxAge((int) ((exp.timestamp() - now)/Timestamp::resolution())); } else if (icompare(name, "version") == 0) { setVersion(NumberParser::parse(value)); } else { setName(name); setValue(value); } } }
MockInputDeviceNode* getGpioKeys() { auto node = new MockInputDeviceNode(); node->setPath("/dev/input/event0"); node->setName("gpio-keys"); node->setLocation("gpio-keys/input0"); // UniqueId not set node->setBusType(0x0019); node->setVendorId(0x0001); node->setProductId(0x0001); node->setVersion(0x0100); node->addKeys(KEY_CONNECT); // No relative axes // No absolute axes // No switches node->addInputProperty(INPUT_PROP_DIRECT); return node; }
bool KPBinaryIface::parseHeader(const QString& output) { QString firstLine = output.section('\n', m_headerLine, m_headerLine); kDebug() << path() << " help header line: \n" << firstLine; if (firstLine.startsWith(m_headerStarts)) { QString version = firstLine.remove(0, m_headerStarts.length()); if (version.startsWith("Pre-Release ")) { version.remove("Pre-Release "); // Special case with Hugin beta. m_developmentVersion = true; } setVersion(version); return true; } return false; }
MockInputDeviceNode* getH2wButton() { auto node = new MockInputDeviceNode(); node->setPath("/dev/input/event4"); node->setName("h2w button"); // Location not set // UniqueId not set node->setBusType(0); node->setVendorId(0); node->setProductId(0); node->setVersion(0); node->addKeys(KEY_MEDIA); // No relative axes // No absolute axes // No switches node->addInputProperty(INPUT_PROP_DIRECT); return node; }
void MetaInfoReader::readItemLibraryEntryProperty(const QString &name, const QVariant &value) { if (name == QStringLiteral("name")) { m_currentEntry.setName(value.toString()); } else if (name == QStringLiteral("category")) { m_currentEntry.setCategory(value.toString()); } else if (name == QStringLiteral("libraryIcon")) { m_currentEntry.setLibraryEntryIconPath(absoluteFilePathForDocument(value.toString())); } else if (name == QStringLiteral("version")) { setVersion(value.toString()); } else if (name == QStringLiteral("requiredImport")) { m_currentEntry.setRequiredImport(value.toString()); } else { addError(tr("Unknown property for ItemLibraryEntry %1").arg(name), currentSourceLocation()); setParserState(Error); } }
MockInputDeviceNode* getMidPowerBtn() { auto node = new MockInputDeviceNode(); node->setPath("/dev/input/event1"); node->setName("mid_powerbtn"); node->setLocation("power-button/input0"); // UniqueId not set node->setBusType(0x0019); node->setVendorId(0); node->setProductId(0); node->setVersion(0); node->addKeys(KEY_POWER); // No relative axes // No absolute axes // No switches node->addInputProperty(INPUT_PROP_DIRECT); return node; }
SkinsPlugIn::SkinsPlugIn() : mpDefaultAction(NULL), mpSkinsMenu(NULL) { setDescriptorId("{3a01c75e-29c2-4ad6-a3d4-5794ad9b6ee0}"); setName("Skins"); setDescription("Plug-in to manage skins."); setVersion(SKINS_VERSION_NUMBER); setProductionStatus(SKINS_IS_PRODUCTION_RELEASE); setCreator("Trevor R.H. Clarke <*****@*****.**>"); setCopyright(SKINS_COPYRIGHT); setType("Manager"); setSubtype("Skins"); allowMultipleInstances(false); executeOnStartup(true); destroyAfterExecute(false); setAbortSupported(false); setWizardSupported(false); }
void IDBDatabaseBackendImpl::processPendingCalls() { // Pending calls may be requeued or aborted Deque<RefPtr<PendingSetVersionCall> > pendingSetVersionCalls; m_pendingSetVersionCalls.swap(pendingSetVersionCalls); while (!pendingSetVersionCalls.isEmpty()) { ExceptionCode ec = 0; RefPtr<PendingSetVersionCall> pendingSetVersionCall = pendingSetVersionCalls.takeFirst(); setVersion(pendingSetVersionCall->version(), pendingSetVersionCall->callbacks(), pendingSetVersionCall->databaseCallbacks(), ec); ASSERT(!ec); } while (!m_runningVersionChangeTransaction && m_pendingSetVersionCalls.isEmpty() && !m_pendingOpenCalls.isEmpty()) { RefPtr<PendingOpenCall> pendingOpenCall = m_pendingOpenCalls.takeFirst(); openConnection(pendingOpenCall->callbacks()); } }
void buttonConnectPressed(void* source) { struct sockaddr_in addr; int ret; ((button_t*)source)->hasBeenAcknowledged = 1; setStatus(CONNECTING); if (!isConnected) { memset(&addr, 0, sizeof(addr)); addr.sin_len = sizeof(addr); addr.sin_family = AF_INET; addr.sin_port = PP_HTONS(SOCK_TARGET_PORT); addr.sin_addr.s_addr = inet_addr(SOCK_TARGET_HOST); socket_in = lwip_socket(AF_INET, SOCK_STREAM, 0); if ((ret = lwip_connect(socket_in, (struct sockaddr*)&addr, sizeof(addr))) == 0) { isConnected = 1; executeCommand(IDENT); executeCommand(END_IDENT); setStatus(CONNECTED); } else { isConnected = 0; setStatus(DISCONNECTED); } } else { if ((ret = lwip_close(socket_in)) == 0) { setStatus(DISCONNECTED); isConnected = 0; resetBoards(); setVersion(NULL); } } refreshBoards(); }
WaveletKSigmaFilter::WaveletKSigmaFilter() { setDescriptorId("{28702D56-4634-4CCC-8840-C10F805C9870}"); setName("Wavelet K-Sigma Filter "); setDescription("Remove noise for astronomical image"); setCreator("Yiwei Zhang"); setVersion("Sample"); setCopyright("Copyright (C) 2008, Ball Aerospace & Technologies Corp."); setProductionStatus(false); setType("Sample"); setSubtype("Denoise"); setMenuLocation("[Astronomy]/Wavelet K-Sigma Filter"); setAbortSupported(true); rowBlocks = BLOCK_ROWS; colBlocks = BLOCK_COLS; pBuffer = (double *)malloc(sizeof(double)*(10+rowBlocks)*(10+colBlocks)); }
MaxDomeII::MaxDomeII() { nTicksPerTurn = 360; nCurrentTicks = 0; nParkPosition = 0.0; nHomeAzimuth = 0.0; nHomeTicks = 0; nCloseShutterBeforePark = 0; nTimeSinceShutterStart = -1; // No movement has started nTimeSinceAzimuthStart = -1; // No movement has started nTargetAzimuth = -1; //Target azimuth not established nTimeSinceLastCommunication = 0; SetDomeCapability(DOME_CAN_ABORT | DOME_CAN_ABS_MOVE | DOME_HAS_SHUTTER); setVersion(INDI_MAXDOMEII_VERSION_MAJOR, INDI_MAXDOMEII_VERSION_MINOR); }
XERCES_CPP_NAMESPACE_USE #endif XPathDocumentImpl::XPathDocumentImpl(DOMImplementation* domImpl, MemoryManager* memMgr) #if _XERCES_VERSION >= 30000 : DOMDocumentImpl(domImpl, memMgr), #else : DOMDocumentImpl(memMgr), #endif fMyDocType(NULL), fMyDocElement(NULL) { #if _XERCES_VERSION >= 30000 setXmlVersion(XMLUni::fgVersion1_1); #else setVersion(XMLUni::fgVersion1_1); #endif }
ABST::ABST() { memcpy(data + 4, "abst", 4); setVersion(0); setFlags(0); setBootstrapinfoVersion(0); setProfile(0); setLive(1); setUpdate(0); setTimeScale(1000); setCurrentMediaTime(0); setSmpteTimeCodeOffset(0); std::string empty; setMovieIdentifier(empty); setInt8(0, 30); //set serverentrycount to 0 setInt8(0, 31); //set qualityentrycount to 0 setDrmData(empty); setMetaData(empty); }
IdlInterpreterManager::IdlInterpreterManager() : mpInterpreter(new IdlProxy()) { setName("IDL"); setDescription("Provides command line utilities to execute IDL commands."); setDescriptorId("{09BBB1FD-D12A-43B8-AB09-95AA8028BFFE}"); setCopyright(IDL_COPYRIGHT); setVersion(IDL_VERSION_NUMBER); setProductionStatus(IDL_IS_PRODUCTION_RELEASE); allowMultipleInstances(false); setWizardSupported(false); setFileExtensions("IDL Scripts (*.pro)"); setInteractiveEnabled(IdlInterpreterOptions::getSettingInteractiveAvailable()); addDependencyCopyright("IDL", "<pre>Copyright 2012 Exelis Visual Information Systems, Inc.\n" "* The user is permitted to use this software only together with Opticks, and for the sole purpose of calling a " "fully-licensed copy of IDL(R) software. Any other use is expressly prohibited.\n" "* The user shall not disassemble, decompile or reverse engineer this software.</pre>"); }