> For the complete documentation index, see [llms.txt](https://mwm5.twelite.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mwm5.twelite.info/references/parser/twefmt/packet-types/twepacketpal/palevent.md).

# PalEvent

```cpp
	struct PalEvent {
		// uint8_t b_stored;       // 格納されていたら true
		uint8_t u8event_source; // 予備
		uint8_t u8event_id;     // イベントID
		uint32_t u32event_param;// イベントパラメータ
	};
```

PALイベントは、センサーなどの情報を直接送るのではなく、センサー情報を加工し一定の条件が成立したときに送信される情報です。例えば加速度センサーの静止状態から一定以上の加速度が検出された場合などです。

イベントデータが存在する場合は`TwePacketPal`の`.is_PalEvent()`がtrueになることで判定でき、`.get_PalEvent()`により`PalEvent`データ構造を得られます。
