         data_left.appendData(RxDataBuffer.subdataWithRange(NSMakeRange(packetlen+1, RxDataBuffer.length-packetlen-1)))
         RxDataBuffer = data_left
         
+        var decoded = false
         
         // measurement messages (normal and evented)
         ///////////////////////////////////////////
         if msg.types == .Simple {
-          
+          decoded = true
           let name = msg.simpleMessage.name
           
           // build measurement message

        // Command Response messages
        /////////////////////////////
        if msg.types == .CommandResponse {
          
          let name = msg.commandResponse.types.toString()
          

          if msg.simpleMessage.value.hasNumericValue {rsp.value = msg.simpleMessage.value.numericValue}
          if msg.simpleMessage.hasEvent {
            rsp.isEvented = true
            if msg.simpleMessage.event.hasStringValue {rsp.event = msg.simpleMessage.event.stringValue}
            if msg.simpleMessage.event.hasBooleanValue {rsp.event = msg.simpleMessage.event.booleanValue}
            if msg.simpleMessage.event.hasNumericValue {rsp.event = msg.simpleMessage.event.numericValue}
          }
          
          // capture this message into the dictionary of latest messages
