Class WebApiConnector
Provides connector to mediate connection with AX# twins over WebAPI connection.
Inherited Members
Namespace: AXSharp.Connector.S71500.WebApi
Assembly: AXSharp.Connector.S71500.WebAPI.dll
Syntax
public class WebApiConnector : Connector, ITwinObject, ITwinElement, INotifyPropertyChanged
Constructors
| Edit this page View SourceWebApiConnector(string, string, string, bool, eTargetProjectPlatform, string)
Creates new instance of WebApiConnector.
Declaration
public WebApiConnector(string ipAddress, string userName, string password, bool ignoreSSLErros, eTargetProjectPlatform platform = eTargetProjectPlatform.SIMATICAX, string dbName = "\"TGlobalVariablesDB\"")
Parameters
Type | Name | Description |
---|---|---|
string | ipAddress | Target's IP address. |
string | userName | User name. |
string | password | Password. |
bool | ignoreSSLErros | When set to 'true' the connection will ignore SSL errors. |
eTargetProjectPlatform | platform | |
string | dbName | Root DB name (AX uses 'TGlobalVariablesDB') |
WebApiConnector(string, string, string, Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool>?, bool, eTargetProjectPlatform, string)
Creates new instance of WebApiConnector.
Declaration
public WebApiConnector(string ipAddress, string userName, string password, Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool>? customServerCertHandler, bool ignoreSSLErros, eTargetProjectPlatform platform = eTargetProjectPlatform.SIMATICAX, string dbName = "\"TGlobalVariablesDB\"")
Parameters
Type | Name | Description |
---|---|---|
string | ipAddress | Target's IP address. |
string | userName | User name. |
string | password | Password. |
Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> | customServerCertHandler | Customized server certificate handler. |
bool | ignoreSSLErros | When set to true ssl error are ignored. |
eTargetProjectPlatform | platform | |
string | dbName | Root DB name (AX uses 'TGlobalVariablesDB') |
Properties
| Edit this page View SourceNumberOfInstances
Gets number of instance of WebAPI connector in this application.
Declaration
public static int NumberOfInstances { get; }
Property Value
Type | Description |
---|---|
int |
TargetPlatform
Declaration
public eTargetProjectPlatform TargetPlatform { get; }
Property Value
Type | Description |
---|---|
eTargetProjectPlatform |
Methods
| Edit this page View SourceBuildAndStart()
Builds and starts this connector.
Declaration
public override Connector BuildAndStart()
Returns
Type | Description |
---|---|
Connector |
Overrides
| Edit this page View SourceReLoginToConnectorApi()
Declaration
public Task ReLoginToConnectorApi()
Returns
Type | Description |
---|---|
Task |
ReadBatchAsync(IEnumerable<ITwinPrimitive>?)
Reads batch of value items from the plc.
Declaration
public override Task ReadBatchAsync(IEnumerable<ITwinPrimitive>? primitives)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ITwinPrimitive> | primitives | Primitive items to be read. |
Returns
Type | Description |
---|---|
Task |
Overrides
| Edit this page View SourceReloadConnector()
Forces the connector to reload symbols.
Declaration
public override void ReloadConnector()
Overrides
| Edit this page View SourceWriteBatchAsync(IEnumerable<ITwinPrimitive>?)
Writes batch of value items to the plc.
Declaration
public override Task WriteBatchAsync(IEnumerable<ITwinPrimitive>? primitives)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ITwinPrimitive> | primitives | Primitive items to be written. |
Returns
Type | Description |
---|---|
Task |