danikf / tik4net

Manage mikrotik routers with .NET C# code via ADO.NET like API or enjoy O/R mapper like highlevel api.
Apache License 2.0
177 stars 94 forks source link

Lack of wireless channels and sniffer entities #40

Closed AsafMag closed 6 years ago

AsafMag commented 6 years ago

Hi, the library could make a great use of entities for interface/wireless/channels and interface/wireless/sniffer.

Here are the entities I added locally to my work, hope I don't miss anything:

Channels:

using System;

namespace tik4net.Objects.Interface.Wireless
{
    [TikEntity("interface/wireless/channels", IsSingleton = false)]
    public class Channels
    {
        [TikProperty(".id", IsReadOnly = true)]
        public string Id {get; private set;}

        [TikProperty("list")]
        public String List {get; set;}

        [TikProperty("name")]
        public String Name {get; set;}

        [TikProperty("frequency")]
        public String Frequency {get; set;}

        [TikProperty("width")]
        public String Width {get; set;}

        [TikProperty("band")]
        public String Band {get; set;}

        [TikProperty("extension-channel", DefaultValue = "disabled")]
        public String ExtensionChannel {get; set;}
    }
}

Sniffer:

using System;

namespace tik4net.Objects.Interface.Wireless
{
    [TikEntity("interface/wireless/sniffer", IsSingleton = true)]
    public class Channels
    {
        [TikProperty(".id", IsReadOnly = true)]
        public string Id {get; private set;}

        [TikProperty("streaming-enabled", DefaultValue = "yes")]
        public bool StreamingEnabled {get; set;}

        [TikProperty("streaming-server")]
        public string StreamingServer {get; set;}

        [TikProperty("multiple-channels", DefaultValue = "yes")]
        public bool MultipleChannels {get; set;}

        [TikProperty("channel-time", DefaultValue = "")]
        public string ChannelTime {get; set;}
    }
}
danikf commented 6 years ago

Hi,

thank you. I will add these classes ASAP.

D

danikf commented 6 years ago

Classes added (renamed to meet name conventions). Thanks!