Re: How to Convert 8bit into 6bit AIS encapsulation?
- From: "Larry Serflaten" <serflaten@xxxxxxxxxxxxxx>
- Date: Fri, 3 Nov 2006 11:30:16 -0600
"Jacquelin Hardy" <jachardy@xxxxxxxxxxxx> wrote
Do you think it is more effective to use a table or to go the other way?
I would suggest the more optimal method would use a look-up table opposed
to calculations. But, to be sure, timed trials would be advisable.
Can my decoding routine be the reason for the slow down ?
I can't be sure without further knowlege of your system.
One last question, when a timer fires an event at a choosen interval of
1 second, is it possible that the event is not fired if the processor is
too busy ? If this is the case, is there a way around this ?
The timer event is queued such that it can be delayed for a number
of reasons. A busy processor could cause a delay. Also, if code in
your timer event is still running when another event is due, that second
event would be missed entirely (never enter the queue).
There is no way to do more work in less time than it takes to do the
work. A slower machine is going process data slower. What you
can do, depending on your circumstances, is acknowlege that the
real world may get pretty hectic and encorporate a means to cope
with the onslaught.
One such method is to use queues to 'decouple' your input gathering
code from the code that processes the data. While you might be
able to gather input more quickly, with less missed input, it could
also mean that during periods of heavy use, you would see increased
lag between what has come in, and what has been processed.
What that might entail is that your timer event poll for input and
extract the message and put it in a queue. Code running elsewhere
(in another process even) could check to see if the queue has
data and pull the data off for processing, looping the process
until the queue is empty.
While this article is old and the code a little bloated for what you
want to do, it may give you some ideas, and a few snippettes of
code you can reuse:
http://www.devx.com/vb2themax/Article/19890
HTH
LFS
.
- Follow-Ups:
- Re: How to Convert 8bit into 6bit AIS encapsulation?
- From: Jacquelin Hardy
- Re: How to Convert 8bit into 6bit AIS encapsulation?
- References:
- How to Convert 8bit into 6bit AIS encapsulation?
- From: Howk013
- Re: How to Convert 8bit into 6bit AIS encapsulation?
- From: Jacquelin Hardy
- How to Convert 8bit into 6bit AIS encapsulation?
- Prev by Date: VB & Flash & Sound
- Next by Date: Re: How to Convert 8bit into 6bit AIS encapsulation?
- Previous by thread: Re: How to Convert 8bit into 6bit AIS encapsulation?
- Next by thread: Re: How to Convert 8bit into 6bit AIS encapsulation?
- Index(es):
Relevant Pages
|