GetQueuedCompletionStatus的返回值

本文详细介绍了I/O完成端口的工作原理及使用方法。包括如何通过CreateIoCompletionPort和GetQueuedCompletionStatus等函数来管理和获取I/O操作的状态。讨论了线程与完成端口的关联方式以及在多线程环境中完成包的处理流程。
If the function dequeues a completion packet for a successful I/O operation from the completion port, the return value is nonzero. The function stores information in the variables pointed to by the lpNumberOfBytesTransferred, lpCompletionKey, and lpOverlapped parameters.  
 
如果函数从完成端口队列中取得一个IO操作成功的完成包,那么返回值不等于0。 在lpNumberOfBytesTransferred, lpCompletionKey, and lpOverlapped这些参数所指向的变量中存储了这个完成包的相关信息。  
 
If *lpOverlapped is NULL and the function does not dequeue a completion packet from the completion port, the return value is zero. The function does not store information in the variables pointed to by the lpNumberOfBytes and lpCompletionKey parameters. To get extended error information, call GetLastError. If the function did not dequeue a completion packet because the wait timed out, GetLastError returns WAIT_TIMEOUT.  
 
如果 *lpOverlapped为NULL, 且函数没能从完成端口取出一个完成包,返回值则为0。函数则不会在lpNumberOfBytes and lpCompletionKey所指向的参数中存储信息。调用GetLastError, 可以得到一个扩展错误信息。如果因为等待超时而未能出列一个完成包,GetLastError返回WAIT_TIMEOUT.  
 
If *lpOverlapped is not NULL and the function dequeues a completion packet for a failed I/O operation from the completion port, the return value is zero. The function stores information in the variables pointed to by lpNumberOfBytes, lpCompletionKey, and lpOverlapped. To get extended error information, call GetLastError.  
 
如果 *lpOverlapped不为空, 且函数从完成端口出列一个失败的I/O操作的完成包,返回值为0。函数在指向lpNumberOfBytesTransferred, lpCompletionKey, and lpOverlapped的参数指针中存储相关信息。调用GetLastError可以得到扩展错误信息 
 
If a socket handle associated with a completion port is closed, GetQueuedCompletionStatus returns ERROR_SUCCESS, with lpNumberOfBytes equal zero.  
 
如果与完成端口相关联的一个套接字句柄被关闭,GetQueuedCompletionStatus返回ERROR_SUCCESS, 且lpNumberOfBytes等于0
 
Remarks(注意)
This function associates a thread with the specified completion port. A thread can be associated with at most one completion port.
 
这个函数分配一个线程给指定的完成端口,一个线程最多只能与一个完成端口相关联(一个线程只能为一个完成端口提供服务)
 
The I/O system can be instructed to send completion notification packets to completion ports, where they are queued. The CreateIoCompletionPort function provides a mechanism for this.
 
I/O系统能够发送完成通知到完成端口,并使之队列有序,CreateIoCompletionPort函数提供了这样的机制
 
When you perform an input/output operation with a file handle that has an associated input/output completion port, the I/O system sends a completion notification packet to the completion port when the I/O operation comple tes. The completion port places the completion packet in a first-in-first-out queue. The GetQueuedCompletionStatus function retrieves these queued completion packets.
 
当你在一个文件句柄上执行一个输入输出操作,这个文件句柄有一个相关联的完成端口,I/O操作完成的时候,I/O系统发送一个完成通知到完成端口。完成端口把这个完成通知追加到一个先进先出的队列中。GetQueuedCompletionStatus 函数可以按照正确的顺序得到这些完成包
 
A server application may have several threads calling GetQueuedCompletionStatus for the same completion port. As input operations complete, the operating system queues completion packets to the completion port. If threads are actively waiting in a call to this function, queued requests complete their call. For more information, see I/O Completion Ports.
 
一个服务器应用程序,可以有多个线程在同一个完成端口上同时调用GetQueuedCompletionStatus。输入操作完成,操作系统把排好队的完成包交给完成端口。如果线程正在等待这个函数返回,则被激发。他们的调用请求也会被排队完成。更多信息请查看 I/O Completion Ports.
 
You can call the PostQueuedCompletionStatus function to post an completion packet to an completion port. The completion packet will satisfy an outstanding call to the GetQueuedCompletionStatus function.
 
你能调用PostQueuedCompletionStatus函数投递一个完成包到一个完成端口,完成包将确保GetQueuedCompletionStatus 调用返回。
内容概要:本文是一篇关于使用RandLANet模型对SensatUrban数据集进行点云语义分割的实战教程,系统介绍了从环境搭建、数据准备、模型训练与测试到精度评估的完整流程。文章详细说明了在Ubuntu系统下配置TensorFlow 2.2、CUDA及cuDNN等深度学习环境的方法,并指导用户下载和预处理SensatUrban数据集。随后,逐步讲解RandLANet代码的获取与运行方式,包括训练、测试命令的执行与参数含义,以及如何监控训练过程中的关键指标。最后,教程涵盖测试结果分析、向官方平台提交结果、解读评估报告及可视化效果等内容,并针对常见问题提供解决方案。; 适合人群:具备一定深度学习基础,熟悉Python编程和深度学习框架,从事计算机视觉或三维点云相关研究的学生、研究人员及工程师;适合希望动手实践点云语义分割项目的初学者与进阶者。; 使用场景及目标:①掌握RandLANet网络结构及其在点云语义分割任务中的应用;②学会完整部署一个点云分割项目,包括数据处理、模型训练、测试与性能评估;③为参与相关竞赛或科研项目提供技术支撑。; 阅读建议:建议读者结合提供的代码链接和密码访问完整资料,在本地或云端环境中边操作边学习,重点关注数据格式要求与训练参数设置,遇到问题时参考“常见问题与解决技巧”部分及时排查。
内容概要:本文详细介绍了三相异步电机SVPWM-DTC(空间矢量脉宽调制-直接转矩控制)的Simulink仿真实现方法,结合DTC响应快与SVPWM谐波小的优点,构建高性能电机控制系统。文章系统阐述了控制原理,包括定子磁链观测、转矩与磁链误差滞环比较、扇区判断及电压矢量选择,并通过SVPWM技术生成固定频率PWM信号,提升系统稳态性能。同时提供了完整的Simulink建模流程,涵盖电机本体、磁链观测器、误差比较、矢量选择、SVPWM调制、逆变器驱动等模块的搭建与参数设置,给出了仿真调试要点与预期结果,如电流正弦性、转矩响应快、磁链轨迹趋圆等,并提出了模型优化与扩展方向,如改进观测器、自适应滞环、弱磁控制和转速闭环等。; 适合人群:电气工程、自动化及相关专业本科生、研究生,从事电机控制算法开发的工程师,具备一定MATLAB/Simulink和电机控制理论基础的技术人员。; 使用场景及目标:①掌握SVPWM-DTC控制策略的核心原理与实现方式;②在Simulink中独立完成三相异步电机高性能控制系统的建模与仿真;③通过仿真验证控制算法有效性,为实际工程应用提供设计依据。; 阅读建议:学习过程中应结合文中提供的电机参数和模块配置逐步搭建模型,重点关注磁链观测、矢量选择表和SVPWM调制的实现细节,仿真时注意滞环宽度与开关频率的调试,建议配合MATLAB官方工具箱文档进行参数校准与结果分析。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值