polski

English

 

 

 

 

 

 

 

 

 

SOFTWARE -> YOUR APPLICATION

 

It is quite simple to create your own application, that can communicate to HAPCAN system. You can find here examples written in C++ language by using C++ Builder development environment of Borland. These examples are to help to create application, that suits user needs. All source codes are free of charge and given under MIT license, that gives rights to use, copy, modify, merge, publish and distribute.

 

Development environment

Example software has been written in C++ Builder Personal 6 of Borland. Full version of this development environment was distributed on CDs with IT magazines.

 

Programs

To test example programs you can use HAPCAN demo system. The IP number of the demo system is dynamic. Actual one can be checked on this page by typing hapcan.no-ip.org address. The port number is 80.

 

 

EXAMPLE 1

 

This is the simplest program to communicate to HAPCAN system. Application connects through Ethernet interface. All messages sent by modules will be displayed in text window. To send a message, the 12 bytes have to be chosen and SEND button has to be pressed.  AS default to send message is set ID request (message 0x103).

 

more

 

EXAMPLE 2

 

The program similar to example 1, but has more feature:

- richer TCP socket error handling;

- 6 quick message buttons.

 

more

 

 

EXAMPLE 3

 

This program can control and monitor status of two modules dimmer and relay. It is easy to extend number of controlled devices. If status of any module changes, the program will display it immediately. By clicking on module symbol, it is possible to control device.

 

more

 

 

EXAMPLE 4

 

The source code of one of HAPCAN Visualizer applications.

 

 

 

HAPCAN Visualizer v1.12.zip (1,35MB)