当前位置:文档之家› TIA-942-1-2008 《Data Center Coaxial Cabling Specifications and Application Distances》

TIA-942-1-2008 《Data Center Coaxial Cabling Specifications and Application Distances》

TIA-942-1-2008 《Data Center Coaxial Cabling Specifications and Application Distances》
TIA-942-1-2008 《Data Center Coaxial Cabling Specifications and Application Distances》

TIA

STANDARD

Data Center Coaxial Cabling Specifications and Application Distances

TIA-942-1

March 2008

TELECOMMUNICATIONS INDUSTRY ASSOCIATION

ANSI/TIA-942-1

Approved: March 28, 2008

Representing the telecommunications industry in association with the Electronic Industries Alliance

--```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

NOTICE

TIA Engineering Standards and Publications are designed to serve the public interest through eliminating misunderstandings between manufacturers and purchasers, facilitating interchangeability and improvement of products, and assisting the purchaser in selecting and obtaining with minimum delay the proper product for their particular need. The existence of such Standards and Publications shall not in any respect preclude any member or non-member of TIA from manufacturing or selling products not conforming to such Standards and Publications.

Neither shall the existence of such Standards and Publications preclude their voluntary use by Non-TIA members, either domestically or internationally.

Standards and Publications are adopted by TIA in accordance with the American National Standards Institute (ANSI) patent policy. By such action, TIA does not assume any liability to any patent owner, nor does it assume any obligation whatever to parties adopting the Standard or Publication.

This Standard does not purport to address all safety problems associated with its use or all applicable regulatory requirements. It is the responsibility of the user of this Standard to establish appropriate safety and health practices and to determine the applicability of regulatory limitations before its use.

(From Standards Proposal No. 3-0092-AD1, formulated under the cognizance of the TIA TR-42 Committee on User Premises Telecommunications Cabling Infrastructure, TR-42.1 Subcommittee on Commercial Building Telecommunications Cabling).

--```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

Published by

?TELECOMMUNICATIONS INDUSTRY ASSOCIATION

Standards and Technology Department

Boulevard 2500

Wilson

Arlington, VA 22201 U.S.A.

PRICE: Please refer to current Catalog of

TIA TELECOMMUNICATIONS INDUSTRY ASSOCIATION STANDARDS

AND ENGINEERING PUBLICATIONS

or call Information Handling Services

USA and Canada (1-800-854-7179) International (303-397-7956)

or search online at https://www.doczj.com/doc/ab3704348.html,/standards/catalog/

All rights reserved

Printed

U.S.A.

in

NOTICE OF COPYRIGHT

This document is copyrighted by the TIA.

Reproduction of these documents either in hard copy or soft copy (including

posting on the web) is prohibited without copyright permission. For copyright

permission to reproduce portions of this document, please contact TIA Standards

Department or go to the TIA website (https://www.doczj.com/doc/ab3704348.html,) for details on how to

request permission. Details are located at:

https://www.doczj.com/doc/ab3704348.html,/standards/catalog/info.cfm#copyright

OR

Telecommunications Industry Association

Standards & Technology Department

2500 Wilson Boulevard, Suite 300

Arlington, VA 22201 USA

+1(703)907-7700

Organizations may obtain permission to reproduce a limited number of copies by entering into a license agreement. For information, contact:

Information Handling Services

15 Inverness Way East

Englewood, CO 80112-5704 or call

U.S.A. and Canada (1-877-413-5187)

International (303) 397-2896

--```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

--```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

NOTICE OF DISCLAIMER AND LIMITATION OF LIABILITY

The document to which this Notice is affixed (the “Document”) has been prepared by one or more Engineering Committees or Formulating Groups of the Telecommunications Industry Association (“TIA”). TIA is not the author of the Document contents, but publishes and claims copyright to the Document pursuant to licenses and permission granted by the authors of the contents.

TIA Engineering Committees and Formulating Groups are expected to conduct their affairs in accordance with the TIA Engineering Manual (“Manual”), the current and predecessor versions of which are available at https://www.doczj.com/doc/ab3704348.html,/standards/procedures/manuals/engineering.cfm. TIA’s function is to administer the process, but not the content, of document preparation in accordance with the Manual and, when appropriate, the policies and procedures of the American National Standards Institute (“ANSI”). TIA does not evaluate, test, verify or investigate the information, accuracy, soundness, or credibility of the contents of the Document. In publishing the Document, TIA disclaims any undertaking to perform any duty owed to or for anyone.

If the Document is identified or marked as a project number (PN) document, or as a standards proposal (SP) document, persons or parties reading or in any way interested in the Document are cautioned that: (a) the Document is a proposal; (b) there is no assurance that the Document will be approved by any Committee of TIA or any other body in its present or any other form; (c) the Document may be amended, modified or changed in the standards development or any editing process.

The use or practice of contents of this Document may involve the use of intellectual property rights (“IPR”), including pending or issued patents, or copyrights, owned by one or more parties. TIA makes no search or investigation for IPR. When IPR consisting of patents and published pending patent applications are claimed and called to TIA’s attention, a statement from the holder thereof is requested, all in accordance with the Manual. TIA takes no position with reference to, and disclaims any obligation to investigate or inquire into, the scope or validity of any claims of IPR. TIA will neither be a party to discussions of any licensing terms or conditions, which are

instead left to the parties involved, nor will TIA opine or judge whether proposed licensing terms or conditions are reasonable or non-discriminatory. TIA does not warrant or represent that procedures or practices suggested or provided in the Manual have been complied with as respects the Document or its contents.

If the Document contains one or more Normative References to a document published by another organization (“other SSO”) engaged in the formulation, development or publication of standards (whether designated as a standard, specification, recommendation or otherwise), whether such reference consists of mandatory, alternate or optional elements (as defined in the TIA Engineering Manual, 4th edition) then (i) TIA disclaims any duty or obligation to search or investigate the records of any other SSO for IPR or letters of assurance relating to any such Normative Reference; (ii) TIA’s policy of encouragement of voluntary disclosure (see Engineering Manual Section 6.5.1) of Essential Patent(s) and published pending patent applications shall apply; and (iii) Information as to claims of IPR in the records or publications of the other SSO shall not constitute identification to TIA of a claim of Essential Patent(s) or published pending patent applications.

TIA does not enforce or monitor compliance with the contents of the Document. TIA does not certify, inspect, test or otherwise investigate products, designs or services or any claims of compliance with the contents of the Document.

ALL WARRANTIES, EXPRESS OR IMPLIED, ARE DISCLAIMED, INCLUDING WITHOUT LIMITATION, ANY AND ALL WARRANTIES CONCERNING THE ACCURACY OF THE CONTENTS, ITS FITNESS OR APPROPRIATENESS FOR A PARTICULAR PURPOSE OR USE, ITS MERCHANTABILITY AND ITS NONINFRINGEMENT OF ANY THIRD PARTY’S INTELLECTUAL PROPERTY RIGHTS. TIA EXPRESSLY DISCLAIMS ANY AND ALL RESPONSIBILITIES FOR THE ACCURACY OF THE CONTENTS AND MAKES NO REPRESENTATIONS OR WARRANTIES REGARDING THE CONTENT’S COMPLIANCE WITH ANY APPLICABLE STATUTE, RULE OR REGULATION, OR THE SAFETY OR HEALTH EFFECTS OF THE CONTENTS OR ANY PRODUCT OR SERVICE REFERRED TO IN THE DOCUMENT OR PRODUCED OR RENDERED TO COMPLY WITH THE CONTENTS. --` ` ` , , , , ` , ` ` ` ` , ` , , , ` , ` ` ` , , , ` , ` ` -` -` , , ` , , ` , ` , , ` ---

TIA SHALL NOT BE LIABLE FOR ANY AND ALL DAMAGES, DIRECT OR INDIRECT, ARISING FROM OR RELATING TO ANY USE OF THE CONTENTS CONTAINED HEREIN, INCLUDING WITHOUT LIMITATION ANY AND ALL INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS, LOSS OF PROFITS, LITIGATION, OR THE LIKE), WHETHER BASED UPON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE FOREGOING NEGATION OF DAMAGES IS A FUNDAMENTAL ELEMENT OF THE USE OF THE CONTENTS HEREOF, AND THESE CONTENTS WOULD NOT BE PUBLISHED BY TIA WITHOUT SUCH LIMITATIONS.

--```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

ANSI/TIA-942-1 TELECOMMUNICATIONS INFRASTRUCTURE STANDARD FOR DATA CENTERS ADDENDUM1–DATA CENTER COAXIAL CABLING SPECIFICATIONS AND APPLICA-

TION DISTANCES

Table of Contents FOREWORD (ii)

1PURPOSE AND SCOPE (1)

2NORMATIVE REFERENCES (1)

3DEFINITIONS,ACRONYMS AND ABBREVIATIONS,AND UNITS OF MEASURE (1)

3.1Definitions (1)

3.2Acronyms and abbreviations (1)

3.3Units of measure (1)

4ADDITIONAL SPECIFICATIONS FOR75-ohm COAXIAL CONNECTORS (2)

5MAXIMUM LENGTH OF COAXIAL CABLING FROM THE MDA (2)

6FIELD TESTING OF75-OHM COAXIAL CABLING IN DATA CENTERS (2)

Annex A(informative)Revised T-1,E-1,T-3,and E-3Circuit Distances (4)

A.1.T-1,E-1,T-3and E-3circuit distances (4)

A.2.Baluns for E-3and T-3circuits (7)

List of Tables

Table1:Maximum Coaxial Cable Attenuation (2)

Table2:Maximum circuit distances with no customer DSX panel (4)

Table3:Reduction in circuit distances for customer DSX panel (5)

Table4:Reduction in circuit distances per connection or outlet (5)

Table5:Maximum circuit distances for the typical data center configuration (6)

Table6:Maximum backbone for the typical data center configuration (6)

Table7:Maximum circuit lengths over baluns NOT including insertion loss of baluns (7)

Table8:Reduction in maximum circuit length for each1dB insertion loss for a pair of baluns (7)

Table9:Reduction in maximum circuit length for each additional twisted pair connection (after the1st two) (7)

--```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

ANSI/TIA-942-1

FOREWORD

TIA standards documents are developed within the Technical Committees of the TIA and the standards coordinating committees of the TIA standards board.Members of the committees serve voluntarily and without commission.The companies that they represent are not necessari-ly members of the TIA.The standards developed within the TIA represent a consensus of the broad expertise on the subject.This expertise comes from within the TIA as well as those out-side of the TIA that have an expressed interest.The viewpoint expressed at the time that this standard was approved was from the editors’experience and the state of the art at that time. Users are encouraged to verify that they have the latest revision of the standard.

This Addendum has been prepared by the TR-42.1subcommittee and approved by TR-42.1, the TR-42Engineering Committee and the American National Standards Institute(ANSI). There is one informative annex in this Addendum.The annex is not considered a part of this standard.

--```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

This addendum supersedes certain application distances in TIA-942.

ANSI/TIA-942-1

1

PURPOSE AND SCOPE

This Addendum:

?Specifies additional requirements for connectors to be used for 75-ohm coaxial cabling in data centers.

?Specifies testing requirements for 75-ohm coaxial cabling in data centers.

?Provides an allowance for longer horizontal cabling originating from the MDA for coaxial cabling.

?Amends E1,T1,E3,and T3maximum circuit distances specified in Annex A of TIA-942.2

NORMATIVE REFERENCES

The following standards contain provisions which,through reference in this text,constitute pro-visions of this Addendum.At the time of publication,the editions indicated were valid.All stan-dards are subject to revision,and parties to agreements based on this standard are encouraged to investigate the possibility of applying the most recent editions of the standards indicated be-low.ANSI and TIA maintain registers of currently valid national standards published by them.

?ANSI T1.404-2002,Network and customer installation interfaces –DS3and metallic in-terface specification;

3DEFINITIONS,ACRONYMS AND ABBREVIATIONS,AND UNITS OF MEASURE 3.1

Definitions

The generic definitions in this clause have been formulated for use by the entire family of tele-communications infrastructure standards.Specific requirements are found in the normative clauses of this Addendum.For the purposes of this Addendum,the following definitions apply.Return loss:A ratio expressed in dB of the power of the outgoing signal to the power of the re-flected signal.3.2Acronyms and abbreviations

BNC bayonet Neill-Concelman DSX digital signal cross-connect TNC threaded Neill-Concelman

3.3Units of measure

dB decibel ft feet,foot m meter MHz

megahertz

--```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

ANSI/TIA-942-1

4ADDITIONAL SPECIFICATIONS FOR75-ohm COAXIAL CONNECTORS

Coaxial connectors for75-ohm(734and735type)coaxial cables shall meet the requirements of ANSI T1.404and shall additionally meet the following specifications:

Characteristic Impedance:75ohms

Maximum insertion loss at1MHz to22.5MHz:0.02dB

Minimum return loss at1MHz to22.5MHz:35dB

The Addendum permits the use of either75-ohm TNC or BNC connectors.However,the plug and jack shall be of the same type and BNC connectors are preferred.

Note:The revised specifications for coaxial connectors above permit longer distances for E-1, E-3,and T-3circuits than originally specified in ANSI/TIA-942Annex A.

Annex A of this Addendum provides revised distances for circuits over75-ohm coaxial cabling. 5MAXIMUM LENGTH OF COAXIAL CABLING FROM THE MDA

The maximum length of horizontal coaxial cabling from the main distribution area shall be300 meters(984ft)for75-ohm coaxial cabling channels including equipment cords and patch cords, and should be no longer than the maximum distance specified in Annex A of this Addendum for the type of applications intended to run over the coaxial cabling.

6FIELD TESTING OF75-OHM COAXIAL CABLING IN DATA CENTERS

Coaxial cabling shall be tested for:

1.Center conductor continuity;

2.Shield continuity;

3.Impedance(75-ohms);

4.Attenuation(less than the maximum specified in table1based on the planned applica-

tions for the cable).

Table1:Maximum Coaxial Cable Attenuation

Application-Frequency Maximum attenuation from access

provider DSX to customer equipment

CEPT-1(E-1)-1MHz 3.6dB

CEPT-3(E-3)-17.2MHz 6.6dB

T-3-22.4MHz 6.9dB

Coaxial cabling should be tested to ensure that end-to-end lengths are shorter than the lengths specified for the planned applications–see Annex A.

The cable tester should be calibrated for velocity of propagation using a sample length of the cable under test.As an alternative,length may be measured or determined using jacket dis-tance markings.

ANSI/TIA-942-1 Note that the maximum lengths and maximum attenuation values provided in this Addendum are end-to-end from access provider DSX panel to customer equipment including coaxial cable patch cords.

Additionally,the cabling should be visually inspected for

1.Obvious damage to cable(for example,pinched cable,cuts or abrasion that exposes the

shield);

2.Incorrect bend radii;

3.Loose or damaged connectors.

ANSI/TIA-942-1

Annex A(informative)Revised T-1,E-1,T-3,and E-3Circuit Distances

This annex is informative only and is not part of this Addendum.

A.1.T-1,E-1,T-3and E-3circuit distances

This Annex replaces Clause A.1.1in Annex A of ANSI/TIA-942in its entirety.

The following table2provides the maximum circuit distances for T-1,T-3,E-1,and E-3circuits with no adjustments for intermediate connections or outlets between the circuit demarcation point and the end equipment.These calculations assume that there is no customer DSX panel between the access provider demarcation point(which may be a DSX)and the end equipment. The access provider DSX panel is not counted in determining maximum circuit lengths.

Table2:Maximum circuit distances with no customer DSX panel

Circuit type Category3Category

5e,6&6A

734Type

Coaxial

735Type

Coaxial

T-1159m

(520ft)

193m

(632ft)

--

CEPT-1 (E-1)116m

(380ft)

146m

(477ft)

332m

(1088ft)

148m

(487ft)

T-3--146m

(480ft)

75m

(246ft)

CEPT-3 (E-3)--

160m

(524ft)

82m

(268ft)

NOTE:The distances shown in table2are for the specific applications used in

data centers and may be different from the distances supported for various appli-

cations in TIA-568-B.

Repeaters can be used to extend circuits beyond the lengths specified above.

These circuit distances should be adjusted for attenuation losses caused by a DSX panel be-tween the access provider demarcation point(which may be a DSX panel)and the end equip-ment.The following table3provides the reduction caused by DSX panels in maximum circuit distances for T-1,T-3,E-1,and E-3circuits over the recognized media type.

ANSI/TIA-942-1 Table3:Reduction in circuit distances for customer DSX panel

Circuit type Category3Category

5e,6&6A

734Type

Coaxial

735Type

Coaxial

T-111m

(37ft)

14m

(45ft)

--

CEPT-1 (E-1)10m

(32ft)

12m

(40ft)

64m

(209ft)

28m

(93ft)

T-3--13m

(44ft)

7m

(23ft)

CEPT-3 (E-3)--

15m

(50ft)

8m

(26ft)

Maximum circuit distances should be adjusted for attenuation losses caused by intermediate connections and outlets.The following table4provides the reduction in maximum circuit dis-tances for T-1,T-3,E-1,and E-3circuits over the recognized media type.

Table4:Reduction in circuit distances per connection or outlet

Circuit type Category3

Category

5e,6,&6A

734Type

Coaxial

735Type

Coaxial

T-1

4.0m

(13.0ft)

1.9m

(6.4ft)

--

CEPT-1 (E-1)

3.9m

(12.8ft)

2.0m

(6.4ft)

4.4m

(14.5ft)

2.0m

(6.5ft)

T-3--0.9m

(3.1ft)

0.5m

(1.6ft)

CEPT-3 (E-3)--

1.1m

(3.5ft)

0.5m

(1.8ft)

In the typical data center,there are a total of3connections in the backbone cabling,3connec-tions in the horizontal cabling and no DSX panels between the access provider demarcation point and the end equipment:

Backbone cabling:

?one connection in the entrance room,

?two connections in the main cross-connect,

Horizontal cabling:

?two connections in the horizontal cross-connect,and

?an outlet connection at the equipment distribution area.

This‘typical’configuration corresponds to the typical data center with an entrance room,main distribution area,one or more horizontal distribution areas,and no zone distribution areas.Max-imum circuit lengths for the typical data center configuration are in the following table5.These maximum circuit lengths include backbone cabling,horizontal cabling,and all patch cords or jumpers between the access provider demarcation point and the end equipment. --```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

ANSI/TIA-942-1

Table 5:Maximum circuit distances for the typical data center configuration

Circuit type

Category 3Category 5e,6,&6A 734Type Coaxial

735Type Coaxial

T-1135m (442ft)184m (603ft)--CEPT-1(E-1)92m (303ft)134m (439ft)

305m (1001ft)137m (448ft)T-3--141m (462ft)72m (236ft)CEPT-3(E-3)

--153m (503ft)

78m (257ft)

With maximum horizontal cable lengths,maximum patch cord lengths,no customer DSX,and no zone outlets,the maximum backbone cable lengths for a ‘typical’data center where T-1,E-1,T-3,or E-3circuits can be provisioned to equipment anywhere in the data center are shown in the following table 6.This ‘typical’configuration assumes that the entrance room,main distribu-tion area,and horizontal distribution areas are separate rather than combined.The maximum backbone cabling distance is the sum of the length of cabling from the entrance room to the main distribution area and from the main distribution area to the horizontal distribution area.

Table 6:Maximum backbone for the typical data center configuration Circuit type

Category 3

Category 5e,6,&6A 734Type Coaxial

735Type Coaxial

T-10m (0ft)46m (150ft)--CEPT-1(E-1)0m (0ft)0m (0ft)

190m (624ft)29m (95ft)T-3--26m (85ft)0m (0ft)CEPT-3(E-3)

--38m (126ft)

0m (0ft)

These calculations assume the following maximum patch cord lengths in the ‘typical’data cen-ter:-10m (32.8ft)for UTP and fiber in the entrance room,main distribution area,and horizontal distribution area;

-5m (16.4ft)for 734-type coaxial cable in the entrance room,main distribution area,and ho-rizontal distribution area;

- 2.5m (8.2ft)for 735-type coaxial cable in the entrance room,main distribution area,and horizontal distribution area.

Due to the very short distances permitted by category 3UTP cabling and 735type coaxial cable for T-1,T-3,E-1,and E-3circuits,category 3UTP and 735-type coaxial cables are not recom-mended for supporting these types of circuits.

Backbone cabling distances can be increased by limiting the locations where T-1,E-1,T-3,and E-3circuits will be located (for example only in the main distribution area or locations served by horizontal cabling terminated in the main distribution area).

`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

ANSI/TIA-942-1

Other options for supporting circuits further from the entrance room include:

?provisioning circuits from multiplexers or other circuit provisioning equipment located in the main distribution area or horizontal distribution area;

?provisioning circuits using horizontal cabling from the MDA,reducing the number of connections from six to two,and reducing the number of patch cords.

A.2.Baluns for E-3and T-3circuits

Baluns permit E-3and T-3circuits to use twisted-pair cabling instead of75-ohm coaxial cabling. Distances for E-3and T-3circuits over twisted pair cabling depends on a number of factors,in-cluding the electrical characteristics of the baluns,which are beyond the scope of this standard. However,distances for E-3and T-3circuits over twisted-pair cabling using baluns will be consi-derably shorter than the distances for these circuits over734type coaxial cabling.

Taking into account only the attenuation of the cabling and two twisted pair connections,the maximum distances for E-3and T-3circuits with baluns over twisted-pair cabling is: Table7:Maximum circuit lengths over baluns NOT including insertion loss of baluns

Circuit type

Category5e

Cable&Panels

Category6

Cable&Panels

Category6A

Cable&Panels

T-360.0m(196.8ft)67,8m(222.5ft)69.3m(227.4ft)

CEPT-3

(E-3)

66.2m(217.2ft)74.5m(244.2ft)75.9m(249.1ft)

These calculations assume that the baluns are attached directly to the access provider DSX panel,that there is no customer DSX panel,and that there are two twisted-pair connections. The distances above need to be reduced by the following distances for each decibel of insertion loss for the pair of baluns:

Table8:Reduction in maximum circuit length for each1dB insertion loss for a pair of

baluns

Circuit type

Category5e

Cable&Panels

Category6

Cable&Panels

Category6A

Cable&Panels

T-310.2m(33.4ft)11.1m(36.6ft)11.4m(37.4ft)

CEPT-3

(E-3)

11.7m(38.3ft)12.8m(41.9ft)13.0m(42.7ft)

If the circuit is to pass through more than two connections,the circuit lengths will need to be re-duced as described in table9.

Table9:Reduction in maximum circuit length for each additional twisted pair connection

(after the1st two)

Circuit type

Category5e

Cable&Panel

Category6

Cable&Panel

Category6A

Cable&Panel

T-3 1.9m(6.3ft) 1.1m(3.5ft) 1.1m(3.5ft) CEPT-3

(E-3)

1.9m(6.4ft) 1.1m(3.5ft) 1.1m(3.5ft)

---` , , ` , ` , , ` , , ` -` -` ` , ` , , , ` ` ` , ` , , , ` , ` ` ` ` , ` , , , , ` ` ` --

--```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

--```,,,,`,````,`,,,`,```,,,`,``-`-`,,`,,`,`,,`---

!函数返回值

函数返回值 int Count() { int i,j; i=100; j=200; return i+j; } 测试函数: void Test() { int k=Count(); printf("\n k[%d]\n"); } C/C++的函数返回值一般是放在寄存器eax里的,而不是在栈里。 你的这一句int k = Count()的汇编语句就是这样: mov [esp - 4], eax //eax里是300,esp - 4是局部变量k的位置 你可以在vc里做个实验: int add(int a, int b) { __asm { mov eax,a // 把参数1存入eax add eax,b // eax += 参数2, 结果在eax里 } } int main() { printf("%d\n", add(3, 4)); return 0; } 楼主需要了解下寄存器这一概念,我就不把C/C++函数的汇编代码给发出来了。 还有在汇编层面来看,函数的返回值根本就没有定论,函数可以通过多种方式返回。保存返回值在eax里只是C/C++的一个约定而已。

返回值可以放在栈里,但你在C的语言层面上可能做不到,其实随着函数的结束,mov esp, ebp这条指令过后,函数内部的局部变量就报废了。如果你之后没改变过栈的内容,你可以用栈来存返回值,但比起用寄存器来存储,存储和读取要慢的多。 自己突发奇想在vc下试了下用栈“返回”值,写了段代码: #include void __declspec(naked) __stdcall return_a_value() { int local; local = 1990; // 栈空间 __asm ret } int main() { int local = 1; return_a_value(); // 用栈返回值 printf("%d\n", local); return 0; } 汇编看c之一,简单函数调用 简单的函数调用,通过简单的函数调用反汇编可以清楚了解如下 1.栈到底是什么,如何操纵栈的? 2.参数和临时变量是以什么形式在哪存放? 3.如何传递返回值? 举例: #include

如何查找maven库的jar包

将开源项目的jar包导入maven形成独立项目 注:MAVEN仓库找jar包: 1,https://www.doczj.com/doc/ab3704348.html, 2,https://www.doczj.com/doc/ab3704348.html, 1,将“F:\share\开发框架\JFinal:WEB_ORM开发框架\JFinal官网\jfinal-1.8-bin-with-src.jar”这个jar包,解压到一个按maven项目建立的文件夹(D:\EclipseWorkspace\jfinal_bin_src\src\main\java)(如下图),删除文件夹下所有.class文件 2,在eclipse(luna)中导入上一步解压后的文件夹“D:\EclipseWorkspace\jfinal_bin_src”

3,如上图所示,多个java文件出现,import导入错误;如下图所示,输入import报错对应信息对应的jar包相关包内容,找到类似的包,如下图加红色圈标识,按“pom”链接

4,上一步“pom”链接打开,看下两图所示,复制前面maven的依赖相关代码,并拷贝到文本文档

5,在eclipse中打开(或新建)jfinal_bin_src/pom.xml,选择文件编辑区下方的“Dependencies”标签,再按“Add”按钮,如下图所示,从上一步的文本文件中复制Group Id等信息,并按

(注意,如果是有parent和model并存的,一般选择parent部分的Group Id和Version,“ok”。 选择model部分的Artifact Id) 6,如果上步输入的包依赖信息有错,则出现下图提示没有找到包

接地的种类

接地的种类除防雷接地外,还有交流工作接地、保护接地、直流接地、过电压保护接地、防静电接地、屏蔽接地等等。电子设备的接地方式有独立地和联合接地。独立地的接地电阻值除另有规定外,一般不大于4欧,并采用一点接地方式。电子设备接地宜与防雷接地系统共设,但其接地电阻不宜大于1欧。若与防雷地分设,两接地系统的距离不宜小于20米。 电力系统接地种类区分 周建民 在电网系统中,供电企业在不同场合采取了工作接地、保护接地、重复接地、防雷接地四种接地措施。那么,它们之间有什么区别呢? 工作接地。在正常或事故情况下,为了保证电气设备可靠运行,而必须在电力系统中某一点进行接地,称为工作接地。此种接地可采取直接接地或经特殊装置接地。如变压器中性点的直接接地或经消弧线圈接地。 保护接地。为防止因绝缘损坏而遭受触电的危险,将与电气设备带电部分相绝缘的金属外壳或构架,同接地体之间做良好的连接,称为保护接地。如变压器底座和外壳接地、配电盘的框架接地、互感器的二次绕组接地,将与带电部分相绝缘的电气设备的金属外壳或构架,与中性点直接接地系统中的保护中性线相连接等。 重复接地。将中性线上的一点或多点与大地再次做金属连接,称为重复接地。如在三相四线制的中性线首端、分支点及沿线每1千米处和接户线处做的接地、与高压线路同杆架设的低压线路的中性线在共敷段首末段接地等。 防雷接地。为了防止人、畜、建筑物、架空线路等遭受雷击而做的接地,称为防雷接地。如与建筑物顶部避雷针及高压架空线路避雷线相连而做的接地等。 地与电(信号),这是一对形影不离的双胞胎。接地,通常是指用导体与大地相连。可在电子技术中的地,可能就与大地毫不相关,它只是电路中的一等电位面。如收音机、电视机中的地,它只是接收机线路里的一电位基准点。接地,在电力和电子技术中,既简单,又复杂,而且还必不可少。按接地的作用,可分为工作接地、保护接地、过压保护接地、防静电接地、屏蔽接地、信号地等多种。在广电技术中,以上几种接地类型都会遇到。现就结合实际对某些接地技术问题作一阐述。 一.保护接地保护接地是为防止绝缘损坏造成设备带电危及人身安全而设置的保护装置,它有接地与接零两种方式。按电力规定,凡采用三相四线供电的系统,由于中性线接地,所以应采用接零方式,而把设备的金属外壳通过导体接至零线上,而不允许将设备外壳直接接地。这在广电系统的配电房中的开关设备,中央空调机、发射机等电源开关设备和大耗电设备中尤为常见。在规划设计时,应从地网中引出接地母线至各设备上,再将机器外壳用导体连至接地母线上。值得指出的是:接地线应接在设备的接地专用端子上,

C#多线程函数如何传参数和返回值

C#多线程函数如何传参数和返回值 提起多线程,不得不提起委托(delegates)这个概念. 我理解的委托就是具有同样参数和返回值的函数的集合. 比如 public delegate void MyDelegate(int arg); 就是这种形式的函数 void Myfuntion(int i); 的集合. 如何将一个函数加入委托的集合? MyDelegate dele = new MyDelegate(Myfuntion1); 再增加一个 dele += new MyDelegate(Myfuntion2); ... 委托函数 dele 就是具有整数参数和空返回值的函数 Myfuntion1,2的集合. 调用这个委托函数 dele(1); 就是逐个调用 Myfuntion1,2,... 一般线程函数的声明和启动 Thread t = new Thread(new ThreadStart(MyFunction)); t.Start(); 正是调用了没有参数和返回值的委托函数 ThreadStart 其中的参数MyFunction 是这个委托函数中的一员. 很明显这样无法传参数和返回值,那我们该怎么办? 答案就在委托的BeginInvoke() 方法上, BeginInvoke() 也是(异步)启动一个新线程. 例如 MyDelegate dele = new MyDelegate (MyFunction); dele.BeginInvoke(10,"abcd"); void MyFunction(int count, string str); 可以实现参数的传递. 如何收集线程函数的返回值? 与BeginInvoke 对应有个 EndInvoke 方法,而且运行完毕返回 IAsyncResult 类型的返回值.这样我们可以这样收集线程函数的返回值 MyDelegate dele = new MyDelegate (MyFunction); IAsyncResult ref = dele.BeginInvoke(10,"abcd"); ...

Nexus仓库管理

Nexus仓库管理

管理仓库 为了管理Nexus仓库,以administrative用户登陆进Neuxs,然后点击Nexus 菜单左手边的Views/Repositories菜单中的Repositories。 Nexus提供了三种不同种类的仓库: ●Proxy Repositories ●Hostedrepositories ●Virtual repositories 1.代理仓库(Proxy Repository) 代理仓库是一个远程仓库的代理。默认的,Nexus附带下面已经配置的代理仓库: Apache Snapshots 这个仓库包含来ApacheSoftware Foundation发布的快照。 Codehaus Snapshots 这个仓库包含来Codehaus发布的快照。 Central 这是中央仓库包含发布组件。前身为Maven Central,它是Apache Maven默认的内置仓库,并且直接支持其它的构造工具,如Gradle, SBT或Ant/Ivy。Nexus通过HTTPS使用https://https://www.doczj.com/doc/ab3704348.html,/maven2/链接连接中央仓库。 2.宿主仓库(Hosted Repository) 主要用于部署无法从公共仓库获取的构件(如 oracle 的 JDBC 驱动)以及自己或第三方的项目构件。Nexus附带下面已经配置的宿主仓库: 3rd Party 这里存放的是某些在公共的Maven仓库中不存在的库,但依赖于第三方的仓库。这些依赖库可以是商业的,私有的库,例如Oracle JDBC驱动。 Releases

是你的组织将要发布的内部版本。这里存放我们自己项目中发布的构建, 通常是Release版本的, 比如我们自己做了一个FTP Server的项目, 生成的构件为ftpserver.war, 我们就可以把这个构建发布到Nexus的Releases本地仓库. 关于符合发布后面会有介绍. Snapshots 是你的组织将要发布的内部块状。这个仓库非常的有用, 它的目的是让我们可以发布那些非release版本, 非稳定版本, 比如我们在trunk下开发一个项目,在正式release之前你可能需要临时发布一个版本给你的同伴使用, 因为你的同伴正在依赖你的模块开发, 那么这个时候我们就可以发布Snapshot版本到 这个仓库, 你的同伴就可以通过简单的命令来获取和使用这个临时版本. 2.虚拟仓库(Virtual Repository) Virutual repository作为不同类型仓库的适配器。当前,Nexus支持转换Maven 1仓库和Maven 2仓库。另外,你可以公开任何仓库格式为NuGet或OBR 仓库。例如,Maven 2仓库可以包含OSGi Bundles。a Maven 2 repository can contain OSGi Bundles, which can be exposed as a OSGi Bundle repository with the virtual repository Provider set to OBR. By default it ships with a Central M1 shadow repository that exposes the Central repository in Maven 1 format. 配置仓库 Repository窗口允许你建立,更新和删除不同的仓库使用Add,Delete和Trash按钮。Refresh按钮更新显示仓库和仓库组列表。正当在Nexus用户界面之行任何的delete操作,Trash按钮允许清空那些已删除组件的备份垃圾文件夹。 默认的,Repository窗口显示仓库配置和管理。在Trash按钮的右边允许切换仓库列表和浏览被Nexus管理的仓库

几种常见接地形式的简介与区别(带图)范文

建筑工程供电使用的基本供电系统有三相三线制三相四线制等,但这些名词术语内涵不是十分严格。 国际电工委员会(IEC)对此作了统一规定,称为TT系统、TN系统、IT系统。其中TN系统又分为TN-C、TN-S、TN-C-S系统。下面内容就是对各种供电系统做一个扼要的介绍。 (一)工程供电的基本方式 根据IEC规定的各种保护方式、术语概念,低压配电系统按接地方式的不同分为三类,即TT、TN和IT系统,分述如下。 (1)TT方式供电系统:TT方式是指将电气设备的金属外壳直接接地的保护系统,称为保护接地系统,也称TT系统。第一个符号T表示电力系统中性点直接接地;第二个符号T表示负载设备外露不与带电体相接的金属导电部分与大地直接联接,而与系统如何接地无关。在TT系统中负载的所有接地均称为保护接地,如图1-1所示。这种供电系统的特点如下。 1)当电气设备的金属外壳带电(相线碰壳或设备绝缘损坏而漏电)时,由于有接地保护,可以大大减少触电的危险性。但是,低压断路器(自动开关)不一定能跳闸,造成漏电设备的外壳对地电压高于安全电压,属于危险电压。 2)当漏电电流比较小时,即使有熔断器也不一定能熔断,所以还需要漏电保护器作保护,困此TT系统难以推广。 3)TT系统接地装置耗用钢材多,而且难以回收、费工时、费料。 现在有的建筑单位是采用TT系统,施工单位借用其电源作临时用电时,应用一条专用保护线,以减少需接地装置钢材用量。 把新增加的专用保护线PE线和工作零线N开,其特点是: ①共用接地线与工作零线没有电的联系; ②正常运行时,工作零线可以有电流,而专用保护线没有电流; ③TT系统适用于接地保护占很分散的地方。 (2)TN方式供电系统这种供电系统是将电气设备的金属外壳与工作零线相接的保护系统,称作接零保护系统,用TN表示。它的特点如下。 1)一旦设备出现外壳带电,接零保护系统能将漏电电流上升为短路电流,

函数的参数

如果把函数比喻成一台机器,那么参数就是原材料,返回值就是最终产品;函数的作用就是根据不同的参数产生不同的返回值。 函数的参数 在函数定义中出现的参数可以看做是一个占位符,它没有数据,只能等到函数被调用时接收传递进来的数据,所以称为形式参数,简称形参。 函数被调用时给出的参数包含了实实在在的数据,会被函数内部的代码使用,所以称为实际参数,简称实参。 形参和实参的功能是作数据传送,发生函数调用时,实参的值会传送给形参。 形参和实参有以下几个特点: 1) 形参变量只有在函数被调用时才会分配内存,调用结束后,立刻释放内存,所以形参变量只有在函数内部有效,不能在函数外部使用。 2) 实参可以是常量、变量、表达式、函数等,无论实参是何种类型的数据,在进行函数调用时,它们都必须有确定的值,以便把这些值传送给形参,所以应该提前用赋值、输入等办法使实参获得确定值。 3) 实参和形参在数量上、类型上、顺序上必须严格一致,否则会发生“类型不匹配”的错误。

函数调用中发生的数据传送是单向的,只能把实参的值传送给形参,而不能把形参的值反向地传送给实参。因此在函数调用过程中,形参的值发生改变,而实参中的值不会变化。 【示例】计算1+2+3+...+(n-1)+n 的值。 1.#include 2.int sum(int n){ // 有参函数 3.int i; 4.for(i=n-1; i>=1; i--){ 5. n+=i; 6.} 7.printf("The inner n = %d\n",n); 8.return n; 9.} 10.int main(){ // 无参函数 11.int m, total; 12.printf("Input a number: "); 13.scanf("%d",&m); 14. total =sum(m); 15.printf("The outer m = %d \n", m); 16.printf("1+2+3+...+%d+%d = %d\n", m-1, m, total); 17.return0; 18.} 运行结果: Input a number: 100↙ The inner n = 5050 The outer m = 100

Maven配置

maven安装+maven本地仓库配置+maven镜像 1.安装maven前我们电脑上要确保安装了JDK1.6以上的版本 2.下载Maven Maven官网下载地址是https://www.doczj.com/doc/ab3704348.html,/download.html 下载apache-maven-3.2.5后,解压到你想要解压的地方 我本地解压到D:\Program Series\Tools\Apache-maven这个路径下 3.然后在配置maven的环境变量: MAVEN_HOME D:\Program Series\Tools\Apache-maven\3.2.5 PATH %MAVEN_HOME%bin

配置好以后环境变量以后,打开cmd窗口,输入mvn -v,如果出现以下内容就表示安装成功。 4.然后我们给maven添加本地的仓库地址 解压后的maven目录下找到conf目录,其中就会有一个setting.xml文件 我本地的地址是D:\Program Series\Tools\Apache-maven\3.2.5\conf 然后通过编辑器找到第53行,把注释去掉,修改成自己想要设置的本地仓库地址就可以了。我本地设置在maven的安装目录同级目录下 mvn文件夹的名字可以随便取,但是一定要确保设置的仓库地址是有效的地址,因为maven 是不会自动创建这个mvn文件夹的。 5.实验一下刚才做的事情产生作用没有,控制台输入: mvnhelp:system 如果没有任何问题,执行完该命令之后,在D:\maven\repository下面就会多出很多文件,这些文件就是maven从中央仓库下载到本地仓库的文件,maven已经开始为我们工作了。Maven的安装配置和本地仓库地址的配置就已经结束了。 国内较快的maven镜像 国内连接maven官方的仓库更新依赖库,网速一般很慢,收集一些国内快速的maven仓库镜像以备用。 ====================国内OSChina提供的镜像,非常不错=================== CN OSChina Central https://www.doczj.com/doc/ab3704348.html,/content/groups/public/ central ======================================================== OSChina Maven 库使用帮助 ==================其他maven仓库镜像========================== repo2

函数参数返回值总结

函数的参数、返回值总结 (一)参数 ◆函数分: 有参函数:函数名(实参列表) 无参函数:函数名() ◆有参函数调用语句中的实参应与被调函数中的形参在个数、类型、顺序上一致。 ◆参数传递时,实参向形参一一对应进行单向的值传递。值:可是数值(变量或数 组元素)或数值的地址值(指针或数组名)。 (二)返回值 函数的返回值即为函数调用后的结果,可有如下返回结果的方法: (1)通过return语句返回一个值; (2)利用地址做参数返回一个或多个值; (3)利用全局变量返回一个或多个值。 (三)例 1、170页实验内容(1):打印由正三角和倒三角组成的图形。 有一个参数,无返回值。实参向形参传递一个数值。 #include /* 有一个参数,无返回值的函数,打印正三角 */ void f1(int n) /* 形参只能是变量,用来接收实参传来的数值 */ { int i,j,k; for(k=1;k<=n;k++) {for(i=1;i<=10-k;i++) printf(" "); for(j=1;j<=k;j++) printf(" *"); printf("\n");} } /* 有一个参数,无返回值的函数,打印倒三角*/ void f2(int n) {int i,j,k; for(k=n;k>=1;k--) {for(i=1;i<=10-k;i++) printf(" "); for(j=1;j<=k;j++) printf(" *"); /*双引号内应为“空格加半角星号”*/ printf("\n");} } main() { int n; scanf("%d",&n);

接地作用和接地原理方法

l)接地的作用 接地的作用总的步说只有两种:保护人和设备不受损害;抑制干扰;抑制干扰接地在有的书中又叫工作接地,而前者又叫保护接地。 ①保护接地 保护接地是将DCS中平时不带电的金属部分(机柜外壳,操作台外壳等)与地之间形成良好的导电连接,以保护设备和人身安全。原因是DCS的供电是强电供电(220V或11OV),通常情况下机壳等是不带电的,当故障发生(如主机电源故障或其它故障)造成电源的供电火线与外壳等导电金属部件短路时,这些金属部件或外壳就形成了带电体,如果没有很好的接地,那么这带电体和地之间就有很高的电位差,如果人不小心触到这些带电体,那么就会通过人身形成通路,产生危险。因此,必须将金属外壳和地之间作很好的连接,使机壳和地等电位。此外,保护接地还可以防止静电的积聚。 ②工作接地 工作接地是为了使DCS以及与之相连的仪表均能可靠运行并保证测量和控制精度而设的接地。它分为机器逻辑地、信号回路接地、屏蔽接地,在石化和其它防爆系统中还有本安接地。 ·机器逻辑地,也叫主机电源地,是计算机部的逻辑电平负端公共地,也是+5V等电源的输出地。 ·信号回路接地,如各变送器的负端接地,开关量信号的负端接地等。 ·屏蔽接地(模人信号的屏蔽层的接地)。 ·本安接地,是本安仪表或安全栅的接地。这种接地除了抑制干扰外,还有使仪表和系统具有本质安全性质的措施之一。本安接地会因为采用的设备的本实措施不同而不同,下面以齐纳式安全栅为例,说明其接地容,如图3.413所示:该图是一个齐纳式安全栅的接地原理 图。

安全栅的作用是保护危险现场端永远处于安全电源和安全电压围之。如果现场端短路,则由于负载电阻和安全栅电阻R的限流作用,会将导线上的电流限制在安全围,使现场端不至于产生很高的温度,引起燃烧。第二种情况,如果计算机一端产生故障,则高压电信号加入了信号回路,则由于齐纳二级的嵌位作用,也使电压位于安全围。 值得提醒的是,由于齐纳安全栅的引入,使得信号回路上的电阻增大了许多,因此,在设计输出回路的负载能力时,除了要考虑真正的负载要求以外,还要充分考虑安全栅的电阻,留有余地。 除了上述几种接地外,在很多场合下容易引起混乱的还有一个供电系统地,也叫交流电源工作地,它是电力系统中为了运行需要设的接地(如中性点接地)。 (l)接地要求和方法: 上面介绍了六种接地:供电系统地、保护地、逻辑地、屏蔽地安全栅地、信号回路地。对这六种接地,各家有各家的要求,虽然大都强调一点接地,接地电阻必须小于1欧姆等,但具体容上差别很大,下面给出几个例子介绍常遇到的接地要求和方法。 ①供电系统地:在很多企业,特别是电厂、冶炼厂等,其厂区有一个很大的地线网,而通常供电系统的地是与地线网连在一起的。有的厂家强调计算机系统的所有接地必须和供电系统地以及其它(如避雷地)严格分开,而且之间至少应保持15m以上的距离。为了彻底防止供电系统地的影响,建议供电线线路用隔离变压器隔开。这对那些电力负荷很重,而且负荷经常启停的单位是应注意的。从抑制干扰的角度来看,将电力系统地和计算机系统的所有地分开是很有好处的,因为一般电力系统的地线是不太干净的。但从工程角度来看,在有些场合下单设计算机系统地并保证其与供电系统地隔开一定距离是很困难的,这时可以考虑能否将计算机系统的地和供电地共用一个,这要考虑几个因素: ·供电系统地上是否干扰很大,如大电流设备启停是否频繁,对地产生的干扰是否大;·供电系统地的接地电阻是否足够小,而且整个地网各个部分的电位差是否很小,即地网的各部分之间是否阻值很小(<1W) ·DCS的抗干扰能力以及所用到的传输信号的抗干扰能力,例如有无小信号(电偶,热电阻)的直接传输等。 ②所有计算机接线涉及到的接地采用一点接地方式,在这一点上,也有很多争议。有的厂 家系统提出几个地:逻辑地、屏蔽地(又叫模拟地)、信号地、保护地分别自己接地在地上打接地装置,而大部分系统则指出各种地在机柜部自己分别接地,汇于一点,然后用较粗的导体(铜)将各汇地点朕起来,接到一个公共的接地体上。这里有几点需要注意:DCS本身是由多台设备组成的,除了控制站以外,还包括很多外设,而且数据也不止一台,这就涉及到了多台设备,多种接地的问题。此外,一般的DCS的供电是各站(控制站,操作站等)用专门一条线单独供电,即彼此之间不相互供电。图3.4.14是一种常用的多站接地图。

Maven源配置教程

Maven安装及基本使用 1、安装maven首先到maven官网下载maven安装包, Maven下载地址, 下载apache-maven-3.3.9-bin.zip文件 > 由于当前系统为windows, 所以下载apache-maven-3.3.9-bin.zip文件; 如果您使用的系统为unix类系统请下载apache-maven-3.3.9-bin.tar.gz文件 > > 注: 由于maven是依赖于jdk的, 所以在安装maven前需要提前准备好jdk环境。jdk的安装方式不是本文的重点, 所以本文不进行展开说明了。 右键解压apache-maven-3.3.9-bin.zip文件到当前目录中即可 >如果您使用的为unix环境, 以CentOS为例, 使用以下命令进行解压 tar -zxvf apache-maven-3.3.9-bin.tar.gz 到此maven已经安装完成。 为了之后使用方便,所以需要将maven添加到环境变量中, 配置方式: 右键 "我的电脑" -> 选择 "属性" -> 选择 "高级系统设置" -> 选择 "高级" 标签页 -> 选择 "环境变量" 在新打开的窗口中的"系统变量"中新建变量名为"MAVEN_HOME", 变量值为 maven解压后的路径, 例如: E:-maven-3.3.9 然后编辑环境变量PATH, 在PATH的环境变量值的尾部添加";%MAVEN_HOME%", 一路确认后即添加成功。注: windows中多个环境变量的值需要用";"分隔 unix系统中环境变量的配置方式, 以CentOS为例: 使用以下方式为当前用户添加maven的环境变量打开~/.bashrc文件并在文件末尾添加以下内容 vim ~/.bashrc MAVEN_HOME=/opt/apache-maven-3.3.9 PATH=$PATH:$MAVEN_HOME/bin export MAVEN_HOME PATH 保存并退出, 并使用下面的命令使新添加的环境变量立即生效

(仓库管理)设置Maven组件库仓库

(仓库管理)设置Maven组件库仓库

设置Maven仓库 1. 介绍 Maven是Java开发者中流行的构建工具,Maven的好处之一是可以帮助减少构建应用程序时所依赖的软件构件的副本,Maven建议的方法是将所有软件构件存储于一个叫做repository的远程仓库中。 Maven会从https://www.doczj.com/doc/ab3704348.html,中的公用仓库中同步构件,这个公用仓库下载缓慢、不稳定,并且不包含一些构件的最新版本,而且不能上传团队私有的构件。通过设置内部Maven仓库,团队可以更有好地利用Maven仓库的优势并且克服使用ibiblio上的仓库时的缺点。 本文着眼于Maven仓库工具应提供的一些功能,列出了选择Maven仓库工具的标准,说明了使用Artifactory设置Maven仓库的相关步骤。在Linux和Windows 中设置Maven仓库的过程是相同的,少数不同点在文中已经用高亮显示,本文列出了与这个Maven仓库的使用有关的POM文件的范例,用截图来向用户阐述如何设置Maven仓库,Maven和artifactory配置范例也有列出。 1.1 背景知识 本文假定读者熟悉以下的概念和技术: ●Maven 2 ●J2EE web 服务器部署过程(e.g. 在Tomcat中部署Web应用程序) ●XML 1.2 Maven仓库的目的 Maven仓库的目的是作为团队内所使用的所有软件构件的内部私有构件仓库,将Maven构件(jar和pom)存储到一个专门的Maven仓库比将它们存储到版本控制系统中更有优势,这是因为: ●构件(jar)是二进制文件,不属于版本控制系统,版本控制系统在处理文本文件方面比较好 ●保持较小的版本控制数据库 ●Checkout、update和其他版本控制的操作可以更快 1.3 建立内部私有仓库的优势: ●减少可能的版本冲突 ●减少首次构建时需要的手动干涉

接地的几种方法

接地的几种方法 接地从字面来看上十分简单事情,但是对于经历过电磁干扰挫折的人来说 可能是一个最难掌握的技术。实际上在电磁兼容设计中,接地是最难的技术。面对一个系统,没有一个人能够提出一个绝对正确的接地方案,多少会遗留一些问题。造成这种情况的原因是接地没有一个很系统的理论或模型,人们在考虑接地时只能依靠他过去的经验或从书上看到的经验。但接地是一个十分复杂的问题,在其它场合很好的方案在这里不一定最好。关于接地设计在很大程度上依赖设计师的直觉,也就是他对“接地”这个概念的理解程度和经验。因此,我们将不断地为大家有关接地方面的文章,使大家循序渐进地形成对接地的直觉。 1、接地的方法 接地的方法很多,具体使用那一种方法取决于系统的结构和功能。“接地”的概念首次应用在电话的设计开发中。从1881 年初开始采用单根电缆为信号通道,大地为公共回路。这就是第一个接地问题。但是用大地作为信号回路会导致地回路中的过量噪声和大气干扰。为了解决这个问题,增加了信号回路线。现在存在的许多接地方法都是来源于过去成功的经验,这些方法包括: 1) 单点接地:如图1 所示,单点接地是为许多在一起的电路提供公共电位 参考点的方法,这样信号就可以在不同的电路之间传输。若没有公共参考点,就会出现错误信号传输。单点接地要求每个电路只接地一次,并且接在同一点。该点常常一地球为参考。由于只存在一个参考点,因此可以相信没有地回路存在,因而也就没有干扰问题。 图1 单点和星形接地 2) 多点接地:如图2 所示,从图中可以看出,设备内电路都以机壳为参考 点,而各个设备的机壳又都以地为参考点。这种接地结构能够提供较低的接地阻抗,这是因为多点接地时,每条地线可以很短;并且多根导线并联能够降低接地导体的总电感。在高频电路中必须使用多点接地,并且要求每根接地线的长度小于信号波长的1/20。 图2 多点接地

eclipse maven 项目没有maven依赖仓库问题解决

eclipse maven 项目没有maven依赖仓库问题解决 之前是没有Maven Dependencies 这个文件夹仓库 解决办法: 添加箭头所指的配置到项目的classpath文件中

关于电路中各种接地的方法:数字地、模拟地、信号地等等

关于接地:数字地、模拟地、信号地、交流地、直流地、屏蔽地、浮地 除了正确进行接地设计、安装,还要正确进行各种不同信号的接地处理。控制系统中,大致有以下几种地线: (1)数字地:也叫逻辑地,是各种开关量(数字量)信号的零电位。 (2)模拟地:是各种模拟量信号的零电位。 (3)信号地:通常为传感器的地。 (4)交流地:交流供电电源的地线,这种地通常是产生噪声的地。 (5)直流地:直流供电电源的地。 (6)屏蔽地:也叫机壳地,为防止静电感应和磁场感应而设。以上这些地线处理是系统设计、安装、调试中的一个重要问题。下面就接地问题提出一些看法: (1)控制系统宜采用一点接地。一般情况下,高频电路应就近多点接地,低频电路应一点接地。在低频电路中,布线和元件间的电感并不是什么大问题,然而接地形成的环路的干扰影响很大,因此,常以一点作为接地点;但一点接地不适用于高频,因为高频时,地线上具有电感因而增加了地线阻抗,同时各地线之间又产生电感耦合。一般来说,频率在1MHz以下,可用一点接地;高于10MHz时,采用多点接地;在1~10MHz之间可用一点接地,也可用多点接地。

(2)交流地与信号地不能共用。由于在一段电源地线的两点间会有数mV甚至几V电压,对低电平信号电路来说,这是一个非常重要的干扰,因此必须加以隔离和防止。 (3)浮地与接地的比较。全机浮空即系统各个部分与大地浮置起来,这种方法简单,但整个系统与大地绝缘电阻不能小于50MΩ。这种方法具有一定的抗干扰能力,但一旦绝缘下降就会带来干扰。还有一种方法,就是将机壳接地,其余部分浮空。这种方法抗干扰能力强,安全可靠,但实现起来比较复杂。 (4)模拟地。模拟地的接法十分重要。为了提高抗共模干扰能力,对于模拟信号可采用屏蔽浮技术。对于具体模拟量信号的接地处理要严格按照操作手册上的要求设计。 (5)屏蔽地。在控制系统中为了减少信号中电容耦合噪声、准确检测和控制,对信号采用屏蔽措施是十分必要的。根据屏蔽目的不同,屏蔽地的接法也不一样。电场屏蔽解决分布电容问题,一般接大地;电磁场屏蔽主要避免雷达、电台等高频电磁场辐射干扰。利用低阻金属材料高导流而制成,可接大地。磁场屏蔽用以防磁铁、电机、变压器、线圈等磁感应,其屏蔽方法是用高导磁材料使磁路闭合,一般接大地为好。当信号电路是一点接地时,低频电缆的屏蔽层也应一点接地。如果电缆的屏蔽层地点有一个以上时,将产生噪声电流,形成噪声干扰源。当一个电路有一个不接地的信号源与系统中接地的放大器相连时,输入端的屏蔽应接至放大器的公共端;相反,当接地的信号源与系统中不接地的

C语言函数说明与返回值

C语言函数说明与返回值 在学习C语言函数以前,我们需要了解什么是模块化程序设计方法。 人们在求解一个复杂问题时,通常采用的是逐步分解、分而治之的方法,也就是把一个大问题分解成若干个比较容易求解的小问题,然后分别求解。程序员在设计一个复杂的应用程序时,往往也是把整个程序划分为若干功能较为单一的程序模块,然后分别予以实现,最后再把所有的程序模块像搭积木一样装配起来,这种在程序设计中分而治之的策略,被称为模块化程序设计方法。 在C语言中,函数是程序的基本组成单位,因此可以很方便地用函数作为程序模块来实现C语言程序。 利用函数,不仅可以实现程序的模块化,程序设计得简单和直观,提高了程序的易读性和可维护性,而且还可以把程序中普通用到的一些计算或操作编成通用的函数,以供随时调用,这样可以大大地减轻程序员的代码工作量。 函数是C语言的基本构件,是所有程序活动的舞台。函数的一般形式是: type-specifier function_name(parameter list) parameter declarations { body of the function } 类型说明符定义了函数中return语句返回值的类型,该返回值可以是任何有效类型。如果没有类型说明符出现,函数返回一个整型值。参数表是一个用逗号分隔的变量表,当函数被调用时这些变量接收调用参数的值。一个函数可以没有参数,这时函数表是空的。但即使没有参数,括号仍然是必须要有的。参数说明段定义了其中参数的类型。

当一个函数没有明确说明类型时, C语言的编译程序自动将整型( i n t)作为这个函数的缺省类型,缺省类型适用于很大一部分函数。当有必要返回其它类型数据时,需要分两步处理: 首先,必须给函数以明确的类型说明符;其次,函数类型的说明必须处于对它的首次调用之前。只有这样,C编译程序才能为返回非整型的值的函数生成正确代码。 4.1.1 函数的类型说明 可将函数说明为返回任何一种合法的C语言数据类型。 类型说明符告诉编译程序它返回什么类型的数据。这个信息对于程序能否正确运行关系极大,因为不同的数据有不同的长度和内部表示。 返回非整型数据的函数被使用之前,必须把它的类型向程序的其余部分说明。若不这样做,C语言的编译程序就认为函数是返回整型数据的函数,调用点又在函数类型说明之前,编译程序就会对调用生成错误代码。为了防止上述问题的出现,必须使用一个特别的说明语句,通知编译程序这个函数返回什么值。下例示出了这种方法。 第一个函数的类型说明sum()函数返回浮点类型的数据。这个说明使编译程序能够对sum( ) 的调用产生正确代码。 函数类型说明语句的一般形式是: type_specifier function_name (; ) 即使函数使用形参,也不要将其写入说明句。若未使用类型说明语句,函数返回的数据类型可能与调用者所要求的不一致,其结果是难以预料的。如果两者同处于一个文件中,编译程序可以发现该错误并停止编译。如果不在同一个文件中,编译程序无法发现这种错误。类型检查仅在编译中进行,链接和运行时均不检查。因此,必须十分细心以确保绝不发生上

POLL返回值详解

POLL返回值详解 和select() 函数一样,poll() 函数也可以用于执行多路复用I/O 。但poll() 与slect()相比,用起来更加直观容易。使用该函数,需要包含#include 文件,实际上最终包含的是文件,poll.h 里的内容也就是#include 。 函数的原型: 引用 #include extern int poll (struct pollfd*__fds,nfds_t__nfds,int__timeout); poll() 没有像select() 构建fd_set 结构体的3 个数组( 针对每个条件分别有一个数组:可读性、可写性和错误条件) ,然后检查从0 到nfds 每个文件描述符。 第一个参数pollfd 结构体定义如下: 引用 /* Data structure describing a polling request. */ struct pollfd { int fd; /* poll 的文件描述符. */ short int events; /* fd 上感兴趣的事件(等待的事件). */ short int revents; /* fd 上实际发生的事件. */ }; fd成员表示感兴趣的,且打开了的文件描述符; events成员是位掩码,用于指定针对这个文件描述符感兴趣的事件;revents成员是位掩码,用于指定当poll 返回时,在该文件描述符上已经发生了哪些事情。 events 和revents 结合下列常数值(宏)指定即将唤醒的事件或调查已结束的poll() 函数被唤醒的原因,这些宏常数如下: ?POLLIN events 中使用该宏常数,能够在折本文件的可读情况下,结束poll() 函数。相反,revents 上使用该宏常数,在检查poll() 函数结束后,可依此判断设备文件是否处于可读状态(即使消息长度是0)。 ?POLLPRI 在events 域中使用该宏常数,能够在设备文件的高优先级数据读取状态下,结束poll() 函数。相反,revents 上使用该宏常数,在检查poll() 函数结束后,

11讲_JavaScript事件分析

Company name WEB 前端开发技术 HTML JavaScript CSS WEB 前端开发技术 第11章JavaScript 事件分析 计算机科学与技术系

Web前端开发技术主要内容 计算机科学与技术系 ?掌握事件、事件类型的概念 ?掌握事件处理的机制 ?掌握事件名称与句柄的关系 ?学会编写各类的事件响应程序

计算机科学与技术系 Web前端开发技术11.1 事件编程 事件编程:让用户不仅能够浏览页面中的内容,而且还可以和页面元素进行交互。 事件-事件是可以被JavaScript侦测到的行为(ACTION)。 事件源Window Form Mouse key 事件 单击事件 双击事件 事件句柄 Onclick ondblclick 编写事件 处理代码

Web 前端开发技术事件驱动案例导入 计算机科学与技术系 事件处理 你好!这是一个简单事件处理程序!

计算机科学与技术系 Web 前端开发技术 11.1 事件编程(续) 1.网页访问中常见的事件 鼠标单击:例如单击button 、选中checkbo x 和radio 等元素;鼠标进入、悬浮或退出页面的某个热点:例如鼠标停在一个图片上方或者进入table 的范围; 键盘按键:当按下按键或释放按键时;页面或图像载入:例如页面body 被加载时;在表单中选取输入框或改变输入框中文本的内容:例如选中或修改了文本框中的内容;确认表单:例如当准备提交表单的内容。 事件类型:1.鼠标事件2.键盘事件3.浏览器事件

相关主题
文本预览
相关文档 最新文档