Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void RPCServer::GetPortCoreCountInfo( IxServerType::PortAddressList const & ports, IxServerType::PortCoreCountInfoVector & count )
- {
- MILESTONE_RPF_METHOD
- CBackplane* theBackplane = CDoc::GetDocument()->GetBackplane();
- CHECK (theBackplane);
- std::string& serverIp = m_connectedServerIP;
- std::for_each(ports.begin(), ports.end(),
- [&theBackplane, &serverIp, &count](const boost::shared_ptr<IxServerType::PortAddress>& port)
- {
- IxConcurrencyUtils::IxStLocker<CBackplane> lk(*theBackplane);
- CPort* pPort = CDoc::GetDocument()->Chassis().GetPort(port->cardId, port->portId);
- if (pPort && pPort->IsValidFeature(CPort::kFeatureCpuCoreCount))
- {
- ICpuCoreCount* cpuCoreCount = dynamic_cast<ICpuCoreCount*>(pPort);
- if(cpuCoreCount)
- {
- boost::shared_ptr<IxServerType::PortCoreCountInfo> portCoreCountInfo(new IxServerType::PortCoreCountInfo());
- portCoreCountInfo->portId.chassisIP = serverIp;
- portCoreCountInfo->portId.cardId = pPort->Id().wCard;
- portCoreCountInfo->portId.portId = pPort->Id().wPort;
- portCoreCountInfo->coreCount = cpuCoreCount->GetCoreCount();
- portCoreCountInfo->reservedCoreCount = cpuCoreCount->GetReservedCoreCount();
- count.push_back(portCoreCountInfo);
- }
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement