/* SPDX-License-Identifier: BSD-2-Clause-Patent
 *
 * SPDX-FileCopyrightText: 2025 the prplMesh contributors (see AUTHORS.md)
 *
 * This code is subject to the terms of the BSD+Patent license.
 * See LICENSE file for more details.
 */

%define {
    /* The prplMesh Agent object. It contains all parameters and status related 
    to the Wi-Fi Easymesh implementation, on the client ('Agent') side. */
    @AGENT_ROOT_DM_Header@

        /* Configuration options for the agent */
        %persistent object Configuration {

            /* Threshold for the best channel rank, used in the channel selection task */
            %persistent uint32 BestChannelRankThreshold {
                default 0;
            }

            /* Preferred band for wireless backhaul. Options: '2.4GHz', '5GHz', 'auto' */
            %persistent string BackhaulBand {
                default "auto";
                on action validate call check_enum [
                            "2.4GHz", 
                            "5GHz",   
                            "auto"
                        ]; 
            }

            /* Specifies the network interface to use for wired backhaul */
            %persistent string BackhaulWireInterface {
                default "wan";
            }

            /* Number of retry attempts before the agent stops due to failures. 0 disables retries */
            %persistent uint32 StopOnFailureAttempts {
                default 1;
            }

            /* Bitwise flags controlling the Zero Wait DFS feature (On-Radar, On-Selection, Pre-CAC) */
            %persistent uint32 ZeroWaitDFSFlag {
                default 0;
            }

            /* Defines client measurement mode: 0 - disabled, 1 - enabled for all clients, 2 - enabled for selected clients */
            %persistent uint32 ClientsMeasurementMode {
                default 1;
            }

            /* Comma-separated list of wireless interfaces that prplMesh should use. If empty, try to use all of them. */
            %persistent string MandatoryInterfaces {
                default "";
            }

            /* Excludes dummy radio interfaces from credential propagation in the controller */
            %persistent bool ExcludeHostapInterface {
                default false;
            }

            /* Excludes dummy radio interfaces from credential propagation in the controller */
            %persistent bool RadioStatsEnable {
                default true;
            }

            /* Network credentials: SSID */
            %persistent string SSID {
                default "test_ssid";
            }

            /* Network credentials: Security */
            %persistent string Security {
                default "WPA2-Personal";
            }

            /* Network credentials: Passphrase */
            %persistent string Passphrase {
                default "123456789a";
            }

            /* Network credentials: WEPKey */
            %persistent string WEPKey {
                default "123456789a";
            }
        }

        /* Read-only information about the agent's state and interfaces */
        %read-only object Info {
            %read-only string MACAddress = "00:00:00:00:00:00";
            %read-only string FronthaulIfaces = "";
            %read-only string CurrentState = "";
            %read-only string BestState = "";
            %read-only string ManagementMode = "";
            %read-only object Fronthaul [] {
                counted with FronthaulNumberOfEntries;
                %read-only string Iface = "";
                %read-only string CurrentState = "";
                %read-only string BestState = "";
            }
        }

    @AGENT_ROOT_DM_Footer@
}
