RDT_Server.SetNewCertificate (METH) ¶ METHOD SetNewCertificate : INT Set the new certificate to use InOut: Scope Name Type Return SetNewCertificate INT Input hCert RTS_IEC_HANDLE
RDT_Server.RcvData (METH) ¶ METHOD RcvData It receives data following a command from a client InOut: Scope Name Type Comment Input itfConnection NBS.IConnection Connection to use psCom POINTER TO RdtProtStructCommPh Pointer to command phase header already received pDataRcv __XWORD Pointer where to write data received diSizeRcv DINT Maximum size of the above buffer Output errorProt INT Protocol error
RDT_Server.TrsAnswer (METH) ¶ METHOD TrsAnswer It handles a complete transmisstion of an Answer InOut: Scope Name Type Comment Input itfConnection NBS.IConnection Connection to use psRes POINTER TO RdtProtStructResPh Pointer to result phase header to send pDataTrs __XWORD Pointer to the data to transmit Output errorProt INT Protocol error
Structures ¶ RdtInitStructClientTCP (Struct) RdtInitStructServerTCP (Struct) RdtProtStructCommPh (Struct) RdtProtStructConnection (Struct) RdtProtStructResPh (Struct)
RdtInitStructClientTCP (STRUCT) ¶ TYPE RdtInitStructClientTCP : STRUCT Structurce for TCP client initialization InOut: Name Type Initial Comment sName STRING Name of the client, the name can be completely user defined sIPAddress STRING IpAdd of the server to connect with uiPort UINT Port of the server to connect with tTrsTimeout TIME Transmission timeout tRcvTimeout TIME Receiving timeout tConnActTimeout TIME Connection active timeout xUseTLS BOOL If the TLS encryption is used or not xUseCert BOOL If the certificate is used or not sCertCommonName STRING A string to select the correct certificate in local certificate store, hCert RTS_IEC_HANDLE RTS_INVALID_HANDLE External cert handle to use. Exclusive use vs cert name udiVerificationMode UDINT 2 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 sTLSVersion STRING ‘1.2’ A string to select the correct protocol version, e.g.: ‘1.1’, ‘1.2’, sHostname STRING ‘’ A hostname to select the correct certificate on the server side. sCipher STRING ‘HIGH’ The cipher strings. See for example: https://www.openssl.org/docs/man1.1.1/man1/ciphers.html#CIPHER - LIST-FORMAT itfCertVerifer NBS.ICertificateVerifier 0 A callback for application specific certificate verification
RdtInitStructServerTCP (STRUCT) ¶ TYPE RdtInitStructServerTCP : STRUCT Structurce for TCP server initialization InOut: Name Type Initial Comment sName STRING Name of the client, the name can be completely user defined sIPAddress STRING IpAdd of the server to connect with uiPort UINT Port of the server to connect with iMaxConnections INT Max connection allowed tTrsTimeout TIME Transmission timeout tRcvTimeout TIME Receiving timeout tConnTimeout TIME Connection timeout tWaitAfterReset TIME Time to wait after reset (see time above) xUseTLS BOOL If the TLS encryption is used or not xUseCert BOOL If the certificate is used or not sCertCommonName STRING A string to select the correct certificate in local certificate store, hCert RTS_IEC_HANDLE RTS_INVALID_HANDLE External cert handle to use. Exclusive use vs cert name udiVerificationMode UDINT (2 + 4) 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 sTLSVersion STRING ‘1.2’ A string to select the correct protocol version, e.g.: ‘1.1’, ‘1.2’, sHostname STRING ‘’ A hostname to select the correct certificate on the server side. sCipher STRING ‘HIGH’ The cipher strings. See for example: https://www.openssl.org/docs/man1.1.1/man1/ciphers.html#CIPHER - LIST-FORMAT itfCertVerifer NBS.ICertificateVerifier 0 A callback for application specific certificate verification
RdtProtStructCommPh (STRUCT) ¶ TYPE RdtProtStructCommPh : STRUCT Redundancy Data Transfer Protocol Command phase header InOut: Name Type Comment wKeyH WORD Head key bType BYTE Protocol type bFill BYTE uiCmd UINT Command diLen DINT Data length wKeyT WORD Tail key
RdtProtStructConnection (STRUCT) ¶ TYPE RdtProtStructConnection : STRUCT Redundancy Data Transfer Protocol Structure that contains the connection data InOut: Name Type Comment pConnection POINTER TO NBS.TCP_Connection Pointer to the connection ltLastActivity LTIME Timer to test activity on connection ltTimActivity LTIME Activity timeout before to close connection iResCnt INT Reset counters ltLastReset LTIME When done the last reset ltTimWaitAfterReset LTIME Time to wait after reset
RdtProtStructResPh (STRUCT) ¶ TYPE RdtProtStructResPh : STRUCT Redundancy Data Transfer Protocol Result phase header InOut: Name Type Comment wKeyH WORD Head key uiAns UINT Answer diLen DINT Data length iErr INT Error wKeyT WORD Tail key
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 20.07.2023, 15:03:42 companyName string 3S-Smart Software Solutions GmbH libraryFile RedundancyDataTransfer.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile RedundancyDataTransfer.clean.json version version 2.0.0.0 ProjectInformation AutoResolveUnbound bool True IsEndUserLibrary True Released True SourceLibrary False LastModificationDateTime date 20.07.2023, 15:03:42 LibraryCategories library-category-list Intern|Visu Author string 3S - Smart Software Solutions GmbH Company System CompiledLibraryCompatibilityVersion CODESYS V3.5 SP16 DefaultNamespace RDT Description See: Description DocFormat reStructuredText LanguageModelAttribute qualified-access-only Placeholder RedundancyDataTransfer Project RedundancyDataTransfer Title RedundancyDataTransfer Version version 4.1.0.0