/*
 * SPDX-FileCopyrightText: 2007 Copyright contributors to the cppTango project
 *
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */
#include <tango/client/CommandInfo.h>

namespace Tango
{

bool CommandInfo::operator==(const CommandInfo &ci)
{
    return DevCommandInfo::operator==(ci) && disp_level == ci.disp_level;
}

std::ostream &operator<<(std::ostream &o_str, const CommandInfo &ci)
{
    o_str << "Command name = " << ci.cmd_name << std::endl;

    o_str << "Command input parameter data type = Tango::" << data_type_to_string(ci.in_type) << std::endl;
    if(!ci.in_type_desc.empty())
    {
        o_str << "Command input parameter description = " << ci.in_type_desc << std::endl;
    }

    o_str << "Command output parameter data type = Tango::" << data_type_to_string(ci.out_type) << std::endl;
    if(!ci.out_type_desc.empty())
    {
        o_str << "Command output parameter description = " << ci.out_type_desc;
    }

    return o_str;
}

} // namespace Tango
