The content of the invention
The purpose of the present invention is directed to the defect of prior art, there is provided a kind of disposal operations method and system, so as to realize
Immediately with efficient disposal operations.
To achieve the above object, the invention provides a kind of disposal operations method, methods described includes:
Managing main frame receives the first disposal report frame that extension set first sends, and frame is reported in first disposal includes starting
Send device coding;
The managing main frame judges that the starting sends the address that device coding is extension set first, inquires about extension set first
First room at place;
The device coding of all extension sets second that the managing main frame is inquired about in first room;
The managing main frame broadcast distribution first disposes information release frame, and the first disposal information release frame includes place
Confidence ceases device coding, and the disposal information equipment is encoded to the device coding of extension set first and the device coding of extension set second,
The extension set first and extension set second for being used to receive the first disposal information release frame are set to locate configuration state.
Further, the managing main frame judges that the starting is also wrapped after sending the address that device coding is extension set first
Include, the managing main frame sends the first gate light control frame to the gate light control extensions in room where extension set first.
Further, also include after extension set first and the second extension set place of being set to configuration state:The managing main frame connects
Receive the second disposal report frame that extension set first and extension set second send;The managing main frame is reported according to the described second disposal
Frame is judged as removing disposal information, and the disposal information release frame of broadcast distribution second is used to receive the first disposal information hair
Extension set first of cloth frame and extension set second are set to configuration state at removing.
Further, after the managing main frame receives the second disposal report frame that extension set first and extension set second send
Also include, the managing main frame sends the second gate light control frame to the gate light control extensions in room where extension set first.
Further, also include after the disposal of the managing main frame broadcast distribution second information release frame, the management master
Machine removes the disposal record in first room.
Present invention also offers a kind of disposal operations system, the system includes:
Extension set first, frame is reported for sending the first disposal, and frame is reported in first disposal includes initial transmission equipment
Coding;
Managing main frame, frame is reported for receiving the first disposal that extension set first sends, and judges that the initial transmission equipment is compiled
Code is the address of extension set first, the first room where inquiring about extension set first, all the inquired about in first room
The device coding of extension set two, the disposal information release frame of broadcast distribution first, the first disposal information release frame includes place's confidence
Breath device coding, the disposal information equipment is encoded to the device coding of extension set first and the device coding of extension set second, described
Extension set first is set to locate configuration state according to the first disposal information release frame for receiving;
Extension set second, for receiving the first disposal information release frame, and according to the described first disposal information release frame
It is set to locate configuration state.
Disposal operations method and system of the present invention realizes instant and efficient disposal operations treatment.
Specific embodiment
Below by drawings and Examples, technical scheme is described in further detail.
Fig. 1 is the flow chart of disposal operations embodiment of the method one of the present invention, as illustrated, the present embodiment includes following step
Suddenly:
Step 101, managing main frame receives the first disposal report frame that extension set first sends, and frame is reported in the first disposal to be included
Starting sends device coding;
Step 102, managing main frame judges that starting sends the address that device coding is extension set first, where inquiry extension set first
The first room;
Step 103, the device coding of all extension sets second that managing main frame is inquired about in the first room;
Step 104, the disposal information release frame of managing main frame broadcast distribution first, the first disposal information release frame includes place
Confidence ceases device coding, and disposal information equipment is encoded to the device coding of extension set first and the device coding of extension set second, is used to
The extension set first and extension set second for receiving the first disposal information release frame are set to locate configuration state.
Communications protocol used in the present invention using " frame head+frame length+destination address+source address+sequence number+command word+
The data form of the mode of valid data+verification ".
Former communication format, when reception processing, it is necessary to all receive whole frame data and judged later, process,
Such as:The data of broadcast data, native data or non-native are required for whole reception processings.Really by one of link layer
The division of labor is moved on making.And new communications protocol, can receive data frame before several bytes it may determine that data frame whether
Need to receive, so operate, can not only simplify Serial data receiving program, while facilitating the design of software modularity;
Increase the design of frame head, not only the convenient synchronous judgement for receiving data, while for data communication uses table tennis
The design of the data structure such as Buffer or annular Buffer or F I FO Buffer provides a good condition.
The application of the product in future will merge voice, data and order and be transmitted (even if using many in same network
Channel is communicated, and it is probably unique that interface is also), the frame format that so variable frame length is adapted to various data is exactly necessary, and
And the re-transmission of information in future, breakpoint transmission are possible to.
Equipment defined in new agreement only has managing main frame (merging medical care extension set and managing main frame) and terminal extension set, wherein
The equipment such as terminal extension set, bed head extension, doorway extension set, independent gate light and corridor screen in original system.Will be according in agreement
Equal equipment treatment.
The application of application layer only uses device coding.And link layer communications use physical address.
Communication protocol of the invention includes all kinds of frames, specifically includes such as frame listed in table 1 below frame list of types.
Table 1
Link layer:
FA FA+ frame lengths+destination address+source address+sequence number+starting sends device coding+frame type+data message+school
Test
Application layer:Frame length+device coding+sequence number+starting sends device coding+frame type+data message
Include following content in communications protocol:
Frame head:A beginning for frame is represented, content is FA FA, and frame head length is 2 bytes.
Frame length:Represent including the whole frame including destination address, source address, sequence number, frame type, data message and verification
The byte number of length, frame length domain is 2 bytes, span 3-1028;
Destination address:The receiving terminal address of data frame.
Source address:Data issuing side address.
Sequence number:Equipment produces a sequence number (not including returning to frame), the number when active is initiated once to communicate
According to being 1 byte, Jia 1 from 0--FF circulations.The data are used to determine corresponding return frame;It is corresponding to return to frame and start what is sent
Sequence number is identical, it is ensured that the initiation operation of communication operation has identical sequence number with operation is returned;The initial value is not specified by.Return
Returning frame keeps the content constant;
Starting sends device coding:Extension set returns to this partial content as former state in frame is returned;Managing main frame is according to this
Address determination data is to oneself or forwarding;(acknowledgement frame returns to this data field of frame and the former data phase for receiving
Together);Extension set is used herein the coding of oneself when initiating and once communicating;
Frame type:This frame is represented for what type of frame, frame Type Length is 1 byte.
Data message:The data message of direct expressive function in communication process.
Verification:Since destination address later CRC check value is completed to total data frame;2 bytes
In addition, if having when transmission information with frame head FAH identicals numerical value (including verification and), then after this numerical value
It is the data of 55H that a numerical value is transmitted in face, for example:Frame head is FAFAH, is retransmited after this data if there is FA in data
One data of 55H, the i.e. FA55 of 05 02 6D of FA FA 01 00 (this 55H is interpolation data) C9.This is not 55 in length computation
It is central.But this byte data should be calculated inside when " verification " is calculated.
Fig. 2 is the flow chart of disposal operations embodiment of the method two of the present invention, as illustrated, the present embodiment specifically include it is as follows
Step:
Step 201, extension set first by by disposal button after, detect disposal button, to managing main frame send first
Frame is reported in disposal;
Frame is reported in first disposal includes that starting sends device coding, and the starting sends the volume that device coding is extension set first
Code;
Extension set detects button and sends disposal report frame to managing main frame with rear.
Frame format:FA FA+ frame lengths+host address+source address+sequence number+starting sends device coding+disposal and reports
Order+the machine coding+verification
Step 202, managing main frame returns to acknowledgement frame;Judge that starting sends the address that device coding is extension set first, inquiry
The first room where extension set first, the extension set for having doorway control function to first room sends gate light control frame;
Gate light control frame is that managing main frame sends.
Frame format:FA FA+ frame lengths+destination address+host address+sequence number+starting sends device coding+gate light control
System order+control mode+verification
Wherein:
Device coding:Controlled doorway coding.The equipment with gate light of same room, be according to this coding judgement
No control gate light;
Control mode:
01H:Close gate light
02H:Blue lamp Chang Liang;
03H:It is reserved;
04H:Red light Chang Liang;
05H:Blinking red lamp;
06H:Green light Chang Liang;
07H:Green light flashes;
Step 203, corresponding gate light manages extension set, and acknowledgement frame is returned after reception;
Step 204, the device coding of all extension sets second that managing main frame is inquired about in the first room, managing main frame is according to the
Frame, the disposal information release frame of broadcast distribution first are reported in one disposal.Test needs to show the extension set of disposal information, starts disposal and show
Show.
First disposal information release frame includes disposal information equipment coding, and disposal information equipment is encoded to extension set first
The device coding of device coding and extension set second.
Managing main frame is received after the disposal report of extension set, and release office confidence breath release frame, has in the way of broadcast frame
Showing other extension sets of authority can show the position of nurse or remove disposal information.
Frame format:FA FA+ frame length+FF FF FF FF+ host addresses+sequence number+starting sends device coding+disposal
Information issue order+disposal information operates+disposes information equipment to encode+verification
Disposal information is operated:
01H release offices confidence ceases;
02H removes disposal information:
Disposal information equipment coding is the device coding for receiving disposal key.
The disposal information release frame of this step is release office confidence breath.
Step 205, is set to locate configuration state with the extension set first and extension set second in the first room.
Step 206, managing main frame receives the second disposal report frame that extension set first and extension set second send;
When the first room is in place's configuration state, this step has two kinds of possibilities, and first is second in the first room
Extension set is pressed disposal key again, then sending the second disposal to managing main frame reports frame, or extension set first is pressed again
Disposal key, then send the second disposal and report frame to managing main frame.
Step 207, managing main frame returns to acknowledgement frame;Managing main frame is reported frame and is judged in the first room according to the second disposal
Extension set send again disposal report frame be considered remove disposal;
Step 208, managing main frame sends gate light control frame to the gate light control extensions in the first room;
Step 209, gate light control extensions return to acknowledgement frame;
Step 210, the disposal information release frame of managing main frame broadcast distribution second, and the broadcast frame for removing disposal information;
The disposal information release frame of this step is to remove disposal information.
After step 211, extension set first and extension set second receive the second disposal information release frame, it is set to remove disposal shape
State.Display extension set removes display;Managing main frame also removes the record of first room disposal.
Disposal operations method of the present invention realizes instant and efficient disposal operations treatment.
Fig. 3 is the schematic diagram of disposal operations system of the present invention, as illustrated, the system includes:Managing main frame 1, first
The extension set 22 of extension set 21 and second.
First extension set 21 is used to send the first disposal report frame, and frame is reported in the first disposal includes that initial transmission equipment is compiled
Code.
Managing main frame 1 is used to receive the first disposal report frame that extension set first 21 sends, and judges that starting sends device coding
It is the address of the first extension set 21, the first room where inquiry extension set first, all extension sets second 22 in the first room of inquiry
Device coding, the disposal information release frame of broadcast distribution first, the first disposal information release frame includes disposal information equipment coding,
Disposal information equipment is encoded to 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 according to connecing
The the first disposal information release frame for receiving is set to locate configuration state
Second extension set 22 is used to receive the first disposal information release frame, and is set to place according to the first disposal information release frame
Configuration state.
Professional should further appreciate that, each example described with reference to the embodiments described herein
Unit and algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, hard in order to clearly demonstrate
The interchangeability of part and software, generally describes the composition and step of each example according to function in the above description.
These functions are performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.
Professional and technical personnel can realize described function to each specific application using distinct methods, but this realization
It is not considered that beyond the scope of this invention.
The method that is described with reference to the embodiments described herein can use hardware, computing device the step of algorithm
Software module, or the two combination is implemented.Software module can be placed in random access memory (RAM), internal memory, read-only storage
(ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field
In any other form of storage medium well known to interior.
Above-described specific embodiment, has been carried out further to the purpose of the present invention, technical scheme and beneficial effect
Describe in detail, should be understood that and the foregoing is only specific embodiment of the invention, be not intended to limit the present invention
Protection domain, all any modification, equivalent substitution and improvements within the spirit and principles in the present invention, done etc. all should include
Within protection scope of the present invention.