void QsfpModule::detectTransceiverLocked() { auto currentQsfpStatus = qsfpImpl_->detectTransceiver(); if (currentQsfpStatus != present_) { LOG(INFO) << "Port: " << folly::to<std::string>(qsfpImpl_->getName()) << " QSFP status changed to " << currentQsfpStatus; } setPresent(currentQsfpStatus); if (currentQsfpStatus) { updateQsfpData(); } }
void QsfpModule::detectTransceiver() { lock_guard<std::mutex> g(qsfpModuleMutex_); auto currentQsfpStatus = qsfpImpl_->detectTransceiver(); if (currentQsfpStatus != present_) { LOG(INFO) << "Port: " << folly::to<std::string>(qsfpImpl_->getName()) << " QSFP status changed to " << currentQsfpStatus; setPresent(currentQsfpStatus); if (currentQsfpStatus) { updateQsfpData(); customizeTransceiver(); } } }
void QsfpModule::updateTransceiverInfoFields() { lock_guard<std::mutex> g(qsfpModuleMutex_); updateQsfpData(); }