Esempio n. 1
0
 /// <summary>
 /// Create service
 /// </summary>
 /// <param name="client"></param>
 /// <param name="codec"></param>
 /// <param name="logger"></param>
 public HistoricAccessAdapter(IHistoricAccessServices <T> client, IVariantEncoder codec,
                              ILogger logger)
 {
     _codec  = codec ?? throw new ArgumentNullException(nameof(codec));
     _client = client ?? throw new ArgumentNullException(nameof(client));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Esempio n. 2
0
        /// <summary>
        /// Read next set of values
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="client"></param>
        /// <param name="endpoint"></param>
        /// <param name="request"></param>
        /// <param name="codec"></param>
        /// <returns></returns>
        public static async Task <HistoryReadNextResultModel <HistoricValueModel[]> > HistoryReadValuesNextAsync <T>(
            this IHistoricAccessServices <T> client, T endpoint,
            HistoryReadNextRequestModel request, IVariantEncoderFactory codec)
        {
            var results = await client.HistoryReadNextAsync(endpoint, request);

            return(results.ToSpecificModel(codec.Default.DecodeValues));
        }
Esempio n. 3
0
 public TestModule(IBrowseServices <EndpointModel> browser,
                   IHistoricAccessServices <EndpointModel> history,
                   INodeServices <EndpointModel> nodes)
 {
     _browser = browser ?? throw new ArgumentNullException(nameof(browser));
     _history = history ?? throw new ArgumentNullException(nameof(history));
     _nodes   = nodes ?? throw new ArgumentNullException(nameof(nodes));
 }
 /// <summary>
 /// Create controller with service
 /// </summary>
 /// <param name="browse"></param>
 /// <param name="nodes"></param>
 /// <param name="historian"></param>
 /// <param name="twin"></param>
 public EndpointMethodsController(IBrowseServices <EndpointModel> browse,
                                  INodeServices <EndpointModel> nodes, IHistoricAccessServices <EndpointModel> historian,
                                  ITwinServices twin)
 {
     _browse    = browse ?? throw new ArgumentNullException(nameof(browse));
     _historian = historian ?? throw new ArgumentNullException(nameof(historian));
     _nodes     = nodes ?? throw new ArgumentNullException(nameof(nodes));
     _twin      = twin ?? throw new ArgumentNullException(nameof(twin));
 }
Esempio n. 5
0
 public TestModule(IBrowseServices <EndpointModel> browser,
                   IHistoricAccessServices <EndpointModel> history,
                   INodeServices <EndpointModel> nodes, IPublishServices <EndpointModel> publish,
                   IUploadServices <EndpointModel> upload)
 {
     _browser = browser ?? throw new ArgumentNullException(nameof(browser));
     _history = history ?? throw new ArgumentNullException(nameof(history));
     _nodes   = nodes ?? throw new ArgumentNullException(nameof(nodes));
     _publish = publish ?? throw new ArgumentNullException(nameof(publish));
     _upload  = upload ?? throw new ArgumentNullException(nameof(upload));
 }
Esempio n. 6
0
 /// <summary>
 /// Create controller with service
 /// </summary>
 /// <param name="supervisor"></param>
 /// <param name="activator"></param>
 /// <param name="nodes"></param>
 /// <param name="historian"></param>
 /// <param name="browse"></param>
 public SupervisorMethodsController(ISupervisorServices supervisor,
                                    IActivationServices <string> activator,
                                    INodeServices <EndpointModel> nodes, IHistoricAccessServices <EndpointModel> historian,
                                    IBrowseServices <EndpointModel> browse)
 {
     _supervisor = supervisor ?? throw new ArgumentNullException(nameof(supervisor));
     _browse     = browse ?? throw new ArgumentNullException(nameof(browse));
     _historian  = historian ?? throw new ArgumentNullException(nameof(historian));
     _nodes      = nodes ?? throw new ArgumentNullException(nameof(nodes));
     _activator  = activator ?? throw new ArgumentNullException(nameof(activator));
 }
Esempio n. 7
0
 /// <summary>
 /// Create controller with service
 /// </summary>
 /// <param name="browse"></param>
 /// <param name="nodes"></param>
 /// <param name="historian"></param>
 /// <param name="publisher"></param>
 /// <param name="export"></param>
 /// <param name="twin"></param>
 public EndpointMethodsController(IBrowseServices <EndpointModel> browse,
                                  INodeServices <EndpointModel> nodes, IHistoricAccessServices <EndpointModel> historian,
                                  IPublishServices <EndpointModel> publisher, IUploadServices <EndpointModel> export,
                                  ITwinServices twin)
 {
     _browse    = browse ?? throw new ArgumentNullException(nameof(browse));
     _historian = historian ?? throw new ArgumentNullException(nameof(historian));
     _nodes     = nodes ?? throw new ArgumentNullException(nameof(nodes));
     _twin      = twin ?? throw new ArgumentNullException(nameof(twin));
     _publisher = publisher ?? throw new ArgumentNullException(nameof(publisher));
     _export    = export ?? throw new ArgumentNullException(nameof(export));
 }
Esempio n. 8
0
 /// <summary>
 /// Create controller with service
 /// </summary>
 /// <param name="supervisor"></param>
 /// <param name="browse"></param>
 /// <param name="discover"></param>
 /// <param name="activator"></param>
 /// <param name="nodes"></param>
 /// <param name="historian"></param>
 /// <param name="publisher"></param>
 /// <param name="logger"></param>
 public SupervisorMethodsController(ISupervisorServices supervisor,
                                    IDiscoveryServices discover, IActivationServices <string> activator,
                                    INodeServices <EndpointModel> nodes, IHistoricAccessServices <EndpointModel> historian,
                                    IBrowseServices <EndpointModel> browse, IPublishServices <EndpointModel> publisher,
                                    ILogger logger)
 {
     _supervisor = supervisor ?? throw new ArgumentNullException(nameof(supervisor));
     _browse     = browse ?? throw new ArgumentNullException(nameof(browse));
     _historian  = historian ?? throw new ArgumentNullException(nameof(historian));
     _nodes      = nodes ?? throw new ArgumentNullException(nameof(nodes));
     _publisher  = publisher ?? throw new ArgumentNullException(nameof(publisher));
     _discover   = discover ?? throw new ArgumentNullException(nameof(discover));
     _activator  = activator ?? throw new ArgumentNullException(nameof(activator));
     _logger     = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 /// <summary>
 /// Create controller with service
 /// </summary>
 /// <param name="client"></param>
 public HistoryController(IHistoricAccessServices <string> client)
 {
     _client = client ?? throw new ArgumentNullException(nameof(client));
 }
 /// <summary>
 /// Create service
 /// </summary>
 /// <param name="client"></param>
 /// <param name="codec"></param>
 public HistoricAccessAdapter(IHistoricAccessServices <T> client, IVariantEncoderFactory codec)
 {
     _codec  = codec?.Default ?? throw new ArgumentNullException(nameof(codec));
     _client = client ?? throw new ArgumentNullException(nameof(client));
 }