How to use the module driver.

 

The Module implements this interface:

 

    /// <summary>
    /// Common Interface that expose the DataParsed Event
    /// The goal for that interface is to be able to use the same "business" code in plain old vanilla microframework code or gadgeteer.
    /// </summary>
    public interface ICurrentCostManager
    {
        /// <summary>
        /// On Data Parsed
        /// </summary>
        event G2Tech.CurrentCost.CurrentCostManager.CurrentCostDataParsedEventHandler DataParsed;
    }

 

And expose a Start and Stop method.

 

Simply call the Start to start to receive messages from the EnviR.

Once a message is successfully parsed the "DataParsed" event is raised from the module.

The data is provided by the CurrentCostData entity are:

 

        [DataMember]
        public string Model { get; set; }

        [DataMember]
        public DateTime TimeStamp { get; set; }

        [DataMember]
        public double Temperature { get; set; }

        [DataMember]
        public string ApplianceNumber { get; set; }

        [DataMember]
        public string ApplianceId { get; set; }

        [DataMember]
        public int Ch1 { get; set; }

        [DataMember]
        public int Ch2 { get; set; }

        [DataMember]
        public int Ch3 { get; set; }

Be aware that if you have more than one appliance connected to your EnviR you will obtain one event for each your appliance.   (for example to monitor different rooms).

Last edited Feb 25, 2013 at 7:06 AM by SandeX, version 2

Comments

No comments yet.