Exemple #1
0
        public DataPullSubscriber(DataPush.DataPushClient client, string node)
        {
            Client          = client;
            DestinationNode = node;

            var pullObservable = Observable.Interval(TimeSpan.FromSeconds(1));

            _pullSubscribe = pullObservable
                             .ObserveOn(TaskPoolScheduler.Default)
                             .Subscribe(async x => await PollDataAsync());
        }
Exemple #2
0
        public DataPushContext(DataPush.DataPushClient client, string sourceNode, string destinationNode, string name, byte[] payload, ILogger logger = null)
        {
            SourceNode      = sourceNode;
            DestinationNode = destinationNode;
            Name            = name;
            Payload         = payload;

            _client = client;
            _logger = logger;

            DataPushProgress = 0;

            RequestId = Guid.NewGuid();
        }
Exemple #3
0
 public GrpcClient(string connectionString, string nodeName, string deviceId, ILogger logger = null) : this(nodeName, deviceId, logger)
 {
     Client = new DataPush.DataPushClient(GrpcChannel.ForAddress(connectionString));
 }
Exemple #4
0
 public GrpcClient(ChannelBase channel, string nodeName, string deviceId, ILogger logger = null) : this(nodeName, deviceId, logger)
 {
     Client = new DataPush.DataPushClient(channel);
 }