|
| 1 | +// Copyright 2025 Espressif Systems (Shanghai) PTE LTD |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +#pragma once |
| 16 | + |
| 17 | +#include <esp_err.h> |
| 18 | + |
| 19 | +#include <app/TestEventTriggerDelegate.h> |
| 20 | + |
| 21 | +namespace esp_matter { |
| 22 | +namespace test_event_trigger { |
| 23 | + |
| 24 | +/** Set TestEventTriggerDelegate which can be triggered by TestEventTrigger command of GeneralDiagnostics cluster |
| 25 | + * |
| 26 | + * Note: This function should be called before esp_matter::start() |
| 27 | + * |
| 28 | + * @param[in] test_event_trigger_delegate TestEventTriggerDelegate |
| 29 | + * |
| 30 | + * @return ESP_OK on success |
| 31 | + * ESP_ERR_INVALID_STATE when calling the function after esp_matter::start() |
| 32 | + */ |
| 33 | +esp_err_t set_delegate(chip::TestEventTriggerDelegate *test_event_trigger_delegate); |
| 34 | + |
| 35 | +/** Get TestEventTriggerDelegate which can be triggered by TestEventTrigger command of GeneralDiagnostics cluster |
| 36 | + * |
| 37 | + * @return TestEventTriggerDelegate set by set_delegate() |
| 38 | + */ |
| 39 | +chip::TestEventTriggerDelegate *get_delegate(); |
| 40 | +} // namespace test_event_trigger |
| 41 | +} // namespace esp_matter |
0 commit comments