/* SPDX-License-Identifier: BSD-3-Clause */
/*
 * Copyright 2012 Raritan Inc. All rights reserved.
 */

#ifndef __PDU_TEST_UNIT_IDL__
#define __PDU_TEST_UNIT_IDL__

#include <TestDisplay.idl>

/**
 * Test Interfaces
 */
module test {

    /** Test interface for PDU components controlled by topofw */
    interface Unit_2_0_0 {

        /**
         * Retrieve all Displays attached to the unit.
         *
         * @return List of displays
         */
        vector<Display_2_0_0> getDisplays();

        /**
         * Retrieve state of all buttons attached to the unit.
         *
         * Note that semantics of the buttons is not defined
         * by this interface, although it is garanteed that the
         * order in which states are returned will not change.
         *
         * @return List of button states (\c true if pressed)
         */
        vector<boolean> getButtonStates();

        /**
         * Force on the buzzer.
         *
         * @param isOn \c true to force buzzer on, \c false for normal mode
         */
        void setBuzzer(in boolean isOn);

        /**
         * Reset all sub controllers via RS485 break condition
         */
        void resetAllSubControllers();

        /**
         * Trigger watchdog of a selected sub controller
         *
         * @param rs485Addr RS485 address of the sub controller to trigger
         *                  the watchdog for.
         */
        void triggerSubControllerWatchdog(in int rs485Addr);
    };

}

#endif
