/////////////////////////////////////////////////////////// public bool SendMessage(string origin, string destiny, string message) { if (!current_config.Modules.ContainsKey(destiny)) { return(false); } UBSLib.ModuleInfo module_info = current_config.Modules[destiny]; if (module_info == null) { return(false); } if (module_info is UBSLib.ModuleInfoLocal) { // local message UBSLib.UBSModule module = local_modules[module_info.Id]; UBSLib.UBSMessage message_obj = new UBSLib.UBSMessage(destiny, message); message_obj.OriginId = origin; module.HandleMessages(message_obj); } else if (module_info is UBSLib.ModuleInfoRemote) { // do remote call (not implemented) // can be done through two bridge tcp/ip client/server modules new NotImplementedException("Servicio aun no disponible"); } return(true); }
/////////////////////////////////////////////////////////////////////////////// public TwinCatCommunication(UBSLib.UBSModule parent) { tcAds = new TcAdsClient(); m_TCbloques = new Dictionary <int, TCBlock>(); m_BlockMap = new Dictionary <string, int>(); lastNotification = DateTime.Now; UBSMod = parent; }
//////////////////////////////////////////////////////////////////////// //Constructor public Alarms(UBSLib.UBSModule ubs) { ubsMod = ubs; this.m_alarmBlocks = new Dictionary <string, AlarmBlock>(); LoadAlarms(); }