vxwork網絡連接超時

求助:VxWorks中的錯誤代碼0x3d0002(S_objLib_OBJ_UNAVAILABLE)是什麼含義?
各位高手,我想請教一個問題。
在VxWorks中的錯誤代碼S_objLib_OBJ_UNAVAILABLE代表什麼錯誤?
我使用VxWorks5.5.1,Zinc6.0開發軟件。在使用taskSpawn發起主界面任務後,在shell下使用i命令查看各個任務的狀態,發現我的主界面任務有錯誤碼0x3d0002(S_objLib_OBJ_UNAVAILABLE),一直不知道是什麼錯誤導致的。界面也能創建,各種響應正常。但是偶爾我的界面會死掉,死的時候只是在軟件啓動時刻,在操作過程中,從來沒死過。現在查原因,不知道是不是由S_objLib_OBJ_UNAVAILABLE錯誤引起的。


------解決方案--------------------------------------------------------
像這種問題,只能通過記錄日誌的方式來解決問題?


S_objLib_OBJ_UNAVAILABLE:
- timeout is set to NO_WAIT, and the queue is full.  

建議查看一下
VXWMsgQ::send( ) - send a message to message queue

SYNOPSIS

STATUS send
(
char * buffer,
UINT nBytes,
int timeout,
int pri
)
DESCRIPTION
This routine sends the message in buffer of length nBytes to its message queue. If any tasks are already waiting to receive messages on the queue, the message is immediately delivered to the first waiting task. If no task is waiting to receive messages, the message is saved in the message queue.  

The timeout parameter specifies the number of ticks to wait for free space if the message queue is full. The timeout parameter can also have the following special values:  

NO_WAIT  
return immediately, even if the message has not been sent.  

WAIT_FOREVER  
never time out.  
The pri parameter specifies the priority of the message being sent. The possible values are:  

MSG_PRI_NORMAL  
normal priority; add the message to the tail of the list of queued messages.  

MSG_PRI_URGENT  
urgent priority; add the message to the head of the list of queued messages.  

USE BY INTERRUPT SERVICE ROUTINES
This routine can be called by interrupt service routines as well as by tasks. This is one of the primary means of communication between an interrupt service routine and a task. When called from an interrupt service routine, timeout must be NO_WAIT.  


RETURNS
OK or ERROR.  


ERRNO

S_objLib_OBJ_DELETED
- the message queue was deleted while waiting to a send message.  

S_objLib_OBJ_UNAVAILABLE
- timeout is set to NO_WAIT, and the queue is full. 

S_objLib_OBJ_TIMEOUT
- the queue is full for timeout ticks.  

S_msgQLib_INVALID_MSG_LENGTH
- nBytes is larger than the maxMsgLength set for the message queue.  

S_msgQLib_NON_ZERO_TIMEOUT_AT_INT_LEVEL
- called from an ISR, with timeout not set to NO_WAIT.  




------解決方案--------------------------------------------------------
將程序中主要函數運行完畢後,將運行成功與否的結果寫入到文件中,如果程序死掉後,可以通過查看此日誌文件,就可以發現是程序死到那個函數上了!一般大一點的程序,必須要有此功能,因爲一些細節問題,時隱時顯!
另外,你可以百度搜一下 日誌文件 等關健字
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章