public void Start(string channelName) { var dg = Container.Resolve <IDeviceGroupProvider>(); var am = Container.Resolve <IAccessChannelManager>(); var devices = dg.RootDeviceGroup.GetAllDevices().Where(d => !d.Registration.Config.IsSimulated); _channel = am.GetChannel(channelName); _channel.Start(); _channel.AddToUpdateList(devices); }
public static Task WriteAsync(this IAccessChannel channel, WriteData writeData) { return(channel.WriteAsync(writeData.ToEnumerable())); }
public static void Write(this IAccessChannel channel, WriteData writeData) { channel.Write(writeData.ToEnumerable()); }
public static IObservable <IList <ReadData> > DirectAsyncRead(this IAccessChannel channel, IEnumerable <IAccessItemRegistration> registrations) { return(channel.DirectAsyncRead(registrations.Select(x => x.ServerAlias))); }
public static IObservable <ReadData> DirectAsyncRead(this IAccessChannel channel, IAccessItemRegistration registration) { return(channel.DirectAsyncRead(registration.ToEnumerable()).Select(rds => rds.First())); }
public static Task ReadAsync(this IAccessChannel channel, IEnumerable <IAccessItemRegistration> regs) { return(channel.ReadAsync(regs.Select(x => x.ServerAlias))); }
public static Task ReadAsync(this IAccessChannel channel, IAccessItemRegistration reg) { return(channel.ReadAsync(reg.ToEnumerable())); }
public static void Read(this IAccessChannel channel, uint serverAlias) { channel.Read(serverAlias.ToEnumerable()); }
public static void Read(this IAccessChannel channel, IAccessItemRegistration reg) { channel.Read(reg.ToEnumerable()); }
private static Task AddToUpdateListAsync(this IAccessChannel channel, IEnumerable <IAccessItemRegistration> registrations) { return(channel.AddToUpdateListAsync(registrations.Select(x => x.ClientAlias))); }
public static Task AddToUpdateListAsync(this IAccessChannel channel, IEnumerable <IDevice> devices) { return(channel.AddToUpdateListAsync(devices.Select(d => d.Registration.ClientAlias))); }
public static void AddToUpdateList(this IAccessChannel channel, IEnumerable <IDevice> devices) { channel.AddToUpdateList(devices.Select(d => d.Registration.ClientAlias)); }
private static void AddToUpdateList(this IAccessChannel channel, IEnumerable <IAccessItemRegistration> registrations) { channel.AddToUpdateList(registrations.Select(x => x.ClientAlias)); }
public static IDevice Register(this IAccessChannel channel, DeviceConfig accessItemConfig) { return(channel.Register(accessItemConfig.ToEnumerable()).First()); }
// public AccessItemRegistration(AccessItemConfig config) : this() // { // Config = config; // } public AccessItemRegistration(DeviceConfig config, IAccessChannel channel) : this() { Config = config; Channel = channel; }
public static void Read(this IAccessChannel channel, IEnumerable <IAccessItemRegistration> regs) { channel.Read(regs.Select(x => x.ServerAlias)); }
public void Init(IAccessChannel channel, IAccessItemRegistration registration) { throw new NotImplementedException(); }
public XiAccessItemRegistration(DeviceConfig config, IAccessChannel channel) : base(config, channel) { ListInstanceDef = new ListInstanceDef(Config.Tag, ClientAlias, true); }