CN208819201U - A kind of two machine communication structure - Google Patents
A kind of two machine communication structure Download PDFInfo
- Publication number
- CN208819201U CN208819201U CN201821789404.3U CN201821789404U CN208819201U CN 208819201 U CN208819201 U CN 208819201U CN 201821789404 U CN201821789404 U CN 201821789404U CN 208819201 U CN208819201 U CN 208819201U
- Authority
- CN
- China
- Prior art keywords
- host
- event
- slave
- machine
- communication structure
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
This application discloses a kind of two machine communication structures, comprising: for sending the host of event read requests to slave;It is connected by data line with the host, for sending the slave of event response result to the host;Be provided between the host and the slave for the host send in the slave there are the event of the notification information of event to be read notify line.Two machine communication structure provided by the present application is on the basis of original communication construction, increase an event between host and slave and notifies line, when slave needs to notify host there are event to be read, it can be by notifying event the processing of line to reach the purpose of notice host in time, host can send event read requests to slave.It can be seen that two machine communication structure host provided by the present application is only responsible for inquiry, and slave is only responsible for response, improves the communication efficiency between two-shipper, simplifies communication logic.
Description
Technical field
This application involves field of computer technology, more specifically to a kind of two machine communication structure.
Background technique
Multiple person cooperational internet of things product and embedded product generally there are host and slave, communication mode is usual
To receive and dispatch mutually, i.e., host initiates request, and receives the response of slave, while when slave has message to want to tell host, actively
It is sent to host request, and waits response of host.
Above-mentioned communication mode principal and subordinate both sides are required to the package requested and responded when package.Meanwhile Shuan Fangdou
It needs to unpack the response bag of other side, code logic is complicated, no principal and subordinate's logical relation, and transport protocol is unintelligible, it has not been convenient to
End item maintenance and work handover.
Therefore, the communication efficiency between two-shipper how is improved, simplifying communication logic is that those skilled in the art need to solve
The technical issues of.
Utility model content
The application's is designed to provide a kind of two machine communication structure, improves the communication efficiency between two-shipper, simplifies
Communication logic.
To achieve the above object, this application provides a kind of two machine communication structures, comprising:
For sending the host of event read requests to slave;
It is connected by data line with the host, for sending the slave of event response result to the host;
It is provided between the host and the slave for into the host transmission slave, there are things to be read
The event of the notification information of part notifies line.
Wherein, the event notice line is specially when there are IO controls when event to be read for high level in the slave
Line.
Wherein, it is applied to Story machine, the host is specially the controller in the Story machine, and the slave is specially institute
Stating in Story machine whether there is the peripheral drive module of the event to be read for detecting peripheral components.
Wherein, the peripheral components include any one of a point card reading module, motion motor and head touch inductor or
Appoint several combinations.
Wherein, the motion motor is specially two direct current generators, and the peripheral drive module passes through IO control line and institute
Direct current generator is stated to be connected.
Wherein, it is applied to Story machine, the host is specially the controller in the Story machine, and the slave is specially institute
Stating in Story machine whether there is the audio frequency control module of the event to be read for detecting audio parts.
Wherein, the audio parts include appointing in loudspeaker, sound pick-up, RAM card, cache module, FLASH and key
One or appoint several combinations.
Wherein, the RAM card and the cache module are connected by SPI with the audio frequency control module.
Wherein, the FLASH is connected by SDIO interface with the audio frequency control module.
By above scheme it is found that a kind of two machine communication structure provided by the present application, comprising: for sending event to slave
The host of read requests;It is connected by data line with the host, for being sent described in event response result to the host
Slave;It is provided with that there are events to be read for sending in the slave to the host between the host and the slave
The event of notification information notifies line.
Two machine communication structure provided by the present application increases by one on the basis of original communication construction between host and slave
Event notifies line, when slave needs to notify host there are event to be read, can pass through and notify the processing of line to reach event
The purpose of notice host in time, host can send event read requests to slave.It can be seen that two machine communication provided by the present application
Structure host is only responsible for inquiry, and slave is only responsible for response, improves the communication efficiency between two-shipper, simplifies communication logic.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of architecture diagram of two machine communication structure disclosed in the embodiment of the present application;
Fig. 2 is a kind of structure chart of Story machine disclosed in the embodiment of the present application.
Specific embodiment
The following will be combined with the drawings in the embodiments of the present invention, carries out the technical scheme in the embodiment of the utility model
Clearly and completely describe, it is clear that the described embodiments are only a part of the embodiments of the utility model, rather than whole
Embodiment.Based on the embodiments of the present invention, those of ordinary skill in the art are without creative efforts
Every other embodiment obtained, fall within the protection scope of the utility model.
Conventionally, as the communication mode received and dispatched mutually is used between host and slave, no principal and subordinate's logical relation,
Transport protocol is unintelligible, causes communication logic complicated.Therefore, the application increases an event notice between host and slave
Line can be by notifying event the processing of line to reach notice master in time when slave needs to notify host there are event to be read
The purpose of machine.Host is only responsible for inquiry, and slave is only responsible for response, improves the communication efficiency between two-shipper, simplifies communication
Logic.
The embodiment of the present application discloses a kind of two machine communication structure, improves the communication efficiency between two-shipper, simplifies logical
Believe logic.
Referring to Fig. 1, a kind of architecture diagram of two machine communication structure disclosed in the embodiment of the present application, as shown in Figure 1, comprising:
For sending the host 100 of event read requests to slave 200;
It is connected by data line 10 with the host 100, for being sent described in event response result to the host 100
Slave 200;
Be provided between the host 100 and the slave 200 for sent in the slave to the host exist to
The event of the notification information of reading event notifies line 20.
In specific implementation, host 100 can by data line to slave 200 send event read requests, slave 200
It is responded according to the event read requests, and event response result is returned to host 100 by data line.
It should be noted that the present embodiment does not limit the data transfer mode between host and slave, it can be asynchronous string
Row communication, asynchronous parallel communication, synchronous serial communication simultaneously and concurrently communicate, i.e., the present embodiment is unlimited determines the specific of data line 10
Quantity, as long as guaranteeing to increase an event notice line 20 between host 100 and slave 200, all in the protection model of the present embodiment
In enclosing.
Event notifies that line 20 is specially an IO control line, can need to notify master there are event to be read in slave 200
Host 100 is notified when machine 100 in time.Event notice line 20 is specially to deposit when in the slave as a preferred implementation manner,
It is the IO control line of high level in event to be read.Event notifies to indicate that there are host 100 is unread when line 20 is high level
Event to be read, event notice line 20 indicates that slave 200 has new event wait host to be read when having a rising edge jump
It reads.
When it is empty that slave 200, which has new event to be read and notification queue, event notifies line 20 by initial low level
Become high level, host 100 can initiated event inquiry request, event notice line 20 is always maintained at high electricity when host 100 does not take
It is flat, after the event to be read in slave 200 is read, event notice line 20 is reverted into low level.When slave 200 has
When new event to be read and notification queue is non-empty, event notifies line 20 extensive again after too low pulse by initial high level
Again to high level, the low burst length can be 2ms.
Two machine communication structure provided by the embodiments of the present application is on the basis of original communication construction, between host and slave
Increase an event notice line, when slave needs to notify host there are event to be read, the place to event notice line can be passed through
Reason reaches the purpose of notice host in time, and host can send event read requests to slave.It can be seen that provided by the present application double
Machine communication structure host is only responsible for inquiry, and slave is only responsible for response, improves the communication efficiency between two-shipper, simplifies communication
Logic.
Below by taking Story machine as an example, the Application Example of two machine communication structure provided by the present application is introduced.It is specific:
Referring to fig. 2, a kind of structure chart of Story machine disclosed in the embodiment of the present application, as shown in Fig. 2, including controller 201
(CP module), audio frequency control module 202 (AP module) and peripheral drive module 203 (EXT MCU).Wherein, controller is used for
The connection of WIFI and the main business logic of Story machine, are specifically as follows EMW3080BP.
Audio frequency control module 202 is specifically as follows MX1200 for detecting audio parts with the presence or absence of event to be read.
When audio frequency control module 202 detects that audio parts there are when event to be read, are then buffered in local, while event being driven to notify
Line, there are events to be read for signal, and controller 201 can be notified at once at this time, i.e., transmittable event read requests, by sound
The event cached in frequency control module 202 is taken away.
Audio parts include loudspeaker, sound pick-up, RAM card, cache module, FLASH and key etc..The loudspeaker can be with
Specially SPEEKER is driven using BL6306 High-power amplifier, and by DAC, (Chinese name: digital analog converter, English are complete
Claim: Digital to analog converter) it is connected with audio frequency control module.Sound pick-up can be specially MIC, be responsible for sound
Sound picks up, and is connected by SPI with audio frequency control module.RAM card can be specially the RAM card that TF-CARD is system, realize sound
Frequency file storage and local firmware upgrade functionality, are connected by SPI with audio frequency control module.FLASH leads to for storing firmware
SDIO interface is crossed to be connected with audio frequency control module.Key may include broadcasting/pause button, AI intercom push key, wechat message by
Key etc., audio frequency control module 202 are read by the real-time of implement of interruption function key, pass through ADC key range source.
Peripheral drive module 203 is specifically as follows for detecting peripheral components with the presence or absence of the event to be read
STM8S003.Peripheral drive module 203 also wants moment monitoring outer other than receiving the LED control command that controller 201 is sent
Peripheral device is buffered in local if monitoring card reader or touch key-press event, while event being driven to notify line, signal
Have that event is unread, controller 201 can be notified at once at this time, i.e., transmittable inquiry instruction, by peripheral drive module 203
The event of middle caching is taken away.
Peripheral components may include a card reading module, motion motor and head touch inductor etc..Point card reading module is one
A picture point read head utilizes 2 line serial communications, nonstandard protocol.Unique ID of special card can be read, handed over for game
Mutually.Motion motor is 2 direct current generators, is controlled using motor drive ic by 2 IO, can make system front, rear, left and right with
And movement of turn-taking.Head touch inductor is a sheet metal, by touching chip, is notified in the form of interruption to peripheral driver
Module 203.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For system disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration
?.It should be pointed out that for those skilled in the art, under the premise of not departing from the application principle, also
Can to the application, some improvement and modification can also be carried out, these improvement and modification also fall into the protection scope of the claim of this application
It is interior.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that
A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.
Claims (9)
1. a kind of two machine communication structure characterized by comprising
For sending the host of event read requests to slave;
It is connected by data line with the host, for sending the slave of event response result to the host;
It is provided with that there are events to be read for sending in the slave to the host between the host and the slave
The event of notification information notifies line.
2. two machine communication structure according to claim 1, which is characterized in that the event notice line is specially to work as the slave
The middle IO control line there are when event to be read for high level.
3. two machine communication structure according to claim 1 or claim 2, which is characterized in that be applied to Story machine, the host is specially
Controller in the Story machine, the slave be specially in the Story machine for detect peripheral components with the presence or absence of it is described to
The peripheral drive module of reading event.
4. two machine communication structure according to claim 3, which is characterized in that the peripheral components include point card reading module, fortune
Dynamic any one of motor and head touch inductor appoint several combinations.
5. two machine communication structure according to claim 4, which is characterized in that the motion motor is specially two direct currents
Machine, the peripheral drive module are connected by IO control line with the direct current generator.
6. two machine communication structure according to claim 1 or claim 2, which is characterized in that be applied to Story machine, the host is specially
Controller in the Story machine, the slave be specially in the Story machine for detect audio parts with the presence or absence of it is described to
The audio frequency control module of reading event.
7. two machine communication structure according to claim 6, which is characterized in that the audio parts include loudspeaker, sound pick-up,
Any one of RAM card, cache module, FLASH and key appoint several combinations.
8. two machine communication structure according to claim 7, which is characterized in that the RAM card and the cache module pass through
SPI is connected with the audio frequency control module.
9. two machine communication structure according to claim 7, which is characterized in that the FLASH passes through SDIO interface and the sound
Frequency control module is connected.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201821789404.3U CN208819201U (en) | 2018-10-31 | 2018-10-31 | A kind of two machine communication structure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201821789404.3U CN208819201U (en) | 2018-10-31 | 2018-10-31 | A kind of two machine communication structure |
Publications (1)
Publication Number | Publication Date |
---|---|
CN208819201U true CN208819201U (en) | 2019-05-03 |
Family
ID=66280675
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201821789404.3U Active CN208819201U (en) | 2018-10-31 | 2018-10-31 | A kind of two machine communication structure |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN208819201U (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112003954A (en) * | 2020-10-27 | 2020-11-27 | 苏州纳芯微电子股份有限公司 | Data communication method, data communication system, and computer-readable storage medium |
-
2018
- 2018-10-31 CN CN201821789404.3U patent/CN208819201U/en active Active
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112003954A (en) * | 2020-10-27 | 2020-11-27 | 苏州纳芯微电子股份有限公司 | Data communication method, data communication system, and computer-readable storage medium |
CN112003954B (en) * | 2020-10-27 | 2021-02-19 | 苏州纳芯微电子股份有限公司 | Data communication method, data communication system, and computer-readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6742465B2 (en) | Method, device and bluetooth speaker for continuous wakeup delay reduction in bluetooth speaker | |
TWI425420B (en) | Method for synchronizing information of dual operating systems | |
TW201011553A (en) | Universal serial bus (USB) remote wakeup | |
CN105138270B (en) | A kind of data transfer mode | |
CN106254903B (en) | A kind of synchronous broadcast method of multi-medium data, apparatus and system | |
WO2000049507A1 (en) | Method and apparatus for extending the range of the universal serial bus protocol | |
CN105278818B (en) | Content copying methods and device in a kind of instant message applications | |
WO2015085964A1 (en) | Voice transmission method, device and voice service system | |
KR20160065206A (en) | Camera control interface slave device to slave device communication | |
CN103150050A (en) | Touch screen terminal and working method thereof | |
WO2018049971A1 (en) | Hotspot network switching method and terminals | |
WO2014190830A1 (en) | Sound recording synchronization method, apparatus, and device | |
WO2012023930A1 (en) | Remote display control | |
CN208819201U (en) | A kind of two machine communication structure | |
US20130067128A1 (en) | Methods and devices for universal serial bus port event extension | |
WO2020199993A1 (en) | Transmission method, terminal device, and network-side device | |
CN112399211B (en) | Operation method and fusion gateway | |
CN101751012B (en) | Device and method for realizing communication of direct current cabinet and host computer based on communication supervisor | |
WO2019196415A1 (en) | Interactive smart tablet | |
WO2019165983A1 (en) | Bluetooth transmission control method, control system, and storage medium | |
WO2021218855A1 (en) | Downlink reception triggering method, and terminal and network side device | |
US12004203B2 (en) | Resource allocation method, resource usage method, user equipment, and network side device | |
WO2011029351A1 (en) | Method and apparatus for solving delayed response in embedded system | |
CN112804754B (en) | Resource determination method, resource configuration method, terminal and network equipment | |
TWI254531B (en) | Processing wireless packets to reduce roaming host power consumption |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant |