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

two-<b>dimensional</b>

  • A Convex Hull is the smallest convex polygon that contains every point of the set S. A polygon P is

    A Convex Hull is the smallest convex polygon that contains every point of the set S. A polygon P is convex if and only if, for any two points A and B inside the polygon, the line segment AB is inside P. One way to visualize a convex hull is to put a "rubber band" around all the points, and let it wrap as tight as it can. The resultant polygon is a convex hull.

    标签: polygon S. the contains

    上传时间: 2013-12-23

    上传用户:it男一枚

  • ISIS Timer Design

    A design about 8051 (running at 12MHz) based system with 3 7-Seg displays and two buttons to implement the following functions.  1. When press the + button, the display C = A+B.  2. When press the button, the display C = A - B.  “A” and “B” are 8-bit inputs when “C” is 9-bit output. 

    标签: ISIS AT89C52

    上传时间: 2015-05-05

    上传用户:guoxiy

  • 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

  • wangluo ppt

    最小二乘法曲面拟合,包括C程序及说明文件。对于搞三维重建的有一定帮助-Least squares surface fitting, including the C procedures and documentation. For engaging in three-dimensional reconstruction to some extent help the

    标签: 通信网

    上传时间: 2015-11-28

    上传用户:schhqq

  • ESD - Physics and Devices

    Electrostatic discharge (ESD) phenomena have been known to mankind since Thales of Miletus in approximately 600 B.C.E. noticed the attraction of strands of hay to amber. Two thousand six hundred years have passed and the quest to obtain a better under- standing of electrostatics and ESD phenomenon continues. Today, the manufacturing of microelectronics has continued the interest in the field of electrostatic phenomenon spanning factory issues, tooling, materials, and the microelectronic industry

    标签: Devices Physics ESD and

    上传时间: 2020-06-05

    上传用户:shancjb

  • VIP专区-嵌入式/单片机编程源码精选合集系列(66)

    VIP专区-嵌入式/单片机编程源码精选合集系列(66)资源包含以下内容:1. 适用与S3C2410A和S3C2440A的SD卡驱动程序.2. 这款无线报警主机对任何发射频率为315M.3. 精密可调基准电压发生器源程序 --- 2006-3-18 16:58:.4. 汉字点阵滚动指示牌源程序 --- 2006-3-18 16:59:00.5. 近日对农历计算感兴趣.6. 串口通讯实例 高精度电压表(24bit).7. 我刚下的原码,不知道可以用吗,大家帮我看看,.8. at89s51加上ptr2000模块实现短距离无线通信.9. FPGA/CPLD集成开发环境ise的使用详解 示例代码7.10. FPGA/CPLD集成开发环境ise的使用详解 示例代码8.11. FPGA/CPLD集成开发环境ise的使用详解 示例代码9.12. FPGA/CPLD集成开发环境ise的使用详解 示例代码10.13. FPGA/CPLD集成开发环境ise的使用详解 示例代码.14. 主要介绍蓝牙鼠标的接口程序,与目前多人研究的方向一致..15. 系统控制程序代码 智能电表主控程序 1、计算电量、电费 6 2、接受键盘输入.16. zigbee开发基础知识,包括应用领域,ZIGBEE优势和初步的802.14.5协议介绍,四个文档.17. 键盘扫描程序.18. 介绍音频数字水印的制作.19. MInigui的消息框实验,针对Smartarm2200开发板.20. MInigui的对话框实验,针对Smartarm2200开发板.21. MInigui的控件实验,针对Smartarm2200开发板.22. MInigui的自定义控件实验,针对Smartarm2200开发板.23. MInigui的编辑框实验,针对Smartarm2200开发板.24. MInigui的位图实验,针对Smartarm2200开发板.25. 在用IAR开发AT91SAMSE系列中外扩sdram的源码。.26. AT91SAM7SE系列IAR编程中外扩NAND的源码。.27. 这是sd卡驱动的源代码.28. MiniGUI图形界面实验系列之桌面主题实验例程。.29. MiniGUI图形界面实验系列之位图操作例程.30. MiniGUI图形界面实验系列之对话框实验例程。.31. MiniGUI图形界面实验系列之gdi绘图实验例程。.32. MiniGUI图形界面实验系列之控件应用实验例程。.33. CC1000通信.34. Two pdf format ZigBee overviews. It is useful for known ZigBee technology..35. 基于CPLD的USB下载电缆设计.36. 这是一个MAX518的驱动程序,已调试过的,欢迎大家下载.37. 使用STK500_2 协议的bootloader.38. 如果有的压缩文件解压需要密码.39. 打开压缩文件后安装.EXE文件,在安装的目录下有MPLAB MCC18的工程文件MassStorage,即USB大容量存储器的源代码.40. 基于ST7920A控制器的128*64液晶驱动程序.

    标签: 塑料 模具

    上传时间: 2013-05-19

    上传用户:eeworm

  • VIP专区-嵌入式/单片机编程源码精选合集系列(161)

    VIP专区-嵌入式/单片机编程源码精选合集系列(161)资源包含以下内容:1. 温度监视器.2. 通过按键在3位一体的数码管上显示数字.3. 在IAR 环境下.4. pruotues仿真教程 pruotues仿真教程 pruotues仿真教程.5. 嵌入式系统设计的好书.6. i2c总线的verilog代码.7. 1、实验目的 掌握编写一般GUI程序的基本步骤.8. 红色飓风原理图.9. G代码生成软件.10. msp430F437三相电表DEMO(编译器 IAR 3.42A).11. 键盘程序:基于cpld开发环境的4*4键盘程序.12. ADS下开发的A/D转换器AD7892及LCD显示程序.13. mcs51单片机键盘扫描程序.14. 给出了一种基于$3C2410嵌入式SoC的网络视频会议终端的实现方案.15. 在仿真软件protues7.1上仿真arm7的GUI的代码和protues的工程文件。是学习arm的一个好东西.16. c51的原理图啊.17. 温度传感器ds18b20的完整程序.18. 中兴MG815+CDMA模块USB转接原理图及PCB图(基于CP2102的USB TO RS232转接原理.19. Michael J. Pont 的嵌入式系统编程讲座1.20. PIC 的ip 有用的着的拿去看看吧 对于开发pci总线会有很大帮助的.21. AT91RM9260PMC程序,程序和ATMEL9260EK开发板配套.22. Embedded VC++ 4 Programmer s Guide.23. ylp2410的bootloader源码.24. McCraw-Hill - Wap A Beginner s Guide Ebook-fly.25. 能够实现步进电机的正转反转.26. 很好的资料和大家分享 飓风板的原理图.27. 文章的内容是有关嵌入式编程用到的工具-MAKE的中文手册..28. 飞思卡尔智能车摄像头的完整程序.29. STM32的程序.30. 基于PLC控制交流变频调速电梯系统的研究的一篇pdf格式说明文档。.31. This a GUI that manages DSP analysis functions for wav-files (e.g., speech signals). Two functions (.32. 《嵌入式系统设计与实例开发》王田苗 北航出版社.33. 嵌入式开发中用于自制JTAG的dll文件.34. 黑色经典系列 arm嵌入式系统开发典型模块.35. 51系列的软件包,有i2c驱动,各种芯片的介绍.36. 此程序是在AVR单片机atmega169P处理器的程序.37. 关于手机BOOTLADER相关.38. 华中机床的plc程序.39. 键盘的源码的程序.40. 是北京智心工作室的基于MPC8280设计的核心板使用手册.

    标签: 微带天线

    上传时间: 2013-06-14

    上传用户:eeworm

  • VIP专区-嵌入式/单片机编程源码精选合集系列(164)

    VIP专区-嵌入式/单片机编程源码精选合集系列(164)资源包含以下内容:1. 嵌入式ARC平台参考资料.2. c8051f020 ds1620 温度传感器 调通了 keil下开发.3. 让蜂鸣器唱歌的程序,利用从音乐中提取出的文件资料,控制发音长短来实现.4. 基于凌阳单片机spmc75f2413的步进电机3轴联动空间圆弧插补源程序.5. Oreilly出版的权威的dojo教材.6. 基于嵌入式操作系统的网络监控系统.7. 基于arm的嵌入式开发程序设计.8. 一片关于ARM9处理器的bootloader的分析与设计论文.9. 用verilog写的对OCMJ2X8液晶模块控制代码.10. 状态机的应用。在嵌入式系统中状态机使用非常频繁.11. AD89C51单片机控制液晶显示器LCD1602显示时间。.12. T-Kernel 嵌入式系统源码.13. 这是一个重要的CPLD文件 具有很高的参考价值.14. 利用ARM2103编写的实时时钟程序.15. minigui编程手册.16. 用TEA5767 自己动手制作的收音机。效果很好.17. ARM嵌入式系统的通用bootloader的设计与实现.18. AVR驱动7219程序.19. cypress的开发框架.20. RFID读卡终端C程序设计基于51单片机实现.21. ARM与嵌入式系统基础教程 ARM与嵌入式系统基础教程.22. GUI代码,用与实现相关GUI的功能,如有需要即可自由下载!.23. 一个基于周立功EASYARM2000平台的一个小程序 定时器来实现蜂鸣器的开关 各0.5s.24. TCP/IP协议栈原代码(C语言)很好的理解TCP/IP的技术材料.25. c51+proteus 18B20 温度传感器实验.26. i2c 总线详细介绍及相关编程说明.27. c51+proteus仿真+7seg Max7221动态显示.28. E: oolLAB Proteus实例播放音乐 说明:8051单片机播放音乐.29. linux是最好的嵌入式设计操作系统,资源开源,并且可以支持很多种嵌入式IC.30. CAN51开发板功能 1、 USB或DC+5V供电; 2、 89c52+sja1000+tja1050(tja1040)(p82c250);89c52+mcp2515+tja1050(t.31. RT73在嵌入式领域最稳定的驱动 官网已经取消下载.32. 这是用prolog语言开发的系统.33. 嵌入式C使用的汇总.34. 现在Arm系统是非常成熟和广泛的嵌入式系统.本文是Arm嵌入式开发系统的介绍.35. 《LinuxuClinux+MiniGUI+嵌入式系统开发原理、工具及过程》.36. These instances, whenmapped to an N-dimensional space, represent a core set that can be used to con.37. 一个用IO口来模拟串口通讯的软件.38. 一个对93C46进行编程的软件.39. 红外解码 LCD显示程序,用处广泛 此程序仅用于学习交流使用,.40. 图解电子器件 学习嵌入式系统的朋友.

    标签: 红外探测器

    上传时间: 2013-04-15

    上传用户:eeworm

  • 基于ARM的网络视频监控系统设计与实现.rar

    近年来,随着多媒体技术、计算机网络与通信技术的的快速发展,传统的监控系统也不断向着新的发展方向进行着不断的更新与发展。进而随着嵌入式技术的出现以及人们对降低监控系统成本和提高可靠性的迫切需求,基于嵌入式系统的网络视频监控系统将成为新的研发热点。 本文的目的是把嵌入式技术与计算机网络技术相结合,构造一个性能稳定且具有较强处理能力的数字化远程视频监控系统。该监控系统以嵌入式Linux系统平台作为服务器端,服务器程序在其上以后台方式运行,等待监控系统环境中的客户机使用浏览器向其发送访问请求,实现在局域网乃至Internet网上对摄像头的远程控制。 文中把系统设计分为三大部分:系统硬件设计、嵌入式Linux在硬件平台的实现和系统软件设计。硬件设计部分首先提出了整个硬件系统的实现方案,接着详细介绍了S3C2410处理器与存储器、以太网控制器芯片以及USB和串口的接口电路设计;第二部分详细叙述了嵌入式Linux在本系统硬件平台的移植实现及应用程序的开发特点,重点讲述了本系统平台上Linux的引导加载程序Bootloader的设计过程;系统软件部分首先介绍了USB接口摄像头驱动在嵌入式Linux下的实现,重点讲述了Video4Linux下视频采集的实现,接着论述了如何实现图像的JPEG压缩,最后针对基于B/S模式的网络通信系统结构,详细阐述了网络通信的具体实现过程和方法。 最后在办公室局域网通过对系统测试,显示了系统运行结果,实现了利用局域网或Internet网对远程环境进行监控的功能。

    标签: ARM 网络视频监控 系统设计

    上传时间: 2013-07-04

    上传用户:lgnf

  • 永磁同步发电机的电磁场分析.rar

    永磁同步发电机由于一系列高效节能的优点,在工农业生产、航空航天、国防和日常生活中得到广泛应用,并且受到许多学者的关注,其研究领域主要涉及永磁同步发电机的设计、精确性能分析、控制等方面。 本课题作为国家自然科学基金项目《无刷无励磁机谐波励磁的混合励磁永磁电机的研究》的课题,主要研究永磁电机的电磁场空载和负载计算,求出永磁电机的电压波形和电压调整率,为分段式转子的混合励磁永磁电机的研究奠定基础,主要做了以下工作: 首先介绍了永磁同步发电机的基本原理,包括永磁同步发电机的结构形式和永磁同步发电机的运行性能,采用传统解析理论给出了电压调整率的计算方法及外特性的计算模型;然后用有限元ANSYS对永磁同步发电机样机进行实体建模,经过定义分配材料、划分网格、加边界条件和载荷、求解计算等,得到矢量磁位Az、磁场强度H、磁感应强度B等结果,直观地看出电机内部的磁场分布情况。 其次根据电磁场计算结果,应用齿磁通法对其进行后处理。该方法求解转子在一个齿距内不同位置处的磁场,以定子齿的磁通为计算单位,根据绕组与齿的匝链关系,计算出磁链随时间的变化,进而得到永磁同步发电机空、负载时电压大小及波形。通过计算结果写实验结果对比,验证了齿磁通法的正确性,为计算永磁同步发电机各种性能特性提供有力工具。 最后,基于齿磁通法对永磁同步发电机的外特性进行了深入研究,定量分析了结构参数对外特性的影响规律,提出了有效降低电压调整率的方法的是:增加气隙长度g的同时,适当增加永磁体的磁化方向的长度hm;此外,要尽量的减少每相串联匝数N和增大导线面积以减小阻抗参数。通过改变电机的结构参数,对其电磁场进行计算,找到永磁电机电压调整率的变化规律,为加电励磁的混合励磁永磁电机做准备,达到稳定输出电压的目的。

    标签: 永磁同步 发电机 磁场分析

    上传时间: 2013-04-24

    上传用户:15853744528