config.h File Reference

Go to the source code of this file.

Defines

#define CLIENTONLY(x)
#define DEVICEONLY(x)
THREAD_IDLE_TIME

The { THREAD_IDLE_TIME} constant determines when a thread will be removed from the thread pool and returned to the operating system. When a thread in the thread pool has been idle for this number of milliseconds the thread will be released from the thread pool. The default value is 5000 milliseconds (5 seconds).



#define THREAD_IDLE_TIME   30000
JOBS_PER_THREAD

The { JOBS_PER_THREAD} constant determines when a new thread will be allocated to the thread pool inside the SDK. The thread pool will try and maintain this jobs/thread ratio. When the jobs/thread ratio becomes greater than this, then a new thread (up to the max) will be allocated to the thread pool. The default ratio is 10 jobs/thread.



#define JOBS_PER_THREAD   1
MIN_THREADS

The { MIN_THREADS} constant defines the minimum number of threads the thread pool inside the SDK will create. The thread pool will always have this number of threads. These threads are used for both callbacks into applications built on top of the SDK and also for making connections to other control points and devices. This number includes persistent threads. The default value is two threads.



#define MIN_THREADS   2
MAX_THREADS

The { MAX_THREADS} constant defines the maximum number of threads the thread pool inside the SDK will create. These threads are used for both callbacks into applications built on top of the library and also for making connections to other control points and devices. It is not recommended that this value be below 10, since the threads are necessary for correct operation. This value can be increased for greater performance in operation at the expense of greater memory overhead. The default value is 12.



#define MAX_THREADS   12
MAX_JOBS_TOTAL

The { MAX_JOBS_TOTAL} constant determines the maximum number of jobs that can be queued. If this limit is reached further jobs will be thrown to avoid memory exhaustion. The default value 100. (Added by Axis.)



#define MAX_JOBS_TOTAL   100
DEFAULT_SOAP_CONTENT_LENGTH

SOAP messages will read at most { DEFAULT_SOAP_CONTENT_LENGTH} bytes. This prevents devices that have a misbehaving web server to send a large amount of data to the control point causing it to crash. This can be adjusted dynamically with { UpnpSetMaxContentLength}.



#define DEFAULT_SOAP_CONTENT_LENGTH   16000
NUM_SSDP_COPY

This configuration parameter determines how many copies of each SSDP advertisement and search packets will be sent. By default it will send two copies of every packet.



#define NUM_SSDP_COPY   2
SSDP_PAUSE

This configuration parameter determines the pause between identical SSDP advertisement and search packets. The pause is measured in milliseconds and defaults to 100.



#define SSDP_PAUSE   100
WEB_SERVER_BUF_SIZE

This configuration parameter sets the maximum buffer size for the webserver. The default value is 1MB.



#define WEB_SERVER_BUF_SIZE   (1024*1024)
AUTO_RENEW_TIME

The { AUTO_RENEW_TIME} is the time, in seconds, before a subscription expires that the SDK automatically resubscribes. The default value is 10 seconds. Setting this value too low can result in the subscription renewal not making it to the device in time, causing the subscription to timeout. In order to avoid continually resubscribing the minimum subscription time is five seconds more than the auto renew time.



#define AUTO_RENEW_TIME   10
CP_MINIMUM_SUBSCRIPTION_TIME

The { CP_MINIMUM_SUBSCRIPTION_TIME} is the minimum subscription time allowed for a control point using the SDK. Subscribing for less than this time automatically results in a subscription for this amount. The default value is 5 seconds more than the { AUTO_RENEW_TIME}, or 15 seconds.



#define CP_MINIMUM_SUBSCRIPTION_TIME   (AUTO_RENEW_TIME + 5)
MAX_SEARCH_TIME

The { MAX_SEARCH_TIME} is the maximum time allowed for an SSDP search by a control point. Searching for greater than this time automatically results in a search for this amount. The default value is 80 seconds.



#define MAX_SEARCH_TIME   80
MIN_SEARCH_TIME

The { MIN_SEARCH_TIME} is the minimumm time allowed for an SSDP search by a control point. Searching for less than this time automatically results in a search for this amount. The default value is 2 seconds.



#define MIN_SEARCH_TIME   2
AUTO_ADVERTISEMENT_TIME

The { AUTO_ADVERTISEMENT_TIME} is the time, in seconds, before an device advertisements expires before a renewed advertisement is sent. The default time is 30 seconds.



#define AUTO_ADVERTISEMENT_TIME   30
SSDP_PACKET_DISTRIBUTE

The { SSDP_PACKET_DISTRIBUTE} enables the SSDP packets to be sent at an interval equal to half of the expiration time of SSDP packets minus the AUTO_ADVERTISEMENT_TIME. This is used to increase the probability of SSDP packets reaching to control points. It is recommended that this flag be turned on for embedded wireless devices.



#define SSDP_PACKET_DISTRIBUTE   1
WEB_SERVER_BLOCK_TIMEOUT

When requewsting a blocking select we still will not fully block but timeout on { WEB_SERVER_BLOCK_TIMEOUT} and check if the global shutdown flag was set. This ensures that we can always cleanly shutdown the server, and that UpnpFinish() will never hang waiting for threads which may be blocked by select() The default time is 3 seconds.



#define WEB_SERVER_BLOCK_TIMEOUT   3
Module Exclusion

Depending on the requirements, the user can selectively discard any of the major modules like SOAP, GENA, SSDP or the Internal web server. By default everything is included inside the SDK. By setting any of the values below to 0, that component will not be included in the final SDK. {itemize} { EXCLUDE_SOAP[0,1]} { EXCLUDE_GENA[0,1]} { EXCLUDE_SSDP[0,1]} { EXCLUDE_DOM [0,1]} { EXCLUDE_MINISERVER[0,1]} { EXCLUDE_WEB_SERVER[0,1]} { EXCLUDE_JNI[0,1]} {itemize}



#define EXCLUDE_SSDP   0
#define EXCLUDE_SOAP   0
#define EXCLUDE_GENA   0
#define EXCLUDE_DOM   0
#define EXCLUDE_MINISERVER   0
#define EXCLUDE_WEB_SERVER   0
#define EXCLUDE_JNI   1
#define EXCLUDE_WEB_SERVER   1
#define EXCLUDE_MINISERVER   1
#define EXCLUDE_MINISERVER   0
DEBUG_TARGET

The user has the option to redirect the library output debug messages to either the screen or to a log file. All the output messages with debug level 0 will go to { upnp.err} and messages with debug level greater than zero will be redirected to { upnp.out}.



#define DEBUG_TARGET   1
Other debugging features



#define DEBUG_ALL   1
#define DEBUG_SSDP   0
#define DEBUG_SOAP   0
#define DEBUG_GENA   0
#define DEBUG_TPOOL   0
#define DEBUG_MSERV   0
#define DEBUG_DOM   0
#define DEBUG_HTTP   0
#define DEBUG_API   0
DBGONLY

The { DBGONLY} macro allows code to be marked so that it is only included in the DEBUG build and not the release. To use this macro, put the code inside of the parentheses:

{ DBGONLY(int i;)}

This will cause a declaration of the integer { i} only in the debug build.



#define DBGONLY(x)

Define Documentation

#define AUTO_ADVERTISEMENT_TIME   30

Definition at line 219 of file config.h.

#define AUTO_RENEW_TIME   10

Definition at line 174 of file config.h.

#define CLIENTONLY (  ) 

Definition at line 391 of file config.h.

#define CP_MINIMUM_SUBSCRIPTION_TIME   (AUTO_RENEW_TIME + 5)

Definition at line 186 of file config.h.

#define DBGONLY (  ) 

Definition at line 354 of file config.h.

#define DEBUG_ALL   1

Definition at line 299 of file config.h.

#define DEBUG_API   0

Definition at line 307 of file config.h.

#define DEBUG_DOM   0

Definition at line 305 of file config.h.

#define DEBUG_GENA   0

Definition at line 302 of file config.h.

#define DEBUG_HTTP   0

Definition at line 306 of file config.h.

#define DEBUG_MSERV   0

Definition at line 304 of file config.h.

#define DEBUG_SOAP   0

Definition at line 301 of file config.h.

#define DEBUG_SSDP   0

Definition at line 300 of file config.h.

#define DEBUG_TARGET   1

Definition at line 290 of file config.h.

#define DEBUG_TPOOL   0

Definition at line 303 of file config.h.

#define DEFAULT_SOAP_CONTENT_LENGTH   16000

Definition at line 134 of file config.h.

#define DEVICEONLY (  ) 

Definition at line 397 of file config.h.

#define EXCLUDE_DOM   0

Definition at line 271 of file config.h.

#define EXCLUDE_GENA   0

Definition at line 270 of file config.h.

#define EXCLUDE_JNI   1

Definition at line 277 of file config.h.

#define EXCLUDE_MINISERVER   0

Definition at line 380 of file config.h.

#define EXCLUDE_MINISERVER   1

Definition at line 380 of file config.h.

#define EXCLUDE_MINISERVER   0

Definition at line 380 of file config.h.

#define EXCLUDE_SOAP   0

Definition at line 269 of file config.h.

#define EXCLUDE_SSDP   0

Definition at line 268 of file config.h.

#define EXCLUDE_WEB_SERVER   1

Definition at line 366 of file config.h.

#define EXCLUDE_WEB_SERVER   0

Definition at line 366 of file config.h.

#define JOBS_PER_THREAD   1

Definition at line 85 of file config.h.

#define MAX_JOBS_TOTAL   100

Definition at line 124 of file config.h.

#define MAX_SEARCH_TIME   80

Definition at line 197 of file config.h.

#define MAX_THREADS   12

Definition at line 113 of file config.h.

#define MIN_SEARCH_TIME   2

Definition at line 208 of file config.h.

#define MIN_THREADS   2

Definition at line 98 of file config.h.

#define NUM_SSDP_COPY   2

Definition at line 143 of file config.h.

#define SSDP_PACKET_DISTRIBUTE   1

Definition at line 232 of file config.h.

#define SSDP_PAUSE   100

Definition at line 152 of file config.h.

#define THREAD_IDLE_TIME   30000

Definition at line 73 of file config.h.

#define WEB_SERVER_BLOCK_TIMEOUT   3

Definition at line 246 of file config.h.

#define WEB_SERVER_BUF_SIZE   (1024*1024)

Definition at line 160 of file config.h.


Generated on Fri Mar 26 20:16:54 2010 for MediaTomb by  doxygen 1.6.1