📄 defaults.h
字号:
// Default event packet format (may be custom)#if !defined(DEFAULT_EVENT_FORMAT)# define DEFAULT_EVENT_FORMAT PKT_CLIENT_FIXED_FMT_HIGH // E031: packet.h#endif// ----------------------------------------------------------------------------// Default encoding// encoding for FILE should be ASCII (Hex or Base64) - to be viewable in an editor#define DEFAULT_FILE_ENCODING ENCODING_HEX#if defined(TRANSPORT_MEDIA_FILE)# define DEFAULT_ENCODING DEFAULT_FILE_ENCODING#endif// straight socket communication should be binary encoded - for best efficiency#define DEFAULT_SOCKET_ENCODING ENCODING_BINARY#if defined(TRANSPORT_MEDIA_SOCKET)# define DEFAULT_ENCODING DEFAULT_SOCKET_ENCODING#endif// encoding for Serial(RS232) should be ASCII (Hex or Base64)#define DEFAULT_SERIAL_ENCODING ENCODING_HEX#if defined(TRANSPORT_MEDIA_SERIAL)# define DEFAULT_ENCODING DEFAULT_SERIAL_ENCODING#endif// encoding for GPRS should be ASCII (Hex or Base64) since it transmits over a modem#define DEFAULT_GPRS_ENCODING ENCODING_BASE64#if defined(TRANSPORT_MEDIA_GPRS)# define DEFAULT_ENCODING DEFAULT_GPRS_ENCODING#endif// ----------------------------------------------------------------------------// absolute transmission rates// explicit no transport defined#if defined(TRANSPORT_MEDIA_NONE)# define MIN_XMIT_RATE 0L // seconds# define MIN_XMIT_DELAY 0L // seconds#endif// no minimums when writing to file#if defined(TRANSPORT_MEDIA_FILE)# define MIN_XMIT_RATE 0L // seconds# define MIN_XMIT_DELAY 0L // seconds#endif// set minimums when sending to server over a socket#if defined(TRANSPORT_MEDIA_SOCKET)# define MIN_XMIT_RATE 120L // seconds# define MIN_XMIT_DELAY 90L // seconds#endif// no minimums for Serial communication#if defined(TRANSPORT_MEDIA_SERIAL)# define MIN_XMIT_RATE 0L // seconds# define MIN_XMIT_DELAY 0L // seconds#endif// set minimums when sending to server over GPRS#if defined(TRANSPORT_MEDIA_GPRS)# define MIN_XMIT_RATE 120L // seconds# define MIN_XMIT_DELAY 90L // seconds#endif// ----------------------------------------------------------------------------// Define "PROTOCOL_THREAD" to run the transport connections in a separate thread//#define PROTOCOL_THREAD#if defined(PROTOCOL_THREAD) && !defined(ENABLE_THREADS)# define ENABLE_THREADS#endif// ----------------------------------------------------------------------------// Define "GPS_THREAD" to run the GPS acquisition in a separate thread//#define GPS_THREAD#if defined(GPS_THREAD) && !defined(ENABLE_THREADS)# define ENABLE_THREADS#endif// ----------------------------------------------------------------------------// "PQUEUE_THREAD_LOCK" must be defined in a multi-threaded environment to// enable pqueue mutex locking.#if defined(ENABLE_THREADS)# define PQUEUE_THREAD_LOCK#endif// ----------------------------------------------------------------------------// Define "CUSTOM_PROPERTIES" if there are additional custom properties that// should be made available in the property manager.// Note that "custprop.h" and "custprop.inc" must also be available.#define CUSTOM_PROPERTIES// ----------------------------------------------------------------------------// Configuration/Property files// Gumstix platform#if defined(TARGET_GUMSTIX) // "/dmtp"# define DIR_SEP "/"# if !defined(CONFIG_DIR_NAME)# define CONFIG_DIR_NAME "dmtp"# endif#endif// Windows CE platform#if defined(TARGET_WINCE) // "\DMTP"# define DIR_SEP "\\"# if !defined(CONFIG_DIR_NAME)# define CONFIG_DIR_NAME "DMTP"# endif#endif// Cygwin platform#if defined(TARGET_CYGWIN) // "."# define DIR_SEP "/"# if !defined(CONFIG_DIR_NAME)# define CONFIG_DIR_NAME "."# endif# if !defined(CONFIG_DIR)# define CONFIG_DIR "."# endif#endif// Linux platform#if defined(TARGET_LINUX) // "."# define DIR_SEP "/"# if !defined(CONFIG_DIR_NAME)# define CONFIG_DIR_NAME "tmp"# endif#endif// config directory prefix#if !defined(CONFIG_DIR_NAME)# define CONFIG_DIR_NAME "DMTP"#endif#if !defined(CONFIG_DIR)# define CONFIG_DIR DIR_SEP CONFIG_DIR_NAME#endif#define CONFIG_DIR_ CONFIG_DIR DIR_SEP// uncomment to enable loading/saving property file#define PROPERTY_FILE (CONFIG_DIR_ "props.conf")#define PROPERTY_CACHE (CONFIG_DIR_ "props.dat")#define PROPERTY_SAVE_INTERVAL MINUTE_SECONDS(90) // seconds// ----------------------------------------------------------------------------// message logging// default logging-level#if defined(TARGET_WINCE_PHONE)# define LOGGING_DEFAULT_LEVEL -SYSLOG_DEBUG#endif#if !defined(LOGGING_DEFAULT_LEVEL)# define LOGGING_DEFAULT_LEVEL SYSLOG_ERROR#endif// console logging#define LOGGING_CONSOLE// Auxiliary logging directory// This allows logging to an auxiliary storage device (SD card, etc.) if the// device is available, and a specific directory on the device exists.// Set LOGGING_AUX_DEVICE to the locacation of the auxiliary storage device.// On the different Windows CE devices that I've worked with (3 so far) this// directory is usually "\Storage Card", but may be different for different // devices, and will most certainly be different for other non-WinCE devices.// HP hw6945 phone#if defined(TARGET_WINCE_PHONE) && !defined(LOGGING_AUX_DEVICE)# define LOGGING_AUX_DIRECTORY DIR_SEP "Storage Card" DIR_SEP CONFIG_DIR_NAME#endif// Windows Cygwin#if defined(TARGET_CYGWIN)# define LOGGING_AUX_DIRECTORY "."#endif// Auxiliary message logging#if defined(LOGGING_AUX_DIRECTORY)# define LOGGING_MESSAGE_FILE LOGGING_AUX_DIRECTORY DIR_SEP "MESSAGE.log"#endif// ----------------------------------------------------------------------------// Experimental code// uncomment to include experimental DMTP support (ie. not yet part of the DMTP protocol)#define DMTP_EXPERIMENTAL// ----------------------------------------------------------------------------// GPS simulator (testing/debugging only)// This must also be supported by the GPS receiver handler (see 'custom/gps.c')// define to compile with GPS simulation support#if defined(TARGET_CYGWIN)// always on Cygwin (development/testing platform)# define GPS_DEVICE_SIMULATOR#elif defined(TARGET_WINCE_PHONE)// never on a WinCE phone (it isn't useful)#elif defined(TARGET_WINCE)// uncomment to enable GPS simulator on other WinCE platorms//# define GPS_DEVICE_SIMULATOR#else// other non-WinCE platforms (Linux, etc.)//# define GPS_DEVICE_SIMULATOR#endif// ----------------------------------------------------------------------------// Feature list#if defined(ENABLE_SET_TIME)# define _F_STM "/SetTime" // set system clock enabled#else# define _F_STM ""#endif#if defined(ENABLE_REBOOT)# define _F_RBT "/Reboot" // Reboot enabled#else# define _F_RBT ""#endif#if defined(ENABLE_UPLOAD)# define _F_UPL "/Upload" // File upload support#else# define _F_UPL ""#endif#if defined(ENABLE_GUI)# define _F_GUI "/GUI" // Simple GUI#else# define _F_GUI ""#endif#if defined(ENABLE_GEOZONE)# define _F_GZO "/GZone" // GeoZone support#else# define _F_GZO ""#endif#if defined(GPS_DEVICE_SIMULATOR)# define _F_GDS "/GPSim" // GPS simulator#else# define _F_GDS ""#endif#if !defined(APPLICATION_FEATURES)# define APPLICATION_FEATURES _F_STM _F_RBT _F_UPL _F_GUI _F_GZO _F_GDS#endif// ----------------------------------------------------------------------------#ifdef __cplusplus}#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -