

技术领域technical field
本发明涉及计算机通信技术领域,特别是指一种控制局域网中实现数据传输的方法、系统和设备。The invention relates to the technical field of computer communication, in particular to a method, system and equipment for controlling data transmission in a local area network.
背景技术Background technique
随着工业控制技术的发展,控制局域网(CAN,Controller AreaNetwork)得到快速发展。控制局域网是于80年代为解决现代汽车中控制器、执行机构、监测仪器、传感器之间的数据通信而提出并开发的总线式串行通信网络。CAN网络总线属于现场总线的一种,它采用双绞线串行通信方式,检错能力强,可在高噪声干扰环境中使用。With the development of industrial control technology, the control area network (CAN, Controller AreaNetwork) has been developed rapidly. Control local area network is a bus-type serial communication network proposed and developed in the 1980s to solve the data communication between controllers, actuators, monitoring instruments, and sensors in modern automobiles. CAN network bus is a kind of field bus. It adopts twisted pair serial communication mode, has strong error detection ability, and can be used in high noise interference environment.
由于CAN串行通信总线具有这些特性,它很自然的在汽车制造业以及航空工业中受到广泛应用,现如今,CAN总线已经成为很多工业设备间常用的通信手段。Due to these characteristics of the CAN serial communication bus, it is naturally widely used in the automobile manufacturing industry and the aviation industry. Nowadays, the CAN bus has become a common means of communication between many industrial devices.
CAN通信协议描述了在设备之间信息如何传递,对层的定义与开放系统互连模型(OSI,Open System Interconnection)一致。每一层与另一设备上相同的那一层通信。实际的通信是发生在每一设备上相邻的两层,而设备只通过物理层的物理介质互连。CAN的结构定义了模型的最下面的两层:数据链路层和物理层。应用层通过不同的新兴协议层和物理层连接,这些新兴协议层主要是专门用于特殊的工业领域加上由个别CAN用户定义的任何合适的方案。The CAN communication protocol describes how information is transmitted between devices, and the definition of layers is consistent with the Open System Interconnection model (OSI, Open System Interconnection). Each layer communicates with the same layer on another device. The actual communication occurs on two adjacent layers of each device, and the devices are only interconnected through the physical medium of the physical layer. The structure of CAN defines the bottom two layers of the model: the data link layer and the physical layer. The application layers are connected via different emerging protocol layers and physical layers, which are mainly dedicated to special industrial fields plus any suitable schemes defined by individual CAN users.
由于CAN网络的发展,网络节点之间的数据传输越来越重要。在一个由多个CAN节点组成的CAN网络中,如果各个节点的位置比较分散,并且某些节点位置可能处于污染环境或者不易抵达的环境,如高电压附近或者高空脚手架,使用传统的编程手段对于该节点上处理器软件分别进行本地更新和维护将非常困难。为了实现远程在线软件更新而为每个节点的处理器都提供一条用于远程维护的通信链路将造成大的资源浪费。如果CAN网络中的节点之间能够实现各类文件、软件等数据的传递,网络节点的更新将较容易的实现。但在现有CAN网络各个节点之间还没有合适的方案来实现大量数据的传输。Due to the development of CAN network, data transmission between network nodes is becoming more and more important. In a CAN network composed of multiple CAN nodes, if the locations of each node are relatively scattered, and some node locations may be in a polluted environment or an environment that is not easy to reach, such as near high voltage or high-altitude scaffolding, use traditional programming methods for It will be very difficult to update and maintain the processor software locally on this node respectively. Providing a communication link for remote maintenance for the processors of each node in order to realize remote online software update will cause a large waste of resources. If the data transmission of various files and software can be realized between the nodes in the CAN network, the update of the network nodes will be easier to realize. However, there is no suitable solution to realize the transmission of large amounts of data between each node of the existing CAN network.
发明内容Contents of the invention
有鉴于此,本发明所解决的技术问题在于提供一种控制局域网中实现数据传输的方法、系统和设备,使得CAN网络中节点之间实现大量数据的传输。In view of this, the technical problem to be solved by the present invention is to provide a method, system and device for controlling data transmission in a local area network, so that a large amount of data can be transmitted between nodes in the CAN network.
为解决现有技术中存在的问题,本发明提供一种控制局域网中实现节点数据传输的方法,包括:In order to solve the problems in the prior art, the present invention provides a method for controlling node data transmission in a local area network, including:
a、主节点对获得待发送的数据进行解析;a. The master node analyzes the data to be sent;
b、主节点与对应于解析出节点标识的从节点建立连接;b. The master node establishes a connection with the slave node corresponding to the parsed node ID;
c、主节点将前述待发送的数据拆分为固定长度的数据后,发送至从节点;c. The master node splits the aforementioned data to be sent into fixed-length data and sends it to the slave node;
d、接收到数据后,从节点保存数据。d. After receiving the data, save the data from the node.
其中,所述步骤a中解析是指:主节点获得该数据的大小、循环冗余校验CRC结果、接收该数据的从节点处理器标识。Wherein, the parsing in step a refers to: the master node obtains the size of the data, the CRC result of the cyclic redundancy check, and the identifier of the processor of the slave node receiving the data.
其中,所述步骤b中建立连接包括:Wherein, establishing a connection in the step b includes:
b31、主节点向从节点传送本次发送数据的大小、CRC结果、处理器标识信息;b31. The master node transmits the size of the sent data, CRC result, and processor identification information to the slave node;
b32、从节点收到后,返回确认信息并预留存储空间;b32. After receiving it from the node, return confirmation information and reserve storage space;
b33、主节点与从节点之间发送传输确认消息。b33. A transmission confirmation message is sent between the master node and the slave node.
其中,所述步骤c中拆分是指:主节点将所传输的数据分解,封装为固定长度数据段组成的数据块,剩余部分不够一个数据段的数据用一个数据段发送。Wherein, splitting in step c means: the master node decomposes the transmitted data and encapsulates it into data blocks composed of fixed-length data segments, and the remaining data that is not enough for one data segment is sent as one data segment.
其中,所述步骤c中发送是指:Wherein, sending in the step c refers to:
c51、主节点与从节点之间逐次建立块传输的确认连接;c51. The confirmation connection of block transmission is established successively between the master node and the slave node;
c52、主节点与从节点在每个建立块传输的确认连接后传输各个数据段,如果所传的数据段有误,主节点利用从节点返回的信息重传正确的数据段。c52. The master node and the slave node transmit each data segment after establishing a block transmission confirmation connection. If the transmitted data segment is wrong, the master node uses the information returned by the slave node to retransmit the correct data segment.
其中,该方法进一步包括:从节点接收到全部数据后向主节点发送得到的CRC结果,如果有误,主节点重传该数据。Wherein, the method further includes: after receiving all the data, the slave node sends the obtained CRC result to the master node, and if there is an error, the master node retransmits the data.
其中,所述步骤d中保存是指从节点将收到的数据保存到空闲的空间或覆盖其它数据。Wherein, saving in step d means that the slave node saves the received data in free space or overwrites other data.
一种控制局域网中实现从节点软件更新的方法,该方法包括:A method for controlling a slave node software update in a local area network, the method comprising:
主节点对获得的待发送的数据进行解析;The master node analyzes the obtained data to be sent;
主节点与对应于解析出节点标识的从节点建立连接;The master node establishes a connection with the slave node corresponding to the parsed node ID;
主节点将前述待发送的数据拆分为固定长度的数据后,发送至从节点;The master node splits the aforementioned data to be sent into fixed-length data and sends it to the slave node;
接收数据后,从节点保存数据;After receiving the data, save the data from the node;
从节点收到主节点的复位命令后,运行前述保存的数据。After the slave node receives the reset command from the master node, it executes the previously saved data.
一种控制局域网中实现数据传输的设备,其特征在于,包括数据解析单元、数据处理单元、收发控制单元,其中,A device for controlling data transmission in a local area network, characterized in that it includes a data parsing unit, a data processing unit, and a sending and receiving control unit, wherein,
数据解析单元用于从所发送的数据中解析出接收该数据的从节点处理器名称、该数据的大小、CRC结果;The data parsing unit is used to parse out the name of the slave node processor receiving the data, the size of the data, and the CRC result from the sent data;
数据处理单元用于将所发送的数据拆分后,以固定长度的数据段封装发送至收发控制单元;The data processing unit is used to split the sent data, and send it to the transceiver control unit with a fixed-length data segment package;
收发控制单元用于将封装后的数据段发送至从节点,响应从节点发送的消息进行处理。The transceiver control unit is used for sending the encapsulated data segment to the slave node, and responding to the message sent by the slave node for processing.
其中,该设备还包括复位控制单元,Wherein, the device also includes a reset control unit,
复位控制单元用于向从节点发送复位命令,控制从节点重新复位。The reset control unit is used to send a reset command to the slave node to control the slave node to reset again.
一种控制局域网中实现数据传输的设备,其特征在于,包括数据解析单元、数据处理单元、收发控制单元,其中,A device for controlling data transmission in a local area network, characterized in that it includes a data parsing unit, a data processing unit, and a sending and receiving control unit, wherein,
数据处理单元用于从收发控制单元中接收到的数据写入到存储器中并合并;The data processing unit is used to write the data received from the transceiver control unit into the memory and combine them;
收发控制单元用于接收来自主节点发送的数据发送至数据处理单元,向主节点发送收到数据后的响应消息;The transceiver control unit is used to receive the data sent from the master node and send it to the data processing unit, and send a response message after receiving the data to the master node;
数据解析单元用于将数据处理单元所保存的数据解析出数据大小、CRC结果,并进行CRC结果比较。The data parsing unit is used for parsing the data stored in the data processing unit to obtain the data size and CRC results, and to compare the CRC results.
其中,该设备还包括节点复位单元,Wherein, the device also includes a node reset unit,
节点复位单元用于当收发控制单元收到复位消息后重新复位该节点,运行新的数据。The node reset unit is used for resetting the node and running new data after the transceiver control unit receives the reset message.
一种控制局域网中实现数据传输的系统,该系统包括控制局域网主节点和从节点,其特征在于,A system for realizing data transmission in a control local area network, the system includes a master node and a slave node of the control local area network, and is characterized in that,
所述主节点用于将所发送的数据解析,利用解析后的结果与从节点建立连接,将所发送的数据拆分为固定长度的数据段后,发送至从节点,The master node is used to analyze the sent data, use the analyzed result to establish a connection with the slave node, split the sent data into fixed-length data segments, and send them to the slave node,
所述从节点用于接收来自主节点的数据段并保存。The slave node is used to receive and save the data segment from the master node.
其中,所述从节点通过接收到数据获得的CRC结果与来自主节点的CRC结果比较,并将比较的结果发送至主节点,主节点根据比较结果确定是否重传数据。Wherein, the slave node compares the CRC result obtained by receiving the data with the CRC result from the master node, and sends the comparison result to the master node, and the master node determines whether to retransmit the data according to the comparison result.
其中,所述主节点向从节点发送节点复位消息,从节点接收到该消息后复位,运行相应的数据。Wherein, the master node sends a node reset message to the slave node, and the slave node resets after receiving the message, and executes corresponding data.
本发明的方法主节点解析待发送的数据,与解析出节点标识相对应的从节点建立连接,对待发送数据拆分为固定长度的数据段后封装传输到从节点,使得在现有CAN网络中主、从节点之间实现数据传输,对于从节点的软件更新,采用本发明的方法传输要更新的数据文件,使得在不易到达环境下的从节点进行软件更新。In the method of the present invention, the master node analyzes the data to be sent, establishes a connection with the slave node corresponding to the parsed node identifier, splits the data to be sent into fixed-length data segments and then encapsulates and transmits it to the slave node, so that in the existing CAN network Data transmission is realized between the master and slave nodes, and for the software update of the slave nodes, the method of the present invention is used to transmit the data files to be updated, so that the slave nodes in the difficult-to-reach environment can perform software updates.
附图说明Description of drawings
图1为本发明方法的流程图;Fig. 1 is the flowchart of the inventive method;
图2为应用本发明方法的系统示意图;Fig. 2 is a schematic diagram of a system applying the method of the present invention;
图3为本发明设备的示意图。Figure 3 is a schematic diagram of the apparatus of the present invention.
具体实施方式Detailed ways
本发明的方法能够在现有CAN网络中主、从节点之间实现数据传输,用于现有CAN网络节点中各个从节点的软件更新、文件传输等其它方面。The method of the invention can realize data transmission between master and slave nodes in the existing CAN network, and is used in other aspects such as software update and file transmission of each slave node in the existing CAN network nodes.
下面结合图1详细描述本发明的方法。The method of the present invention will be described in detail below with reference to FIG. 1 .
步骤S101:主节点获得数据后,解析该数据;Step S101: After the master node obtains the data, it parses the data;
主节点获取数据的方式可以是通过网络下载该数据,也可以事先保存到存储器中。解析数据主要是确认接收该数据的从节点处理器标识是属于哪个节点上的数据,并计算出文件的大小和循环冗余校验(CRC,Cyclic Redundancy Check)结果。其中,所发送的数据与接收该数据的节点有对应关系,主节点通过查询对应关系来确定接收该数据的节点。The way for the master node to obtain the data can be to download the data through the network, or save it in the memory in advance. Parsing the data is mainly to confirm which node the processor identifier of the slave node receiving the data belongs to, and calculate the size of the file and the result of the Cyclic Redundancy Check (CRC). Wherein, the sent data has a corresponding relationship with the node receiving the data, and the master node determines the node receiving the data by querying the corresponding relationship.
步骤S102:主节点利用解析后的结果,与从节点建立连接;Step S102: the master node uses the analyzed result to establish a connection with the slave node;
主节点通过解析的结果,向相应的从节点发送数据开始的消息,该消息结构参见表1,该消息中共包含8个字节,其中比特0(bit0)处为最低有效位(LSB,Least Significant Bit),bit7为最高有效位(MSB,Most Significant Bit),字节1表示所发送的消息属性,字节2、3、4表示本次所传送的数据大小,最多为16M。字节5表示接收该数据的处理器标识,字节7、8表示该数据的16位的CRC校验结果。The master node sends a data start message to the corresponding slave node through the result of the analysis. The message structure is shown in Table 1. The message contains 8 bytes in total, and bit 0 (bit0) is the least significant bit (LSB, Least Significant Bit), bit7 is the most significant bit (MSB, Most Significant Bit), byte 1 indicates the attribute of the sent message, and bytes 2, 3, and 4 indicate the size of the data transmitted this time, up to 16M. Byte 5 indicates the identifier of the processor receiving the data, and bytes 7 and 8 indicate the 16-bit CRC check result of the data.
表1Table 1
相应的从节点接收到该消息后,向主节点返回传输开始应答消息,该消息参见表2,After the corresponding slave node receives the message, it returns a transmission start response message to the master node, which is shown in Table 2,
表2Table 2
从节点向主节点返回的传输开始应答消息中包含处理器有效性检查的消息,如果处理器无效时,则本次发送失败,主节点重新向从节点发送传输开始消息与从节点建立连接并传输数据。The transmission start response message returned from the slave node to the master node contains a message for checking the validity of the processor. If the processor is invalid, the transmission fails this time, and the master node re-sends the transmission start message to the slave node to establish a connection with the slave node and transmit data.
从节点发送完该消息后,在存储器中预留相应大小的空间,该空间可以是空闲空间,也可以是删除或覆盖其它一些过期数据保留出空间。After sending the message, the slave node reserves a space of corresponding size in the memory, which can be a free space, or delete or overwrite some other expired data to reserve space.
存放该数据的空间准备完毕后,从节点向主节点发送传输准备完毕消息,该消息参见表3,After the space for storing the data is prepared, the slave node sends a transmission ready message to the master node. See Table 3 for the message.
表3table 3
从节点将传输准备完毕消息发送至主节点,该消息中含有存储空间检查的信息,当该空间为异常时,主节点重新向该从节点发送传输开始消息建立连接并传输数据。The slave node sends the transmission ready message to the master node, which contains the information of the storage space check. When the space is abnormal, the master node sends the transmission start message to the slave node again to establish a connection and transmit data.
主节点收到该消息后,向从节点发送传输准备完毕应答消息,该消息参见表4,After the master node receives the message, it sends a transmission ready response message to the slave node. The message is shown in Table 4.
表4Table 4
主节点向从节点发送完该消息后,准备发送块传输开始消息。After the master node sends the message to the slave node, it is ready to send the block transfer start message.
步骤S103:主节点将所发送的数据拆分为固定长度的数据后,发送至从节点;Step S103: the master node splits the sent data into fixed-length data, and then sends it to the slave node;
主节点将所发送的数据拆分,封装到固定长度的数据段,加上数据块标识后,发送至从节点。The master node splits the sent data, encapsulates it into a fixed-length data segment, adds the data block identifier, and sends it to the slave node.
首先,主节点向从节点发送传输准备完毕消息,该消息参见表5,First, the master node sends a transmission ready message to the slave node, the message is shown in Table 5,
表5table 5
主节点在该消息中添加所发送数据总块数和当前所发送的块号及所发送该块中所含的数据段个数。The master node adds the total number of data blocks sent, the number of the currently sent block and the number of data segments contained in the sent block to the message.
从节点收到该消息后,判断该消息中块号是否有效,记录块的大小以及判断该块是否为最后一块。从节点向主节点返回块传输开始应答消息,该消息参见表6,After receiving the message, the slave node judges whether the block number in the message is valid, records the size of the block and judges whether the block is the last block. The slave node returns a block transmission start response message to the master node, the message is shown in Table 6,
表6Table 6
最初接收的块号是从0开始的,依次递增,从节点在返回的消息中添加当前所接收的块号,以及需要接收的块号,当前的块号是否有效,如果无效,则主节点按照从节点需要接收的块号发送相应的数据块。The initially received block number starts from 0 and increases sequentially. The slave node adds the currently received block number and the block number to be received in the returned message. Is the current block number valid? If not, the master node follows The slave node needs to receive the block number to send the corresponding data block.
主节点收到应答消息后,向从节点传送该数据块所包含的数据段,每个数据段包含6自字节内容,数据段传输消息参见表7,After the master node receives the response message, it transmits the data segment contained in the data block to the slave node. Each data segment contains 6 bytes of content. For the data segment transmission message, see Table 7.
表7Table 7
主节点将当前所发送的块中每6个字节为1个数据段发送至从节点。The master node sends every 6 bytes in the currently sent block as a data segment to the slave node.
主节点每发送一个数据段后,都会收到从节点的数据段传输应答消息,根据应答消息决定所执行的操作,在正常情况下,重复步骤S103的流程,发送完所有的数据段和数据块。发送数据的末尾不足一个数据段时,用一个数据段发送。After each data segment is sent by the master node, it will receive a data segment transmission response message from the slave node, and determine the operation to be performed according to the response message. Under normal circumstances, repeat the process of step S103 to send all data segments and data blocks . When the end of the sent data is less than one data segment, send it with one data segment.
数据段的传送次数与当前块的大小有关,最多256次,即最大数据块为1536字节,256个数据段,每个数据段传送数据6个字节。数据段号的表示为0至255,当数据块小于1536字节时,最大数据段号为数据块长度与6相除,能够整除时,最大段号为相除的结果减一,不能整除时,为相除的结果。如数据块为60字节,可用数据段号为0至9共10个数据段传送,最大段号为9。The number of transmission times of the data segment is related to the size of the current block, up to 256 times, that is, the maximum data block is 1536 bytes, 256 data segments, and each data segment transmits 6 bytes of data. The representation of the data segment number is from 0 to 255. When the data block is less than 1536 bytes, the maximum data segment number is divided by the length of the data block and 6. If it can be divisible, the maximum segment number is the result of the division minus one. If it cannot be divisible , is the result of the division. If the data block is 60 bytes, it can be transmitted in 10 data segments whose data segment number is 0 to 9, and the maximum segment number is 9.
步骤S104:从节点接收数据后,保存数据。Step S104: After receiving the data from the node, save the data.
从节点每接收到一个数据段后,将向主节点发送一个数据段传输应答消息,并保存数据到存储器中。该消息结构参见表8,Each time the slave node receives a data segment, it will send a data segment transmission response message to the master node, and save the data in the memory. The message structure is shown in Table 8,
表8Table 8
从节点在每次收到数据段保存后,都会向主节点发送数据段应答消息,并将所收到数据段的检查结果发送至主节点,该消息中包含当前收到的数据段号和需要接收的数据段号,判断所接收的段号是否有误与前述判断块号是否有误的方式是相同的,最初的段号是从0开始,依次递增,如果有误,则主节点按照从节点需要的数据段号发送相应的数据段,直到所有的数据段传送完毕。Every time the slave node receives a data segment and saves it, it will send a data segment response message to the master node, and send the check result of the received data segment to the master node. The message contains the currently received data segment number and the required The received data segment number, judging whether the received segment number is wrong is the same as the above-mentioned method of judging whether the block number is wrong. The initial segment number starts from 0 and increases in turn. If there is an error, the master node follows the slave The node needs to send the corresponding data segment number until all the data segments are transmitted.
主节点收到传输应答消息后,如果该消息显示最后一个数据段接收后,写入到存储器中操作结果异常时,主节点重新建立连接,传送全部数据段。After the master node receives the transmission response message, if the message shows that after the last data segment is received, when the operation result of writing to the memory is abnormal, the master node re-establishes the connection and transmits all the data segments.
步骤S105:主节点与从节点之间传递确认信息。Step S105: transfer confirmation information between the master node and the slave node.
发送完毕后,主节点向从节点发送数据段传输结束消息,表明所有的数据发送完毕,该消息参见表9,After the sending is completed, the master node sends a data segment transmission end message to the slave node, indicating that all data has been sent. See Table 9 for the message.
表9Table 9
从节点收到该消息后,根据本次接收到的所有数据获得CRC校验结果,并将该结果通过传输结束应答消息发送至主节点。该消息参见表10,After receiving the message, the slave node obtains the CRC check result according to all the data received this time, and sends the result to the master node through the transmission end response message. See Table 10 for this message,
表10Table 10
如果校验结果正确,本次发送成功,如果校验结果错误,主节点重发所有数据。If the verification result is correct, the sending is successful. If the verification result is wrong, the master node will resend all the data.
本发明的方法可以在CAN网络主节点和从节点之间进行数据传输,软件更新等其它方面得到应用。The method of the invention can be applied in other aspects such as data transmission between CAN network master nodes and slave nodes, software update and the like.
本发明还提供一种控制局域网中实现数据传输的系统,该系统包括CAN网络主节点和从节点。The invention also provides a system for controlling data transmission in the local area network, the system includes CAN network master nodes and slave nodes.
主节点可以通过网络下载所要发送的数据,或事先将所发送的数据保存到存储器中,将所发送数据以前述的方法解析,与从节点建立连接,将所发送的数据拆分,封装为固定长度的数据段后发送至从节点,传输结束后,根据从节点发送的CRC结果比较信息确定是否重发数据。并在预定的时间向从节点发送节点复位命令,从节点运行前述所接收到的数据。The master node can download the data to be sent through the network, or save the sent data in the memory in advance, analyze the sent data with the aforementioned method, establish a connection with the slave node, split the sent data, and encapsulate it into a fixed After the data segment of the length is sent to the slave node, after the transmission is completed, it is determined whether to resend the data according to the CRC result comparison information sent by the slave node. And send a node reset command to the slave node at a predetermined time, and the slave node executes the aforementioned received data.
作为主节点控制整个数据的传输流程,主节点的设定既可以是CAN网络中的设备,也可以将其它设备设定为主节点后再接入到CAN网络中作为CAN网络中的主节点,如便携式计算机。As the master node controls the entire data transmission process, the master node can be set as a device in the CAN network, or other devices can be set as the master node and then connected to the CAN network as the master node in the CAN network. Such as a laptop computer.
从节点实时响应主节点的发送数据请求,将接收的数据可以保存到存储器中空闲的空间,也可以将接收到数据覆盖其它需要更新的相应数据,并对于每次所接收到的数据向主节点返回应答信息。数据接收完毕后,通过数据计算CRC结果,向主节点返回确认信息。在接到主节点的复位消息后,重新复位并运行相应的数据。The slave node responds to the master node's request to send data in real time, saves the received data in the free space in the memory, or overwrites the received data with other corresponding data that needs to be updated, and sends the data to the master node for each received data Return response information. After the data is received, the CRC result is calculated through the data, and the confirmation information is returned to the master node. After receiving the reset message from the master node, reset and run the corresponding data again.
通过本发明的方法和系统可在CAN网络中对各个节点做软件更新。参见图2,Through the method and system of the present invention, software updates can be performed on each node in the CAN network. See Figure 2,
假设系统中含有201、202、203、204、205共5个CAN网络节点,其中,节点201设定为主节点,从节点202、203、204需要做软件更新,且更新的软件互不相同,主节点事先存储需要发送的软件数据与节点的对应关系,如软件数据001.bin对应从节点202,软件数据002.bin对应节点从203,软件数据003.bin对应从节点204。Assume that the system contains 5
如果要对从节点202做软件更新,主节点解析001.bin软件数据后,通过事先存储的需要更新的软件与从节点的对应关系,与从节点202建立连接,按上述文件传输的方法将001.bin软件数据发送至从节点202上,从节点收到数据后保存,并计算CRC校验结果发送至主节点。If you want to update the software of the
主节点如果收到正确的应答消息后,整个更新过程完成,可以在预定的时间向从节点202发送节点复位消息进行复位操作,复位后从节点202运行新的软件数据。该节点复位消息参见表11,If the master node receives the correct response message, the entire update process is completed, and can send a node reset message to the
表11Table 11
以上所述在本发明的方法和系统中使用的各类消息在本发明的方法中还有未定义的部分,可以根据需要添加其它信息以实现更多的功能。The above-mentioned various messages used in the method and system of the present invention still have undefined parts in the method of the present invention, and other information can be added as required to realize more functions.
本发明还提供两种控制局域网中实现数据传输的设备,该设备具有CAN网络节点的特性,参见图3,The present invention also provides two kinds of equipment that realizes data transmission in the control local area network, and this equipment has the characteristic of CAN network node, referring to Fig. 3,
主节点设备301包括数据解析单元303、数据处理单元304、收发控制单元305、复位控制单元302,其中,The
数据解析单元303用于从所发送的数据中解析出接收该数据的从节点处理器名称、该数据的大小、CRC结果;The
数据处理单元304用于将所发送的数据拆分后,以固定长度的数据段封装通过收发控制单元305发送至从节点306;The
收发控制单元305用于将来自数据处理单元304中的数据发送至从节点306,响应从节点306发送的消息进行处理;The
复位控制单元302用于向从节点306发送复位命令,控制从节点306重新复位。The
从节点设备306包括数据解析单元308、数据处理单元309、收发控制单元310、节点复位单元307,其中,The
数据处理单元309用于从收发控制单元310中接收到的数据写入到存储器中合并;The
收发控制单元310用于接收来自主节点301发送的数据发送至数据处理单元309,向主节点301发送收到数据后的响应消息;The
数据解析单元308用于将数据处理单元309所保存的数据解析出数据大小、CRC结果,并进行CRC结果比较;The
节点复位单元307用于从收发控制单元310收到复位消息后重新复位该节点,运行新的数据。The
对于本发明的方法、系统和设备,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。For the method, system and equipment of the present invention, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2006100893204ACN101094165B (en) | 2006-06-19 | 2006-06-19 | A method, system and device for controlling data transmission in a local area network |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2006100893204ACN101094165B (en) | 2006-06-19 | 2006-06-19 | A method, system and device for controlling data transmission in a local area network |
| Publication Number | Publication Date |
|---|---|
| CN101094165Atrue CN101094165A (en) | 2007-12-26 |
| CN101094165B CN101094165B (en) | 2010-12-08 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2006100893204AExpired - Fee RelatedCN101094165B (en) | 2006-06-19 | 2006-06-19 | A method, system and device for controlling data transmission in a local area network |
| Country | Link |
|---|---|
| CN (1) | CN101094165B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101572690B (en)* | 2008-04-30 | 2012-07-04 | 十堰科纳汽车电器有限公司 | Transmitting, receiving and network adapters and method for transmitting and receiving LIN frame |
| CN103078919A (en)* | 2012-12-28 | 2013-05-01 | 中国人民解放军国防科学技术大学 | Data transmission method for secondary encapsulation |
| CN103809991A (en)* | 2012-11-12 | 2014-05-21 | 中国北车股份有限公司 | Input/output control device and online programming method thereof |
| CN104239092A (en)* | 2014-08-25 | 2014-12-24 | 国网电力科学研究院 | Online updating method for program based on remote wireless channel with packet-reissuing system |
| CN104484205A (en)* | 2014-12-17 | 2015-04-01 | 华为技术有限公司 | IO (Input/Output) equipment firmware upgrading device and IO equipment firmware upgrading method |
| CN104679541A (en)* | 2013-11-28 | 2015-06-03 | 北车大连电力牵引研发中心有限公司 | Train network control system and application downloading method |
| CN106411968A (en)* | 2015-07-28 | 2017-02-15 | 北京志方信城机电设备有限公司 | Data transmission method, vending machine and system |
| CN107257270A (en)* | 2017-05-31 | 2017-10-17 | 张超 | Data transmission method and system based on hybrid automatic repeat-request |
| CN107359961A (en)* | 2016-05-10 | 2017-11-17 | Ls 产电株式会社 | From apparatus control method |
| CN107769897A (en)* | 2016-08-23 | 2018-03-06 | 瑞萨电子株式会社 | Communication equipment and re-transmission controlling method |
| CN109547172A (en)* | 2018-12-14 | 2019-03-29 | 东莞见达信息技术有限公司 | Data transmission method, system and data transmitting equipment, data receiver |
| CN113746647A (en)* | 2020-05-27 | 2021-12-03 | 中国联合网络通信集团有限公司 | Data transmission method, node, electronic device and readable storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6363083B1 (en)* | 1999-03-12 | 2002-03-26 | Otis Elevator Company | Bilevel node identifiers in control area network (CAN) protocol |
| CN1187937C (en)* | 2003-01-21 | 2005-02-02 | 武汉理工大学 | Embedded in situ bus gateway |
| CN1287568C (en)* | 2003-09-02 | 2006-11-29 | 中兴通讯股份有限公司 | Method for transfering data within local area network |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101572690B (en)* | 2008-04-30 | 2012-07-04 | 十堰科纳汽车电器有限公司 | Transmitting, receiving and network adapters and method for transmitting and receiving LIN frame |
| CN103809991A (en)* | 2012-11-12 | 2014-05-21 | 中国北车股份有限公司 | Input/output control device and online programming method thereof |
| CN103078919A (en)* | 2012-12-28 | 2013-05-01 | 中国人民解放军国防科学技术大学 | Data transmission method for secondary encapsulation |
| CN103078919B (en)* | 2012-12-28 | 2016-03-23 | 中国人民解放军国防科学技术大学 | A kind of data transmission method of secondary encapsulation |
| CN104679541B (en)* | 2013-11-28 | 2018-05-29 | 中车大连电力牵引研发中心有限公司 | Train network control system and application program method for down loading |
| CN104679541A (en)* | 2013-11-28 | 2015-06-03 | 北车大连电力牵引研发中心有限公司 | Train network control system and application downloading method |
| CN104239092A (en)* | 2014-08-25 | 2014-12-24 | 国网电力科学研究院 | Online updating method for program based on remote wireless channel with packet-reissuing system |
| CN104484205A (en)* | 2014-12-17 | 2015-04-01 | 华为技术有限公司 | IO (Input/Output) equipment firmware upgrading device and IO equipment firmware upgrading method |
| CN104484205B (en)* | 2014-12-17 | 2017-12-12 | 华为技术有限公司 | A kind of update device and method of I/O device firmware |
| CN106411968A (en)* | 2015-07-28 | 2017-02-15 | 北京志方信城机电设备有限公司 | Data transmission method, vending machine and system |
| CN107359961A (en)* | 2016-05-10 | 2017-11-17 | Ls 产电株式会社 | From apparatus control method |
| CN107359961B (en)* | 2016-05-10 | 2020-08-14 | Ls 产电株式会社 | Slave device control method |
| CN107769897A (en)* | 2016-08-23 | 2018-03-06 | 瑞萨电子株式会社 | Communication equipment and re-transmission controlling method |
| CN107769897B (en)* | 2016-08-23 | 2022-02-08 | 瑞萨电子株式会社 | Communication apparatus and retransmission control method |
| CN107257270A (en)* | 2017-05-31 | 2017-10-17 | 张超 | Data transmission method and system based on hybrid automatic repeat-request |
| CN109547172A (en)* | 2018-12-14 | 2019-03-29 | 东莞见达信息技术有限公司 | Data transmission method, system and data transmitting equipment, data receiver |
| CN113746647A (en)* | 2020-05-27 | 2021-12-03 | 中国联合网络通信集团有限公司 | Data transmission method, node, electronic device and readable storage medium |
| CN113746647B (en)* | 2020-05-27 | 2023-12-19 | 中国联合网络通信集团有限公司 | Data transmission method, node, electronic device and readable storage medium |
| Publication number | Publication date |
|---|---|
| CN101094165B (en) | 2010-12-08 |
| Publication | Publication Date | Title |
|---|---|---|
| CN101094165B (en) | A method, system and device for controlling data transmission in a local area network | |
| KR100559025B1 (en) | Home network management system | |
| US9372682B2 (en) | Parallel programming and updating of lighting bus subscribers | |
| CN112104487B (en) | Remote upgrading method of Internet of things terminal, internet of things master station and storage medium | |
| US7051143B2 (en) | Method, system and program for the transmission of modbus messages between networks | |
| CN105024861B (en) | A kind of reliable remote communication means and its communicator based on big-dipper satellite | |
| US5644754A (en) | Bus controller and electronic device in a system in which several electronic devices are networked | |
| CN114222009A (en) | An industrial communication multi-protocol conversion system | |
| US20170331699A1 (en) | Ecu for transmitting large data in hil test environment, system including the same and method thereof | |
| KR101334017B1 (en) | Apparatus of checking a validity of message on network for a vehicle and method of thereof | |
| KR20040104326A (en) | Packet transferring method for data link layer | |
| CN106603506B (en) | Data communication method, device and system based on multi-field bus | |
| CN109217983B (en) | Industrial Internet of things operation terminal communication protocol design method | |
| CN106027198A (en) | Method and system for data aggregation in industrial communication protocols | |
| CN111464422B (en) | Interaction method, interaction device, electronic equipment and storage medium | |
| Cook et al. | Controller area network (can) | |
| JP2022514545A (en) | Large capacity daisy chain serial bus | |
| US7808917B2 (en) | Method and system for transmitting telegrams | |
| CN117997670A (en) | CAN controller, CAN device and method for CAN controller | |
| CN106713044A (en) | Data upgrading method and device | |
| CN109688208B (en) | Data loading method based on FC-AE-ASM message | |
| CN112395237B (en) | A method and system for communication between at least two controllers | |
| WO2023045795A1 (en) | Infrared communication method and apparatus, and storage medium and electronic apparatus | |
| CN106549845A (en) | A kind of communication means and system based on NTB hardware | |
| KR100900980B1 (en) | Data transmission system and method considering response delay of device |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20101208 |