/*
 * SPDX-FileCopyrightText: 2004 Copyright contributors to the cppTango project
 *
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */

#ifndef TANGO_SERVER_POLLINGTHREADINFO_H
#define TANGO_SERVER_POLLINGTHREADINFO_H

#include <tango/common/idl_wrapper.h>
#include <tango/server/PollThread.h>
#include <tango/server/TangoMonitor.h>

#include <string>
#include <vector>

namespace Tango
{

struct PollingThreadInfo
{
    int thread_id{0};                                // The polling thread identifier
    PollThread *poll_th{nullptr};                    // The polling thread object
    PollThCmd shared_data;                           // The shared buffer
    TangoMonitor poll_mon;                           // The monitor
    std::vector<std::string> polled_devices;         // Polled devices for this thread
    int nb_polled_objects{0};                        // Polled objects number in this thread
    int smallest_upd{0};                             // Smallest thread update period
    std::vector<DevVarLongStringArray *> v_poll_cmd; // Command(s) to send

    PollingThreadInfo() :

        poll_mon("Polling_thread_mon")

    {
        shared_data.cmd_pending = false;
        shared_data.trigger = false;
    }
};

} // namespace Tango

#endif /* UTILS */
