/// <summary> /// Registers the port with the platform to declare it open for business from other modules /// </summary> /// <param name="port">The port to register</param> /// <returns>The result code of registration</returns> protected ResultCode RegisterPortWithPlatform(Port port) { ResultCode resultCode = (ResultCode)platform.RegisterPort(port, this); if (resultCode == ResultCode.Success) { logger.Log("Successfully registered {0}", port.ToString()); } else { logger.Log("Failed to register {0}. result = {1}", port.ToString(), resultCode.ToString()); } return(resultCode); }
//*** public int RegisterPort(HomeOS.Hub.Platform.Contracts.IPort port, HomeOS.Hub.Platform.Contracts.IModule module) { return(_view.RegisterPort(PortAdapter.C2V(port), ModuleAdapter.C2V(module))); }