GenericLogcatEventParser

public class GenericLogcatEventParser
extends Object

java.lang.Object
com.android.tradefed.util.GenericLogcatEventParser <LogcatEventType>


تحليل المدخلات logcat للأحداث.

يفسر هذا الفصل رسائل logcat ويمكنه إعلام المستمع بالأحداث بطريقة الحظر والاستطلاع.

ملخص

فئات متداخلة

class GenericLogcatEventParser.LogcatEvent

بنية لعقد حدث logcat مع نوع الحدث وتشغيل رسالة logcat

المنشأت العامة

GenericLogcatEventParser ( ITestDevice device)

يجسد LogcatEventParser جديدًا

الأساليب العامة

void close ()

توقف عن الاستماع إلى logcat.

void parseEvents (String[] lines)

تحليل سطور logcat وإضافة أي أحداث تم التقاطها (التي تم تسجيلها مع registerEventTrigger(String, String, LogcatEventType) ) إلى قائمة انتظار الحدث.

GenericLogcatEventParser.LogcatEvent pollForEvent ()

استطلاعات الرأي في قائمة انتظار الحدث.

void registerEventTrigger (String tag, String msg, LogcatEventType response)

قم بتسجيل حدث لعلامة logcat ورسالة مع الاستجابة المطلوبة.

void registerEventTrigger (Log.LogLevel logLevel, String tag, String msg, LogcatEventType response)

سجل حدثًا بمستوى logcat ، وسم ورسالة مع الاستجابة المطلوبة.

void start ()

ابدأ بالاستماع إلى logcat وتحليل الأحداث.

GenericLogcatEventParser.LogcatEvent waitForEvent (long timeoutMs)

كتل حتى يتلقى الحدث.

المنشأت العامة

GenericLogcatEventParser

public GenericLogcatEventParser (ITestDevice device)

يجسد LogcatEventParser جديدًا

حدود
device ITestDevice : لقراءة logcat من

الأساليب العامة

يغلق

public void close ()

توقف عن الاستماع إلى logcat.

تحليل الأحداث

public void parseEvents (String[] lines)

تحليل سطور logcat وإضافة أي أحداث تم التقاطها (التي تم تسجيلها مع registerEventTrigger(String, String, LogcatEventType) ) إلى قائمة انتظار الحدث.

حدود
lines String

استطلاع للحدث

public GenericLogcatEventParser.LogcatEvent pollForEvent ()

استطلاعات الرأي في قائمة انتظار الحدث. يعود على الفور.

عائدات
GenericLogcatEventParser.LogcatEvent الحدث أو null إذا لم يتم العثور على حدث مطابق

سجل الحدث

public void registerEventTrigger (String tag, 
                String msg, 
                LogcatEventType response)

قم بتسجيل حدث لعلامة logcat ورسالة مع الاستجابة المطلوبة. قد تكون الرسالة جزئية.

حدود
tag String

msg String

response LogcatEventType

سجل الحدث

public void registerEventTrigger (Log.LogLevel logLevel, 
                String tag, 
                String msg, 
                LogcatEventType response)

سجل حدثًا بمستوى logcat ، وسم ورسالة مع الاستجابة المطلوبة. قد تكون الرسالة جزئية.

حدود
logLevel Log.LogLevel

tag String

msg String

response LogcatEventType

يبدأ

public void start ()

ابدأ بالاستماع إلى logcat وتحليل الأحداث.

انتظر الحدث

public GenericLogcatEventParser.LogcatEvent waitForEvent (long timeoutMs)

كتل حتى يتلقى الحدث.

حدود
timeoutMs long : حان وقت الانتظار بالمللي ثانية

عائدات
GenericLogcatEventParser.LogcatEvent الحدث أو null إذا تم الوصول إلى المهلة