/*
 * $Id: Interface_signal_name.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Interface.h"

namespace morpheo              {
namespace behavioural          {

  std::string Interface::signal_name          (std::string      name_interface,
					       std::string      name_signal   ,
					       direction_t direction     )
  {
    log_printf(FUNC,Behavioural,"signal_name","Begin");

    std::string str_direction = toString(direction);
    std::string str_interface = name_interface;
    std::string str_signal    = name_signal;

    LowerCase(str_direction);    
    UpperCase(str_interface);
    UpperCase(str_signal   );
    
    std::string signame = str_direction;
    if (str_interface != "")
      signame += "_"+str_interface;
    if (str_signal    != "")
      signame += "_"+str_signal;

    log_printf(FUNC,Behavioural,"signal_name","End");

    return signame;
  };

}; // end namespace behavioural          
}; // end namespace morpheo              
