Summary of the invention
The technical problem to be solved in the present invention provides communication between plates status detection method in a kind of communication system, can be reliably and detect communications status between master control borad and the service board exactly.
The invention provides communication between plates condition detection method in a kind of communication system, promptly in a sense cycle, master control borad timing analysis single board communication state:, show that then this single board communication state is normal if receive the affirmation message of veneer to the communication check bag; If do not receive the affirmation message of veneer to the communication check bag, the add up number of times of not receiving communication check bag acknowledge message and judge the communications status of this veneer according to the higher limit whether this number of times reaches setting shows this single board communication abnormal state if reach higher limit.
Further, in the described sense cycle, if do not receive that veneer is to the affirmation message of communication check bag but the dont answer number of times does not reach the higher limit of setting then continues to send the communication check bag to veneer.
Further, regularly detect the preceding advanced line data configuration of single board communication state, described data configuration comprises detected state, dont answer number of times and higher limit thereof, the communications status that veneer is set;
The process status of described detected state reflection veneer comprises: idle condition, wait acknowledge state, receive response status;
Described dont answer number of times is used to put down in writing does not receive the number of times of veneer to the affirmation message of communication check bag in the sense cycle;
Described communications status is used to write down the communications status of current single board, comprises the normal and communication abnormality of communication.
Further, described idle condition is represented not in the single board communication state-detection cycle;
Described wait acknowledge state representation has sent the communication check bag, but does not also receive the affirmation message of veneer to the communication check bag;
The described response status of receiving represents to receive the affirmation message of veneer to master control borad communication check bag.
Further, between twice sense cycle, keep the spacer segment time.
Further, the data configuration stage also is provided with timed events number of times and higher limit thereof, and described timed events number of times is used to add up the number of times of timed events.
Further, the concrete operations of single board communication state analysis are: if the detected state of veneer is for receiving response status, then the detected state with this veneer changes idle condition into, and changes its communications status into communication normally; If being the wait acknowledge state, the detected state of veneer then the dont answer number of times of this veneer is increased by one, if this number of times reaches predefined higher limit and then the detected state of this veneer changed into idle condition and changes its communications status into communication abnormality; If idle condition is not then done any processing to this veneer, enter the operation of next single board communication state analysis; If the communications status of all veneers all analyzed to finish then waits for timed events, timed events is in the sense cycle to then judging whether.
Further, judge whether that the method that is in the sense cycle is: the detected state that reads all veneers, if the detected state of each veneer is idle condition and illustrates that then this sense cycle finishes, if the detected state of veneer is not in the sense cycle for the idle condition explanation entirely.
Further, if this sense cycle finishes, then carry out following steps: the timed events number of times increases by one, if this number of times is reached for the higher limit of its setting, then starts new sense cycle; If the higher limit that this number of times is not reached for its setting then timed events number of times continues to add up until reaching its higher limit.
Further, the new sense cycle of described startup is meant: change the detected state of all veneers into the wait acknowledge state, the dont answer number of times changes 0 into, the timed events number of times puts 0, and to each veneer transmission communication check bag, and the wait timed events, timed events is in the sense cycle to then judging whether.
In sum, communication between plates status detection method can be reliably and detect communications status between master control borad and the service board exactly in the communication system provided by the invention, and can avoid at present realizing to exist measuring ability to lose efficacy and can not avoiding the single board communication module to cause the not smooth defective of communicating by letter unusually, and can under the unusual situation of communication between plates, initiatively report background management system by management interface by master control borad by hardware.
Embodiment
Below in conjunction with drawings and Examples technical scheme of the present invention is described in detail.
Present embodiment relates to a kind of communication system devices master control borad and single board communication status detection method, and this method is made of the process (or task) of data configuration and timing analysis single board communication state.
Data configuration comprises following variable or fixed value is set: timed events number of times and higher limit thereof; The detected state of each veneer, dont answer number of times and higher limit thereof, communications status, wherein:
The higher limit of timed events number of times can be provided with according to system environments, as is made as 10.Timed events can be produced by timer.
The process status of detected state reflection current detection veneer comprises: idle condition, and expression is not in the single board communication state-detection cycle; The wait acknowledge state, the expression master control borad has sent the communication check bag, but does not also receive the affirmation message of veneer to the communication check bag; Receive response status, the affirmation message of veneer to master control borad communication check bag has been received in expression.
Dont answer number of times record master control borad is not received the number of times of veneer to communication check bag acknowledge message in sense cycle.Its higher limit can be provided with according to system environments, as is made as 6.
Communications status is used to write down the communications status of current single board, and value comprises the normal and two kinds of situations of communication abnormality of communication.
More than configuration is expressed as follows with table 1:
Definition |
Sign |
Initial value |
Detected state |
F1.n |
Idle condition |
The dont answer number of times |
F2.n |
0 |
Communications status |
F3.n |
Communication is normal |
The timed events number of times |
T |
0 |
Suppose that the veneer number is N, N is the natural number more than or equal to 1, and n veneer represented with n.In the table 1, detected state represents that with sign F1.n then F1.1 represents the detected state of first veneer, and F1.2 represents the detected state of second veneer, and F1.n represents the detected state of n veneer.Initial value is idle condition.
The dont answer number of times represents that with sign F2.n promptly F2.1 represents the dont answer number of times of first veneer, and F2.2 represents the dont answer number of times of second veneer, and F2.n represents the dont answer number of times of n veneer.Initial value is 0.
Communications status represents that with sign F3.n promptly F3.1 represents the communications status of first veneer, and F3.2 represents the communications status of second veneer, and F3.n represents the communications status of n veneer.Initial value is normal for communication.
The timed events number of times: the statistics timed events, judge whether sense cycle arrives constantly.The timed events number of times is represented with sign T.Initial value is 0.
Fig. 1 represents regularly to detect the circular treatment flow process of single board communication state, may further comprise the steps:
(1) wait for timed events, timed events is to execution in step (2);
(2) judge whether to be in the sense cycle, be execution in step (3) then, otherwise enter step (4);
Its concrete determination methods is: the detected state F1.n that reads all veneers, and whether all be that idle condition judges whether this sense cycle finishes according to the value of F1.n, be in the sense cycle if not showing, be not in the sense cycle if show.
(3) single board communication state analysis, as shown in Figure 2:
This step needs the communications status analysis of all veneers of circular treatment, successively each piece veneer is carried out following operation:
(a) read the detected state F1.n of this veneer, if F1.n receives that the response status explanation receives the affirmation message of veneer to the communication check bag, execution in step (b); If F1.n is that the wait acknowledge state description is not received the affirmation message of veneer to the communication check bag, then execution in step (c); If idle condition enters step (f).
(b) the detected state F1.n sign with this veneer correspondence changes idle condition into, and it is normal simultaneously this single board communication state F2.n to be revised as communication, enters step (f);
(c) the dont answer number of times F3.n with this veneer adds 1, judges whether this number of times reaches higher limit 6, is execution in step (d) then, otherwise execution in step (e);
(d) the detected state F1.n with this veneer correspondence is revised as idle condition, simultaneously this single board communication state F3.n is revised as communication abnormality, enters step (f);
(e) continue to send the communication check bag, enter step (f) then to this veneer;
(f) judge whether that veneer is not done the communications status analysis in addition, be then to return step (a), otherwise return step (1);
(4) timed events number of times T adds 1, judges whether this timed events number of times T reaches the higher limit 10 of timed events number of times, is execution in step (5) then, otherwise gets back to step (1);
This step is to reach the purpose of a period of time at interval in twice testing process.
(5) start new testing process: the timed events number of times that resets, be about to T and put 0, detected state F1.n is revised as the wait acknowledge state, F2.n is revised as 0 with the dont answer number of times, T is revised as 0 with the timed events number of times, and sends the communication check bag to each veneer, gets back to step (1) then.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.