RDT_Base.IPAddress (PROP) ¶ PROPERTY IPAddress : STRING
RDT_Base.Port (PROP) ¶ PROPERTY Port : UINT
RDT_Base.RcvTimeout (PROP) ¶ PROPERTY RcvTimeout : TIME Receiving timeout
RDT_Base.TrsTimeout (PROP) ¶ PROPERTY TrsTimeout : TIME Transmission timeout
RDT_Base.ReceiveBytes (METH) ¶ METHOD ReceiveBytes : NBS.ERROR It receives data from an active conncection InOut: Scope Name Type Comment Return ReceiveBytes NBS.ERROR Input itfConnection NBS.IConnection Connection to use pData __XWORD Pointer where to write the data received diByteWait DINT How many data waiting for (the above buffer must be large enought) tTimeout TIME Receiving timeout xNoBlock BOOL Exit in case of no data in the socket Output diCount DINT How many data received
RDT_Base.SendBytes (METH) ¶ METHOD SendBytes : NBS.ERROR It sends a buffer of data to an active conncection InOut: Scope Name Type Comment Return SendBytes NBS.ERROR Input itfConnection NBS.IConnection Connection to use pData __XWORD Pointer to the data to transmit diSize DINT How many data to transmit tTimeout TIME Transmission timeout Output diCount DINT How many data sent
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).