C# Класс pi_web_api_cs_helper.PIWebAPIClient

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Dispose ( ) : void

Disposing the HttpClient.

GetAsync ( string uri ) : Task

Async GET request. This method makes a HTTP GET request to the uri provided and throws an exception if the response does not indicate a success.

GetDataServersWebIdAsync ( ) : string>>.Task

Get the list of PI Data Archives in "name, webId" pairs.

GetTagValueAsync ( string serverWebId, string tagName ) : Task

Get the value of a particular PI tag.

PIWebAPIClient ( string url ) : System

Initiating HttpClient using the default credentials. This can be used with Kerberos authentication for PI Web API.

PIWebAPIClient ( string url, string userName, string password ) : System

Initializing HttpClient by providing a username and password. The basic authentication header is added to the HttpClient. This can be used with Basic authentication for PI Web API.

PostAsync ( string uri, string data ) : System.Threading.Tasks.Task

Async POST request. This method makes a HTTP POST request to the uri provided and throws an exception if the response does not indicate a success.

SearchAsync ( string query, string scope, string fields, int count = 10, int start ) : Task
WriteTagValueAsync ( string serverWebId, string tagName, string valueToWrite ) : System.Threading.Tasks.Task

Write a value at current time to a particular PI tag.

Приватные методы

Метод Описание
GetTagValueLink ( string serverWebId, string tagName ) : Task

Get the value link for a specific PI tag.

Описание методов

Dispose() публичный Метод

Disposing the HttpClient.
public Dispose ( ) : void
Результат void

GetAsync() публичный Метод

Async GET request. This method makes a HTTP GET request to the uri provided and throws an exception if the response does not indicate a success.
public GetAsync ( string uri ) : Task
uri string Endpoint for the GET request.
Результат Task

GetDataServersWebIdAsync() публичный Метод

Get the list of PI Data Archives in "name, webId" pairs.
public GetDataServersWebIdAsync ( ) : string>>.Task
Результат string>>.Task

GetTagValueAsync() публичный Метод

Get the value of a particular PI tag.
public GetTagValueAsync ( string serverWebId, string tagName ) : Task
serverWebId string WebId of the PI Data Archive.
tagName string Name of the PI tag.
Результат Task

PIWebAPIClient() публичный Метод

Initiating HttpClient using the default credentials. This can be used with Kerberos authentication for PI Web API.
public PIWebAPIClient ( string url ) : System
url string
Результат System

PIWebAPIClient() публичный Метод

Initializing HttpClient by providing a username and password. The basic authentication header is added to the HttpClient. This can be used with Basic authentication for PI Web API.
public PIWebAPIClient ( string url, string userName, string password ) : System
url string
userName string User name for basic authentication
password string Password for basic authentication
Результат System

PostAsync() публичный Метод

Async POST request. This method makes a HTTP POST request to the uri provided and throws an exception if the response does not indicate a success.
public PostAsync ( string uri, string data ) : System.Threading.Tasks.Task
uri string Endpoint for the POST request.
data string Content for the POST request.
Результат System.Threading.Tasks.Task

SearchAsync() публичный Метод

public SearchAsync ( string query, string scope, string fields, int count = 10, int start ) : Task
query string
scope string
fields string
count int
start int
Результат Task

WriteTagValueAsync() публичный Метод

Write a value at current time to a particular PI tag.
public WriteTagValueAsync ( string serverWebId, string tagName, string valueToWrite ) : System.Threading.Tasks.Task
serverWebId string WebId of the PI Data Archive.
tagName string Name of the PI tag.
valueToWrite string Value to write.
Результат System.Threading.Tasks.Task