# TweCUE

```cpp
struct TweCUE : public PalBase {
	static const int MAX_SAMPLES = 10;

	static const uint8_t U8VARS_CT = MAX_SAMPLES + 3; // センサー数
	static const uint32_t STORE_COMP_MASK = 0b1111; // 電圧と開閉状況、ADC1、加速度サンプル１あればコンプとする

	uint16_t u16Volt;	// 電源電圧
	uint16_t u16Adc1;	// ADC1電圧

	uint8_t u8MagStat;  // 開閉状況 (0:磁石が遠い, 1/2:磁石検出)
	uint8_t bMagRegularTransmit; // 定期送信の時に 1, 磁石検出では 0

	uint8_t u8samples;  // 格納サンプル数
	uint8_t u8sample_rate_code; // サンプリング周波数 (0: 25Hz, 4:100Hz)

	int16_t i16X[10]; // X軸 (ミリG)
	int16_t i16Y[10]; // Y軸
	int16_t i16Z[10]; // Z軸
};
```

※ パケット間の各サンプルの連続性を確認するには、パケットのシーケンス番号の抜けが無いことを確認してください。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mwm5.twelite.info/references/parser/twefmt/packet-types/twepacketpal/palbase/twecue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
