CN110474993A - Node addressing system, method and device - Google Patents

Node addressing system, method and device Download PDF

Info

Publication number
CN110474993A
CN110474993A CN201810437820.5A CN201810437820A CN110474993A CN 110474993 A CN110474993 A CN 110474993A CN 201810437820 A CN201810437820 A CN 201810437820A CN 110474993 A CN110474993 A CN 110474993A
Authority
CN
China
Prior art keywords
node
address information
addressing
external trigger
host
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
CN201810437820.5A
Other languages
Chinese (zh)
Other versions
CN110474993B (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Hangzhou Hikrobot Co Ltd
Original Assignee
Hangzhou Haikang Robot 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 Hangzhou Haikang Robot Technology Co Ltd filed Critical Hangzhou Haikang Robot Technology Co Ltd
Priority to CN201810437820.5A priority Critical patent/CN110474993B/en
Publication of CN110474993A publication Critical patent/CN110474993A/en
Application granted granted Critical
Publication of CN110474993B publication Critical patent/CN110474993B/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
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5038Address allocation for local use, e.g. in LAN or USB networks, or in a controller area network [CAN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5092Address allocation by self-assignment, e.g. picking addresses at random and testing if they are already in use
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a kind of node addressing systems, method and device, belong to bussing technique field.Described from node including host node and from node, for after detecting external trigger, Xiang Suoshu host node sends addressing request, and the state of node address information of waiting is set to from node by described;The host node, for after receiving addressing request, Xiang Suoshu is from node sending node address information;Slave node in the state for waiting node address information, is also used to receive the node address information, and store the node address information.In the present invention, after assembly node addressing system, only external trigger need to be triggered to from node, it can be addressed automatically, without the node address information different for different node burnings, the time of the manufacturing process of node is dramatically saved, improves the efficiency of the manufacturing process of node.

Description

Node addressing system, method and device
Technical field
The present invention relates to bussing technique field, in particular to a kind of node addressing system, method and device.
Background technique
CAN (Controller Area Network, controller LAN) bus is that most widely used scene is total at present One of line, each node may be mounted in CAN bus, are electrically connected by CAN bus and other nodes, thus and its He communicates node.Wherein, it needs to address each node, to distinguish different nodes.
In current addressing process, node address information corresponding to each node burning is needed, node address information is used In uniquely indicating corresponding node, the node address information of different node burnings is different, after burning node address information, node Memory node address information can be solidified.
In the implementation of the present invention, inventor find the relevant technologies the prior art has at least the following problems:
It needs to cause the manufacturing process of node excessively cumbersome for the corresponding node address information of each node burning.
Summary of the invention
The embodiment of the invention provides a kind of node addressing systems, method and device, are able to solve the relevant technologies interior joint The excessively cumbersome problem of manufacturing process.The technical solution is as follows:
On the one hand, a kind of node addressing system is provided, including host node and from node;
Described for after detecting external trigger, Xiang Suoshu host node sends addressing request from node, and by institute State the state for being set to from node and waiting node address information;
The host node, for after receiving addressing request, Xiang Suoshu is from node sending node address information;
Slave node in the state for waiting node address information, is also used to receive the node address information, and deposit Store up the node address information.
In a kind of possible realization, the external trigger is successively triggered at least two from node.
It is described from node in a kind of possible realization, it is also used to after storing the node address information, according to first Default prompting mode is prompted.
In this realization, whether user can be distinguished from whether node addressing finishes, learning is by prompting from node No needs continue to trigger external trigger, so, it is possible the process for helping and guiding the addressing of user's control node addressing system, The learning cost of user is reduced, it is more humanized.
In a kind of possible realization, the host node, be also used to at least one node address information to be allocated by It is ranked up according to the size of numerical value;When receiving any one from the addressing of node request, obtains the addressing request and connecing The sequence in addressing request received;It is chosen from least one described node address information and ranks section corresponding with the sequence Dot address information, by the node address information distribute to it is described any one from node.
In a kind of possible realization, the host node is also used to send first state switching command from node to described;
It is described from node, after being also used to receive the first state switching command, be set to real-time detection external trigger thing The state of part.
In a kind of possible realization, the host node is also used to start when sending the first state switching command Timing;When timing duration is more than preset duration, and does not receive addressing request yet, Xiang Suoshu sends the second state from node and cuts Change instruction;
It is described from node, when being also used to receive second status switching instruction, exit touching outside the real-time detection The state of hair event.
In a kind of possible realization, the node addressing system is applied in unmanned plane;
It is described from node be unmanned plane propeller, the external trigger is to stir the propeller of unmanned plane;Or, institute It states and is adjusted from the electricity that node is unmanned plane, the external trigger is the propeller stirred electricity and adjust connection;Or, described be from node The holder of unmanned plane, the external trigger are to stir the axis of holder.
In a kind of possible realization, the external trigger triggers after the completion of the node addressing system assembles; And/or
The external trigger is newly installed in the node addressing system and is triggered after node;And/or
The external trigger is replaced in the node addressing system and is triggered after node.
In a kind of possible realization, the storage node address information, comprising: receiving the host node After store instruction, the node address information is stored.
In a kind of possible realization, the host node is also used to the inspection from node sending node address information Look into instruction;
It is described to be also used to after receiving the inspection instruction from node, when the node address information of the inspection instruction When consistent with the node address information stored from node, the host node is notified to have received the inspection instruction;
The host node is also used to determine the node when having received the inspection from node notice and instructing for one Address information addressing is correct;When at least two, which have received the inspection from node notice, instructs, the node address is determined Information addressing repeats;When not from node notice have received inspections instruction when, determine the node address information not at Function addressing.
In a kind of possible realization, the host node, be also used to when determine node address information addressing repeat or When failed addressing, prompted according to the second default prompting mode.
On the other hand, it provides a kind of from node addressing method, which comprises
After detecting the external trigger from node, addressing request is sent to host node;
It is set to the state for waiting node address information;
Receive the node address information that the host node is sent;
Store the node address information.
It is described after detecting the external trigger from node in a kind of possible realization, it sends and compiles to host node Before the request of location, the method also includes:
Receive the first state switching command that the host node is sent;
It is set to the state of real-time detection external trigger.
In a kind of possible realization, the method also includes:
Receive the second status switching instruction that the host node is sent;
Exit the state of the real-time detection external trigger.
In a kind of possible realization, after the storage node address information, the method also includes:
It is prompted according to the first default prompting mode.
In a kind of possible realization, the node addressing system is applied in unmanned plane;
It is described from node be unmanned plane propeller, the external trigger be stir propeller;Or, described from node It is adjusted for the electricity of unmanned plane, the external trigger is the propeller stirred electricity and adjust connection;Or, it is described from node be unmanned plane Holder, the external trigger are to stir the axis of holder.
In a kind of possible realization, the storage node address information, comprising:
After the store instruction for receiving the host node, the node address information is stored.
In a kind of possible realization, after the storage node address information, the method also includes:
The inspection of receiving node address information instructs;
When the node address information for checking instruction is consistent with the node address information stored from node, notice The host node has received the inspection instruction.
On the other hand, it provides a kind of from node addressing method, which comprises
Receive the addressing request sent from node;
To described from node sending node address information.
It is described to receive before the addressing request that node is sent in a kind of possible realization, the method also includes:
First state switching command is sent from node to described, the first state switching command, which is used to indicate, to be set in real time Detect the state of external trigger.
In a kind of possible realization, the method also includes:
Start timing when sending the first state switching command;
When timing duration is more than preset duration, Xiang Suoshu sends the second status switching instruction, second shape from node State switching command is used to indicate the state for exiting the real-time detection external trigger.
In a kind of possible realization, described to after the sending node address information from node, the method is also wrapped It includes:
To the store instruction from node sending node address information.
In a kind of possible realization, described to after the sending node address information from node, the method is also wrapped It includes:
It is instructed to described from the inspection of node sending node address information;
When one, which has received the inspection from node notice, instructs, determine that the node address information addressing is correct; When at least two, which have received the inspection from node notice, instructs, determine that the node address information addressing repeats;When not having Have from node notice have received inspections instruction when, determine that the node address information addresses not successfully.
On the other hand, one kind is provided from node addressing device, and described device includes:
Sending module, for sending addressing request to host node after detecting the external trigger from node;
State switching module, for being set to the state for waiting node address information;
Receiving module, the node address information sent for receiving the host node;
Memory module, for storing the node address information.
In a kind of possible realization, the receiving module is also used to receive the first state that the host node is sent and cuts Change instruction;
The state switching module, is also used to be set to the state of real-time detection external trigger.
In a kind of possible realization, the receiving module is also used to receive the second state that the host node is sent and cuts Change instruction;
The state switching module is also used to exit the state of the real-time detection external trigger.
In a kind of possible realization, described device further include:
Cue module, for being prompted according to the first default prompting mode.
In a kind of possible realization, it is described from node be unmanned plane propeller, the external trigger be stir Propeller;Or, described adjust from the electricity that node is unmanned plane, the external trigger is the propeller stirred electricity and adjust connection;Or, It is described from node be unmanned plane holder, the external trigger is to stir the axis of holder.
In a kind of possible realization, the memory module is also used to after the store instruction for receiving the host node, Store the node address information.
In a kind of possible realization, after the storage node address information, the receiving module is also used to: The inspection of receiving node address information instructs;
Described device further include: correction verification module, for when the node address information and described from node for checking instruction When the node address information of storage is consistent, the host node is notified to have received the inspection instruction.
On the other hand, one kind is provided from node addressing device, and described device includes:
Receiving module, for receiving the addressing request sent from node;
Sending module, for described from node sending node address information.
In a kind of possible realization, the sending module is also used to refer to described from node transmission first state switching It enables, the first state switching command is used to indicate the state for being set to real-time detection external trigger.
In a kind of possible realization, described device further include:
Timing module, for starting timing when sending the first state switching command;
The sending module is also used to when timing duration is more than preset duration, and Xiang Suoshu sends the second state from node Switching command, second status switching instruction are used to indicate the state for exiting the real-time detection external trigger.
In a kind of possible realization, the sending module is also used to described from node sending node address information Store instruction.
In a kind of possible realization, the sending module is also used to described from node sending node address information Check instruction;
Described device further include: determining module, for when one from node notice have received inspections instruction when, really The fixed node address information addressing is correct;When at least two, which have received the inspection from node notice, instructs, institute is determined Node address information addressing is stated to repeat;When not having received inspection instruction from node notice, with determining the node Location information addresses not successfully.
On the other hand, additionally provide one kind from node, it is described to include: from node
At least one processor;With
At least one processor;
At least one processor is stored with one or more instructions, and one or more of instructions are by described at least one A processor is loaded and is executed to realize operation performed by above-mentioned node addressing method.
On the other hand, a kind of host node is additionally provided, the host node includes:
At least one processor;With
At least one processor;
At least one processor is stored with one or more instructions, and one or more of instructions are by described at least one A processor is loaded and is executed to realize operation performed by above-mentioned node addressing method.
On the other hand, a kind of computer readable storage medium is additionally provided, is stored at least one in the storage medium Instruction, described instruction are loaded as processor and are executed to realize operation performed by above-mentioned node addressing method.
Technical solution bring beneficial effect provided in an embodiment of the present invention includes at least:
System provided in an embodiment of the present invention, method and device, provide a kind of external trigger by detection come Automatically the method that is addressed, user only need to trigger external trigger to from node, can allow in node addressing system from Node is addressed, without the node address information different for different node burnings during manufacturing node, thus pole The earth saves the time of the manufacturing process of node, improves the efficiency of the manufacturing process of node.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of structural schematic diagram of node addressing system provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of node addressing system provided in an embodiment of the present invention;
Fig. 3 is a kind of flow chart of node addressing method provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of state machine from node provided in an embodiment of the present invention;
Fig. 5 is that host node and the interactive process from node are shown in a kind of node addressing system provided in an embodiment of the present invention It is intended to;
Fig. 6 is that host node and the interactive process from node are shown in a kind of node addressing system provided in an embodiment of the present invention It is intended to;
Fig. 7 is that host node and the interactive process from node are shown in a kind of node addressing system provided in an embodiment of the present invention It is intended to;
Fig. 8 is that host node and the interactive process from node are shown in a kind of node addressing system provided in an embodiment of the present invention It is intended to;
Fig. 9 is that host node and the interactive process from node are shown in a kind of node addressing system provided in an embodiment of the present invention It is intended to;
Figure 10 is host node and the interactive process from node in a kind of node addressing system provided in an embodiment of the present invention Schematic diagram;
Figure 11 is host node and the interactive process from node in a kind of node addressing system provided in an embodiment of the present invention Schematic diagram;
Figure 12 is host node and the interactive process from node in a kind of node addressing system provided in an embodiment of the present invention Schematic diagram;
Figure 13 is a kind of flow chart of host node addressing method provided in an embodiment of the present invention;
Figure 14 is a kind of flow chart of host node addressing method provided in an embodiment of the present invention;
Figure 15 is a kind of flow chart from node addressing method provided in an embodiment of the present invention;
Figure 16 is a kind of flow chart from node addressing method provided in an embodiment of the present invention;
Figure 17 is a kind of structural schematic diagram of node addressing device provided in an embodiment of the present invention;
Figure 18 is a kind of structural schematic diagram of node addressing device provided in an embodiment of the present invention;
Figure 19 is a kind of structural schematic diagram of host node provided in an embodiment of the present invention;
Figure 20 is a kind of structural schematic diagram from node provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
In order to help to understand, below to the present embodiments relate to some technical terms be illustrated.
Burning: referring to will be in the chip of fixed program burn writing to node.After burning program, if user is without using spy Fixed flashburn tools will be unable to carry out any modification to this section of program again, seem program has been fixed it is the same, therefore can be with Referred to as program Solidification.
CAN bus: being a kind of more host offices by one of the most widely used fieldbus of German BOSCH company exploitation Domain net has many advantages, such as high reliability, real-time.The different nodes installed in CAN bus use different CAN ID (identification) it distinguishes, CAN ID is the node identification in CAN bus.
Electricity is adjusted: i.e. ESC (Electronic Speed Control, electron speed regulator), can adjust electricity according to external signal The revolving speed of motivation provides flying power for unmanned plane and keeps flight attitude.The flight control units meeting of unmanned plane and several Electricity is adjusted to be connected by CAN bus.
Divide and broadcast wall Picking System: a kind of sorting system applied in cargo/commodity warehousing system is generally controlled by one Device and several electronic tags are formed by connecting by CAN bus, and electronic tag is mounted in the storage space of every kind of cargo, and controller can The information such as picking quantity are sent to each electronic tag according to order information, electronic tag shows these information, and provides Key-press input, picking person can carry out the operation such as picking according to the prompt information of each storage space, can effectively improve picking efficiency, reduce Error probability.
Broadcast: referring to a kind of communication mode in bus between different nodes, when any one node is by the way of broadcast When sending information, node address information will not be carried in the information, which can reach other all sections by the transmission of bus Point after other all nodes receive the information, it is found that the information does not carry node address information, i.e., can receive the information, thus Guarantee that other all nodes can receive information.
Fig. 1 is a kind of structural schematic diagram of node addressing system provided in an embodiment of the present invention, and node addressing system includes Host node 101 and from node 102.
It host node 101 and can be attached from node 102 by bus, information exchange be carried out by bus, thus group The node addressing system that can be in communication with each other at one.Wherein, bus can be CAN bus.For the tool connected by bus Body implementation can have multiple notches in bus, and each notch is for being inserted into a node, host node 101 and at least one It is a to can have socket from node 102, it can be inserted in bus by socket.
Host node 101 is the processing core of node addressing system, is properly termed as main controlled node, main control end, and host node 101 is used Yu Weicong node 102 addresses, and is considered as the promoter and controller of addressing process.It in an implementation, can be by node addressing system A certain calculating and the stronger node deployment of processing capacity are host node 101 in system, can also allocate one in advance for host node 101 Default node address information, the default node address information for identifying host node 101, so as to by host node 101 with from node 102 distinguish.
Illustratively, when node addressing system is applied in unmanned plane, the flight control units of unmanned plane can be disposed For host node 101, when node addressing system, which is applied, point is broadcasting wall Picking System, the controller of wall Picking System point can will be broadcast It is deployed as host node 101, when node addressing system is applied in robot, the processor of robot can be deployed as host node 101。
It is properly termed as controlled node from node 102, is used to receive the node address letter that host node 101 distributes from node 102 Breath.In an implementation, each node other than host node 101 in node addressing system can be deployed as from node 102, or The node of a certain type is deployed as from node 102, it certainly can also be according to business demand, by any node for needing to address It is deployed as from node 102.Wherein, the quantity of the slave node 102 in node addressing system can be one or at least two.
Illustratively, when node addressing system is applied in unmanned plane, each of unmanned plane electricity can reconcile to holder portion Administration is from node 102, when node addressing system, which is applied, point is broadcasting wall Picking System, point can will broadcast each of wall Picking System Label is deployed as from node 102.
In a kind of possible realization, referring to fig. 2, host node 101 can receive the addressing instruction of input, trigger as node All processes addressed from node 102 of addressing system, each can detecte external trigger from node 102, triggering The process that it is addressed.Wherein, host node 101 can have store function, can store node address letter to be allocated Breath, can be stored in non-volatile memories for the node address information of distribution with configuring non-volatile memory from node 102 In device.
System provided in an embodiment of the present invention, can be by the external trigger of detection come the automatic side addressed Method, user only need to trigger external trigger to from node, the slave node in node addressing system can be allowed to be addressed, made The node address information different for different node burnings is not necessarily to during making node, to dramatically save the system of node The time for making process improves the efficiency of the manufacturing process of node.
The embodiment of the invention provides a kind of node addressing system, which includes host node and from node. Fig. 3 is referred to, in node addressing system provided in an embodiment of the present invention, host node and the interactive process from node may include Following steps:
301, from node real-time detection external trigger.
From the controlled end that node is in node addressing system, in node addressing system from the quantity of node can for one or At least two.It can be determined from the physical aspect of node according to practical application scene, unmanned plane is applied to node addressing system For, it can be adjusted from node for propeller, the electricity of unmanned plane, holder, be applied to divide with node addressing system and broadcast wall Picking System For, it can be point electronic tag for broadcasting wall Picking System from node.
In the present embodiment, from node by real-time detection external trigger, to be addressed.It wherein, can be with from node It is set to the state of real-time detection external trigger, it, can be real-time from node in the state of the real-time detection external trigger Detect external trigger.Wherein, the state of real-time detection external trigger is can recorde in practical programs as SID_ SLAVE_DETECT_PROCESS state, DETECT state, detecting state etc..
External trigger can be user in the event for executing operation from node, and external trigger can indicate to work as Preceding operation object is the slave node of this node address information to be allocated, that is, if any one is touched from nodal test to outside Hair event, then node addressing system can be addressed to be somebody's turn to do from node.Wherein, external trigger can be according to the object from node Prominent form is managed, external trigger can be any operation being able to detect that from node.
For example, can be the propeller of unmanned plane from node, external trigger can be to stir the propeller of unmanned plane. For another example, it can be adjusted from node for the electricity of unmanned plane, external trigger can be the propeller stirred electricity and adjust connection.Wherein, electric Tune is electrically connected with propeller, and electricity is adjusted can detect that propeller is able to stir external trigger thing by the electric connection Part.It for another example, can be the holder of unmanned plane from node, external trigger is to stir the axis of holder.
By detection external trigger to be addressed, following technical effect at least can achieve:
First, it is addressed if user is desired for any one from node, only need to trigger external trigger thing from node to this Part then can detect the external trigger from node, execute the process of subsequent addressing, easy to operate, efficiency is very high.In In one exemplary scene, user need to only stir the propeller of lower unmanned plane, can allow propeller automatic addressing.
Second, can be determined from the external trigger of node according to from the actual product form of node, for propeller, Electricity tune, axis of holder etc. are usually not configured for the component of display screen and button, the external touching that can be also detected according to it Hair event is addressed, to greatly improve flexibility, extends application range.
302, from node after detecting external trigger, addressing request is sent to host node, and will be set to from node Wait the state of node address information.
Addressing request is that should be addressed from node for requesting host node, is after receiving addressing request so as to host node It should be addressed from node.In a kind of possible realization, addressing request can have been detected by external trigger for notice Message, as a kind of notification message, such as can detect the message of external trigger for confirmation, such as in practical programs In can recorde as ACK_DETECT message.
Waiting the state of node address information can recorde in practical programs as wait state, SID_SLAVE_WAIT_ ID state etc..In the state of in node address information is waited, the node address information of distribution can be received from node.
It illustratively referring to fig. 4, can be right about the specific implementation for being set to the state for waiting node address information It is configured from the state machine of node, the state of real-time detection external trigger is set in state machine and waits node address The state of information, the transition condition between the state of real-time detection external trigger and the state for waiting node address information are External trigger is detected, when being each in the state of real-time detection external trigger from node, outside meeting real-time detection Trigger event, when detecting external trigger, can automatically switch to waiting node under the logic of state machine from node The state of location information.
303, host node obtains node address information after receiving addressing request.
Host node is the main control end in node addressing system, is the processing core of node addressing system, host node is for being From node addressing.In an implementation, can by node addressing system it is a certain calculating and the stronger node deployment of processing capacity based on Node can also allocate a default node address information in advance for host node, and the default node address information is for identifying master Node, to distinguish host node with from node.
Illustratively, when node addressing system is applied in unmanned plane, the flight control units of unmanned plane can be disposed For host node, when node addressing system, which is applied, point is broadcasting wall Picking System, the controller portion of wall Picking System point can will be broadcast Administration is host node.
In the present embodiment, when host node receives the addressing request from node, it can know from nodal test to outside Trigger event then, as the distribution object of this node address information, obtains node address information, using from node to will acquire Node address information distribute to from node.
Specifically, available at least one node address information to be allocated of host node, can be from least one node A node address information is chosen in address information, to distribute to the node address information of selection from node.
Wherein, about the process for obtaining at least one node address information to be allocated, host node can receive addressing and refer to It enables, parsing addressing instruction obtains at least one node address information to be allocated.Wherein, for the specific of reception addressing instruction It realizes, host node can detecte the input operation of user, to receive the addressing instruction of user's input.
304, host node is to from node sending node address information.
Optionally, distribution instruction can be generated in host node, and distribution instruction carries node address information, and host node can lead to It crosses to from node and sends distribution instruction, Lai Xiangcong node sending node address information.Wherein, distribution instruction can in practical programs It is corresponding for node address information to be transmitted to be recorded as SID_CMD_ALLOC instruction or ALLOC instruction, distribution instruction From node.
305, the slave node receiving node address information in the state for waiting node address information, and with storing the node Location information.
Specifically, the state of node address information is waited due to being set to before node, then host node sending node After the information of location, it can be successfully received node addressing information, and memory node address information from node, so as to by the node address Addressing of the information as itself.Optionally, it can receive distribution instruction from node, parsing distribution instruction obtains distribution instruction The node address information of carrying, to receive node addressing information.
It, optionally, can be to section after receiving node address information from node about the process of memory node address information Dot address information carries out persistent storage, or node address information is stored in memory, for example, can configure from node non-easy The property lost memory node address information can be written in nonvolatile memory.
It, can be using the node address information as itself ID, using the section after from node memory node address information Dot address information, with host node or other from carrying out information exchange between node.
Node addressing system provided in an embodiment of the present invention, can be by the external trigger of detection come automatic from node It is addressed, user only need to trigger external trigger to from node, and the slave node in node addressing system can be allowed to be compiled Location, the operation is simple and flexible, and property is strong, also, without for the different node of different node burnings during manufacturing node Location information improves the efficiency of the manufacturing process of node to dramatically save the time of the manufacturing process of node.
It may include at least two in node addressing system provided in an embodiment of the present invention from node, at least two from node Can be with real-time detection external trigger, external trigger at least two can successively trigger this from node, that is, external Trigger event can first trigger one from node, then trigger to another from node.
By this mode, user can successively trigger to each from node external according to regular hour sequencing Trigger event, correspondingly, difference can successively detect external trigger according to regular hour sequencing from node, because This, since host node is only to detect that the slave node of external trigger is addressed every time, then host node can be according to from node At least two node address informations are sequentially allocated at least two from node by the sequencing for detecting external trigger, To achieving the effect that host node successively addresses, guarantee in node addressing system multiple meets user from the addressing sequence of node Customized demand.
Exemplary elaboration is carried out below by way of Fig. 5 embodiment.In Fig. 5 embodiment, node is compiled with external trigger First in the system of location successively triggered from node and second from node for be described.
The embodiment of the invention provides a kind of node addressing system, which includes host node, first from section Point and second is from node.Fig. 5 is referred to, in node addressing system provided in an embodiment of the present invention, host node, first are from node It may comprise steps of with second from the interactive process of node:
501, first from node and second from node real-time detection external trigger.
First can be set to the state of real-time detection external trigger from node and second from node, so as to real-time In the state of detecting external trigger, external trigger can be successively detected.
502, first from node after detecting external trigger, first from node to host node send addressing request, And first is set to from node the state for waiting node address information.
In the present embodiment, with external trigger first to first from node trigger, then to second from node triggering for into Row description.Wherein, first the process for addressing request and switching state and above-mentioned steps 102 are sent similarly from node, do not done herein It repeats.
503, host node obtains first node address information after receiving addressing request.
It is second using the node address information distributed for first from node as first node address information in the present embodiment From node distribute node address information be second node address information for be illustrated.
Similarly, this will not be repeated here for this step and above-mentioned steps 103.
504, host node sends first node address information to first from node.
505, first in the state for waiting node address information receives the first node address information from node, and deposits Store up the first node address information.
Similarly to step 505 and above-mentioned steps 104 to step 105, this will not be repeated here for step 504.
506, second from node after detecting external trigger, second from node to host node send addressing request, And second is set to from node the state for waiting node address information.
507, host node obtains second node address information after receiving addressing request.
Host node can determine to be allocated at least one other than first node address after receiving addressing request A node address information, from these node address informations choose second node address information, the second node address information with First node address information is different, so that second node address information is distributed to second from node.
508, host node sends second node address information to second from node.
509, second in the state for waiting node address information receives second node address information from node, and stores The second node address information.
Step 508 similarly, is distinguished to step 509 and above-mentioned steps 504 to step 505, and second from node and the The one node address information difference stored from node, therefore, first can be used respective node from node from node and second Address information is communicated, and guarantees that first will not interfere with each other from node and second from the communication process of node.
Node addressing system provided in this embodiment, first successively triggered from node and second from node by detection it is outer Portion's trigger event, the first process that can be successively addressed from node and second from node, thus to first from node and Two are successively addressed from node.Further, which may include more than two from node, different from section Point can similarly execute the process of above-mentioned addressing, successively address to a large amount of in node addressing system from node to realize Function.
In node addressing system provided in an embodiment of the present invention, the process that host node chooses node address information may include (1) to (3) below.
(1) host node is ranked up at least two node address informations to be allocated according to the size of numerical value.
For example, at least one node address information can be ranked up according to sequence from big to small, it for another example, can be right At least one node address information is ranked up according to sequence from small to large.
(2) when receiving from the addressing of node request, host node obtains addressing request in the addressing request having received In sequence.
For the specific implementation for the sequence for obtaining addressing request, host node can determine this when receiving addressing request It is which time receives addressing request in this addressing process, that is to say, determines that the addressing being currently received request is which connects The addressing request received, to obtain the sequence of addressing request.
In a kind of possible realization, host node can count the total quantity for the addressing request having received, and will receive Addressing request total quantity as it is currently received addressing request sequence.
For example, the quantity for the addressing request that host node can add up to have received in addressing process, whenever receiving one When a addressing is requested, add one to the total quantity of the addressing request added up, by way of cumulative, addressing request can be obtained Sequentially.Illustratively, it is assumed that host node this when receiving addressing request, determine that having had received N number of addressing requests, then can be with It determines the addressing request being currently received, is n-th addressing request.
(3) host node chooses ranking node address information corresponding with sequence from least one node address information, will Node address information distributes to any one from node.
It, can be according to the sequence of at least one node address information, from least after host node determines the sequence of addressing request Ranking and the identical node address information of sequence are chosen in one node address information, for example, asking when receiving n-th addressing When asking, n-th node address information can be chosen from least one node address information, by n-th node address information point Dispensing sends the slave node of n-th addressing request.
In the embodiment of the present invention, due to sequence of the addressing request in the addressing request having received, this triggering is indicated Sequence of the slave node of external trigger in the slave node for having triggered external trigger, and the node address information chosen Ranking, indicate this addressing slave node node address information sequence, therefore, in conjunction with addressing request sequence and node The ranking of address information is addressed, and the matched effect of sequence of the sequence and external trigger of addressing may be implemented.
So, user can be successively triggered according to demand to the external trigger from node, and host node can be according to outer The sequencing of portion's trigger event is successively addressed at least two from node, realizes the addressing sequence from node and outside The sequence of trigger event matches, and guarantees that addressing sequence meets the customized demand of user.
In an exemplary scene, it is assumed that at least two node address informations are 1,2 and 3, and at least two are from node Electricity adjusts A, electricity that B and electricity is adjusted to adjust C, and electricity adjusts A first to detect external trigger, and electricity adjusts B second and detects external trigger thing Part, electricity adjust C third to detect external trigger, then host node can distribute to electricity for 1 and adjust A, distribute to electricity for 2 and adjust B, by 3 It distributes to electricity and adjusts C.
Exemplary elaboration is carried out below by way of Fig. 6 embodiment.In Fig. 6 embodiment, node is compiled with external trigger First in the system of location successively triggered from node and second from node for be described.
The embodiment of the invention provides a kind of node addressing system, which includes host node, first from section Point and second is from node.Fig. 6 is referred to, in node addressing system provided in an embodiment of the present invention, host node, first are from node It may comprise steps of with second from the interactive process of node:
601, host node is ranked up at least two node address informations according to the size of numerical value.
For being ranked up according to the sequence of numerical value from small to large, it is assumed that at least two node address informations include 2,3, 1, after host node sorts at least two node address informations, the node address information of available arranged in sequence, respectively 1, 2、3。
602, first from node and second from node real-time detection external trigger.
First can be set to the state of real-time detection external trigger from node and second from node, so as to real-time In the state of detecting external trigger, external trigger can be successively detected.
603, first from node after detecting external trigger, first from node to host node send addressing request, And first is set to from node the state for waiting node address information.
604, it is suitable in the addressing request having received to obtain addressing request after receiving addressing request for host node Sequence.
In the present embodiment, the slave node requested due to first from node for transmission addressing first in node addressing system, then After host node receives addressing request, first addressing in request that address that can determine whether addressing request to have received is asked It asks.
605, host node chooses first node address information from least two node address informations, and first is saved Dot address information is as first node address information.
It is second using the node address information distributed for first from node as first node address information in the present embodiment From node distribute node address information be second node address information for be illustrated.
By taking at least two node address informations of arranged in sequence are respectively 1,2,3 as an example, then host node can be chosen and come First node address information, obtains 1, by 1 as can distribute to the first first node address information from node.
605, host node sends first node address information to first from node.
606, first in the state for waiting node address information receives first node address information from node, and stores First node address information.
Similarly to step 606 and above-mentioned steps 104 to step 105, this will not be repeated here for step 605.
607, second from node after detecting external trigger, second from node to host node send addressing request, And second is set to from node the state for waiting node address information.
608, it is suitable in the addressing request having received to obtain addressing request after receiving addressing request for host node Sequence.
In the present embodiment, due to second from node be node addressing system in second send addressing request slave node, After then host node receives addressing request, second addressing in request that address that can determine whether addressing request to have received is asked It asks.
In a kind of possible realization, host node can add up the sum for the addressing request having received in addressing process Amount, in above-mentioned steps 603, when receiving an addressing request, the total quantity for recording received addressing request is 1, this In step, after receiving addressing request again, the total quantity for recording received addressing request is 2, therefore can obtain volume Location request is requested for second addressing having received.
609, host node chooses second node address information from least two node address informations, and second is saved Dot address information is as second node address information.
By taking at least two node address informations of arranged in sequence are respectively 1,2,3 as an example, then host node can be chosen and come Second node address information, obtains 2, by 2 as distributing to the second second node address information from node.
610, host node sends second node address information to second from node.
611, second in the state for waiting node address information receives the second node address information from node, and deposits Store up the second node address information.
Similarly to step 611 and above-mentioned steps 104 to step 105, this will not be repeated here for step 610.
Node addressing system provided in this embodiment, by combining sequence and node address from the addressing request of node The sequence of information is addressed, and may be implemented first from node and second from the suitable of the addressing sequence of node and external trigger The matched effect of sequence, to guarantee the first customized demand for meeting user from node and second from the addressing sequence of node.
In node addressing system provided in an embodiment of the present invention, the function prompted for addressing process can have from node It can, that is, can be prompted after memory node address information according to the first default prompting mode from node, to prompt to use Continue to trigger external trigger in family.
Exemplary elaboration is carried out below by way of Fig. 7 embodiment.
The embodiment of the invention provides a kind of node addressing system, which includes host node and from node. Fig. 7 is referred to, in node addressing system provided in an embodiment of the present invention, host node and the interactive process from node may include Following steps:
701, from node real-time detection external trigger.
Similarly, this will not be repeated here for this step and above-mentioned steps 101.
702, from node after detecting external trigger, addressing request is sent to host node, and will be set to from node Wait the state of node address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 102.
703, host node obtains node address information after receiving addressing request.
Similarly, this will not be repeated here for this step and above-mentioned steps 103.
704, host node is to this from node sending node address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 104.
705, the slave node in the state for waiting node address information receives the node address information, and stores the node Address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 105.
706, it is prompted from node according to the first default prompting mode.
The first default prompting mode can prompt user to address from node to finish, user can be allowed to know to next A to trigger external trigger from node, which can determine from the physical aspect of node, such as can be with To light indicator light, issuing and preset voice, show default text, show default page etc..
In an exemplary scene, after user triggers external trigger from node to some, successfully compiled from node Indicator light is lighted behind location, user, which sees from node, lights indicator light, you can learn that having addressed success from node, can continue External trigger is triggered from node to next, user, which sees from node, not yet lights indicator light, you can learn that still from node Unaddressed success can wait a moment, and be further continued for triggering external trigger from node to next until indicator light lights.That , whether user can be distinguished from whether node addressing finishes by prompting from node, know whether to need to continue to trigger External trigger so, it is possible the process for helping and guiding the addressing of user's control node addressing system, reduce user Cost is practised, it is more humanized.
Node addressing system provided in this embodiment can prompt user to address from node after successfully addressing, can Guidance user continues to trigger external trigger, guarantee external trigger to each in node addressing system from node successively Triggering.
In node addressing system provided in an embodiment of the present invention, host node can have to be instructed by sending, and is indicated from section Point enters the function of the state of real-time detection external trigger, carries out exemplary elaboration below by way of Fig. 8 embodiment.
The embodiment of the invention provides a kind of node addressing system, which includes host node and from node. Fig. 8 is referred to, in node addressing system provided in an embodiment of the present invention, host node and the interactive process from node may include Following steps:
801, host node sends first state switching command to from node.
First state switching command can recorde in practical programs for enabled instruction, start instruction etc., first state refers to Order is used to indicate the state for being set to real-time detection external trigger.
When host node will be to be addressed from node, the available first state switching command of host node, to from node Status switching instruction is sent, is instructed by first state, instruction is set to the state of real-time detection external trigger from node, with Just after node switching state, external trigger can be detected in time.
802, after node reception first state switching command, it is set to the state of real-time detection external trigger.
From node it can be set to the state of real-time detection external trigger, opened after receiving first state switching command Beginning real-time detection external trigger, so as to detect external trigger in time.
Fig. 6 illustratively is referred to about the specific implementation for receiving first state switching command then switching state, it can To be configured to from the state machine of node, the shape of default conditions and real-time detection external trigger is set in state machine State, the transition condition between default conditions and the state of real-time detection external trigger are to receive first state switching command, When being each in default conditions from node, if receiving first state switching command, under the logic of state machine, it can cut automatically It is changed to the state of real-time detection external trigger.
Wherein, default conditions are can recorde in practical programs as SID_SLAVE_NULL state or NULL state, default State can for from node power on after automatically into state, the state of real-time detection external trigger can in practical programs To be recorded as SID_SLAVE_DETECT_PROCESS state, DETECT state, detecting state etc..
803, from node after detecting external trigger, addressing request is sent to host node, and will be set to from node Wait the state of node address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 102.
804, host node obtains node address information after receiving addressing request.
Similarly, this will not be repeated here for this step and above-mentioned steps 103.
805, host node is to this from node sending node address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 104.
806, the slave node in the state for waiting node address information receives the node address information, and stores the node Address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 105.
Node addressing system provided in this embodiment, host node is by sending first state switching command to from node, i.e., The state of real-time detection external trigger can will be set to from node, so as to external trigger can be detected in time from node, The function of node addressing system is extended, flexibility is high.
Node addressing system provided in an embodiment of the present invention can also have the function of that time-out then automatically exits from addressing, below Exemplary elaboration is carried out by Fig. 9 embodiment.
The embodiment of the invention provides a kind of node addressing system, which includes host node and from node. Fig. 9 is referred to, in node addressing system provided in an embodiment of the present invention, host node and the interactive process from node may include Following steps:
901, host node sends first state switching command to from node, and starts timing.
Host node can start timing when sending first state switching command, refer to record transmission first state switching After order by duration, for example, host node can when send first state switching command start timer, be recorded by timer Send first state switching command after by duration.
902, after node reception first state switching command, it is set to the state of real-time detection external trigger.
Similarly, this will not be repeated here for this step and above-mentioned steps 502.
903, when timing duration be more than preset duration, and host node do not receive yet addressing request when, host node to this from Node sends the second status switching instruction.
After sending first state switching command, whether host node can be alreadyd exceed with the current timing duration of real-time judge Preset duration then obtains the switching of the second state and refers to when determination alreadys exceed preset duration, and does not receive addressing request yet It enables, sends the second status switching instruction to from node.
Second status switching instruction is can recorde in practical programs as exit instruction, SID_CMD_EXIT order, EXIT Order etc., the second status switching instruction is used to indicate the state that real-time detection external trigger is exited from node.
Preset duration is used to indicate the longest duration for waiting addressing, the process of preset duration is determined about host node, one In the possible realization of kind, host node can instruct according to addressing and determine preset duration.For example, host node can receive carrying time-out The addressing of duration instructs, and host node can parse addressing instruction, obtains the overtime duration that addressing instruction carries, thus super according to this It is constantly long to carry out timing.In the method, can the overtime duration that addressing instruction carries be arranged according to demand in user, and host node is logical Addressing instruction is crossed, can determine the overtime duration for exiting addressing, the duration for guaranteeing that addressing process occupies meets the customized of user Demand improves flexibility.In addition, the duration of default can also be stored in advance in host node, using the duration of the default as when time-out It is long.
904, when receiving second status switching instruction from node, the shape of the real-time detection external trigger is exited State.
The state of real-time detection external trigger, no longer real-time detection external trigger can be exited from node, with Energy saving.For example, from node timeout mode can be switched to from the state of real-time detection external trigger, wherein this is super When state can recorde in practical programs as SID_SLAVE_DETECT_TIMEOUT state, TIMEOUT state etc., the time-out State is used to indicate from node by preset duration and external trigger is not detected.
Illustratively, it can be configured to from the state machine of node, real-time detection external trigger is set in state machine The state and timeout mode of event, the transition condition between the state and timeout mode of real-time detection external trigger are to receive To exit instruction, when being each in the state of real-time detection external trigger from node, when receiving exit instruction, in shape Under the logic of state machine, timeout mode can be automatically switched to from node, to exit the state of real-time detection external trigger.
Node addressing system provided in this embodiment, host node have timed out and when not receiving addressing request, i.e., can be to The second status switching instruction is sent from node, the state for exiting real-time detection external trigger from node can be enabled, so that from Node realizes the function that time-out then automatically exits from addressing, extends node addressing system without continuing to test external trigger The function of system, improves flexibility.
Node addressing system provided in an embodiment of the present invention, can have the function addressed in various application scenarios Can, it is illustrated below in conjunction with several exemplary application scenes.
The embodiment of the invention provides a kind of node addressing system, which includes host node and from node. Referring to Figure 10, in node addressing system provided in an embodiment of the present invention, host node and the interactive process from node be can wrap Include following steps:
1001, node addressing system assembles are completed.
After node addressing system has been completed, user can trigger external trigger to from node, from node It can detecte external trigger, to start the process of addressing.
The advantages of to make the present embodiment, is more clearly understood, and is described below in conjunction with an exemplary application scene:
By taking unmanned plane as an example, there is CAN bus in unmanned plane, flight controller and multiple electricity are adjusted and are mounted in CAN bus, Flight controller and multiple electricity are adjusted and carry out information exchange by CAN bus, need to transfer in the unique addressing of row for each electricity, as often A electricity adjusts distribution to be capable of the node address information of unique identification its identity, so that each electricity is adjusted and can be connect based on node address information Receive the control signal that flight controller sends it.
In this scene, in the related technology, at least there is following technical problem:
First, electricity is adjusted to need first to address and be installed again: addressing process realizes that different electricity, which are adjusted, needs burning not by program Solidification Same program is adjusted to distinguish different electricity tune for example, it is assumed that unmanned plane needs to install 4 electricity, then needs to distinguish for four electric adjust Four kinds of programs of burning, every kind of program encapsulate corresponding node identification, while needing to adjust for four electricity and sticking four kinds of different labels, It is adjusted so that user distinguishes different electricity, so causes the technique produced and assembly electricity is adjusted excessively cumbersome.
Second, electricity, which is adjusted, needs fixation successively to be addressed according to the topological order of CAN bus, that is, the node of corresponding position It is necessarily mounted on the corresponding position of unmanned plane, such as No. i-th electricity must be just installed in No. i-th electric adjusted position and adjusted.So, if CAN bus is followed successively by No. 1 electric adjusted position, No. 2 electric adjusted positions and No. 3 electric adjusted positions from top to bottom, and the electricity on these three positions is adjusted Be only that No. 1 electricity is adjusted, No. 2 electricity reconcile No. 3 electricity and adjust, addressing sequence fixes, can not hopping sequence, flexibility is poor, scalability is poor.
Third, since electricity adjusts needs are fixed successively to be addressed according to the topological order of CAN bus, user's needs are artificial to be known The node address information that not each electricity is adjusted, judges electricity is adjusted to which position which electricity is adjusted and should be mounted in CAN bus, Improve the operation difficulty of installation process.In addition, once many from number of nodes, user mixes up different from node, brings peace Full hidden danger.
In conjunction with the above technical problem, at least accessible technical effect of the present embodiment is illustrated below:
First, electricity is adjusted first to install and be addressed again: detection external trigger can be sealed with the processing logic addressed Dress is program code, and unified burning is generating electric timing, without the program for adjusting burning different for different electricity in each electricity is adjusted And different labels is attached, the technique of production and assembly electricity tune is greatly simplified, production is improved and assembles the effect that electricity is adjusted Rate.
Second, the addressing sequence of node, but can be according to detecting external touching without corresponding with the topological order of bus The sequencing of hair event determines, so as to be adjusted flexibly according to user demand, meets the customized demand of user.For example, Assuming that CAN bus is followed successively by No. 1 electric adjusted position, No. 2 electric adjusted positions and No. 3 electric adjusted positions, the external trigger that electricity is adjusted from top to bottom Event is to stir the operation of motor, if user it is expected that the electricity in these three electric adjusted positions is adjusted is addressed to No. 3 electricity tune -1 respectively Electricity adjusts-No. 2 electricity to adjust, and the electricity that only need to first stir in No. 2 electric adjusted positions is adjusted, then the electricity stirred in No. 3 electric adjusted positions is adjusted, then stirs 1 Electricity in number electric adjusted position is adjusted, and any number electric adjusted position can install any number electricity and adjust, and addressing sequence supports hopping sequence, flexibly Property is strong.
Electric timing is being installed in third, the limitation of the topological order due to getting rid of CAN bus from the addressing sequence of node, It identifies and distinguishes between different electricity without user to adjust, any one electricity that any one electricity tune can be mounted in bus by user is adjusted Installation site, after assembling, it is each electricity adjust during program code execution, flight controller can be every automatically A electricity, which is adjusted, distributes unique node identification, greatly reduces production and assembles the operation difficulty of electric tune process, reduces user Learning cost, while improving safety.
In another exemplary scene, the above process 1001 can be substituted are as follows: newly be installed in node addressing system from section Point.
When node addressing system has been completed, and newly it is mounted with to the node addressing system one or more from section When point, user only need to trigger external trigger to the slave node in node addressing system, can start the process of re-mapping, To be addressed for the node addressing system that re-assemblies.Wherein it is possible to newly be installed to any position of node addressing system From node, such as can be installed after node to the last one from node, for another example can it is all among node insertion from Node.
In another exemplary scene, the above process 1001 can be substituted are as follows: node addressing system conversion is from node.
When node addressing system has been completed, and one or more of the node addressing system has been replaced from section When point, user only need to trigger external trigger to the slave node in node addressing system, can start the process of re-mapping, To be addressed for the node addressing system that re-assemblies.
1002, from node real-time detection external trigger.
1003, from node after detecting external trigger, addressing request is sent to host node, and will be set to from node Wait the state of node address information.
1004, host node obtains node address information after receiving addressing request.
1005, host node is to this from node sending node address information.
1006, the slave node in the state for waiting node address information receives the node address information, and stores the section Dot address information.
Node addressing system provided in this embodiment has been completed, in node addressing system in node addressing system New installation has been replaced from the various scenes such as node from node, node addressing system, and user need to only trigger external trigger, It can be addressed automatically to from node, simplify the process of node addressing system addressing, reduce the assembly of node addressing system The difficulty of process.
In node addressing system provided in an embodiment of the present invention, host node can also have instruction from node memory node The function of location information carries out exemplary elaboration below by way of Figure 11 embodiment.
The embodiment of the invention provides a kind of node addressing system, which includes host node and from node. Referring to Figure 11, in node addressing system provided in an embodiment of the present invention, host node and the interactive process from node be can wrap Include following steps:
1101, from node real-time detection external trigger.
Similarly, this will not be repeated here for this step and above-mentioned steps 101.
1102, from node after detecting external trigger, addressing request is sent to host node, and will be set to from node Wait the state of node address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 102.
1103, host node obtains node address information after receiving addressing request.
Similarly, this will not be repeated here for this step and above-mentioned steps 103.
1104, host node is to this from node sending node address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 104.
1105, the slave node in the state for waiting node address information receives the node address information.
It is distinguished with above-mentioned Fig. 1 embodiment, it, can be temporarily without lasting after receiving node address information from node Change memory node address information, but cache the node address information, such as in memory by node address information caching, waits After the store instruction for receiving host node, then memory node address information.
1106, host node sends store instruction to from node.
The available store instruction of host node sends store instruction to from node, which can in practical programs To be recorded as SID_CMD_SAVE instruction, SAVE instruction etc., store instruction is used to indicate from node with storing received node Location information.
It should be noted that sending the opportunity of store instruction about host node, following two mode is provided herein:
Mode one, host node in node addressing system at least two addressed from node after, to each from node Send store instruction.Wherein, host node can count the quantity of the node address information sent, with judging the node sent Whether the quantity of location information reaches the quantity to be addressed from node, when the quantity of the node address information sent reaches wait compile When the quantity of the slave node of location, determine that at least two in node addressing system have addressed from node.This is to be addressed from section The quantity of point can store in the master node, can also be inputted in the master node by user, such as can be received in host node It is carried in addressing instruction.
Mode two, host node are sent after being assigned with node address information from node for any one to the node component Store instruction, so that this is from node memory node address information.
1107, from node after receiving the store instruction of the host node, the node address information is stored.
After store instruction is received from node component, persistent storage can be carried out to received node address information, Such as node address information can be written in nonvolatile memory, after powering on next time, it can be deposited from node from non-volatile The node address information stored before being read in reservoir, using the node address information and host node and other from node carry out letter Breath interaction.
Node addressing system provided in this embodiment, host node are indicated by sending store instruction to from node from node Memory node address information can be controlled neatly from whether node stores allocated node address information, extend node The function of addressing system, improves flexibility.
Node addressing system provided in an embodiment of the present invention can also have inspection addressing whether correct function, lead to below It crosses Figure 12 embodiment and carries out exemplary elaboration.
The embodiment of the invention provides a kind of node addressing system, which includes host node and from node. Referring to Figure 12, in node addressing system provided in an embodiment of the present invention, host node and the interactive process from node be can wrap Include following steps:
1201, from node real-time detection external trigger.
Similarly, this will not be repeated here for this step and above-mentioned steps 101.
1202, from node after detecting external trigger, addressing request is sent to host node, and will be set to from node Wait the state of node address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 102.
1203, host node obtains node address information after receiving addressing request.
Similarly, this will not be repeated here for this step and above-mentioned steps 103.
1204, host node is to this from node sending node address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 104.
1205, the slave node in the state for waiting node address information receives the node address information, and stores the section Dot address information.
Similarly, this will not be repeated here for this step and above-mentioned steps 105.
1206, inspection instruction of the host node to this from node sending node address information.
The inspection of node address information is instructed for checking whether node address information addresses correctly, that is, node address letter Whether breath is allocated to from node, and is allocated to uniquely from node.Check that instruction can carry node address information, in reality It is can recorde in the program of border as SID_CMD_CHECK instruction, CHECK instruction etc..
To after node sending node address information, the inspection of available node address information instructs host node, to It is instructed from the inspection of node sending node address information.Wherein, the inspection instruction of node address information can be pre- in the master node First store.In addition, if node addressing system includes at least two from node, for each of at least two node address informations Node address information, host node can successively send the inspection instruction of the node address information, to check node addressing system In each from the addressing of node.
1207, from node after receiving inspection instruction, when the node address information of inspection instruction with should be from node When the node address information of storage is consistent, the host node is notified to have received inspection instruction from node.
It can be after receiving inspection instruction from node, the available node address information for checking instruction, for example, can be with Parsing checks instruction, obtains checking the node address information that instruction carries.In addition, with can reading stored node from node Location information, detection check whether the node address information of instruction is consistent with the node address information of the storage, when two nodes When location information is consistent, then host node is notified to have received inspection instruction, when two node address informations are inconsistent, then without logical Know that host node has received inspection instruction.
The mode for checking instruction is had received about notice host node, and confirmation instruction can be sent to host node from node, Show itself to have received inspection instruction by sending confirmation instruction.Wherein, inspection has been received for confirming in confirmation instruction Instruction.Wherein, confirmation instruction is can recorde in practical programs as ACK_CHECK instruction.
1208, when one, which has received the inspection from node notice, instructs, host node determines that the node address information is compiled Location is correct.
When one, which has received the inspection from node notice, instructs, show that node address information is assigned and is only assigned To one from node, therefore host node determines that node address information addressing is correct.Wherein, host node can determine that notice has connect The quantity for checking the slave node of instruction is received, when the quantity is 1, determines that one notifies that having received the inspection refers to from node It enables.For example, host node can count the quantity of the confirmation message received, when receiving only a confirmation message, it is determined that Only one has received inspection instruction from node notice.
It should be noted that it is above-mentioned be only by from node addressing it is correct in case where be described, and in addressing process In, in fact it could happen that repeat to address (RA) does not address first-class abnormal conditions, host node can be had received according to notice check instruction from The quantity of node, detects abnormal conditions.Specifically, may include following situations one and situation two,
Situation one, when at least two from node notice have received the inspection instruct when, determine the node address information compile Location repeats.
When at least two have received inspection instruction from node notice, with showing the node that at least two store from node Location information is identical, be all check instruction in node address information, that is to say, a node address information be duplicatedly distributed to At least two from node, therefore host node determines that node address information addressing repeats.
Wherein, host node can determine that notice has received the quantity for checking the slave node of instruction, when the quantity is greater than 1 When, determine that one has received inspection instruction from node notice.For example, host node can count the confirmation message received Quantity, when the quantity of the confirmation message received is greater than 1, it is determined that there are at least two to have received the inspection from node notice Instruction.
Situation two, when not from node notice have received the inspection instruct when, determine that the node address information is failed Addressing.
When not having received inspection instruction from node notice, showing should not from node storage in node addressing system The node addressing information for checking instruction, that is to say, the node addressing information of inspection instruction is not addressed successfully.
Wherein, host node can count the quantity of the confirmation message received, and when not receiving confirmation message, determination does not have Have from node notice and has received inspection instruction.
Optionally, when node address information addressing is incorrect, such as host node determines section in situation one and situation two When the addressing of dot address information is repeated, addressed not successfully, i.e., host node can be prompted according to the second default prompting mode, thus Prompt the addressing of user node address information incorrect, therefore user can be understood from node compiled in time by the prompt of host node The incorrect situation in location, to re-start addressing.
Wherein, the second default prompting mode is for prompting node address information to address incorrect, the second default prompting mode It can be arranged according to the physical aspect of host node, such as can preset prompt information to show, issue default prompt audio etc., than If the second default prompting mode can flash as host node is configured with signal lamp for signal lamp.
Node addressing system provided in this embodiment is instructed by the inspection of node address information, realizes inspection addressing Whether correct function, extend the function of node addressing system, can check that addressing is repeated or addressed not successfully in time Abnormal conditions, to improve the reliability and accuracy rate of addressing.Further, host node can be mentioned when addressing inaccuracy Show, user is helped to understand the situation of node address information inaccuracy in time.
Figure 13 is a kind of flow chart of host node addressing method provided in an embodiment of the present invention, and the executing subject of this method is Host node, referring to Figure 13, method includes:
1301, host node receives the addressing request sent from node.
Addressing request is that should be addressed from node for requesting host node, and addressing request can be in external trigger pair It is sent after node triggering.In a kind of possible realization, addressing request can have been detected by external trigger for notice Message, as one of program language notification message, such as the message of external trigger, example can be detected for confirmation Such as, addressing request can recorde as ACK_DETECT message in practical programs.
In the present embodiment, after sending addressing request from node, host node be can receive from the addressing from node Request, for example, host node and may be mounted in CAN bus from node, CAN bus has the intercommunication for enabling different nodes Function, host node can receive and be requested from the addressing of node by the communication function of CAN bus.It is requested when receiving addressing Afterwards, host node can identify that the addressing is requested, and determination will be from node addressing, thereby executing the process of subsequent addressing.
1302, host node obtains node address information.
Host node has the function of distribution node address information, can be from node distribution node address information.For example, main Available at least one node address information to be allocated of node, can choose one from least one node address information Node address information, to distribute to the node address information of selection from node.
Wherein, about the process for obtaining at least one node address information to be allocated, optionally, host node be can receive Addressing instruction, parsing addressing instruction, obtains at least one node address information to be allocated.The specific of instruction is addressed for receiving It realizes, host node can detecte the input operation of user, to receive the addressing instruction of user's input.In addition, host node At least one node address information can be obtained otherwise, such as at least one node address information is stored in advance etc..
1303, host node is to from node sending node address information.
Host node has obtained the node address letter that host node distributes from node to after node sending node address information Breath, completes the purpose of addressing.
About the specific implementation of sending node address information, optionally, distribution instruction is can be generated in host node, which refers to It enables and carries node address information, host node can be believed by sending distribution instruction to from node to from node sending node address Breath.Wherein, distribution instruction is can recorde in practical programs as SID_CMD_ALLOC instruction or ALLOC instruction, distribution instruction It is corresponding from node for node address information to be sent to.
Method provided in an embodiment of the present invention, host node are to be addressed from node, mention based on from the addressing of node request A kind of software mode has been supplied to carry out the method addressed automatically, flexibility is high, without being different during manufacturing node The different node address information of node burning improves node to dramatically save the time of the manufacturing process of node The efficiency of manufacturing process.
Figure 14 is a kind of flow chart of host node addressing method provided in an embodiment of the present invention, and the executing subject of this method is Host node, referring to Figure 14, method includes:
1401, host node receives addressing instruction, based on addressing instruction, obtains at least one node address letter to be allocated Breath.
Addressing instruction, which also can recorde in practical programs, distributes instruction or ID distribution instruction for node address information, from function For the angle of energy, addressing instruction is used to indicate at least one node address information to be allocated, and addressing instruction can trigger master Node executes the process of addressing.For the angle of content, addressing instruction can carry value range parameter, the type from node One or more any combination in mark and overtime duration, when host node receives addressing instruction, can determine whether will be to from node It is addressed.
For the specific implementation for receiving addressing instruction, host node can detecte the input operation of user, to receive The addressing instruction inputted to user.Wherein, host node can configure input unit, when user carries out input operation in input unit When, the available addressing instruction in input unit input of host node.Wherein, which can be keyboard, Touch Screen Built-in or can be laid in except host node in the master node Deng, input unit, by mechanical connection, electric connection, The modes such as network connection are attached with host node.
About the process for determining node address information is instructed based on addressing, in the present embodiment, addressing instruction, which can carry, to be taken It is worth range parameter, value range parameter is used to indicate the value range of at least one node address information, and host node can parse Addressing instruction obtains the value range parameter that addressing instruction carries, with determining at least one node according to the value range parameter The value range of location information, using at least one numerical value in the value range as at least one node address information.
In one possible implementation, host node can establish resource pool, and storage obtains at least in resource pool One node address information, it is subsequent whenever for any one from node distribution node address information, one is taken out from resource pool The node address information is distributed to this from node by node address information.
About the particular content of value range parameter, following three kinds of implementations are illustratively provided herein:
Implementation one, value range parameter are starting value and node address information number.
The value that value is first node address information at least one node address information is originated, in practical programs In can recorde to originate ID, node address information number refers to the number of at least one node address information, and host node can be with According to the starting value and node address information number, at least one node address information is determined, such as can will originate value As first node address information, starting value is added one, as second node address information, and so on, until really Until the quantity for the node address information made reaches the node address information number.
Illustratively, addressing instruction can carry starting value 10 and node address information number 4, then host node can incite somebody to action 10,11,12,13 as at least one node address information to be allocated.
Implementation two, the value that value range parameter is at least one node address information.
Value range parameter may be the value of at least one node address information, then host node parsing addressing instruction It afterwards, can be directly using at least one obtained value as at least one node address information.
Illustratively, addressing instruction can carry 10,11 and 12, then host node can be by 10,11 and 12 as to be allocated At least one node address information.
Implementation three, value range parameter are starting value and termination value.
Terminate the value that value refers to the last one node address information at least one node address information.Host node At least one node address information can be obtained, such as can will take from the starting according to the starting value and the termination value Value is used as first node address information, and starting value is added one, as second node address information, and so on, until Until determining the last one node address information.
Illustratively, addressing instruction can carry starting value 10 and terminate value 13, then host node can by 10,11,12, 13 as at least one node address information to be allocated.
By this step, following technical effect at least can achieve:
The value range parameter of addressing instruction can be arranged according to business demand in user, and host node passes through the value range Parameter obtains at least one node address information, can guarantee that the value of the node address information of distribution meets user's expectation, Meet user to the customized demand of node address information.Further, user can be according to business demand, and neatly adjustment is compiled The value range parameter of location instruction, host node according to the different available different node address informations of value range parameter, Guarantee can neatly adjust the node address information of distribution.
1402, host node sends first state switching command.
First state switching command can recorde in practical programs for enabled instruction, start instruction etc., first state refers to Order is used to indicate the state for being set to real-time detection external trigger, after host node determines node address information to be allocated, First state instruction can be sent to from node, instruction is set to the state of real-time detection external trigger from node, so as to from After node switching state, external trigger can be detected in time.Optionally, host node can be sent by the way of broadcast First state switching command sends first state switching command to each of node addressing system from node, to indicate Each of node addressing system is set to the state of real-time monitoring external trigger from node.
1403, host node is receiving after the addressing of node request, and host node is from least one node address information Choose node address information.
For each of node addressing system from node, host node can receive the addressing request from node, pass through Addressing request can be known from nodal test to external trigger, then using the dividing as this node address information from node With object, node address information is chosen from least one node address information, to distribute to the node address information This any one from node.
Optionally, if node addressing system includes at least two from node, external trigger can at least two from Node successively triggers, that is, user successively can trigger external trigger from node to each, any moment most many-one from Node triggers external trigger, then the different times from nodal test to external trigger are different, in node addressing system At least two can successively detect external trigger according to regular hour sequencing from node, then, due to main section Point is only to detect that the slave node of external trigger is addressed every time, then can achieve the effect that host node successively addresses, That is, host node can according to the sequencing from nodal test to external trigger, by least two node address informations according to Sub-distribution gives at least two from node, to guarantee at least two customized demands for meeting user from the addressing sequence of node.
For example, it is assumed that at least two node address informations are 1,2 and 3, at least two adjust A, electricity to adjust B and electricity from node for electricity C is adjusted, electricity adjusts A first to detect external trigger, and electricity adjusts B second to detect external trigger, and electricity adjusts the inspection of C third External trigger is measured, electricity can be distributed to by 1 and adjust A, 2, which distribute to electricity, adjusts B, and 3, which distribute to electricity, adjusts C.
For the specific implementation successively addressed according to the sequencing from nodal test to external trigger, work as master Node receives any one from when the addressing of node request, and the available addressing request of host node is asked in the addressing having received Sequence in asking, that is, determine which addressing received request the addressing request that this is received is, such as can count The total quantity of the addressing request received, the sequence which is requested as the addressing.Optionally, host node can compiled The quantity of the accumulative addressing request having received during location, whenever receiving an addressing request, to the addressing added up The total quantity of request adds one, by way of superposition, that is, can determine the sequence of addressing request.Illustratively, it is assumed that from node i to Host node has sent addressing request, can be with if host node determines this addressing request as the n-th addressing request that receives Determine the slave node for detecting external trigger for n-th from node i.
For the detailed process for choosing node address information, host node can be at least one node address information according to number The size of value is ranked up, such as can be ranked up at least one node address information according to sequence from big to small.When Addressing request is received, obtains addressing request after the sequence in the addressing request having received, it can be from least one Ranking node address information corresponding with the sequence is chosen in node address information, and node address information is distributed to from node, Such as ranking and the identical node address information of the sequence at least one node address information can be chosen, it is suitable with this by ranking The identical node address information of sequence is distributed to from node.For example, when receiving n-th addressing request, from least one node N-th node address information is chosen in address information, and n-th node address information is distributed to and sends n-th addressing request Slave node.
In this step, user can be successively triggered according to demand to the external trigger from node, and host node can be by According to the sequencing of external trigger, successively addressed at least two from node, realize from the addressing sequence of node with The sequence of external trigger matches, and guarantees that addressing sequence meets the customized demand of user.
1404, host node sending node address information.
For the specific implementation of sending node address information, distribution instruction, distribution instruction is can be generated in host node It is can recorde in practical programs as SID_CMD_ALLOC instruction or ALLOC instruction, distribution instruction carrying node address letter Breath, distribution instruction are corresponding from node for node address information to be transmitted to.Optionally, since section is not yet received from node When dot address information, host node possibly can not be looked for specially from node, and host node can be sent out by the way of broadcast to from node Node address information is sent, for example, host node can be instructed with broadcast allocation.
Optionally, addressing method provided in an embodiment of the present invention can also distinguish between different node types, can be to specified It is one or more addressed from node, such as only capable addressing is transferred in all electricity, without to node addressing system In it is all addressed from node, to guarantee that the object of addressing meets the customized demand of user.
For the specific implementation addressed in conjunction with node type, addressing instruction also can indicate that node type, main When node receives addressing instruction, it can be instructed based on the addressing and determine node type.For example, addressing instruction can carry type Mark, type identification are used to indicate the type of node, and host node can be stored in advance between type identification and the type of node Default corresponding relationship, such as 1 is the type identification of holder, 2 type identifications etc. adjusted for electricity, when host node obtains in addressing instruction It after type identification, can be identified according to the type, default corresponding relationship be inquired, so that it is determined that node type.
Wherein, the entrained node address information number of addressing instruction, can be with corresponding types in node addressing system It is matched from interstitial content, for example, it is assumed that being mounted with 3 holders in bus, then type identification 1, node can be carried by addressing instruction Address information number 3.
In this way, the node type of addressing instruction can be arranged according to business demand in user, host node is instructed by the addressing Node type is obtained, can guarantee that the type of the slave node of addressing meets user's expectation, meet user to node address information Customized demand.In addition, in above-mentioned steps 1402, host node can to addressing instruction node type it is corresponding it is all from Node broadcasts first state switching command, so that one kind enters from node the state of real-time detection external trigger, main section It is corresponding from node that at least one node address information can be distributed to node type by point, such as corresponding according to the node type All sequencings from nodal test to external trigger, at least one node address information is successively distributed into node Type is corresponding each from node.
Optionally, the embodiment of the present invention can also realize the function that addressing time-out then automatically exits from.What is automatically exited from is specific Implementation may include any combination one or more in following manner one and mode two:
Mode one, in above-mentioned steps 1403, when host node send first state switching command when, host node can start Timing, when timing duration is more than preset duration, and does not receive addressing request yet, host node can broadcast the switching of the second state Instruction, second status switching instruction are can recorde in practical programs as exit instruction, SID_CMD_EXIT order, EXIT life Enable etc., the second status switching instruction is used to indicate the state that real-time detection external trigger is exited from node, receives from node To after the second status switching instruction, i.e., it can exit allocation flow.
Optionally, whether host node can judge currently to receive each from section after broadcasting first state switching command Point addressing request, if having received it is each from the addressing of node request, without continue count timing duration.
Mode two, in above-mentioned steps 1404, when being switched to the state of real-time detection external trigger from node, from Node can start timing, judge whether timing duration is more than preset duration, when timing duration is more than preset duration, from node The state of real-time detection external trigger can be exited, such as can be switched to from the state of real-time detection external trigger Timeout mode, wherein the timeout mode can recorde in practical programs for SID_SLAVE_DETECT_TIMEOUT state, TIMEOUT state etc., which, which is used to indicate, corresponding is not detected external trigger by preset duration from node.
Illustratively, referring to Fig. 6, it can be configured to from the state machine of node, real-time detection is set in state machine The state and timeout mode of external trigger, the migration item between the state and timeout mode of real-time detection external trigger Part is that timing duration is more than that preset duration can be sentenced in real time when being each in the state of real-time detection external trigger from node Whether disconnected timing duration is more than preset duration, under the logic of state machine, when timing duration is more than preset duration, from node meeting Timeout mode is automatically switched to, to exit the state of real-time detection external trigger.
The process that overtime duration is determined for each node, provides following two mode herein:
Mode one instructs determining overtime duration according to addressing.
In above-mentioned steps 1401, the received addressing instruction of host node can carry overtime duration, and host node is available The overtime duration that addressing instruction carries carries out timing according to the time-out duration.In addition, host node can be cut in broadcast first state When changing instruction, while overtime duration is sent from node to each, receives overtime duration from node so as to each.
In the method, user can be arranged overtime duration according to demand in addressing instruction, host node and at least one from Node exits the overtime duration of the state of real-time detection external trigger by determining according to addressing instruction, it is ensured that executes The duration of addressing process meets the customized demand of user, improves flexibility.
Mode two, using the duration of default as overtime duration.
The duration of default can also be stored in advance from node at least one for host node, using the duration of the default as time-out Duration.
1405, host node sends store instruction.
Optionally, host node can send store instruction to from node, which is used to indicate from node storage Received node address information, so that can be after receiving the store instruction of host node from node, memory node address information.
1406, the application instruction of host node sending node address information.
Optionally, host node can be instructed to from node sending application, and application instruction is used to indicate from node using Received node address information enables the node from node using distribution so that activation is the node address information distributed from node Address information carries out business processing.
Optionally, if from the processing logic of node are as follows: the node address information that storage is read when powering on every time, using this Node address information to carry out business processing, then application instruction can be instruction of restarting, host node sending application instruction, can make from Node is restarted, and due to having stored the node address information that host node distributes from node, then it can be automatic from node after restarting The node address information for reading distribution, using the node address information.
1407, the inspection instruction of host node sending node address information.
It checks whether instruction addresses correctly for checking that node address information is corresponding from node, checks that instruction can carry Node address information is can recorde in practical programs as SID_CMD_CHECK instruction, CHECK instruction etc..Host node can be It, can be by the way of unicast, at least one node address information after being assigned at least one node address information Each node address information, host node can send the inspection instruction of the node address information, check that instruction carries node address Information, so as to check the node address information addressing process correctness.
1408, host node confirmation has addressed correctly from node.
By taking any one node address information as an example, after sending the inspection instruction of the node address information, host node can lead to It crosses following several implementations and confirms whether node address information correspondence addresses correctly from node.
Implementation one, when one from node notice have received the inspection instruct when, determine the node address information compile Location is correct.
For example, when host node receives a confirmation message, show the node address information be assigned and only by One is distributed to from node, therefore can to determine that node address information has been properly assigned to corresponding from node for host node.
Implementation two, when at least two from node notice have received the inspection instruct when, determine the node address believe Breath addressing repeats.
For example, when host node receives multiple confirmation messages, it is multiple to show that the node address information is assigned to From node, i.e. node address information addressing repeats, therefore host node can determine node address information duplicate allocation to multiple From node.
Implementation three, when not from node notice have received the inspection instruct when, determine the node address information not Success addresses.
For example, when host node does not receive confirmation message, it can determine that the node address information is distributed to not successfully Corresponding from node, that is, the node address information addresses not successfully, therefore host node determines that node address information distributes not successfully To corresponding from node.
Optionally, when host node determines that the addressing of any one node address information is repeated, addressed not successfully, i.e., any one is saved When the addressing of dot address information is incorrect, host node can be prompted according to the second default prompting mode, the second default prompt Mode is incorrect for prompting node address information addressing, for example, the second default prompting mode can be the default prompt of display Information issues and presets prompt audio etc..
Method provided in an embodiment of the present invention provides a kind of external trigger by detection to be addressed automatically Method, user only need to from node trigger external trigger, the slave node in node addressing system can be allowed to be addressed, Without the node address information different for different node burnings during manufacturing node, to dramatically save node Manufacturing process time, improve the efficiency of the manufacturing process of node.Further, volume can be realized by way of software Location significantly reduces cost without the hardware module additional for node addressing system configuration.
Figure 15 is a kind of flow chart from node addressing method provided in an embodiment of the present invention, and the executing subject of this method is From node, referring to Figure 15, this method comprises:
1501, from nodal test external trigger.
External trigger can be user in the event for executing operation from node, and external trigger can indicate to work as Preceding operation object is the slave node of this node address information to be allocated, if from nodal test to external trigger, table Bright user has the demand to from node addressing, needs to be addressed from node.Wherein, external trigger can according to from The physical aspect of node determines that external trigger can be any one event being able to detect that from node.
Optionally, the state of real-time detection external trigger can be set to from node, in the real-time detection external trigger In the state of event, whether external trigger can occur from node with constant testing, to detect external trigger thing in time Part.Wherein, the state of real-time detection external trigger is can recorde in practical programs as SID_SLAVE_DETECT_ PROCESS state, DETECT state, detecting state etc..
In an exemplary scene, by from node for the propeller of unmanned plane for, external trigger can for dial The propeller of dynamic unmanned plane, propeller can have sensor or it is other can perceive the component for stirring operation, work as user When stirring propeller, propeller can detecte external trigger.
In another exemplary scene, it can be adjusted from node for the electricity of unmanned plane, external trigger can be to stir Electricity adjusts the propeller of connection.Wherein, electricity is adjusted and is electrically connected with propeller, and electricity, which is adjusted, can carry out information friendship with propeller Mutually, when user stirs propeller, propeller can notify electricity is adjusted itself to be struck, then electricity, which is adjusted, can detecte external trigger thing Part.
It can be the holder of unmanned plane from node in another exemplary scene, external trigger is to stir holder Axis, holder can have sensor or it is other can perceive the component for stirring operation, when user stirs the axis of holder, The axis of holder can detecte external trigger.
It should be noted that above-mentioned described outside nodal test so that the propeller of unmanned plane, electricity reconcile holder as an example The scene of portion's trigger event, in another possible embodiment, from other of node or unmanned plane node, Huo Zhewei Node in other kinds of addressing system, external trigger can generate biggish difference according to the difference of actual scene, The embodiment of the present invention to the type of external trigger and from node specific form without limitation.
1502, addressing request is sent from node to host node.
Addressing request is that should be addressed from node for requesting host node, and addressing request can be in external trigger pair It is sent after node triggering.In a kind of possible realization, addressing request can have been detected by external trigger for notice Message, as one of program language notification message, such as the message of external trigger, example can be detected for confirmation Such as, addressing request can recorde as ACK_DETECT message in practical programs.
From node after detecting external trigger, available addressing request sends addressing request to host node, from And requesting host node is to be addressed from node.
1503, the state for waiting node address information is set to from node.
Waiting the state of node address information can recorde in practical programs as wait state, SID_SLAVE_WAIT_ ID state etc..In the state of in node address information is waited, host node can be waited for its distribution node address letter from node Breath, so as to which the node address information can be received from node after host node sending node address information.
In the present embodiment, is had sent from node after addressing request, the state for waiting node address information can be set to.One It in the possible implementation of kind, referring to fig. 4, can be configured to from the state machine of node, inspection in real time is set in state machine It surveys the state of external trigger and waits the state of node address information, the state and waiting of real-time detection external trigger Transition condition between the state of node address information is to detect external trigger, is each in outside real-time detection from node When the state of portion's trigger event, can real-time detection external trigger, under the logic of state machine, when detecting external trigger thing When part, the state for waiting node address information can be automatically switched to from node.
1504, the slave node receiving node address information in the state for waiting node address information.
After host node has sent node address information, the shape of node address information is waited due to being set to before node State is waiting node address information, therefore can receive from node to node addressing information.
Optionally, it can receive distribution instruction from node, parsing distribution instructs, with obtaining the node that distribution instruction carries Location information, to receive node addressing information.
1505, the node address information is stored from node.
From node the node address information received can be stored by the way of caching or persistent storage.Wherein, when When by the way of caching, node address information can be written into memory from node, thus provisional storage in memory Node address information.When by the way of persistent storage, host node can be with configuring non-volatile memory, can be by node Address information is written in nonvolatile memory, thus persistence ground memory node address information in the nonvolatile memory.
After from node memory node address information, the purpose of addressing can be realized, can have been sent out host node from node The node address information sent as itself ID, using other nodes in the node address information, with node addressing system it Between carry out information exchange.
In an exemplary scene, when other nodes are wanted to send information from node to this, it need to only take in the information Band is based on stored node address information from node, is successfully received other nodes from the node address information of node Information.
In another exemplary scene, when wanting to send information to other nodes from node, it can take in the information Band receives information, the node address information in identification information, according to the node from the node address information of node, other nodes Address information, can be with awareness information from from node.
Method provided in an embodiment of the present invention, can be by the external trigger of detection come the automatic side addressed Method, user only need to trigger external trigger to from node, the slave node in node addressing system can be allowed to be addressed, operated Simply, strong flexibility, also, without being the different node address information of different node burnings during manufacturing node, To dramatically save the time of the manufacturing process of node, the efficiency of the manufacturing process of node is improved.
Figure 16 is a kind of flow chart from node addressing method provided in an embodiment of the present invention, and the executing subject of this method is From node, referring to Figure 16, method includes:
1601, first state switching command is received from node, is set to the state of real-time detection external trigger.
First state switching command can recorde in practical programs for enabled instruction, start instruction etc., first state refers to Order is used to indicate the state for being set to real-time detection external trigger, can receive the first state that host node is sent from node and refers to It enables, is set to the state of real-time detection external trigger, after switching state, can detect external trigger in time.
The state of real-time detection external trigger is can recorde in practical programs as SID_SLAVE_DETECT_ PROCESS state, DETECT state, detecting state etc..After host node sends first state switching command, it can be connect from node The first state switching command is received, is set to the state of real-time detection external trigger automatically, to detect external trigger in time Event, to obtain node address information.Wherein, if host node broadcast first state switching command, in node addressing system Each of can receive first state switching command from node.
It, referring to fig. 4, can be to from section for the specific implementation for the state for being switched to real-time detection external trigger The state machine of point is configured, and the state of default conditions and real-time detection external trigger is arranged in state machine, defaults shape Transition condition between state and the state of real-time detection external trigger is to receive first state switching command, is in from node When default conditions, if receiving first state switching command, under the logic of state machine, it can automatically switch to outside real-time detection The state of portion's trigger event.Wherein, default conditions are can recorde in practical programs as SID_SLAVE_NULL state or NULL State, default conditions can for from node power on after automatically into state.
External trigger is properly termed as trigger event, predeterminable event, predetermined registration operation etc., and external trigger is used to indicate Current operation object is the slave node of this node address information to be allocated, that is, if be triggered external trigger thing from node Part can determine that this should will be addressed from node.In an exemplary scene, if user is desired for any one from section Point is addressed, and only need to be triggered external trigger from node to this, then the external trigger can be detected from node, to master Node sends addressing request, so that host node is addressed to from node.Wherein, external trigger can be according to from node Physical aspect setting, external trigger can be any operation being able to detect that from node.
Illustratively, node addressing system can be applied in unmanned plane, then from the component that node is in unmanned plane, example It such as, can be the propeller of unmanned plane from node, external trigger can be to stir the propeller of unmanned plane.For another example, from section Point can be adjusted for the electricity of unmanned plane, and external trigger can be the propeller stirred electricity and adjust connection.Wherein, electricity tune and propeller It is electrically connected, electricity, which is adjusted, can detect that propeller is able to stir external trigger by the electric connection.For another example, from Node can be the holder of unmanned plane, and external trigger is to stir the axis of holder.
In the embodiment of the present invention, it can be determined from the external trigger of node according to from the actual product form of node, Propeller, electricity tune, axis of holder etc. are usually not configured for the component of display screen and button, can also be detected according to it To external trigger addressed, to greatly improve flexibility, extend application range.
In another exemplary scene, node addressing system can be applied to allocate in wall Picking System, can from node Think the electronic tag allocated in wall Picking System, the external trigger of electronic tag can be pressing electronic tag surface Button.
In a kind of possible realization, when node addressing system include it is a plurality of types of from node when, it is different types of from Node can correspond to different external triggers, such as the corresponding external trigger of holder is the axis of rotary head, and electricity is adjusted Corresponding external trigger can be to stir propeller, to guarantee every kind of external trigger from node and its practical energy Power matching.
1602, from node when detecting external trigger, addressing request is sent to host node, and be set to waiting node The state of address information.
From node after detecting external trigger, available addressing request sends addressing request to host node, compiles Location request is that should be addressed from node for requesting host node, so as to host node receive after addressing request for should from node into Row addressing.In a kind of possible realization, addressing request can have been detected by the message of external trigger for notice To be realized using the notification message in program language, for example, addressing request can detect disappearing for external trigger for confirmation Breath, for example can recorde in practical programs as ACK_DETECT message.
Optionally, it can judge that the manipulation strength of external trigger is when detecting external trigger from node It is no to meet preset condition, addressing request is sent when the manipulation strength of external trigger meets preset condition, then to host node, And when the manipulation strength of external trigger is unsatisfactory for preset condition, then without sending addressing request to host node.Wherein, should The manipulation strength that preset condition is used to indicate external trigger is enough to trigger the process of addressing, by detecting external trigger Manipulation strength whether meet preset condition, can be avoided the interference due to external environment or the maloperation of user, cause from Nodal test is to external trigger, so that the case where the process of false triggering addressing.
The specific implementation for whether meeting preset condition for detection external trigger, may include following implemented side Formula one and implementation two.
Implementation one, the duration that external trigger is determined from node are more than preset duration.
The duration that can recorde external trigger from node judges whether the duration is more than preset duration, When the duration is more than preset duration, it is believed that external trigger is not belonging to maloperation or environmental disturbances, then to host node Addressing request is sent, when the duration is less than preset duration, then without sending addressing request to host node.
To be adjusted to example from node as electricity, electricity, which is adjusted can detecte, stirs whether the duration of propeller is more than preset duration, When the duration for stirring propeller is more than preset duration, electric tuning host node sends addressing request.Using from node as electronics For label, whether the duration that electronic tag can detecte push button is more than preset duration, when continuing for push button When duration is more than preset duration, electronic tag sends addressing request to host node.
Implementation two, the service speed that external trigger is determined from node are more than pre-set velocity.
The service speed that can recorde external trigger from node judges whether the service speed is more than pre-set velocity, When the service speed is more than pre-set velocity, it is believed that external trigger is not belonging to maloperation or environmental disturbances, then to host node Addressing request is sent, when the service speed is less than pre-set velocity, then without sending addressing request to host node.
To be adjusted to example from node as electricity, electricity, which is adjusted can detecte, stirs whether the speed of motor is more than pre-set velocity, when stirring When the speed of motor is more than pre-set velocity, electric tuning host node sends addressing request.
It should be noted that the above-mentioned implementation one of an execution or implementation two can be selected from node, reality can be executed The combination of existing mode one and implementation two, for example, when the duration for determining external trigger is more than preset duration and outer When the service speed of portion's trigger event is more than pre-set velocity, addressing request is sent to host node, when holding for the external trigger When the service speed that continuous duration is less than preset duration or external trigger is less than pre-set velocity, without being sent out to host node Addressing is sent to request.
In the present embodiment, the shape for waiting node address information itself can will be set to when sending addressing request from node State waits the state of node address information to can recorde in practical programs for wait state, SID_SLAVE_WAIT_ID state Deng.In the state of in node address information is waited, the node address information of distribution can be received from node.
Wherein, for detect external trigger then automatically switch to wait node address information state specific reality Existing mode referring to fig. 4, can be illustratively configured to from the state machine of node, be arranged outside real-time detection in state machine The state of portion's trigger event and the state for waiting node address information, the state and waiting node of real-time detection external trigger Transition condition between the state of address information is to detect external trigger, is each in touching outside real-time detection from node When the state of hair event, can real-time detection external trigger, under the logic of state machine, when detecting external trigger When, the state for waiting node address information can be automatically switched to from node.
In the embodiment of the present invention, external trigger can trigger under various scenes according to practical business demand, thus The process of addressing is executed, and then greatly improves the flexibility of addressing process.Here, through following scene one into scene four The exemplary scene of external trigger is described:
Scene one, when node addressing system assembles complete when, trigger external trigger.
When node addressing system has been completed, user can trigger the external trigger to from node, then from Node can detecte external trigger, to start the process of addressing.
After finishing assembly, user only need to trigger external trigger from node to each, can distribution node address letter Breath, manufacture from node during, without be node address informations each different from node burning, assembly node addressing It is same type of from node without distinguishing during system, by any one from node installation at any one from node Installation site can be assembled, and addressing instruction need to be only inputted after node addressing system has been completed, can be by main section Point is addressed to each from node automatically, to significantly reduce the difficulty of node addressing system assembling process.
Scene two, when newly installing in node addressing system from node, trigger external trigger.
When node addressing system has been completed, and newly it is mounted with to the node addressing system one or more from section When point, user only need to trigger external trigger to the slave node newly installed, and can start the process of re-mapping, to attach most importance to The node addressing system newly assembled is addressed.
Wherein, the embodiment of the present invention can be supported newly to install to any position of node addressing system from the addressing after node Process, such as can be installed after node to the last one from node, it can be for another example inserted among node from section all Point.
It should be noted that, when needing new installation node, needing to burn the node newly installed in traditional manufacturing process Node address information is recorded, just can be carried out installation, manufacture craft is cumbersome.Meanwhile it if to be inserted into assembled all nodes When entering a certain node, is matched since the mark sequence of node needs to fix with the sequence of the installation site of node, needed to dismantle The node addressing system of assembling, greatly consumes the time of assembling process in this way.
And node addressing method provided in an embodiment of the present invention is applied, and in various new installations from the scene of node, equal nothing Assembled node addressing system need to be dismantled, the position that the slave node insertion after new installation need to be only needed, then touched to from node External event is sent out, host node can be that each node is compiled by program code execution by the way of software automatically Location has high scalability and flexibility.
Scene three, when having replaced in node addressing system from node, trigger external trigger.
It breaks down from node or other situations when a certain in node addressing system, when needing replacing this from node, when more After having changed new slave node, user only need to trigger external trigger to the slave node newly replaced, and can start re-mapping Process, to redistribute node address information from node for each of the node addressing system of having replaced from node.
It should be noted that, when needing replacing node, needing the node burning to newly installing in traditional manufacturing process Node address information, could be by the node installation in bus, and manufacture craft is cumbersome.
And node addressing method provided in an embodiment of the present invention is applied, in the scene of various replacement nodes, without being The slave specific node address information of node burning after new installation, directly replacement need to only trigger external trigger thing from node Part, the slave node that can newly replace automatically are addressed, and have high scalability and flexibility.
Scene four, when the mistake from node addressing any in node addressing system, trigger external trigger.
Addressing mistake i.e. finger is incorrect from the node address information of node, such as any one is from the node address information of node It is repeated with other from the node address information of node, is unaddressed from node.It is compiled when a certain in node addressing system from node After the mistake of location, user only need to trigger external trigger to the slave node of addressing mistake, can start the process of re-mapping.
It should be noted that, when node addressing mistake, needing to check out appearance addressing mistake in traditional manufacturing process Node, by addressing mistake node take apart, burning node address information, could correct addressing again, and process is excessively numerous It is trivial.
And node addressing method provided in an embodiment of the present invention is applied, if there is mistake in addressing, without that will address mistake Node take apart and burning again, only need to trigger external trigger, addressing can be re-started, improve efficiency.
It should be noted that above-mentioned steps 1601 to step 1602 can be applied in each of node addressing system from section In point, external trigger can successively be triggered at least two from node, then at least two can successively execute addressing from node Process, until all being finished from node addressing.
1603, the slave node in the state for waiting node address information, receiving node address information.
The state that node address information is waited due to being set to before node, then after host node sending node address information, Node addressing information can be successfully received from node.Optionally, can receive distribution instruction from node, parsing distribution instructs, The node address information that distribution instruction carries is obtained, to receive node addressing information.
Optionally, it can also be prompted after addressing from node, to prompt user to continue to trigger external trigger Event.Specifically, it can be prompted after memory node address information according to the first default prompting mode from node, it should First default prompting mode can prompt user to address from node to finish, and user can be allowed to know and touched to next from node External trigger is sent out, which can determine from the physical aspect of node, such as can be to light instruction Lamp issues default voice, shows and preset text, show the default page etc..
In an exemplary scene, after user triggers external trigger from node to some, successfully compiled from node Indicator light is lighted behind location, user, which sees from node, lights indicator light, you can learn that having addressed success from node, can continue External trigger is triggered from node to next, user, which sees from node, not yet lights indicator light, you can learn that still from node Unaddressed success can wait a moment, and be further continued for triggering external trigger from node to next until indicator light lights.That , whether user can be distinguished from whether node addressing finishes by prompting from node, know whether to need to continue to trigger External trigger so, it is possible the process for helping and guiding the addressing of user's control node addressing system, reduce user Cost is practised, it is more humanized.
Optionally, the shape for waiting node address information can be exited after receiving and storing node address information from node State, in this way, when host node it is subsequent for other from node broadcasts node address information when, should from node due to being not at waiting node The state of address information, thus will not misconnection receive node address information, to guarantee that node address information being capable of unique transport It is multiple from node without being distributed to corresponding from node.
For receive node address information then automatically exit from wait node address information state specific implementation, The state for waiting node address information can be set in state machine and exit the state for waiting node address information, wait node The state of address information and the transition condition exited between the state for waiting node address information are to receive node address information, When being each in the state for waiting node address information from node, under the logic of state machine, when receiving node address information When, it can be switched to automatically from the state of waiting node address information from node and exit the state for waiting node address information, thus Exit the state for waiting node address information.Wherein, it exits and waits the state of node address information that can remember in practical programs Record is acquisition state, adressed state, SID_SLAVE_OBTAINED state, OBTAINED state etc., is exited with waiting node The state of location information be used to indicate it is corresponding obtained node address information from node, there is no need to continue waiting for node address Information.
Optionally, the embodiment of the present invention can also realize the function that addressing time-out then automatically exits from.What is automatically exited from is specific Implementation may include any combination one or more in following manner one and mode two:
Mode one, when receiving the second status switching instruction of host node from node, exit real-time detection external trigger The state of event.Wherein, the second status switching instruction is can recorde in practical programs as exit instruction, SID_CMD_EXIT life It enables, EXIT command etc., the second status switching instruction is used to indicate the state that real-time detection external trigger is exited from node.
Illustratively, referring to fig. 4, it can be configured to from the state machine of node, real-time detection is set in state machine The state and timeout mode of external trigger, the migration item between the state and timeout mode of real-time detection external trigger Part is to receive the second status switching instruction, when being each in the state of real-time detection external trigger from node, works as reception When to the second status switching instruction, under the logic of state machine, real-time detection external trigger can be automatically exited from from node State.
Mode two can start timing, sentence from node when being switched to the state of real-time detection external trigger Whether disconnected timing duration is more than preset duration, when timing duration is more than preset duration, can be exited outside real-time detection from node The state of portion's trigger event is switched to timeout mode from the state of real-time detection external trigger, wherein the timeout mode It is can recorde in practical programs as SID_SLAVE_DETECT_TIMEOUT state, TIMEOUT state etc., timeout mode use In indicating corresponding external trigger to be not detected by preset duration from node.
Illustratively, referring to fig. 4, it can be configured to from the state machine of node, real-time detection is set in state machine The state and timeout mode of external trigger, the migration item between the state and timeout mode of real-time detection external trigger Part is that timing duration is more than that preset duration can be sentenced in real time when being each in the state of real-time detection external trigger from node Whether disconnected timing duration is more than preset duration, under the logic of state machine, when timing duration is more than preset duration, from node meeting Timeout mode is automatically switched to, to exit the state of real-time detection external trigger.
1604, store instruction, memory node address information are received from node.
Optionally, can be after receiving the store instruction of host node from node, memory node address information., for example, from Node can be with configuring non-volatile memory, after receiving store instruction from node, can be by node address information from node It is written in nonvolatile memory, to carry out persistent storage to node address information.
Wherein, store instruction can recorde in practical programs for SID_CMD_SAVE instruction, SAVE instruction etc., storage refers to Order is used to indicate from node and stores received node address information.
It should be noted that if being to distribute history node address information from node before host node, from node History node address information can be stored, after node reception store instruction, the history node address information of storage can be updated For the node address information of this sub-distribution, such as can be laid equal stress on the history node address information in erasable nonvolatile memory New memory node address information.
By way of directly updating node address information, following technical effect can achieve:
In the related technology, it when needing to change the node address information of node, needs node from node addressing system It takes apart, burning again is carried out to node, the node of node could be changed.And in the present embodiment, without dismantling node, there are no Burning again must be carried out to node, only need to run code logic, and neatly the node address information of node distribution can be carried out Adjustment greatly improves the efficiency of the node address information of adjustment node, simplifies the process flow of re-mapping.
1605, application instruction is received from node, business processing is carried out based on node address information.
After node memory node address information, original node address information can be temporarily used, waits and receives main section After the application instruction of point, the newly assigned node address information of reactivation.Wherein, it is used to indicate using instruction from node application and has deposited The node address information of storage.
Optionally, if from the processing logic of node are as follows: obtain the node address information of storage when powering on every time to carry out Business processing, then can refer to instruction of restarting using instruction, after receiving the instruction of restarting from node, will do it and restart, on again After electricity can be read from nonvolatile memory before distribute node address information, thus using the node address information into Row business processing.
1606, instruction is checked from node, when with checking the node address information instructed and the node stored from node When location information is consistent, inspection instruction is had received from node notice host node.
For any one node address information, when the node address information is successfully distributed to from node, hair After sending the inspection instruction for carrying the node address information, node address information is corresponding can to receive inspection instruction from node.
After receiving inspection instruction from node, it can be instructed and be detected according to the inspection, such as can parse inspection Instruction obtains checking the node address information that carries in instruction, judge to check instruction node address information whether with from node The node address information of storage is consistent, when the node address information for checking instruction is consistent with the node address information stored from node When, notice host node has received inspection instruction.
The mode for checking instruction is had received about notice host node, and confirmation instruction can be sent to host node from node, The confirmation instruction for notify host node its have been received inspection instruction.And when should be unassigned from node, it sends to carry and be somebody's turn to do After the inspection instruction of node address information, each of node addressing system can not receive inspection instruction from node, then not It has from node to host node and sends confirmation instruction.
Optionally, from node prompting mode can be preset according to third and is prompted when receiving inspection instruction.This Three default prompting modes are instructed for being prompted to be successfully received from node to checking, which presets prompting mode can be with It is determined from the physical aspect of node, such as can be to light indicator light, issue default voice, show default text etc..
It should be noted that above-mentioned steps 1601 to step 1606 can be encapsulated as same section of program code, burning is being saved Each of point addressing system is different from node without distinguishing, that is, each can to run this section from node from node Program code executes above-mentioned steps 1601 to step 1606 and obtains respective node according to the external trigger of each self-test Address information.
Method provided in an embodiment of the present invention provides a kind of external trigger by detection to be addressed automatically Method, user only need to from node trigger external trigger, the slave node in node addressing system can be allowed to be addressed, Without the node address information different for different node burnings during manufacturing node, to dramatically save node Manufacturing process time, improve the efficiency of the manufacturing process of node.Further, volume can be realized by way of software Location significantly reduces cost without the hardware module additional for node addressing system configuration.Further, node addressing The addressing sequence of system can be limited according to the customized setting of user demand without the topology location sequence by bus, Flexibility is high.
Figure 17 is a kind of structural schematic diagram of node addressing device provided in an embodiment of the present invention, which includes: to send Module 1701, state switching module 1702, receiving module 1703 and memory module 1704.
Sending module 1701, for sending addressing request to host node after detecting the external trigger from node;
State switching module 1702, for being set to the state for waiting node address information;
Receiving module 1703, for receiving the node address information of host node transmission;
Memory module 1704, for storing the node address information.
Device provided in an embodiment of the present invention, user only need to trigger external trigger to from node, node can be allowed to compile Slave node in the system of location is addressed, without the node address different for different node burnings during manufacturing node Information improves the efficiency of the manufacturing process of node to dramatically save the time of the manufacturing process of node.
In a kind of possible realization, the receiving module 1703, the first state for being also used to receive host node transmission is cut Change instruction;
The state switching module 1702, is also used to be set to the state of real-time detection external trigger.
In a kind of possible realization, the receiving module 1703, the second state for being also used to receive host node transmission is cut Change instruction;
The state switching module 1702, is also used to exit the state of the real-time detection external trigger.
In a kind of possible realization, the device further include:
Cue module, for being prompted according to the first default prompting mode.
It should be the propeller of unmanned plane from node in a kind of possible realization, which is to stir spiral Paddle;Or, should be the electricity tune of unmanned plane from node, which be the propeller stirred electricity and adjust connection;Or, should be from node For the holder of unmanned plane, which is to stir the axis of holder.
In a kind of possible realization, which is also used to after receiving the store instruction of the host node, Store the node address information.
In a kind of possible realization, after the storage node address information, which is also used to: connecing Receive the inspection instruction of node address information;
The device further include: correction verification module, for when inspection instruction node address information with should store from node When node address information is consistent, the host node is notified to have received inspection instruction.
Figure 18 is a kind of structural schematic diagram of node addressing device provided in an embodiment of the present invention, which includes: to receive Module 1801 and sending module 1802.
Receiving module 1801, for receiving the addressing request sent from node;
Sending module 1802, for this from node sending node address information.
Device provided in an embodiment of the present invention, user only need to trigger external trigger to from node, node can be allowed to compile Slave node in the system of location is addressed, without the node address different for different node burnings during manufacturing node Information improves the efficiency of the manufacturing process of node to dramatically save the time of the manufacturing process of node.
In a kind of possible realization, which is also used to refer to this from node transmission first state switching It enables, which is used to indicate the state for being set to real-time detection external trigger.
In a kind of possible realization, the device further include:
Timing module, for starting timing when sending the first state switching command;
The sending module 1802, is also used to when timing duration is more than preset duration, sends the second state to this from node Switching command, second status switching instruction are used to indicate the state for exiting the real-time detection external trigger.
In a kind of possible realization, which is also used to this from node sending node address information Store instruction.
In a kind of possible realization, which is also used to this from node sending node address information Check instruction;
The device further include: determining module, for when having received the inspection from node notice and instructing for one, determining should Node address information addressing is correct;When at least two, which have received the inspection from node notice, instructs, the node address is determined Information addressing repeats;When not having received inspection instruction from node notice, determine that the node address information is compiled not successfully Location.
Figure 19 is a kind of structural schematic diagram of host node provided in an embodiment of the present invention, the host node 1900 can because of configuration or Performance is different and generates bigger difference, which includes one or more processors (central Processing units, CPU) 1901 and one or more memory 1902, it deposits in the memory 1902 of host node At least one instruction is contained, at least one instruction is loaded by the processor 1901 of host node and executed to realize that above-mentioned Fig. 3 is implemented Example, Fig. 5 embodiment, Fig. 6 embodiment, Fig. 7 embodiment, Fig. 8 embodiment, Fig. 9 embodiment, Figure 10 embodiment, Figure 11 embodiment, figure In the node addressing system that 12 embodiments provide, the interactive process of host node side and above-mentioned Figure 13 and/or Figure 14 embodiment In node addressing method.Certainly, which can also include other for realizing the component of functions of the equipments, not do herein superfluous It states.
Figure 20 is a kind of structural schematic diagram from node provided in an embodiment of the present invention, should from node 2000 can because configuration or Performance is different and generates bigger difference, should include one or more processors 2001 and one or one from node 2000 A above memory 2002, is stored at least one instruction from the memory 2002 of node, and at least one instruction is by from section The processor 2001 of point is loaded and is executed to realize above-mentioned Fig. 3 embodiment, Fig. 5 embodiment, Fig. 6 embodiment, Fig. 7 embodiment, Fig. 8 In the node addressing system that embodiment, Fig. 9 embodiment, Figure 10 embodiment, Figure 11 embodiment, Figure 12 embodiment provide, from node Node addressing method in the interactive process of side and above-mentioned Figure 15 and/or Figure 16 embodiment.Certainly, should may be used also from node To include other components for realizing functions of the equipments, this will not be repeated here.
In the exemplary embodiment, a kind of computer readable storage medium is additionally provided, the memory for example including instruction, Above-metioned instruction can be executed by the processor of host node to realize that above-mentioned Fig. 3 embodiment, Fig. 5 embodiment, Fig. 6 embodiment, Fig. 7 are implemented The node addressing system provided in example, Fig. 8 embodiment, Fig. 9 embodiment, Figure 10 embodiment, Figure 11 embodiment, Figure 12 embodiment In, the slave node addressing method in the interactive process of host node side and above-mentioned Figure 13 and/or Figure 14 embodiment.For example, institute It states computer readable storage medium and can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and light data and deposit Store up equipment etc..
In the exemplary embodiment, a kind of computer readable storage medium is additionally provided, the memory for example including instruction, Above-metioned instruction can realize that above-mentioned Fig. 3 embodiment, Fig. 5 embodiment, Fig. 6 embodiment, Fig. 7 are implemented by executing from the processor of node The node addressing system provided in example, Fig. 8 embodiment, Fig. 9 embodiment, Figure 10 embodiment, Figure 11 embodiment, Figure 12 embodiment In, the slave node addressing method from the interactive process and above-mentioned Figure 15 and/or Figure 16 embodiment of node side.For example, institute It states computer readable storage medium and can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and light data and deposit Store up equipment etc..
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (25)

1. a kind of node addressing system, including host node and from node, which is characterized in that
It is described that for after detecting external trigger, Xiang Suoshu host node sends addressing request from node, and will it is described from Node is set to the state for waiting node address information;
The host node, for after receiving addressing request, Xiang Suoshu is from node sending node address information;
Slave node in the state for waiting node address information, is also used to receive the node address information, and store institute State node address information.
2. system according to claim 1, which is characterized in that the external trigger at least two from node successively Triggering.
3. system according to claim 1 or 2, which is characterized in that
It is described from node, be also used to after storing the node address information, prompted according to the first default prompting mode.
4. system according to claim 2, which is characterized in that the host node is also used to at least one to be allocated Node address information is ranked up according to the size of numerical value;When receiving any one from the addressing of node request, described in acquisition Sequence of the addressing request in the addressing request having received;Ranking and institute are chosen from least one described node address information State the corresponding node address information of sequence, by the node address information distribute to it is described any one from node.
5. system according to claim 1, which is characterized in that the host node is also used to send the from node to described One status switching instruction;
It is described from node, after being also used to receive the first state switching command, be set to real-time detection external trigger State.
6. system according to claim 5, which is characterized in that the host node is also used to when the transmission first state Start timing when switching command;When timing duration is more than preset duration, and does not receive addressing request yet, Xiang Suoshu is from node Send the second status switching instruction;
It is described from node, when being also used to receive second status switching instruction, exit the real-time detection external trigger thing The state of part.
7. system according to claim 1, which is characterized in that the node addressing system is applied in unmanned plane;
It is described from node be unmanned plane propeller, the external trigger is to stir the propeller of unmanned plane;Or, it is described from Node is that the electricity of unmanned plane is adjusted, and the external trigger is the propeller stirred electricity and adjust connection;Or, it is described from node be nobody The holder of machine, the external trigger are to stir the axis of holder.
8. system according to claim 1, which is characterized in that the external trigger is in the node addressing system group It is triggered after the completion of dress;And/or
The external trigger is newly installed in the node addressing system and is triggered after node;And/or
The external trigger is replaced in the node addressing system and is triggered after node.
9. system according to claim 1, which is characterized in that the storage node address information, comprising: receiving To after the store instruction of the host node, the node address information is stored.
10. system according to claim 1, which is characterized in that the host node is also used to save to described send from node The inspection of dot address information instructs;
It is described to be also used to after receiving the inspection instruction from node, the node address information instructed and institute are checked when described When stating consistent from the node address information that node stores, the host node is notified to have received the inspection instruction;
The host node is also used to determine the node address when having received the inspection from node notice and instructing for one Information addressing is correct;When at least two, which have received the inspection from node notice, instructs, the node address information is determined Addressing repeats;When not having received inspection instruction from node notice, determine that the node address information is compiled not successfully Location.
11. system according to claim 10, which is characterized in that the host node is also used to when with determining the node When information addressing in location is repeated or addressed not successfully, prompted according to the second default prompting mode.
12. a kind of from node addressing method, which is characterized in that the described method includes:
After detecting the external trigger from node, addressing request is sent to host node;
It is set to the state for waiting node address information;
Receive the node address information that the host node is sent;
Store the node address information.
13. according to the method for claim 12, which is characterized in that described to detect the external trigger from node Afterwards, before sending addressing request to host node, the method also includes:
Receive the first state switching command that the host node is sent;
It is set to the state of real-time detection external trigger.
14. according to the method for claim 13, which is characterized in that the method also includes:
Receive the second status switching instruction that the host node is sent;
Exit the state of the real-time detection external trigger.
15. according to the method for claim 12, which is characterized in that described after the storage node address information Method further include:
It is prompted according to the first default prompting mode.
16. according to the method for claim 12, which is characterized in that the node addressing system is applied in unmanned plane;
It is described from node be unmanned plane propeller, the external trigger be stir propeller;Or, it is described from node be nothing Man-machine electricity is adjusted, and the external trigger is the propeller stirred electricity and adjust connection;Or, it is described from node be unmanned plane cloud Platform, the external trigger are to stir the axis of holder.
17. according to the method for claim 12, which is characterized in that the storage node address information, comprising:
After the store instruction for receiving the host node, the node address information is stored.
18. according to the method for claim 12, which is characterized in that described after the storage node address information Method further include:
The inspection of receiving node address information instructs;
When the node address information for checking instruction is consistent with the node address information stored from node, described in notice Host node has received the inspection instruction.
19. a kind of from node addressing method, which is characterized in that the described method includes:
Receive the addressing request sent from node;
To described from node sending node address information.
20. according to the method for claim 19, which is characterized in that it is described to receive before the addressing request that node is sent, The method also includes:
First state switching command is sent from node to described, the first state switching command, which is used to indicate, is set to real-time detection The state of external trigger.
21. according to the method for claim 20, which is characterized in that the method also includes:
Start timing when sending the first state switching command;
When timing duration is more than preset duration, Xiang Suoshu sends the second status switching instruction from node, and second state is cut It changes instruction and is used to indicate the state for exiting the real-time detection external trigger.
22. according to the method for claim 19, which is characterized in that it is described to it is described from node sending node address information it Afterwards, the method also includes:
To the store instruction from node sending node address information.
23. according to the method for claim 19, which is characterized in that it is described to it is described from node sending node address information it Afterwards, the method also includes:
It is instructed to described from the inspection of node sending node address information;
When one, which has received the inspection from node notice, instructs, determine that the node address information addressing is correct;When extremely Few two when having received inspections from node notice and instructing, determine the node address information addressing repetition;When not from When node notice has received inspection instruction, determine that the node address information addresses not successfully.
24. a kind of from node addressing device, which is characterized in that described device includes:
Sending module, for sending addressing request to host node after detecting the external trigger from node;
State switching module, for being set to the state for waiting node address information;
Receiving module, the node address information sent for receiving the host node;
Memory module, for storing the node address information.
25. a kind of from node addressing device, which is characterized in that described device includes:
Receiving module, for receiving the addressing request sent from node;
Sending module, for described from node sending node address information.
CN201810437820.5A 2018-05-09 2018-05-09 Node addressing system, method and device Active CN110474993B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810437820.5A CN110474993B (en) 2018-05-09 2018-05-09 Node addressing system, method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810437820.5A CN110474993B (en) 2018-05-09 2018-05-09 Node addressing system, method and device

Publications (2)

Publication Number Publication Date
CN110474993A true CN110474993A (en) 2019-11-19
CN110474993B CN110474993B (en) 2022-08-02

Family

ID=68503578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810437820.5A Active CN110474993B (en) 2018-05-09 2018-05-09 Node addressing system, method and device

Country Status (1)

Country Link
CN (1) CN110474993B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111601419A (en) * 2020-05-18 2020-08-28 上海浔朴网络科技有限公司 Be used for temple channel to watch intelligent lamp accuse system
CN113132508A (en) * 2021-04-12 2021-07-16 程剑飞 Address configuration method and device, computer equipment and embedded network system
WO2021237544A1 (en) * 2020-05-27 2021-12-02 深圳市大疆创新科技有限公司 Movable platform and control method therefor, control device, and storage medium
CN114584020A (en) * 2022-05-05 2022-06-03 广东科伺智能科技有限公司 Servo system
CN117289720A (en) * 2023-11-22 2023-12-26 黑龙江惠达科技股份有限公司 Unmanned aerial vehicle control method and system and unmanned aerial vehicle

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958939A (en) * 2010-10-15 2011-01-26 德讯科技股份有限公司 Automatic distribution method and system for multi-machine communication node equipment key address
CN106687936A (en) * 2016-08-29 2017-05-17 深圳市大疆创新科技有限公司 Electronic speed controller addressing method for multi-rotor unmanned aerial vehicle, control system applied to electronic speed controller in multi-rotor unmanned aerial vehicle, electronic speed controller, power system and multi-rotor unmanned aerial vehicle
CN106790761A (en) * 2017-01-05 2017-05-31 广州南盾通讯设备有限公司 Host node distribution, the method from node acquisition address, bus address auto-allocation method and device under ModBus buses

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958939A (en) * 2010-10-15 2011-01-26 德讯科技股份有限公司 Automatic distribution method and system for multi-machine communication node equipment key address
CN106687936A (en) * 2016-08-29 2017-05-17 深圳市大疆创新科技有限公司 Electronic speed controller addressing method for multi-rotor unmanned aerial vehicle, control system applied to electronic speed controller in multi-rotor unmanned aerial vehicle, electronic speed controller, power system and multi-rotor unmanned aerial vehicle
CN106790761A (en) * 2017-01-05 2017-05-31 广州南盾通讯设备有限公司 Host node distribution, the method from node acquisition address, bus address auto-allocation method and device under ModBus buses

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111601419A (en) * 2020-05-18 2020-08-28 上海浔朴网络科技有限公司 Be used for temple channel to watch intelligent lamp accuse system
WO2021237544A1 (en) * 2020-05-27 2021-12-02 深圳市大疆创新科技有限公司 Movable platform and control method therefor, control device, and storage medium
CN113132508A (en) * 2021-04-12 2021-07-16 程剑飞 Address configuration method and device, computer equipment and embedded network system
CN114584020A (en) * 2022-05-05 2022-06-03 广东科伺智能科技有限公司 Servo system
CN114584020B (en) * 2022-05-05 2022-07-15 广东科伺智能科技有限公司 Servo system
CN117289720A (en) * 2023-11-22 2023-12-26 黑龙江惠达科技股份有限公司 Unmanned aerial vehicle control method and system and unmanned aerial vehicle
CN117289720B (en) * 2023-11-22 2024-02-23 黑龙江惠达科技股份有限公司 Unmanned aerial vehicle control method and system and unmanned aerial vehicle

Also Published As

Publication number Publication date
CN110474993B (en) 2022-08-02

Similar Documents

Publication Publication Date Title
CN110474993A (en) Node addressing system, method and device
JP4250535B2 (en) Information processing method and apparatus
JP3450394B2 (en) Access management method and local area network using the method
JP3563751B2 (en) Firmware writing method, network connection device, and remote information loading device
JP3397395B2 (en) Remote storage method for remotely storing media access control address and network connection device
JP3548208B2 (en) Multi-protocol processing method and apparatus
JP3391865B2 (en) Recording device and recording method
JP3503648B2 (en) Network server management method and device
JP3368016B2 (en) Packet format determination method and apparatus
CN108521474B (en) Address competition method of multi-connected control system
US10216514B2 (en) Identification of a component for upgrade
US20120306621A1 (en) Lighting control network configuration with rfid devices
JP3548209B2 (en) Data loading method and apparatus, and interactive network board using the same
JP2004030585A (en) Network device, circuit board, and interface method
JPH06259364A (en) Operation constitution forming device, operation constitution setter, constitution setter, forming method of operation constitution and setting method of operation constitution
JPH06214817A (en) Method and apparatus for test of interactive network board
JPH06214929A (en) Method and equipment for remote control
CN103621049A (en) System and method for automatically addressing devices in multi-drop network
CN115587065A (en) Master-slave machine control method, master-slave machine control system and blood cabinet
JPH06214810A (en) Method and apparatus for processing of multitask and interactive network board
CN111131536B (en) Efficient configuration method, device and system for communication address and electric meter
CN115470165A (en) Address allocation method, battery management system and electronic equipment
CN116578519A (en) Communication method, device, equipment and medium
CN106649141B (en) A kind of storage interactive device and storage system based on ceph
CN113726543B (en) Operation and maintenance service processing method, device, system, server and storage medium

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Hikvision Robot Co.,Ltd.

Address before: 310051 5th floor, building 1, building 2, no.700 Dongliu Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: HANGZHOU HIKROBOT TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address
TR01 Transfer of patent right

Effective date of registration: 20230620

Address after: No.555, Qianmo Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Hikvision Digital Technology Co.,Ltd.

Address before: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Hikvision Robot Co.,Ltd.

TR01 Transfer of patent right