Line detecting method on frame-type switch business board
Technical field
The present invention relates to line detecting method on a kind of exchange service plate, line detecting method on especially a kind of frame-type switch business board.
Background technology
Frame-type switch, be large enterprise's level switch, comprise a master control borad and multiple business board, master control borad is mainly responsible for the operation such as management and configuration distributing to business board, HG mouth (full name HiGig interface) by backboard between business board and master control borad communicates connection, when inserting after a business board, master control borad will accurately and timely get reaching the standard grade of business board, and it is carried out to the operations such as initialization.
In prior art, be to switch on and determine that as a signal business board reaches the standard grade by hardware, if according to hardware energising as the business board successful foundation of reaching the standard grade, although can determine that business board is in place, but can not ensure that initialization of business board in place completes and can normally work, and can not ensure whether business board in place reaches the standard grade successfully.
Summary of the invention
The technical problem that the present invention need solve is to provide a kind ofly can accurately determine line detecting method on the frame-type switch business board that business board successfully reaches the standard grade.
For solving above-mentioned technical problem, the present invention has designed line detecting method on a kind of frame-type switch business board, and it comprises the following steps:
Step 1: register the second call back function in the bottom of master control borad is registered the first call back function and the linkscan task in the stacking task of master control borad;
Step 2: in the time that business board inserts in cabinet, described business board is powered on, and carry out self initialization and finish the work;
Step 3: judge business board whether self initialization complete, if completed, perform step 4, if do not completed, be considered as abnormal;
Step 4: master control borad bottom calls the first call back function and changes corresponding business board connected HG mouth into upstate by down state by order, becomes up state voluntarily after HG mouth changes upstate into from down state;
Step 5: when HG mouth becomes up state from down state, trigger signal that the second call back function sends successful connection to the stacking task of master control borad, the stacking task of master control borad determines that according to the signal of successful connection business board reaches the standard grade successfully.
Further improve as the present invention, judge whether the business board synchronous task according to being master control borad whether self initialization completes completes the environmental information of collecting business board, if collected, business board self initialization completes, if collected, be considered as abnormal.
Further improve as the present invention, described environmental information comprises business board type, temperature and voltage.
Further improve as the present invention, described the first call back function is " svc_sync_callback " function.
Further improve as the present invention, described the second call back function is " st_ext_linkscan_handler " function.
Further improve as the present invention, the order in step 4 is " port hg enable=true ".
The present invention is just defined as business board and successfully reaches the standard grade after business board energising initialization success, and notify the stacking task of master control borad to have the business board event of successfully reaching the standard grade to occur, the stacking task of master control borad is carried out normal running to business board again according to notification signal, thereby avoids abnormal accident to occur.
Brief description of the drawings
Fig. 1 is the process blocks schematic diagram of line detecting method on frame-type switch business board of the present invention.
Embodiment
In order to make relevant technical staff in the field understand better technical scheme of the present invention, below in conjunction with accompanying drawing and embodiment of the present invention, technical scheme in embodiment of the present invention is clearly and completely described, obviously, described execution mode is only the present invention's part execution mode, instead of whole execution modes.
The invention provides line detecting method on a kind of frame-type switch business board, can detect that business board successfully reaches the standard grade, avoid occurring abnormal problem.
As shown in Figure 1, on frame-type switch business board of the present invention, line detecting method execution mode comprises following step:
Step 1: register the second call back function in the bottom of master control borad is registered the first call back function and the linkscan task in the stacking task of master control borad.Described the first call back function is " svc_sync_callback " function, its objective is after business board self initial work completes, call " port hg enable=true " order and change corresponding business board connected HG mouth into upstate (True) by down state (Flase).The second call back function is st_ext_linkscan_handler function, in the time that the state of HG mouth changes, can trigger the second call back function and send the signal (for example: link up signal) of successful connection to the stacking task of master control borad, the stacking task basis of the master control borad input of successful connection is reached the standard grade successfully to business board.Described linkscan task is a kind of state of at the appointed time interval acquiring port, and calls the wherein mechanism of call back function of carry according to the state variation of port.
Step 2: in the time that business board starts to insert in cabinet, business board is connected with the HG interface of backboard, whole frame-type switch system can be its energising simultaneously, described business board is powered on, and after business board energising, can first carry out self initial work.In the time that business board carries out initial work, the synchronous task of master control borad also can be collected the environmental information of this business board simultaneously, such as business board type, temperature and voltage etc.The information work of the synchronous task collection business board of master control borad completes and shows that new business board self initial work of inserting also completes.
Step 3: judge business board whether self initialization complete, if completed, perform step 4, if do not completed, be considered as extremely, represent that business board powers on unsuccessful, break down, do abnormality processing.In embodiments of the present invention, judge whether the business board synchronous task according to being master control borad whether self initialization completes completes the environmental information of collecting business board, if the synchronous task of master control borad is collected the working properly of environmental information of this business board and is completed, business board self initialization also completes, if collected, be considered as abnormal.
Step 4: after business board initial work completes, master control borad bottom calls the first call back function and changes corresponding business board connected HG mouth into upstate by down state by " port hg enable=true " order, because in the time that business board is not inserted into HG mouth corresponding in backboard, this HG mouth for sky, the state of HG mouth is without state " Flase ", and now, business board inserts, powers on and initial work completes, and can change this HG mouth into upstate by down state at the first call back function of master control borad bottom.After HG mouth changes upstate into, this HG mouth becomes up state from down state voluntarily.
Step 5: when HG mouth becomes up state from down state, described linkscan task can get this variation, simultaneously, the signal (link up) that the second call back function in meeting triggering linkscan task sends successful connection is to the stacking task of master control borad, the stacking task of master control borad determines that according to the signal of successful connection business board reaches the standard grade successfully, detects that business board normally reaches the standard grade.
After definite business board is normally reached the standard grade, the stacking task of master control borad just can be carried out subsequent operation to it.
The present invention inserts after HG mouth at business board, energising, initialization successfully complete and are just defined as business board and normally reach the standard grade, and the stacking task of transmitted signal notice master control borad has the business board event of successfully reaching the standard grade to occur, the stacking task of master control borad is carried out normal running to business board again according to notification signal, thereby avoids abnormal accident to occur.
Below only expressed one embodiment of the present invention, it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.