Ejemplo n.º 1
0
////////////////////////////////////////////////////////////////////////////////////
///
///   \return List of manually created connections to JAUS components.  These
///           are connections not made through the discovery process and cannot
///           be closed through discovery either (only manually).
///
////////////////////////////////////////////////////////////////////////////////////
Address::List JUDP::GetManualConnections() const
{
    Address::List copy;
    {
        Mutex::ScopedLock lock(&mClientsMutex);
        std::map<Address, bool>::const_iterator p;
        for(p = mPermanentConnections.begin();
            p != mPermanentConnections.end();
            p++)
        {
            copy.push_back(p->first);
        }
    }
    return copy;
}
Ejemplo n.º 2
0
////////////////////////////////////////////////////////////////////////////////////
///
///   \return List of all components currently controlled by the service.
///
////////////////////////////////////////////////////////////////////////////////////
Address::List AccessControl::GetControlledComponents() const
{
    Mutex::ScopedLock lock(&mControlMutex);
    Address::List result;
    std::map<Address, bool>::const_iterator flags;
    for(flags = mControlFlags.begin();
        flags != mControlFlags.end();
        flags++)
    {
        if(flags->second)
        {
            result.push_back(flags->first);
        }
    }
    return result;
}
Ejemplo n.º 3
0
////////////////////////////////////////////////////////////////////////////////////
///
///   \brief Gets the Subsystem::Configuration of the subsystem.
///
////////////////////////////////////////////////////////////////////////////////////
Address::List Subsystem::GetAddressList() const
{
    Address::List results;
    Configuration::const_iterator node;
    for(node = mConfiguration.begin();
        node != mConfiguration.end();
        node++)
    {
        Component::Set::const_iterator component;
        for(component = node->second.begin();
            component != node->second.end();
            component++)
        {
            results.push_back(component->mID);
        }
    }
    return results;
}
Ejemplo n.º 4
0
bool Document::SetMultiCell(Address const& rAddr, MultiCell* pMultiCell, bool Force)
{
  if (Force == false)
  {
    MultiCell::Map::iterator itMultiCell = m_MultiCells.find(rAddr);
    if (itMultiCell != m_MultiCells.end())
      return false;
  }

  m_MultiCells[rAddr] = pMultiCell;
  m_spDatabase->AddMultiCell(rAddr, *pMultiCell);

  m_DocumentUpdatedSignal();
  Address::List AddressList;
  AddressList.push_back(rAddr);
  m_AddressUpdatedSignal(AddressList);
  return true;
}
Ejemplo n.º 5
0
////////////////////////////////////////////////////////////////////////////////////
///
///   \param[in] name Name of Service to look for.
///
///   \return List of component IDs for those supporting a specific Service.
///
////////////////////////////////////////////////////////////////////////////////////
Address::List Subsystem::GetComponentsWithService(const std::string& name) const
{
    Address::List results;
    Configuration::const_iterator node;
    for(node = mConfiguration.begin();
        node != mConfiguration.end();
        node++)
    {
        Component::Set::const_iterator component;
        for(component = node->second.begin();
            component != node->second.end();
            component++)
        {
            Service::ID::Set::const_iterator service;
            service = component->mServices.find(Service::ID(name));
            if(service != component->mServices.end())
            {
                results.push_back(component->mID);
            }
        }
    }
    return results;
}