TCPmaker : Visual Tour    Exploring and Customizing the Generated Code  

The mtStartOfMessage event:

The mtStartOfMessage() event handler is called when a message is received from the PC (about 12 times a second), but before this message is decoded.

Variables that may change at modest rates could be sent to the PC from here. (As long as the browser is connected, we should be receiving a message every 80 milliseconds or so: about 12x per second.)

This would also be a good place to do some of your processing work: do a little bit of work during each call to mtStartOfMessage(), using a State Machine. 

In our simple PICDEM.net2 project, we don't need to add any code to this mtDisconnect() handler.


16 of 21
Copyright Notice and Author Information