[go: up one dir, main page]

CN109120628A - Print system kilomega network communication means, terminal and system - Google Patents

Print system kilomega network communication means, terminal and system Download PDF

Info

Publication number
CN109120628A
CN109120628A CN201811005449.1A CN201811005449A CN109120628A CN 109120628 A CN109120628 A CN 109120628A CN 201811005449 A CN201811005449 A CN 201811005449A CN 109120628 A CN109120628 A CN 109120628A
Authority
CN
China
Prior art keywords
data
print
address
protocol
gauge
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.)
Granted
Application number
CN201811005449.1A
Other languages
Chinese (zh)
Other versions
CN109120628B (en
Inventor
梅�明
黄振金
陈艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Hansen Software Co.,Ltd.
Original Assignee
Sen Da (shenzhen) Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sen Da (shenzhen) Technology Co Ltd filed Critical Sen Da (shenzhen) Technology Co Ltd
Priority to CN201811005449.1A priority Critical patent/CN109120628B/en
Publication of CN109120628A publication Critical patent/CN109120628A/en
Application granted granted Critical
Publication of CN109120628B publication Critical patent/CN109120628B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1209Improving or facilitating administration, e.g. print management resulting in adapted or bridged legacy communication protocols, e.g. emulation, protocol extension
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1211Improving printing performance
    • G06F3/1215Improving printing performance achieving increased printing speed, i.e. reducing the time between printing start and printing end
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server
    • G06F3/1287Remote printer device, e.g. being remote from client or server via internet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of print system kilomega network communication means, terminal and systems, are related to printing technique field, which comprises establish the default communication protocol between the terminal and the print control snap-gauge;The identical data frame of size is packaged by data are transmitted according to the default communication protocol;The data frame transfer is given to print control snap-gauge by winpcap driving interface.Pass through the communication transport protocols between customized terminal and print control board in the present invention, kilomega network communication interface is encapsulated into conjunction with the public free library network access system winpcap under windows platform, realize the big data quantity of large-scale print control system, the demand of high-speed transfer.

Description

Print system kilomega network communication means, terminal and system
Technical field
The present invention relates to printing technique field more particularly to a kind of print system kilomega network communication means, terminal and system.
Background technique
With extensive use of the computer on figure or word processing, the application of printer is also become increasingly prevalent, By printer, people can very easily will be on the text or images outputting to picture in computer.
In current print system, printing person assigns print command by computer, and printer is transmitted computer Information printed.Common printer has ink-jet printer and laser printer, wherein ink-jet printer using spray head into Row printing, and laser printer carries out static dump using laser beam and photosensitive drums.Ink-jet printer is cheap and wide because of its It is general to be applied to Industrial Printing field.
When the terminal (such as PC machine) in Industrial printing systems and the data volume transmitted between print control board are bigger When, print data amount is also very big, general to can no longer meet in such a way that USB carries out data communication to print control Demand.So needing special kilomega network communication plan to solve big data quantity, the demand of high-speed transfer.
Summary of the invention
It is a primary object of the present invention to propose a kind of print system kilomega network communication means, terminal and system, it is intended to solve The volume of transmitted data of certainly existing print system is small, the low technical problem of transmission rate.
To achieve the above object, one aspect of the present invention provides a kind of print system kilomega network communication means, and the method is answered For in the print system including terminal and print control snap-gauge, which comprises
Establish the default communication protocol between the terminal and the print control snap-gauge;
The identical data frame of size is packaged by data are transmitted according to the default communication protocol;
The data frame transfer is given to print control snap-gauge by winpcap driving interface.
Further, the default communication protocol is based on User Datagram Protocol UDP, in which:
Network layer passes through the internet IP in IP agreement using interconnection agreement and Address Resolution Protocol ARP between IP network Protocol address distinguishes different print control snap-gauges;
Link layer protocol is realized by 10M/100M/1000M mac controller, for that will transmit data according to Ethernet protocol Frame decoding and encapsulation;
Physical layer protocol is realized by gigabit PHY;
Application layer protocol is custom protocol.
Further, the application layer protocol includes: protocol header, order, serial number, address, data length and data;
Wherein, the protocol header indicates address of devices, for distinguishing the frame that present frame is print control snap-gauge, or spray The frame of sweep;
The mode of operation ordered for determining the print data and the control parameter;
The serial number indicates the serial number of data packet, for ensuring the integrality of data packet number;
The address includes print data address and print parameters address;
When write order, the data length indicates the byte length of write-in data, when read command, the data length Indicate the byte length of reading data;
When write order, the data indicate that the data of destination address are written, and when read command, the data are filling Data.
Further, the transmission data include print data and control parameter, described according to the default communication protocol Transmission data, which are packaged into the identical data frame of size, includes:
Judge whether the sequence number counter in current data packet serial number and mainboard matches according to the serial number,
Corresponding operation is executed to the print data and control parameter according to the order, the corresponding operating includes: Data writing operation reads data manipulation, write parameters operation, reads parameter manipulation, presses byte write operations;
Print data address and print parameters address are adjusted according to the address;
Print data and print parameters are handled according to the data length;
Corresponding destination address is written into the data that destination address is written.
Further, described to establish before the default communication protocol between the terminal and the print control snap-gauge, institute State method further include:
Network interface card information is configured.
Further, described be configured to network interface card includes:
Network interface card information is obtained by the library WinPcap, it is ensured that opens the network interface card after network interface card information is normal;
By WinPcap lab setting network interface card buffer area, to store transmission data;
By WinPcap lab setting network interface card filtering rule, so that network interface card receives target data.
Further, described to include: to print control snap-gauge by the data frame transfer by winpcap driving interface
The network interface card buffer area is sent by data frame by the library WinPcap;
By kilomega network by the data receiver of the data frame transfer in the network interface card buffer area to print control snap-gauge.
Further, the method also includes:
Network card data frame is read by the library WinPcap;
The network card data frame is stored in the network interface card buffer area;
The data frame is parsed according to the default communication protocol between the terminal and the print control snap-gauge.
Another aspect of the present invention also provides a kind of print system kilomega network communication terminal, and the terminal includes:
Creation module, the default communication protocol for establishing between the terminal and the print control snap-gauge;
Package module, for being packaged into the identical data frame of size for data are transmitted according to the default communication protocol;
Transmission module, for giving the data frame transfer to print control snap-gauge by winpcap driving interface.
Another aspect of the present invention also provides a kind of print system gigabit network communication system, including above-described print system Kilomega network communication terminal and print control snap-gauge.
A kind of print system kilomega network communication means, terminal and system provided by the invention, by customized terminal and Communication transport protocols between print control board, in conjunction with the public free network access system under windows platform The library winpcap is encapsulated into kilomega network communication interface, realizes the big data quantity of large-scale print control system, the need of high-speed transfer It asks.
Detailed description of the invention
Fig. 1 is a kind of print system kilomega network communication means flow chart that the embodiment of the present invention one provides;
Fig. 2 is a kind of print system kilomega network communication means flow chart provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of print system kilomega network communication terminal structural schematic diagram that the embodiment of the present invention three provides.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
In the present invention, terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as The fixed terminals such as desktop computer, number TV, and such as mobile phone, tablet computer, laptop, palm PC, a number Word assistant (Personal Digital Assistant, PDA), portable media player (Portable Media Player, PMP), navigation terminal, wearable device, Intelligent bracelet, the mobile terminals such as pedometer.
The present invention provides a kind of print system kilomega network communication means, and the method is applied to include terminal and print control In the print system of snap-gauge, which comprises
S1, default communication protocol between the terminal and the print control snap-gauge is established;
S2, the identical data frame of size is packaged into for data are transmitted according to the default communication protocol;
S3, the data frame transfer is given to print control snap-gauge by winpcap driving interface.
A kind of print system kilomega network communication means provided by the invention, passes through customized terminal and print control board Between communication transport protocols, be encapsulated into conjunction with the public free library network access system winpcap under windows platform Kilomega network communication interface realizes the big data quantity of large-scale print control system, the demand of high-speed transfer.
Detailed description of the preferred embodiments below.
Embodiment one
A kind of print system kilomega network communication means provided as shown in Figure 1 for the embodiment of the present invention one, the method are answered For in the print system including terminal and print control snap-gauge, which comprises
S101, default communication protocol between the terminal and the print control snap-gauge is established;
In a kind of specific embodiment, the default communication protocol is based on User Datagram Protocol (User Datagram Protocol, UDP), in which:
Network layer passes through the internet IP in IP agreement using interconnection agreement and arp address resolution protocol between IP network Protocol address distinguishes different print control snap-gauges;Specifically, when there is muti-piece print control snap-gauge, it is necessary to pass through IP address Identify different print control snap-gauges, it since parameter of the print control snap-gauge after having produced all is consistent, must after installation It need determine spray head corresponding to every piece of print control snap-gauge, so in the present embodiment, by unique IP address come area Not different print control snap-gauges.
Link layer protocol is realized by 10M/100M/1000M mac controller, for that will transmit data according to Ethernet protocol (ethernet agreement) frame decoding and encapsulation;
Physical layer protocol is realized by gigabit PHY;
Application layer protocol is custom protocol.
In the present embodiment, terminal, if PC machine controls entire print system by gigabit networking, in the case where single mainboard PC directly passes through cable with mainboard and connects, and in the case where muti-piece mainboard, PC and mainboard are connect on gigabit switch, passes through interchanger It is communicated;Mainboard supports 10M/100M/1000M communication.PC needs that data, i.e. print data and control will be transmitted by network Parameter is transferred to mainboard, and the correlated condition of print data and control parameter is read from mainboard.
In a kind of specific embodiment, as shown in table 1, the application layer protocol include: protocol header, order, serial number, Address, data length and data;
1 application layer protocol data structure of table
Wherein, the protocol header indicates address of devices, for distinguishing the frame that present frame is print control snap-gauge, or spray The frame of sweep;Wherein, the frame of print control snap-gauge is 8 ' h80, the frame for spraying sweep be respectively 8 ' h00,8 ' h01 ... 8 ' h0f, it is right Answer 16 blocks of spray sweeps, the natural number of f 0,1,2 ... 16, in addition 8 ' h10 is spray sweep broadcast address.
The mode of operation ordered for determining the print data and the control parameter;Every BIT is defined as follows:
BIT7: read and write control bit, 1: writing, 0: reading.
BIT6:REV;
BIT5: write address is continuous, discontinuous control bit, and 1: it is discontinuous, 0: continuous.
BIT4: response control bit, 1: response, 0: not replying, read the data position and be necessary for 1.
BIT3-BIT0: channel selecting, 1: data channel, 2: parameter channel, other reservations.
Return command:
BIT6-BIT4: error code;0: order is correct.
The serial number indicates the serial number of data packet, for ensuring the integrality of data packet number;
The address includes print data address and print parameters address;
When write order, the data length indicates the byte length of write-in data, when read command, the data length Indicate the byte length of reading data;
When write order, the data indicate that the data of destination address are written, and when read command, the data are filling Data.
S102, the identical data frame of size is packaged into for data are transmitted according to the default communication protocol;
In the present embodiment, the transmission data include print data and control parameter, described according to the default communication protocols Transmission data are packaged into the identical data frame of size by view
S1021, judge whether the sequence number counter in current data packet serial number and mainboard matches according to the serial number,
Specifically, often receiving a correct data packet, mainboard serial number checks that module will compare the serial number and mainboard On sequence number counter whether match, mismatch and then write down the value of current sequence number to erroneous packets example table cache RAM, host computer is every Secondary data can read the list after having passed, decision is to retransmit total data, or selectivity sends the number of corresponding serial number According to packet, the number-of-packet that host computer continuously transmits every time is no more than 65536, it is necessary to master before sending 65536 data packets Plate packet receiving error counter is detected, and can continue to send if inerrancy occurs, and needs first to send out again if an error has occurred Send the data packet (being had to when retransmission data using ACK function, to confirm that data packet is correctly sent) of mistake, and flushing errors packet Counter.Before transmission data packet every time, host computer is such as uncertain it needs to be determined that data packet serial number required for mainboard, can be with Restart to calculate from 0 by first reading mainboard register or reset sequence number counter, serial number.
The part does not work when parameter reading and writing, it is proposed that all write parameters orders use acknowledgement command, when writing as received Wrong responses or time-out, which do not receive response then, indicates transmission failure, decides whether to retransmit by host computer.Host computer is super When wait and upper to distinguish answer signal and read data return, wherein answer signal do not need to carry out additional operation be can be fast What speed returned, and read operation if it is carry out peripheral hardware or storage operation need the regular hour could returned data, it is corresponding Waiting time should lengthen accordingly.
S1022, corresponding operation, the corresponding operating are executed to the print data and control parameter according to the order Include: data writing operation, reads data manipulation, write parameters operation, reads parameter manipulation, by byte write operations;
In the present embodiment, specific operational order has: 0X81: writing data (unresponsive), OX91 (forces response);0X11: Read data;0x82: write parameters (unresponsive);0x92: write parameters (force response);0xA2: being write by byte, need to specify Offsets ground Location supports address discontinuous;0x12: parameter is read;When read operation, mainboard can will be read to be sent to mainboard in content, and response is suitable In once reading mainboard register manipulation.
S1023, print data address and print parameters address are adjusted according to the address;
In the present embodiment, address 4 bytes in total, low byte is divided into print data address and print parameters address preceding, 4Byte data are each specified in print data address, and since address size is limited, the low address 2BIT is by FPGA polishing, and BIT0 It is only 0, that is, data manipulation needs 8BYTE alignment (memory bar data bit width is 64BIT);Argument address is also 4 words Section, each address corresponds to 1Byte data, but the data bit width position 32BIT of system bus, different operations have centainly address Requirement.When write parameters operate, it is divided into address of continuously writing and specify Offsets and writes;Continuously write: the initial address of specified write operation, it will Data by address is sequentially written in corresponding address, and each write operation is as unit of 4 bytes, it is desirable that and 4 byte-aligned of address space is that is, low 2Bit is 0;The address that specifies Offsets write: specifying Offsets address for the data of each write-in, every time operation as unit of 1 byte, this When, " address " is the base address of parameter, and low 8bit is invalid, and needs the address that specifies Offsets before each data.Read operation is only Can continuously read, address is also required to 4 byte-aligneds, at " address " continuous read designated length byte number.
S1024, print data and print parameters are handled according to the data length.
Specifically, indicating the byte length that data are written, wherein length packet when the address that specifies Offsets is write when write operation Containing offset address, if length is unsatisfactory for 4 byte integers times, the remaining data meeting less than 4 bytes in continuous write operation It is dropped, the length that read data, the integral multiple that length is 4, extra will not read less than 4 bytes is indicated when read operation.It is long Degree is up to 1460 bytes, and read-write is more than that the value will lead to mistake.
S1025, corresponding destination address is written into the data that destination address is written.
In the present embodiment, when receiving write order, the data that destination address is written are indicated.When receiving read operation To fill data, it is not intended to justice.
Specifically, data come out only remaining user data from UDP module, position that mainboard is defined by application layer protocol is by phase The command parameter answered is written corresponding register, and operation is to as in write-in RAM caching, further according to order by data and control command It is converted to corresponding form writing commands queue FIFO, data FIFO is written in data.
For acknowledgement frame, a read register order write-in mission queue is automatically generated if order has response demand, Acknowledgement frame is generated after the write operation is completed.
In the present embodiment, data being write, reading data channel, two channels of each channel divided data and order, each channel is used FIFO is cached.
S103, the data frame transfer is given to print control snap-gauge by winpcap driving interface.
Specifically, this step includes:
S1031, the network interface card buffer area is sent for data frame by the library WinPcap;
S1032, the data of data frame transfer to print control snap-gauge in the network interface card buffer area are connect by kilomega network Receiving end.
Embodiment two
It is illustrated in figure 2 a kind of flow chart of print system kilomega network communication means provided by Embodiment 2 of the present invention, it should Communication described in method is two-way communication, and computer needs to transmit data by network, i.e. print data and control parameter passes It is defeated arrive mainboard, and from mainboard read print data and control parameter correlated condition.Wherein, computer end and print control board end There is gigabit ethernet card, the two is connected by kilomega network cable.Print controlling software is mounted on computer end, print control board There is FPGA to handle data information in end.This method comprises:
S201, network interface card is configured.
Specifically, this step includes:
S2011, network interface card information is obtained by the library WinPcap, it is ensured that the network interface card is opened after network interface card information is normal;
S2012, pass through WinPcap lab setting network interface card buffer area, to store transmission data;
S2013, pass through WinPcap lab setting network interface card filtering rule, so that network interface card receives target data.
S202, the identical data frame of size is packaged into for data are transmitted according to default communication protocol;
Wherein, default communication protocol is the default communication protocol between the terminal and the print control snap-gauge;One In kind specific embodiment, the default communication protocol is based on UDP, in which:
Network layer passes through the internet IP in IP agreement using interconnection agreement and arp address resolution protocol between IP network Protocol address distinguishes different print control snap-gauges;Specifically, when there is muti-piece print control snap-gauge, it is necessary to pass through IP address Identify different print control snap-gauges, it since parameter of the print control snap-gauge after having produced all is consistent, must after installation It need determine spray head corresponding to every piece of print control snap-gauge, so in the present embodiment, by unique IP address come area Not different print control snap-gauges.
Link layer protocol is realized by 10M/100M/1000M mac controller, for that will transmit data according to Ethernet protocol (ethernet agreement) frame decoding and encapsulation;
Physical layer protocol is realized by gigabit PHY;
Application layer protocol is custom protocol.
Application layer custom protocol and according to default communication protocol by transmit data be packaged into the identical data frame of size Mode has detailed narration in step S101 and S1021~S1025, and details are not described herein.
In specific implementation process, processed print data or control parameter are stored temporarily in caching first by this step In;Data will be transmitted further according to default communication protocol and are packaged into the identical data frame of size, and pass through the library WinPca-p for data Packet is sent to network interface card buffer area, last gigabit networking by network interface card cache in data packet be transmitted to print control board, printing control Fabrication plate receiving terminal is handled data by FPGA.
S203, the data frame transfer is given to print control snap-gauge by winpcap driving interface.
Specifically, this step includes:
S2031, the network interface card buffer area is sent for data frame by the library WinPcap;
S2032, the data of data frame transfer to print control snap-gauge in the network interface card buffer area are connect by kilomega network Receiving end.
S204, the data that print control snap-gauge returns are received by winpcap driving interface.
Specifically, this step includes:
S2041, network card data frame is read by the library WinPcap;
S2042, the network card data frame is stored in the network interface card buffer area;
S2043, the data frame is parsed according to the default communication protocol between the terminal and the print control snap-gauge.
Based on above-mentioned each embodiment of the method, the following each terminal embodiment of the present invention is proposed.
Embodiment three
A kind of print system kilomega network communication terminal 3, as shown in Figure 3, comprising:
Creation module 31, the default communication protocol for establishing between the terminal and the print control snap-gauge;
Package module 32, for being packaged into the identical data frame of size for data are transmitted according to the default communication protocol;
Transmission module 33, for giving the data frame transfer to print control snap-gauge by winpcap driving interface.
In a specific embodiment, the default communication protocol is based on User Datagram Protocol UDP, in which:
Network layer passes through the internet IP in IP agreement using interconnection agreement and Address Resolution Protocol ARP between IP network Protocol address distinguishes different print control snap-gauges;
Link layer protocol is realized by 10M/100M/1000M mac controller, for that will transmit data according to Ethernet protocol Frame decoding and encapsulation;
Physical layer protocol is realized by gigabit PHY;
Application layer protocol is custom protocol.
In a specific embodiment, the application layer protocol includes: that protocol header, order, serial number, address, data are long Degree and data;
Wherein, the protocol header indicates address of devices, for distinguishing the frame that present frame is print control snap-gauge, or spray The frame of sweep;
The mode of operation ordered for determining the print data and the control parameter;
The serial number indicates the serial number of data packet, for ensuring the integrality of data packet number;
The address includes print data address and print parameters address;
When write order, the data length indicates the byte length of write-in data, when read command, the data length Indicate the byte length of reading data;
When write order, the data indicate that the data of destination address are written, and when read command, the data are filling Data.
In a specific embodiment, the transmission data include print data and control parameter, described Encapsulation Moulds Block 32 includes:
Judgment module, for judged according to the serial number sequence number counter in current data packet serial number and mainboard whether Match,
Execution module, it is described for executing corresponding operation to the print data and control parameter according to the order Corresponding operating includes: data writing operation, reads data manipulation, write parameters operation, reads parameter manipulation, by byte write operations;
Module is adjusted, for being adjusted according to the address to print data address and print parameters address;
Processing module, for being handled according to the data length print data and print parameters;
Writing module, for corresponding destination address to be written in the data that destination address is written.
In a specific embodiment, the print system kilomega network communication terminal 3 further include:
Setup module, for being configured to network interface card information.
In a specific embodiment, the setup module includes:
Module is obtained, for obtaining network interface card information by the library WinPcap, it is ensured that the network interface card is beaten after network interface card information is normal It opens;
First setup module, for passing through WinPcap lab setting network interface card buffer area, to store transmission data;
Second setup module, for passing through WinPcap lab setting network interface card filtering rule, so that network interface card receives target data.
In a specific embodiment, the transmission module 33 includes:
Sending module, for sending the network interface card buffer area for data frame by the library WinPcap;
First transmission module, for passing through kilomega network for the data frame transfer in the network interface card buffer area to printer adapter The data receiver of plate.
In a specific embodiment, the print system kilomega network communication terminal 3 further include:
Read module, for reading network card data frame by the library WinPcap;
Memory module, for the network card data frame to be stored in the network interface card buffer area;
Parsing module, for according to the default communication protocol parsing between the terminal and the print control snap-gauge Data frame.
Example IV
The embodiment of the present invention four provides a kind of print system gigabit network communication system, including terminal and printer, wherein institute Stating terminal is print system kilomega network communication terminal as shown in Figure 3.
A kind of print system kilomega network communication means, terminal and system provided by the invention, by customized terminal and Communication transport protocols between print control board, in conjunction with the public free network access system under windows platform The library winpcap is encapsulated into kilomega network communication interface, realizes the big data quantity of large-scale print control system, the need of high-speed transfer It asks.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the terminal that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or terminal institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or terminal.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of print system kilomega network communication means, which is characterized in that the method is applied to include terminal and print control In the print system of snap-gauge, which comprises
Establish the default communication protocol between the terminal and the print control snap-gauge;
The identical data frame of size is packaged by data are transmitted according to the default communication protocol;
The data frame transfer is given to print control snap-gauge by winpcap driving interface.
2. print system kilomega network communication means according to claim 1, which is characterized in that the default communication protocol base In User Datagram Protocol UDP, in which:
Network layer passes through the IP Internet protocol in IP agreement using interconnection agreement and Address Resolution Protocol ARP between IP network Distinguish different print control snap-gauges in address;
Link layer protocol is realized by 10M/100M/1000M mac controller, for that will transmit data according to Ethernet protocol frame decoding And encapsulation;
Physical layer protocol is realized by gigabit PHY;
Application layer protocol is custom protocol.
3. according to print system kilomega network communication means as claimed in claim 2, which is characterized in that
The application layer protocol includes: protocol header, order, serial number, address, data length and data;
Wherein, the protocol header indicates address of devices, for distinguishing the frame that present frame is print control snap-gauge, or spray sweep Frame;
The mode of operation ordered for determining the print data and the control parameter;
The serial number indicates the serial number of data packet, for ensuring the integrality of data packet number;
The address includes print data address and print parameters address;
When write order, the data length indicates the byte length of write-in data, and when read command, the data length is indicated Read the byte length of data;
When write order, the data indicate that the data of destination address are written, and when read command, the data are filler According to.
4. according to print system kilomega network communication means as claimed in claim 3, which is characterized in that the transmission data include printing Data and control parameter, it is described to be packaged into the identical data frame of size by data are transmitted according to the default communication protocol and include:
Judge whether the sequence number counter in current data packet serial number and mainboard matches according to the serial number,
Corresponding operation is executed to the print data and control parameter according to the order, the corresponding operating includes: to write number According to operation, reading data manipulation, write parameters operation, read parameter manipulation, by byte write operations;
Print data address and print parameters address are adjusted according to the address;
Print data and print parameters are handled according to the data length;
Corresponding destination address is written into the data that destination address is written.
5. print system kilomega network communication means according to claim 1 to 4, which is characterized in that described in the foundation Before default communication protocol between terminal and the print control snap-gauge, the method also includes:
Network interface card information is configured.
6. print system kilomega network communication means according to claim 5, which is characterized in that described to be configured to network interface card Include:
Network interface card information is obtained by the library WinPcap, it is ensured that opens the network interface card after network interface card information is normal;
By WinPcap lab setting network interface card buffer area, to store transmission data;
By WinPcap lab setting network interface card filtering rule, so that network interface card receives target data.
7. print system kilomega network communication means according to claim 5, which is characterized in that described to be driven by winpcap The data frame transfer includes: by mobile interface to print control snap-gauge
The network interface card buffer area is sent by data frame by the library WinPcap;
By kilomega network by the data receiver of the data frame transfer in the network interface card buffer area to print control snap-gauge.
8. print system kilomega network communication means according to claim 6, which is characterized in that the method also includes:
Network card data frame is read by the library WinPcap;
The network card data frame is stored in the network interface card buffer area;
The data frame is parsed according to the default communication protocol between the terminal and the print control snap-gauge.
9. a kind of print system kilomega network communication terminal, which is characterized in that the terminal includes:
Creation module, the default communication protocol for establishing between the terminal and the print control snap-gauge;
Package module, for being packaged into the identical data frame of size for data are transmitted according to the default communication protocol;
Transmission module, for giving the data frame transfer to print control snap-gauge by winpcap driving interface.
10. a kind of print system gigabit network communication system, which is characterized in that including print system thousand as claimed in claim 9 Million Network Communication terminals and print control snap-gauge.
CN201811005449.1A 2018-08-30 2018-08-30 Printing system gigabit network communication method, terminal and system Active CN109120628B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811005449.1A CN109120628B (en) 2018-08-30 2018-08-30 Printing system gigabit network communication method, terminal and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811005449.1A CN109120628B (en) 2018-08-30 2018-08-30 Printing system gigabit network communication method, terminal and system

Publications (2)

Publication Number Publication Date
CN109120628A true CN109120628A (en) 2019-01-01
CN109120628B CN109120628B (en) 2021-07-27

Family

ID=64861585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811005449.1A Active CN109120628B (en) 2018-08-30 2018-08-30 Printing system gigabit network communication method, terminal and system

Country Status (1)

Country Link
CN (1) CN109120628B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109756517A (en) * 2019-03-05 2019-05-14 中国科学院软件研究所 A high-speed network data transmission method based on winpcap

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795271A (en) * 2010-01-20 2010-08-04 西安电子科技大学 Network security printing system and printing method
CN101815058A (en) * 2009-02-23 2010-08-25 阿尔卡特朗讯 Method and device for creating print dialog based on SIP (Session Initiation Protocol) protocol in IP network
CN102591602A (en) * 2011-12-30 2012-07-18 浙江大学 High-speed digital printing processing system and method on basis of multi-core processor
CN102821054A (en) * 2012-09-05 2012-12-12 山东神戎电子股份有限公司 Cross-segment device searching method
US8380888B2 (en) * 2008-08-18 2013-02-19 Xerox Corporation System and method for determining printer health
CN103179120A (en) * 2013-03-21 2013-06-26 天闻数媒科技(北京)有限公司 Method and system for realizing printing of mobile device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8380888B2 (en) * 2008-08-18 2013-02-19 Xerox Corporation System and method for determining printer health
CN101815058A (en) * 2009-02-23 2010-08-25 阿尔卡特朗讯 Method and device for creating print dialog based on SIP (Session Initiation Protocol) protocol in IP network
CN101795271A (en) * 2010-01-20 2010-08-04 西安电子科技大学 Network security printing system and printing method
CN102591602A (en) * 2011-12-30 2012-07-18 浙江大学 High-speed digital printing processing system and method on basis of multi-core processor
CN102821054A (en) * 2012-09-05 2012-12-12 山东神戎电子股份有限公司 Cross-segment device searching method
CN103179120A (en) * 2013-03-21 2013-06-26 天闻数媒科技(北京)有限公司 Method and system for realizing printing of mobile device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王国明等: "基于TCP/IP协议的嵌入式网络打印服务器的实现", 《自动化与仪器仪表》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109756517A (en) * 2019-03-05 2019-05-14 中国科学院软件研究所 A high-speed network data transmission method based on winpcap

Also Published As

Publication number Publication date
CN109120628B (en) 2021-07-27

Similar Documents

Publication Publication Date Title
US11991072B2 (en) System and method for facilitating efficient event notification management for a network interface controller (NIC)
US5748613A (en) Communication pacing method
US20100027559A1 (en) Transmission device and data extended transmission method
US20050135395A1 (en) Method and system for pre-pending layer 2 (L2) frame descriptors
KR102516027B1 (en) Header processing device, processor and electronic device
US20090286489A1 (en) Wireless Communications Between Wired Devices with Adaptive Data Rates
US7583600B1 (en) Schedule prediction for data link layer packets
WO2011046056A1 (en) Transmission control method for packet communication and packet communication system
US7680944B1 (en) Rapid transport service in a network to peripheral device servers
WO2010123143A1 (en) Transmission device, transmission method, and control program for transmission device
EP1952592B1 (en) Communication apparatus and method
EP1035682A1 (en) Method and bus interface employing a memory in an integrated circuit for linking a bus with an application device
US6023478A (en) Method and apparatus for communicating data byte streams
CN100405768C (en) Data packet control system and communication method
US10649947B2 (en) Stack timing adjustment for serial communications
CN109120628A (en) Print system kilomega network communication means, terminal and system
CN118260237B (en) Interface controller, communication method, system, storage medium and program product
US7447976B2 (en) Data transfer apparatus
CN110838892B (en) High-reliability merging and forwarding method for multi-path full-duplex serial port
US10762017B2 (en) USB transmission system, USB device, and host capable of USB transmission
US20050002265A1 (en) Header compression
US8331332B2 (en) Wireless USB host and channel time allocation method
US6693905B1 (en) Data exchange unit
CN100493018C (en) A method and system for communicating via a bus interface in a network
EP4482060A1 (en) Communication device and communication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210604

Address after: 1701, 1703, building C6, Hengfeng Industrial City, 739 Zhoushi Road, Hezhou community, Hangcheng street, Bao'an District, Shenzhen, Guangdong 518000

Applicant after: SHENZHEN HOSONSOFT Co.,Ltd.

Address before: Room 1701, building C6, Hengfeng Industrial Town, Xixiang street, Bao'an District, Shenzhen City, Guangdong Province

Applicant before: SENDA (SHENZHEN) TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 518000 a201-a301, building a, Sino German European Industrial Demonstration Park, Hangcheng Avenue, guxing community, Xixiang street, Bao'an District, Shenzhen, Guangdong

Patentee after: Shenzhen Hansen Software Co.,Ltd.

Address before: 1701, 1703, building C6, Hengfeng Industrial City, 739 Zhoushi Road, Hezhou community, Hangcheng street, Bao'an District, Shenzhen, Guangdong 518000

Patentee before: SHENZHEN HOSONSOFT Co.,Ltd.