CN105897878B - A kind of method and device of the initialization of data link layer - Google Patents
A kind of method and device of the initialization of data link layer Download PDFInfo
- Publication number
- CN105897878B CN105897878B CN201610203720.7A CN201610203720A CN105897878B CN 105897878 B CN105897878 B CN 105897878B CN 201610203720 A CN201610203720 A CN 201610203720A CN 105897878 B CN105897878 B CN 105897878B
- Authority
- CN
- China
- Prior art keywords
- parameter
- message
- state
- opposite end
- sent
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000002452 interceptive effect Effects 0.000 claims description 21
- 238000001514 detection method Methods 0.000 claims description 12
- 230000003993 interaction Effects 0.000 claims description 12
- 241000208340 Araliaceae Species 0.000 claims description 8
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 claims description 8
- 235000003140 Panax quinquefolius Nutrition 0.000 claims description 8
- 235000008434 ginseng Nutrition 0.000 claims description 8
- 230000009191 jumping Effects 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 3
- 230000001960 triggered effect Effects 0.000 claims 1
- 230000008569 process Effects 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 5
- 238000013461 design Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000011423 initialization method Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/324—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
Abstract
The present invention provides a kind of method and device of the initialization of data link layer, this method, comprising: S1: the parameter mutual message that real-time reception opposite end is sent, and the parameter mutual message for carrying the parameter for initialization is sent to opposite end;S2: judging whether the parameter mutual message sent opposite end is normal, if so, S3 is thened follow the steps, otherwise, return step S1;S3: sending to opposite end and start normal message, receives the beginning normal message that opposite end is sent, and when receiving the beginning normal message sent opposite end, determines the initialization for realizing data link layer.The present invention provides a kind of method and devices of the initialization of data link layer, can be realized the initialization of data link layer.
Description
Technical field
The present invention relates to electronic technology field, in particular to a kind of method and device of the initialization of data link layer.
Background technique
With the continuous development in server application field, the application demand of high-end server has come into an important rank
Section.Complicated architecture, which is realized, supports high-end server system to realize high performance index, high security, high availability, Gao Ke
By property the features such as.
This just needs network-control class chip controls multichannel process device system, reaches internal system message transmissions and efficiently may be used
It leans on, safety and stability.How to realize that the initialization of data link layer is increasingly taken seriously.
Summary of the invention
The embodiment of the invention provides a kind of method and devices of the initialization of data link layer, can be realized data link
The initialization of layer.
On the one hand, the embodiment of the invention provides a kind of methods of the initialization of data link layer, comprising:
S1: the parameter mutual message that real-time reception opposite end is sent sends the ginseng for carrying the parameter for initialization to opposite end
Number mutual message;
S2: judging whether the parameter mutual message sent opposite end is normal, if so, thening follow the steps S3, otherwise, returns to step
Rapid S1;
S3: sending to opposite end and start normal message, receives the beginning normal message that opposite end is sent, sends when receiving opposite end
Beginning normal message when, determine realize data link layer initialization.
Further, message end is sent for serial, comprising:
Multiple serial presences are set for the serial message end that sends in advance;
The multiple serial presence include: preparation state, the first parameter state, the second parameter state, third parameter state,
4th parameter state, serially prepares normal condition, serially waits normal condition, serial normal condition serial parameter completion status;
The S1, comprising:
The parameter mutual message, comprising: the first parameter message, the second parameter message, third parameter message, the 4th parameter
Message;
When being in the first parameter state, the first parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into the second parameter state;
When being in the second parameter state, the second parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into third parameter state;
When being in third parameter state, third parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into the 4th parameter state;
When being in four parameter states, the 4th parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into serial parameter completion status;
The S2, comprising:
When being in serial parameter completion status, judge whether the parameter mutual message sent opposite end is normal, if it is,
Prepare normal condition into serial, otherwise, then enters preparation state;
When being in preparation state, is sent to opposite end and reset message, when receiving opposite end and sending parameter mutual message, into
Enter the first parameter state;
The S3, comprising:
It when in serial preparation normal condition, is sent to opposite end and starts normal message, wait normal condition into serial;
When in serial waiting normal condition, the beginning normal message that opposite end is sent is received, is sent when receiving opposite end
Beginning normal message when, then enter serial normal condition;
When being in serial normal condition, the initialization for realizing data link layer is determined.
Further, further includes:
The multiple serial presence further include: serial wait state;
Before the S1, further includes:
Serial wait state is set by the serial message end that sends, when being in serial wait state, sends empty message, when
After detecting that physical layer is ready, into preparation state;
When being in preparation state, is sent to opposite end and reset message, when receiving the reset message sent opposite end or ginseng
When number mutual message, into the first parameter state;
The S1, further includes:
When being in the first parameter state, when receiving error message, misregistration, and enter the second parameter state,
When receiving reset message, the first parameter state is maintained;
When being in the second parameter state, when receiving error message, misregistration, and enter third parameter state;
When being in third parameter state, when receiving error message, misregistration, and enter the 4th parameter state;
When being in four parameter states, when receiving error message, misregistration, and enter serial parameter and complete shape
State;
The S2, comprising:
When be in serial parameter completion status when, issue empty message, detect whether the mistake of record, if so, then into
Enter preparation state, if it is not, entering serial preparation normal condition;
The S3, further includes:
When in serial preparation normal condition, when receiving preparation normal message, and beginning normal message is sent, into
Enter serial waiting normal condition and issue preparation normal message if being not received by preparation normal message, if received multiple
Position message or error message, then reset, immediately into serial wait state;
When in serial waiting normal condition, issues empty message and then stood when receiving service message or error message
It resets, into serial wait state.
Further, for transmitted in parallel message end, comprising:
Multiple parallel states are set for transmitted in parallel message end in advance;
The multiple parallel state includes: parameter swap status, error condition, prepares normal condition, parallel waiting parallel
Normal condition, parallel normal condition;
The S1, comprising:
When being in parameter swap status, four parameter exchange messages are issued parallel to opposite end, real-time reception opposite end is sent
Parameter mutual message prepare normal condition into parallel when receiving the parameter mutual message sent opposite end;
The S2, comprising:
When in parallel preparation normal condition, judge whether the parameter mutual message sent opposite end is normal, if it is,
Normal condition is waited into parallel, otherwise, into error condition;
When being in error condition, resetted, into parameter swap status;
The S3, comprising:
It when being in parallel waiting normal condition, is issued to opposite end and starts normal message, the beginning that reception opposite end is sent is just
Normal message then enters parallel normal condition when receiving the beginning normal message sent opposite end;
When being in parallel normal condition, the initialization for realizing data link layer is determined.
Further, further includes:
The multiple parallel state further include: parallel wait state;
Before the S1, further includes:
Parallel wait state is set by transmitted in parallel message end, when being in parallel wait state, sends empty message, when
After detecting that physical layer is ready, into parameter swap status;
The S1, further includes:
When being in parameter swap status, when an error occurs, error condition is jumped to;
The S2, further includes:
When in parallel preparation normal condition, when receiving reset message, then enter parameter swap status, detection is
The no mistake for having record, if so, then entering error condition, if it is not, entering parallel waiting normal condition;
The S3, further includes:
When in parallel waiting normal condition, when receiving reset message, then enter parameter swap status, detection is
The no mistake for having record, if so, then entering error condition.
Further, the S1, further includes: the sequence of the parameter mutual message received is recorded by bitmap;
The S2, comprising: judge whether the parameter mutual message sent opposite end is normal according to the bitmap;
Further include: when receiving reset message, the bitmap is reset.
Further, further includes: when receive reset message when, by the message received before the reset message into
Row invalidation.
On the other hand, the embodiment of the invention provides a kind of devices of the initialization of data link layer, comprising:
Parameter interactive unit sends to opposite end and carries for just for the parameter mutual message that real-time reception opposite end is sent
The parameter mutual message of the parameter of beginningization;
Judging unit, whether the parameter mutual message for judging to send opposite end is normal, if it is, triggering initialization is single
Otherwise member triggers the parameter interactive unit;
Initialization unit starts normal message for sending to opposite end, receives the beginning normal message sent of opposite end, when connecing
When receiving the beginning normal message sent opposite end, the initialization for realizing data link layer is determined.
Further, message end is sent for serial, comprising: pre-set multiple serial presences;
The multiple serial presence include: preparation state, the first parameter state, the second parameter state, third parameter state,
4th parameter state, serially prepares normal condition, serially waits normal condition, serial normal condition serial parameter completion status;
The parameter mutual message, comprising: the first parameter message, the second parameter message, third parameter message, the 4th parameter
Message;
The parameter interactive unit, is used for:
When being in the first parameter state, the first parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into the second parameter state;
When being in the second parameter state, the second parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into third parameter state;
When being in third parameter state, third parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into the 4th parameter state;
When being in four parameter states, the 4th parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into serial parameter completion status;
The judging unit, is used for:
When being in serial parameter completion status, judge whether the parameter mutual message sent opposite end is normal, if it is,
Prepare normal condition into serial, otherwise, then enters preparation state;
When being in preparation state, is sent to opposite end and reset message, when receiving opposite end and sending parameter mutual message, into
Enter the first parameter state;
The initialization unit, is used for:
It when in serial preparation normal condition, is sent to opposite end and starts normal message, wait normal condition into serial;
When in serial waiting normal condition, the beginning normal message that opposite end is sent is received, is sent when receiving opposite end
Beginning normal message when, then enter serial normal condition;
When being in serial normal condition, the initialization for realizing data link layer is determined.
Further, further includes:
The multiple serial presence further include: serial wait state;
Further include:
It is serial to wait unit, it is used for:
Serial wait state is set by the serial message end that sends, when being in serial wait state, sends empty message, when
After detecting that physical layer is ready, into preparation state;
When being in preparation state, is sent to opposite end and reset message, when receiving the reset message sent opposite end or ginseng
When number mutual message, into the first parameter state;
The parameter interactive unit, is also used to:
When being in the first parameter state, when receiving error message, misregistration, and enter the second parameter state,
When receiving reset message, the first parameter state is maintained;
When being in the second parameter state, when receiving error message, misregistration, and enter third parameter state;
When being in third parameter state, when receiving error message, misregistration, and enter the 4th parameter state;
When being in four parameter states, when receiving error message, misregistration, and enter serial parameter and complete shape
State;
The judging unit, is used for:
When be in serial parameter completion status when, issue empty message, detect whether the mistake of record, if so, then into
Enter preparation state, if it is not, entering serial preparation normal condition;
The initialization unit, is also used to:
When in serial preparation normal condition, when receiving preparation normal message, and beginning normal message is sent, into
Enter serial waiting normal condition and issue preparation normal message if being not received by preparation normal message, if received multiple
Position message or error message, then reset, immediately into serial wait state;
When in serial waiting normal condition, issues empty message and then stood when receiving service message or error message
It resets, into serial wait state.
Further, for transmitted in parallel message end, comprising: pre-set multiple parallel states;
The multiple parallel state includes: parameter swap status, error condition, prepares normal condition, parallel waiting parallel
Normal condition, parallel normal condition;
The parameter interactive unit, is used for:
When being in parameter swap status, four parameter exchange messages are issued parallel to opposite end, real-time reception opposite end is sent
Parameter mutual message prepare normal condition into parallel when receiving the parameter mutual message sent opposite end;
The judging unit, is used for:
When in parallel preparation normal condition, judge whether the parameter mutual message sent opposite end is normal, if it is,
Normal condition is waited into parallel, otherwise, into error condition;
When being in error condition, resetted, into parameter swap status;
The initialization unit, is used for:
It when being in parallel waiting normal condition, is issued to opposite end and starts normal message, the beginning that reception opposite end is sent is just
Normal message then enters parallel normal condition when receiving the beginning normal message sent opposite end;
When being in parallel normal condition, the initialization for realizing data link layer is determined.
Further, further includes:
The multiple parallel state further include: parallel wait state;
Further include:
It is parallel to wait unit, for setting parallel wait state for transmitted in parallel message end, when in parallel waiting shape
When state, empty message is sent, after detecting that physical layer is ready, into parameter swap status;
The parameter interactive unit, is also used to: when being in parameter swap status, when an error occurs, jumping to wrong shape
State;
The judging unit, is also used to:
When in parallel preparation normal condition, when receiving reset message, then enter parameter swap status, detection is
The no mistake for having record, if so, then entering error condition, if it is not, entering parallel waiting normal condition;
The initialization unit, is also used to:
When in parallel waiting normal condition, when receiving reset message, then enter parameter swap status, detection is
The no mistake for having record, if so, then entering error condition.
Further, the parameter interactive unit, is also used to: the parameter mutual message received is recorded by bitmap
Sequentially;
The judging unit, is used for: judging whether the parameter mutual message sent opposite end is normal according to the bitmap;
Further include: resetting unit, for when receiving reset message, the bitmap to be reset.
Further, further includes:
Invalid unit, for when receiving reset message, the message received before the reset message to be carried out
Invalidation.
In embodiments of the present invention, the both ends of data link layer connection are realized by parameter mutual message for initialization
The interaction of parameter sends to opposite end after determining that parameter mutual message is normal and starts normal message, receiving what opposite end was sent
After starting normal message, the initialization of data link layer is realized.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow chart of the method for the initialization for data link layer that one embodiment of the invention provides;
Fig. 2 is a kind of schematic diagram of the device of the initialization for data link layer that one embodiment of the invention provides;
Fig. 3 is the schematic diagram of the device of the initialization for another data link layer that one embodiment of the invention provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, the embodiment of the invention provides a kind of method of the initialization of data link layer, this method be can wrap
Include following steps:
S1: the parameter mutual message that real-time reception opposite end is sent sends the ginseng for carrying the parameter for initialization to opposite end
Number mutual message;
S2: judging whether the parameter mutual message sent opposite end is normal, if so, thening follow the steps S3, otherwise, returns to step
Rapid S1;
S3: sending to opposite end and start normal message, receives the beginning normal message that opposite end is sent, sends when receiving opposite end
Beginning normal message when, determine realize data link layer initialization.
In embodiments of the present invention, the both ends of data link layer connection are realized by parameter mutual message for initialization
The interaction of parameter sends to opposite end after determining that parameter mutual message is normal and starts normal message, receiving what opposite end was sent
After starting normal message, the initialization of data link layer is realized.
For different terminals, the mode of realization is different, for the terminal for serially sending message, a kind of possible
In implementation, message end is sent for serial, comprising:
Multiple serial presences are set for the serial message end that sends in advance;
The multiple serial presence include: preparation state, the first parameter state, the second parameter state, third parameter state,
4th parameter state, serially prepares normal condition, serially waits normal condition, serial normal condition serial parameter completion status;
The S1, comprising:
The parameter mutual message, comprising: the first parameter message, the second parameter message, third parameter message, the 4th parameter
Message;
When being in the first parameter state, the first parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into the second parameter state;
When being in the second parameter state, the second parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into third parameter state;
When being in third parameter state, third parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into the 4th parameter state;
When being in four parameter states, the 4th parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into serial parameter completion status;
The S2, comprising:
When being in serial parameter completion status, judge whether the parameter mutual message sent opposite end is normal, if it is,
Prepare normal condition into serial, otherwise, then enters preparation state;
When being in preparation state, is sent to opposite end and reset message, when receiving opposite end and sending parameter mutual message, into
Enter the first parameter state;
The S3, comprising:
It when in serial preparation normal condition, is sent to opposite end and starts normal message, wait normal condition into serial;
When in serial waiting normal condition, the beginning normal message that opposite end is sent is received, is sent when receiving opposite end
Beginning normal message when, then enter serial normal condition;
When being in serial normal condition, the initialization for realizing data link layer is determined.
In one possible implementation, further includes:
The multiple serial presence further include: serial wait state;
Before the S1, further includes:
Serial wait state is set by the serial message end that sends, when being in serial wait state, sends empty message, when
After detecting that physical layer is ready, into preparation state;
When being in preparation state, is sent to opposite end and reset message, when receiving the reset message sent opposite end or ginseng
When number mutual message, into the first parameter state;
The S1, further includes:
When being in the first parameter state, when receiving error message, misregistration, and enter the second parameter state,
When receiving reset message, the first parameter state is maintained;
When being in the second parameter state, when receiving error message, misregistration, and enter third parameter state;
When being in third parameter state, when receiving error message, misregistration, and enter the 4th parameter state;
When being in four parameter states, when receiving error message, misregistration, and enter serial parameter and complete shape
State;
The S2, comprising:
When be in serial parameter completion status when, issue empty message, detect whether the mistake of record, if so, then into
Enter preparation state, if it is not, entering serial preparation normal condition;
The S3, further includes:
When in serial preparation normal condition, when receiving preparation normal message, and beginning normal message is sent, into
Enter serial waiting normal condition and issue preparation normal message if being not received by preparation normal message, if received multiple
Position message or error message, then reset, immediately into serial wait state;
When in serial waiting normal condition, issues empty message and then stood when receiving service message or error message
It resets, into serial wait state.
For the terminal for serially sending message, in one possible implementation, for transmitted in parallel message end,
Include:
Multiple parallel states are set for transmitted in parallel message end in advance;
The multiple parallel state includes: parameter swap status, error condition, prepares normal condition, parallel waiting parallel
Normal condition, parallel normal condition;
The S1, comprising:
When being in parameter swap status, four parameter exchange messages are issued parallel to opposite end, real-time reception opposite end is sent
Parameter mutual message prepare normal condition into parallel when receiving the parameter mutual message sent opposite end;
The S2, comprising:
When in parallel preparation normal condition, judge whether the parameter mutual message sent opposite end is normal, if it is,
Normal condition is waited into parallel, otherwise, into error condition;
When being in error condition, resetted, into parameter swap status;
The S3, comprising:
It when being in parallel waiting normal condition, is issued to opposite end and starts normal message, the beginning that reception opposite end is sent is just
Normal message then enters parallel normal condition when receiving the beginning normal message sent opposite end;
When being in parallel normal condition, the initialization for realizing data link layer is determined.
In one possible implementation, this method further include:
The multiple parallel state further include: parallel wait state;
Before the S1, further includes:
Parallel wait state is set by transmitted in parallel message end, when being in parallel wait state, sends empty message, when
After detecting that physical layer is ready, into parameter swap status;
The S1, further includes:
When being in parameter swap status, when an error occurs, error condition is jumped to;
The S2, further includes:
When in parallel preparation normal condition, when receiving reset message, then enter parameter swap status, detection is
The no mistake for having record, if so, then entering error condition, if it is not, entering parallel waiting normal condition;
The S3, further includes:
When in parallel waiting normal condition, when receiving reset message, then enter parameter swap status, detection is
The no mistake for having record, if so, then entering error condition.
In one possible implementation, the S1, further includes: the parameter interaction report received is recorded by bitmap
The sequence of text;
The S2, comprising: judge whether the parameter mutual message sent opposite end is normal according to the bitmap;
Further include: when receiving reset message, the bitmap is reset.
Specifically, the flag bit of the parameter mutual message received can be stored by parameter register.For example,
Carry out mark four parameter message using four bitmap (bitmap) to be properly received, from left to right respectively param0, param1,
Param2, param3.If after receiving the first parameter message, bitmap 1000;After receiving the second parameter message,
Bitmap is 1100;After receiving third parameter message, bitmap 1110;After receiving the 4th parameter message, bitmap is
1111;Once receiving reset message, bitmap must then be reset immediately.The correct order of transmission of parameter can be confirmed in this way,
When order of transmission mistake, can be judged by bitmap.
In one possible implementation, this method further include:, will be in the reset message when receiving reset message
The message received before carries out invalidation.
When one end is serial transmission message, when one end is transmitted in parallel message, the incomplete phase of the link transmission times of both sides
Deng if ceaselessly sending under reset case and resetting message, it may appear that always there is one end to be introduced into non-reset state, at this moment separately
One end resets message and just arrives, once both sides cannot enter non-reset state simultaneously, will appear the case where resetting repeatedly in this way.For
It solves the above problems, either end can be set to, only send and primary reset message.The feelings resetted repeatedly are avoided in this way
Condition.
In one possible implementation, in parameter exchange process, if receiving reset message, immediately to this
End link layer is resetted, and is sent and resetted message notifying opposite end.
In embodiments of the present invention, further includes: carry out CRC (Cyclical Redundancy Check, Cyclic Redundancy Code
Verification) error detection, once generation mistake, immediately resets link layer.
In embodiments of the present invention, by starting normal message as handshake, shaking hands for both ends is realized, both sides mutually send out
Identical beginning normal message after both sides must receive the beginning normal message of other side, just calculates success of shaking hands.It ensure that
The initialization of data link layer it is reliable.
In embodiments of the present invention, in parameter exchange process, multiple parameters message will be sent according to certain order, one
Denier recipient receives message order mistake, will carry out resetting link layer immediately.
In embodiments of the present invention, physical layer after reset, link layer equity both sides must mutually send out reset message, and
Parameter message is sent immediately after distributing reset message and carries out parameter exchange, send empty message when need not send message.
In embodiments of the present invention, data link layer can be carried out order-preserving processing, in asymmetric channel in transmit process
In remain to smoothly complete initialization.The link information of both sides' needs can be mutually transferred in initialization procedure by parameter message,
It can guarantee reliably to shake hands by starting normal message, once there is mistake, error handle can be carried out immediately.
In order to realize based on FPGA prototype verification and chip design data link layer initialization, in order to realize FPGA or
The link communication of completion and processor device that person's chip can be highly reliable, the embodiment of the invention provides a kind of data link layers
Initialization method, in this embodiment, one end be it is serial send message end, one end is transmitted in parallel message end, serial to send out
Literary end of delivering newspaper needs successively to send four parameter mutual messages.This method may include:
For serially sending message end:
Multiple serial presences are set for the serial message end that sends in advance;
The multiple serial presence include: serial wait state, preparation state, the first parameter state, the second parameter state,
Third parameter state, the 4th parameter state, serial parameter completion status, serially prepare normal condition, serially wait normal condition,
Serial normal condition;Pass sequentially through following manner expression: Not_Rdy_init state, Rdy_init state, Param_Ex0 shape
State, Param_Ex1 state, Param_Ex2 state, Param_Ex3 state, Param_Ex_done state, Rdy_for_normal
State, Wait_normal state, Normal_op state.
Not_Rdy_init state is set by the serial message end that sends, when being in Not_Rdy_init state, is sent
Empty message, after detecting that physical layer is ready, into Rdy_init state;
When be in Rdy_init state when, to opposite end send reset message, when receive the reset message sent opposite end or
When person's parameter mutual message, into the first parameter state;
When being in Param_Ex0 state, Param_Ex0 message (i.e. the first parameter message) is issued to opposite end, if received
It then jumps to the Param_Ex0 message that opposite end is sent toward Param_Ex1 state.It is still jumped if receiving error message, after reporting an error past
Param_Ex1 state and misregistration.It receives and resets message maintenance ortho states.
When being in Param_Ex1 state, Param_Ex1 message (i.e. the second parameter message) is issued to opposite end, if received
It then jumps to the Param_Ex1 message that opposite end is sent toward Param_Ex2 state.It is still jumped if receiving error message, after reporting an error past
Param_Ex2 state and misregistration.
When being in Param_Ex2 state, Param_Ex2 message (i.e. third parameter message) is issued to opposite end, if received
It then jumps to the Param_Ex2 message that opposite end is sent toward Param_Ex3 state.It is still jumped if receiving error message, after reporting an error past
Param_Ex3 state and misregistration.
When being in Param_Ex3 state, Param_Ex3 message (i.e. the 4th parameter message) is issued to opposite end, if received
It then jumps to the Param_Ex3 message that opposite end is sent toward Param_Ex_done state.If receiving error message, still jumped after reporting an error
Toward Param_Ex_done state and misregistration.
When being in Param_Ex_done state, empty message is issued if there is error logging and is immediately returned to Rdy_init
Otherwise state jumps to Rdy_for_normal state.
When being in Rdy_for_normal state, if it is (i.e. quasi- to receive the Rdy_for_normal message sent opposite end
Standby normal message), it issues begin_normal message (starting normal message) and jumps to NextState Wait_normal shape
Otherwise state issues Rdy_for_normal message, if receiving reset or error message resets immediately,
When being in Wait_normal state, empty message is issued, error message is received or reset message resets immediately,
Begin_normal message is received then to jump toward Normal_op state.
When being in Normal_op state, determine that data link layer initializes normal condition.
Realize that a side is that perhaps chip tends not to be gone here and there FPGA due to the limitation of FPGA or chip interior logic
Row receives, and needs to receive parallel after physical layer carries out serioparallel exchange.
For transmitted in parallel message end:
Multiple parallel states are set for transmitted in parallel message end in advance;
The multiple parallel state includes: parallel wait state, parameter swap status, parallel parameter completion status, mistake
State prepares normal condition parallel, waits normal condition, parallel normal condition parallel;Pass sequentially through following manner expression: Not_
Rdy_init state, Param_Exchange state, Param_Ex_done state, Param_Err state, Rdy_for_
Normal state, Wait_normal state, NORMAL state;
Not_Rdy_init state is set by transmitted in parallel message end, when being in Not_Rdy_init state, is sent
Empty message, after detecting that physical layer is ready, into Param_Exchange state;
When being in Param_Exchange state, once issues four exchange parameter messages and jumped to if wrong
Param_Err state jumps to Param_Ex_done state if sequence receives four parameters exchange messages, if other situations
Keep ortho states.
When being in Param_Ex_done state, if receiving reset message, Param_Exchange shape is immediately jumped to
State then jumps to Param_Err state if there is error logging, otherwise jumps to Rdy_for_normal state.
When being in Rdy_for_normal state, if receiving reset message, Param_Exchange shape is immediately jumped to
State then jumps to Param_Err state if there is error logging.If have issued begin_normal message to have received again
Begin_normal message then jumps to NORMAL state.
When being in NORMAL status, chain path level initialization normal condition is determined.
When being in Param_Err state, resetted, into Param_Exchange state.
As shown in Figure 2 and Figure 3, the embodiment of the invention provides a kind of devices of the initialization of data link layer.Device is implemented
Example can also be realized by software realization by way of hardware or software and hardware combining.For hardware view, such as scheme
Shown in 2, for a kind of a kind of hardware configuration of the device place equipment of the initialization of data link layer provided in an embodiment of the present invention
Figure, other than processor shown in Fig. 2, memory, network interface and nonvolatile memory, in embodiment where device
Equipment usually can also include other hardware, such as be responsible for handle message forwarding chip.Taking software implementation as an example, as schemed
Shown in 3, as the device on a logical meaning, being will be corresponding in nonvolatile memory by the CPU of equipment where it
Computer program instructions are read into memory what operation was formed.A kind of dress of the initialization of data link layer provided in this embodiment
It sets, comprising:
Parameter interactive unit 301 sends carrying to opposite end and is used for for the parameter mutual message that real-time reception opposite end is sent
The parameter mutual message of the parameter of initialization;
Judging unit 302, whether the parameter mutual message for judging to send opposite end is normal, if it is, triggering is initial
Change unit and otherwise triggers the parameter interactive unit;
Initialization unit 303 starts normal message for sending to opposite end, receives the beginning normal message that opposite end is sent,
When receiving the beginning normal message sent opposite end, the initialization for realizing data link layer is determined.
In one possible implementation, message end is sent for serial, comprising: pre-set multiple serial shapes
State;
The multiple serial presence include: preparation state, the first parameter state, the second parameter state, third parameter state,
4th parameter state, serially prepares normal condition, serially waits normal condition, serial normal condition serial parameter completion status;
The parameter mutual message, comprising: the first parameter message, the second parameter message, third parameter message, the 4th parameter
Message;
The parameter interactive unit, is used for:
When being in the first parameter state, the first parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into the second parameter state;
When being in the second parameter state, the second parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into third parameter state;
When being in third parameter state, third parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into the 4th parameter state;
When being in four parameter states, the 4th parameter message is sent to opposite end, is handed over when receiving the parameter sent opposite end
When mutual message, into serial parameter completion status;
The judging unit, is used for:
When being in serial parameter completion status, judge whether the parameter mutual message sent opposite end is normal, if it is,
Prepare normal condition into serial, otherwise, then enters preparation state;
When being in preparation state, is sent to opposite end and reset message, when receiving opposite end and sending parameter mutual message, into
Enter the first parameter state;
The initialization unit, is used for:
It when in serial preparation normal condition, is sent to opposite end and starts normal message, wait normal condition into serial;
When in serial waiting normal condition, the beginning normal message that opposite end is sent is received, is sent when receiving opposite end
Beginning normal message when, then enter serial normal condition;
When being in serial normal condition, the initialization for realizing data link layer is determined.
In one possible implementation, the device further include:
The multiple serial presence further include: serial wait state;
Further include:
It is serial to wait unit, it is used for:
Serial wait state is set by the serial message end that sends, when being in serial wait state, sends empty message, when
After detecting that physical layer is ready, into preparation state;
When being in preparation state, is sent to opposite end and reset message, when receiving the reset message sent opposite end or ginseng
When number mutual message, into the first parameter state;
The parameter interactive unit, is also used to:
When being in the first parameter state, when receiving error message, misregistration, and enter the second parameter state,
When receiving reset message, the first parameter state is maintained;
When being in the second parameter state, when receiving error message, misregistration, and enter third parameter state;
When being in third parameter state, when receiving error message, misregistration, and enter the 4th parameter state;
When being in four parameter states, when receiving error message, misregistration, and enter serial parameter and complete shape
State;
The judging unit, is used for:
When be in serial parameter completion status when, issue empty message, detect whether the mistake of record, if so, then into
Enter preparation state, if it is not, entering serial preparation normal condition;
The initialization unit, is also used to:
When in serial preparation normal condition, when receiving preparation normal message, and beginning normal message is sent, into
Enter serial waiting normal condition and issue preparation normal message if being not received by preparation normal message, if received multiple
Position message or error message, then reset, immediately into serial wait state;
When in serial waiting normal condition, issues empty message and then stood when receiving service message or error message
It resets, into serial wait state.
In one possible implementation, for transmitted in parallel message end, comprising: pre-set multiple parallel shapes
State;
The multiple parallel state includes: parameter swap status, error condition, prepares normal condition, parallel waiting parallel
Normal condition, parallel normal condition;
The parameter interactive unit, is used for:
When being in parameter swap status, four parameter exchange messages are issued parallel to opposite end, real-time reception opposite end is sent
Parameter mutual message prepare normal condition into parallel when receiving the parameter mutual message sent opposite end;
The judging unit, is used for:
When in parallel preparation normal condition, judge whether the parameter mutual message sent opposite end is normal, if it is,
Normal condition is waited into parallel, otherwise, into error condition;
When being in error condition, resetted, into parameter swap status;
The initialization unit, is used for:
It when being in parallel waiting normal condition, is issued to opposite end and starts normal message, the beginning that reception opposite end is sent is just
Normal message then enters parallel normal condition when receiving the beginning normal message sent opposite end;
When being in parallel normal condition, the initialization for realizing data link layer is determined.
In one possible implementation, the device further include:
The multiple parallel state further include: parallel wait state;
Further include:
It is parallel to wait unit, for setting parallel wait state for transmitted in parallel message end, when in parallel waiting shape
When state, empty message is sent, after detecting that physical layer is ready, into parameter swap status;
The parameter interactive unit, is also used to: when being in parameter swap status, when an error occurs, jumping to wrong shape
State;
The judging unit, is also used to:
When in parallel preparation normal condition, when receiving reset message, then enter parameter swap status, detection is
The no mistake for having record, if so, then entering error condition, if it is not, entering parallel waiting normal condition;
The initialization unit, is also used to:
When in parallel waiting normal condition, when receiving reset message, then enter parameter swap status, detection is
The no mistake for having record, if so, then entering error condition.
In one possible implementation, the parameter interactive unit, be also used to: being recorded and is received by bitmap
The sequence of parameter mutual message;
The judging unit, is used for: judging whether the parameter mutual message sent opposite end is normal according to the bitmap;
Further include: resetting unit, for when receiving reset message, the bitmap to be reset.
In one possible implementation, the device further include:
Invalid unit, for when receiving reset message, the message received before the reset message to be carried out
Invalidation.
The contents such as the information exchange between each unit, implementation procedure in above-mentioned apparatus, due to implementing with the method for the present invention
Example is based on same design, and for details, please refer to the description in the embodiment of the method for the present invention, and details are not described herein again.
A kind of method and device of the initialization of data link layer provided in an embodiment of the present invention at least has beneficial below
Effect:
1, in embodiments of the present invention, the both ends of data link layer connection are realized by parameter mutual message for initializing
Parameter interaction, after determining that parameter mutual message is normal, to opposite end send start normal message, sent receiving opposite end
Beginning normal message after, realize the initialization of data link layer.
2, in embodiments of the present invention, by starting normal message as handshake, shaking hands for both ends is realized, both sides are mutual
It sends out beginning normal message identical, after both sides must receive the beginning normal message of other side, just calculates success of shaking hands.This guarantees
The initialization of data link layer it is reliable.
3, in embodiments of the present invention, data link layer can be carried out order-preserving processing, in asymmetric letter in transmit process
It remains to smoothly complete initialization in road.The link letter of both sides' needs can be mutually transferred in initialization procedure by parameter message
Breath can guarantee reliably to shake hands, once there is mistake, can carry out error handle immediately by starting normal message.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity
Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation
Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non-
It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements,
It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment
Some elements.In the absence of more restrictions, the element limited by sentence " including a 〃 ", is not arranged
Except there is also other identical factors in the process, method, article or apparatus that includes the element.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light
In the various media that can store program code such as disk.
Finally, it should be noted that the foregoing is merely presently preferred embodiments of the present invention, it is merely to illustrate skill of the invention
Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention,
Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.
Claims (8)
1. a kind of method of the initialization of data link layer characterized by comprising
S1: the parameter mutual message that real-time reception opposite end is sent sends to carry to opposite end and hand over for the parameter of the parameter of initialization
Mutual message;
S2: judging whether the parameter mutual message sent opposite end is normal, if so, S3 is thened follow the steps, otherwise, return step
S1;
S3: sending to opposite end and start normal message, receives the beginning normal message sent of opposite end, when receive that opposite end sends opens
When beginning normal message, the initialization for realizing data link layer is determined;
Message end is sent for serial, comprising:
Multiple serial presences are set for the serial message end that sends in advance;
The multiple serial presence includes: preparation state, the first parameter state, the second parameter state, third parameter state, the 4th
Parameter state, serially prepares normal condition, serially waits normal condition, serial normal condition serial parameter completion status;
The S1, comprising:
The parameter mutual message, comprising: the first parameter message, the second parameter message, third parameter message, the 4th parameter report
Text;
When being in the first parameter state, the first parameter message is sent to opposite end, is reported when receiving the parameter interaction sent opposite end
Wen Shi, into the second parameter state;
When being in the second parameter state, the second parameter message is sent to opposite end, is reported when receiving the parameter interaction sent opposite end
Wen Shi, into third parameter state;
When being in third parameter state, third parameter message is sent to opposite end, is reported when receiving the parameter interaction sent opposite end
Wen Shi, into the 4th parameter state;
When being in four parameter states, the 4th parameter message is sent to opposite end, is reported when receiving the parameter interaction sent opposite end
Wen Shi, into serial parameter completion status;
The S2, comprising:
When being in serial parameter completion status, judge whether the parameter mutual message sent opposite end is normal, if it is, into
It is serial to prepare normal condition, otherwise, then enter preparation state;
It when being in preparation state, is sent to opposite end and resets message, when receiving opposite end and sending parameter mutual message, into the
One parameter state;
The S3, comprising:
It when in serial preparation normal condition, is sent to opposite end and starts normal message, wait normal condition into serial;
When in it is serial wait normal condition when, the beginning normal message that opposite end is sent is received, when receive that opposite end sends opens
When beginning normal message, then enter serial normal condition;
When being in serial normal condition, the initialization for realizing data link layer is determined.
2. the method according to claim 1, wherein further include:
The multiple serial presence further include: serial wait state;
Before the S1, further includes:
Serial wait state is set by the serial message end that sends, when being in serial wait state, empty message is sent, works as detection
To physical layer it is ready after, into prepare state;
It when being in preparation state, is sent to opposite end and resets message, handed over when receiving the reset message sent opposite end or parameter
When mutual message, into the first parameter state;
The S1, further includes:
When being in the first parameter state, when receiving error message, misregistration, and enter the second parameter state, when connecing
When receiving reset message, the first parameter state is maintained;
When being in the second parameter state, when receiving error message, misregistration, and enter third parameter state;
When being in third parameter state, when receiving error message, misregistration, and enter the 4th parameter state;
When being in four parameter states, when receiving error message, misregistration, and enter serial parameter completion status;
The S2, comprising:
When being in serial parameter completion status, empty message is issued, detects whether the mistake of record, if so, then entering standard
Standby state, if it is not, entering serial preparation normal condition;
The S3, further includes:
When in serial preparation normal condition, when receiving preparation normal message, and beginning normal message is sent, into string
Row waits normal condition to issue preparation normal message if being not received by preparation normal message, if receiving reset report
Text or error message, then reset, immediately into serial wait state;
When in serial waiting normal condition, empty message is issued, it is when receiving service message or error message, then multiple immediately
Position, into serial wait state.
3. the method according to claim 1, wherein being directed to transmitted in parallel message end, comprising:
Multiple parallel states are set for transmitted in parallel message end in advance;
The multiple parallel state includes: parameter swap status, error condition, prepares normal condition, parallel waiting parallel normally
State, parallel normal condition;
The S1, comprising:
When being in parameter swap status, four parameter exchange messages, the ginseng that real-time reception opposite end is sent are issued parallel to opposite end
Number mutual message prepares normal condition into parallel when receiving the parameter mutual message sent opposite end;
The S2, comprising:
When in parallel preparation normal condition, judge whether the parameter mutual message sent opposite end is normal, if it is, into
It is parallel to wait normal condition, otherwise, into error condition;
When being in error condition, resetted, into parameter swap status;
The S3, comprising:
It when in parallel waiting normal condition, is issued to opposite end and starts normal message, received the beginning that opposite end is sent and normally report
Text then enters parallel normal condition when receiving the beginning normal message sent opposite end;
When being in parallel normal condition, the initialization for realizing data link layer is determined.
4. according to the method described in claim 3, it is characterized by further comprising:
The multiple parallel state further include: parallel wait state;
Before the S1, further includes:
Parallel wait state is set by transmitted in parallel message end, when being in parallel wait state, empty message is sent, works as detection
To physical layer it is ready after, into parameter swap status;
The S1, further includes:
When being in parameter swap status, when an error occurs, error condition is jumped to;
The S2, further includes:
When in parallel preparation normal condition, when receiving reset message, then enters parameter swap status, detected whether
The mistake of record, if so, then entering error condition, if it is not, entering parallel waiting normal condition;
The S3, further includes:
When in parallel waiting normal condition, when receiving reset message, then enters parameter swap status, detected whether
The mistake of record, if so, then entering error condition;
And/or
The S1, further includes: the sequence of the parameter mutual message received is recorded by bitmap;
The S2, comprising: judge whether the parameter mutual message sent opposite end is normal according to the bitmap;
Further include: when receiving reset message, the bitmap is reset;
And/or
Further include: when receiving reset message, the message received before the reset message is subjected to invalidation.
5. a kind of device of the initialization of data link layer characterized by comprising
Parameter interactive unit sends to opposite end and carries for initializing for the parameter mutual message that real-time reception opposite end is sent
Parameter parameter mutual message;
Judging unit, whether the parameter mutual message for judging to send opposite end is normal, if it is, triggering initialization unit,
Otherwise, the parameter interactive unit is triggered;
Initialization unit starts normal message for sending to opposite end, receives the beginning normal message sent of opposite end, when receiving
When the beginning normal message that opposite end is sent, the initialization for realizing data link layer is determined;Message end is sent for serial, comprising:
Pre-set multiple serial presences;
The multiple serial presence includes: preparation state, the first parameter state, the second parameter state, third parameter state, the 4th
Parameter state, serially prepares normal condition, serially waits normal condition, serial normal condition serial parameter completion status;
The parameter mutual message, comprising: the first parameter message, the second parameter message, third parameter message, the 4th parameter report
Text;
The parameter interactive unit, is used for:
When being in the first parameter state, the first parameter message is sent to opposite end, is reported when receiving the parameter interaction sent opposite end
Wen Shi, into the second parameter state;
When being in the second parameter state, the second parameter message is sent to opposite end, is reported when receiving the parameter interaction sent opposite end
Wen Shi, into third parameter state;
When being in third parameter state, third parameter message is sent to opposite end, is reported when receiving the parameter interaction sent opposite end
Wen Shi, into the 4th parameter state;
When being in four parameter states, the 4th parameter message is sent to opposite end, is reported when receiving the parameter interaction sent opposite end
Wen Shi, into serial parameter completion status;
The judging unit, is used for:
When being in serial parameter completion status, judge whether the parameter mutual message sent opposite end is normal, if it is, into
It is serial to prepare normal condition, otherwise, then enter preparation state;
It when being in preparation state, is sent to opposite end and resets message, when receiving opposite end and sending parameter mutual message, into the
One parameter state;
The initialization unit, is used for:
It when in serial preparation normal condition, is sent to opposite end and starts normal message, wait normal condition into serial;
When in it is serial wait normal condition when, the beginning normal message that opposite end is sent is received, when receive that opposite end sends opens
When beginning normal message, then enter serial normal condition;
When being in serial normal condition, the initialization for realizing data link layer is determined.
6. device according to claim 5, which is characterized in that further include:
The multiple serial presence further include: serial wait state;
Further include:
It is serial to wait unit, it is used for:
Serial wait state is set by the serial message end that sends, when being in serial wait state, empty message is sent, works as detection
To physical layer it is ready after, into prepare state;
It when being in preparation state, is sent to opposite end and resets message, handed over when receiving the reset message sent opposite end or parameter
When mutual message, into the first parameter state;
The parameter interactive unit, is also used to:
When being in the first parameter state, when receiving error message, misregistration, and enter the second parameter state, when connecing
When receiving reset message, the first parameter state is maintained;
When being in the second parameter state, when receiving error message, misregistration, and enter third parameter state;
When being in third parameter state, when receiving error message, misregistration, and enter the 4th parameter state;
When being in four parameter states, when receiving error message, misregistration, and enter serial parameter completion status;
The judging unit, is used for:
When being in serial parameter completion status, empty message is issued, detects whether the mistake of record, if so, then entering standard
Standby state, if it is not, entering serial preparation normal condition;
The initialization unit, is also used to:
When in serial preparation normal condition, when receiving preparation normal message, and beginning normal message is sent, into string
Row waits normal condition to issue preparation normal message if being not received by preparation normal message, if receiving reset report
Text or error message, then reset, immediately into serial wait state;
When in serial waiting normal condition, empty message is issued, it is when receiving service message or error message, then multiple immediately
Position, into serial wait state.
7. device according to claim 5, which is characterized in that be directed to transmitted in parallel message end, comprising: pre-set more
A parallel state;
The multiple parallel state includes: parameter swap status, error condition, prepares normal condition, parallel waiting parallel normally
State, parallel normal condition;
The parameter interactive unit, is used for:
When being in parameter swap status, four parameter exchange messages, the ginseng that real-time reception opposite end is sent are issued parallel to opposite end
Number mutual message prepares normal condition into parallel when receiving the parameter mutual message sent opposite end;
The judging unit, is used for:
When in parallel preparation normal condition, judge whether the parameter mutual message sent opposite end is normal, if it is, into
It is parallel to wait normal condition, otherwise, into error condition;
When being in error condition, resetted, into parameter swap status;
The initialization unit, is used for:
It when in parallel waiting normal condition, is issued to opposite end and starts normal message, received the beginning that opposite end is sent and normally report
Text then enters parallel normal condition when receiving the beginning normal message sent opposite end;
When being in parallel normal condition, the initialization for realizing data link layer is determined.
8. device according to claim 7, which is characterized in that further include:
The multiple parallel state further include: parallel wait state;
Further include:
It is parallel to wait unit, for setting parallel wait state for transmitted in parallel message end, when being in parallel wait state,
Empty message is sent, after detecting that physical layer is ready, into parameter swap status;
The parameter interactive unit, is also used to: when being in parameter swap status, when an error occurs, jumping to error condition;
The judging unit, is also used to:
When in parallel preparation normal condition, when receiving reset message, then enters parameter swap status, detected whether
The mistake of record, if so, then entering error condition, if it is not, entering parallel waiting normal condition;
The initialization unit, is also used to:
When in parallel waiting normal condition, when receiving reset message, then enters parameter swap status, detected whether
The mistake of record, if so, then entering error condition;
And/or
The parameter interactive unit, is also used to: the sequence of the parameter mutual message received is recorded by bitmap;
The judging unit, is used for: judging whether the parameter mutual message sent opposite end is normal according to the bitmap;
Further include: resetting unit, for when receiving reset message, the bitmap to be reset;
And/or
Further include:
Invalid unit, for when receiving reset message, it is invalid that the message received before the reset message is carried out
Processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610203720.7A CN105897878B (en) | 2016-04-01 | 2016-04-01 | A kind of method and device of the initialization of data link layer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610203720.7A CN105897878B (en) | 2016-04-01 | 2016-04-01 | A kind of method and device of the initialization of data link layer |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105897878A CN105897878A (en) | 2016-08-24 |
CN105897878B true CN105897878B (en) | 2019-03-05 |
Family
ID=57012709
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610203720.7A Active CN105897878B (en) | 2016-04-01 | 2016-04-01 | A kind of method and device of the initialization of data link layer |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105897878B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1538672A (en) * | 2003-04-18 | 2004-10-20 | 中兴通讯股份有限公司 | Broadband insertion server testing gating and testing method |
CN1913457A (en) * | 2005-08-10 | 2007-02-14 | 华为技术有限公司 | Method for fault detection of two-way conversion link |
US7738484B2 (en) * | 2004-12-13 | 2010-06-15 | Intel Corporation | Method, system, and apparatus for system level initialization |
CN103002518A (en) * | 2011-09-16 | 2013-03-27 | 中兴通讯股份有限公司 | Method, terminal and system for link parameter auto-negotiation based on HDLC (high-level data link control) protocol |
CN103733600A (en) * | 2013-06-28 | 2014-04-16 | 华为技术有限公司 | Method, node and device for establishing link |
-
2016
- 2016-04-01 CN CN201610203720.7A patent/CN105897878B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1538672A (en) * | 2003-04-18 | 2004-10-20 | 中兴通讯股份有限公司 | Broadband insertion server testing gating and testing method |
US7738484B2 (en) * | 2004-12-13 | 2010-06-15 | Intel Corporation | Method, system, and apparatus for system level initialization |
CN1913457A (en) * | 2005-08-10 | 2007-02-14 | 华为技术有限公司 | Method for fault detection of two-way conversion link |
CN103002518A (en) * | 2011-09-16 | 2013-03-27 | 中兴通讯股份有限公司 | Method, terminal and system for link parameter auto-negotiation based on HDLC (high-level data link control) protocol |
CN103733600A (en) * | 2013-06-28 | 2014-04-16 | 华为技术有限公司 | Method, node and device for establishing link |
Also Published As
Publication number | Publication date |
---|---|
CN105897878A (en) | 2016-08-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7352706B2 (en) | Network analysis scalable analysis tool for multiple protocols | |
CN101826989B (en) | Method and device for treating fault | |
CN203057193U (en) | Data processing apparatus | |
US20040153863A1 (en) | Network analysis omniscent loop state machine | |
CN103731499B (en) | Terminal and document transmission method | |
CN103248625B (en) | A kind of web crawlers operation exception monitoring method and system | |
CN110225347A (en) | Method of transmitting video data, device, electronic equipment and storage medium | |
CN102123058A (en) | Test equipment and method for testing network protocol decoder | |
CN1929490B (en) | No-feedback one-way transmitted physical isolation method | |
CN102684999B (en) | Data packet processing method and device | |
CN103034564B (en) | Data disaster tolerance drilling method, data disaster tolerance practice device and system | |
CN102736975A (en) | Test method and test system for testing trusted computing password support platform | |
CN101385015B (en) | Shell sessions | |
CN109068328B (en) | Secure network communication method, terminal and system | |
CN105721235B (en) | A kind of method and apparatus detecting connectivity | |
US20220374371A1 (en) | Verification System and Verification Method for Ethernet Interface Chip | |
CN102291408B (en) | Processing method and device for iSCSI (Internet small computer system interface) protocol message | |
CN104348578B (en) | The method and device of data processing | |
CN108322438A (en) | Outer net transmits method, interior network termination and the outer network termination of information to Intranet | |
CN101022473B (en) | Method for automatic, identifying plate card configration and generating local data in exchanger | |
JP5125430B2 (en) | Information processing apparatus and information processing method | |
CN105897878B (en) | A kind of method and device of the initialization of data link layer | |
CN109274636A (en) | Data safe transmission method and its device, system, train | |
CN103995901A (en) | Method for determining data node failure | |
CN1703027B (en) | Transmitting debugging information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |