Example #1
0
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();
  }
}
Example #2
0
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();
        }
    }
}
Example #3
0
void QsfpModule::updateTransceiverInfoFields() {
    lock_guard<std::mutex> g(qsfpModuleMutex_);
    updateQsfpData();
}