A topological network and dynamic address initialization method
By designing a dynamic address initialization method between the main node and the ordinary node device in the vehicle audio network, the problem of topological network flexibility and initialization failure caused by the changes in the number of nodes and the changes in the device address is solved. Inference and system initialization.
Patent Information
- Application Number
- CN202211287899.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2042-10-20
AI Technical Summary
Changes in the number of nodes and device addresses in the on-board audio network require the topological network to be able to respond flexibly. The prior art is difficult to quickly and accurately infer the total number of ordinary node devices on the bus and their device addresses, and static address conflicts lead to failure of system initialization.
Design a topology network. The main node equipment and ordinary node equipment will send an initialized request frame through the downstream port after power -on. The general node equipment determines the dynamic address according to the feedback result, and generates the initialization response to confirm the transmission of the upstream device, the master node equipment Determine the number and address of the node device according to the dynamic address of the downstream equipment.
It realizes the fast and stable inference of the total number of common node devices on the bus and their device addresses in the vehicle audio network, shortens the initialization time, and solves the problem of static address conflicts caused by the addition and deletion of nodes.
Smart Images

Figure CN117221033B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a topology network and a dynamic address initialization method. Background Art
[0002] With the development of society, the types of electronic devices are becoming more and more abundant. In many scenarios, a single electronic device will not be able to meet the needs of users, and multiple electronic devices need to be combined into a topological network. Under the coordination of the topological network, multiple electronic devices work together. Taking the automotive audio network (AAN, Automotive Audio Network) in the topological network as an example, the automotive audio network is a serial communication network used to interconnect car audio devices. It connects the head unit (Head Unit), digital microphone, radio, power amplifier (PA) and emergency call (E-Call / Telematics) module and other automotive electronic devices in series.
[0003] The topology of the in-vehicle audio network is not fixed. The master node devices and common node devices in the in-vehicle audio network will change with the status of the in-vehicle devices. The multi-node in-vehicle audio network is required to be able to flexibly respond to changes in the number of such nodes and device addresses, so as to ensure that the distributed multi-node in-vehicle audio network can accurately infer the total number of common nodes on the bus and their device addresses. This has also become a difficult problem that technicians in this field continue to pay attention to. Summary of the invention
[0004] The purpose of the present application is to provide a topology network and a dynamic address initialization method to at least partially improve the above problems.
[0005] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides a topology network, the topology network comprising a master node device and at least one common node device, the master node device and the at least one common node device being connected in sequence;
[0007] The master node device and the common node device are used to send an initialization request frame through a downstream port after being powered on;
[0008] The common node device is used to determine its own dynamic address according to the feedback result when obtaining the feedback result of the initialization request frame;
[0009] The feedback result includes a downstream port response timeout or a downstream port dangling or an initialization response confirmation frame of a downstream device, and the initialization response confirmation frame of the downstream device includes a dynamic address of the downstream device;
[0010] The common node device is also used to generate a corresponding initialization response confirmation frame according to its own dynamic address, and transmit the generated initialization response confirmation frame to the upstream device through the upstream port;
[0011] The master node device is further configured to determine the number of node devices in the topology network and the dynamic address of each node device based on the dynamic address of the downstream device after receiving the initialization response confirmation frame of the corresponding downstream device.
[0012] Optionally, the common node device is deployed with a port status detection circuit, and the common node device is further used to determine whether its downstream port is suspended through the port status detection circuit after power-on.
[0013] Optionally, the common node device is further configured to determine that the downstream port response times out if no initialization response frame of the corresponding downstream device is received within a first preset time after sending the initialization request frame through the downstream port;
[0014] The initialization response frame includes an initialization response waiting frame and an initialization response confirmation frame.
[0015] Optionally, the master node device and the ordinary node device are also used to feed back an initialization response waiting frame to the corresponding upstream device every second preset time period after receiving the initialization request frame transmitted by the upstream device, until the generated initialization response confirmation frame is transmitted to the upstream device through the upstream port.
[0016] Optionally, the master node device and the common node device are deployed with a response timer, and the response timer is used for timing.
[0017] Optionally, the topology network is a serial topology network, the downstream port of the master node device is connected to the upstream port of the first ordinary node device, the upstream port of the i-th ordinary node device is connected to the downstream port of the i-1-th ordinary node device, and the downstream port of the n-th ordinary node device is left floating, 2≤i≤n, n is the number of the ordinary node devices.
[0018] Optionally, the topology network is a ring topology network, the downstream port of the master node device is connected to the upstream port of the first ordinary node device, the upstream port of the i-th ordinary node device is connected to the downstream port of the i-1-th ordinary node device, and the downstream port of the n-th ordinary node device is connected to the upstream port of the master node device, 2≤i≤n, n is the number of the ordinary node devices.
[0019] In a second aspect, an embodiment of the present application provides a method for initializing a dynamic address of a topology network, which is applied to the above-mentioned topology network, and the method includes:
[0020] After being powered on, the master node device and the common node device send an initialization request frame to a downstream port;
[0021] When the common node device obtains the feedback result of the initialization request frame, the common node device determines its own dynamic address according to the feedback result;
[0022] The feedback result includes downstream port dangling information or an initialization response confirmation frame of a downstream device, and the initialization response confirmation frame of the downstream device includes a dynamic address of the downstream device;
[0023] The common node device generates a corresponding initialization response confirmation frame according to its own dynamic address, and transmits the generated initialization response confirmation frame to the upstream device through the upstream port;
[0024] After receiving the initialization response confirmation frame of the corresponding downstream device, the master node device determines the number of node devices in the topology network and the dynamic address of each node device based on the dynamic address of the downstream device.
[0025] Optionally, the common node device is deployed with a port status detection circuit, and the method further includes:
[0026] After being powered on, the common node device determines whether its downstream port is suspended through the port status detection circuit.
[0027] Optionally, the method further comprises:
[0028] The common node device is deployed to determine that the downstream port response times out if the corresponding downstream device's initialization response frame is not received within a first preset time after sending the initialization request frame through the downstream port;
[0029] The initialization response frame includes an initialization response waiting frame and an initialization response confirmation frame.
[0030] Compared with the prior art, a topology network and a dynamic address initialization method provided by an embodiment of the present application include a master node device and at least one common node device, the master node device and at least one common node device are connected in sequence; the master node device and the common node device are used to send an initialization request frame through a downstream port after power-on; the common node device is used to determine its own dynamic address according to the feedback result when obtaining the feedback result of the initialization request frame; the common node device is also used to generate a corresponding initialization response confirmation frame according to its own dynamic address, and transmit the generated initialization response confirmation frame to the upstream device through the upstream port; the master node device is also used to determine the number of node devices in the topology network and the dynamic address of each node device based on the dynamic address of the downstream device after receiving the initialization response confirmation frame of the corresponding downstream device. After power-on, each node device directly notifies the downstream device to perform initialization confirmation, without waiting for the broadcast message of the master node device, so that the total number of common node devices on the bus and their device addresses can be quickly and stably inferred, shortening the initialization time. Because the dynamic address allocation method is adopted, the problem of system initialization failure caused by static address conflicts caused by node addition and deletion can also be solved.
[0031] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 A schematic diagram of the topology of the in-vehicle audio network provided in an embodiment of the present application;
[0034] Figure 2 A schematic diagram of the structure of a serial topology network provided in an embodiment of the present application;
[0035] Figure 3 A schematic diagram of the structure of a ring topology network provided in an embodiment of the present application;
[0036] Figure 4 A schematic diagram of the initialization process provided in an embodiment of the present application;
[0037] Figure 5 A flowchart of a method for initializing a dynamic address of a topology network provided in an embodiment of the present application.
[0038] In the figure: 11-main node device; 12-ordinary node device. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0040] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0041] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0042] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0043] In the description of the present application, it should be noted that the terms "upper", "lower", "inside", "outside", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the product of the application is usually placed when in use. They are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0044] In the description of this application, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "disposed" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0045] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0046] Please refer to Figure 1 , Figure 1 A schematic diagram of the topology of the in-vehicle audio network provided in the embodiment of the present application. It should be understood that the topology in the in-vehicle audio network is not fixed, and the master node devices and ordinary node devices in the in-vehicle audio network will change with the state of the in-vehicle devices, requiring the multi-node in-vehicle audio network to be able to flexibly respond to changes in the number of such nodes and device addresses, thereby ensuring that the distributed multi-node in-vehicle audio network can accurately infer the total number of ordinary nodes on the bus and their device addresses.
[0047] The conventional practice is that the master node device sends commands to each ordinary node device in sequence through the serial line by broadcasting. After receiving the broadcast command, each ordinary node sends its own static device address to the master node device in sequence, thereby ensuring that the master node device can infer the total number of ordinary node devices connected to the bus and their device addresses. However, in this way, if there are too many ordinary node devices, it will take a long time for the end ordinary node device to receive the broadcast command sent by the master node device, and it will take a long time for the end ordinary node device to pass its device address to the master node device, resulting in the entire system taking more time to initialize. And when the ordinary node device address is a static address, it is easy to cause node identification conflicts due to the increase of node devices, that is, the static address conflicts corresponding to the node devices, resulting in the need for additional software overhead to ensure that the entire audio system can be initialized correctly.
[0048] In order to overcome the above problems, the present application embodiment provides a topology network. Figure 2 and Figure 3 , Figure 2 A schematic diagram of the structure of a serial topology network provided in an embodiment of the present application, Figure 3 A schematic diagram of the structure of a ring topology network provided in an embodiment of the present application.
[0049] like Figure 2 and Figure 3As shown, the topology network includes a master node device 11 and at least one common node device 12, and the master node device 11 and at least one common node device 12 are connected in sequence.
[0050] Alternatively, if Figure 2 As shown, the topology network is a serial topology network, and the downstream port of the master node device 11 is connected to the first common node device 12 (ie Figure 2 The upstream port of the ith ordinary node device 12 is connected to the downstream port of the i-th ordinary node device 12, and the nth ordinary node device 12 (i.e. Figure 2 The downstream port of the No. 3 ordinary node device) is left unconnected, 2≤i≤n, and n is the number of ordinary node devices.
[0051] Alternatively, if Figure 3 As shown, the topology network is a ring topology network, and the downstream port of the master node device 11 is connected to the first common node device 12 (ie Figure 3 The upstream port of the ith ordinary node device 12 is connected to the downstream port of the i-th ordinary node device 12, and the nth ordinary node device 12 (i.e. Figure 3 The downstream port of the ordinary node device No. 3 in the network is connected to the upstream port of the master node device 11, 2≤i≤n, and n is the number of ordinary node devices.
[0052] It should be noted that Figure 2 and Figure 3 In the description, n=3 is taken as an example, but it is not limited thereto.
[0053] It should be understood that Figure 2 and Figure 3 The topology network shown can be, but is not limited to, an in-vehicle audio network. When it is an in-vehicle audio network, other devices connected to the common node device 12 through the local port can be, but are not limited to, digital microphones, radios, power amplifiers (PA), and emergency calls (E-Call / Telematics). The main control device connected to the master node device 11 through the local port can be, but is not limited to, a head unit.
[0054] When the topology network provided in the embodiment of the present application is initialized, it is ensured that the master node device in the topology network can quickly and stably infer the total number of common node devices on the bus and their device addresses, shorten the initialization time, and solve the problem of system initialization failure caused by static address conflicts caused by node addition and deletion. For details, please refer to Figure 4 , Figure 4 A schematic diagram of the initialization process provided for an embodiment of the present application.
[0055] The master node device 11 and the common node device 12 are used to send initialization request frames through downstream ports after being powered on.
[0056] It should be understood that after any node device in the topology network is powered on, it sends a control frame containing initialization information, namely, an initialization request frame, through its downstream port. All node devices on the bus must send an initialization request frame within TSTART time after the system is powered on, and be ready to respond to the initialization response frame, which includes an initialization response wait frame and an initialization response confirmation frame.
[0057] Please refer to Table 1 and Table 2 below. Table 1 below shows a possible initialization request frame structure.
[0058]
[0059] Table 1
[0060] Table 2 below is a structural description of the initialization request frame shown in Table 1.
[0061]
[0062]
[0063] Table 2
[0064] The common node device 12 is also used to determine its own dynamic address according to the feedback result when obtaining the feedback result of the initialization request frame.
[0065] The feedback result includes a downstream port response timeout or a downstream port being unconnected or an initialization response confirmation frame of a downstream device, and the initialization response confirmation frame of the downstream device includes a dynamic address of the downstream device.
[0066] Optionally, the downstream device is a node device connected to its downstream port; the upstream device is a node device connected to its upstream port. For example, the downstream device of the master node device 11 is the No. 1 common node device 12, and the No. 1 common node device 12 is the upstream device of the No. 2 common node device.
[0067] It should be noted that if the common node device 12 can determine that its downstream port is unconnected before sending the initialization request frame through the downstream port, it does not need to send the initialization request frame to the downstream port, and can directly determine its own dynamic address.
[0068] Optionally, refer to Figure 2 ,like Figure 2 The downstream port of the No. 3 common node device 12 is left unconnected. In this case, the No. 3 common node device 12 may determine that its corresponding dynamic address is the first agreed address, for example but not limited to the first agreed address=1.
[0069] In an optional implementation, the downstream port of the No. 3 common node device 12 is connected to the upstream port of the No. 4 common node device 12. After being powered on, the No. 3 common node device 12 sends an initialization request frame to the downstream port and sends the initialization request frame to the downstream port within a first preset time (T TIMEOUT ) time, no initialization response frame is received from ordinary node device No. 4 12. At this time, ordinary node device No. 3 12 determines that the downstream port response has timed out, and can determine that its corresponding dynamic address is the first agreed address, for example but not limited to the first agreed address = 1.
[0070] Optionally, refer to Figure 3 ,like Figure 3 The downstream port of ordinary node device No. 3 12 is connected to the upstream port of master node device 11, that is, master node device 11 is the downstream device of ordinary node device No. 3 12. The dynamic address of master node device 11 is the second agreed address, for example but not limited to the second agreed address = 0. When master node device 11 obtains the initialization request frame transmitted by ordinary node device No. 3 12, master node device 11 feeds back its corresponding initialization response confirmation frame to ordinary node device No. 3 12 through its upstream port. The initialization response confirmation frame fed back by the master node device 11 includes the second agreed address corresponding to the master node device 11. When ordinary node device No. 3 12 obtains the initialization response confirmation frame including the second agreed address, it can determine that its corresponding dynamic address is the first agreed address, for example but not limited to the first agreed address = 1.
[0071] Please refer to Figure 4 , assuming that the dynamic address in the initialization response confirmation frame fed back by ordinary node device No. 3 12 to ordinary node device No. 2 12 = 1. Ordinary node device No. 2 parses the received initialization response confirmation frame to determine that the dynamic address of its downstream device = 1. Ordinary node device No. 2 12 can make adjustments based on the dynamic address = 1 according to the preset change rule, thereby obtaining the dynamic address of ordinary node device No. 2 12 itself, for example, its own dynamic address = 2. Similarly, other ordinary node devices 12 can determine their own dynamic addresses after obtaining the initialization response confirmation frame fed back by the downstream device.
[0072] It should be noted that the preset changing rule can be but is not limited to +1, +2 and +3, etc., and can also be a letter combination jump rule, which is not limited here.
[0073] The common node device 12 is further used to generate a corresponding initialization response confirmation frame according to its own dynamic address, and transmit the generated initialization response confirmation frame to the upstream device through the upstream port.
[0074] It should be understood that the ordinary node device 12 uses a layer-by-layer progressive method, and eventually a downstream device of the master node device 11 (for example, ordinary node device No. 1 12 ) feeds back an initialization response confirmation frame to the master node device 11 .
[0075] The master node device 11 is further configured to determine the number of node devices in the topology network and the dynamic address of each node device based on the dynamic address of the downstream device after receiving the initialization response confirmation frame of the corresponding downstream device.
[0076] It should be understood that each node device only sends the dynamic address of the current node device to the upstream port. After the master node device 11 determines the number of node devices in the topology network and the dynamic addresses of each node device, it indicates that the initialization operation of the topology network is completed. In the present application scheme, after power-on, each node device directly notifies the downstream device to confirm the initialization, without waiting for the broadcast message of the master node device 11, so that the total number of ordinary node devices on the bus and their device addresses can be quickly and stably inferred, shortening the initialization time. Because the dynamic address allocation method is adopted, the problem of system initialization failure caused by static address conflicts due to node additions and deletions can also be solved.
[0077] Optionally, please refer to Table 3 and Table 4 below. Table 3 below shows a possible initialization response confirmation frame structure.
[0078]
[0079] Table 3
[0080] Table 4 below is a structural description of the initialization response confirmation frame shown in Table 3.
[0081]
[0082]
[0083] Table 4
[0084] In an optional implementation, the common node device 12 is deployed with a port status detection circuit, and the common node device 12 is further configured to determine whether its downstream port is suspended through the port status detection circuit after power-on.
[0085] It should be noted that when the ordinary node device 12 determines that its downstream port is unconnected, it does not need to continue waiting for the downstream port to feedback the initialization response frame, but directly determines its own dynamic address and feedbacks the initialization response confirmation frame to the upstream device, which can further save the initialization time.
[0086] In an optional implementation, the master node device 11 and the common node device 12 are deployed with a response timer, and the response timer is used for timing.
[0087] In an optional implementation, the common node device 12 is further configured to determine that the downstream port response times out if no initialization response frame from the corresponding downstream device is received within a first preset time period after sending an initialization request frame through the downstream port.
[0088] The initialization response frame includes an initialization response waiting frame and an initialization response confirmation frame.
[0089] For example, Figure 4 The ordinary node device No. 3 12 in the waiting time is the first preset time length (T TIMEOUT ), still no initialization response waiting frame or initialization response confirmation frame is received, at this time No. 3 ordinary node device 12 can determine that the downstream port response has timed out, and can determine that its corresponding dynamic address is the first agreed address.
[0090] Optionally, after sending the initialization request frame through the downstream port, the ordinary node device 12 starts its local response timer and starts timing. If no initialization response frame is received when the response timer times out the first preset time, it is determined that the downstream port response has timed out. If within the first preset time, the ordinary node device 12 receives the initialization response waiting frame fed back by the downstream device, it resets its local response timer and restarts timing. If within the first preset time, the ordinary node device 12 receives the initialization response confirmation frame fed back by the downstream device, it can stop timing and obtain the dynamic address of the downstream device based on the initialization response confirmation frame fed back by the downstream device.
[0091] In order to avoid timeouts between downstream devices and upstream devices, the present application embodiment also provides an optional implementation method, please refer to Figure 4 .
[0092] The master node device 11 and the common node device 12 are also used to, after receiving the initialization request frame transmitted by the upstream device, send a second preset time (T DEFER ), feeds back an initialization response waiting frame to the corresponding upstream device until the generated initialization response confirmation frame is transmitted to the upstream device through the upstream port.
[0093] like Figure 4 As shown, after receiving the initialization request frame and before feeding back the initialization response confirmation frame, the ordinary node device No. 2 12 and the ordinary node device No. 1 12 send a second preset time (T DEFER ), feeds back an initialization response waiting frame to the corresponding upstream device to prevent the upstream device from determining that its downstream port response has timed out.
[0094] Optionally, after the node device receives the initialization request frame from its upstream port, the local response timer is started. The response timer reaches the second preset response timer duration (T DEFER ), and the node device does not receive an initialization response confirmation frame from the downstream port, the node device sends an initialization response wait frame from the upstream port.
[0095] Optionally, please refer to Table 5 and Table 6 below. Table 5 below shows a possible initialization response confirmation frame structure.
[0096]
[0097] Table 5
[0098] Table 6 below is a structural description of the initialization response wait frame shown in Table 5.
[0099]
[0100] Table 6
[0101] It should be noted that, in the present application solution, the dynamic address of the master node device 11 can be fixed to the second agreed address, for example but not limited to 0.
[0102] In summary, the embodiment of the present application provides a topology network, including a master node device and at least one common node device, the master node device and at least one common node device are connected in sequence; the master node device and the common node device are used to send an initialization request frame through a downstream port after power-on; the common node device is used to determine its own dynamic address according to the feedback result when obtaining the feedback result of the initialization request frame; the common node device is also used to generate a corresponding initialization response confirmation frame according to its own dynamic address, and transmit the generated initialization response confirmation frame to the upstream device through the upstream port; the master node device is also used to determine the number of node devices in the topology network and the dynamic address of each node device based on the dynamic address of the downstream device after receiving the initialization response confirmation frame of the corresponding downstream device. After power-on, each node device directly notifies the downstream device to perform initialization confirmation, without waiting for the broadcast message of the master node device, so that the total number of common node devices on the bus and their device addresses can be quickly and stably inferred, shortening the initialization time. Because the dynamic address allocation method is adopted, the problem of system initialization failure caused by static address conflicts caused by node addition and deletion can also be solved.
[0103] It should be understood that Figure 2 and Figure 3 The structure shown is only a schematic diagram of a portion of the topological network. The topological network may also include Figure 2 and Figure 3 More or fewer components as shown, or with Figure 2and Figure 3 Different configurations shown. Figure 2 and Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0104] The present invention provides a method for initializing a topology network dynamic address, which can be applied to but not limited to Figure 2 and Figure 3 The topology network shown in the figure, for the specific process, please refer to Figure 5 , the topology network dynamic address initialization method includes: S101, S102, S103 and S104, which are specifically described as follows.
[0105] S101, after being powered on, the master node device and the common node device send an initialization request frame through a downstream port.
[0106] S102, when the common node device obtains the feedback result of the initialization request frame, it determines its own dynamic address according to the feedback result.
[0107] The feedback result includes downstream port dangling information or an initialization response confirmation frame of a downstream device, and the initialization response confirmation frame of the downstream device includes a dynamic address of the downstream device.
[0108] S103, the common node device generates a corresponding initialization response confirmation frame according to its own dynamic address, and transmits the generated initialization response confirmation frame to the upstream device through the upstream port.
[0109] S104, after receiving the initialization response confirmation frame of the corresponding downstream device, the master node device determines the number of node devices in the topology network and the dynamic address of each node device based on the dynamic address of the downstream device.
[0110] In an optional implementation manner, the common node device is deployed with a port status detection circuit, and the topology network dynamic address initialization method further includes:
[0111] After being powered on, a common node device determines whether its downstream port is suspended through a port status detection circuit.
[0112] In an optional implementation, the topology network dynamic address initialization method further includes:
[0113] After the common node device sends the initialization request frame through the downstream port, if the corresponding initialization response frame of the downstream device is not received within a first preset time, it is determined that the downstream port response has timed out;
[0114] The initialization response frame includes an initialization response waiting frame and an initialization response confirmation frame.
[0115] In an optional implementation, the topology network dynamic address initialization method further includes:
[0116] The master node device and the ordinary node device are also used to feedback the initialization response waiting frame to the corresponding upstream device every second preset time after receiving the initialization request frame transmitted by the upstream device, until the generated initialization response confirmation frame is transmitted to the upstream device through the upstream port.
[0117] It should be noted that the topology network dynamic address initialization method provided in this embodiment can perform the functions and purposes shown in the above topology network embodiment to achieve the corresponding technical effects. For the sake of brief description, for parts not mentioned in this embodiment, please refer to the corresponding contents in the above embodiment.
[0118] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0119] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A topological network, characterized in that: The topology network includes a master node device and at least one common node device, and the master node device and the at least one common node device are connected in sequence; The master node device and the common node device are used to send an initialization request frame through a downstream port after power-on; The common node device is used to determine its own dynamic address according to the feedback result when obtaining the feedback result of the initialization request frame; The feedback result includes a downstream port response timeout or a downstream port dangling or an initialization response confirmation frame of a downstream device, and the initialization response confirmation frame of the downstream device includes a dynamic address of the downstream device; The common node device is also used to generate a corresponding initialization response confirmation frame according to its own dynamic address, and transmit the generated initialization response confirmation frame to the upstream device through the upstream port; The master node device is further configured to determine the number of node devices in the topology network and the dynamic address of each node device based on the dynamic address of the downstream device after receiving the initialization response confirmation frame of the corresponding downstream device.
2. The topological network according to claim 1, characterized in that: The common node device is deployed with a port status detection circuit, and the common node device is also used to determine whether its downstream port is suspended through the port status detection circuit after power-on.
3. The topological network according to claim 1, characterized in that: The common node device is further used to determine that the downstream port response times out if no initialization response frame of the corresponding downstream device is received within a first preset time after sending the initialization request frame through the downstream port; The initialization response frame is an initialization response waiting frame or an initialization response confirmation frame.
4. The topological network according to claim 1, characterized in that: The master node device and the ordinary node device are also used to feed back an initialization response waiting frame to the corresponding upstream device every second preset time after receiving the initialization request frame transmitted by the upstream device, until the generated initialization response confirmation frame is transmitted to the upstream device through the upstream port.
5. The topological network according to claim 1, characterized in that: The master node device and the common node device are deployed with a response timer, and the response timer is used for timing.
6. The topological network according to claim 1, characterized in that: The topology network is a serial topology network, the downstream port of the master node device is connected to the upstream port of the first common node device, the upstream port of the i-th common node device is connected to the downstream port of the i-1-th common node device, and the downstream port of the n-th common node device is left floating, 2≤i≤n, n is the number of the common node devices.
7. The topological network according to claim 1, characterized in that: The topology network is a ring topology network, the downstream port of the master node device is connected to the upstream port of the first ordinary node device, the upstream port of the i-th ordinary node device is connected to the downstream port of the i-1-th ordinary node device, and the downstream port of the n-th ordinary node device is connected to the upstream port of the master node device, 2≤i≤n, n is the number of the ordinary node devices.
8. A method for initializing a dynamic address of a topology network, characterized in that: Applied to the topological network described in any one of claims 1 to 7 above, the method comprises: After being powered on, the master node device and the common node device send an initialization request frame to a downstream port; When the common node device obtains the feedback result of the initialization request frame, the common node device determines its own dynamic address according to the feedback result; The feedback result includes downstream port dangling information or an initialization response confirmation frame of a downstream device, and the initialization response confirmation frame of the downstream device includes a dynamic address of the downstream device; The common node device generates a corresponding initialization response confirmation frame according to its own dynamic address, and transmits the generated initialization response confirmation frame to the upstream device through the upstream port; After receiving the initialization response confirmation frame of the corresponding downstream device, the master node device determines the number of node devices in the topology network and the dynamic address of each node device based on the dynamic address of the downstream device.
9. The method for initializing a topology network dynamic address as claimed in claim 8, characterized in that: The common node device is deployed with a port status detection circuit, and the method further includes: After being powered on, the common node device determines whether its downstream port is suspended through the port status detection circuit.
10. The method for initializing a topology network dynamic address according to claim 8, characterized in that: The method further comprises: The common node device is deployed to determine that the downstream port response times out if the corresponding downstream device's initialization response frame is not received within a first preset time after sending the initialization request frame through the downstream port; The initialization response frame is an initialization response waiting frame or an initialization response confirmation frame.
Citation Information
Patent Citations
Method, device and equipment for adaptive addressing and addressing, and storage medium
CN112599082A