/*
 * Copyright (c) 2025-2026 IB-Robot Group & openEuler Embedded SIG & openharmony-robot sig_RoboFrame.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include <stddef.h>

#include "c/executor/executor_base.h"
#include "c/util/string.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Executor bus interface
 *
 */
typedef struct {
    /**
     * @brief Size of this table in bytes (sizeof of the provider's struct).
     * Must be the first field. Consumers reject a table smaller than the
     * struct they were compiled against.
     */
    size_t struct_size;

    /**
     * @brief Function to get executor
     * @note
     * Input 1: Implement pointer to executor bus handle
     * Input 2: Executor name
     */
    const ibmw_executor_base_t* (*get_executor)(void* ctx, ibmw_string_view_t executorName);

    /// Implement pointer
    void* ctx;
} ibmw_executor_bus_base_t;

#ifdef __cplusplus
}
#endif