「App:Library:LVGL:docs:Others:Monkey」の版間の差分
(ページの作成:「https://docs.lvgl.io/8.2/others/index.html __NOTOC__ {| class="wikitable" !英文 !自動翻訳 |- | | |} * Snapshot * App:Li…」) |
(→Usage) |
||
(同じ利用者による、間の12版が非表示) | |||
1行目: | 1行目: | ||
− | https://docs.lvgl.io/8.2/others/ | + | https://docs.lvgl.io/8.2/others/monkey.html |
__NOTOC__ | __NOTOC__ | ||
{| class="wikitable" | {| class="wikitable" | ||
9行目: | 9行目: | ||
|} | |} | ||
− | |||
− | |||
− | |||
+ | |||
+ | = Monkey = | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
+ | A simple monkey test. Use random input to stress test the application. | ||
+ | |簡単なサルのテスト。ランダム入力を使用して、アプリケーションのストレステストを行います。 | ||
+ | |} | ||
+ | :[[App:Library:LVGL:docs:Others|戻る : Previous]] | ||
+ | == Usage == | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
+ | Enable <code style="color: #bb0000;">LV_USE_MONKEY</code> in <code style="color: #bb0000;">lv_conf.h</code>. | ||
− | --- | + | First configure monkey, use <code style="color: #bb0000;">lv_monkey_config_t</code> to define the configuration structure, set the <code style="color: #bb0000;">type</code> (check for the supported types), and then set the range of <code style="color: #bb0000;">period_range</code> and <code style="color: #bb0000;">input_range</code>, the monkey will output random operations at random times within this range. |
− | [https:// | + | |
+ | Call <code style="color: #bb0000;">lv_monkey_create</code> to create monkey. | ||
+ | |||
+ | Finally call <code style="color: #bb0000;">lv_monkey_set_enable(monkey, true)</code> to enable monkey. | ||
+ | |||
+ | |||
+ | If you want to pause the monkey, call <code style="color: #bb0000;">lv_monkey_set_enable(monkey, false)</code>. | ||
+ | |||
+ | To delete the monkey, call <code style="color: #bb0000;">lv_monkey_del(monkey)</code>. | ||
+ | |||
+ | Note that <code style="color: #bb0000;">input_range</code> has different meanings in different <code style="color: #bb0000;">type</code>: | ||
+ | |||
+ | * <code style="color: #bb0000;">LV_INDEV_TYPE_POINTER</code> No effect, click randomly within the pixels of the screen resolution. | ||
+ | * <code style="color: #bb0000;">LV_INDEV_TYPE_ENCODER</code> The minimum and maximum values of <code style="color: #bb0000;">enc_diff</code>. | ||
+ | * <code style="color: #bb0000;">LV_INDEV_TYPE_BUTTON</code> The minimum and maximum values of <code style="color: #bb0000;">btn_id</code>. Use <code style="color: #bb0000;">lv_monkey_get_indev()</code> to get the input device, and use <code style="color: #bb0000;">lv_indev_set_button_points()</code> to map the key ID to the coordinates. | ||
+ | * <code style="color: #bb0000;">LV_INDEV_TYPE_KEYPAD</code> No effect, Send random . | ||
+ | | | ||
+ | <code style="color: #bb0000;">lv_conf.h</code>で<code style="color: #bb0000;">LV_USE_MONKEY</code>を有効にします。 | ||
+ | |||
+ | 最初にmonkeyを構成し、<code style="color: #bb0000;">lv_monkey_config_t</code>を使用して構成構造を定義し、 <code style="color: #bb0000;">type</code>を設定(サポートされているタイプの'''入力デバイス'''を確認)してから、<code style="color: #bb0000;">period_range</code>と<code style="color: #bb0000;">input_range</code>の範囲を設定すると、monkeyはこの範囲内のランダムな時間にランダムな操作を出力します。 | ||
+ | |||
+ | 猿を作成するために<code style="color: #bb0000;">lv_monkey_create</code>を呼び出します。 | ||
+ | |||
+ | 最後に、猿を有効にするために<code style="color: #bb0000;">lv_monkey_set_enable(monkey, true)</code>を呼び出します。 | ||
+ | |||
+ | |||
+ | 猿を一時停止したい場合は、<code style="color: #bb0000;">lv_monkey_set_enable(monkey, false)</code>を呼び出します。 | ||
+ | |||
+ | サルを削除するには、<code style="color: #bb0000;">lv_monkey_del(monkey)</code>を呼び出します。 | ||
+ | |||
+ | |||
+ | <code style="color: #bb0000;">input_range</code>は異なる<code style="color: #bb0000;">type</code>では異なる意味を持つことに注意してください: | ||
+ | |||
+ | *<code style="color: #bb0000;">LV_INDEV_TYPE_POINTER</code>効果はありません。画面解像度のピクセル内でランダムにクリックします。 | ||
+ | *<code style="color: #bb0000;">LV_INDEV_TYPE_ENCODER</code>の最小値と最大値<code style="color: #bb0000;">enc_diff</code>。 | ||
+ | *<code style="color: #bb0000;">LV_INDEV_TYPE_BUTTON</code>の最小値と最大値<code style="color: #bb0000;">btn_id</code>。を使用<code style="color: #bb0000;">lv_monkey_get_indev()</code>して入力デバイスを取得し、を使用<code style="color: #bb0000;">lv_indev_set_button_points()</code>してキーIDを座標にマッピングします。 | ||
+ | *<code style="color: #bb0000;">LV_INDEV_TYPE_KEYPAD</code>簡単なサルのテスト。効果なし、ランダムキ'''ー'''を送信します。 | ||
+ | |} | ||
+ | :[[App:Library:LVGL:docs:Others|戻る : Previous]] | ||
+ | |||
+ | |||
+ | == Example == | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
+ | === Touchpad monkey example === | ||
+ | |||
+ | [[file:LVGL docs others gridnav 03.png|lin=https://docs.lvgl.io/8.2/others/monkey.html]] | ||
+ | | | ||
+ | |- | ||
+ | | | ||
+ | === Encoder monkey example === | ||
+ | |||
+ | [[file:LVGL docs others gridnav 03.png|lin=https://docs.lvgl.io/8.2/others/monkey.html]] | ||
+ | | | ||
+ | |- | ||
+ | | | ||
+ | === Button monkey example === | ||
+ | |||
+ | [[file:LVGL docs others gridnav 03.png|lin=https://docs.lvgl.io/8.2/others/monkey.html]] | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | == API == | ||
+ | {| class="wikitable" | ||
+ | !英文 | ||
+ | !自動翻訳 | ||
+ | |- | ||
+ | | | ||
+ | Typedefs | ||
+ | |||
+ | typedef struct _lv_monkey lv_monkey_t | ||
+ | : | ||
+ | |||
+ | Functions | ||
+ | |||
+ | <span style="background-color: #e7f2facolor: #2980b9;">void lv_monkey_config_init( *config) </span> | ||
+ | : Initialize a monkey config with default values | ||
+ | : Parameters | ||
+ | :: config -- pointer to '' variable to initialize | ||
+ | |||
+ | <span style="background-color: #e7f2facolor: #2980b9;"> *lv_monkey_create(const *config) </span> | ||
+ | : Create monkey for test | ||
+ | : Parameters | ||
+ | :: config -- pointer to '' variable | ||
+ | : Returns | ||
+ | :: pointer to the created monkey | ||
+ | |||
+ | <span style="background-color: #e7f2facolor: #2980b9;"> *lv_monkey_get_indev( *monkey) </span> | ||
+ | : Get monkey input device | ||
+ | : Parameters | ||
+ | :: monkey -- pointer to a monkey | ||
+ | : Returns | ||
+ | :: pointer to the input device | ||
+ | |||
+ | <span style="background-color: #e7f2facolor: #2980b9;">void lv_monkey_set_enable( *monkey, bool en) </span> | ||
+ | : Enable monkey | ||
+ | : Parameters | ||
+ | ::* monkey -- pointer to a monkey | ||
+ | ::* en -- set to true to enable | ||
+ | |||
+ | <span style="background-color: #e7f2facolor: #2980b9;">bool lv_monkey_get_enable( *monkey) </span> | ||
+ | : Get whether monkey is enabled | ||
+ | : Parameters | ||
+ | :: monkey -- pointer to a monkey | ||
+ | : Returns | ||
+ | :: return true if monkey enabled | ||
+ | |||
+ | <span style="background-color: #e7f2facolor: #2980b9;">void lv_monkey_set_user_data( *monkey, void *user_data) </span> | ||
+ | : Set the user_data field of the monkey | ||
+ | : Parameters | ||
+ | ::* monkey -- pointer to a monkey | ||
+ | ::* user_data -- pointer to the new user_data. | ||
+ | |||
+ | <span style="background-color: #e7f2facolor: #2980b9;">void *lv_monkey_get_user_data( *monkey) </span> | ||
+ | : Get the user_data field of the monkey | ||
+ | : Parameters | ||
+ | :: monkey -- pointer to a monkey | ||
+ | : Returns | ||
+ | :: the pointer to the user_data of the monkey | ||
+ | |||
+ | <span style="background-color: #e7f2facolor: #2980b9;">void lv_monkey_del( *monkey) </span> | ||
+ | : Delete monkey | ||
+ | : Parameters | ||
+ | :: monkey -- pointer to monkey | ||
+ | |||
+ | <span style="background-color: #e7f2facolor: #2980b9;">struct lv_monkey_config_t </span> | ||
+ | : Public Members | ||
+ | : <span style="background-color: #eeeeee;"> type </span> | ||
+ | :: < Input device type Monkey execution period | ||
+ | : <span style="background-color: #eeeeee;">uint32_t min </span> | ||
+ | :: | ||
+ | : <span style="background-color: #eeeeee;">uint32_t max </span> | ||
+ | :: | ||
+ | : <span style="background-color: #eeeeee;">ruct ::[anonymous] period_range</nowiki></span> | ||
+ | :: The range of input value | ||
+ | : <span style="background-color: #eeeeee;">int32_t min</span> | ||
+ | : <span style="background-color: #eeeeee;">int32_t max</span> | ||
+ | : <span style="background-color: #eeeeee;">struct ::[anonymous] input_range</span> | ||
+ | | | ||
+ | |||
+ | |||
+ | Typedef | ||
+ | |||
+ | typedef struct _lv_monkey lv_monkey_t | ||
+ | : | ||
+ | |||
+ | 機能 | ||
+ | |||
+ | void lv_monkey_config_init('''lv_monkey_config_t''' * config) | ||
+ | |||
+ | : デフォルト値でサルの設定を初期化します | ||
+ | : パラメーター | ||
+ | :: 簡単なサルのテスト。'''config--初期化する' lv_monkey_config_t''' '変数へのポインタ | ||
+ | |||
+ | '''lv_monkey_t''' * lv_monkey_create(const '''lv_monkey_config_t''' * config) | ||
+ | |||
+ | : テスト用のサルを作成する | ||
+ | : パラメーター | ||
+ | :: config- '''<nowiki/>'lv_monkey_config_t''' '変数へのポインタ | ||
+ | : 戻り値 | ||
+ | :: 作成されたサルへのポインタ | ||
+ | |||
+ | '''lv_indev_t''' * lv_monkey_get_indev( '''lv_monkey_t''' * monkey) | ||
+ | |||
+ | : サルの入力デバイスを取得する | ||
+ | : パラメーター | ||
+ | :: サル-サルへのポインタ | ||
+ | : 戻り値 | ||
+ | :: 入力デバイスへのポインタ | ||
+ | |||
+ | void lv_monkey_set_enable('''lv_monkey_t''' * monkey、bool en) | ||
+ | |||
+ | : サルを有効にする | ||
+ | : パラメーター | ||
+ | ::* サル-サルへのポインタ | ||
+ | ::* en-trueに設定して有効にします | ||
+ | |||
+ | bool lv_monkey_get_enable('''lv_monkey_t''' * monkey) | ||
+ | |||
+ | : サルが有効かどうかを確認する | ||
+ | : パラメーター | ||
+ | :: サル-サルへのポインタ | ||
+ | : 戻り値 | ||
+ | :: サルが有効な場合はtrueを返します | ||
+ | |||
+ | void lv_monkey_set_user_data('''lv_monkey_t''' * monkey、void * user_data) | ||
+ | |||
+ | : サルのuser_dataフィールドを設定します | ||
+ | : パラメーター | ||
+ | ::* サル-サルへのポインタ | ||
+ | ::* user_data-新しいuser_dataへのポインタ。 | ||
+ | |||
+ | void * lv_monkey_get_user_data('''lv_monkey_t''' * monkey) | ||
+ | |||
+ | : サルのuser_dataフィールドを取得します | ||
+ | : パラメーター | ||
+ | :: サル-サルへのポインタ | ||
+ | : 戻り値 | ||
+ | :: サルのuser_dataへのポインタ | ||
+ | |||
+ | void lv_monkey_del('''lv_monkey_t''' * monkey) | ||
+ | |||
+ | : サルを削除する | ||
+ | : パラメーター | ||
+ | :: サル-サルへのポインタ | ||
+ | |||
+ | struct lv_monkey_config_t | ||
+ | |||
+ | : パブリックメンバー | ||
+ | : '''lv_indev_type_t'''タイプ | ||
+ | :: <入力デバイスタイプモンキー実行期間 | ||
+ | : uint32_t min | ||
+ | :: | ||
+ | : uint32_t max | ||
+ | :: | ||
+ | : ruct '''lv_monkey_config_t''' :: [anonymous] period_range </ nowiki> | ||
+ | :: 入力値の範囲 | ||
+ | : int32_t min | ||
+ | : int32_t max | ||
+ | : struct '''lv_monkey_config_t''' ::[匿名]input_range | ||
+ | |} | ||
+ | :[[App:Library:LVGL:docs:Others|戻る : Previous]] |
2022年6月29日 (水) 10:56時点における最新版
https://docs.lvgl.io/8.2/others/monkey.html
英文 | 自動翻訳 |
---|---|
Monkey
英文 | 自動翻訳 |
---|---|
A simple monkey test. Use random input to stress test the application. |
簡単なサルのテスト。ランダム入力を使用して、アプリケーションのストレステストを行います。 |
Usage
英文 | 自動翻訳 |
---|---|
Enable
Call Finally call
To delete the monkey, call Note that
|
最初にmonkeyを構成し、 猿を作成するために 最後に、猿を有効にするために
サルを削除するには、
|
Example
英文 | 自動翻訳 |
---|---|
Touchpad monkey example |
|
Encoder monkey example |
|
Button monkey example |
API
英文 | 自動翻訳 |
---|---|
Typedefs typedef struct _lv_monkey lv_monkey_t Functions void lv_monkey_config_init( *config)
*lv_monkey_create(const *config)
*lv_monkey_get_indev( *monkey)
void lv_monkey_set_enable( *monkey, bool en)
bool lv_monkey_get_enable( *monkey)
void lv_monkey_set_user_data( *monkey, void *user_data)
void *lv_monkey_get_user_data( *monkey)
void lv_monkey_del( *monkey)
struct lv_monkey_config_t
|
typedef struct _lv_monkey lv_monkey_t 機能 void lv_monkey_config_init(lv_monkey_config_t * config)
lv_monkey_t * lv_monkey_create(const lv_monkey_config_t * config)
lv_indev_t * lv_monkey_get_indev( lv_monkey_t * monkey)
void lv_monkey_set_enable(lv_monkey_t * monkey、bool en)
bool lv_monkey_get_enable(lv_monkey_t * monkey)
void lv_monkey_set_user_data(lv_monkey_t * monkey、void * user_data)
void * lv_monkey_get_user_data(lv_monkey_t * monkey)
void lv_monkey_del(lv_monkey_t * monkey)
struct lv_monkey_config_t
|