sockSetGWParm (Function) |
|
Sets the RTCU Communication Hub specific parameters. This has the same effect as setting the parameters via Device: Network: RTCU Communication Hub settings. The changes will take effect at the next call to gwOpen or at device reset. (e.g. by using boardReset). This is a legacy Gateway configuration function. On X32 and NX32 devices it configures the normal RTCU Communication Hub connection. On NX32L architecture devices it configures the secondary fallback connection, not the primary Server connection; see also rchFallbackSet and rchConfigSet.
Input: GWEnabled : BOOL Determines whether the RTCU Communication Hub will start automatically. (See Autostart feature)
GWIP : STRING (Max 41 characters) The IP address or symbolic name of the RTCU Communication Hub.
GWPort : DINT (default 5001) The IP port the device should use to connect to the RTCU Communication Hub.
GWKey : STRING (Max 8 characters) The key (password) the device should use to connect to the RTCU Communication Hub.
MaxConnectionAttempt : INT (default 3) Max number of connection attempts before the network media reconnects.
MaxSendReqAttempt : INT (default 5) Max number of send-request attempt before send fails.
ResponseTimeout : INT (default 45) Time waiting for response in seconds.
AliveFreq : DINT (default 300) Frequency for sending self-transactions in seconds. The purpose of the self-transaction is to ensure a healthy two-way communication channel over the RTCU Communication Hub. For applications that are only sending data from the device to the server, this frequency can safely be increased. Setting the value to zero will disable the self-transactions completely.
CryptKey : PTR The key used to encrypt communication with the RTCU Communication Hub. If this parameter is not set (CryptKey set to 0), then the encryption key is not changed.
Returns:INT
Declaration: FUNCTION sockSetGWParm;
Example: INCLUDE rtcu.inc |