Parameters: uxEventQueueLength Queue sets เก็บ events ที่เกิดขึ้นบน the queues and semaphores ที่บรรจุใน the set.
uxEventQueueLength ระบุ the maximum number of events ที่สามารถถูกวางคิวได้ในครั้ง
เดียวthat can be queued at once.
เพื่อให้แน่ใจอย่างแน่นอนว่า events จะไม่สูญหาย uxEventQueueLength ต้องถูกเซ็ตเป็นผลรวม
ของความยาวของ the queues ที่เพิ่มไปยัง the set, โดยที่ binary semaphores และ
mutexes มีความยาว 1, และ counting semaphores มีความยาวที่เซ็ตโดย maximum count
value ของพวกมัน. ตัวอย่างเช่น:
• ถ้า a queue set ต้องเก็บ a queue ที่มีความยาว 5, queue อีกตัวมีความยาว 12, และ a
binary semaphore, ดังนั้น uxEventQueueLength ควรถูกเซ็ตเป็น (5 + 12 + 1), หรือ
18.
• ถ้า a queue set ต้องเก็บ three binary semaphores ดังนั้น uxEventQueueLength
ควรถูกเซ็ตเป็น (1 + 1 + 1 ), หรือ 3.
• ถ้า a queue set ต้องเก็บ a counting semaphore ที่มี a maximum count of 5, และ
a counting semaphore ที่มี a maximum count of 3, ดังนั้น uxEventQueueLength
ควรถูกเซ็ตเป็น (5 + 3), หรือ 8.
Returns: ถ้า the queue set ถูกสร้างสำเร็จดังนั้น a handle to the created queue set จะถูกส่งคืนกลับ. ถ้าเป็นอย่างอื่น NULL จะถูกส่งคืน
กลับ.
Example usage:(ตัวอย่างโค้ดดูในลิ้งค์เอานะครับ)
https://www.freertos.org/xQueueCreateSet.html