ST_OCPP1_Client_Param
This structure is used to set the parameters of the WebSockets connection of the OCPP client.
Syntax
TYPE ST_OCPP_Client1_Param :
STRUCT
nOID : OTCID := 0;
nTaskOID : OTCID := 0;
bConnect : BOOL := TRUE;
sHost : T_MaxString := '';
nPort : UINT := 443;
sPath : T_MaxString;
sIdentity : T_MaxString;
eAuthMode : E_OCPP1_AuthenticationMode;
sAuthKey : T_MaxString;
eEncryptionMode : E_OCPP_EncryptionMode;
eEncryptionProt : E_OCPP_EncryptionProtocol;
sCaFile : T_MaxString := '%TC_TARGETPATH%\Certificates\CA.crt';
sCrtFile : T_MaxString := '%TC_TARGETPATH%\Certificates\OCPP.crt';
sKeyFile : T_MaxString := '%TC_TARGETPATH%\Certificates\OCPP.key';
eDebugLevel : E_OCPP_DebugLevel := E_OCPP_DebugLevel.None;
eTraceLevel : TcTraceLevel := TcTraceLevel.tlWarning;
END_STRUCT
END_TYPE
Parameter
Name | Type | Description |
---|---|---|
nOID | OTCID | ObjectID of the TcIotOcppClient object. If this value is left at 0 (default), a new instance is created. |
nTaskOID | OTCID | ObjectID of the task used. If this value is left at 0 (default), the I/O Idle Task is used. |
bConnect | BOOL | If TRUE, the OCPP client automatically connects to the OCPP server. If FALSE, the connection must be established using the method Execute. |
sHost | T_MaxString | Host name or IP address of the OCPP server. |
nPort | UINT | Port of the OCPP server. |
sPath | T_MaxString | Optionally specifies a URI of the OCPP server. |
sIdentity | T_MaxString | Specifies the Identity of the Client. |
eAuthMode | Optional Authentication Mode. | |
sAuthKey | T_MaxString | Optional Authentication Key. |
eEncryptionMode | Optional Encryption Mode. | |
eEncryptionProt | Defines the Encryption Protocol. | |
sCaFile | T_MaxString | Certificate of the Certificate Authority (CA) as a file path (PEM or DER format). |
sCrtFile | T_MaxString | Client certificate (Public Key) as file path (PEM or DER format). |
sKeyFile | T_MaxString | Private Key of the client as a file path (PEM or DER format). |
eDebugLevel | The Debug Level (None or MessageLogFile). MessageLogFile ensures that a logfile with all OCPP messages is written to the TwinCAT boot directory. | |
eTraceLevel | TcTraceLevel | The maximum Trace Level from ADS logging. |