Human Computer Interaction » History » Version 10
  Aleksander Bešir, 28.12.2010 13:42 
  
| 1 | 5 | Aleksander Bešir | h1. Human Computer Interaction  | 
|---|---|---|---|
| 2 | 1 | Aleksander Bešir | |
| 3 | {{toc}} | 
||
| 4 | |||
| 5 | h2. 1 Basic concept  | 
||
| 6 | |||
| 7 | h3. 1.1 Hardware  | 
||
| 8 | |||
| 9 | 5 | Aleksander Bešir | p. The HCI will will be realised as a website. It will run on an Apache Tomcat http server, which will not run on the same device as Eneraptor's logic. Instead it will run on an independent proxy server.  | 
| 10 | 1 | Aleksander Bešir | |
| 11 | p=. !HMI_website_overall.png!  | 
||
| 12 | |||
| 13 | p. The intended server-side html generating aplication is Tomcat's Jasper, making JSP the intended website programming language.  | 
||
| 14 | |||
| 15 | 8 | Aleksander Bešir | h3. 1.2 HCI features  | 
| 16 | 1 | Aleksander Bešir | |
| 17 | 8 | Aleksander Bešir | The picture below shows basic HCI features:  | 
| 18 | |||
| 19 | !HCI_basic.png!  | 
||
| 20 | 1 | Aleksander Bešir | |
| 21 | 9 | Aleksander Bešir | h2. 2 Communication with other parts  | 
| 22 | |||
| 23 | h3. Logged data (instructions for syslog dev)  | 
||
| 24 | |||
| 25 | All logged data has to be written in a *PostgreSQL* database. Database's name must be *eneraptor-db*. Data must be writen in *standard public schema* (default).  | 
||
| 26 | |||
| 27 | The database table will exist prior to logging unit's (Janez) first run, so logging unit does not need to create the table. The logging unit *must* know, how to add a log entry to the database correctly, so that HCI will be able to use this data:  | 
||
| 28 | |||
| 29 | Every new log entry should be added with the following SQL query:  | 
||
| 30 | |||
| 31 | <pre>  | 
||
| 32 | INSERT INTO logged_data(  | 
||
| 33 | id, "version", date_recieved, device_id, reported_data)  | 
||
| 34 |     VALUES (nextval('hibernate_sequence'), 0, now(), 'enterDeviceIdHere', 'enterReportedDataHere'); | 
||
| 35 | </pre>  | 
||
| 36 | |||
| 37 | enterDeviceIdHere and enterReportedDataHere should be replaced with actual data. Logging unit *must not* change other parts of the SQL query above.  | 
||
| 38 | |||
| 39 | 10 | Aleksander Bešir | While developing the logging unit (Janez) it may be useful to have a test database like the one HCI will create in the final product. You can create such a database with the following SQL query:  | 
| 40 | |||
| 41 | [[createEneraptorDatabase.backup]]  | 
||
| 42 | |||
| 43 | 1 | Aleksander Bešir | h2. References  | 
| 44 | |||
| 45 | # Chopra, Vivek, et al., _Professional Apache Tomcat 6_, Wrox - Wiley, 2007  | 
||
| 46 | # Basham, Bryan, et al., _Head First Servlets and JSP™_, O’Reilly, 2008  | 
||
| 47 | |||
| 48 | h2. Attachments  |