| mtServer Event Types in TCPmaker Ethernet Controller Software |
|
|
|
|
The TCPmaker Software Framework for PIC ethernet controller software has other events, with corresponding event handlers that you can customize: Event name: Description & Suggested Uses: mtUserInit Called once, when device first starts. Use to initialize your hardware after powerup. mtFastTick Called once each time around the main loop (interval 10’s of microseconds), whether or not a connection is made to a PC browser. Use sparingly, to do small amounts of work that needs to be done often, preferably in a state machine. mtConnect Called when a connection is first established to a PC browser. Use to perform initializations that need to happen when connection is first established, like updating / displaying certain variables, or sending the current states of everything, so PC browser display starts out right. mtStartOfMessage Called when a message is received by device but before it is decoded: ~ 10-12x per sec. This would be another place to call a state machine of your own, to power your own app more slowly (less often) than calling your state machine from mtFastTick. mtEndOfMessage Called when a message is received by device and after it is decoded: ~ 10-12x per sec. Good place to add code to send responses back to PC browser, or send variables for display on PC. mtDisconnect Called when a connection to a PC browser is lost or intentionally disconnected. Use to perform any cleanup operations needed after connection is terminated. |






