public void Set(SetRelayControlOptions other)
 {
     if (other != null)
     {
         m_ApiVersion = P2PInterface.SetrelaycontrolApiLatest;
         RelayControl = other.RelayControl;
     }
 }
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            HeatingControl.Load();
            SensorControl.Run();
            RelayControl.Initialise();
            TimerControl.Run();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Get the current relay control setting.
        /// </summary>
        /// <param name="options">Information about what version of the <see cref="GetRelayControl" /> API is supported</param>
        /// <param name="outRelayControl">The relay control setting currently configured</param>
        /// <returns>
        /// <see cref="Result" />::<see cref="Result.Success" /> - if the input was valid
        /// <see cref="Result" />::<see cref="Result.InvalidParameters" /> - if the input was invalid in some way
        /// </returns>
        public Result GetRelayControl(GetRelayControlOptions options, out RelayControl outRelayControl)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <GetRelayControlOptionsInternal, GetRelayControlOptions>(ref optionsAddress, options);

            outRelayControl = Helper.GetDefault <RelayControl>();

            var funcResult = EOS_P2P_GetRelayControl(InnerHandle, optionsAddress, ref outRelayControl);

            Helper.TryMarshalDispose(ref optionsAddress);

            return(funcResult);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Get the current relay control setting.
        /// </summary>
        /// <param name="options">Information about what version of the <see cref="GetRelayControl" /> API is supported</param>
        /// <param name="outRelayControl">The relay control setting currently configured</param>
        /// <returns>
        /// <see cref="Result" />::<see cref="Result.Success" /> - if the input was valid
        /// <see cref="Result" />::<see cref="Result.InvalidParameters" /> - if the input was invalid in some way
        /// </returns>
        public Result GetRelayControl(GetRelayControlOptions options, out RelayControl outRelayControl)
        {
            var optionsInternal = Helper.CopyProperties <GetRelayControlOptionsInternal>(options);

            outRelayControl = Helper.GetDefault <RelayControl>();

            var funcResult = EOS_P2P_GetRelayControl(InnerHandle, ref optionsInternal, ref outRelayControl);

            Helper.TryMarshalDispose(ref optionsInternal);

            var funcResultReturn = Helper.GetDefault <Result>();

            Helper.TryMarshalGet(funcResult, out funcResultReturn);
            return(funcResultReturn);
        }
Exemplo n.º 5
0
 internal static extern Result EOS_P2P_GetRelayControl(System.IntPtr handle, System.IntPtr options, ref RelayControl outRelayControl);
Exemplo n.º 6
0
 private static extern Result EOS_P2P_GetRelayControl(IntPtr handle, ref GetRelayControlOptionsInternal options, ref RelayControl outRelayControl);