     vmlog("VehicleManager connect started")
     centralManager.connectPeripheral(openXCPeripheral, options:nil)
     connectionState = .ConnectionInProgress
-    messageCount = 0
     
   }
   

  // public variable holding number of messages received since last Connection established
  public var messageCount: Int = 0
  
  
  // dictionary holding last received measurement message for each measurement type
  private var latestVehicleMeasurements: NSMutableDictionary! = NSMutableDictionary()
  
  
  

    if openXCPeripheral == nil {
      
      // only find the right kinds of the BLE devices (C5 VI)
      if let advNameCheck : String = advertisementData["kCBAdvDataLocalName"] as? String {
        let advName = advNameCheck.uppercaseString
        if advName.hasPrefix(OpenXCConstants.C5_VI_NAME_PREFIX) {
          // check to see if we already have this one
          // and save the discovered peripheral
          if foundOpenXCPeripherals[advName] == nil {
            vmlog("FOUND:")
            vmlog(peripheral.identifier.UUIDString)
            vmlog(advertisementData["kCBAdvDataLocalName"])
            
            foundOpenXCPeripherals[advName] = peripheral
            
            // if we're in auto connect mode, just connect right away
            if autoConnectPeripheral {
              connect()
            }
            
            // notify client if the callback is enabled
            if let act = managerCallback {
              act.performAction(["status":VehicleManagerStatusMessage.C5DETECTED.rawValue] as NSDictionary)
            }
            
          }
        }
        
      }
      
    }
