Summary of the invention
The object of the invention is the defect for prior art, a kind of disposal operations method and system is provided, thereby realize instant and efficient disposal operations.
For achieving the above object, the invention provides a kind of disposal operations method, described method comprises:
Management host receives the first disposal report frame that extension set first sends, and described first disposes report frame comprises initial transmitting apparatus coding;
Described management host judges that described transmitting apparatus is encoded to the address of extension set first, inquires about first room at described the first extension set place;
Described management host is inquired about the device coding of all extension set second in described the first room;
Described management host broadcast distribution the first disposes of information release frame, described the first disposes of information release frame comprises disposes of information device coding, the device coding that described disposes of information device coding is extension set first and the device coding of extension set second, be set to disposal state in order to the described extension set first and the extension set second that receive described the first disposes of information release frame.
Further, described management host judges after described transmitting apparatus is encoded to the address of extension set first and also comprises, described management host sends the first gate light control frame to the gate light control extensions in described the first room, extension set place.
Further, described extension set first and extension set second are set to also comprise after disposal state: described management host receives second of described extension set first and extension set second transmission and disposes report frame; Described management host is disposed report frame according to described second and is judged as removing disposes of information, and broadcast distribution the second disposes of information release frame, is set to remove disposal state in order to the described extension set first and the extension set second that receive described the first disposes of information release frame.
Further, described management host receives after report frame is disposed in second of described extension set first and extension set second transmission and also comprises, described management host sends the second gate light control frame to the gate light control extensions in described the first room, extension set place.
Further, after described management host broadcast distribution the second disposes of information release frame, also comprise, described management host is removed the disposal record in described the first room.
The present invention also provides a kind of disposal operations system, and described system comprises:
Extension set first, reports frame for sending the first disposal, and described first disposes report frame comprises initial transmitting apparatus coding;
Management host, the the first disposal report frame sending for receiving extension set first, judge that described transmitting apparatus is encoded to the address of extension set first, inquire about first room at described the first extension set place, inquire about the device coding of all extension set second in described the first room, broadcast distribution the first disposes of information release frame, the device coding that described disposes of information device coding is extension set first and the device coding of extension set second, described extension set first is set to disposal state according to the first disposes of information release frame receiving;
Extension set second, for receiving described the first disposes of information release frame, and is set to disposal state according to described the first disposes of information release frame.
Disposal operations method and system of the present invention has been realized instant and efficient disposal operations processing.
Embodiment
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Fig. 1 is the flow chart of disposal operations embodiment of the method one of the present invention, and as shown in the figure, the present embodiment comprises the steps:
Step 101, management host receives the first disposal report frame that extension set first sends, and first disposes report frame comprises initial transmitting apparatus coding;
Step 102, management host judges that transmitting apparatus is encoded to the address of extension set first, first room at inquiry the first extension set place;
Step 103, management host is inquired about the device coding of all extension set second in the first room;
Step 104, management host broadcast distribution the first disposes of information release frame, the first disposes of information release frame comprises disposes of information device coding, disposes of information device coding is the device coding of extension set first and the device coding of extension set second, is set to disposal state in order to the extension set first and the extension set second that receive the first disposes of information release frame.
Communications protocol used in the present invention adopts the data format of " mode of frame head+frame length+destination address+source address+sequence number+command word+valid data+verification ".
Former communication format, in reception & disposal, must all receive after whole frame data and judge, processes, and such as broadcast data, this machine data or the data of non-the machine all need whole reception & disposals.Actual is in the part work of link layer, to have moved.And new communications protocol can just can judge whether Frame needs to receive in front several bytes of receiving data frames, operation, not only can simplify Serial data receiving program like this, facilitates the design of software modularity simultaneously;
Increase the design of frame head, the not only convenient synchronous judgement that receives data adopts the design of the data structures such as table tennis Buffer or annular Buffer or FIFO Buffer that a good condition is provided simultaneously for data communication.
The application of product in the future will merge voice, data and order and in same network, transmit (even if use multichannel communication, interface is also possible be unique), it is exactly necessary that variable like this frame length is applicable to the frame format of several data, and in the future information re-transmission, breakpoint transmission just likely.
The equipment defining in New Deal only has management host (merge medical care extension set and management host) and terminal extension set, and wherein terminal extension set comprises the equipment such as bed head extension, doorway extension set, independent gate light and corridor screen in original system.In agreement by the device processes according to equal.
The application of application layer is only used device coding.And link layer communications is used physical address.
Communication protocol of the present invention comprises all kinds of frames, specifically comprises as listed frame in following table 1 frame type list.
Table 1
Link layer:
FA FA+ frame length+destination address+source address+sequence number+initial transmitting apparatus coding+frame type+data message+verification
Application layer: frame length+device coding+sequence number+initial transmitting apparatus coding+frame type+data message
Comprise following content in communications protocol:
Frame head: represent the beginning of a frame, content is FA FA, and frame head length is 2 bytes.
Frame length: represent the byte number of the whole frame length including destination address, source address, sequence number, frame type, data message and verification, frame length territory is 2 bytes, span 3-1028;
Destination address: the receiving terminal address of Frame.
Source address: data issuing side address.
Sequence number: equipment produces a sequence number (do not comprise and return to frame) in initiatively initiating a communication, and these data are 1 byte, adds 1 from 0--FF circulation.These data are for determining the corresponding frame that returns; Corresponding return to frame and to start the sequence number sending identical, the initiation operation of guaranteeing communication operation has identical sequence number with returning to operate; This initial value does not specify.Returning to frame keeps this content constant;
Initial transmitting apparatus coding: extension set returns to this part content returning to former state in frame; Management host is to own or forwarding according to this address determination data; (acknowledgement frame or return to this data field of frame identical with the former data that receive); Extension set uses the coding of oneself here in initiating a communication;
Frame type: why type represent this frame frame, frame type length is 1 byte.
Data message: the data message of direct expressive function in communication process.
Verification: start to complete later CRC check value to total data frame from destination address; 2 bytes
In addition, if there is the numerical value identical with frame head FAH (comprise verification and) when transmission information, after this numerical value, transmit the data that a numerical value is 55H, for example: frame head is FAFAH, if there is FA in data, after these data, send again the data of a 55H, i.e. FA FA 05 02 6D 01 00 FA55 (this 55H is for adding data) C9.This is not 55 in the middle of length computation.But this byte data should be calculated inside in the time calculating " verification ".
Fig. 2 is the flow chart of disposal operations embodiment of the method two of the present invention, and as shown in the figure, the present embodiment specifically comprises the steps:
Step 201, extension set first detects disposal button after being pressed to and disposing button, sends first dispose report frame to management host;
First disposes report frame comprises initial transmitting apparatus coding, and this transmitting apparatus is encoded to the coding of extension set first;
Extension set detects that button sends and disposes report frame to management host with rear.
Frame format: FA FA+ frame length+host address+source address+sequence number+initial transmitting apparatus coding+dispose and report the coding+verification of order+the machine
Step 202, management host returns to acknowledgement frame; Judge that transmitting apparatus is encoded to the address of extension set first, inquire about first room at described the first extension set place, the extension set to this first room with doorway control function sends gate light control frame;
Gate light control frame is that management host sends.
Frame format: FA FA+ frame length+destination address+host address+sequence number+initial transmitting apparatus coding+gate light control command+control mode+verification
Wherein:
Device coding: controlled doorway coding.The equipment with gate light of same room, judges whether to control gate light according to this coding;
Control mode:
01H: close gate light
02H: blue lamp Chang Liang;
03H: reserved;
04H: red light Chang Liang;
05H: blinking red lamp;
06H: green light Chang Liang;
07H: green light flicker;
Step 203, corresponding gate light management extension set, returns to acknowledgement frame after reception;
Step 204, management host is inquired about the device coding of all extension set second in the first room, and management host is reported frame, broadcast distribution the first disposes of information release frame according to the first disposal.Test need to show the extension set of disposes of information, starts to dispose to show.
The first disposes of information release frame comprises disposes of information device coding, and disposes of information device coding is the device coding of extension set first and the device coding of extension set second.
Management host is issued disposes of information release frame in the mode of broadcast frame after receiving the disposal report of extension set, has other extension sets that show authority can show nurse's position or remove disposes of information.
Frame format: FA FA+ frame length+FF FF FF FF+ host address+sequence number+initial transmitting apparatus coding+disposes of information issue an order+disposes of information operation+disposes of information device coding+verification
Disposes of information operation:
01H issues disposes of information;
02H removes disposes of information:
Disposes of information device coding is to receive the device coding of disposing key.
The disposes of information release frame of this step is to issue disposes of information.
Step 205, the extension set first and the extension set second that coexist in the first room are set to disposal state.
Step 206, management host receives second of described extension set first and extension set second transmission and disposes report frame;
When the first room is in the time disposing state, this step has two kinds of possibilities, the firstth, the disposal key that is again pressed of the extension set second in the first room, send second to management host and dispose report frame, or the first extension set disposal key that is again pressed, send second to management host and dispose and report frame.
Step 207, management host returns to acknowledgement frame; Management host is reported frame according to the second disposal and judge that extension set in the first room sends to dispose again and report frame and think to remove disposal;
Step 208, management host sends gate light control frame to the gate light control extensions in the first room;
Step 209, gate light control extensions returns to acknowledgement frame;
Step 210, management host broadcast distribution the second disposes of information release frame, and the broadcast frame of removing disposes of information;
The disposes of information release frame of this step is to remove disposes of information.
Step 211, extension set first and extension set second receive after the second disposes of information release frame, are set to remove disposal state.Show that extension set removing shows; Management host is also removed the record that this first room is disposed.
Disposal operations method of the present invention has realized instant and efficient disposal operations processing.
Fig. 3 is the schematic diagram of disposal operations system of the present invention, and as shown in the figure, described system comprises: management host 1, the first extension set 21 and the second extension set 22.
The first extension set 21 is reported frame for sending the first disposal, and first disposes report frame comprises initial transmitting apparatus coding.
The first disposal report frame that management host 1 sends for receiving the first extension set 21, judge that transmitting apparatus is encoded to the address of the first extension set 21, inquire about first room at the first extension set place, inquire about the device coding of all the second extension sets 22 in the first room, broadcast distribution the first disposes of information release frame, disposes of information device coding is the device coding of the first extension set 21 and the device coding of the second extension set 22, and the first extension set 21 is set to disposal state according to the first disposes of information release frame receiving.
The second extension set 22 is for receiving the first disposes of information release frame, and is set to disposal state according to the first disposes of information release frame.
Professional should further recognize, unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with electronic hardware, computer software or the combination of the two, for the interchangeability of hardware and software is clearly described, composition and the step of each example described according to function in the above description in general manner.These functions are carried out with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can realize described function with distinct methods to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
The software module that the method for describing in conjunction with embodiment disclosed herein or the step of algorithm can use hardware, processor to carry out, or the combination of the two is implemented.Software module can be placed in the storage medium of any other form known in random asccess memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Above-described embodiment; object of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the foregoing is only the specific embodiment of the present invention; the protection range being not intended to limit the present invention; within the spirit and principles in the present invention all, any amendment of making, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.