> 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/1.0-2/references/parser/twefmt/packet-types/twepacketpal/palbase/palmag.md).

# PalMag

```cpp
struct PalMag : public PalBase {
	const uint8_t U8VARS_CT = 2; // センサー数
	const uint32_t STORE_COMP_MASK = (1 << U8VARS_CT) - 1; // 全コンプのマスク
	
  uint16_t u16Volt; // 電源電圧
	uint8_t u8MagStat; // 開閉状況 (0:磁石が遠い, 1/2:磁石検出)
	uint8_t bRegularTransmit; // 定期送信の時に 1, 磁石検出では 0
};
```
