TCPmaker : Visual Tour    Exploring and Customizing the Generated Code  

This example shows what we mean when we say that TCPmaker works by a principle of Direct Transfer of Variables. Here is how the process works:

  • In TCPmaker's Visual Page Designer, we create a variable called D1.
  • We place a pushbutton Pb1 on our layout.
  • We associate variable D1 with pushbutton Pb1.
  • When TCPmaker generates code for your device, it declares a variable in your PIC code of the same name, D1. It also creates a Receive Event handler for D1, along with the means to call it at the proper time.
  • When you run your device and click on pushbutton Pb1 on your PC browser screen, the state of the pushbutton gets placed in the associated variable D1.
  • That new value for associated variable D1 gets sent to your device over the Ethernet.
  • The TCPmaker code framework in your device places the new value it received from the PC into the variable D1 in your device, and calls the Receive Event Handler for D1.
  • You can add any code you want to this Receive Event Handler for D1, to just use the new value that is now in variable D1.
 
  

9 of 21
Copyright Notice and Author Information