RDT_Base.SetTLSContext (METH) ¶ METHOD SetTLSContext : NBS.ERROR Sets all the data neccessary to handle encrypted tcp connections InOut: Scope Name Type Initial Comment Return SetTLSContext NBS.ERROR Input xUseCert BOOL If the certificate is used or not psUseCaseName POINTER TO STRING A name to identify this context in the security manager, the name can be completely user defined ePurpose NBS.PURPOSE This context can be used on the server side or on the client side. psTLSVersion POINTER TO STRING A string to select the correct protocol version psCipherList POINTER TO NBS.CIPHER_LIST A string to select the correct encryption cipher suites. See for example: https://www.openssl.org/docs/man1.1.1/man1/ciphers.html#CIPHER-LIST-FORMAT psHostname POINTER TO STRING A hostname to select the correct certificate on the server side. udiVerificationMode UDINT 1 => No peer verification 2 => Active Peer verification (4) => 2+4 = 6 => Force termination, if no client certificate (8) => 2+8=10 or 2+4+8 = 14 => Request client certificate only whithin initial handshake psCertCommonName POINTER TO STRING A string to select the correct certificate in local certificate store It can be empty in case of an external cert handle is passed hCert RTS_IEC_HANDLE RTS_INVALID_HANDLE External cert handle to use. Exclusive use vs cert name itfCertVerifer NBS.ICertificateVerifier A callback for application specific certificate verification
RDT_CONST (GVL) ¶ Redundancy Protocol Common constant value Attributes: qualified_only InOut: Scope Name Type Initial Comment Constant PROT_TYPE BYTE 1 Protocol type KEY_HEAD WORD 16#AA55 Head key KEY_TAIL WORD 16#55AA Head key TLS_VERIFY_NONE UDINT 1 No peer verification: the certificate is NOT validated TLS_VERIFY_PEER UDINT 2 Active Peer verification: the certificate is validated, if available TLS_VERIFY_FAIL_IF_NO_PEER_CERT UDINT 6 Force termination, if no client certificate: the handshake goes wrong if there is no certificate from the remote peer
RDT_Client (FB) ¶ FUNCTION_BLOCK RDT_Client EXTENDS RDT_Base IMPLEMENTS IRdtProtClient Client FB that encapsulates NBS.TCP activities in Redundancy Data Transfer To connect to a TCP Server at the endpoint defined with “ipAddress” and “uiPort” in “Initialize” method the input “xEnable” should set to “TRUE”. While setup the connection “xBusy” is “TRUE” but “xActive” is “FALSE”. After the connection is established “xActive” and “xBusy” are “TRUE” and the “itfConnection” output is valid. After closing the connection from the server side “xActive” becomes “FALSE””, “itfConnection” becomes invalid and “xDone” becomes “TRUE”. Properties: ItfConnection Active Busy ConnectionTimeout Enable Error ErrorCode IPAddress , inherited from RDT_Base Port , inherited from RDT_Base RcvTimeout , inherited from RDT_Base TrsTimeout , inherited from RDT_Base Methods: FB_exit TrsMessage Create CyclicCall ExecCommand FlushRec , inherited from RDT_Base ReceiveBytes , inherited from RDT_Base SendBytes , inherited from RDT_Base SetNewCertificate SetTLSContext , inherited from RDT_Base Structure: FB_exit (Method) IRdtProtClient Active (Property) Busy (Property) Create (Method) CyclicCall (Method) Enable (Property) Error (Property) ErrorCode (Property) ExecCommand (Method) SetNewCertificate (Method) ItfConnection (Property) Private ConnectionTimeout (Property) TrsMessage (Method)
RDT_Client.FB_exit (METH) ¶ METHOD FB_exit : BOOL FB_Exit must be implemented explicitly. If there is an implementation, then the method is called before the controller removes the code of the function block instance (implicit call). The return value is not evaluated. InOut: Scope Name Type Comment Return FB_Exit BOOL Input bInCopyCode BOOL TRUE: the exit method is called in order to leave the instance which will be copied afterwards (online change).
IRdtProtClient ¶ Active (Property) Busy (Property) Create (Method) CyclicCall (Method) Enable (Property) Error (Property) ErrorCode (Property) ExecCommand (Method) SetNewCertificate (Method)
RDT_Client.Active (PROP) ¶ PROPERTY Active : BOOL Connection is established
RDT_Client.Busy (PROP) ¶ PROPERTY Busy : BOOL Operation is running
RDT_Client.Create (METH) ¶ METHOD Create : IRdtProtClient It creates and initializes the object Client InOut: Scope Name Type Comment Return Create IRdtProtClient Input pStruIni POINTER TO RdtInitStructClientTCP Parameters to use Output error INT
RDT_Client.CyclicCall (METH) ¶ METHOD CyclicCall Client cyclic call
RDT_Client.Enable (PROP) ¶ PROPERTY Enable : BOOL