CN102799472A - Real-time information processing and data transmission method for underwater active detection systems - Google Patents
Real-time information processing and data transmission method for underwater active detection systems Download PDFInfo
- Publication number
- CN102799472A CN102799472A CN2012101993578A CN201210199357A CN102799472A CN 102799472 A CN102799472 A CN 102799472A CN 2012101993578 A CN2012101993578 A CN 2012101993578A CN 201210199357 A CN201210199357 A CN 201210199357A CN 102799472 A CN102799472 A CN 102799472A
- Authority
- CN
- China
- Prior art keywords
- instruction
- tsk
- data
- supplemental characteristic
- 16bit
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000001514 detection method Methods 0.000 title claims abstract description 48
- 230000005540 biological transmission Effects 0.000 title claims abstract description 26
- 230000010365 information processing Effects 0.000 title claims abstract description 19
- 238000004891 communication Methods 0.000 claims abstract description 20
- 238000012545 processing Methods 0.000 claims description 7
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 5
- 238000007689 inspection Methods 0.000 claims description 4
- 230000001960 triggered effect Effects 0.000 claims description 4
- 230000000153 supplemental effect Effects 0.000 claims 20
- 230000005236 sound signal Effects 0.000 claims 2
- 238000012856 packing Methods 0.000 claims 1
- 238000012546 transfer Methods 0.000 claims 1
- 238000004092 self-diagnosis Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 7
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000003745 diagnosis Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Images
Landscapes
- Selective Calling Equipment (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明涉及一种水下主动探测系统的实时信息处理及数据传输方法,使用统一的格式在各执行设备间进行指令及数据通信,可以提高水下主动探测系统的实时通信效率,并降低CPU的开销。该方法建立在可剪裁实时操作系统内核SYSBIOS的基础上,各任务进程在应用程序的调度下按任务、中断的优先级排队等待执行,并有效减少执行任务的等待时间,提高系统的数据吞吐量。本发明可以灵活地与各种执行设备进行通信,能够便捷地移植到声纳、鱼雷自导、水雷等不同应用功能的水下主动探测系统中。
The invention relates to a real-time information processing and data transmission method of an underwater active detection system, which uses a unified format to perform command and data communication between execution devices, which can improve the real-time communication efficiency of the underwater active detection system and reduce CPU overhead. overhead. This method is based on the tailorable real-time operating system kernel SYSBIOS, and each task process is queued for execution according to the priority of tasks and interrupts under the scheduling of the application program, and effectively reduces the waiting time for executing tasks and improves the data throughput of the system . The invention can flexibly communicate with various execution devices, and can be conveniently transplanted into underwater active detection systems with different application functions such as sonar, torpedo self-guidance, and mine.
Description
技术领域 technical field
本发明涉及一种水下主动探测系统的实时信息处理及数据传输方法。The invention relates to a real-time information processing and data transmission method of an underwater active detection system.
背景技术 Background technique
水下主动探测系统在水下目标探测及识别、海洋环境探测等方面具有广阔的应用前景。当前广泛应用的水下探测系统大量采用嵌入式处理器作为系统的控制部件,信号处理能力得到显著提升。但由于传统的水下主动探测系统的硬件结构和软件体系都比较固定和封闭,是一种单机单控的独立设备,每种水下主动探测系统对应于不同的设备、不同的用途,设备的通用性和扩展能力不够,限制了水下主动探测系统的扩展与兼容能力,给系统的维护和升级带来困难。The underwater active detection system has broad application prospects in underwater target detection and recognition, marine environment detection and so on. The current widely used underwater detection system uses a large number of embedded processors as the control components of the system, and the signal processing capability has been significantly improved. However, since the hardware structure and software system of the traditional underwater active detection system are relatively fixed and closed, it is an independent device with a single machine and single control. Each underwater active detection system corresponds to different equipment and different purposes. Insufficient versatility and expansion ability limit the expansion and compatibility of the underwater active detection system, and bring difficulties to the maintenance and upgrade of the system.
同时,在存储空间和处理器处理速度有限的情况下,如何充分利用软硬件资源,将采集到的大量数据及时地上传至上位机,从而实现实时的处理、诊断和显示等功能,也是整个水下主动探测系统的关键。At the same time, in the case of limited storage space and processor processing speed, how to make full use of hardware and software resources to upload a large amount of collected data to the host computer in a timely manner, so as to realize real-time processing, diagnosis and display functions, is also a key issue for the entire water system. The key to the next active detection system.
发明内容 Contents of the invention
要解决的技术问题technical problem to be solved
为了避免现有技术的不足之处,本发明提出一种水下主动探测系统的实时信息处理及数据传输方法。In order to avoid the deficiencies of the prior art, the present invention proposes a real-time information processing and data transmission method of an underwater active detection system.
技术方案Technical solutions
一种水下主动探测系统的实时信息处理及数据传输方法,其特征在于步骤如下:A method for real-time information processing and data transmission of an underwater active detection system, characterized in that the steps are as follows:
步骤1:水下主动探测系统实时信息处理及数据传输系统复位结束并完成初始化后,任务线程TSK_Process开始运行,系统处于等待上位机下发指令的状态;Step 1: After the real-time information processing and data transmission system of the underwater active detection system are reset and initialized, the task thread TSK_Process starts to run, and the system is in the state of waiting for the host computer to issue instructions;
步骤2:上位机向系统下发指令及参数数据,触发任务线程TSK_TCP,任务线程TSK_Process被抢占,指令及参数数据的格式为表1及表2:Step 2: The upper computer sends instructions and parameter data to the system, triggers the task thread TSK_TCP, and the task thread TSK_Process is preempted. The format of the instruction and parameter data is Table 1 and Table 2:
表1以太网通信指令格式Table 1 Ethernet communication command format
其中,指令头表示指令开始,占1个字节8bit;指令类型为上位机下发的指令代码,占5bit;板卡号表示指令对应的执行设备,占3bit,其中:0x0~0x6分配给水下主动探测系统中各执行设备,0x7表示广播,即所有设备均需接收的指令;长度表示该条指令后跟随的参数数据个数,占2个字节16bit,0x0000表示该指令无参数数据,一条指令的长度为4个字节;Among them, the instruction header indicates the start of the instruction, occupying 1 byte and 8 bits; the instruction type is the instruction code issued by the host computer, occupying 5 bits; the board number indicates the execution device corresponding to the instruction, occupying 3 bits, of which: 0x0~0x6 are allocated to underwater Actively detect each execution device in the system, 0x7 means broadcast, that is, the instruction that all devices need to receive; the length indicates the number of parameter data following the instruction, which occupies 2 bytes of 16bit, 0x0000 indicates that the instruction has no parameter data, one The length of the instruction is 4 bytes;
表2以太网通信参数数据格式Table 2 Ethernet communication parameter data format
其中,数据头表示数据开始,占1个字节8bit;其后紧跟本次下发的指令需要传输的参数数据,占n×16bit,即每个参数数据占2个字节16bit;上位机下发的指令不同,其后所跟的参数数据个数也不同;Among them, the data header indicates the beginning of the data, occupying 1 byte 8bit; followed by the parameter data that needs to be transmitted in the instruction issued this time, occupying n×16bit, that is, each parameter data occupies 2 bytes 16bit; the host computer The issued instructions are different, and the number of parameter data followed by them is also different;
步骤3:任务线程TSK_TCP将上位机下发的指令与参数数据接收完毕后,通过检查指令头及数据头来判断接收到的指令及参数数据是否有效,且接收到的参数数据个数是否与指令中“长度”部分所表示的数据个数一致,若是,则执行步骤4,若否,则丢弃该指令及参数数据,任务线程TSK_TCP结束,等待上位机再次下发指令;Step 3: After the task thread TSK_TCP receives the command and parameter data sent by the host computer, it checks the command header and data header to determine whether the received command and parameter data are valid, and whether the number of received parameter data is the same as that of the command The number of data represented by the "length" part in the middle is the same, if yes, then execute step 4, if not, then discard the instruction and parameter data, the task thread TSK_TCP ends, and wait for the host computer to issue instructions again;
步骤4:任务线程TSK_TCP挂起,将CPU的使用权返还给任务线程TSK_Process;任务线程TSK_Process对上位机下发的指令进行指令解析,通过指令的“板卡号”部分判断该指令相应的执行设备;Step 4: The task thread TSK_TCP is suspended, and the right to use the CPU is returned to the task thread TSK_Process; the task thread TSK_Process analyzes the instructions issued by the host computer, and judges the corresponding execution device of the instruction through the "board number" part of the instruction ;
步骤5:任务线程TSK_Process将指令及参数数据下发给相应执行设备;下发指令及参数数据前,系统需对指令及参数数据的格式进行调整,调整后指令及参数数据的格式如表3及表4:Step 5: The task thread TSK_Process sends the command and parameter data to the corresponding execution device; before sending the command and parameter data, the system needs to adjust the format of the command and parameter data. The format of the adjusted command and parameter data is shown in Table 3 and Table 4:
表3执行设备间指令格式Table 3 Command format between execution devices
所述指令的调整方式是去掉以太网通信指令格式中低16bit的表示参数数据个数的“长度”部分,在指令头前添加16bit的0x0000“指令标志”,表示指令,指令仍为4个字节;The adjustment method of the command is to remove the "length" part of the lower 16 bits in the Ethernet communication command format, which indicates the number of parameter data, and add a 16-bit 0x0000 "command flag" before the command header to indicate the command, and the command is still 4 words Festival;
表4执行设备间参数数据格式Table 4 Execution device parameter data format
所述参数数据的调整方式是去掉以太网通信参数数据格式中8bit的“数据头”,在每个16bit的数据前添加16bit的0xFFFF,表示数据,即每个参数数据由原先的16bit变为32bit;The adjustment method of the parameter data is to remove the 8-bit "data header" in the Ethernet communication parameter data format, and add 16-bit 0xFFFF before each 16-bit data to represent the data, that is, each parameter data changes from the original 16-bit to 32-bit ;
步骤6:任务线程TSK_Process在向指令执行设备传输完毕指令及参数数据后,再发送32bit的0x0000FFFF“结束”标志,表示传输结束;在只传输指令时无需传输“结束”标志。系统处于等待状态,等待指令执行设备上传指令执行结果;Step 6: After the task thread TSK_Process transmits the command and parameter data to the command execution device, it sends a 32-bit 0x0000FFFF "end" flag, indicating the end of the transmission; it is not necessary to transmit the "end" flag when only transmitting the command. The system is in a waiting state, waiting for the instruction execution device to upload the instruction execution result;
步骤7:相应指令执行设备在执行完毕指令后,向系统上传指令执行结果,指令执行结果的格式如表5:Step 7: After the corresponding instruction execution device finishes executing the instruction, upload the instruction execution result to the system. The format of the instruction execution result is shown in Table 5:
表5指令执行结果格式Table 5 Instruction execution result format
其中,指令头表示指令开始,占1个字节8bit;指令类型为指令代码,占5bit;板卡号表示指令对应的执行设备,占3bit,其中:0x0~0x6分配给水下主动探测系统中各执行设备,0x7表示广播,即所有设备均需接收的指令;结果表示该条指令的指令执行结果,占2个字节16bit,0x0000表示指令执行成功,0x00FF表示指令执行失败;Among them, the instruction header indicates the start of the instruction, occupying 1 byte and 8 bits; the instruction type is the instruction code, occupying 5 bits; the board number indicates the execution device corresponding to the instruction, occupying 3 bits, of which: 0x0~0x6 are allocated to each active underwater detection system. Execution device, 0x7 means broadcast, that is, the instruction that all devices need to receive; the result indicates the instruction execution result of this instruction, which occupies 2 bytes of 16 bits, 0x0000 indicates that the instruction is executed successfully, and 0x00FF indicates that the instruction fails to be executed;
步骤8:任务线程TSK_Process挂起,将CPU的使用权返还给任务线程TSK_TCP。任务线程TSK_TCP将指令执行设备上传的指令执行结果不做任何调整,直接上传给上位机,任务线程TSK_TCP结束,任务线程TSK_Process继续运行,若有水声信号数据写入系统,则执行步骤9,否则系统将进入等待状态,等待上位机再次下发指令;Step 8: The task thread TSK_Process is suspended, and the right to use the CPU is returned to the task thread TSK_TCP. The task thread TSK_TCP directly uploads the execution result of the instruction uploaded by the instruction execution device to the host computer without any adjustment. After the task thread TSK_TCP ends, the task thread TSK_Process continues to run. If there is underwater acoustic signal data written into the system, execute step 9, otherwise The system will enter the waiting state, waiting for the host computer to issue commands again;
步骤9:任务线程TSK_UDP被触发,任务线程TSK_Process被抢占;任务线程TSK_UDP将水声信号数据打包并采用UDP协议上传给上位机,直到上位机下发表示停止上传数据的指令后,任务线程TSK_UDP结束,任务线程TSK_Process继续运行,等待上位机再次下发指令。Step 9: The task thread TSK_UDP is triggered, and the task thread TSK_Process is preempted; the task thread TSK_UDP packs the underwater acoustic signal data and uploads it to the host computer using the UDP protocol. After the host computer issues an instruction to stop uploading data, the task thread TSK_UDP ends , the task thread TSK_Process continues to run, waiting for the host computer to issue instructions again.
有益效果Beneficial effect
本发明提出的一种水下主动探测系统的实时信息处理及数据传输方法,使用统一的格式在各执行设备间进行指令及数据通信,可以提高水下主动探测系统的实时通信效率,并降低CPU的开销。该方法建立在可剪裁实时操作系统内核SYSBIOS的基础上,各任务进程在应用程序的调度下按任务、中断的优先级排队等待执行,并有效减少执行任务的等待时间,提高系统的数据吞吐量。The real-time information processing and data transmission method of an underwater active detection system proposed by the present invention uses a unified format to perform command and data communication between execution devices, which can improve the real-time communication efficiency of the underwater active detection system and reduce the CPU time. s expenses. This method is based on the tailorable real-time operating system kernel SYSBIOS, and each task process is queued for execution according to the priority of tasks and interrupts under the scheduling of the application program, and effectively reduces the waiting time for executing tasks and improves the data throughput of the system .
本发明可以灵活地与各种执行设备进行通信,能够便捷地移植到声纳、鱼雷自导、水雷等不同应用功能的水下主动探测系统中。The invention can flexibly communicate with various execution devices, and can be conveniently transplanted into underwater active detection systems with different application functions such as sonar, torpedo self-guidance, and mine.
本发明采用统一的指令及数据格式从上位机接收指令及参数数据,并对指令及参数数据进行局部调整后下发至相应执行设备,能够在提高水下主动探测系统实时通信的效率的同时,保证各种执行设备之间数据通信的正确性,并减少各执行设备的运行开销。The present invention adopts a unified instruction and data format to receive instructions and parameter data from the upper computer, and sends the instruction and parameter data to the corresponding execution equipment after partial adjustment, which can improve the real-time communication efficiency of the underwater active detection system, Ensure the correctness of data communication between various execution devices, and reduce the operating overhead of each execution device.
本发明采用SYSBIOS,可智能调度各种线程,简化了程序设计,解决了数据搬移与实时处理这一实时系统的关键性问题,软件具有可扩展性、可再用性及可移植性。The invention adopts SYSBIOS, can intelligently schedule various threads, simplifies program design, and solves the key problem of the real-time system of data migration and real-time processing, and the software has scalability, reusability and portability.
附图说明 Description of drawings
图1为本发明水下主动探测系统实时信息处理及数据传输方法在水下主动探测系统中的位置示意图;Fig. 1 is a schematic diagram of the location of the real-time information processing and data transmission method of the underwater active detection system in the underwater active detection system of the present invention;
图2本发明水下主动探测系统实时信息处理及数据传输方法的工作流程图;Fig. 2 is the working flow diagram of the real-time information processing and data transmission method of the underwater active detection system of the present invention;
图3接收到“发射机自诊断”指令后的指令传输示意图;Figure 3 is a schematic diagram of command transmission after receiving the "transmitter self-diagnosis" command;
图4接收到“数据导出”指令后的指令及参数数据传输示意图;Figure 4 is a schematic diagram of instruction and parameter data transmission after receiving the "data export" instruction;
图5接收到“开始探测”指令后的任务调度示意图。Fig. 5 is a schematic diagram of task scheduling after receiving the "start detecting" instruction.
具体实施方式 Detailed ways
现结合实施例、附图对本发明作进一步描述:Now in conjunction with embodiment, accompanying drawing, the present invention will be further described:
本实施例以DSP芯片为运行平台实现水下主动探测系统中的系统控制功能,软件程序设计采用SYSBIOS,并使用统一的通信格式在各执行设备之间进行指令及数据通信。In this embodiment, the DSP chip is used as the operating platform to realize the system control function in the underwater active detection system. The software program design adopts SYSBIOS, and uses a unified communication format to perform command and data communication between execution devices.
水下主动探测系统实时信息处理及数据传输方法的软件程序设计采用SYSBIOS,根据水下主动探测系统的功能需求,创建3个任务线程:TSK_Process、TSK_TCP和TSK_UDP。其中TSK_TCP为TCP通信任务,负责与上位机之间的指令接收与应答通信,优先级最高;TSK_UDP为UDP通信任务,负责将水下主动探测系统采集到的水声信号数据以UDP协议方式传输给上位机,优先级次之;TSK_Process为信息处理线程,负责整个信息处理与逻辑控制,能够被其它2个任务线程抢占,在没有其他任务线程执行时始终不间断地运行,因此优先级最低。The software program design of the real-time information processing and data transmission method of the underwater active detection system adopts SYSBIOS. According to the functional requirements of the underwater active detection system, three task threads are created: TSK_Process, TSK_TCP and TSK_UDP. Among them, TSK_TCP is a TCP communication task, responsible for command reception and response communication with the host computer, with the highest priority; TSK_UDP is a UDP communication task, responsible for transmitting the underwater acoustic signal data collected by the underwater active detection system to the The upper computer has the second priority; TSK_Process is an information processing thread, which is responsible for the entire information processing and logic control. It can be preempted by other two task threads, and it always runs without interruption when no other task thread is executing, so it has the lowest priority.
如图1所示,水下主动探测系统实时信息处理及数据传输方法,处于整个水下主动探测系统的关键位置,主要完成与上位机通信、信息处理、系统与逻辑控制以及整个水下主动探测系统的同步等功能。As shown in Figure 1, the real-time information processing and data transmission method of the underwater active detection system is in the key position of the entire underwater active detection system, and mainly completes communication with the host computer, information processing, system and logic control, and the entire underwater active detection System synchronization and other functions.
水下主动探测系统实时信息处理及数据传输方法的工作流程如图2所示:系统复位结束后,完成初始化,包括SYSBIOS系统内核初始化、中断服务的初始化、IP和MAC地址的设定、启动TCP及UDP服务器、探测参数的初始化以及各标准外设接口的初始化;然后进行自检,包括各执行设备(如发射机、接收机、外部存储设备等)的自检,并将自检结果通过以太网发送给上位机;然后系统进入等待状态,等待上位机下发指令;当系统接收到上位机下发的指令后,先对该指令进行解析,判断指令的类别(如自诊断指令、参数配置指令、数据导出指令或开始/停止探测指令);若指令为“自诊断”或“参数配置”,系统从指令中解析出该指令的执行设备编号(即板卡号),将该指令下发给相应执行设备,并在执行设备完成该指令后从指令执行设备接收指令执行结果,上传给上位机,系统再次处于等待状态;若指令为“数据导出”,系统将该指令下发给外部存储设备,开始从外部存储设备中读取数据,同时将读取出的数据上传给上位机,系统再次处于等待状态;若指令为“开始探测”,系统首先通知发射机开始发出探测信号,待探测信号发射完毕后,通知接收机开始接收数据,并将接收到的数据打包上传给上位机;当系统接收到上位机的“停止探测”指令时,整个系统又处于等待状态。The working process of the real-time information processing and data transmission method of the underwater active detection system is shown in Figure 2: After the system is reset, the initialization is completed, including the initialization of the SYSBIOS system kernel, the initialization of the interrupt service, the setting of IP and MAC addresses, and the starting of TCP and UDP server, initialization of detection parameters, and initialization of each standard peripheral interface; then self-inspection, including the self-inspection of each execution device (such as transmitter, receiver, external storage device, etc.), and the self-inspection results through the Ethernet Then the system enters the waiting state, waiting for the command issued by the host computer; when the system receives the command issued by the host computer, it first analyzes the command and judges the type of command (such as self-diagnosis command, parameter configuration command, data export command or start/stop detection command); if the command is "self-diagnosis" or "parameter configuration", the system parses out the execution device number (that is, the board number) of the command from the command, and sends the command to the corresponding execution device, and after the execution device completes the instruction, it receives the instruction execution result from the instruction execution device and uploads it to the host computer, and the system is in a waiting state again; if the instruction is "data export", the system sends the instruction to the external storage device, start to read data from the external storage device, and upload the read data to the upper computer at the same time, the system is in a waiting state again; if the command is "start detection", the system first notifies the transmitter to start sending detection signals, waiting After the signal is transmitted, the receiver is notified to start receiving data, and the received data is packaged and uploaded to the host computer; when the system receives the "stop detection" command from the host computer, the whole system is in a waiting state again.
以接收到“发射机自诊断”指令为例,水下主动探测系统实时信息处理及数据传输方法中指令传输的示意图如图3所示:本例中,定义指令头为0x7E,自诊断指令的指令代码为0x02,发射机的板卡号为0x1,自诊断指令无需参数数据,故“发射机自诊断”指令的二进制形式可表示为01111110 00010 001 00000000 00000000,换算为十六进制形式为0x7E110000,如表6所示。Taking receiving the "transmitter self-diagnosis" command as an example, the schematic diagram of command transmission in the real-time information processing and data transmission method of the underwater active detection system is shown in Figure 3: In this example, the command header is defined as 0x7E, and the self-diagnosis command The command code is 0x02, the board number of the transmitter is 0x1, and the self-diagnosis command does not need parameter data, so the binary form of the "transmitter self-diagnosis" command can be expressed as 01111110 00010 001 00000000 00000000, converted to hexadecimal form is 0x7E110000 , as shown in Table 6.
表6上位机下发的“发射机自诊断”指令Table 6 "Transmitter self-diagnosis" command issued by the host computer
上位机将“发射机自诊断”指令0x7E110000下发给系统,经系统进行指令解析后确定需要将该指令下发给发射机;系统对指令进行局部调整后,将调整后的指令0x00007E11下发给发射机,如表7所示;The upper computer sends the "transmitter self-diagnosis" command 0x7E110000 to the system, and after the system analyzes the command, it is determined that the command needs to be sent to the transmitter; after the system partially adjusts the command, it sends the adjusted command 0x00007E11 to the Transmitter, as shown in Table 7;
表7系统下发给发射机的“发射机自诊断”指令Table 7 "Transmitter self-diagnosis" command issued by the system to the transmitter
发射机执行完“发射机自诊断”指令后,将诊断结果“正常”0x7E110000或“异常”0x7E1100FF上传给系统,如表8所示;After the transmitter executes the "transmitter self-diagnosis" command, it uploads the diagnosis result "normal" 0x7E110000 or "abnormal" 0x7E1100FF to the system, as shown in Table 8;
表8发射机上传给系统的“发射机自诊断”指令执行结果Table 8 Execution results of the "transmitter self-diagnosis" command uploaded to the system by the transmitter
系统不对该指令执行结果进行任何处理,直接通过以太网上传给上位机。The system does not perform any processing on the execution result of the command, and directly uploads it to the host computer through Ethernet.
以接收到“数据导出”指令为例,水下主动探测系统实时信息处理及数据传输方法中指令及参数数据传输的示意图如图4所示:本例中,定义指令头为0x7E,数据导出指令的指令代码为0x1B,存放数据的设备的板卡号为0x4,“数据导出”指令需2个参数数据,数据起始位置和数据结束位置,故“数据导出”指令的二进制形式可表示为01111110 11011 100 00000000 00000010,换算为十六进制形式为0x7EDC0002,如表9所示;Taking receiving the "data export" command as an example, the schematic diagram of command and parameter data transmission in the real-time information processing and data transmission method of the underwater active detection system is shown in Figure 4: In this example, the command header is defined as 0x7E, and the data export command The command code is 0x1B, the card number of the device storing the data is 0x4, the "data export" command needs 2 parameter data, the data start position and the data end position, so the binary form of the "data export" command can be expressed as 01111110 11011 100 00000000 00000010, converted to hexadecimal form is 0x7EDC0002, as shown in Table 9;
表9上位机下发的“数据导出”指令Table 9 "Data export" command issued by the host computer
数据头定义为0x8C,数据起始及结束位置以时间表示,起始时间8时50分(00 10000101 0000 00或0x2140),结束时间20时23分(10 0000 0010 0011 00或0x808C,如表10所示)。The data header is defined as 0x8C, and the start and end positions of the data are represented by time. The start time is 8:50 (00 10000101 0000 00 or 0x2140), and the end time is 20:23 (10 0000 0010 0011 00 or 0x808C, as shown in Table 10 shown).
表10上位机下发的“数据导出”指令的相关参数数据Table 10 Relevant parameter data of the "data export" command issued by the host computer
上位机将“数据导出”指令0x7EDC0002及参数数据0x8C2140808C下发给系统,经系统进行指令解析后确定需要将该指令下发给板卡号为0x4的设备(即外部存储设备);系统对指令及参数数据进行局部调整后,将调整后的指令0x00007EDC及调整后的参数数据0xFFFF2140FFFF808C下发给执行设备,并在参数数据下发完毕后发送0x0000FFFF表示数据发送完毕,如表11及表12所示;The upper computer sends the "data export" command 0x7EDC0002 and parameter data 0x8C2140808C to the system, and after the system analyzes the command, it is determined that the command needs to be sent to the device with the board number 0x4 (that is, the external storage device); After the parameter data is partially adjusted, send the adjusted command 0x00007EDC and the adjusted parameter data 0xFFFF2140FFFF808C to the execution device, and send 0x0000FFFF after the parameter data is sent to indicate that the data is sent, as shown in Table 11 and Table 12;
表11系统下发给外部存储设备的“数据导出”指令Table 11 "Data export" command issued by the system to the external storage device
表12系统下发给外部存储设备的“数据导出”指令的相关参数数据Table 12 Relevant parameter data of the "data export" command issued by the system to the external storage device
相应执行设备执行完“数据导出”指令后,将指令执行结果“正常”0x7EDC0000或“异常”0x7EDC00FF上传给系统,如表13所示;After the corresponding execution device executes the "data export" command, it uploads the command execution result "normal" 0x7EDC0000 or "abnormal" 0x7EDC00FF to the system, as shown in Table 13;
表13外部存储设备上传给系统的“数据导出”指令执行结果Table 13 Execution results of the "data export" command uploaded to the system from the external storage device
系统不对该指令执行结果进行任何处理,直接通过以太网上传给上位机。The system does not perform any processing on the execution result of the command, and directly uploads it to the host computer through Ethernet.
以接收“开始探测”指令为例,水下主动探测系统实时信息处理及数据传输方法的任务调度如图5所示。系统复位结束并完成初始化后,任务线程TSK_Process开始运行;当上位机下发“开始探测”指令时,将触发任务线程TSK_TCP开始运行,任务线程TSK_Process被抢占,系统接收到该指令并进行指令解析;系统完成指令解析并发送完毕指令执行结果后,任务线程TSK_TCP结束,并将CPU的使用权返还给任务线程TSK_Process;任务线程TSK_Process将“开始探测”指令下发给发射机,并在发射机发射完毕探测信号后将指令下发给接收机,通知接收机开始接收数据;当有水声信号数据写入系统时,任务线程TSK_UDP被触发,取出并打包数据发送给上位机;在任务线程TSK_UDP运行过程中,若上位机下发“停止探测”指令,任务线程TSK_TCP被触发,任务线程TSK_UDP被抢占,待系统接收指令并解析后,系统发送指令执行结果给上位机,任务线程TSK_TCP结束,并将CPU的使用权返还给任务线程TSK_UDP;当采集到的水声信号数据全部发送给上位机后,任务线程TSK_UDP结束,任务线程TSK_Process继续运行,等待上位机再次下发指令。Taking receiving the "start detection" command as an example, the task scheduling of the real-time information processing and data transmission method of the underwater active detection system is shown in Figure 5. After the system is reset and initialized, the task thread TSK_Process starts to run; when the host computer issues the "Start Detection" command, it will trigger the task thread TSK_TCP to start running, the task thread TSK_Process is preempted, and the system receives the command and analyzes the command; After the system completes the command analysis and sends the command execution results, the task thread TSK_TCP ends and returns the CPU usage right to the task thread TSK_Process; the task thread TSK_Process sends the "start detection" command to the transmitter, and when the transmitter finishes transmitting After detecting the signal, send an instruction to the receiver to notify the receiver to start receiving data; when there is underwater acoustic signal data written into the system, the task thread TSK_UDP is triggered, takes out and packs the data and sends it to the host computer; during the running process of the task thread TSK_UDP In the process, if the upper computer issues a "stop detection" command, the task thread TSK_TCP is triggered, and the task thread TSK_UDP is preempted. After the system receives and analyzes the instruction, the system sends the instruction execution result to the upper computer, the task thread TSK_TCP ends, and the CPU The right to use is returned to the task thread TSK_UDP; when all the collected underwater acoustic signal data is sent to the host computer, the task thread TSK_UDP ends, and the task thread TSK_Process continues to run, waiting for the host computer to issue instructions again.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210199357.8A CN102799472B (en) | 2012-06-18 | 2012-06-18 | Real-time information processing and data transmission method for underwater active detection systems |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210199357.8A CN102799472B (en) | 2012-06-18 | 2012-06-18 | Real-time information processing and data transmission method for underwater active detection systems |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102799472A true CN102799472A (en) | 2012-11-28 |
CN102799472B CN102799472B (en) | 2014-07-16 |
Family
ID=47198587
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210199357.8A Expired - Fee Related CN102799472B (en) | 2012-06-18 | 2012-06-18 | Real-time information processing and data transmission method for underwater active detection systems |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102799472B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106568496A (en) * | 2016-11-09 | 2017-04-19 | 哈尔滨工程大学 | Real-time transmission multivariate vector hydrophone array subsurface buoy system |
CN110996306A (en) * | 2019-11-12 | 2020-04-10 | 天津康汇医疗科技股份有限公司 | Multichannel signal acquisition communication protocol based on ZigBee |
CN114116255A (en) * | 2021-11-05 | 2022-03-01 | 中国航空工业集团公司雷华电子技术研究所 | Sysbios-based inter-thread communication mechanism implementation method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000047881A (en) * | 1998-07-28 | 2000-02-18 | Hitachi Ltd | Real-time system |
WO2002077801A2 (en) * | 2001-03-12 | 2002-10-03 | Centre National D'etudes Spatiales | Time management method and system in a real-time system |
US20030126306A1 (en) * | 2001-07-06 | 2003-07-03 | International Business Machines Corporation | Data communication method, data communication system, and program |
CN101324852A (en) * | 2008-07-22 | 2008-12-17 | 北京航空航天大学 | Real-time operating system and its real-time realization method |
-
2012
- 2012-06-18 CN CN201210199357.8A patent/CN102799472B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000047881A (en) * | 1998-07-28 | 2000-02-18 | Hitachi Ltd | Real-time system |
WO2002077801A2 (en) * | 2001-03-12 | 2002-10-03 | Centre National D'etudes Spatiales | Time management method and system in a real-time system |
US20030126306A1 (en) * | 2001-07-06 | 2003-07-03 | International Business Machines Corporation | Data communication method, data communication system, and program |
CN101324852A (en) * | 2008-07-22 | 2008-12-17 | 北京航空航天大学 | Real-time operating system and its real-time realization method |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106568496A (en) * | 2016-11-09 | 2017-04-19 | 哈尔滨工程大学 | Real-time transmission multivariate vector hydrophone array subsurface buoy system |
CN110996306A (en) * | 2019-11-12 | 2020-04-10 | 天津康汇医疗科技股份有限公司 | Multichannel signal acquisition communication protocol based on ZigBee |
CN110996306B (en) * | 2019-11-12 | 2021-07-27 | 天津康汇医疗科技股份有限公司 | ZigBee-based multi-channel signal acquisition communication method |
CN114116255A (en) * | 2021-11-05 | 2022-03-01 | 中国航空工业集团公司雷华电子技术研究所 | Sysbios-based inter-thread communication mechanism implementation method and system |
Also Published As
Publication number | Publication date |
---|---|
CN102799472B (en) | 2014-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112463614B (en) | A method for constructing a software virtualization test environment based on hardware board access | |
US10411953B2 (en) | Virtual machine fault tolerance method, apparatus, and system | |
CN102497434B (en) | Establishing method of kernel state virtual network equipment and packet transmitting and receiving methods thereof | |
CN104021069B (en) | The management method and system of the software performance test based on distributed virtual machine system | |
CN111656336B (en) | PCIE sending and receiving method, device, equipment and system | |
US9703595B2 (en) | Multi-core system with central transaction control | |
US20130047157A1 (en) | Information processing apparatus and interrupt control method | |
CN111651256B (en) | A FreeRTOS-based serial communication data synchronization method | |
US20170155717A1 (en) | Direct memory access for endpoint devices | |
CN102073565A (en) | Action triggering method, multi-core packet debugging method, device and system thereof | |
CN105721295A (en) | Cloud server and PLC PPI communication gateway | |
JPWO2021130828A5 (en) | In-server delay control device, server, in-server delay control method and program | |
CN104965700A (en) | Method and system for implementing driving on SPI equipment under VxWorks operating system | |
CN107870879A (en) | A data migration method, an accelerator board, a host computer, and a data migration system | |
CN102799472A (en) | Real-time information processing and data transmission method for underwater active detection systems | |
CN102957568A (en) | Monitoring management method of multi-node server | |
CN104866454A (en) | Write message prospect processing method and device facing board-level high-speed bus | |
CN106533621B (en) | Communication Method for Real-time Monitoring of Permanent Magnet Synchronous Motor Based on Simplified MODBUS Protocol | |
CN107172037A (en) | A kind of real-time subpackage analytic method of multichannel multi-channel high-speed data stream | |
US20120166585A1 (en) | Apparatus and method for accelerating virtual desktop | |
CN114726883B (en) | Embedded RDMA system | |
CN103916413A (en) | Control method and device for heterogeneous minicomputers, and cloud computing system | |
CN114816566A (en) | Instruction moving method, system, equipment and medium | |
CN109151316B (en) | A multi-industrial camera data scheduling device based on FPGA | |
US20140036928A1 (en) | Short Packet Transmission |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140716 Termination date: 20150618 |
|
EXPY | Termination of patent right or utility model |