J
jayderk
Hello All,
I am in the middle of creating a class that I want to use with Serial IO per
the MVP on this forum.
I am still having trouble with my design process I think.
I created a class that is designed to basically receive messages from the
port. It is a CommEvent
private void port_DataReceived()
{
byte[] data = port.Input;
RxMESSAGE += Encoding.ASCII.GetString(data,0,data.Length);
}
this class is created from a WinCE form.
there suggestion was to create a seperate thread that receives data.
my question(s) in this process is
1)if I have a class that is created from a WinCE form( myThread = new
Utility.myThreadClass(); ) with the event port_DataReceived. Will that event
raise without locking up my WinCE form?
2) how do I start a thread that will allow this event to be raise and allow
me to continue working on my WinCE form? In every other situation I have
written a thread that calls one function, once that function was done the
thread was done also, in this case I am trying to start a thread the allows
an event to fire?
I am in the middle of creating a class that I want to use with Serial IO per
the MVP on this forum.
I am still having trouble with my design process I think.
I created a class that is designed to basically receive messages from the
port. It is a CommEvent
private void port_DataReceived()
{
byte[] data = port.Input;
RxMESSAGE += Encoding.ASCII.GetString(data,0,data.Length);
}
this class is created from a WinCE form.
there suggestion was to create a seperate thread that receives data.
my question(s) in this process is
1)if I have a class that is created from a WinCE form( myThread = new
Utility.myThreadClass(); ) with the event port_DataReceived. Will that event
raise without locking up my WinCE form?
2) how do I start a thread that will allow this event to be raise and allow
me to continue working on my WinCE form? In every other situation I have
written a thread that calls one function, once that function was done the
thread was done also, in this case I am trying to start a thread the allows
an event to fire?