ThingWorx C SDK
Classes | Macros | Typedefs | Variables
twDefaultSettings.h File Reference

Default settings for ThingWorx C SDK. More...

Go to the source code of this file.

Classes

struct  twConfig
 Structure to allow overriding of defaults at runtime. More...
 

Macros

#define TW_URI   "/Thingworx/WS"
 The resource portion of the ThingWorx websocket URI.
 
#define MAX_MESSAGE_SIZE   16384
 The maximum size of a complete message whether it is broken up as a multipart message or not. Messages larger than this will be rejected. Measured in Bytes.
 
#define MESSAGE_CHUNK_SIZE   8192
 The maximum size of a message chunk. Messages large than this will be broken up into a multipart message. Measured in Bytes. This value should be the same as the server side configuration which defaults to 8192.
 
#define DEFAULT_MESSAGE_TIMEOUT   10000
 Time to wait for a response to a message from the server. Measured in milliseconds.
 
#define PING_RATE   55000
 Websocket keep alive rate. Used to ensure the connection stays open. Measured in milliseconds. This value should never be greater than the server side setting which defaults to 60000 milliseconds.
 
#define DEFAULT_PONG_TIMEOUT   10000
 Time to wait for a response to a ping message from the server. Measured in milliseconds.
 
#define STALE_MSG_CLEANUP_RATE   (DEFAULT_MESSAGE_TIMEOUT * 5)
 Periodic cleanup rate for multipart messages that never receive all of the expected number of message chunks. Measured in milliseconds.
 
#define CONNECT_TIMEOUT   10000
 Time to wait for the websocket connection to be established. Measured in milliseconds.
 
#define CONNECT_RETRIES   3
 Number of retries used to establish a websocket connect. The twApi_Connect call returns an error after the retries are exhausted.
 
#define DUTY_CYCLE   20
 "ON" time of the duty cycle modulated AlwaysOn connection. Acceptable values are 0-100%. A value of 100% means the connection always stays alive.
 
#define DUTY_CYCLE_PERIOD   0
 Period of the duty cycle modulated AlwaysOn connection measured in milliseconds. A value of 0 means the connections always stays alive. It is recommended that this value be greater than 10 seconds at a minimum.
 
#define STREAM_BLOCK_SIZE   256
 Incremental block size for dynamically allocated stream (byte array) variables. When adding bytes to a stream, this is the size of memory allocated if more memory is needed.TW_MAX_TASKS.
 
#define TW_MAX_TASKS   5
 Maximum number of tasks allowed for the built in round robin task execution engine.
 
#define FILE_XFER_BLOCK_SIZE   8000
 File transfer Block size (in Bytes)
 
#define FILE_XFER_MAX_FILE_SIZE   8000000000
 File transfer Max file size (in Bytes)
 
#define FILE_XFER_MD5_BLOCK_SIZE   6400
 File transfer MD5 Buffer size (in Bytes - should be multiple of 64)
 
#define FILE_XFER_TIMEOUT   30000
 File transfer timeout for stalled transfers (in milliseconds)
 
#define FILE_XFER_STAGING_DIR   "/opt/thingworx/tw_staging"
 File transfer staging directory for received files.
 
#define OFFLINE_MSG_QUEUE_SIZE   16384
 Offline message queue max size.
 
#define OFFLINE_MSG_STORE_DIR   "/opt/thingworx"
 Offline message store file.
 
#define MAX_CONNECT_DELAY   10000
 Maximum msec delay before connecting.
 
#define CONNECT_RETRY_INTERVAL   5000
 Connection retry interval.
 
#define MAX_MESSAGES   500
 Maximum number of unhandled messages in the message queue.
 
#define DEFAULT_SOCKET_READ_TIMEOUT   100
 Socket read timeout.
 

Typedefs

typedef struct twConfig twConfig
 Structure to allow overriding of defaults at runtime.
 

Variables

twConfig twcfg
 

Detailed Description

Default settings for ThingWorx C SDK.