CyAPI and transfer data automatically from bulk in Endopoint

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Translated: How can I perform a thread method to automatically transfer data as long as there is data in Bulk in endpoint using CyAPI.h?

0 Likes
1 Solution

Hi,

You have to use CreateThread() API to create two threads(one for OUT and one for IN) and then create event using CreateEvent()  so that thread can signal each other. Then you have to elevate In and OUT  tasks on to these threads. At this point I can give you this much info.

Please try and update if you are able to built such host application.

Thanks & Regards

Abhinav

View solution in original post

0 Likes
5 Replies
abhinavg_21
Moderator
Moderator
Moderator
50 likes received 25 likes received 10 likes received

Hi,

Yes you have to create two threads and assign different memories that has to passed via two different endpoints. EP are parallel data paths so there is no need for thread synchronization. So simply create threads and call API.

Thanks & Regards

Abhinav

0 Likes
Anonymous
Not applicable

Hi,

Do you know what function or flags can I use to do that? Or an example? Thanks for answering!!

0 Likes

Hi,

You have to use CreateThread() API to create two threads(one for OUT and one for IN) and then create event using CreateEvent()  so that thread can signal each other. Then you have to elevate In and OUT  tasks on to these threads. At this point I can give you this much info.

Please try and update if you are able to built such host application.

Thanks & Regards

Abhinav

0 Likes
Anonymous
Not applicable

How can I know that I received data from an in endpoint without using XferData?

0 Likes

Hi,

Please check the In and OUT  task functions. I guess these task/functions makes use of XferData to transfer data over EP. You have to assign these IN and OUT tasks/functions on to 2 parallel threads created using CreateThread() API.

Thanks & Regards

Abhinav Garg

0 Likes