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

C++ cf::Properties类代码示例

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

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



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

示例1: configure

void amplifier_i::configure(const CF::Properties& props) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration)
{
    static int init = 0;

    std::cout << "Component -AMPLIFIER" << std::endl;
    std::cout << " Props length = " << props.length() << std::endl;

    if (init == 0) {
        if ( props.length() <= 0 ) {
            std::cout << "amplifier: configure called with invalid props.length() - " << props.length() << std::endl;
            return;
        }
        propertySet.length(props.length());
        for (unsigned int i=0; i < props.length(); i++) {
            propertySet[i].id = CORBA::string_dup(props[i].id);
            propertySet[i].value = props[i].value;
        }
        init++;
    }

    for (unsigned int i=0; i < props.length(); i++) {
        if (strcmp(props[i].id, "DCE:06b88d4f-dd38-44e6-bc49-82db0eba5bc6") == 0) {
            CORBA::Float simple_temp;
            props[i].value >>= simple_temp;
            simple_0_value = simple_temp;
            for (unsigned int j=0; j < propertySet.length(); j++ ) {
                if ( strcmp(propertySet[j].id, props[i].id) == 0 ) {
                    propertySet[j].value = props[i].value;
                    break;
                }
            }
        }

        else if (strcmp(props[i].id, "DCE:df91b1a8-9c83-44b4-bf2c-0dbeacb2b6f4") == 0) {
开发者ID:darshanst,项目名称:opencpi,代码行数:34,代码来源:amplifier.cpp


示例2: configure

void Channel_i::configure(const CF::Properties& props)
throw (CORBA::SystemException,
       CF::PropertySet::InvalidConfiguration,
       CF::PropertySet::PartialConfiguration)
{
    static int init = 0;
    DEBUG(3, Channel, "configure() invoked")

    if (init == 0) {
        if ( props.length() <= 0 ) {
            std::cout << "Channel: configure called with invalid props.length() - " << props.length() << std::endl;
            return;
        }

        propertySet.length(props.length());
        for (unsigned int i=0; i < props.length(); i++) {
            std::cout << "Property Id : " << props[i].id << std::endl;
            propertySet[i].id = CORBA::string_dup(props[i].id);
            propertySet[i].value = props[i].value;
        }
        init = 1;
    }
    for (unsigned int i=0; i < props.length(); i++) {
        if (strcmp(props[i].id, "DCE:1d91b55a-2fcb-4d2d-ad7b-1ee58c32cad8") == 0) {
            //The number of samples per symbol
            CORBA::Short simple_temp;
            props[i].value >>= simple_temp;
            Ns = simple_temp;
            for (unsigned int j=0; j < propertySet.length(); j++ ) {
                if ( strcmp(propertySet[j].id, props[i].id) == 0 ) {
                    propertySet[j].value = props[i].value;
                    break;
                }
            }
        } else if (strcmp(props[i].id, "DCE:eddc66ce-8a82-11dd-ae05-0016769e497b") == 0) {
开发者ID:nzneer,项目名称:ossie-june,代码行数:35,代码来源:Channel.cpp


示例3: parseUsesDevices

void SPDImplementation::parseUsesDevices(TiXmlElement *elem)
{
    DEBUG(4, SPDImplementation, "In parseUsesDevices.");

    TiXmlElement *uses = elem->FirstChildElement("usesdevice");

    for (; uses; uses = uses->NextSiblingElement("usesdevice")) {
        const char *id = uses->Attribute("id");
        const char *type = uses->Attribute("type");

        CF::Properties props;
        unsigned int i(0);

        TiXmlElement *prop = uses->FirstChildElement("propertyref");
        for (; prop; prop = prop->NextSiblingElement("propertyref")) {
            const char *refid = prop->Attribute("refid");
            const char *value = prop->Attribute("value");
            props.length(i+1);
            props[i].id = CORBA::string_dup (refid);
            props[i].value <<= value;
            i++;
        }

        usesDevice.push_back(new SPDUsesDevice (id, type, props));
    }
}
开发者ID:darshanst,项目名称:opencpi,代码行数:26,代码来源:SPDImplementation.cpp


示例4: allocateDevice

bool AllocationManager_impl::allocateDevice(const CF::Properties& requestedProperties, ossie::DeviceNode& node, CF::Properties& allocatedProperties, const std::vector<std::string>& processorDeps, const std::vector<ossie::SPD::NameVersionPair>& osDeps)
{
    if (!ossie::corba::objectExists(node.device)) {
        LOG_WARN(AllocationManager_impl, "Not using device for uses_device allocation " << node.identifier << " because it no longer exists");
        return false;
    }
    try {
        if (node.device->usageState() == CF::Device::BUSY) {
            return false;
        }
    } catch ( ... ) {
        // bad device reference or device in an unusable state
        LOG_WARN(AllocationManager_impl, "Unable to verify state of device " << node.identifier);
        return false;
    }

    LOG_TRACE(AllocationManager_impl, "Allocating against device " << node.identifier);

    // Determine whether or not the device in question has the required matching properties
    CF::Properties allocProps;
    if (!checkDeviceMatching(node.prf, allocProps, requestedProperties, processorDeps, osDeps)) {
        LOG_TRACE(AllocationManager_impl, "Matching failed");
        return false;
    }

    // If there are no external properties to allocate, the allocation is
    // already successful
    if (allocProps.length() == 0) {
        LOG_TRACE(AllocationManager_impl, "Allocation requires no capacity from device");
        return true;
    }

    // If there are duplicates in the allocation sequence, break up the allocation into multiple calls
    std::vector<CF::Properties> allocations;
    partitionProperties(allocProps, allocations);

    LOG_TRACE(AllocationManager_impl, "Allocating " << allocProps.length() << " properties ("
              << allocations.size() << " calls)");
    try {
        if (!this->completeAllocations(node.device, allocations)) {
            LOG_TRACE(AllocationManager_impl, "Device lacks sufficient capacity");
            return false;
        }
    } catch (const CF::Device::InvalidCapacity& e) {
        LOG_TRACE(AllocationManager_impl, "Device reported invalid capacity");
        return false;
    } catch (const CF::Device::InsufficientCapacity& e) {
        LOG_TRACE(AllocationManager_impl, "Device reported insufficient capacity");
        return false;
    }

    // Transfer ownership of the allocated properties to the caller
    ossie::corba::move(allocatedProperties, allocProps);
    LOG_TRACE(AllocationManager_impl, "Allocation successful");
    return true;
}
开发者ID:koonihc,项目名称:framework-core,代码行数:56,代码来源:AllocationManager_impl.cpp


示例5: testMemberCallbacks

void TestCppsoftpkgDeps::testMemberCallbacks (CF::Properties& testValues)
{
    // Set up notification to call `this->propertyChanged()` when any of the
    // test values are changed via `configure()`.
    LOG_DEBUG(TestCppsoftpkgDeps, "Setting up " << testValues.length() << " member function callback(s)");
    for (CORBA::ULong ii = 0; ii < testValues.length(); ++ii) {
        const std::string id = static_cast<const char*>(testValues[ii].id);
        setPropertyChangeListener(id, this, &TestCppsoftpkgDeps::propertyChanged);
    }
    
    testCallbacks(testValues);
}
开发者ID:RedhawkSDR,项目名称:framework-core,代码行数:12,代码来源:TestCppsoftpkgDeps.cpp


示例6: getCombinedProperty

CORBA::ULongLong FileManager_impl::getCombinedProperty (const char* propId)
{
    CORBA::ULongLong totalSize = 0;
    for (MountList::iterator mount = mountedFileSystems.begin(); mount != mountedFileSystems.end(); ++mount) {
        CF::Properties props;
        props.length(1);
        props[0].id = propId;
        mount->fs->query(props);
        CORBA::ULongLong fsSize;
        props[0].value >>= fsSize;
        totalSize += fsSize;
    }

    return totalSize;
}
开发者ID:a100lesserfaces,项目名称:framework-core,代码行数:15,代码来源:FileManager_impl.cpp


示例7: configure

void AudioTestSource_i::configure (const CF::Properties& configProperties)
    throw (CF::PropertySet::PartialConfiguration,
           CF::PropertySet::InvalidConfiguration,
           CORBA::SystemException)
{
    CF::Properties validProperties;
    CF::Properties invalidProperties;
    validate(configProperties, validProperties, invalidProperties);

    if (invalidProperties.length() > 0) {
        throw CF::PropertySet::InvalidConfiguration("Properties failed validation.  See log for details.", invalidProperties);
    }

    PropertySet_impl::configure(configProperties);
}
开发者ID:54AndyN,项目名称:audio-components,代码行数:15,代码来源:AudioTestSource.cpp


示例8: getModTime

static time_t getModTime (const CF::Properties& properties)
{
    CORBA::ULongLong modTime = 0;
    for (CORBA::ULong ii = 0; ii < properties.length(); ++ii) {
        if (strcmp(properties[ii].id, "MODIFIED_TIME") == 0) {
            properties[ii].value >>= modTime;
        }
    }
开发者ID:RedhawkSDR,项目名称:framework-core,代码行数:8,代码来源:LoadableDevice_impl.cpp


示例9: validate

void AudioTestSource_i::validate(CF::Properties property, CF::Properties& validProps, CF::Properties& invalidProps)
{
    for (CORBA::ULong ii = 0; ii < property.length (); ++ii) {
        std::string id((const char*)property[ii].id);
        // Certian properties cannot be set while the component is running
        if (_started) {
            if (id == "sample-rate") {
            	LOG_WARN(AudioTestSource_i, "'sample-rate' cannot be changed while component is running.")
                CORBA::ULong count = invalidProps.length();
                invalidProps.length(count + 1);
                invalidProps[count].id = property[ii].id;
                invalidProps[count].value = property[ii].value;
            } else if (id == "is-live") {
            	LOG_WARN(AudioTestSource_i, "'is-live' cannot be changed while component is running.")
            	CORBA::ULong count = invalidProps.length();
				invalidProps.length(count + 1);
				invalidProps[count].id = property[ii].id;
				invalidProps[count].value = property[ii].value;
            } else if (id == "stream_id") {
            	LOG_WARN(AudioTestSource_i, "'is-stream_id' cannot be changed while component is running.")
            	CORBA::ULong count = invalidProps.length();
				invalidProps.length(count + 1);
				invalidProps[count].id = property[ii].id;
				invalidProps[count].value = property[ii].value;
            }
        }
    }

}
开发者ID:54AndyN,项目名称:audio-components,代码行数:29,代码来源:AudioTestSource.cpp


示例10: query

void AutomaticGainControl_i::query(CF::Properties & configProperties)
throw (CORBA::SystemException, CF::UnknownProperties)
{
    if (configProperties.length () == 0) {
        configProperties.length (propertySet.length ());
        for (unsigned int i = 0; i < propertySet.length (); i++) {
            configProperties[i].id = CORBA::string_dup (propertySet[i].id);
            configProperties[i].value = propertySet[i].value;
        }
        return ;
    } else {
        for (unsigned int i = 0; i < configProperties.length(); i++) {
            for (unsigned int j=0; j < propertySet.length(); j++) {
                if ( strcmp(configProperties[i].id, propertySet[j].id) == 0 ) {
                    configProperties[i].value = propertySet[j].value;
                }
            }
        }
    }
}
开发者ID:nzneer,项目名称:ossie-june,代码行数:20,代码来源:AutomaticGainControl.cpp


示例11: configure

void AutomaticGainControl_i::configure(const CF::Properties& props) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration)
{
    static int init = 0;

    CORBA::Float simple_temp;

    DEBUG(3, AutomaticGainControl, "configure() invoked")

    DEBUG(3, AutomaticGainControl, "props length : " << props.length())

    if (init == 0) {
        if ( props.length() <= 0 ) {
            std::cout << "AutomaticGainControl: configure called with invalid props.length() - " << props.length() << std::endl;
            return;
        }

        propertySet.length(props.length());
        for (unsigned int i=0; i < props.length(); i++) {
            propertySet[i].id = CORBA::string_dup(props[i].id);
            propertySet[i].value = props[i].value;
        }
        init++;
    }

    for (unsigned int i=0; i < props.length(); i++) {
        std::cout << "Property Id : " << props[i].id << std::endl;
        if (strcmp(props[i].id, "DCE:aaf97fa0-d184-4d88-9954-3a1334c73d6d") == 0) {
            // energy_lo
            props[i].value >>= simple_temp;
            omni_mutex_lock oml(accessPrivateData);
            energy_lo = simple_temp;
            // Update value of this property in propertySet also
            for (unsigned int j=0; j < propertySet.length(); j++ ) {
                if ( strcmp(propertySet[j].id, props[i].id) == 0 ) {
                    propertySet[j].value = props[i].value;
                    break;
                }
            }
            DEBUG(3, AutomaticGainControl, "prop (energy_lo): " << simple_temp)

        } else if (strcmp(props[i].id, "DCE:346e17c9-6678-483a-bffb-1909c64bddc0") == 0) {
开发者ID:nzneer,项目名称:ossie-june,代码行数:41,代码来源:AutomaticGainControl.cpp


示例12: query

void writeBytestoFile_i::query( CF::Properties & configProperties ) throw (CORBA::SystemException, CF::UnknownProperties)
{
	if( configProperties.length() == 0 )
	{
		configProperties.length( propertySet.length() );
		for( int i = 0; i < propertySet.length(); i++ )
		{
			configProperties[i].id = CORBA::string_dup( propertySet[i].id );
			configProperties[i].value = propertySet[i].value;
		}
		return;
	} else {
		for( int i = 0; i < configProperties.length(); i++ ) {
			for( int j = 0; j < propertySet.length(); j++ ) {
				if( strcmp(configProperties[i].id, propertySet[j].id) == 0 ) {
					configProperties[i].value = propertySet[j].value;
				}
			}
		}
	} // end if-else
}
开发者ID:nzneer,项目名称:ossie-june,代码行数:21,代码来源:writeBytestoFile.cpp


示例13: partitionProperties

void AllocationManager_impl::partitionProperties(const CF::Properties& properties, std::vector<CF::Properties>& outProps)
{
    std::set<std::string> identifiers;
    size_t start = 0;
    for (size_t index = 0; index < properties.length(); ++index) {
        const std::string propertyID(properties[index].id);
        if (identifiers.count(propertyID) > 0) {
            // Duplicate property, partition at this point
            outProps.push_back(ossie::corba::slice(properties, start, index));

            start = index;
            identifiers.clear();
        }
        identifiers.insert(propertyID);
    }

    // Copy remaining partition
    if (start < properties.length()) {
        outProps.push_back(ossie::corba::slice(properties, start));
    }
}
开发者ID:koonihc,项目名称:framework-core,代码行数:21,代码来源:AllocationManager_impl.cpp


示例14:

void
PropertySet_impl::configure (const CF::Properties & configProperties)
throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration,
CF::PropertySet::PartialConfiguration)
{
    if (propertySet.length () == 0)
    {
        propertySet.length (configProperties.length ());

        for (unsigned int i = 0; i < configProperties.length (); i++)
        {
            propertySet[i].id = CORBA::string_dup (configProperties[i].id);

            propertySet[i].value = configProperties[i].value;

            CORBA::Short len = -1;

            propertySet[i].value >>= len;
        }

        return;
    }
开发者ID:balister,项目名称:legacy-code,代码行数:22,代码来源:PropertySet_impl.cpp


示例15: checkDeviceMatching

bool AllocationManager_impl::checkDeviceMatching(ossie::Properties& prf, CF::Properties& externalProperties, const CF::Properties& dependencyProperties, const std::vector<std::string>& processorDeps, const std::vector<ossie::SPD::NameVersionPair>& osDeps)
{
    // Check for a matching processor, which only happens in deployment
    if (!processorDeps.empty()) {
        if (!ossie::checkProcessor(processorDeps, prf.getAllocationProperties())) {
            LOG_TRACE(AllocationManager_impl, "Device did not match requested processor");
            return false;
        } else {
            LOG_TRACE(AllocationManager_impl, "Matched processor name");
        }
    }

    // Likewise, check for OS name/version
    if (!osDeps.empty()) {
        if (!ossie::checkOs(osDeps, prf.getAllocationProperties())) {
            LOG_TRACE(AllocationManager_impl, "Device did not match requested OS name/version");
            return false;
        } else {
            LOG_TRACE(AllocationManager_impl, "Matched OS name/version");
        }
    }

    int matches = 0;

    for (unsigned int index = 0; index < dependencyProperties.length(); ++index) {
        const CF::DataType& dependency = dependencyProperties[index];
        const std::string propId(dependency.id);
        const ossie::Property* property = prf.getAllocationProperty(propId);

        if (!property) {
            LOG_TRACE(AllocationManager_impl, "Device has no property " << propId);
            return false;
        } else if (property->isExternal()) {
            // Collect properties with an action of "external" for a later
            // allocateCapacity() call
            LOG_TRACE(AllocationManager_impl, "Adding external property " << propId);
            ossie::corba::push_back(externalProperties, ossie::convertDataTypeToPropertyType(dependency, property));
        } else {
            // Evaluate matching properties right now
            if (!checkMatchingProperty(property, dependency)) {
                return false;
            } else {
                ++matches;
            }
        }
    }

    LOG_TRACE(AllocationManager_impl, "Matched " << matches << " properties");
    return true;
}
开发者ID:koonihc,项目名称:framework-core,代码行数:50,代码来源:AllocationManager_impl.cpp


示例16:

void
amplifier_i::query (CF::Properties & configProperties)
throw (CORBA::SystemException, CF::UnknownProperties)
{
// for queries of zero length, return all id/value pairs in propertySet
    if (configProperties.length () == 0) {
        configProperties.length (propertySet.length ());
        for (unsigned int i = 0; i < propertySet.length (); i++) {
            configProperties[i].id = CORBA::string_dup (propertySet[i].id);
            configProperties[i].value = propertySet[i].value;
        }

        return ;
    } else {
        for (unsigned int i = 0; i < configProperties.length(); i++) {
            for (unsigned int j=0; j < propertySet.length(); j++) {
                if ( strcmp(configProperties[i].id, propertySet[j].id) == 0 ) {
                    configProperties[i].value = propertySet[j].value;
                }
            }
        }
    }
}
开发者ID:darshanst,项目名称:opencpi,代码行数:23,代码来源:amplifier.cpp


示例17: throw

/* execute *****************************************************************
    - executes a process on the device
************************************************************************* */
CF::ExecutableDevice::ProcessID_Type ExecutableDevice_impl::execute (
    const char* name, 
    const CF::Properties& options, 
    const CF::Properties& parameters) 
        throw (CORBA::SystemException, 
                CF::Device::InvalidState, 
                CF::ExecutableDevice::InvalidFunction, 
                CF::ExecutableDevice::InvalidParameters, 
                CF::ExecutableDevice::InvalidOptions, 
                CF::InvalidFileName, 
                CF::ExecutableDevice::ExecuteFail)
{
    CORBA::TypeCode_var tc;                       // CORBA type code
    const char* tempStr;                          // temporary character string
    CF::ExecutableDevice::ProcessID_Type PID;     // process ID
    int size = 2 * parameters.length () + 2;      // length of the POSIX argv arguments
    char** argv = new char *[size];               // POSIX arguments
    CORBA::ULong stackSize, priority;             // CORBA unsigned longs for options storage

    // verify device is in the correct state
    if (!isUnlocked () || isDisabled ()) {
        DEBUG(5, ExecutableDevice_impl, "Cannot execute. System is either LOCKED, SHUTTING DOWN or DISABLED.")
        throw (CF::Device::InvalidState("Cannot execute. System is either LOCKED, SHUTTING DOWN or DISABLED."));
    }

    priority = 0;                                 // this is the default value for the priority (it's actually meaningless in this version)
    stackSize = 4096;                             // this is the default value for the stacksize (it's actually meaningless in this version)

    {
    // verify valid options, both STACK_SIZE_ID and PRIORITY_ID must have unsigned-long types
    CF::Properties invalidOptions;
    invalidOptions.length(0);

    for (unsigned i = 0; i < options.length (); i++) {
        tc = options[i].value.type ();

        // extract priority and stack size from the options list
        if (strcmp (options[i].id, CF::ExecutableDevice::PRIORITY_ID)) {
            if (tc->kind () == CORBA::tk_ulong) {
                options[i].value >>= priority; 
            } else {
                LOG_ERROR(ExecutableDevice_impl, "Incorrect type provided for option PRIORITY");
                invalidOptions.length(invalidOptions.length() + 1);
                invalidOptions[invalidOptions.length() - 1] = options[i];
            }
        } else if (strcmp (options[i].id, CF::ExecutableDevice::STACK_SIZE_ID)) {
开发者ID:Axios-Engineering,项目名称:framework-core,代码行数:49,代码来源:ExecutableDevice_impl.cpp


示例18: query

void FileManager_impl::query (CF::Properties& fileSysProperties)
    throw (CORBA::SystemException, CF::FileSystem::UnknownFileSystemProperties)
{
    TRACE_ENTER(FileManager_impl);

    CF::Properties unknownProps;

    // Lock the mount table shared to allow others to access the file system,
    // but prevent changes to the mount table itself.
    boost::shared_lock<boost::shared_mutex> lock(mountsLock);
    if (fileSysProperties.length () == 0) {
        LOG_TRACE(FileManager_impl, "Query all properties (SIZE, AVAILABLE_SPACE)");
        fileSysProperties.length(2);
        fileSysProperties[0].id = CORBA::string_dup("SIZE");
        CORBA::ULongLong size = getSize();
        size += getCombinedProperty(CF::FileSystem::SIZE);
        fileSysProperties[0].value <<= size;
        fileSysProperties[1].id = CORBA::string_dup("AVAILABLE_SPACE");
        CORBA::ULongLong available = getAvailableSpace();
        available += getCombinedProperty(CF::FileSystem::AVAILABLE_SPACE);
        fileSysProperties[1].value <<= available;
    } else {
        for (CORBA::ULong index = 0; index < fileSysProperties.length(); ++index) {
            if (strcmp (fileSysProperties[index].id, CF::FileSystem::SIZE) == 0) {
                CORBA::ULongLong size = getSize();
                size += getCombinedProperty(CF::FileSystem::SIZE);
                fileSysProperties[index].value <<= size;
            } else if (strcmp(fileSysProperties[index].id, CF::FileSystem::AVAILABLE_SPACE) == 0) {
                CORBA::ULongLong available = getAvailableSpace();
                available += getCombinedProperty(CF::FileSystem::AVAILABLE_SPACE);
                fileSysProperties[index].value <<= available;
            } else {
                CORBA::ULong count = unknownProps.length();
                unknownProps.length(count+1);
                unknownProps[count] = fileSysProperties[index];
            }
        }
    }

    if (unknownProps.length() > 0) {
        throw CF::FileSystem::UnknownFileSystemProperties(unknownProps);
    }

    TRACE_EXIT(FileManager_impl)
}
开发者ID:a100lesserfaces,项目名称:framework-core,代码行数:45,代码来源:FileManager_impl.cpp


示例19: testCallbacks

void TestCppsoftpkgDeps::testCallbacks (CF::Properties& testValues)
{
    // Check whether the property change callbacks are executed for the properties
    // given in 'testValues'. The values in 'testValues' are updated to a boolean
    // that indicates if a callback occurred.

    // Reset the results to prevent false positives.
    testCallbackResults.clear();
    LOG_DEBUG(TestCppsoftpkgDeps, "Calling configure with test values");
    configure(testValues);
    for (CORBA::ULong ii = 0; ii < testValues.length(); ++ii) {
        const std::string id = static_cast<const char*>(testValues[ii].id);
        if (testCallbackResults.count(id)) {
            LOG_DEBUG(TestCppsoftpkgDeps, "Callback was triggered for property " << id);
            testValues[ii].value <<= true;
        } else {
            LOG_DEBUG(TestCppsoftpkgDeps, "Callback was NOT triggered for property " << id);
            testValues[ii].value <<= false;
        }
    }
}
开发者ID:RedhawkSDR,项目名称:framework-core,代码行数:21,代码来源:TestCppsoftpkgDeps.cpp


示例20: configure

void AmFmPmBasebandDemod_i::configure(const CF::Properties & props) throw (CORBA::SystemException, CF::PropertySet::InvalidConfiguration, CF::PropertySet::PartialConfiguration)
{
	debugOut("configure() entry");
    AmFmPmBasebandDemod_base::configure(props);
    for (CORBA::ULong i=0; i< props.length(); ++i) {
    	const std::string id = (const char*) props[i].id;
    	PropertyInterface* property = getPropertyFromId(id);
    	if (property->id=="squelch") {
    		squelchThreshold = std::pow(10.0,squelch / 10);
    	}
    	else if (property->id=="freqDeviation" || property->id=="phaseDeviation") {
    		DemodParamsChanged = true;
    	}
    }
    if(debug)
    {
    	std::cout <<"AmFmPmBasebandDemod_i::configure() - freqDeviation    = "<<freqDeviation<<std::endl;
    	std::cout <<"AmFmPmBasebandDemod_i::configure() - phaseDeviation   = "<<phaseDeviation<<std::endl;
    	std::cout <<"AmFmPmBasebandDemod_i::configure() - squelch          = "<<squelch<<std::endl;
    	std::cout <<"AmFmPmBasebandDemod_i::configure() - squelchThreshold = "<<squelchThreshold<<std::endl;
    	std::cout <<"AmFmPmBasebandDemod_i::configure() - debug            = "<<debug<<std::endl;
    }
}
开发者ID:Axios-Engineering,项目名称:basic-components,代码行数:23,代码来源:AmFmPmBasebandDemod.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ cfilesearch::XStringVector类代码示例发布时间:2022-05-31
下一篇:
C++ cereal::CerealPort类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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