ST_OCPP1_Server_Param

This structure is used to set the parameters of the WebSockets connection of the OCPP server.

Syntax

TYPE ST_OCPP1_ServerParam :
STRUCT
    nOID            : OTCID := 0;
    nTaskOID        : OTCID := 0;
    sHost           : T_MaxString := '0.0.0.0';
    nPort           : UINT := 443;
    sPath           : T_MaxString := 'ocpp';
    eAuthMode       : E_OCPP1_AuthenticationMode := E_OCPP1_AuthenticationMode.Basic;
    eEncryptionMode : E_OCPP_EncryptionMode := E_OCPP_EncryptionMode.Enable;
    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 TcIotOcppServer 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.

sHost

T_MaxString

Defines the server address as a host name, domain name or IP address.

nPort

UINT

Defines the server port.

sPath

T_MaxString

Defines the server path.

eAuthMode

E_OCPP1_AuthenticationMode

Optional Authentication Mode.

eEncryptionMode

E_OCPP_EncryptionMode

Optional Encryption Mode.

eEncryptionProt

E_OCPP_EncryptionProtocol

Defines the Encryption Protocol.

sCaFile

T_MaxString

Certificate of the Certificate Authority (CA) as a file path (PEM or DER format).

sCrtFile

T_MaxString

Server certificate (Public Key) as file path (PEM or DER format).

sKeyFile

T_MaxString

Private Key of the server as a file path (PEM or DER format).

eDebugLevel

E_OCPP_DebugLevel

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.