CN106656549B - A kind of control method of underwater sound communication network - Google Patents

A kind of control method of underwater sound communication network Download PDF

Info

Publication number
CN106656549B
CN106656549B CN201610854333.XA CN201610854333A CN106656549B CN 106656549 B CN106656549 B CN 106656549B CN 201610854333 A CN201610854333 A CN 201610854333A CN 106656549 B CN106656549 B CN 106656549B
Authority
CN
China
Prior art keywords
layer
control command
multiplex
pipeline
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610854333.XA
Other languages
Chinese (zh)
Other versions
CN106656549A (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.)
Harbin Engineering University
Original Assignee
Harbin Engineering University
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 Harbin Engineering University filed Critical Harbin Engineering University
Priority to CN201610854333.XA priority Critical patent/CN106656549B/en
Publication of CN106656549A publication Critical patent/CN106656549A/en
Application granted granted Critical
Publication of CN106656549B publication Critical patent/CN106656549B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B11/00Transmission systems employing sonic, ultrasonic or infrasonic waves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B13/00Transmission systems characterised by the medium used for transmission, not provided for in groups H04B3/00 - H04B11/00
    • H04B13/02Transmission systems in which the medium consists of the earth or a large mass of water thereon, e.g. earth telegraphy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The present invention relates to underwater sound communication network technical fields, and in particular to a kind of control method of underwater sound communication network.The present invention includes: the multiplex layer creation socket of main controlled node;In underwater sound communication network, for forward node, the physical layer of forward node is by receiving main controlled node information;In underwater sound communication network, for destination node, the physical layer of destination node is by receiving forward node information, control information is transferred to multiplex layer by data link layer, network layer, application layer, multiplex layer realizes the data transmission between multiplex layer and application layer by creation RFIFO pipeline and WFIFO pipeline and fifo channel, and the information received is analyzed and does corresponding processing.The present invention, by the control and configuration to a host node, indirectly controlling and configuring to other subsurface communication network nodes is realized using host node using multiplex layer technology, and each communication node will be controlled and be configured so as to avoid being directed to.

Description

A kind of control method of underwater sound communication network
Technical field
The present invention relates to underwater sound communication network technical fields, and in particular to a kind of control method of underwater sound communication network.
Background technique
In recent years, with the quickening of countries in the world ocean development paces, country, which starts to increase, carries out underwater acoustic communication net The dynamics of research.And with underwater sound modem performance and in terms of raising, moveable network knot The extensive use of structure under practical circumstances, either industry or academia, all have underwater sound communication network and greatly grind Study carefully enthusiasm and demand.Underwater sound communication network (UWN) carries the important mission of detection, data communication.As the mankind visit ocean Rope, exploitation deepen continuously, and either military domain or civil field all have great need to subsurface communication network technology It asks.
In development process in the past few years, the performance that many kinds of measures removes assessment underwater sound communication network is proposed.But imitative True aspect because in actual environment underwater acoustic channel complexity, accurate channel model cannot be provided, cause assessment effect and Actual deviation is larger.During actual tests, in order to preferably go the performance of test underwater sound communication network, need repeatedly Agreement, the parameter of test protocol and some other parameter of control and configuration test.When needs control and configure some agreements When with parameter, goes to configure if not can be carried out long-range control, must take much time and do Underwater Acoustic Network with energy The work of control and this setup test of configuration of each node in network, rather than most important test and test result is divided Analyse work.It and is exactly by each communication node being controlled and being configured completion test job in existing underwater sound communication network , this method is usually after arranging entire communication network, each node to be salvaged and thrown in emulation experiment It discharges pairs of each communication node to be controlled and configured, to realize test job.
Summary of the invention
It solves in existing underwater sound communication network to be by each communication node the purpose of the present invention is to provide a kind of Controlled and configured the control method for completing the underwater sound communication network of test.
The object of the present invention is achieved like this:
(1) multiplex layer of main controlled node creates socket, realizes the multiplex layer and PC machine of main controlled node in communication network Letter between information transmission and multiplex layer and application layer by creating WFIFO, RFIFO, fifo channel realization main controlled node Breath transmission;It analyzes simultaneously, handle and transmit from PC machine to the information of application layer;Then information is controlled from answering in control link Forward node and destination node in communication network are transmitted to layer, network layer, data link layer, physical layer;
(2) in underwater sound communication network, for forward node, the physical layer of forward node is by receiving main controlled node letter Control information is transferred to multiplex layer by data link layer, network layer, application layer by breath, and multiplex layer passes through creation RFIFO pipeline And WFIFO pipeline and fifo channel realize the data transmission between multiplex layer and application layer, the multiplex layer of forward node will connect The information received is analyzed and does corresponding processing, and application layer, the network layer, data link in control link are then passed through Layer, physical layer are transmitted to destination node in underwater sound communication network;
(3) in underwater sound communication network, for destination node, the physical layer of destination node is by receiving forward node letter Control information is transferred to multiplex layer by data link layer, network layer, application layer by breath, and multiplex layer passes through creation RFIFO pipeline And WFIFO pipeline and fifo channel realize the data transmission between multiplex layer and application layer, and the information received is analyzed And do corresponding processing;And the communication between the PC machine of destination node connection is realized by way of serial communication.
The step (1) includes:
(1.1), for main controlled node in communication network, the multiplex layer creation socket of main controlled node is as multiplex layer and PC The mode of machine communication realizes that the information of multiplex layer and PC machine is transmitted;It is returned after socket sockfd creation socket success Filec descriptor operates socket by socket sockfd;
(1.2), for PC machine by transmitting downwards to socket sockfd write information, and by information, PC machine first sends control life It enables, is correspondingly processed after the control command that multiplex layer receives PC machine transmission, done to execute the Tcl script of data transmission below Good preparation;PC machine is ordered by the data that the information that socket sockfd is transmitted includes transmission, the time for sending data, control It enables, the time of log-on data link;Control command includes sta, stp, Tcl script, kill order;
(1.3) one is created for controlling the fifo channel realized in link and communicated between multiplex layer and application layer;Multiplexing Layer and application layer realize the communication between multiplex layer and application layer by being written and read to fifo channel, and application layer passes through net again Network layers, data-link layer transfer to physical layer send out control command by physical layer, in this way by controlling link for master control The control information of node is sent to forward node and destination node in network;
(1.4) after main controlled node multiplex layer obtains the information of PC machine transmitted by reading socket sockfd, The time of log-on data link in information and control command are transmitted to the function of processing control command, handle the letter of control command Number can execute corresponding operation according to the time of log-on data link and control command;
(1.5), when the function discovery control command of the processing control command of main controlled node multiplex layer is sta order, processing The function of control command creates two threads first, and WFIFO pipeline and RFIFO pipeline, Quality Initiative is respectively created in the two threads Realize multiplexing in road between multiplex layer and application layer using the communication mode in WFIFO pipeline and this process of RFIFO pipeline Communication between layer and application layer;Application layer is transmitted to for information is controlled by fifo channel again, then passes through entire Quality Initiative Road sends control information to forward node and destination node in network;
(1.6) when the function discovery control command of the processing control command of main controlled node multiplex layer is Tcl script command, place The function of reason control command is first responsible for one subprocess of creation, and the time of the log-on data link according to transmitting, data-link The Tcl script name on road, the Tcl shell script of data link is executed in the time of defined log-on data link, and data link exists Log-on data Link Time just will start;Then control command is sent to application by fifo channel by control command by multiplex layer Layer, by entirely controlling the forward node and destination node that link is sent control information in network;When opening to defined The time of dynamic data link, it will the Tcl script of automatic log-on data link, the two threads one is used to open data link The data transmitted after dynamic from PC machine pass to another thread of application layer by RFIFO pipeline and will be answered by WFIFO pipeline It is transmitted to multiplex layer with the information of layer, it is existing between the two mutual by RFIFO and WFIFO pipeline between application layer and multiplex layer Communication;
(1.7) when the function discovery control command of the processing control command of main controlled node multiplex layer is kill, multiplex layer is first First cancel two threads for carrying out transmission data for data link that sta order is created, then will be controlled by fifo channel Information is transmitted to application layer, then sends control information to forward node and purpose section in network by entirely controlling link Point;
(1.8) the function discovery control command of the processing control command of main controlled node multiplex layer is when being stp, and PC machine is by information Multiplex layer is passed to by socket, the function of the processing control command in multiplex layer will stop creating in sta order immediately Two threads, and cancel data link, and tell Tcl script stp order, allow Tcl script that can stop entire data-link Road, then application layer is transmitted to for information is controlled by fifo channel, network is sent control information to by entirely controlling link In forward node and destination node.
The step (2) includes:
(2.1) forward node multiplex layer creation for realizing the WFIFO pipeline communicated between multiplex layer and application layer, RFIFO pipeline and fifo channel;Application layer by WFIFO pipeline and RFIFO pipeline and fifo channel be written and read come Realize the communication between multiplex layer and application layer;
It (2.2), will after multiplex layer is by the information that application layer transmitting comes up from control link in reading fifo channel The time of start by set date data link in information and control command are transmitted to the function of processing control command, handle control command Function can execute corresponding operation according to the time of log-on data link and control command;
(2.3) when the function of the processing control command in multiplex layer discovery control command is sta order, processing control life The function of order creates two threads first, and WFIFO pipeline and RFIFO pipeline is respectively created in the two threads, in data link, Realized between multiplex layer and application layer using the communication mode in WFIFO pipeline and this process of RFIFO pipeline multiplex layer and Communication between application layer;Application layer is transmitted to for information is controlled by fifo channel again, it then will by entirely control link Control information is sent to forward node and destination node in network;
(2.4) when the function of the processing control command in multiplex layer discovery control command is Tcl script command, processing control The function of system order is first responsible for one subprocess of creation, and the time of the log-on data link according to transmitting, data link Tcl script name, the Tcl shell script of data link is executed in the time of defined log-on data link, and data link is starting The time of data link just will start;Then control command is sent to application layer by fifo channel by control command by multiplex layer, Then forward node and destination node in network are sent control information to by entirely controlling link;When opening to defined The time of dynamic data link, it will the Tcl script of automatic log-on data link, multiplex layer transmit data by RFIFO pipeline The information of application layer is transmitted to by multiplex layer by WFIFO pipeline to another thread of application layer, between application layer and multiplex layer It is in communication with each other by the way that RFIFO pipeline and WFIFO pipeline are now between the two;
(2.5) when the function of the processing control command in multiplex layer discovery control command is kill, multiplex layer takes first Two threads that transmission data are carried out for data link that the sta order that disappears is created, then information will be controlled by fifo channel It is transmitted to application layer, so mutually sends control information to forward node and destination node in network by entirely controlling link;
(2.6) processing when the function of the processing control command in multiplex layer discovery control command is stp, in multiplex layer The function of control command will stop create in sta order two threads immediately, and cancel data link, and stp is ordered Tcl script is told in order, allows Tcl script that can stop entire data link, then be transmitted to control information by fifo channel and answer With layer, forward node and destination node in network then are sent control information to by entirely controlling link.
The step (3) includes:
(3.1) destination node multiplex layer creation for realizing the WFIFO pipeline communicated between multiplex layer and application layer, RFIFO pipeline and fifo channel;Multiplex layer and application layer by WFIFO pipeline and RFIFO pipeline and fifo channel into Row is read and write to realize the communication between multiplex layer and application layer, and control command is transmitted to destination node by control link in this way Multiplex layer, then by way of serial communication by control command be transferred to connection mesh node PC machine on;
(3.2) when multiplex layer by read fifo channel in from control link in application layer upload pass come control command Afterwards, the time of the log-on data link in control command and control command are transmitted to the function of processing control command, processing control The function of order can execute corresponding operation according to the time of log-on data link and control command;
(3.3) when the function of the processing control command in multiplex layer discovery control command is sta order, processing control life The function of order creates two threads first, the two threads are respectively created WFIFO pipeline and RFIFO pipeline, answer in data link It multiplex layer and is answered with being realized between layer and application layer using the communication mode in WFIFO pipeline and this process of RFIFO pipeline With the communication between layer;
(3.4) when the function of the processing control command in multiplex layer discovery control command is Tcl script command, processing control The function of system order is first responsible for one subprocess of creation, and time of the log-on data link according to transmitting, Tcl script name, Tcl shell script is executed in the time of regulation log-on data link, data link just will start in the time of log-on data link; When the time for arriving defined log-on data link, it will automatic log-on data link Tcl script, created two of sta order Thread one data for being used to transmit after starting data link from PC machine pass to application layer by RFIFO pipeline;Separately The information of application layer is transmitted to multiplex layer by WFIFO pipeline by one thread, is managed between application layer and multiplex layer by RFIFO Communication mode in road and this process of WFIFO pipeline realizes between the two be in communication with each other;
(3.5) when the function of the processing control command in multiplex layer discovery control command is kill, multiplex layer takes first Two threads that transmission data are carried out for data link that the sta order that disappears is created, then information will be controlled by fifo channel It is transmitted to application layer, the PC machine of destination node and connection destination node is sent control information to by entirely controlling link On;
(3.6) processing when the function of the processing control command in multiplex layer discovery control command is stp, in multiplex layer The function of control command will stop create in sta order two threads immediately, and cancel data link, and stp is ordered Tcl script is told in order, allows Tcl script that can stop entire data link;
(3.7) when application layer by fifo channel by control information be transmitted to multiplex layer, pass through RFIFO pipeline and WFIFO Pipeline realizes the transmission of data between multiplex layer and application layer, and multiplex layer leads to the data received and control command by serial ports The mode of letter passes to PC machine.
The step (3.7) includes:
The serial ports that (3.7.1) opens test plank obtains the filec descriptor uart of operation serial ports;
(3.7.2) obtains the characteristic of serial ports;
(3.7.3) configures the characteristic of serial ports accordingly;
(3.7.4) is by the buffer empty of serial ports sended and received;
(3.7.5) makes the serial ports characteristic of configuration come into force;
(3.7.6) multiplex layer is realized logical between the PC machine of destination node connection by being written and read to serial ports Letter.
The beneficial effects of the present invention are:
The present invention, by control and configuration to a host node, is realized using host node to it using multiplex layer technology His subsurface communication network node indirectly controlling and configuring.Host node is in terms of routing using single-hop or the method for multi-hop come real Other underwater sound communication network nodes are now notified to carry out the switching of test protocol;In terms of the behavior of equipment, do not have under water each The node of a communication is reconfigured after salvaging to progress waterborne, so as to avoid for each communication node will carry out control and Configuration.Using the method for multiplex layer this control and configuration underwater sound communication network, greatly improves and be used for during the experiment The efficiency of setup test not only improves the efficiency of experiment test improving 34% or more especially in doing outfield experiments, and The complexity for doing the cost and logistic work tested is also reduced, while being avoided during testing preparation to laboratory apparatus Damage.
Detailed description of the invention
Fig. 1 is the logical construction schematic diagram of main controlled node;
Fig. 2 is the logical construction schematic diagram of forward node;
Fig. 3 is the logical construction schematic diagram of purpose node.
Specific embodiment
The control method of underwater sound communication network, the present invention relates to underwater sound communication network technical fields, and in particular to Yi Zhongshui The long-range control method of sound communication network.In order to solve it is by carrying out to each communication node in existing underwater sound communication network The problem of test is completed in control and configuration.The present invention is controlled and is matched to node each in underwater sound communication network by multiplex layer It sets;The multiplex layer of main controlled node and PC machine information are transmitted in communication network, and multiplex layer carries out the information transmitted from PC machine Letter between corresponding processing, then multiplex layer and application layer by creating WFIFO, RFIFO, fifo channel realization main controlled node Breath transmission, then sends information;The multiplex layer of forward node handles main controlled node transmission information, then by information It forwards;The multiplex layer of destination node handles the information received, and is led to by serial communication mode and PC machine Letter.The present invention is suitable for the long-range control of underwater sound communication network.
Application layer, network layer, data link layer, physical layer constitute a basic communication network in Fig. 1, and tcl language is These layers are linked into an integrated entity and constitutes tcl script and works;
The control method of underwater sound communication network, comprising the following steps:
The multiplex layer creation socket of step 1, main controlled node, realizes the multiplex layer and PC machine of main controlled node in communication network Information transmission and by creation WFIFO, RFIFO, fifo channel realize main controlled node multiplex layer and application layer between Information transmission;It analyzes simultaneously, handle and transmit from PC machine to the information of application layer;Then control information is from control link Application layer, network layer, data link layer, physical layer are transmitted to forward node and destination node in communication network;
Step 2, in underwater sound communication network, for forward node, the physical layer of forward node is by receiving main controlled node Control information is transferred to multiplex layer by data link layer, network layer, application layer by information, and multiplex layer passes through creation RFIFO pipe Road and WFIFO pipeline and fifo channel realize the data transmission between multiplex layer and application layer, and the multiplex layer of forward node will The information received is analyzed and does corresponding processing, and application layer, the network layer, data link in control link are then passed through Layer, physical layer are transmitted to destination node in underwater sound communication network;
Step 3, in underwater sound communication network, for destination node, the physical layer of destination node is by receiving forward node Control information is transferred to multiplex layer by data link layer, network layer, application layer by information, and multiplex layer passes through creation RFIFO pipe Road and WFIFO pipeline and fifo channel realize the data transmission between multiplex layer and application layer, and the information received is divided It analyses and does corresponding processing;And the communication between the PC machine of destination node connection is realized by way of serial communication.
Embodiment one:
The control method of underwater sound communication network, comprising the following steps:
The multiplex layer creation socket of step 1, main controlled node, realizes the multiplex layer and PC machine of main controlled node in communication network Information transmission and by creation WFIFO, RFIFO, fifo channel realize main controlled node multiplex layer and application layer between Information transmission;It analyzes simultaneously, handle and transmit from PC machine to the information of application layer;Then control information is from control link Application layer, network layer, data link layer, physical layer are transmitted to forward node and destination node in communication network;
Step 2, in underwater sound communication network, for forward node, the physical layer of forward node is by receiving main controlled node Control information is transferred to multiplex layer by data link layer, network layer, application layer by information, and multiplex layer passes through creation RFIFO pipe Road and WFIFO pipeline and fifo channel realize the data transmission between multiplex layer and application layer, and the multiplex layer of forward node will The information received is analyzed and does corresponding processing, and application layer, the network layer, data link in control link are then passed through Layer, physical layer are transmitted to destination node in underwater sound communication network;
Step 3, in underwater sound communication network, for destination node, the physical layer of destination node is by receiving forward node Control information is transferred to multiplex layer by data link layer, network layer, application layer by information, and multiplex layer passes through creation RFIFO pipe Road and WFIFO pipeline and fifo channel realize the data transmission between multiplex layer and application layer, and the information received is divided It analyses and does corresponding processing;And the communication between the PC machine of destination node connection is realized by way of serial communication.
Embodiment two: embodiment is described with reference to Fig. 1,
The specific implementation process of present embodiment step 1 is as follows:
Step 1.1, for main controlled node in communication network, the multiplex layer creation socket of main controlled node as multiplex layer and The mode of PC machine communication realizes that the information of multiplex layer and PC machine is transmitted;Socket sockfd is returned after creation socket is successful Filec descriptor, pass through socket sockfd operate socket;Socket can be thus operated as operation file;
After successfully creating socket sockfd, realized using this communication mode of socket logical between PC machine Letter;PC machine and multiplex layer can be realized and communication between the two by being written and read to socket;
By transmitting downwards to socket sockfd write information, and by information, PC machine first sends control for step 1.2, PC machine Order is correspondingly processed after the control command that multiplex layer receives PC machine transmission, for the Tcl script for executing data transmission below It is ready work;PC machine passes through the data that the information that socket sockfd is transmitted includes transmission, the time for sending data, control It orders, the time of log-on data link;Control command includes sta, stp, Tcl script, kill order;
Step 1.3 creates one for controlling the fifo channel realized in link and communicated between multiplex layer and application layer;It is multiple The communication between multiplex layer and application layer is realized by being written and read to fifo channel with layer and application layer, and application layer passes through again Network layer, data-link layer transfer to physical layer send out control command by physical layer, will be led by controlling link in this way The control information of control node is sent to forward node and destination node in network;
Step 1.4, when main controlled node multiplex layer by read socket sockfd obtain the information of PC machine transmitted Afterwards, the time of the log-on data link in information and control command are transmitted to the function of processing control command, handle control command Function can execute corresponding operation according to the time of log-on data link and control command, i.e., execution step 1.5, step 1.6, The operation of step 1.7 or step 1.8;
When step 1.5, the function discovery control command of the processing control command of main controlled node multiplex layer are sta orders, place The function of reason control command creates two threads first, and WFIFO pipeline and RFIFO pipeline is respectively created in the two threads, control It is realized between multiplex layer and application layer using the communication mode in WFIFO pipeline and this process of RFIFO pipeline in link multiple With the communication between layer and application layer;Application layer is transmitted to for information is controlled by fifo channel again, then by entirely controlling Link sends control information to forward node and destination node in network;
Step 1.6, the function discovery control command of the processing control command of main controlled node multiplex layer are Tcl script commands When, the function for handling control command is first responsible for one subprocess of creation, and the time of the log-on data link according to transmitting, number According to the Tcl script name of link, the Tcl shell script of data link, data-link are executed in the time of defined log-on data link Road just will start in log-on data Link Time;Then control command is sent to by fifo channel and is answered by multiplex layer by control command With layer, by entirely controlling the forward node and destination node that link is sent control information in network;When arriving defined The time of log-on data link, it will the Tcl script of automatic log-on data link, the two threads one is used to data link The data transmitted after starting from PC machine pass to another thread of application layer by RFIFO pipeline will by WFIFO pipeline The information of application layer is transmitted to multiplex layer, passes through the existing phase between the two of RFIFO and WFIFO pipeline between application layer and multiplex layer Mutual communication;
When step 1.7, the function discovery control command of the processing control command of main controlled node multiplex layer are kill, multiplex layer Cancel two threads for carrying out transmission data for data link that sta order is created first, then will be controlled by fifo channel Information processed is transmitted to application layer, then sends control information to forward node and purpose in network by entirely controlling link Node;
When step 1.8, the function discovery control command of the processing control command of main controlled node multiplex layer are stp, PC machine will Information passes to multiplex layer by socket, and the function of the processing control command in multiplex layer will stop immediately in sta order Two threads of creation, and cancel data link, and tell Tcl script stp order, Tcl script can be stopped entirely Data link, then application layer is transmitted to for information is controlled by fifo channel, information transmission will be controlled by entirely controlling link Forward node and destination node into network.
Other steps and parameter are same as the specific embodiment one.
Embodiment three: embodiment is described with reference to Fig. 2,
The multiplex layer creation of step 2.1, forward node is for realizing the WFIFO pipe communicated between multiplex layer and application layer Road, RFIFO pipeline and fifo channel;Application layer is by being written and read WFIFO pipeline and RFIFO pipeline and fifo channel To realize the communication between multiplex layer and application layer;
Step 2.2, when multiplex layer by read fifo channel in from control link in application layer transmit come up information after, The time of start by set date data link in information and control command are transmitted to the function of processing control command, handle control command Function can execute corresponding operation according to the time of log-on data link and control command, i.e., execution step 2.3, step 2.4, The operation of step 2.5 or step 2.6;
Step 2.3, when the processing control command in multiplex layer function discovery control command be sta order when, processing control The function of system order creates two threads first, and WFIFO pipeline and RFIFO pipeline is respectively created in the two threads, in data-link Lu Zhong realizes multiplexing using the communication mode in WFIFO pipeline and this process of RFIFO pipeline between multiplex layer and application layer Communication between layer and application layer;Application layer is transmitted to for information is controlled by fifo channel again, then passes through entire Quality Initiative Road sends control information to forward node and destination node in network;
Step 2.4, when the processing control command in multiplex layer function discovery control command be Tcl script command when, place The function of reason control command is first responsible for one subprocess of creation, and the time of the log-on data link according to transmitting, data-link The Tcl script name on road, the Tcl shell script of data link is executed in the time of defined log-on data link, and data link exists The time of log-on data link just will start;Then control command is sent to application by fifo channel by control command by multiplex layer Then layer sends control information to forward node and destination node in network by entirely controlling link;When arrive defined Log-on data link time, it will data are passed through RFIFO pipeline by the Tcl script of automatic log-on data link, multiplex layer It passes to another thread of application layer and the information of application layer is transmitted to by multiplex layer, application layer and multiplex layer by WFIFO pipeline Between between the two be in communication with each other by the way that RFIFO pipeline and WFIFO pipeline are existing;
Step 2.5, when the processing control command in multiplex layer function discovery control command be kill when, multiplex layer is first Cancel two threads for carrying out transmission data for data link that sta order is created, then is believed control by fifo channel Breath is transmitted to application layer, so mutually sends control information to forward node and purpose section in network by entirely controlling link Point;
Step 2.6, when the function of the processing control command in multiplex layer discovery control command is stp, in multiplex layer The function of processing control command will stop create in sta order two threads immediately, and cancel data link, and handle Tcl script is told in stp order, allows Tcl script that can stop entire data link, then will control information transmitting by fifo channel To application layer, forward node and destination node in network then are sent control information to by entirely controlling link.
Other steps and parameter are identical with embodiment two.
Example IV: embodiment is described with reference to Fig. 3,
The specific implementation process of present embodiment step 3 is as follows:
The multiplex layer creation of step 3.1, destination node is for realizing the WFIFO pipe communicated between multiplex layer and application layer Road, RFIFO pipeline and fifo channel;Multiplex layer and application layer pass through to WFIFO pipeline and RFIFO pipeline and fifo channel It is written and read to realize the communication between multiplex layer and application layer, control command is transmitted to by purpose section by control link in this way The multiplex layer of point, then control command is transferred in the PC machine of connection mesh node by way of serial communication;
Step 3.2, when multiplex layer by read fifo channel in from control link in application layer upload pass come control After order, the time of the log-on data link in control command and control command are transmitted to the function of processing control command, processing The function of control command can execute corresponding operation according to the time of log-on data link and control command, i.e., execution step 3.3, The operation of step 3.4, step 3.5 or step 3.6;
Step 3.3, when the processing control command in multiplex layer function discovery control command be sta order when, processing control The function of system order creates two threads first, and WFIFO pipeline and RFIFO pipeline, data link is respectively created in the two threads Multiplex layer is realized using the communication mode in WFIFO pipeline and this process of RFIFO pipeline between middle multiplex layer and application layer Communication between application layer;
Step 3.4, when the processing control command in multiplex layer function discovery control command be Tcl script command when, place The function of reason control command is first responsible for one subprocess of creation, and the time of the log-on data link according to transmitting, Tcl script Name executes Tcl shell script in the time of regulation log-on data link, and data link will be opened in the time of log-on data link It is dynamic;When the time for arriving defined log-on data link, it will automatic log-on data link Tcl script, sta order created two A thread one data for being used to transmit after starting data link from PC machine pass to application layer by RFIFO pipeline; The information of application layer is transmitted to multiplex layer by WFIFO pipeline by another thread, passes through RFIFO between application layer and multiplex layer Communication mode in pipeline and this process of WFIFO pipeline realizes between the two be in communication with each other;
Step 3.5, when the processing control command in multiplex layer function discovery control command be kill when, multiplex layer is first Cancel two threads for carrying out transmission data for data link that sta order is created, then is believed control by fifo channel Breath is transmitted to application layer, and the PC machine of destination node and connection destination node is sent control information to by entirely controlling link On;
Step 3.6, when the function of the processing control command in multiplex layer discovery control command is stp, in multiplex layer The function of processing control command will stop create in sta order two threads immediately, and cancel data link, and handle Tcl script is told in stp order, allows Tcl script that can stop entire data link;
Step 3.7 is transmitted to multiplex layer for information is controlled by fifo channel when application layer, by RFIFO pipeline and WFIFO pipeline realizes the transmission of data between multiplex layer and application layer, and multiplex layer passes through the data received and control command The mode of serial communication passes to PC machine.
Other steps and parameter are the same as the specific implementation mode 3.
Embodiment five:
The specific implementation process of step 3.7 described in present embodiment is as follows:
Step 3.7.1, the serial ports for opening test plank obtains the filec descriptor uart of operation serial ports;
Step 3.7.2, the characteristic of serial ports is obtained;
Step 3.7.3, (baud rate, even-odd check etc.) as needed, is configured accordingly to the characteristic of serial ports;
Step 3.7.4, by the buffer empty of serial ports sended and received;
Step 3.7.5, the serial ports characteristic of configuration is made to come into force;
Step 3.7.6, after configuration take-effective, serial ports can be operated as operation file;Multiplex layer by serial ports into Row read-write, and then realize the communication between the PC machine of destination node connection.
Other steps and parameter are identical as specific embodiment four.

Claims (5)

1. a kind of control method of underwater sound communication network, which comprises the following steps:
(1) multiplex layer of main controlled node creates socket, realizes the multiplex layer of main controlled node and the information of PC machine in communication network Information between transmission and multiplex layer and application layer by creating WFIFO, RFIFO, fifo channel realization main controlled node passes It is defeated;It analyzes simultaneously, handle and transmit from PC machine to the information of application layer;Then information is controlled from the application in control link Layer, network layer, data link layer, physical layer are transmitted to forward node and destination node in communication network;
(2) in underwater sound communication network, for forward node, the physical layer of forward node, will by receiving main controlled node information Control information is transferred to multiplex layer by data link layer, network layer, application layer, multiplex layer by creation RFIFO pipeline with WFIFO pipeline and fifo channel realize the data transmission between multiplex layer and application layer, and the multiplex layer of forward node will receive To information analyzed and do corresponding processing, then by application layer in control link, network layer, data link layer, Physical layer is transmitted to destination node in underwater sound communication network;
(3) in underwater sound communication network, for destination node, the physical layer of destination node, will by receiving forward node information Control information is transferred to multiplex layer by data link layer, network layer, application layer, multiplex layer by creation RFIFO pipeline with WFIFO pipeline and fifo channel realize the data transmission between multiplex layer and application layer, and the information received is analyzed simultaneously Do corresponding processing;And the communication between the PC machine of destination node connection is realized by way of serial communication.
2. a kind of control method of underwater sound communication network according to claim 1, which is characterized in that the step (1) Include:
(1.1), for main controlled node in communication network, the multiplex layer creation socket of main controlled node is logical as multiplex layer and PC machine The mode of letter realizes that the information of multiplex layer and PC machine is transmitted;Socket sockfd is to create the file returned after socket success Descriptor operates socket by socket sockfd;
(1.2), for PC machine by transmitting downwards to socket sockfd write information, and by information, PC machine first sends control command, when Multiplex layer is correspondingly processed after receiving the control command that PC machine is sent, and carries out standard to execute the Tcl script of data transmission below Standby work;PC machine by the data that the information that socket sockfd is transmitted includes transmission, send time of data, control command, The time of log-on data link;Control command includes sta, stp, Tcl script, kill order;
(1.3) one is created for controlling the fifo channel realized in link and communicated between multiplex layer and application layer;Multiplex layer and Application layer realizes the communication between multiplex layer and application layer by being written and read to fifo channel, and application layer passes through network again Layer, data-link layer transfer to physical layer, send out control command by physical layer, in this way by controlling link for master control section The control information of point is sent to forward node and destination node in network;
(1.4) after main controlled node multiplex layer obtains the information of PC machine transmitted by reading socket sockfd, will believe The time of log-on data link in breath and control command are transmitted to the function of processing control command, handle the function meeting of control command Corresponding operation is executed according to the time of log-on data link and control command;
(1.5), when the function discovery control command of the processing control command of main controlled node multiplex layer is sta order, processing control The function of order creates two threads first, and WFIFO pipeline and RFIFO pipeline is respectively created in the two threads, controls in link Realized between multiplex layer and application layer using the communication mode in WFIFO pipeline and this process of RFIFO pipeline multiplex layer and Communication between application layer;Application layer is transmitted to for information is controlled by fifo channel again, it then will by entirely control link Control information is sent to forward node and destination node in network;
(1.6) when the function discovery control command of the processing control command of main controlled node multiplex layer is Tcl script command, processing control The function of system order is first responsible for one subprocess of creation, and the time of the log-on data link according to transmitting, data link Tcl script name, the Tcl shell script of data link is executed in the time of defined log-on data link, and data link is starting DL time just will start;Then control command is sent to application layer by fifo channel by control command by multiplex layer, is led to Cross forward node and destination node that entire control link is sent control information in network;When the log-on data for arriving defined The time of link, it will the Tcl script of automatic log-on data link, the two threads one be used to start data link after from The data that PC machine is transmitted pass to another thread of application layer by RFIFO pipeline and pass through WFIFO pipeline for application layer Information is transmitted to multiplex layer, is in communication with each other between application layer and multiplex layer by the way that RFIFO and WFIFO pipeline is now between the two;
(1.7) when the function discovery control command of the processing control command of main controlled node multiplex layer is kill, multiplex layer takes first Two threads that transmission data are carried out for data link that the sta order that disappears is created, then information will be controlled by fifo channel It is transmitted to application layer, then sends control information to forward node and destination node in network by entirely controlling link;
(1.8) when the function discovery control command of the processing control command of main controlled node multiplex layer is stp, PC machine passes through information Socket passes to multiplex layer, and the function of the processing control command in multiplex layer will stop create in sta order two immediately A thread, and cancel data link, and tell Tcl script stp order, allow Tcl script that can stop entire data link, then It is transmitted to application layer by information is controlled by fifo channel, is turned by entirely controlling link and sending control information in network Send out node and destination node.
3. a kind of control method of underwater sound communication network according to claim 2, which is characterized in that the step (2) Include:
(2.1) multiplex layer of forward node creates for realizing WFIFO pipeline, the RFIFO communicated between multiplex layer and application layer Pipeline and fifo channel;Application layer is realized multiple by being written and read to WFIFO pipeline and RFIFO pipeline and fifo channel With the communication between layer and application layer;
(2.2) after multiplex layer is by the information that application layer transmitting comes up from control link in reading fifo channel, by information In start by set date data link time and control command be transmitted to processing control command function, handle the function of control command Corresponding operation can be executed according to the time of log-on data link and control command;
(2.3) when the function of the processing control command in multiplex layer discovery control command is sta order, control command is handled Function creates two threads first, and WFIFO pipeline and RFIFO pipeline is respectively created in the two threads, in data link, multiplexing Multiplex layer and application are realized using the communication mode in WFIFO pipeline and this process of RFIFO pipeline between layer and application layer Communication between layer;Application layer is transmitted to for information is controlled by fifo channel again, then will be controlled by entirely control link Information is sent to forward node and destination node in network;
(2.4) when the function of the processing control command in multiplex layer discovery control command is Tcl script command, processing control life The function of order is first responsible for one subprocess of creation, and the time of the log-on data link according to transmitting, the Tcl foot of data link Real name executes the Tcl shell script of data link in the time of defined log-on data link, and data link is in log-on data chain The time on road just will start;Then control command is sent to application layer by fifo channel by control command by multiplex layer, is then led to Cross forward node and destination node that entire control link is sent control information in network;When the log-on data for arriving defined The time of link, it will data are passed to application by RFIFO pipeline by the Tcl script of automatic log-on data link, multiplex layer The information of application layer is transmitted to multiplex layer by WFIFO pipeline by another thread of layer, is passed through between application layer and multiplex layer RFIFO pipeline and WFIFO pipeline show between the two be in communication with each other;
(2.5) when the function of the processing control command in multiplex layer discovery control command is kill, multiplex layer cancels sta first Two threads for carrying out transmission data for data link created are ordered, then are transmitted to by fifo channel by information is controlled Application layer so mutually sends control information to forward node and destination node in network by entirely controlling link;
(2.6) the processing control when the function of the processing control command in multiplex layer discovery control command is stp, in multiplex layer The function of order will stop create in sta order two threads immediately, and cancel data link, and stp order is told Tcl script allows Tcl script that can stop entire data link, then is transmitted to application layer for information is controlled by fifo channel, so Forward node and destination node in network are sent control information to by entirely controlling link afterwards.
4. a kind of control method of underwater sound communication network according to claim 3, which is characterized in that the step (3) Include:
(3.1) multiplex layer of destination node creates for realizing WFIFO pipeline, the RFIFO communicated between multiplex layer and application layer Pipeline and fifo channel;Multiplex layer and application layer are by being written and read WFIFO pipeline and RFIFO pipeline and fifo channel It realizes the communication between multiplex layer and application layer, control command is transmitted to by control link the multiplexing of destination node in this way Layer, then control command is transferred in the PC machine of connection mesh node by way of serial communication;
(3.2) when multiplex layer by read fifo channel in from control link in application layer upload pass come control command after, The time of log-on data link in control command and control command are transmitted to the function of processing control command, handle control command Function can execute corresponding operation according to the time of log-on data link and control command;
(3.3) when the function of the processing control command in multiplex layer discovery control command is sta order, control command is handled Function creates two threads first, and WFIFO pipeline and RFIFO pipeline, multiplex layer in data link is respectively created in the two threads Multiplex layer and application layer are realized using the communication mode in WFIFO pipeline and this process of RFIFO pipeline between application layer Between communication;
(3.4) when the function of the processing control command in multiplex layer discovery control command is Tcl script command, processing control life The function of order is first responsible for one subprocess of creation, and the time of the log-on data link according to transmitting, Tcl script name are being advised The time for determining log-on data link executes Tcl shell script, and data link just will start in the time of log-on data link;When arriving The time of defined log-on data link, it will automatic log-on data link Tcl script, two threads that sta order is created One data for being used to transmit after starting data link from PC machine passes to application layer by RFIFO pipeline;Another The information of application layer is transmitted to multiplex layer by WFIFO pipeline by thread, between application layer and multiplex layer by RFIFO pipeline and Communication mode in this process of WFIFO pipeline realizes between the two be in communication with each other;
(3.5) when the function of the processing control command in multiplex layer discovery control command is kill, multiplex layer cancels sta first Two threads for carrying out transmission data for data link created are ordered, then are transmitted to by fifo channel by information is controlled Application layer is sent control information in the PC machine of destination node and connection destination node by entirely controlling link;
(3.6) the processing control when the function of the processing control command in multiplex layer discovery control command is stp, in multiplex layer The function of order will stop create in sta order two threads immediately, and cancel data link, and stp order is told Tcl script allows Tcl script that can stop entire data link;
(3.7) when application layer by fifo channel by control information be transmitted to multiplex layer, pass through RFIFO pipeline and WFIFO pipeline Realize the transmission of data between multiplex layer and application layer, the data received and control command are passed through serial communication by multiplex layer Mode passes to PC machine.
5. a kind of control method of underwater sound communication network according to claim 4, which is characterized in that the step (3.7) include:
The serial ports that (3.7.1) opens test plank obtains the filec descriptor uart of operation serial ports;
(3.7.2) obtains the characteristic of serial ports;
(3.7.3) configures the characteristic of serial ports accordingly;
(3.7.4) is by the buffer empty of serial ports sended and received;
(3.7.5) makes the serial ports characteristic of configuration come into force;
(3.7.6) multiplex layer realizes the communication between the PC machine of destination node connection by being written and read to serial ports.
CN201610854333.XA 2016-09-27 2016-09-27 A kind of control method of underwater sound communication network Active CN106656549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610854333.XA CN106656549B (en) 2016-09-27 2016-09-27 A kind of control method of underwater sound communication network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610854333.XA CN106656549B (en) 2016-09-27 2016-09-27 A kind of control method of underwater sound communication network

Publications (2)

Publication Number Publication Date
CN106656549A CN106656549A (en) 2017-05-10
CN106656549B true CN106656549B (en) 2019-09-27

Family

ID=58853245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610854333.XA Active CN106656549B (en) 2016-09-27 2016-09-27 A kind of control method of underwater sound communication network

Country Status (1)

Country Link
CN (1) CN106656549B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106134478B (en) * 2010-12-30 2013-10-23 北京遥测技术研究所 A kind of satellite constellation simulator control system and control method
CN103676663A (en) * 2013-09-22 2014-03-26 国家电网公司 A wind generating set combined simulation system communication interface realization method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100894506B1 (en) * 2007-06-28 2009-04-22 한양대학교 산학협력단 Monitoring system for communication network having a plurality of layers

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106134478B (en) * 2010-12-30 2013-10-23 北京遥测技术研究所 A kind of satellite constellation simulator control system and control method
CN103676663A (en) * 2013-09-22 2014-03-26 国家电网公司 A wind generating set combined simulation system communication interface realization method

Also Published As

Publication number Publication date
CN106656549A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
Petrioli et al. The SUNSET framework for simulation, emulation and at-sea testing of underwater wireless sensor networks
CN101447898B (en) Test system used for network safety product and test method thereof
Petrioli et al. From underwater simulation to at-sea testing using the ns-2 network simulator
CN106301911A (en) Information Network based on SDN half centralized simulation platform in kind and its implementation
CN104461854B (en) A kind of Ship Equipment software generic simulation test platform
CN101179456A (en) Network appliance testing approach and device
CN106313038B (en) A kind of real-time control debugging system and adjustment method
CN102591780A (en) Device driver software test method and test system
CN107659434A (en) A kind of automatic test approach of Devices to test, apparatus and system
CN109413678A (en) A kind of Wi-Fi module automatic test approach and test macro
CN105871643B (en) Network operation emulation mode based on Routing Protocol
CN104852823B (en) Monitoring method, the device and system of process
CN101945017B (en) Testing platform for train-ground transmission protocol in train operation control system and construction method thereof
CN107562623A (en) A kind of REST API automated testing methods and system
CN106656549B (en) A kind of control method of underwater sound communication network
CN107844411A (en) A kind of method of testing and relevant apparatus
CN103576667B (en) The method of testing of master control borad, Apparatus and system
CN102620746A (en) Navigator testing system
CN107632910A (en) A kind of method of testing and device
CN103454673B (en) There is the micro electronmechanical digital detector acquisition system recording monitoring unit and method more
CN107733743A (en) Realize the method and system that industry ethernet data are tested automatically
US7433814B2 (en) Network emulator architecture
CN106789449A (en) A kind of CAN exploitation and method of testing and system
CN107579871A (en) The generation method of distributed testing script based on model inspection and generation system
CN105991457B (en) Interchanger, control equipment and its management method

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