# ToCoNet\_vChConfig()

## 解説

チャネルを変更します。

{% hint style="info" %}
`ToCoNet_vRfConfig()` はチャネル以外の設定も適用しますが、本関数はチャネルのみの変更となります。
{% endhint %}

{% hint style="warning" %}
送信中や受信中などチャネル変更できないタイミングでは、変更が行われません。変更が行われない場合は [`sToCoNet_AppContext.u8Channel`](/twelite-net-api-ref/gou-zao-ti/stoconet_appcontext.md) の値が変更前のチャネルに戻されます。
{% endhint %}

{% hint style="warning" %}
[モジュール](/twelite-net-api-expl/mojru.md) `ToCoNet_USE_MOD_CHANNEL_MGR` を利用する場合は、本関数によるチャネル変更は行われません。
{% endhint %}

## 引数

なし

## 戻り値

なし

## サンプル

```c
sToCoNet_AppContext.u8Channel = 25;
ToCoNet_vChConfig();
if (sToCoNet_AppContext.u8Channel != 25) {
  // Oops! Channel is not changed to 25.
}
```


---

# 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://sdk.twelite.info/twelite-net-api-ref/twelite-net-guan-shu/toconet_vchconfig.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.
