Can i use FIFO Queue concept in PC Serial Port communication...?
-
Hi... I want to use FIFO queue concept for PC serial port communication through PC com port for data transmission or reception. Can anybody suggest me any good document available on net for this or any suggestion how i can use it in my application...? Thanks, Vinay
-
Hi... I want to use FIFO queue concept for PC serial port communication through PC com port for data transmission or reception. Can anybody suggest me any good document available on net for this or any suggestion how i can use it in my application...? Thanks, Vinay
There's a built-in FIFO queue structure in the form of System.Collections.Generic.Queue. From there, you could just queue up some communication procedures, each one getting executed in order from the queue.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
Hi... I want to use FIFO queue concept for PC serial port communication through PC com port for data transmission or reception. Can anybody suggest me any good document available on net for this or any suggestion how i can use it in my application...? Thanks, Vinay
-
There's a built-in FIFO queue structure in the form of System.Collections.Generic.Queue. From there, you could just queue up some communication procedures, each one getting executed in order from the queue.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
Thanks for reply... in my application i'm doing smething like this... string TransmitData = "My Data To be tranmitted"; // on some button click i am ptting that data in queue Queue.Enqueue(TransmitData); Now i want to check that if there is ay data in my queue then i have to transmit it...so how i can check that data is present in Queue or not...& if there are 3-4 requests for same data to be transmitted are present in the queue how i'll identify top most (first in data) & how my application will transmit that data... SerialPort.Write(TransmitData); Can u suggest me anything for this... Regards, Vinay
-
Thanks for reply... in my application i'm doing smething like this... string TransmitData = "My Data To be tranmitted"; // on some button click i am ptting that data in queue Queue.Enqueue(TransmitData); Now i want to check that if there is ay data in my queue then i have to transmit it...so how i can check that data is present in Queue or not...& if there are 3-4 requests for same data to be transmitted are present in the queue how i'll identify top most (first in data) & how my application will transmit that data... SerialPort.Write(TransmitData); Can u suggest me anything for this... Regards, Vinay
Queue<string> myQueue = new Queue<string>();
// Enqueue an item.
myQueue.Enqueue("My Data To be transmitted");// Check if there is any data in my queue.
if(myQueue.Count > 0)
{
// There is data in the queue.
}// Find the first item in the queue while leaving it in the queue.
string firstItem = myQueue.Peek();// Find the first item in the queue while removing it from the queue.
string firstItemNowRemoved = myQueue.Dequeue();Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango