虫虫首页|资源下载|资源专辑|精品软件
登录|注册

summary

  • 鈥?What Is a Thread? o The Thread Class o Simple Thread Examples 鈥?Problems with Multithreading

    鈥?What Is a Thread? o The Thread Class o Simple Thread Examples 鈥?Problems with Multithreading o What Goes Wrong? o Thread Names and Current Threads o Java s synchronized 鈥?Synchronizing Threads o Multiple Locks 鈥?The Dining Philosophers Problem o Deadlocks o A Solution to the Dining Philosophers Problem o Java s wait() and notify() o Dining Philosophers Example 鈥?summary

    标签: Thread Multithreading Examples Problems

    上传时间: 2017-03-02

    上传用户:kristycreasy

  • ======================================================================== MICROSOFT FOUNDATIO

    ======================================================================== MICROSOFT FOUNDATION CLASS LIBRARY : SimpleExtMFC ======================================================================== AppWizard has created this SimpleExtMFC application for you. This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. This file contains a summary of what you will find in each of the files that make up your SimpleExtMFC application.

    标签: MICROSOFT FOUNDATIO

    上传时间: 2017-04-21

    上传用户:daguda

  • course consists of an introduction signal fundamentals signal processing system signal processin

    course consists of an introduction signal fundamentals signal processing system signal processing applications and a summary.

    标签: signal introduction fundamentals processing

    上传时间: 2013-12-05

    上传用户:1427796291

  • VC MATLAB 混编示例 ppWizard has created this matlab调用 application for you. This application not only

    VC MATLAB 混编示例 ppWizard has created this matlab调用 application for you. This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. This file contains a summary of what you will find in each of the files that make up your matlab调用 application.

    标签: application ppWizard created MATLAB

    上传时间: 2014-01-10

    上传用户:小码农lz

  • mpu6050

    Aidaohuakai( 楼主 ) 2013-8-22 11:45:24  只看该作者23307 | 41倒序浏览 论坛上对mpu6050的资料和讨论并不多,很多坛友都说驱动失败,老是显示0. 以下就谈谈我的一些血与泪的教训:    昨天开始接触mpu6050,在网上查了很多资料,下载程序,准备一展身手。首先看了mpu6050中文资料,之后又看了那个mpu6050的测试程序,把这些看明白之后就开始写程序了。我不是直接把程序复制过去,只是复制mpu6050的地址和初始化,IIC并没有复制,就复制我上次写的24C02的那个程序,想不到,这给了我血与泪的教训,我原来是直接把IIC复制过来的,并没有多留意。之后初始化mpu6050,写入地址,读出数据,下载到单片机之后,LCD上显示000001,我感到郁闷,之后又调试,以为是显示不对,又写显示,之后又下载,结果还是老样,这样半天就过去了。驱动没成功,又怀疑芯片或引脚有问题,继续调试,也没成功。就一一对应地看了地址,又看了初始化,发现没错,调试还是不成功。最后干脆不接IIC总线,竟然发现了个天大的秘密,接不接IIC,LCD都显示000001,我又用示波器测试波形,发现波形正确。在网上又查了别人的资料,在论坛上也很少有关于mpu6050的资料,也看了比别人的一些讨论。很多坛友都说驱动失败,老是显示0.    没办法,一天就这样过去了,今天早上,我又仔细看了程序,出乎我的想象,竟然是IIC的那个地址没改,原来写24C02的那个地址是a0,还是原封不动,把我吓了一跳。把这些改过来之后,一切正常,能显示加速度和陀螺仪。血与泪的教训啊,是自己不细心造成的,忘记改地址!今天早上竟然花了不到2个钟就调出来了,惊喜之时就写了这个分享,希望对大家有用。

    标签: 圆点博士小四轴

    上传时间: 2015-04-14

    上传用户:wusheng4495

  • Matlab 画三维立体图形

    Matlab 画三维立体图形 The aim of geom3d library is to handle and visualize 3D geometric primitives such as points, lines, planes, polyhedra... It provides low-level functions for manipulating 3D geometric primitives, making easier the development of more complex geometric algorithms.      Some features of the library are:   - creation of various shapes (3D points, 3D lines, planes, polyhedra...)     through an intuitive syntax.      Ex: createPlane(p1, p2, p3) to create a plane through 3 points.     - derivation of new shapes: intersection between 2 planes, intersection between     a plane and a line, between a sphere and a line...   - functions for 3D polygons and polyhedra. Polyhedra use classical vertex-faces     arrays (face array contain indices of vertices), and support faces with any     number of vertices. Some basic models are provided (createOctaedron,     createCubeoctaedron...), as well as some computation (like faceNormal or     centroid)      - manipulation of planar transformation. Ex.:     ROT = createRotationOx(THETA);     P2  = transformPoint3d(P1, ROT);     - direct drawing of shapes with specialized functions. Clipping is performed      automatically for infinite shapes such as lines or rays. Ex:     drawPoint3d([50 50 25; 20 70 10], 'ro');    % draw some points     drawLine3d([X0 Y0 Z0 DX DY DZ]);            % clip and draw straight line Some functions require the geom2d package.       Additional help is provided in geom3d/Contents.m file, as well as summary files     like 'points3d.m' or 'lines3d.m'.

    标签: Matlab 画三维立体图形

    上传时间: 2015-11-02

    上传用户:A1321

  • net_tcp.h

    /* ********************************************************************************************************* *                                             uC/TCP-IP V2 *                                      The Embedded TCP/IP Suite * *                          (c) Copyright 2003-2010; Micrium, Inc.; Weston, FL * *               All rights reserved.  Protected by international copyright laws. * *               uC/TCP-IP is provided in source form to registered licensees ONLY.  It is  *               illegal to distribute this source code to any third party unless you receive  *               written permission by an authorized Micrium representative.  Knowledge of  *               the source code may NOT be used to develop a similar product. * *               Please help us continue to provide the Embedded community with the finest  *               software available.  Your honesty is greatly appreciated. * *               You can contact us at www.micrium.com. ********************************************************************************************************* */ /* ********************************************************************************************************* * *                                          NETWORK TCP LAYER *                                   (TRANSMISSION CONTROL PROTOCOL) * * Filename      : net_tcp.h * Version       : V2.10 * Programmer(s) : ITJ ********************************************************************************************************* * Note(s)       : (1) Supports Transmission Control Protocol as described in RFC #793 with the following *                     restrictions/constraints : * *                     (a) TCP Security & Precedence NOT supported               RFC # 793, Section 3.6 * *                     (b) TCP Urgent Data           NOT supported               RFC # 793, Section 3.7 *                                                                                'The Communication of *                                                                                  Urgent Information' * *                     (c) The following TCP options NOT supported :              * *                         (1) Window Scale                                      RFC #1072, Section 2 *                                                                               RFC #1323, Section 2 *                         (2) Selective Acknowledgement (SACK)                  RFC #1072, Section 3 *                                                                               RFC #2018 *                                                                               RFC #2883 *                         (3) TCP Echo                                          RFC #1072, Section 4 *                         (4) Timestamp                                         RFC #1323, Section 3.2 *                         (5) Protection Against Wrapped Sequences (PAWS)       RFC #1323, Section 4 * *                     (d) #### IP-Options-to-TCP-Connection                     RFC #1122, Section 4.2.3.8 *                                Handling NOT           supported * *                     (e) #### ICMP-Error-Message-to-TCP-Connection             RFC #1122, Section 4.2.3.9 *                                Handling NOT currently supported * *                 (2) TCP Layer assumes/requires Network Socket Layer (see 'net_sock.h  MODULE  Note #1a2'). ********************************************************************************************************* */ /*$PAGE*/ /* ********************************************************************************************************* *                                               MODULE * * Note(s) : (1) TCP Layer module is NOT required for UDP-to-Application API configuration. * *               See also 'net_cfg.h  TRANSPORT LAYER CONFIGURATION' *                      & 'net_cfg.h  USER DATAGRAM PROTOCOL LAYER CONFIGURATION'. * *               See also 'net_tcp.h  Note #2'. * *           (2) The following TCP-module-present configuration value MUST be pre-#define'd in  *               'net_cfg_net.h' PRIOR to all other network modules that require TCP Layer *               configuration (see 'net_cfg_net.h  TCP LAYER CONFIGURATION  Note #2b') : * *                   NET_TCP_MODULE_PRESENT ********************************************************************************************************* */ #ifdef   NET_TCP_MODULE_PRESENT                                 /* See Note #2.                                         */ /* ********************************************************************************************************* *                                               EXTERNS ********************************************************************************************************* */ #if ((defined(NET_TCP_MODULE)) && \      (defined(NET_GLOBALS_EXT))) #define  NET_TCP_EXT #else #define  NET_TCP_EXT  extern #endif /*$PAGE*/ /* ********************************************************************************************************* *                                               DEFINES ********************************************************************************************************* */ /* ********************************************************************************************************* *                                         TCP HEADER DEFINES * * Note(s) : (1) The following TCP value MUST be pre-#define'd in 'net_def.h' PRIOR to 'net_buf.h' so that *               the Network Buffer Module can configure maximum buffer header size (see 'net_def.h  TCP *               LAYER DEFINES' & 'net_buf.h  NETWORK BUFFER INDEX & SIZE DEFINES  Note #1') : * *               (a) NET_TCP_HDR_SIZE_MAX                  60        (NET_TCP_HDR_LEN_MAX *                                                                  * NET_TCP_HDR_LEN_WORD_SIZE) * *           (2) Urgent pointer & data NOT supported (see 'net_tcp.h  Note #1b'). ********************************************************************************************************* */ #define  NET_TCP_HDR_LEN_MASK                         0xF000u #define  NET_TCP_HDR_LEN_SHIFT                            12u #define  NET_TCP_HDR_LEN_NONE                              0u #define  NET_TCP_HDR_LEN_MIN                               5u #define  NET_TCP_HDR_LEN_MAX                              15u #define  NET_TCP_HDR_LEN_WORD_SIZE                       CPU_WORD_SIZE_32 #define  NET_TCP_HDR_SIZE_MIN                           (NET_TCP_HDR_LEN_MIN * NET_TCP_HDR_LEN_WORD_SIZE) #if 0                                                           /* See Note #1a.                                        */ #define  NET_TCP_HDR_SIZE_MAX                           (NET_TCP_HDR_LEN_MAX * NET_TCP_HDR_LEN_WORD_SIZE) #endif #define  NET_TCP_HDR_SIZE_TOT_MIN                       (NET_IP_HDR_SIZE_TOT_MIN + NET_TCP_HDR_SIZE_MIN) #define  NET_TCP_HDR_SIZE_TOT_MAX                       (NET_IP_HDR_SIZE_TOT_MAX + NET_TCP_HDR_SIZE_MAX) #define  NET_TCP_PSEUDO_HDR_SIZE                          12u   /*  = sizeof(NET_TCP_PSEUDO_HDR)                        */ #define  NET_TCP_PORT_NBR_RESERVED                       NET_PORT_NBR_RESERVED #define  NET_TCP_PORT_NBR_NONE                           NET_TCP_PORT_NBR_RESERVED #define  NET_TCP_HDR_URG_PTR_NONE                     0x0000u   /* See Note #2.                                         */ /*$PAGE*/ /* ********************************************************************************************************* *                                       TCP HEADER FLAG DEFINES * * Note(s) : (1) See 'TCP HEADER  Note #2' for flag fields. * *           (2) Urgent pointer & data NOT supported (see 'net_tcp.h  Note #1b'). ********************************************************************************************************* */ #define  NET_TCP_HDR_FLAG_MASK                        0x0FFFu #define  NET_TCP_HDR_FLAG_NONE                    DEF_BIT_NONE #define  NET_TCP_HDR_FLAG_RESERVED                    0x0FE0u   /* MUST be '0'.                                         */ #define  NET_TCP_HDR_FLAG_URGENT                  DEF_BIT_05    /* See Note #2.                                         */ #define  NET_TCP_HDR_FLAG_ACK                     DEF_BIT_04 #define  NET_TCP_HDR_FLAG_PUSH                    DEF_BIT_03 #define  NET_TCP_HDR_FLAG_RESET                   DEF_BIT_02 #define  NET_TCP_HDR_FLAG_SYNC                    DEF_BIT_01 #define  NET_TCP_HDR_FLAG_FIN                     DEF_BIT_00 #define  NET_TCP_HDR_FLAG_CLOSE                   NET_TCP_HDR_FLAG_FIN /* ********************************************************************************************************* *                                          TCP FLAG DEFINES ********************************************************************************************************* */                                                                 /* ------------------ NET TCP FLAGS ------------------- */ #define  NET_TCP_FLAG_NONE                        DEF_BIT_NONE #define  NET_TCP_FLAG_USED                        DEF_BIT_00    /* TCP conn cur used; i.e. NOT in free TCP conn pool.   */                                                                 /* ------------------ TCP TX  FLAGS ------------------- */                                                                 /* TCP tx flags copied from TCP hdr flags.              */ #define  NET_TCP_FLAG_TX_FIN                      NET_TCP_HDR_FLAG_FIN #define  NET_TCP_FLAG_TX_CLOSE                    NET_TCP_FLAG_TX_FIN #define  NET_TCP_FLAG_TX_SYNC                     NET_TCP_HDR_FLAG_SYNC #define  NET_TCP_FLAG_TX_RESET                    NET_TCP_HDR_FLAG_RESET #define  NET_TCP_FLAG_TX_PUSH                     NET_TCP_HDR_FLAG_PUSH #define  NET_TCP_FLAG_TX_ACK                      NET_TCP_HDR_FLAG_ACK #define  NET_TCP_FLAG_TX_URGENT                   NET_TCP_HDR_FLAG_URGENT #define  NET_TCP_FLAG_TX_BLOCK                    DEF_BIT_07                                                                 /* ------------------ TCP RX  FLAGS ------------------- */ #define  NET_TCP_FLAG_RX_DATA_PEEK                DEF_BIT_08 #define  NET_TCP_FLAG_RX_BLOCK                    DEF_BIT_15 /*$PAGE*/ /* ********************************************************************************************************* *                                          TCP TYPE DEFINES * * Note(s) : (1) NET_TCP_TYPE_&&& #define values specifically chosen as ASCII representations of the TCP *               types.  Memory displays of TCP types will display with their chosen ASCII names. ********************************************************************************************************* */                                                                 /* ------------------ NET TCP TYPES ------------------- */ #if     (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG) #define  NET_TCP_TYPE_NONE                        0x4E4F4E45u   /* "NONE" in ASCII.                                     */ #define  NET_TCP_TYPE_CONN                        0x54435020u   /* "TCP " in ASCII.                                     */ #else #if     (CPU_CFG_DATA_SIZE   == CPU_WORD_SIZE_32) #define  NET_TCP_TYPE_NONE                        0x454E4F4Eu   /* "NONE" in ASCII.                                     */ #define  NET_TCP_TYPE_CONN                        0x20504354u   /* "TCP " in ASCII.                                     */ #elif   (CPU_CFG_DATA_SIZE   == CPU_WORD_SIZE_16) #define  NET_TCP_TYPE_NONE                        0x4F4E454Eu   /* "NONE" in ASCII.                                     */ #define  NET_TCP_TYPE_CONN                        0x43542050u   /* "TCP " in ASCII.                                     */ #else                                                           /* Dflt CPU_WORD_SIZE_08.                               */ #define  NET_TCP_TYPE_NONE                        0x4E4F4E45u   /* "NONE" in ASCII.                                     */ #define  NET_TCP_TYPE_CONN                        0x54435020u   /* "TCP " in ASCII.                                     */ #endif #endif /* ********************************************************************************************************* *                                     TCP SEQUENCE NUMBER DEFINES * * Note(s) : (1) TCP initial transmit sequence number is incremented by a fixed value, preferably a large *               prime value or a large value with multiple unique factors. * *               (a) One reasonable TCP initial transmit sequence number increment value example : * *                       65527  =  37 * 23 * 11 * 7 * * *               #### NET_TCP_TX_SEQ_NBR_CTR_INC could be developer-configured in 'net_cfg.h'. * *               See also 'NET_TCP_TX_GET_SEQ_NBR()  Notes #1b2 & #1c2'. ********************************************************************************************************* */ #define  NET_TCP_SEQ_NBR_NONE                              0u #define  NET_TCP_ACK_NBR_NONE                            NET_TCP_SEQ_NBR_NONE #define  NET_TCP_TX_SEQ_NBR_CTR_INC                    65527u   /* See Note #1.                                         */ #define  NET_TCP_ACK_NBR_DUP_WIN_SIZE_SCALE                4 /*$PAGE*/ /* ********************************************************************************************************* *                                    TCP DATA/TOTAL LENGTH DEFINES * * Note(s) : (1) (a) TCP total length #define's (NET_TCP_TOT_LEN)  relate to the total size of a complete *                   TCP packet, including the packet's TCP header.  Note that a complete TCP packet MAY *                   be fragmented in multiple Internet Protocol packets. * *               (b) TCP data  length #define's (NET_TCP_DATA_LEN) relate to the data  size of a complete *                   TCP packet, equal to the total TCP packet length minus its TCP header size.  Note  *                   that a complete TCP packet MAY be fragmented in multiple Internet Protocol packets. ********************************************************************************************************* */                                                                                 /* See Notes #1a & #1b.                 */ #define  NET_TCP_DATA_LEN_MIN                              0u #define  NET_TCP_TOT_LEN_MIN                            (NET_TCP_HDR_SIZE_MIN + NET_TCP_DATA_LEN_MIN) #define  NET_TCP_TOT_LEN_MAX                            (NET_IP_TOT_LEN_MAX   - NET_IP_HDR_SIZE_MIN ) #define  NET_TCP_DATA_LEN_MAX                           (NET_TCP_TOT_LEN_MAX  - NET_TCP_HDR_SIZE_MIN) /*$PAGE*/ /* ********************************************************************************************************* *                                      TCP SEGMENT SIZE DEFINES * * Note(s) : (1) (a) RFC # 879, Section 3 states that the TCP Maximum Segment Size "counts only *                   data octets in the segment, ... not the TCP header or the IP header". * *               (b) RFC #1122, Section 4.2.2.6 requires that : * *                   (1) "The MSS value to be sent in an MSS option must be less than or equal to * *                        (A) MMS_R - 20 * *                        where MMS_R is the maximum size for a transport-layer message that can *                        be received." * *                   (2) "If an MSS option is not received at connection setup, TCP MUST assume a *                        default send MSS of 536 (576 - 40)." * *                   See also 'net_ip.h  IP DATA/TOTAL LENGTH DEFINES  Note #1'. ********************************************************************************************************* */                                                                                         /* See Note #1.                 */ #define  NET_TCP_MAX_SEG_SIZE_DFLT                      (NET_IP_MAX_DATAGRAM_SIZE_DFLT - NET_IP_HDR_SIZE_MIN - NET_TCP_HDR_SIZE_MIN) #define  NET_TCP_MAX_SEG_SIZE_DFLT_RX                    NET_TCP_DATA_LEN_MAX           /* See Note #1b1.               */ #define  NET_TCP_MAX_SEG_SIZE_DFLT_TX                    NET_TCP_MAX_SEG_SIZE_DFLT      /* See Note #1b2.               */ #define  NET_TCP_MAX_SEG_SIZE_NONE                         0u #define  NET_TCP_MAX_SEG_SIZE_MIN                        NET_TCP_MAX_SEG_SIZE_DFLT #define  NET_TCP_MAX_SEG_SIZE_MAX                        NET_TCP_DATA_LEN_MAX #define  NET_TCP_SEG_LEN_MIN                             NET_TCP_DATA_LEN_MIN #define  NET_TCP_SEG_LEN_MAX                             NET_TCP_DATA_LEN_MAX #define  NET_TCP_SEG_LEN_SYNC                              1u #define  NET_TCP_SEG_LEN_FIN                               1u #define  NET_TCP_SEG_LEN_CLOSE                           NET_TCP_SEG_LEN_FIN #define  NET_TCP_SEG_LEN_ACK                               0u #define  NET_TCP_SEG_LEN_RESET                             0u #define  NET_TCP_SEG_LEN_PROBE                             0u #define  NET_TCP_DATA_LEN_TX_SYNC                          0u #define  NET_TCP_DATA_LEN_TX_FIN                           0u #define  NET_TCP_DATA_LEN_TX_CLOSE                       NET_TCP_DATA_LEN_TX_FIN #define  NET_TCP_DATA_LEN_TX_ACK                           0u #define  NET_TCP_DATA_LEN_TX_PROBE_NO_DATA                 0u #define  NET_TCP_DATA_LEN_TX_PROBE_DATA                    1u #define  NET_TCP_DATA_LEN_TX_RESET                         0u #define  NET_TCP_TX_PROBE_DATA                          0x00u /* ********************************************************************************************************* *                                       TCP WINDOW SIZE DEFINES * * Note(s) : (1) Although NO RFC specifies the absolute minimum TCP connection window size value allowed, *               RFC #793, Section 3.7 'Data Communication : Managing the Window' states that for "the *               window ... there is an assumption that this is related to the currently available data *               buffer space available for this connection". ********************************************************************************************************* */ #define  NET_TCP_WIN_SIZE_NONE                             0u #define  NET_TCP_WIN_SIZE_MIN                            NET_TCP_MAX_SEG_SIZE_MIN #define  NET_TCP_WIN_SIZE_MAX                            DEF_INT_16U_MAX_VAL /*$PAGE*/ /* ********************************************************************************************************* *                                     TCP HEADER OPTIONS DEFINES * * Note(s) : (1) See the following RFC's for TCP options summary : * *               (a) RFC # 793, Section  3.1 'Header Format : Options' *               (b) RFC #1122; Sections 4.2.2.5, 4.2.2.6 * *           (2) TCP option types are encoded in the first octet for each TCP option as follows : * *                           -------- *                           | TYPE | *                           -------- * *               The TCP option type value determines the TCP option format : * *               (a) The following TCP option types are single-octet TCP options -- i.e. the option type *                   octet is the ONLY octet for the TCP option. * *                   (1) TYPE =  0   End of Options List *                   (2) TYPE =  1   No Operation * * *               (b) All other TCP options MUST be multi-octet TCP options (see RFC #1122, Section 4.2.2.5) : * *                           ------------------------------ *                           | TYPE | LEN  |   TCP OPT    | *                           ------------------------------ * *                       where  *                               TYPE        Indicates the specific TCP option type *                               LEN         Indicates the total    TCP option length, in octets, including  *                                                the option type & the option length octets *                               TCP OPT     Additional TCP option octets, if any, that contain the remaining *                                                TCP option information * *                   The following TCP option types are multi-octet TCP options where the option's second *                   octet specify the total TCP option length, in octets, including the option type & the *                   option length octets : * *                   (1) TYPE =  2   Maximum Segment Size        See RFC # 793, Section  3.1 'Header Format : *                                                                   Options : Maximum Segment Size'; *                                                                   RFC #1122, Section 4.2.2.6; *                                                                   RFC # 879, Section 3 * *                   (2) TYPE =  3   Window  Scale               See 'net_tcp.h  Note #1c1' *                   (3) TYPE =  4   SACK Allowed                See 'net_tcp.h  Note #1c2' *                   (4) TYPE =  5   SACK Option                 See 'net_tcp.h  Note #1c2' *                   (5) TYPE =  6   Echo Request                See 'net_tcp.h  Note #1c3' *                   (6) TYPE =  7   Echo Reply                  See 'net_tcp.h  Note #1c3' *                   (7) TYPE =  8   Timestamp                   See 'net_tcp.h  Note #1c4' * *           (3) TCP header allows for a maximum option list length of 40 octets : * *                   NET_TCP_HDR_OPT_SIZE_MAX = NET_TCP_HDR_SIZE_MAX - NET_TCP_HDR_SIZE_MIN * *                                            = 60 - 20 * *                                            = 40 * *           (4) 'NET_TCP_OPT_SIZE'  MUST be pre-defined PRIOR to all definitions that require TCP option  *                size data type. ********************************************************************************************************* */ /*$PAGE*/ #define  NET_TCP_HDR_OPT_END_LIST                          0u #define  NET_TCP_HDR_OPT_NOP                               1u #define  NET_TCP_HDR_OPT_MAX_SEG_SIZE                      2u #define  NET_TCP_HDR_OPT_WIN_SCALE                         3u #define  NET_TCP_HDR_OPT_SACK_PERMIT                       4u #define  NET_TCP_HDR_OPT_SACK                              5u #define  NET_TCP_HDR_OPT_ECHO_REQ                          6u #define  NET_TCP_HDR_OPT_ECHO_REPLY                        7u #define  NET_TCP_HDR_OPT_TS                                8u #define  NET_TCP_HDR_OPT_PAD                             NET_TCP_HDR_OPT_END_LIST #define  NET_TCP_HDR_OPT_LEN_END_LIST                      1u #define  NET_TCP_HDR_OPT_LEN_NOP                           1u #define  NET_TCP_HDR_OPT_LEN_MAX_SEG_SIZE                  4u #define  NET_TCP_HDR_OPT_LEN_WIN_SCALE                     3u #define  NET_TCP_HDR_OPT_LEN_SACK_PERMIT                   2u #define  NET_TCP_HDR_OPT_LEN_ECHO_REQ                      6u #define  NET_TCP_HDR_OPT_LEN_ECHO_REPLY                    6u #define  NET_TCP_HDR_OPT_LEN_TS                           10u #define  NET_TCP_HDR_OPT_LEN_SACK_MIN                      6u #define  NET_TCP_HDR_OPT_LEN_SACK_MAX                     38u #define  NET_TCP_HDR_OPT_LEN_MIN                           1u #define  NET_TCP_HDR_OPT_LEN_MIN_LEN                       2u #define  NET_TCP_HDR_OPT_LEN_MAX                          38u typedef  CPU_INT32U  NET_TCP_OPT_SIZE;                          /* TCP opt size data type (see Note #4).                */ #define  NET_TCP_HDR_OPT_SIZE_WORD               (sizeof(NET_TCP_OPT_SIZE)) #define  NET_TCP_HDR_OPT_SIZE_MAX                       (NET_TCP_HDR_SIZE_MAX - NET_TCP_HDR_SIZE_MIN) #define  NET_TCP_HDR_OPT_NBR_MIN                           0u #define  NET_TCP_HDR_OPT_NBR_MAX                        (NET_TCP_HDR_OPT_SIZE_MAX / NET_TCP_HDR_OPT_SIZE_WORD) #define  NET_TCP_HDR_OPT_IX                              NET_TCP_HDR_SIZE_MIN /*$PAGE*/ /* ********************************************************************************************************* *                                TCP OPTION CONFIGURATION TYPE DEFINES * * Note(s) : (1) NET_TCP_OPT_CFG_TYPE_&&& #define values specifically chosen as ASCII representations of  *               the TCP option configuration types.  Memory displays of TCP option configuration buffers  *               will display the TCP option configuration TYPEs with their chosen ASCII names. ********************************************************************************************************* */                                                                 /* ---------------- TCP OPT CFG TYPES ----------------- */ #if     (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG) #define  NET_TCP_OPT_CFG_TYPE_NONE                0x4E4F4E45u   /* "NONE" in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE        0x4D535320u   /* "MSS " in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_WIN_SCALE           0x57494E20u   /* "WIN " in ASCII (see 'net_tcp.h  Note #1c1').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK_PERMIT         0x53434B50u   /* "SCKP" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK                0x5341434Bu   /* "SACK" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REQ            0x45524551u   /* "EREQ" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REPLY          0x4543484Fu   /* "ECHO" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_TS                  0x54532020u   /* "TS  " in ASCII (see 'net_tcp.h  Note #1c4').        */ #else #if     (CPU_CFG_DATA_SIZE   == CPU_WORD_SIZE_32) #define  NET_TCP_OPT_CFG_TYPE_NONE                0x454E4F4Eu   /* "NONE" in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE        0x2053534Du   /* "MSS " in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_WIN_SCALE           0x204E4957u   /* "WIN " in ASCII (see 'net_tcp.h  Note #1c1').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK_PERMIT         0x504B4353u   /* "SCKP" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK                0x4B434153u   /* "SACK" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REQ            0x51455245u   /* "EREQ" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REPLY          0x4F484345u   /* "ECHO" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_TS                  0x20205354u   /* "TS  " in ASCII (see 'net_tcp.h  Note #1c4').        */ #elif   (CPU_CFG_DATA_SIZE   == CPU_WORD_SIZE_16) #define  NET_TCP_OPT_CFG_TYPE_NONE                0x4F4E454Eu   /* "NONE" in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE        0x534D2053u   /* "MSS " in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_WIN_SCALE           0x4957204Eu   /* "WIN " in ASCII (see 'net_tcp.h  Note #1c1').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK_PERMIT         0x4353504Bu   /* "SCKP" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK                0x41534B43u   /* "SACK" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REQ            0x52455145u   /* "EREQ" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REPLY          0x43454F48u   /* "ECHO" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_TS                  0x53542020u   /* "TS  " in ASCII (see 'net_tcp.h  Note #1c4').        */ #else                                                           /* Dflt CPU_WORD_SIZE_08.                               */ #define  NET_TCP_OPT_CFG_TYPE_NONE                0x4E4F4E45u   /* "NONE" in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_MAX_SEG_SIZE        0x4D535320u   /* "MSS " in ASCII.                                     */ #define  NET_TCP_OPT_CFG_TYPE_WIN_SCALE           0x57494E20u   /* "WIN " in ASCII (see 'net_tcp.h  Note #1c1').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK_PERMIT         0x53434B50u   /* "SCKP" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_SACK                0x5341434Bu   /* "SACK" in ASCII (see 'net_tcp.h  Note #1c2').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REQ            0x45524551u   /* "EREQ" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_ECHO_REPLY          0x4543484Fu   /* "ECHO" in ASCII (see 'net_tcp.h  Note #1c3').        */ #define  NET_TCP_OPT_CFG_TYPE_TS                  0x54532020u   /* "TS  " in ASCII (see 'net_tcp.h  Note #1c4').        */ #endif #endif /*$PAGE*/ /* ********************************************************************************************************* *                                   TCP CONNECTION TIMEOUT DEFINES * * Note(s) : (1) (a) (1) RFC #1122, Section 4.2.2.13 'DISCUSSION' states that "the graceful close algorithm *                       of TCP requires that the connection state remain defined on (at least) one end of *                       the connection, for a timeout period of 2xMSL ... During this period, the (remote  *                       socket, local socket) pair that defines the connection is busy and cannot be reused". * *                   (2) The following sections reiterate that the TIME-WAIT state timeout scalar is two *                       maximum segment lifetimes (2 MSL) : * *                       (A) RFC #793, Section 3.9 'Event Processing : SEGMENT ARRIVES : *                               Check Sequence Number : TIME-WAIT STATE' *                       (B) RFC #793, Section 3.9 'Event Processing : SEGMENT ARRIVES : *                               Check FIN Bit         : TIME-WAIT STATE' * *               (b) (1) RFC #793, Section 3.3 'Sequence Numbers : Knowing When to Keep Quiet' states that *                       "the Maximum Segment Lifetime (MSL) is ... to be 2 minutes.  This is an engineering *                       choice, and may be changed if experience indicates it is desirable to do so". * *                   (2) Microsoft Corporation's Windows XP defaults MSL to 15 seconds. ********************************************************************************************************* */                                                                                     /* Max seg timeout (see Note #1b) : */ #define  NET_TCP_CONN_TIMEOUT_MAX_SEG_MIN_SEC   (  0u                           )   /* ... min  =  0 seconds            */ #define  NET_TCP_CONN_TIMEOUT_MAX_SEG_MAX_SEC   (  2u * DEF_TIME_NBR_SEC_PER_MIN)   /* ... max  =  2 minutes            */ #define  NET_TCP_CONN_TIMEOUT_MAX_SEG_DFLT_SEC  ( 15u                           )   /* ... dflt = 15 seconds            */ #define  NET_TCP_CONN_TIMEOUT_MAX_SEG_SCALAR       2u                               /* ... scalar (see Note #1a).       */ #define  NET_TCP_CONN_TIMEOUT_CONN_DFLT_SEC     (120u * DEF_TIME_NBR_SEC_PER_MIN)   /* Dflt conn timeout = 120 minutes  */ #define  NET_TCP_CONN_TIMEOUT_USER_DFLT_SEC     ( 30u * DEF_TIME_NBR_SEC_PER_MIN)   /* Dflt user timeout =  30 minutes  */ /*$PAGE*/ /* ********************************************************************************************************* *                                        TCP CONNECTION STATES * * Note(s) : (1) See the following RFC's for TCP state machine summary : * *               (a) RFC # 793; Sections 3.2, 3.4, 3.5, 3.9 *               (b) RFC #1122; Sections 4.2.2.8, 4.2.2.10, 4.2.2.11, 4.2.2.13, 4.2.2.18, 4.2.2.20 * *           (2) (a) #### Additional closing-data-available state used for closing connections to allow the *                   application layer to receive any remaining data. * *                   See also 'net_tcp.c  NetTCP_RxPktConnHandlerFinWait1()  Note #2f5A2', *                            'net_tcp.c  NetTCP_RxPktConnHandlerFinWait2()  Note #2f5B', *                            'net_tcp.c  NetTCP_RxPktConnHandlerClosing()   Note #2d2B2a1B', *                          & 'net_tcp.c  NetTCP_RxPktConnHandlerLastAck()   Note #2d2A1b'. ********************************************************************************************************* */ #define  NET_TCP_CONN_STATE_NONE                           0u #define  NET_TCP_CONN_STATE_FREE                           1u #define  NET_TCP_CONN_STATE_CLOSED                        10u #define  NET_TCP_CONN_STATE_LISTEN                        20u #define  NET_TCP_CONN_STATE_SYNC_RXD                      30u #define  NET_TCP_CONN_STATE_SYNC_RXD_PASSIVE              31u #define  NET_TCP_CONN_STATE_SYNC_RXD_ACTIVE               32u #define  NET_TCP_CONN_STATE_SYNC_TXD                      35u #define  NET_TCP_CONN_STATE_CONN                          40u #define  NET_TCP_CONN_STATE_FIN_WAIT_1                    50u #define  NET_TCP_CONN_STATE_FIN_WAIT_2                    51u #define  NET_TCP_CONN_STATE_CLOSING                       52u #define  NET_TCP_CONN_STATE_TIME_WAIT                     53u #define  NET_TCP_CONN_STATE_CLOSE_WAIT                    55u #define  NET_TCP_CONN_STATE_LAST_ACK                      56u #define  NET_TCP_CONN_STATE_CLOSING_DATA_AVAIL            59u   /* See Note #2a.                                        */ /* ********************************************************************************************************* *                                     TCP CONNECTION QUEUE STATES ********************************************************************************************************* */ #define  NET_TCP_RX_Q_STATE_NONE                           0u #define  NET_TCP_RX_Q_STATE_CLOSED                       100u #define  NET_TCP_RX_Q_STATE_CLOSING                      101u #define  NET_TCP_RX_Q_STATE_SYNC                         110u #define  NET_TCP_RX_Q_STATE_CONN                         111u #define  NET_TCP_TX_Q_STATE_NONE                           0u #define  NET_TCP_TX_Q_STATE_CLOSED                       200u #define  NET_TCP_TX_Q_STATE_CLOSING                      201u #define  NET_TCP_TX_Q_STATE_SYNC                         210u #define  NET_TCP_TX_Q_STATE_CONN                         211u #define  NET_TCP_TX_Q_STATE_SUSPEND                      215u #define  NET_TCP_TX_Q_STATE_CLOSED_SUSPEND               220u #define  NET_TCP_TX_Q_STATE_CLOSING_SUSPEND              221u /*$PAGE*/ /* ********************************************************************************************************* *                                     TCP CONNECTION CODE DEFINES **************

    标签: tcp uCOS-II

    上传时间: 2015-11-22

    上传用户:the same kong

  • DLMS Color Book

    DLMS  编辑 本词条缺少名片图,补充相关内容使词条更完整,还能快速升级,赶紧来编辑吧! 配电线报文规范(Distribution Line Message Specification) [IEC 62056-53]是应用层规范,独立于应用层以下的各个低层,因而也就与通信信道无关,设计用于在计算机集成环境中支持与(能量)分配设备间的消息交换,是由IEC TC57建立并以IEC 61334-4-41发布的国际标准。 中文名 配电线报文规范 外文名 Distribution Line Message Specification) 建立者 IEC TC57 应用领域 于抄表、远程控制以及增值服务等 这个概念被进一步发展成为设备语言报文规范,其目的在于为结构化建模和仪表数据交换提供一个互操作环境,支持任何能量类型如电、水、气或热的计量,应用于远程抄表、远程控制以及增值服务

    标签: IEC62056 DLMS COSEM

    上传时间: 2016-04-07

    上传用户:auqaiss

  • 给button加圆角的代码

    可以自定义和继承           /// <summary>         /// 设计器支持所需的方法 - 不要         /// 使用代码编辑器修改此方法的内容。         /// </summary>         private void InitializeComponent()         {             this.components = new System.ComponentModel.Container();             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;             this.Text = "Form1";         }

    标签: button 代码

    上传时间: 2016-08-15

    上传用户:baobao9437

  • 机器学习-ID3算法

    机器学习ID3算法的简单实现, ID3算法是一种贪心算法,用来构造决策树。ID3算法起源于概念学习系统(CLS),以信息熵的下降速度为选取测试属性的标准,即在每个节点选取还尚未被用来划分的具有最高信息增益的属性作为划分标准,然后继续这个过程,直到生成的决策树能完美分类训练样例。

    标签: ID3 机器学习 算法

    上传时间: 2017-05-11

    上传用户:zheng417