コード例 #1
0
UNIQUEID c_uniqueIdService::createUniqueIdByQualifiedName(UNIQUEIDNAME _uniqueIdName, bool  ErD){

	UNIQUEID _uniqueId = getUniqueIdByUniqueName(_uniqueIdName);
	if (ZERO_VALUE == _uniqueId)
	{
		Counter_Elements  csElements;

		// Do not assign unique Id 255 to any one. it is used as stop identification 
		// when posting output data with event connection
		uniqueId = getNextUniqueId();
		_uniqueId = (uniqueId == 255) ? getNextUniqueId() : uniqueId;
		m_uniqueIdList.insert(make_pair(_uniqueIdName, _uniqueId));

		//create counter Id list while creating unique Id itself
		csElements.uniqueName = _uniqueIdName;
		csElements.count = ZERO_VALUE;
		csElements.isForced = false;
		c_counterService::getInstance().createCounterIdByElementName(_uniqueId, csElements, ErD);

		FZRTE_DEBUG("UniqueIdService : %s : %u", _uniqueIdName.c_str(), _uniqueId);
	}

	return _uniqueId;
}
コード例 #2
0
void DeviceDescriptor::attach(const sp<HwModule>& module)
{
    AudioPort::attach(module);
    mId = getNextUniqueId();
}