Summary of the invention
The technical problem to be solved is: the problem existed for prior art, it is provided that one passes through master control
The multi-thread X 2 method of Console Port Management and device.Do by the way of host computer is to main control card Console port transmitting order to lower levels
Switch between main control card processor and line card processor to main control card Console port controlling power, i.e. control main control card
Console port controlling power is switched to line card from main control card, reaches host computer by main control card Console Port detecting line card
Reason device is sent to the data of host computer and detects the state that line card is current, and i.e. when line card breaks down, host computer passes through master control
Card Console port understands the concrete reason of line card.Further, host computer sends master control by main control card Console port
Card Console controller switching signal, by coordinating of line card and main control card, quickly realizes main control card Console port control
Device processed returns to, from line card, the process that main control card controls.Further, reset mode is passed through, it is ensured that when line card goes wrong, main control card
The control of Console port quickly returns to, from line card, the process that main control card controls.
The technical solution used in the present invention is as follows:
One is included by the master control multi-thread X 2 method of console Port Management:
Step 1: main control card and n line card initial setting up so that master control Console port communicates with master control serial ports;Line card
Console port communicates with line card serial ports;Main control card processor is connected by bus mode communication with line card processor, performs step
Rapid 2;n>0;
Step 2: host computer sends main card switching command to main control card processor by main control card Console port;At main control card
When reason device receives main card switching command, main control card processor cuts off main control card by the main handover module of Console port
The connection of Consol port and main control card serial ports, main control card processor is sent by bus mode to touch and signals to specify simultaneously
Line card processor;When the triggering signal that some line card processor sends by receiving main control card processor, line card processes
Device controls line card serial ports by Console port from handover module and passes sequentially through the main handover module of Console port, serial ports transmitting-receiving
Device is connected with main control card Console port, and now main control card Console port passes through the main handover module of Console port, line card
Processor serial port is connected with line card processor, and now host computer is sent by main control card Console Port detecting line card processor
To the data of host computer and detect the state that line card is current.
Further, in described step 2, the main handover module of Console port includes the first analog switch, switch and non-
Door;First analog switch controls end and is connected with main control card processor GPIO port;First analog switch moved end mouth is received by serial ports
Send out device to be connected with main control card Console port;First analog switch first connects end and is connected with the serial ports of main control card processor;The
One analog switch second connects end and is connected end connection with switch first;First analog switch controls end by not gate and on-off control
End connecting valve;Switch the second connection end is connected from handover module with Console port;Described Console port is from switching mould
Block is the second analog switch, and line card processor controls end and the second analog switch controls end and connects, the second analog switch moved end mouth
Being connected with line card processor by line card serial ports, the second analog switch first connects end with the main handover module of Console port even
Connecing, the second analog switch second is connected end and is connected with line card Console port by line card serial ports transceiver;The concrete mistake of step 2
Cheng Shi:
Step 21: host computer sends main card switching command to main control card processor by main control card Console port;At main control card
When reason device receives main card switching command, main control card processor cuts off main control card by the main handover module of Console port
Console port and the connection of main control card serial ports, main control card processor is sent by bus mode to touch and signals to specify simultaneously
Line card processor, wherein main control card processor controls end and controls analog switch and control end and make the first analog switch moved end and the
One analog switch second connects end connection, and main control card processor is controlled end and controlled the control of switch Guan Bi by not gate generation simultaneously
Signal so that switch the first connection end, switch the second connection end connect so that main control card Console port is by switch and the
Two analog switches first connect end and connect;Perform step 22;
Step 22: when the triggering signal that some line card processor sends by receiving main control card processor, line card processes
Device controls end and controls the second analog switch control end so that the second analog switch moved end mouth and first connects end and connects;So that
Obtain main control card Console port to pass sequentially through at the first analog switch, switch, the second analog switch and line card serial ports and line card
Reason device connects, and now host computer is sent to the data of host computer by main control card Console Port detecting line card processor and is examined
The state that survey line card is current.
Further, after described step 2, also include that the main handover module of step 3:Console port also includes or door (figure
Or Gate in 1);Main control card processor interruptive port passes through or door controls end with line card processor and is connected;Host computer is by main
Control card Console port sends and switches back into master control order to line card processor from card;Line card processor receives from card switching life
When making, line card processor cuts off the company of main control card Console port and line card serial ports by Console port from handover module
Connect so that line card serial ports is connected with line card Console port;Isochrone Card processor output pulse signal processes to main control card
Device;Line card processor serial port disconnects with main control card Console port, and main control card processor receives the pulse that line card sends
During signal, main control card processor controls main control card serial ports and passes sequentially through the main handover module of Console port and main control card Console
Port connects, and now main control card Console port is controlled by main control card processor.
Further, described step 3 main control card Console port by master control Card processor concrete processor process is: on
Position machine switches back into master control order by the transmission of main control card Console port from card and receives to line card processor, line card processor
When card switching command, line card processor control end control second analog switch control end make the second analog switch moved end mouth with
Switch second connection end port connect, i.e. main control card Console port disconnects with line card processor so that line card serial ports and
Line card Console port connects;Line card processor receives when card switching command, and line card processor passes through or door is to main control card
Processor is from card switching signal, and main control card processor middle port receives when card switching signal, and main control card processor controls end
The control end switched by non-gate control so that switch the first connection end is connected end with switch second and disconnects, master control simultaneously
Card processor controls end and controls the first analog switch control end so that the first analog switch moved end is connected end and connects with first, i.e.
Main control card Console port is connected with main control card serial ports, then main control card Console port is connected with main control card processor, now
Main control card Console port is controlled by master control Card processor.
After described step 3, also include step 4: when certain line card because line card processor system delays machine and line card Console
Port without any response, is then controlled by the button (push butten) of main control card, forces to cut by Console control
Gain main control card;Main control card processor controls main control card Console port and communicates with main control card.
One includes main control card processor, main Console port mould by the master control many cable fastener devices of Console Port Management
Block, the main handover module of Console port, line card processor, line card Console port module and Console port are from switching
Module;The main handover module of Console port includes main control card Console port and main control card serial ports transceiver (Master
UART Transciever in card);Console port includes line card Console port and line card string from handover module
Mouth transceiver (the UART Transciever in Line card n);Host computer sends main card by main control card Console port
Switching command is to main control card processor;When main control card processor receives main card switching command, main control card processor passes through
The main handover module of Console port cuts off the connection of main control card Console port and main control card serial ports, main control card processor simultaneously
Sent by bus mode and touch the line card processor signaling to specify;When some line card processor is by receiving main control card
During the triggering signal that processor sends, line card processor controls line card serial ports by Console port from handover module and leads to successively
Cross the main handover module of Console port, serial ports transceiver is connected with main control card Console port, now main control card Console end
Mouth is connected with line card processor by the main handover module of Console port, line card processor serial port, and now host computer passes through master control
Card Console Port detecting line card processor is sent to the data of host computer and detects the state that line card is current;Master control Console
Port communicates with master control serial ports;Line card Console port communicates with line card serial ports;Main control card processor passes through with line card processor
Bus mode communication connects.
Further, the described main handover module of Console port include the first analog switch (moved end, two motionless
End and one control end), switch and not gate;First analog switch controls end and main control card processor GPIO(GPIO0 end
Mouthful) port connection;First analog switch moved end mouth is connected with main control card Console port by serial ports transceiver;First simulation
Switch the first connection end is connected with the serial ports of main control card processor;First analog switch second connects end and is connected end with switch first
Connect;First analog switch controls end by not gate and switch control terminal connecting valve;Switch the second connection end and Console end
Mouth connects from handover module;Described Console port is the second analog switch from handover module, and line card processor controls end and the
Two analog switches control end and connect, and the second analog switch moved end mouth is connected with line card processor by line card serial ports, the second simulation
Switch the first connection end handover module main with Console port is connected, and the second analog switch second connects end by line card serial ports
Transceiver is connected with line card Console port;Host computer is sent to by main control card Console Port detecting line card processor
The position data of machine also detect the line card concrete processing procedure of current state and are:
Step 21: host computer sends main card switching command to main control card processor by main control card Console port;At main control card
When reason device receives main card switching command, main control card processor cuts off main control card by the main handover module of Console port
Console port and the connection of main control card serial ports, main control card processor is sent by bus mode to touch and signals to specify simultaneously
Line card processor, wherein main control card processor controls end and controls analog switch and control end and make the first analog switch moved end and the
One analog switch second connects end connection, and main control card processor is controlled end and controlled the control of switch Guan Bi by not gate generation simultaneously
Signal so that switch the first connection end, switch the second connection end connect so that main control card Console port is by switch and the
Two analog switches first connect end and connect;Perform step 22;
Step 22: when the triggering signal that some line card processor sends by receiving main control card processor, line card processes
Device controls end and controls the second analog switch control end so that the second analog switch moved end mouth and first connects end and connects;So that
Obtain main control card Console port to pass sequentially through at the first analog switch, switch, the second analog switch and line card serial ports and line card
Reason device connects, and now host computer is sent to the data of host computer by main control card Console Port detecting line card processor and is examined
The state that survey line card is current.
Further, described host computer is sent to host computer by main control card Console Port detecting line card processor
Data after detecting the state that line card is current, main control card Console port controlling was weighed when line card switches to main control card,
The main handover module of Console port also includes or door;Main control card processor interruptive port passes through or door controls with line card processor
End connects;Concrete processing procedure is: host computer is sent by main control card Console port and processes to line card from card switching command
Device;Line card processor receives when card switching command, and line card processor cuts off master control by Console port from handover module
Card Console port and the connection of line card serial ports so that line card serial ports is connected with line card Console port;Line card processes simultaneously
Device output pulse signal is to main control card processor;Line card processor serial port disconnects with main control card Console port, main control card
When processor receives the pulse signal that line card sends, main control card processor controls main control card serial ports and passes sequentially through Console end
The main handover module of mouth is connected with main control card Console port, and now main control card Console port is controlled by main control card processor.
Further, described main control card Console port is controlled detailed process by main control card processor and is: host computer passes through
Main control card Console port sends from card switching command to line card processor, and line card processor receives when card switching command,
Line card processor control end controls the second analog switch control end and makes the second analog switch moved end mouth be connected end with switch second
Port connects, i.e. main control card Console port disconnects with line card processor so that line card serial ports and line card Console end
Mouth connects;Line card processor receives when card switching command, line card processor by or door cut from card to main control card processor
Changing signal, main control card processor middle port receives when card switching signal, and main control card processor controls end by non-gate control
The control end of switch so that switch the first connection end is connected end with switch second and disconnects, and main control card processor controls simultaneously
End controls the first analog switch and controls end so that the first analog switch moved end is connected end and connects with first, i.e. main control card Console
Port is connected with main control card serial ports, then main control card Console port is connected with main control card processor.
Further, described main control card Console port controlling is weighed after line card switches to main control card, if when certain line card
Because line card processor system delays machine, line card Console port is without any response, then be controlled by the button of main control card, will
Console control forces to switch back into main control card;;Main control card processor controls main control card Console port and communicates with main control card.
In sum, owing to have employed technique scheme, the invention has the beneficial effects as follows:
1, it is mainly by Console port main switching mould, Console port from switching the first analog switch of mould, the second mould
Intend switch and switch etc. to coordinate, complete the main control card usufructuary conversion of Console port, i.e. control main control card Console end
Mouth control is switched to line card from main control card, reaches host computer and is sent by main control card Console Port detecting line card processor
To the data of host computer and detect the state that line card is current, i.e. when line card breaks down, host computer passes through main control card Console
Port understands the concrete reason of line card.
2, host computer sends main control card Console controller switching signal by main control card Console port, passes through line card
With coordinating of main control card, quickly realize main control card Console port controller from line card return to main control card control process.
3, by push button button reset mode, it is ensured that when line card goes wrong, main control card Console port
Control quickly returns to main control card control from line card, simple to operation.
Detailed description of the invention
All features disclosed in this specification, or disclosed all methods or during step, except mutually exclusive
Feature and/or step beyond, all can combine by any way.
Any feature disclosed in this specification, unless specifically stated otherwise, all can by other equivalence or there is similar purpose
Alternative features is replaced.I.e., unless specifically stated otherwise, an example during each feature is a series of equivalence or similar characteristics
?.
Related description of the present invention:
1, main controller processor (in Fig. 1, the CPU of Master card) possesses bus mode, if line card possesses bus mode,
Need not the bus extender in the external world, when sending data such as main control card by I2C bus, if line card possesses I2C bus and processes energy
Power, then need not extra bus extender, if line card does not possess I2C bus disposal ability, then needs to process at main controller
A bus I/O expander (such as model is PCA9555's) etc. is added between device and line card processor.
2, analog switch control end refers to control analog switch movable end and two those ports connected in ends connect.
Such as model is CD4066.
3, switch control terminal controls switch one connection end and whether is connected end with another and connects and be also off.
Processing procedure is:
Step 1: original state is arranged: the control of main control card Console port is controlled by main control card processor;Line card
On line card console port be to be controlled by line card processor.
A. in main control card (Master card): main control card processor controls end GPIO0=1;Then the first analog switch
(Analog switch1) is in main control card Console port (the Console port in Fig. 1) and communicates shape with master control UART interface
State;Analog switch (Analog switch 2) is in open state (off-state).
B. in line card (Line card1, Line card2 or Line card3 etc.): the control end GPIO0 of line card processor
=0;Second analog switch (Analog switch 0) is in the Local in line card serial ports and Ben Ka Console(Fig. 1
Console) attached state.
Step 2: host computer sends main card switching command so that main control card console control transfers to line card from main control card
Control, i.e. main control card Console disconnects and being connected with line card processor.
A. in main control card: main control card processor GPIO0=0;Then the first analog switch (Analog switch1) is in master
Control card Console port and master control serial ports off-state, main control card Console port and analog switch (Analog switch
2) communicate;Analog switch (Analog switch 2) is in close state (closure state).
B. in line card: main control card processor by I2C bus arrange the IO position on the PCA9555 on certain bracing cable card (its with
Line card CPU INT0 is connected) put a positive pulse, after line card processor detection INT0 rising edge triggers, in line card processor
GPIO0 is set to 1 by disconnected processing routine, and line card processor controls the second analog switch (Analog switch 0) and realizes at line card
Reason device serial ports is connected with master control console port.
Step 3: host computer sends main card switching command so that main control card console control transfers to main control card from line card
Control:
A. in line card: host computer is sent from card switching signal to line card processor by main control card Console port;Line card processes
Device receives when card switching signal, and line card processor (GPIO1 port) exports 1 positive pulse to main control card processor, line card
Processor controls end (GPIO0 port) and sets to 0, then the second analog switch (Analog switch0) realizes line card serial ports and master control
Console disconnects, and line card serial ports is connected with this line card Console, completes this line card Console port and line card processor serial port
Connect.
B. main control card: main control card processor interruptive port (INT0) receives and passes through or the positive pulse of door from line card processor
After, positive pulse rising edge triggers main control card processor and produces interruption, by main control card in main control card processor interrupt handling routine
Reason device controls end (GPIO0 port) and puts 1, and switch 2 is in open state (off-state), the first analog switch (Analog
Switch1) main control card processor serial port is connected with main control card console port so that the main control card Console port right to use
Switch back on main control card.
Step 4: if after the main control card Console port right to use is switched to line card, line card is because machine delayed by line card processor and leads
Control card Console port, without any response, (can be connected with main control card processor GPIO1 by the reset key of main control card
Switch) press 5 seconds after, main control card processor reset port (GPIO1 port) receive low level and record low level maintain time
Between, if if 5 seconds, then main control card processor GPIO1 port is put 1, the first analog switch 1 is in main control card Console end
Mouth and master control serial ports communicating state;Switch (Analog switch 2) is in open state (off-state).Thus can be by master
The right to use of control card Console port switches back on master control borad.
The invention is not limited in aforesaid detailed description of the invention.The present invention expands to any disclose in this manual
New feature or any new combination, and the arbitrary new method that discloses or the step of process or any new combination.